diff --git a/configure b/configure index 7bfe2b552..da6634d7c 100755 --- a/configure +++ b/configure @@ -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" diff --git a/configure.in b/configure.in index ea708b0ac..4e72d156c 100644 --- a/configure.in +++ b/configure.in @@ -3173,6 +3173,14 @@ if test ${with_ldap-'no'} != "no"; then #include #include ]], [[(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