mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-29 13:28:10 +00:00
Try -libmldap before -lldap in case there is no link from libibmldap.so
to libldap.so. Since IBM ldap is installed under /opt we should only be able to reach it if --with-ldap was given an explicit path. Only check for ber_set_option() if LBER_OPT_DEBUG_LEVEL is defined.
This commit is contained in:
parent
d75e5f6fef
commit
9c17914bf9
46
configure
vendored
46
configure
vendored
@ -20893,7 +20893,7 @@ return ldap_init ();
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
for ac_lib in '' "ldap" "ldap -llber" "ldap -llber -lssl -lcrypto" "ibmldap${IBMLDAP_EXTRA}" "ibmldap -lidsldif${IBMLDAP_EXTRA}"; do
|
for ac_lib in '' "ibmldap${IBMLDAP_EXTRA}" "ibmldap -lidsldif${IBMLDAP_EXTRA}" "ldap" "ldap -llber" "ldap -llber -lssl -lcrypto" "ibmldap${IBMLDAP_EXTRA}"; do
|
||||||
if test -z "$ac_lib"; then
|
if test -z "$ac_lib"; then
|
||||||
ac_res="none required"
|
ac_res="none required"
|
||||||
else
|
else
|
||||||
@ -20934,7 +20934,25 @@ fi
|
|||||||
fi
|
fi
|
||||||
LIBS="${_LIBS} ${LDAP_LIBS}"
|
LIBS="${_LIBS} ${LDAP_LIBS}"
|
||||||
OLIBS="$LIBS"
|
OLIBS="$LIBS"
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ber_set_option" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lber.h defines LBER_OPT_DEBUG_LEVEL" >&5
|
||||||
|
$as_echo_n "checking whether lber.h defines LBER_OPT_DEBUG_LEVEL... " >&6; }
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
#include <sys/types.h>
|
||||||
|
# include <lber.h>
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
int opt=LBER_OPT_DEBUG_LEVEL;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_compile "$LINENO"; then :
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
|
$as_echo "yes" >&6; }
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ber_set_option" >&5
|
||||||
$as_echo_n "checking for library containing ber_set_option... " >&6; }
|
$as_echo_n "checking for library containing ber_set_option... " >&6; }
|
||||||
if ${ac_cv_search_ber_set_option+:} false; then :
|
if ${ac_cv_search_ber_set_option+:} false; then :
|
||||||
$as_echo_n "(cached) " >&6
|
$as_echo_n "(cached) " >&6
|
||||||
@ -20992,15 +21010,15 @@ else
|
|||||||
found=no
|
found=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test X"$found" = X"yes" -a X"$LIBS" != X"$OLIBS"; then
|
if test X"$found" = X"yes" -a X"$LIBS" != X"$OLIBS"; then
|
||||||
LDAP_LIBS="$LDAP_LIBS -llber"
|
LDAP_LIBS="$LDAP_LIBS -llber"
|
||||||
fi
|
fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lber.h is needed" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lber.h is needed" >&5
|
||||||
$as_echo_n "checking whether lber.h is needed... " >&6; }
|
$as_echo_n "checking whether lber.h is needed... " >&6; }
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
# include <ldap.h>
|
# include <ldap.h>
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
@ -21014,14 +21032,22 @@ if ac_fn_c_try_link "$LINENO"; then :
|
|||||||
$as_echo "no" >&6; }
|
$as_echo "no" >&6; }
|
||||||
else
|
else
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
$as_echo "yes" >&6; }
|
$as_echo "yes" >&6; }
|
||||||
$as_echo "#define HAVE_LBER_H 1" >>confdefs.h
|
$as_echo "#define HAVE_LBER_H 1" >>confdefs.h
|
||||||
|
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
|
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
|
||||||
for ac_header in sasl/sasl.h sasl.h
|
for ac_header in sasl/sasl.h sasl.h
|
||||||
do :
|
do :
|
||||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||||
|
29
configure.ac
29
configure.ac
@ -3313,7 +3313,7 @@ if test ${with_ldap-'no'} != "no"; then
|
|||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
hpux*) AC_CHECK_LIB(Csup, main, [IBMLDAP_EXTRA=" -lCsup"]);;
|
hpux*) AC_CHECK_LIB(Csup, main, [IBMLDAP_EXTRA=" -lCsup"]);;
|
||||||
esac
|
esac
|
||||||
AC_SEARCH_LIBS(ldap_init, "ldap" "ldap -llber" "ldap -llber -lssl -lcrypto" "ibmldap${IBMLDAP_EXTRA}" "ibmldap -lidsldif${IBMLDAP_EXTRA}", [
|
AC_SEARCH_LIBS(ldap_init, "ibmldap${IBMLDAP_EXTRA}" "ibmldap -lidsldif${IBMLDAP_EXTRA}" "ldap" "ldap -llber" "ldap -llber -lssl -lcrypto" "ibmldap${IBMLDAP_EXTRA}", [
|
||||||
test "$ac_res" != "none required" && LDAP_LIBS="$ac_res"
|
test "$ac_res" != "none required" && LDAP_LIBS="$ac_res"
|
||||||
found=yes
|
found=yes
|
||||||
])
|
])
|
||||||
@ -3324,16 +3324,23 @@ if test ${with_ldap-'no'} != "no"; then
|
|||||||
LIBS="${_LIBS} ${LDAP_LIBS}"
|
LIBS="${_LIBS} ${LDAP_LIBS}"
|
||||||
dnl check if we need to link with -llber for ber_set_option
|
dnl check if we need to link with -llber for ber_set_option
|
||||||
OLIBS="$LIBS"
|
OLIBS="$LIBS"
|
||||||
AC_SEARCH_LIBS([ber_set_option], [lber], [found=yes], [found=no])
|
AC_MSG_CHECKING([whether lber.h defines LBER_OPT_DEBUG_LEVEL])
|
||||||
if test X"$found" = X"yes" -a X"$LIBS" != X"$OLIBS"; then
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||||
LDAP_LIBS="$LDAP_LIBS -llber"
|
# include <lber.h>]], [[int opt=LBER_OPT_DEBUG_LEVEL;]])], [
|
||||||
fi
|
AC_MSG_RESULT([yes])
|
||||||
dnl check if ldap.h includes lber.h for us
|
AC_SEARCH_LIBS([ber_set_option], [lber], [found=yes], [found=no])
|
||||||
AC_MSG_CHECKING([whether lber.h is needed])
|
if test X"$found" = X"yes" -a X"$LIBS" != X"$OLIBS"; then
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
LDAP_LIBS="$LDAP_LIBS -llber"
|
||||||
# include <ldap.h>]], [[(void)ldap_init(0, 0)]])], [AC_MSG_RESULT([no])], [
|
fi
|
||||||
AC_MSG_RESULT([yes])
|
dnl check if ldap.h includes lber.h for us
|
||||||
AC_DEFINE(HAVE_LBER_H)])
|
AC_MSG_CHECKING([whether lber.h is needed])
|
||||||
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
||||||
|
# include <ldap.h>]], [[(void)ldap_init(0, 0)]])], [AC_MSG_RESULT([no])], [
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE(HAVE_LBER_H)])
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
|
|
||||||
AC_CHECK_HEADERS([sasl/sasl.h] [sasl.h], [
|
AC_CHECK_HEADERS([sasl/sasl.h] [sasl.h], [
|
||||||
AC_CHECK_FUNCS(ldap_sasl_interactive_bind_s)
|
AC_CHECK_FUNCS(ldap_sasl_interactive_bind_s)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user