]> git.meshlink.io Git - catta/blobdiff - configure.ac
build avahi-gobject only when avahi-client is also built
[catta] / configure.ac
index 43b1f657af2ff8a51bcc3161538ce4e5b1e6da1d..6dd58d09731af661805e6b98dc29b054199eba31 100644 (file)
 # USA.
 
 AC_PREREQ(2.57)
-AC_INIT([avahi],[0.6.21],[avahi (at) lists (dot) freedesktop (dot) org])
+AC_INIT([avahi],[0.6.22],[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, [7:5:4])
-AC_SUBST(LIBAVAHI_CORE_VERSION_INFO, [5:3:0])
-AC_SUBST(LIBAVAHI_CLIENT_VERSION_INFO, [5:3:2])
+AC_SUBST(LIBAVAHI_COMMON_VERSION_INFO, [8:0:5])
+AC_SUBST(LIBAVAHI_CORE_VERSION_INFO, [5:4:0])
+AC_SUBST(LIBAVAHI_CLIENT_VERSION_INFO, [5:4:2])
 AC_SUBST(LIBAVAHI_GLIB_VERSION_INFO, [1:1:0])
 AC_SUBST(LIBAVAHI_GOBJECT_VERSION_INFO, [0:0:0])
 AC_SUBST(LIBAVAHI_QT3_VERSION_INFO, [1:1:0])
 AC_SUBST(LIBAVAHI_QT4_VERSION_INFO, [1:1:0])
-AC_SUBST(LIBAVAHI_UI_VERSION_INFO, [0:2:0])
+AC_SUBST(LIBAVAHI_UI_VERSION_INFO, [1:0:1])
 
 # Do not touch these, since they we took this version-info from upstream HOWL/Bonjour
 AC_SUBST(LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO, [1:0:0])
@@ -396,6 +396,18 @@ if test "x$have_kqueue" = "xyes" ; then
     AC_DEFINE([HAVE_KQUEUE], 1, [Enable BSD kqueue() usage])
 fi
 
+AM_GNU_GETTEXT([external])
+
+IT_PROG_INTLTOOL([0.35.0])
+GETTEXT_PACKAGE=avahi
+AC_SUBST([GETTEXT_PACKAGE])
+AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
+AM_GLIB_GNU_GETTEXT
+
+avahilocaledir='${prefix}/${DATADIRNAME}/locale'
+AC_SUBST(avahilocaledir)
+
+
 # Check for pkg-config manually first, as if its not installed the
 # PKG_PROG_PKG_CONFIG macro won't be defined.
 AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
@@ -612,23 +624,56 @@ AM_CONDITIONAL(HAVE_DBUS, test "x$HAVE_DBUS" = "xyes")
 #
 # Expat
 #
-AC_ARG_ENABLE(expat,
-        AS_HELP_STRING([--disable-expat],[Disable use of Expat]),
-        [case "${enableval}" in
-                yes) HAVE_EXPAT=yes ;;
-                no)  HAVE_EXPAT=no ;;
-                *) AC_MSG_ERROR(bad value ${enableval} for --enable-expat) ;;
-        esac],
-        [HAVE_EXPAT=yes])
+AC_ARG_WITH(xml, AS_HELP_STRING([--with-xml=[expat/bsdxml/none]],[XML library to use]))
+use_expat=false
+use_bsdxml=false
+
+# See what we have
+AC_CHECK_LIB(expat, XML_ParserCreate, [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ], have_expat=false)
+AC_CHECK_LIB(bsdxml, XML_ParserCreate, [ AC_CHECK_HEADERS(bsdxml.h, have_bsdxml=true, have_bsdxml=false) ], have_bsdxml=false)
+
+if test "x$with_xml" = "xnone"; then
+        :
+elif test "x$with_xml" = "xexpat"; then
+       use_expat=true
+       if ! $have_expat ; then
+               AC_MSG_ERROR([*** libexpat requested, but not found ***])
+       fi
+elif test "x$with_xml" = "xbsdxml"; then
+       use_bsdxml=true
+       if ! $have_bsdxml ; then
+               AC_MSG_ERROR([*** libbsdxml requested, but not found ***])
+       fi
+elif test "x$with_xml" != "x"; then
+       AC_MSG_ERROR([*** unknown with-xml option ***])
+else
+       if $have_expat ; then
+               use_expat=true
+       elif $have_bsdxml ; then
+               use_bsdxml=true
+       else
+               AC_MSG_ERROR([*** neither libexpat not libbsdxml could be found ***])
+       fi
+fi
 
