From 56f88566e94ad9b439049580887123e989ae151e Mon Sep 17 00:00:00 2001 From: Jani Taskinen Date: Mon, 20 Aug 2007 14:28:29 +0000 Subject: [PATCH] - Part 1 of fixing problems with runpath switch (make --disable-rpath work for real) --- acinclude.m4 | 6 +++++- configure.in | 8 ++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 04877282693..62baa98da32 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -323,6 +323,9 @@ else ld_runpath_switch=-L fi fi +if test "$PHP_RPATH" = "no"; then + ld_runpath_switch= +fi ]) dnl @@ -447,7 +450,8 @@ AC_DEFUN([PHP_ADD_LIBPATH],[ _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) ],[ if test "$ext_shared" = "yes"; then - $2="$ld_runpath_switch$ai_p -L$ai_p [$]$2" + $2="-L$ai_p [$]$2" + test -n "$ld_runpath_switch" && $2="$ld_runpath_switch$ai_p [$]$2" else _PHP_ADD_LIBPATH_GLOBAL([$ai_p]) fi diff --git a/configure.in b/configure.in index 64abaac54ed..985849237af 100644 --- a/configure.in +++ b/configure.in @@ -138,6 +138,10 @@ dnl Support systems with system libraries in e.g. /usr/lib64 PHP_ARG_WITH(libdir, for system library directory, [ --with-libdir=NAME Look for libraries in .../NAME rather than .../lib],lib,no) +PHP_ARG_ENABLE(rpath, whether to enable runpaths, +[ --disable-rpath Disable passing additional runtime library + search paths], yes, no) + dnl check for -R, etc. switch PHP_RUNPATH_SWITCH @@ -755,10 +759,6 @@ else AC_DEFINE(PHP_SIGCHILD, 0, [ ]) fi -PHP_ARG_ENABLE(rpath, whether to enable runpaths, -[ --disable-rpath Disable passing additional runtime library - search paths], yes, no) - PHP_ARG_ENABLE(libgcc, whether to explicitly link against libgcc, [ --enable-libgcc Enable explicitly linking against libgcc], no, no)