Improve/fix handling of --disable-rpath

Might or might not fix #18374
This commit is contained in:
Sascha Schumann 2002-07-20 01:28:56 +00:00
parent 61e5e9a93d
commit aef27e37e1
2 changed files with 18 additions and 11 deletions

View File

@ -884,19 +884,26 @@ AC_DEFUN(PHP_ADD_LIBPATH,[
])
dnl
dnl PHP_BUILD_RPATH()
dnl PHP_UTILIZE_RPATHS()
dnl
dnl builds RPATH from PHP_RPATHS
dnl builds RPATHS/LDFLAGS from PHP_RPATHS
dnl
AC_DEFUN(PHP_BUILD_RPATH,[
if test "$PHP_RPATH" = "yes" && test -n "$PHP_RPATHS"; then
OLD_RPATHS=$PHP_RPATHS
AC_DEFUN(PHP_UTILIZE_RPATHS,[
OLD_RPATHS=$PHP_RPATHS
unset PHP_RPATHS
for i in $OLD_RPATHS; do
dnl Can be passed to native cc/libtool
PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
dnl Libtool-specific
PHP_RPATHS="$PHP_RPATHS -R $i"
dnl cc-specific
NATIVE_RPATHS="$NATIVE_RPATHS $ld_runpath_switch$i"
done
if test "$PHP_RPATH" = "no"; then
unset PHP_RPATHS
for i in $OLD_RPATHS; do
PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
PHP_RPATHS="$PHP_RPATHS -R $i"
NATIVE_RPATHS="$NATIVE_RPATHS $ld_runpath_switch$i"
done
unset NATIVE_RPATHS
fi
])

View File

@ -892,7 +892,7 @@ AC_SUBST(EXPANDED_SYSCONFDIR)
AC_SUBST(EXPANDED_LOCALSTATEDIR)
AC_SUBST(EXPANDED_PHP_CONFIG_FILE_PATH)
PHP_BUILD_RPATH
PHP_UTILIZE_RPATHS
PHP_REMOVE_USR_LIB(PHP_LDFLAGS)
PHP_REMOVE_USR_LIB(LDFLAGS)