From: Todd C. Miller Date: Sun, 13 Jan 2008 19:57:34 +0000 (+0000) Subject: Fix check that determines whether -llber is required. X-Git-Tag: SUDO_1_7_0~235 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dde5143f08daf796655f146992fb2acde39bde7b;p=sudo Fix check that determines whether -llber is required. --- diff --git a/configure b/configure index 3428891c5..425b62a1b 100755 --- a/configure +++ b/configure @@ -21979,9 +21979,16 @@ echo "${ECHO_T}$ac_cv_search_ber_set_option" >&6; } ac_res=$ac_cv_search_ber_set_option if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - LDAP_LIBS="$LDAP_LIBS -llber" + found=yes +else + found=no fi + if test $found="yes"; then + case "$LIBS" in + *-llber*) LDAP_LIBS="$LDAP_LIBS -llber";; + esac + fi { echo "$as_me:$LINENO: checking whether lber.h is needed" >&5 echo $ECHO_N "checking whether lber.h is needed... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF diff --git a/configure.in b/configure.in index 7fce9d252..8762e13de 100644 --- a/configure.in +++ b/configure.in @@ -2299,8 +2299,13 @@ if test ${with_ldap-'no'} != "no"; then else AC_MSG_RESULT([$LDAP_LIBS]) fi - dnl check for ber_set_option in -llber - AC_SEARCH_LIBS([ber_set_option], [lber], [LDAP_LIBS="$LDAP_LIBS -llber"]) + dnl check if we need to link with -llbre for ber_set_option + AC_SEARCH_LIBS([ber_set_option], [lber], [found=yes], [found=no]) + if test $found="yes"; then + case "$LIBS" in + *-llber*) LDAP_LIBS="$LDAP_LIBS -llber";; + esac + fi dnl check if ldap.h includes lber.h for us AC_MSG_CHECKING([whether lber.h is needed]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include