diff options
author | James Peach <jpeach@samba.org> | 2006-12-31 06:53:11 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:16:49 -0500 |
commit | 17a8c7cb9206a99360cfd33f1d29ef727b581955 (patch) | |
tree | 5e9f8f79fb013f29aef8a9b41c64e43e32987837 /source3/configure.in | |
parent | 62382d19e9d31177679fc0e89c16b95b1c35cbef (diff) | |
download | samba-17a8c7cb9206a99360cfd33f1d29ef727b581955.tar.gz samba-17a8c7cb9206a99360cfd33f1d29ef727b581955.tar.bz2 samba-17a8c7cb9206a99360cfd33f1d29ef727b581955.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.
(This used to be commit 5e1fbcc403c471ecaaa37e8cd54b719b65dd7495)
Diffstat (limited to 'source3/configure.in')
-rw-r--r-- | source3/configure.in | 50 |
1 files changed, 27 insertions, 23 deletions
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]) |