]> granicus.if.org Git - php/commitdiff
MFH:- Part 1 of fixing problems with runpath switch (make --disable-rpath work for...
authorJani Taskinen <jani@php.net>
Mon, 20 Aug 2007 14:28:45 +0000 (14:28 +0000)
committerJani Taskinen <jani@php.net>
Mon, 20 Aug 2007 14:28:45 +0000 (14:28 +0000)
acinclude.m4
configure.in

index 04877282693bd498b2512024471b37881ff338bd..62baa98da320dd348f7366e8ef1e494fc82ca303 100644 (file)
@@ -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
index cfcc9d2ff64c48a95d1d6ec30242069be7492bc2..4e451b6f49a36b97fd7e67766912ac71a6e6bcc6 100644 (file)
@@ -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
 
@@ -789,10 +793,6 @@ else
   AC_DEFINE(MAGIC_QUOTES, 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)