Commit e5f3045f authored by Bodo Möller's avatar Bodo Möller
Browse files

Support INSTALL_PREFIX for packagers.

Submitted by:
Reviewed by:
PR:
parent 9f5f32c9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -5,6 +5,10 @@

 Changes between 0.9.2b and 0.9.3

  *) Support INSTALL_PREFIX for package builders, as proposed by
     David Harris.
     [Bodo Moeller]

  *) New Configure options "threads" and "no-threads".  For systems
     where the proper compiler options are known (currently Solaris
     and Linux), "threads" is the default.
+21 −9
Original line number Diff line number Diff line
@@ -13,10 +13,16 @@ use strict;
my $usage="Usage: Configure [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [rsaref] [no-threads] [no-asm] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] os/compiler[:flags]\n";

# Options:
#
# --openssldir  install OpenSSL in OPENSSLDIR (Default: DIR/ssl if the
#               --prefix option is given; /usr/local/ssl otherwise)
# --prefix      prefix for the OpenSSL include, lib and bin directories
#               (Default: the OPENSSLDIR directory)
#
# --install_prefix  Additional prefix for package builders (empty by
#               default).  This needn't be set in advance, you can
#               just as well use "make INSTALL_PREFIX=/whatever install".
#
# rsaref        use RSAref
# [no-]threads  [don't] try to create a library that is suitable for
#               multithreaded applications (default is "threads" if we
@@ -248,8 +254,9 @@ my %table=(
my @WinTargets=qw(VC-NT VC-WIN32 VC-WIN16 VC-W31-16 VC-W31-32 VC-MSDOS BC-32
	BC-16 CygWin32);

my $installprefix="";
my $prefix="";
my $openssldir="";
my $install_prefix="";
my $no_threads=0;
my $threads=0;
my $no_asm=0;
@@ -321,12 +328,16 @@ foreach (@ARGV)
			}
		elsif (/^--prefix=(.*)$/)
			{
			$installprefix=$1;
			$prefix=$1;
			}
		elsif (/^--openssldir=(.*)$/)
			{
			$openssldir=$1;
			}
		elsif (/^--install.prefix=(.*)$/)
			{
			$install_prefix=$1;
			}
		else
			{
			print STDERR $usage;
@@ -348,14 +359,14 @@ foreach (@ARGV)

my $IsWindows=scalar grep /^$target$/,@WinTargets;

$openssldir="/usr/local/ssl" if ($openssldir eq "" and $installprefix eq "");
$installprefix=$openssldir if $installprefix eq "";
$openssldir="/usr/local/ssl" if ($openssldir eq "" and $prefix eq "");
$prefix=$openssldir if $prefix eq "";

chop $openssldir if $openssldir =~ /\/$/;
chop $installprefix if $installprefix =~ /\/$/;
chop $prefix if $prefix =~ /\/$/;

$openssldir=$installprefix . "/ssl" if $openssldir eq "";
$openssldir=$installprefix . "/" . $openssldir if $openssldir !~ /^\//;
$openssldir=$prefix . "/ssl" if $openssldir eq "";
$openssldir=$prefix . "/" . $openssldir if $openssldir !~ /^\//;


print "IsWindows=$IsWindows\n";
@@ -457,8 +468,9 @@ while (<IN>)
	s/^VERSION=.*/VERSION=$version/;
	s/^MAJOR=.*/MAJOR=$major/;
	s/^MINOR=.*/MINOR=$minor/;
	s/^INSTALLTOP=.*$/INSTALLTOP=$installprefix/;
	s/^INSTALLTOP=.*$/INSTALLTOP=$prefix/;
	s/^OPENSSLDIR=.*$/OPENSSLDIR=$openssldir/;
	s/^INSTALL_PREFIX=.*$/INSTALL_PREFIX=$install_prefix/;
	s/^PLATFORM=.*$/PLATFORM=$target/;
	s/^CC=.*$/CC= $cc/;
	s/^CFLAG=.*$/CFLAG= $cflags/;
@@ -650,7 +662,7 @@ conflicts with other libraries.

To compile programs that use the old form <foo.h>,
usually an additional compiler option will suffice: E.g., add
     -I$installprefix/include/openssl
     -I$prefix/include/openssl
or
     -I$pwd/include/openssl
to the CFLAGS in the Makefile of the program that you want to compile
+11 −0
Original line number Diff line number Diff line
@@ -122,6 +122,17 @@
       include/openssl Contains the header files needed if you want to
                       compile programs with libcrypto or libssl.

     Package builders who want to configure the library for standard
     locations, but have the package installed somewhere else so that
     it can easily be packaged, can use

       $ make INSTALL_PREFIX=/tmp/package-root install

     (or specify "-install_prefix=/tmp/package-root" as a configure
     option).  The specified prefix will be prepended to all
     installation target filenames.


  NOTE: The header files used to reside directly in the include
  directory, but have now been moved to include/openssl so that
  OpenSSL can co-exist with other libraries which use some of the
+15 −11
Original line number Diff line number Diff line
@@ -6,6 +6,10 @@ VERSION=
MAJOR=
MINOR=
PLATFORM=dist
# INSTALL_PREFIX is for package builders so that they can configure
# for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
# Normally it is left empty.
INSTALL_PREFIX=
INSTALLTOP=/usr/local/ssl

# Do not edit this manually. Use Configure --openssldir=DIR do change this!
@@ -307,24 +311,24 @@ dist_pem_h:
	(cd crypto/pem; $(MAKE) SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean)

install: all
	@-mkdir -p $(INSTALLTOP)/bin 2>/dev/null
	@-mkdir -p $(INSTALLTOP)/lib 2>/dev/null
	@-mkdir -p $(INSTALLTOP)/include/openssl 2>/dev/null
	@-mkdir -p $(OPENSSLDIR)/misc 2>/dev/null
	@-mkdir -p $(OPENSSLDIR)/certs 2>/dev/null
	@-mkdir -p $(OPENSSLDIR)/private 2>/dev/null
	@-mkdir -p $(OPENSSLDIR)/lib 2>/dev/null
	@-mkdir -p $(INSTALL_PREFIX)$(INSTALLTOP)/bin 2>/dev/null
	@-mkdir -p $(INSTALL_PREFIX)$(INSTALLTOP)/lib 2>/dev/null
	@-mkdir -p $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl 2>/dev/null
	@-mkdir -p $(INSTALL_PREFIX)$(OPENSSLDIR)/misc 2>/dev/null
	@-mkdir -p $(INSTALL_PREFIX)$(OPENSSLDIR)/certs 2>/dev/null
	@-mkdir -p $(INSTALL_PREFIX)$(OPENSSLDIR)/private 2>/dev/null
	@-mkdir -p $(INSTALL_PREFIX)$(OPENSSLDIR)/lib 2>/dev/null
	@for i in $(DIRS) ;\
	do \
	(cd $$i; echo "installing $$i..."; \
	$(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' install ); \
	$(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALL_PREFIX='${INSTALL_PREFIX}' INSTALLTOP='${INSTALLTOP}' OPENSSLDIR='${OPENSSLDIR}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' install ); \
	done
	@for i in $(LIBS) ;\
	do \
	(       echo installing $$i; \
		cp $$i $(INSTALLTOP)/lib; \
		$(RANLIB) $(INSTALLTOP)/lib/$$i; \
		chmod 644 $(INSTALLTOP)/lib/$$i ); \
		cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
		$(RANLIB) $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
		chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
	done

# DO NOT DELETE THIS LINE -- make depend depends on it.
+1 −20
Original line number Diff line number Diff line

  OpenSSL STATUS                           Last modified at
  ______________                           $Date: 1999/04/27 12:01:53 $
  ______________                           $Date: 1999/04/29 21:51:00 $

  DEVELOPMENT STATE

@@ -30,7 +30,6 @@
  AVAILABLE PATCHES

    o OCSP (titchenert@certco.com) 
    o Install prefix for packagers (dharris@drh.net)
    o getenv in ca.c and x509_def.c (jaltman@watsun.cc.columbia.edu)
    o linux dynamic libs (colin@field.medicine.adelaide.edu.au)
    o MingW support (niklas@canit.se)
@@ -95,24 +94,6 @@
                      itself. Then we can avoid a lot of those platform checks
                      which are currently in Configure.

    o  The installation under "make install" produces a very
       installation layout: $prefix/certs and $prefix/private dirs.  That's
       not nice. Ralf suggests to move the two certs and private dirs either
       to $prefix/etc/, $prefix/lib/ or $prefix/share. Alternatively
       we could also not install the certs at all.

       Status: Ralf +1 for both not installing the certs at all and
                       moving it to $prefix/etc/. +0 for $prefix/lib/
                       and $prefix/share.
               Paul: why is it not nice?
               Ralf: because it messes up the install dir when
                     $prefix is not a dedicated area like /usr/local/ssl.
                     When we move them to a standard subdir like
                     etc/ lib/ or share/ we don't mess up things
                     when $prefix is /usr or /usr/local, etc.
                     Additionally it makes package vendors life
                     easier....

    o  Support for Shared Libraries has to be added at least
       for the major Unix platforms. The details we can rip from the stuff
       Ralf has done for the Apache src/Configure script. Ben wants the
Loading