]> granicus.if.org Git - sudo/commitdiff
Fix check that determines whether -llber is required.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 13 Jan 2008 19:57:34 +0000 (19:57 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 13 Jan 2008 19:57:34 +0000 (19:57 +0000)
configure
configure.in

index 3428891c584d563b5f2ca4a865e0d21c06de4024..425b62a1bbb2689fc73b742271b3cb75547f77a5 100755 (executable)
--- 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
index 7fce9d252e3bdea182dc2e3ed9be583c5eb7f924..8762e13de93703b808cb32d72ae22849731e2cf8 100644 (file)
@@ -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 <sys/types.h>