diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-03-24 10:53:06 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-03-24 10:53:06 +1100 |
commit | 0e3339a46b1747156f35d136dbbc93b503b85b1c (patch) | |
tree | 783aafc4b94db5ba1be889cbe4b44363dfee5d54 /source3/configure.in | |
parent | 7f113904eba5361d963075bcea7e36fd98ca34aa (diff) | |
parent | 36b957b5b7a1f70e39eeef224820739f24b999c9 (diff) | |
download | samba-0e3339a46b1747156f35d136dbbc93b503b85b1c.tar.gz samba-0e3339a46b1747156f35d136dbbc93b503b85b1c.tar.bz2 samba-0e3339a46b1747156f35d136dbbc93b503b85b1c.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/configure.in')
-rw-r--r-- | source3/configure.in | 48 |
1 files changed, 41 insertions, 7 deletions
diff --git a/source3/configure.in b/source3/configure.in index cfc2473a82..1cf8d9ca4a 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -152,13 +152,11 @@ AC_SUBST(NSCD_LIBS) # do this here since AC_CACHE_CHECK apparently sets the CFLAGS to "-g -O2" # if it has no value. This prevent *very* large debug binaries from occurring # by default. -if test "x$CFLAGS" = x; then - CFLAGS="-O" -fi if test "x$debug" = "xyes" ; then CFLAGS="${CFLAGS} -g" -else - CFLAGS="${CFLAGS} -O" +fi +if test "x$CFLAGS" = x; then + CFLAGS="-O" fi m4_include(../lib/socket_wrapper/config.m4) @@ -5975,10 +5973,10 @@ AC_SUBST(FLAGS1) # Check if user wants DNS service discovery support AC_ARG_ENABLE(dnssd, -[AS_HELP_STRING([--enable-dnssd], [Enable DNS service discovery support (default=auto)])]) +[AS_HELP_STRING([--enable-dnssd], [Enable DNS service discovery support (default=no)])]) AC_SUBST(DNSSD_LIBS) -if test x"$enable_dnssd" != x"no"; then +if test x"$enable_dnssd" == x"yes"; then have_dnssd_support=yes AC_CHECK_HEADERS(dns_sd.h) @@ -6007,6 +6005,42 @@ if test x"$enable_dnssd" != x"no"; then fi ################################################# +# Check if user wants avahi support + +AC_ARG_ENABLE(avahi, +[AS_HELP_STRING([--enable-avahi], [Enable Avahi support (default=auto)])]) + +AC_SUBST(AVAHI_LIBS) +if test x"$enable_avahi" != x"no"; then + have_avahi_support=yes + + AC_CHECK_HEADERS(avahi-common/watch.h) + if test x"$ac_cv_header_avahi_common_watch_h" != x"yes"; then + have_avahi_support=no + fi + + AC_CHECK_HEADERS(avahi-client/client.h) + if test x"$ac_cv_header_avahi_common_watch_h" != x"yes"; then + have_avahi_support=no + fi + + AC_CHECK_LIB_EXT(avahi-client, AVAHI_LIBS, avahi_client_new) + if test x"$ac_cv_lib_ext_avahi_client_avahi_client_new" != x"yes"; then + have_avahi_support=no + fi + + if test x"$have_avahi_support" = x"yes"; then + AC_DEFINE(WITH_AVAHI_SUPPORT, 1, + [Whether to enable avahi support]) + AC_SUBST(AVAHI_OBJ, "lib/avahi.o smbd/avahi_register.o") + else + if test x"$enable_avahi" = x"yes"; then + AC_MSG_ERROR(avahi support not available) + fi + fi +fi + +################################################# # Check to see if we should use the included iniparser AC_ARG_WITH(included-iniparser, |