]> git.meshlink.io Git - catta/blobdiff - configure.ac
build docs for avahi-core only if --enable-core-docs was passed to configure. Build...
[catta] / configure.ac
index 34bf69dd526b281fb1184e5a1af87b47556636e5..deac981b6a163d49519fcac23116f6dd25ef0d32 100644 (file)
 # USA.
 
 AC_PREREQ(2.57)
-AC_INIT([avahi],[0.6.5],[avahi (at) lists (dot) freedesktop (dot) org])
+AC_INIT([avahi],[0.6.12],[avahi (at) lists (dot) freedesktop (dot) org])
 AC_CONFIG_SRCDIR([avahi-core/server.c])
 AC_CONFIG_HEADERS([config.h])
 AM_INIT_AUTOMAKE([foreign 1.9 -Wall])
 
 AC_SUBST(PACKAGE_URL, [http://avahi.org/])
 
-AC_SUBST(LIBAVAHI_COMMON_VERSION_INFO, [5:0:2])
-AC_SUBST(LIBAVAHI_CORE_VERSION_INFO, [3:3:0])
-AC_SUBST(LIBAVAHI_CLIENT_VERSION_INFO, [3:2:0])
-AC_SUBST(LIBAVAHI_GLIB_VERSION_INFO, [1:0:0])
-AC_SUBST(LIBAVAHI_QT3_VERSION_INFO, [1:0:0])
-AC_SUBST(LIBAVAHI_QT4_VERSION_INFO, [1:0:0])
+AC_SUBST(LIBAVAHI_COMMON_VERSION_INFO, [7:1:4])
+AC_SUBST(LIBAVAHI_CORE_VERSION_INFO, [4:3:0])
+AC_SUBST(LIBAVAHI_CLIENT_VERSION_INFO, [4:3:1])
+AC_SUBST(LIBAVAHI_GLIB_VERSION_INFO, [1:1:0])
+AC_SUBST(LIBAVAHI_QT3_VERSION_INFO, [1:1:0])
+AC_SUBST(LIBAVAHI_QT4_VERSION_INFO, [1:1:0])
 AC_SUBST(LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO, [1:0:0])
 AC_SUBST(LIBAVAHI_COMPAT_HOWL_VERSION_INFO, [0:0:0])
 AC_SUBST(HOWL_COMPAT_VERSION, [0.9.8])
@@ -84,6 +84,30 @@ AC_DEFINE([HAVE_PF_ROUTE],[],[Support for PF_ROUTE])
 
 AM_CONDITIONAL(HAVE_PF_ROUTE, [ test x"$HAVE_PF_ROUTE" = xyes ])
 
+#
+# Check for sys/filio.h; needed for FIONREAD on Solaris
+#
+AC_CHECK_HEADER(sys/filio.h, 
+HAVE_SYS_FILIO_H=yes
+AC_DEFINE([HAVE_SYS_FILIO_H],[],[Support for sys/filio.h])
+, [], [
+])
+
+AM_CONDITIONAL(HAVE_SYS_FILIO_H, [ test x"$HAVE_SYS_FILIO_H" = xyes ])
+
+#
+# Check for sys/sysctl.h; not present on Solaris
+#
+AC_CHECK_HEADER(sys/sysctl.h, 
+HAVE_SYS_SYSCTL=yes
+AC_DEFINE([HAVE_SYS_SYSCTL_H],[],[Support for sys/sysctl.h])
+, [], [
+#include <sys/types.h>
+#include <sys/socket.h>
+])
+
+AM_CONDITIONAL(HAVE_SYS_SYSCTL_H, [ test x"$HAVE_SYS_SYSCTL_H" = xyes ])
+
 #
 # Check for struct ip_mreqn
 #
@@ -115,7 +139,7 @@ AC_TRY_COMPILE([#include <netinet/in.h>], [
 #
 # Detecting the linux distribution for specific things like init scripts.
 #
-AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of debian, gentoo, archlinux, fedora, mandriva, darwin, netbsd, freebsd or none]))
+AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of debian, gentoo, archlinux, fedora, mandriva, darwin, netbsd, freebsd, slackware or none]))
 if test "z$with_distro" = "z"; then
     AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
     AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
@@ -123,6 +147,7 @@ if test "z$with_distro" = "z"; then
     AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
     AC_CHECK_FILE(/etc/redhat-release,with_distro="fedora")
     AC_CHECK_FILE(/etc/mandriva-release,with_distro="mandriva")
+    AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware")
     if test "z$with_distro" = "z"; then
         with_distro=`uname -s`
     fi
@@ -130,7 +155,7 @@ fi
 with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
 
 case $with_distro in
-    debian|gentoo|archlinux|suse|fedora|mandriva|darwin|freebsd|none)
+    debian|gentoo|archlinux|suse|fedora|mandriva|darwin|freebsd|slackware|none)
      ;;
     netbsd)
      AC_MSG_WARN([Your distribution (${with_distro}) is supported but no init script exist yet! (patches welcome)])
@@ -152,6 +177,7 @@ AM_CONDITIONAL(TARGET_MANDRIVA, test x"$with_distro" = xmandriva)
 AM_CONDITIONAL(TARGET_DARWIN, test x"$with_distro" = xdarwin)
 AM_CONDITIONAL(TARGET_NETBSD, test x"$with_distro" = xnetbsd)
 AM_CONDITIONAL(TARGET_FREEBSD, test x"$with_distro" = xfreebsd)
+AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
 
 test_gcc_flag() {
     AC_LANG_CONFTEST([int main() {}])
@@ -455,24 +481,49 @@ AM_CONDITIONAL(HAVE_EXPAT, test "x$HAVE_EXPAT" = "xyes")
 #
 # GDBM
 #
+#
+# Check for dbm
+#
+AC_ARG_ENABLE(dbm,
+        AS_HELP_STRING([--enable-dbm],[Enable use of DBM]),
+        [case "${enableval}" in
+                yes) HAVE_DBM=yes ;;
+                no)  HAVE_DBM=no ;;
+                *) AC_MSG_ERROR(bad value ${enableval} for --enable-dbm) ;;
+        esac],
+        [HAVE_DBM=no]) 
+
 AC_ARG_ENABLE(gdbm,
         AS_HELP_STRING([--disable-gdbm],[Disable use of GDBM]),
         [case "${enableval}" in
                 yes) HAVE_GDBM=yes ;;
                 no)  HAVE_GDBM=no ;;
-                *) AC_MSG_ERROR(bad value ${enableval} for --enable-gdbm) ;;
+                *) AC_MSG_ERROR(bad value ${enableval} for --disable-gdbm) ;;
         esac],
         [HAVE_GDBM=yes]) 
 
 if test "x$HAVE_GDBM" = "xyes" ; then
+    if test "x$HAVE_DBM" = "xyes" ; then
+        AC_MSG_ERROR([*** --enable-gdbm and --enable-dbm both specified ***])
+    fi
     AC_CHECK_LIB(gdbm, gdbm_open, [ AC_CHECK_HEADERS(gdbm.h, have_gdbm=true, have_gdbm=false) ], have_gdbm=false)
 
     if ! $have_gdbm ; then
         AC_MSG_ERROR([*** libgdbm not found ***])
     fi
     AC_DEFINE([HAVE_GDBM],[],[Support for GDBM])
+else
+    if test "x$HAVE_DBM" = "xyes" ; then
+        AC_CHECK_HEADERS(ndbm.h, have_dbm=true, have_dbm=false)
+
+        if ! $have_dbm ; then
+            AC_MSG_ERROR([*** dbm not found ***])
+        fi
+        AC_DEFINE([HAVE_DBM],[],[Support for DBM])
+    fi
 fi
 AM_CONDITIONAL(HAVE_GDBM, test "x$HAVE_GDBM" = "xyes")
+AM_CONDITIONAL(HAVE_DBM, test "x$HAVE_DBM" = "xyes")
 
 #
 # libdaemon
@@ -539,7 +590,12 @@ if test "x$HAVE_PYTHON" = "xyes" ; then
         fi
 
         AM_CHECK_PYMOD(socket,,,[AC_MSG_ERROR(Could not find Python module socket)])
-        AM_CHECK_PYMOD(gdbm,,,[AC_MSG_ERROR(Could not find Python module gdbm)])
+        if test "x$HAVE_GDBM" = "xyes"; then
+            AM_CHECK_PYMOD(gdbm,,,[AC_MSG_ERROR(Could not find Python module gdbm)])
+        fi
+        if test "x$HAVE_DBM" = "xyes"; then
+            AM_CHECK_PYMOD(dbm,,,[AC_MSG_ERROR(Could not find Python module dbm)])
+        fi
     fi
 fi
 AM_CONDITIONAL(HAVE_PYTHON, [test "x$HAVE_PYTHON" = "xyes" ])
@@ -563,7 +619,7 @@ if test "x$HAVE_DBUS" = "xyes" ; then
     if test "x$HAVE_MONO" = "xyes" ; then
         AC_PATH_PROG(MCS, mcs)
         if test "x$MCS" = "x" ; then
-            AC_MSG_ERROR([Can not find "mcs" in your PATH])
+            AC_MSG_ERROR([Can not find "mcs" - The Mono C-Sharp Compiler) in your PATH])
         fi
 
         AC_PATH_PROG(GACUTIL, gacutil)
@@ -653,6 +709,16 @@ DX_PDF_FEATURE(OFF)
 DX_PS_FEATURE(OFF)
 DX_INIT_DOXYGEN(avahi, doxygen.cfg, doxygen)
 
+AC_ARG_ENABLE(core-docs,
+        AS_HELP_STRING([--enable-core-docs],[Enable building of documentation for avahi-core]),
+[case "${enableval}" in
+  yes) ENABLE_CORE_DOCS=yes ;;
+  no)  ENABLE_CORE_DOCS=no ;;
+  *) AC_MSG_ERROR([bad value ${enableval} for --enable-core-docs]) ;;
+esac],[ENABLE_CORE_DOCS=no])
+
+AM_CONDITIONAL([ENABLE_CORE_DOCS], [test "x$ENABLE_CORE_DOCS" = xyes])
+
 #
 # Build and Install man pages
 #
@@ -755,6 +821,7 @@ initscript/fedora/Makefile
 initscript/mandriva/Makefile
 initscript/darwin/Makefile
 initscript/freebsd/Makefile
+initscript/slackware/Makefile
 avahi-dnsconfd/Makefile
 avahi-utils/Makefile
 avahi-python/Makefile
@@ -789,6 +856,7 @@ echo "
     Enable D-BUS:           ${HAVE_DBUS}
     Enable Expat:           ${HAVE_EXPAT}
     Enable GDBM:            ${HAVE_GDBM}
+    Enable DBM:             ${HAVE_DBM}
     Enable libdaemon:       ${HAVE_LIBDAEMON}
     Enable Python:          ${HAVE_PYTHON}
     Enable pygtk:           ${HAVE_PYGTK}
@@ -844,4 +912,5 @@ echo "\
     Building avahi-compat-libdns_sd:    ${ENABLE_COMPAT_LIBDNS_SD}
     Building avahi-compat-howl:         ${ENABLE_COMPAT_HOWL}
     Building tests:                     ${ENABLE_TESTS}
+    Building avahi-core documentation:  ${ENABLE_CORE_DOCS}
 "