summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2005-08-13 09:43:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:00:32 -0500
commit9a6c50f5525c0eba739a4e3f500e91ef407e69b6 (patch)
treeb9152c8d8406e12757b3f1068230acb068d9de2b
parent8def0da1da799c5e9d34f63aef80485c2eda3e86 (diff)
downloadsamba-9a6c50f5525c0eba739a4e3f500e91ef407e69b6.tar.gz
samba-9a6c50f5525c0eba739a4e3f500e91ef407e69b6.tar.bz2
samba-9a6c50f5525c0eba739a4e3f500e91ef407e69b6.zip
r9302: Change AC_LIBTESTFUNC to check in the current $LIBS before adding the new
library. This stop us adding spurious libraries when the symbol we are looking for is in libc. Bugzilla bug #2471. (This used to be commit e1fee059e8de782bc9de671dc8757dbaa3e3e091)
-rw-r--r--source3/aclocal.m420
1 files changed, 13 insertions, 7 deletions
diff --git a/source3/aclocal.m4 b/source3/aclocal.m4
index 6acd14e19f..af93aa2368 100644
--- a/source3/aclocal.m4
+++ b/source3/aclocal.m4
@@ -102,16 +102,22 @@ AC_DEFUN(AC_HAVE_DECL,
])
-dnl check for a function in a library, but don't
+dnl Check for a function in a library, but don't
dnl keep adding the same library to the LIBS variable.
+dnl Check whether the function is available in the current
+dnl LIBS before adding the library. This prevents us spuriously
+dnl finding symbols that are in libc.
dnl AC_LIBTESTFUNC(lib,func)
AC_DEFUN(AC_LIBTESTFUNC,
-[case "$LIBS" in
- *-l$1*) AC_CHECK_FUNCS($2) ;;
- *) AC_CHECK_LIB($1, $2)
- AC_CHECK_FUNCS($2)
- ;;
- esac
+[
+ AC_CHECK_FUNCS($2, [],
+ [ case "$LIBS" in
+ *-l$1*) AC_CHECK_FUNCS($2) ;;
+ *) AC_CHECK_LIB($1, $2)
+ AC_CHECK_FUNCS($2)
+ ;;
+ esac
+ ])
])
# AC_CHECK_LIB_EXT(LIBRARY, [EXT_LIBS], [FUNCTION],