HP-UX 32bit:
authorLutz Jänicke <jaenicke@openssl.org>
Tue, 29 Jan 2002 16:32:40 +0000 (16:32 +0000)
committerLutz Jänicke <jaenicke@openssl.org>
Tue, 29 Jan 2002 16:32:40 +0000 (16:32 +0000)
* When linking against shared libraries, the absolute path is remembered.
  - When linking against -L.., '..' is remembered inside the executable,
    so it will fail after "make install" or when not called from inside the
    "apps/" subdirectory of the build tree.
  - When using the "+cdp" option of "ld", the ".." information can be
    exchanged against $(INSTALL_TOP)/lib. In this case the executable
    will however refuse to work before "make install" has been called.
    This makes testing the 'openssl' executable a problem.
* Solution 1:
  Relink the "openssl" executable, when "make install" is called.
  This would however require significant changes to the toplevel Makefile
  and the apps/ Makefile.
* Solution 2:
  Statically link against libssl and libcrypto, so that the "openssl"
  executable is no longer dependant on the openssl shared libraries.

Select option 2 for HP-UX 32bit, as this requires the smallest change.

apps/Makefile.ssl

index 53bea9f87ab9c91315aa8c3c90c2234ee7f84e20..eb0f830700d7155b77cb7c993ac02bee37953676 100644 (file)
@@ -24,6 +24,8 @@ PEX_LIBS=
 EX_LIBS= 
 EXE_EXT= 
 
+SHLIB_TARGET=
+
 CFLAGS= -DMONOLITH $(INCLUDES) $(CFLAG)
 
 GENERAL=Makefile makeapps.com install.com
@@ -139,7 +141,11 @@ $(DLIBCRYPTO):
 
 $(PROGRAM): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
        $(RM) $(PROGRAM)
-       $(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS)
+       if [ "$(SHLIB_TARGET)" = "hpux-shared" ] ; then \
+         $(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(DLIBSSL) $(LIBKRB5) $(DLIBCRYPTO) $(EX_LIBS) ; \
+       else \
+         $(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBKRB5) $(LIBCRYPTO) $(EX_LIBS) ; \
+       fi
        -(cd ..; OPENSSL="`pwd`/apps/openssl"; export OPENSSL; \
                LIBPATH="`pwd`"; LD_LIBRARY_PATH="`pwd`"; SHLIB_PATH="`pwd`"; \
                export LD_LIBRARY_PATH SHLIB_PATH LIBPATH; \