summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/aclocal.m438
-rw-r--r--source3/configure.in50
2 files changed, 48 insertions, 40 deletions
diff --git a/source3/aclocal.m4 b/source3/aclocal.m4
index b27dc2ec5d..b66a1c253e 100644
--- a/source3/aclocal.m4
+++ b/source3/aclocal.m4
@@ -61,55 +61,59 @@ dnl adding libraries for symbols that are in libc.
dnl
dnl On success, the default actions ensure that HAVE_FOO is defined. The lib
dnl is always added to $LIBS if it was found to be necessary. The caller
-dnl can use SMB_LIB_REMOVE to strp this if necessary.
+dnl can use SMB_REMOVE_LIB to strp this if necessary.
AC_DEFUN([AC_LIBTESTFUNC],
[
AC_CHECK_FUNCS($2,
[
# $2 was found in libc or existing $LIBS
- ifelse($3, [],
+ m4_ifval([$3],
[
- AC_DEFINE(translit([HAVE_$2], [a-z], [A-Z]), 1,
- [Whether $2 is available])
+ $3
],
[
- $3
+ AC_DEFINE(translit([HAVE_$2], [a-z], [A-Z]), 1,
+ [Whether $2 is available])
])
],
[
# $2 was not found, try adding lib$1
case " $LIBS " in
*\ -l$1\ *)
- ifelse($4, [],
+ m4_ifval([$4],
+ [
+ $4
+ ],
[
# $2 was not found and we already had lib$1
# nothing to do here by default
true
- ],
- [ $4 ])
+ ])
;;
*)
# $2 was not found, try adding lib$1
AC_CHECK_LIB($1, $2,
[
LIBS="-l$1 $LIBS"
- ifelse($3, [],
+ m4_ifval([$3],
[
- AC_DEFINE(translit([HAVE_$2], [a-z], [A-Z]), 1,
- [Whether $2 is available])
+ $3
],
[
- $3
+ AC_DEFINE(translit([HAVE_$2], [a-z], [A-Z]), 1,
+ [Whether $2 is available])
])
],
[
- ifelse($4, [],
+ m4_ifval([$4],
+ [
+ $4
+ ],
[
# $2 was not found in lib$1
# nothing to do here by default
true
- ],
- [ $4 ])
+ ])
])
;;
esac
@@ -543,9 +547,9 @@ AC_DEFUN([SMB_IS_LIBPTHREAD_LINKED],
dnl SMB_REMOVE_LIB(lib)
dnl Remove the given library from $LIBS
-AC_DEFUN([SMB_REMOVELIB],
+AC_DEFUN([SMB_REMOVE_LIB],
[
- LIBS=`echo $LIBS | sed -es/-l$1//g`
+ LIBS=`echo $LIBS | sed '-es/-l$1//g'`
])
dnl SMB_CHECK_DMAPI([actions if true], [actions if false])
diff --git a/source3/configure.in b/source3/configure.in
index d3338e186f..3b2e6386c0 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -3959,29 +3959,33 @@ if test x"$with_dnsupdate_support" != x"no"; then
fi
if test x"$with_dnsupdate_support" != x"no"; then
- ac_save_LIBS=$LIBS
########################################################
- # now see if we can find the uuid libs in standard paths
- AC_CHECK_LIB_EXT(uuid, UUID_LIBS, uuid_generate)
-
- LIBS="$LIBS $UUID_LIBS"
+ # Now see if we can find the uuid libs in standard paths
+ # On some systems, the uuid API is in libc, so we have to
+ # be careful not to insert a spurious -luuid.
- if test x"$ac_cv_lib_ext_uuid_uuid_generate" = x"yes"; then
- with_dnsupdate_support=yes
- AC_DEFINE(WITH_DNS_UPDATES,1,[Whether to enable DNS Update support])
- AC_MSG_CHECKING(whether UUID support is used)
- AC_MSG_RESULT(yes)
- else
- if test x"$with_dnsupdate_support" = x"yes"; then
- AC_MSG_ERROR(libuuid is needed to enable DNS Updates support)
- else
- AC_MSG_WARN(libuuid is needed to enable DNS Updates support)
- fi
- UUID_LIBS=""
- with_dnsupdate_support=no
- fi
- LIBS=$ac_save_LIBS
+ UUID_LIBS=""
+ AC_LIBTESTFUNC(uuid, uuid_generate,
+ [
+ case " $LIBS " in
+ *\ -luuid\ *)
+ UUID_LIBS="-luuid"
+ SMB_REMOVE_LIB(uuid)
+ ;;
+ esac
+
+ with_dnsupdate_support=yes
+ AC_DEFINE(WITH_DNS_UPDATES,1,[Whether to enable DNS Update support])
+ ],
+ [
+ if test x"$with_dnsupdate_support" = x"yes"; then
+ AC_MSG_ERROR(libuuid is needed to enable DNS Updates support)
+ else
+ AC_MSG_WARN(libuuid is needed to enable DNS Updates support)
+ fi
+ with_dnsupdate_support=no
+ ])
fi
#################################################
@@ -6044,13 +6048,13 @@ CFLAGS_REMOVE_USR_INCLUDE(CPPFLAGS)
AC_MSG_RESULT([Using libraries:])
AC_MSG_RESULT([ LIBS = $LIBS])
if test x"$with_ads_support" != x"no"; then
- AC_MSG_RESULT([ KRB5_LIBS = $KRB5_LIBS])
+ AC_MSG_RESULT([ KRB5_LIBS = $KRB5_LIBS])
fi
if test x"$with_ldap_support" != x"no"; then
- AC_MSG_RESULT([ LDAP_LIBS = $LDAP_LIBS])
+ AC_MSG_RESULT([ LDAP_LIBS = $LDAP_LIBS])
fi
if test x"$with_dnsupdate_support" != x"no"; then
- AC_MSG_RESULT([ UUID_LIBS = $UUID_LIBS])
+ AC_MSG_RESULT([ UUID_LIBS = $UUID_LIBS])
fi
AC_MSG_RESULT([ AUTH_LIBS = $AUTH_LIBS])