-if test "x$HAVE_EXPAT" = "xyes" ; then
-    AC_CHECK_LIB(expat, XML_ParserCreate, [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ], have_expat=false)
+if $use_expat; then
+       with_xml=expat
+       XML_CFLAGS=-DUSE_EXPAT_H
+       XML_LIBS=-lexpat
+fi
+if $use_bsdxml; then
+       with_xml=bsdxml
+       XML_CFLAGS=-DUSE_BSDXML_H
+       XML_LIBS=-lbsdxml
+fi
+AC_SUBST(XML_LIBS)
+AC_SUBST(XML_CFLAGS)
 
-    if ! $have_expat ; then
-        AC_MSG_ERROR([*** libexpat not found ***])
-    fi
+if $use_expat || $use_bsdxml; then
+       HAVE_XML=yes
 fi
-AM_CONDITIONAL(HAVE_EXPAT, test "x$HAVE_EXPAT" = "xyes")
+
+AM_CONDITIONAL(HAVE_XML, test "x$HAVE_XML" = "xyes")
 
 #
 # GDBM
@@ -1033,6 +1078,7 @@ avahi-compat-howl/Makefile
 avahi-compat-howl/samples/Makefile
 avahi-autoipd/Makefile
 avahi-ui/Makefile
+po/Makefile.in
 ])
 AC_OUTPUT
 
@@ -1053,7 +1099,7 @@ echo "
     Enable GLIB GObject:                       ${HAVE_GOBJECT}
     Enable GTK:                                ${HAVE_GTK}
     Enable D-Bus:                              ${HAVE_DBUS}
-    Enable Expat:                              ${HAVE_EXPAT}
+    With XML:                                  ${with_xml}
     Enable GDBM:                               ${HAVE_GDBM}
     Enable DBM:                                ${HAVE_DBM}
     Enable libdaemon:                          ${HAVE_LIBDAEMON}
@@ -1075,9 +1121,9 @@ echo "
     Enable stack-smashing protection:          ${enable_ssp}
 "
 
-BUILD_DAEMON="no   (You need libdaemon and expat!)"
+BUILD_DAEMON="no   (You need libdaemon and expat/bsdxml!)"
 
-if test "x$HAVE_EXPAT" = "xyes" -a "x$HAVE_LIBDAEMON" = "xyes" ; then
+if test "x$HAVE_XML" = "xyes" -a "x$HAVE_LIBDAEMON" = "xyes" ; then
     BUILD_DAEMON=yes
 fi
 
@@ -1108,6 +1154,11 @@ if test "x$HAVE_GTK" = "xyes" -a "x$BUILD_CLIENT" = "xyes" ; then
    BUILD_UI="yes"
 fi
 
+BUILD_GOBJECT="no"
+if test "x$BUILD_CLIENT" = "xyes" -a "x$HAVE_GOBJECT" = "xyes" ; then
+   BUILD_GOBJECT="yes"
+fi
+
 echo "\
     Building libavahi-core              yes
     Building avahi-daemon:              ${BUILD_DAEMON}
@@ -1116,7 +1167,7 @@ echo "\
     Building avahi-utils:               ${BUILD_CLIENT}
     Building avahi-python:              ${BUILD_PYTHON}
     Building libavahi-glib:             ${HAVE_GLIB}
-    Building libavahi-gobject:          ${HAVE_GOBJECT}
+    Building libavahi-gobject:          ${BUILD_GOBJECT}
     Building avahi-discover-standalone: ${HAVE_GTK}
     Building libavahi-qt3:              ${HAVE_QT3}
     Building libavahi-qt4:              ${HAVE_QT4}