summaryrefslogtreecommitdiffstats
path: root/source/configure.in
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2006-12-31 06:53:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:49 -0500
commit5e1fbcc403c471ecaaa37e8cd54b719b65dd7495 (patch)
tree1ce8ce4921d822ddf367e5cd13407ea1229dbc5f /source/configure.in
parent2117904f18869fca0d4770883cf2de5fb00c4f85 (diff)
downloadsamba-5e1fbcc403c471ecaaa37e8cd54b719b65dd7495.tar.gz
samba-5e1fbcc403c471ecaaa37e8cd54b719b65dd7495.tar.xz
samba-5e1fbcc403c471ecaaa37e8cd54b719b65dd7495.zip
r20429: Restructure the libuuid API tests to handle the case where libuuid
is (effectively) in libc. Convert AC_LIBTESTFUNC to use the mystically undocumented m4_ifval, which fixes some quoting problems when providing shell code for the if-true and if-false branches.
Diffstat (limited to 'source/configure.in')
-rw-r--r--source/configure.in50
1 files changed, 27 insertions, 23 deletions
diff --git a/source/configure.in b/source/configure.in
index d3338e186f8..3b2e6386c04 100644
--- a/source/configure.in
+++ b/source/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])