1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

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)
This commit is contained in:
James Peach 2005-08-13 09:43:12 +00:00 committed by Gerald (Jerry) Carter
parent 8def0da1da
commit 9a6c50f552

20
source3/aclocal.m4 vendored
View File

@ -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],