Bug #4906: LDAP libs directory needs to be specified before the libs

From: Date: Thu, 08 Jun 2000 15:41:39 +0000
Subject: Bug #4906: LDAP libs directory needs to be specified before the libs
Groups: php.dev 
Request: Send a blank email to php-dev+get-20578@lists.php.net to get a copy of this message
From: jouvin@lal.in2p3.fr Operating system: Tru64 PHP version: 3.0.16 PHP Bug Type: Installation problem Bug description: LDAP libs directory needs to be specified before the libs configure is adding -Lldap_dir after -lldap. With Tru64 ld, this leads to ldap libraries not found. I modified configure so that, like for other packages -L option is put before related -l. Here is the diff : *** configure Thu Jun 8 16:38:17 2000 --- configure.original Thu Jun 8 16:38:14 2000 *************** *** 10070,10099 **** fi - if test "$LDAP_LIBDIR" != "/usr/lib"; then - if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then - ai_p="$LDAP_LIBDIR" - else - ai_p="pwd/$LDAP_LIBDIR" - fi - - - unique=echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9 - cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" - if test -n "$unique" && test "eval $cmd" = "" ; then - eval "LIBPATH$unique=set" - - EXTRA_LIBS="$EXTRA_LIBS -L$ai_p" - if test -n "$APXS" ; then - RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'" - else - RPATHS="$RPATHS ${ld_runpath_switch}$ai_p" - fi - - fi - fi - - if test uname = "Linux"; then LDAP_PTHREAD="pthread" else --- 10070,10075 ---- *************** *** 10218,10223 **** --- 10194,10225 ---- EOF fi + + + if test "$LDAP_LIBDIR" != "/usr/lib"; then + + if test -z "$LDAP_LIBDIR" || echo "$LDAP_LIBDIR" | grep '^/' >/dev/null ; then + ai_p="$LDAP_LIBDIR" + else + ai_p="pwd/$LDAP_LIBDIR" + fi + + + unique=echo $ac_n "$ai_p$ac_c" | tr -c -d a-zA-Z0-9 + cmd="echo $ac_n \"\$LIBPATH$unique$ac_c\"" + if test -n "$unique" && test "eval $cmd" = "" ; then + eval "LIBPATH$unique=set" + + EXTRA_LIBS="$EXTRA_LIBS -L$ai_p" + if test -n "$APXS" ; then + RPATHS="$RPATHS ${apxs_runpath_switch}$ai_p'" + else + RPATHS="$RPATHS ${ld_runpath_switch}$ai_p" + fi + + fi + + fi if test "$LDAP_INCDIR" != "/usr/include"; then

« previous php.dev (#20578) next »