diff options
author | Rob Austein <sra@hactrn.net> | 2011-01-20 13:41:20 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2011-01-20 13:41:20 +0000 |
commit | 81fbac5c5165e53236b821e9238aafeebc4076fd (patch) | |
tree | 1f837a9eb445285621634651238f9dd417d6f96f | |
parent | 3debee4485f6668dcc3e74fac26163350edfdd22 (diff) |
Fix all the broken RPATH stuff we said we'd fix "some day".
svn path=/configure; revision=3615
-rwxr-xr-x | configure | 9 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | openssl/Makefile.in | 32 | ||||
-rw-r--r-- | openssl/tests/Makefile | 30 | ||||
-rw-r--r-- | openssl/tests/Makefile.in | 35 | ||||
-rw-r--r-- | pywrap/Makefile.in | 2 |
6 files changed, 63 insertions, 53 deletions
@@ -601,7 +601,7 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS -OPENSSL_SHARED_LIBRARY_DIR +PYWRAP_LIBDIR PYWRAP_CMD PYWRAP OPENSSL_CONFIG_COMMAND @@ -4103,7 +4103,7 @@ ac_config_files="$ac_config_files Makefile rcynic/Makefile utils/Makefile utils/ if test $build_openssl = yes then - ac_config_files="$ac_config_files openssl/Makefile" + ac_config_files="$ac_config_files openssl/Makefile openssl/tests/Makefile" { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration target to use when building OpenSSL" >&5 @@ -4133,13 +4133,13 @@ if test $build_pywrap = yes then ac_config_files="$ac_config_files pywrap/Makefile" - OPENSSL_SHARED_LIBRARY_DIR='${libdir}/rpki' PYWRAP='${libexecdir}/pywrap' PYWRAP_CMD='LD_LIBRARY_PATH="${abs_top_builddir}/openssl/openssl" ${abs_top_builddir}/pywrap/pywrap' + PYWRAP_LIBDIR='${libdir}/pywrap' else - OPENSSL_SHARED_LIBRARY_DIR='' PYWRAP="$PYTHON" PYWRAP_CMD="$PYTHON" + PYWRAP_LIBDIR='' fi @@ -4904,6 +4904,7 @@ do "utils/print_roa/Makefile") CONFIG_FILES="$CONFIG_FILES utils/print_roa/Makefile" ;; "utils/uri/Makefile") CONFIG_FILES="$CONFIG_FILES utils/uri/Makefile" ;; "openssl/Makefile") CONFIG_FILES="$CONFIG_FILES openssl/Makefile" ;; + "openssl/tests/Makefile") CONFIG_FILES="$CONFIG_FILES openssl/tests/Makefile" ;; "pywrap/Makefile") CONFIG_FILES="$CONFIG_FILES pywrap/Makefile" ;; "rpkid/Makefile") CONFIG_FILES="$CONFIG_FILES rpkid/Makefile" ;; "rpkid/tests/Makefile") CONFIG_FILES="$CONFIG_FILES rpkid/tests/Makefile" ;; diff --git a/configure.ac b/configure.ac index 05a2c43f..ed576056 100644 --- a/configure.ac +++ b/configure.ac @@ -242,7 +242,7 @@ AC_CONFIG_FILES([Makefile if test $build_openssl = yes then - AC_CONFIG_FILES([openssl/Makefile]) + AC_CONFIG_FILES([openssl/Makefile openssl/tests/Makefile]) AC_MSG_CHECKING([what configuration target to use when building OpenSSL]) OPENSSL_CONFIG_COMMAND='./config' @@ -268,17 +268,17 @@ fi if test $build_pywrap = yes then AC_CONFIG_FILES([pywrap/Makefile]) - OPENSSL_SHARED_LIBRARY_DIR='${libdir}/rpki' PYWRAP='${libexecdir}/pywrap' PYWRAP_CMD='LD_LIBRARY_PATH="${abs_top_builddir}/openssl/openssl" ${abs_top_builddir}/pywrap/pywrap' + PYWRAP_LIBDIR='${libdir}/pywrap' else - OPENSSL_SHARED_LIBRARY_DIR='' PYWRAP="$PYTHON" PYWRAP_CMD="$PYTHON" + PYWRAP_LIBDIR='' fi AC_SUBST(PYWRAP) AC_SUBST(PYWRAP_CMD) -AC_SUBST(OPENSSL_SHARED_LIBRARY_DIR) +AC_SUBST(PYWRAP_LIBDIR) if test $build_python = yes then diff --git a/openssl/Makefile.in b/openssl/Makefile.in index 9c0a0f06..21daf3eb 100644 --- a/openssl/Makefile.in +++ b/openssl/Makefile.in @@ -2,27 +2,31 @@ VERSION = 1.0.0b -OPENSSL_CONFIG_COMMAND = @OPENSSL_CONFIG_COMMAND@ -OPENSSL_BUILD_DIRECTORY = @abs_builddir@/openssl -OPENSSL_SHARED_LIBRARY_DIR = @OPENSSL_SHARED_LIBRARY_DIR@ - -# Kludge alert: -# -# The --prefix= and LIBRPATH= settings below are to force OpenSSL's -# baroque configuration mechanism to build shared libraries that will -# run out of the build tree. This is temporary. Once we write "make -# install" code, we'll have to change that to point to the directory -# where the OpenSSL shared libraries will be installed. +OPENSSL_CONFIG_COMMAND = @OPENSSL_CONFIG_COMMAND@ +OPENSSL_BUILD_DIRECTORY = ${abs_builddir}/openssl +PYWRAP_LIBDIR = @PYWRAP_LIBDIR@ + +abs_top_srcdir = @abs_top_srcdir@ +abs_top_builddir = @abs_top_builddir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ +libdir = @libdir@ # We need to build with enable-shared whether we're really trying to # build shared OpenSSL libraries or not, because _POW.so requires # position independent code, so we need OpenSSL compiled with the -# options it would use for a shared library. +# options it would use for a shared library. This then requires +# further gymnastics to get an openssl executable linked against the +# static libraries, which we want so that we don't have to set +# LD_LIBRARY_PATH in all of our test scripts. -OPTIONS = enable-rfc3779 enable-cms no-dso enable-shared --prefix=${OPENSSL_BUILD_DIRECTORY} +OPTIONS = enable-rfc3779 enable-cms no-dso enable-shared --prefix=${prefix} all: openssl-${VERSION}/Makefile - cd openssl-${VERSION}; ${MAKE} $@ LIBRPATH=${OPENSSL_BUILD_DIRECTORY} + cd openssl-${VERSION}; ${MAKE} $@ LIBRPATH=${PYWRAP_LIBDIR} + cd openssl-${VERSION}; mkdir disabled; mv -fv *.so* disabled + cd openssl-${VERSION}; rm apps/openssl; cd apps; ${MAKE} $@ + cd openssl-${VERSION}; mv -fv disabled/* .; rmdir disabled ln -sf openssl-${VERSION} openssl clean: diff --git a/openssl/tests/Makefile b/openssl/tests/Makefile deleted file mode 100644 index 4e38c699..00000000 --- a/openssl/tests/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -# $Id$ - -OPENSSL_DIR = ../openssl - -CFLAGS = -g -I${OPENSSL_DIR}/include - -# -H -Wl,-t - -BIN = resource-set-test -OBJ = resource-set-test.o -LIB = ${OPENSSL_DIR}/libcrypto.a - -all: ${BIN} - -clean: - rm -f ${BIN} ${OBJ} - -${BIN}: ${OBJ} ${LIB} Makefile - ${CC} -g -o $@ ${OBJ} ${LIB} - -# This test needs more work - -test: ${BIN} test.cer - ./${BIN} -v -a AS:17 -i IPv4:10.0.0.44 -d test.cer - -test.cer: test.conf - ${OPENSSL_DIR}/apps/openssl req -new -x509 -config test.conf -keyout test.key -out test.cer -outform DER - -distclean: clean - rm -f test.key test.cer diff --git a/openssl/tests/Makefile.in b/openssl/tests/Makefile.in new file mode 100644 index 00000000..42a3cd74 --- /dev/null +++ b/openssl/tests/Makefile.in @@ -0,0 +1,35 @@ +# $Id$ + +NAME = resource-set-test + +BIN = ${NAME} +SRC = ${NAME}.c +OBJ = ${NAME}.o + +CFLAGS = @CFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ + +abs_top_srcdir = @abs_top_srcdir@ +abs_top_builddir = @abs_top_builddir@ + +OPENSSL = ${abs_top_builddir}/openssl/openssl/apps/openssl + +all: ${BIN} + +clean: + rm -f ${BIN} ${OBJ} + +${BIN}: ${SRC} + ${CC} ${CFLAGS} -o $@ ${SRC} ${LDFLAGS} ${LIBS} + +# This test needs more work + +test: ${BIN} test.cer + ./${BIN} -v -a AS:17 -i IPv4:10.0.0.44 -d test.cer + +test.cer: test.conf + ${OPENSSL} req -new -x509 -config test.conf -keyout test.key -out test.cer -outform DER + +distclean: clean + rm -f test.key test.cer diff --git a/pywrap/Makefile.in b/pywrap/Makefile.in index f3620535..85fb9342 100644 --- a/pywrap/Makefile.in +++ b/pywrap/Makefile.in @@ -1,7 +1,7 @@ # $Id$ CFLAGS = @CFLAGS@ -LDFLAGS = @LDFLAGS@ -L${abs_top_builddir}/openssl/openssl -Wl,-rpath,@OPENSSL_SHARED_LIBRARY_DIR@ +LDFLAGS = @LDFLAGS@ -L${abs_top_builddir}/openssl/openssl -Wl,-rpath,@PYWRAP_LIBDIR@ LIBS = -lssl -lcrypto PYTHON = @PYTHON@ |