From: Sascha Schumann Date: Sun, 5 Dec 1999 22:41:08 +0000 (+0000) Subject: Add rpaths to LDFLAGS during configure, drop them later. X-Git-Tag: PRE_RETURN_REF_PATCH~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2a090c6f18e6b0f12dbee9f590c339ee29e3f90;p=php Add rpaths to LDFLAGS during configure, drop them later. --- diff --git a/acinclude.m4 b/acinclude.m4 index a8a5c68ad4..ce8e69937a 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -78,6 +78,7 @@ AC_DEFUN(AC_ADD_LIBPATH,[ if test "$1" != "/usr/lib"; then AC_EXPAND_PATH($1, ai_p) AC_PHP_ONCE(LIBPATH, $ai_p, [ + test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$ai_p" LDFLAGS="$LDFLAGS -L$ai_p" PHP_RPATHS="$PHP_RPATHS $ai_p" ]) diff --git a/configure.in b/configure.in index 03a0506b5b..d77730b0ef 100644 --- a/configure.in +++ b/configure.in @@ -731,7 +731,6 @@ dnl test -n "$GCC" && CFLAGS="$CFLAGS -fpic" dnl add -fPIC option on Solaris if we are building dynamic extensions dnl PHP_SOLARIS_PIC_WEIRDNESS -AC_BUILD_RPATH phplibdir="`pwd`/modules" phptempdir="`pwd`/libs" @@ -739,9 +738,13 @@ AC_SUBST(phplibdir) AC_SUBST(phptempdir) EXTRA_LIBS="$EXTRA_LIBS $LIBS" LIBS="" -EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LDFLAGS" +for i in $PHP_RPATHS; do + EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L$i" +done LDFLAGS="" +AC_BUILD_RPATH + AC_SUBST(CFLAGS) AC_SUBST(PROG_SENDMAIL) AC_SUBST(PHP_RPATHS)