On HP-UX, libibmldap has a hidden dependency on libCsup

This commit is contained in:
Todd C. Miller
2013-03-18 15:19:12 -04:00
parent 7109e46deb
commit 1a51a993de
2 changed files with 49 additions and 0 deletions

41
configure vendored
View File

@@ -19790,6 +19790,47 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
done
# On HP-UX, libibmldap has a hidden dependency on libCsup
case "$found-$host_os" in
yes-hpux*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lCsup" >&5
$as_echo_n "checking for main in -lCsup... " >&6; }
if ${ac_cv_lib_Csup_main+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lCsup $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
return main ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_Csup_main=yes
else
ac_cv_lib_Csup_main=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Csup_main" >&5
$as_echo "$ac_cv_lib_Csup_main" >&6; }
if test "x$ac_cv_lib_Csup_main" = xyes; then :
LIBS="${LIBS} -lCsup"
LDAP_LIBS="${LDAP_LIBS} -lCsup"
fi
esac
fi
if test "$found" = "no"; then
LIBS="${_LIBS} -lldap"

View File

@@ -3173,6 +3173,14 @@ if test ${with_ldap-'no'} != "no"; then
#include <lber.h>
#include <ldap.h>]], [[(void)ldap_init(0, 0)]])], [found=yes; break])
done
# On HP-UX, libibmldap has a hidden dependency on libCsup
case "$found-$host_os" in
yes-hpux*)
AC_CHECK_LIB(Csup, main, [
LIBS="${LIBS} -lCsup"
LDAP_LIBS="${LDAP_LIBS} -lCsup"
])
esac
fi
dnl if nothing linked just try with -lldap
if test "$found" = "no"; then