From 63f224f04523a3deb192246ab4519fd6507b5ade Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 15 Jan 2008 12:28:33 +0000 Subject: [PATCH] Don't add -llber twice. --- configure | 9 ++++----- configure.in | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/configure b/configure index 425b62a1b..c56e0bdef 100755 --- a/configure +++ b/configure @@ -21899,7 +21899,8 @@ echo "${ECHO_T}not found, using -lldap" >&6; } { echo "$as_me:$LINENO: result: $LDAP_LIBS" >&5 echo "${ECHO_T}$LDAP_LIBS" >&6; } fi - { echo "$as_me:$LINENO: checking for library containing ber_set_option" >&5 + OLIBS="$LIBS" + { echo "$as_me:$LINENO: checking for library containing ber_set_option" >&5 echo $ECHO_N "checking for library containing ber_set_option... $ECHO_C" >&6; } if test "${ac_cv_search_ber_set_option+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -21984,10 +21985,8 @@ else found=no fi - if test $found="yes"; then - case "$LIBS" in - *-llber*) LDAP_LIBS="$LDAP_LIBS -llber";; - esac + if test X"$found" = X"yes" -a X"$LIBS" != X"$OLIBS"; then + LDAP_LIBS="$LDAP_LIBS -llber" fi { echo "$as_me:$LINENO: checking whether lber.h is needed" >&5 echo $ECHO_N "checking whether lber.h is needed... $ECHO_C" >&6; } diff --git a/configure.in b/configure.in index 8762e13de..60349e805 100644 --- a/configure.in +++ b/configure.in @@ -2299,12 +2299,11 @@ if test ${with_ldap-'no'} != "no"; then else AC_MSG_RESULT([$LDAP_LIBS]) fi - dnl check if we need to link with -llbre for ber_set_option + dnl check if we need to link with -llber for ber_set_option + OLIBS="$LIBS" 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 + if test X"$found" = X"yes" -a X"$LIBS" != X"$OLIBS"; then + LDAP_LIBS="$LDAP_LIBS -llber" fi dnl check if ldap.h includes lber.h for us AC_MSG_CHECKING([whether lber.h is needed]) -- 2.40.0