]> git.meshlink.io Git - catta/blobdiff - configure.ac
* Patch by Ross Burton to allow disabling GTK (avahi-discover) with --enable-gtk...
[catta] / configure.ac
index ca0f2166cd512fe17a14b1e4b42209ed4be2fc82..e17692da5aa77d9bc32ac7a9a56bdabd11633d6d 100644 (file)
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([avahi],[0.1],[mzninuv (at) 0pointer (dot) de])
-AC_CONFIG_SRCDIR([libavahi-core])
+AC_CONFIG_SRCDIR([avahi-core])
 AC_CONFIG_HEADERS([config.h])
 AM_INIT_AUTOMAKE([foreign -Wall])
 
@@ -35,14 +35,60 @@ fi
 
 # Checks for programs.
 AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
 
 # libtool stuff
 AC_PROG_LIBTOOL
 
+# Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h limits.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_TYPE_SIZE_T
+AC_HEADER_TIME
+
+# Checks for library functions.
+AC_FUNC_MEMCMP
+AC_FUNC_SELECT_ARGTYPES
+AC_CHECK_FUNCS([gethostname memset select socket strchr strcspn strerror uname])
+
+# Check for GLIB 2.0
 PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.4.0 ])
 AC_SUBST(GLIB20_CFLAGS)
 AC_SUBST(GLIB20_LIBS)
 
+# Check for DBUS
+PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 0.23, dbus-glib-1 >= 0.23 ])
+AC_SUBST(DBUS_CFLAGS)
+AC_SUBST(DBUS_LIBS)
+
+AC_ARG_ENABLE(gtk,
+        AC_HELP_STRING([--enable-gtk],[use GTK+ (default=yes)]),
+        [case "${enableval}" in
+                yes) ENABLE_GTK=yes ;;
+                no)  ENABLE_GTK=no ;;
+                *) AC_MSG_ERROR(bad value ${enableval} for --enable-gtk) ;;
+        esac],
+        [ENABLE_GTK=yes]) dnl Default value
+
+if test "x$ENABLE_GTK" = "xyes"; then
+        # Check for GTK 2.0
+        PKG_CHECK_MODULES(GTK20, [ gtk+-2.0 >= 2.4.0 ])
+        AC_SUBST(GTK20_CFLAGS)
+        AC_SUBST(GTK20_LIBS)
+        
+        # Check for GLADE 2.0
+        PKG_CHECK_MODULES(GLADE20, [ libglade-2.0 >= 2.4.0 ])
+        AC_SUBST(GLADE20_CFLAGS)
+        AC_SUBST(GLADE20_LIBS)
+fi
+AM_CONDITIONAL(ENABLE_GTK, test "x$ENABLE_GTK" = "xyes")
+
 # If using GCC specify some additional parameters
 if test "x$GCC" = "xyes" ; then
    CFLAGS="$CFLAGS -pipe -W -Wall -pedantic"
@@ -52,5 +98,5 @@ if test "x$GCC" = "xyes" ; then
    rm -f conftest.o
 fi
 
-AC_CONFIG_FILES([Makefile libavahi-core.pc doxygen/Makefile doxygen/doxygen.conf libavahi-core/Makefile])
+AC_CONFIG_FILES([Makefile avahi-core.pc doxygen/Makefile doxygen/doxygen.conf avahi-common/Makefile avahi-core/Makefile avahi-daemon/Makefile avahi-discover/Makefile avahi-client/Makefile])
 AC_OUTPUT