From 5afe2f493d0aca90bb3e05ca7ebd6af50f9daaeb Mon Sep 17 00:00:00 2001 From: Trent Lloyd Date: Tue, 23 Aug 2005 13:02:11 +0000 Subject: * Bump version number in configure.ac to 0.2 * Move a few dir definitions in Makefile.am's do that autotools doesn't create empty directories * Uncomment AM_CONDITIONAL for TARGET_GENTOO which broke the build * Add missing introspect files to EXTRA_DIST in avahi-daemon/Makefile.am, makes distcheck pass again. * Remove the ugly archlinux specific -std=c99 hack * Replace it with a much more elegant test to see if rtnetlink.h will compile w ith -std=c99 and disable it if it will not git-svn-id: file:///home/lennart/svn/public/avahi/trunk@417 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-daemon/Makefile.am | 3 +++ avahi-glib/Makefile.am | 5 ++--- common/Makefile.am | 2 +- configure.ac | 48 ++++++++++++++++++++++++++++----------------- initscript/suse/Makefile.am | 2 ++ 5 files changed, 38 insertions(+), 22 deletions(-) diff --git a/avahi-daemon/Makefile.am b/avahi-daemon/Makefile.am index f1f0d51..8c433d5 100644 --- a/avahi-daemon/Makefile.am +++ b/avahi-daemon/Makefile.am @@ -108,6 +108,9 @@ EXTRA_DIST = \ DomainBrowser.introspect \ ServiceTypeBrowser.introspect \ ServiceBrowser.introspect \ + ServiceResolver.introspect \ + AddressResolver.introspect \ + HostNameResolver.introspect \ ssh.service \ example.service \ introspect.dtd \ diff --git a/avahi-glib/Makefile.am b/avahi-glib/Makefile.am index ce82d68..d4abc81 100644 --- a/avahi-glib/Makefile.am +++ b/avahi-glib/Makefile.am @@ -22,10 +22,10 @@ AM_CFLAGS=-I$(top_srcdir) # This cool debug trap works on i386/gcc only AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")' -avahiincludedir=$(includedir)/avahi-glib - if HAVE_GLIB +avahiincludedir=$(includedir)/avahi-glib + avahiinclude_HEADERS = \ glib-watch.h \ glib-malloc.h @@ -49,4 +49,3 @@ glib_watch_test_CFLAGS = $(AM_CFLAGS) $(GLIB20_CFLAGS) glib_watch_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(GLIB20_LIBS) endif - diff --git a/common/Makefile.am b/common/Makefile.am index 1cbad83..e51c02a 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -18,6 +18,6 @@ # USA. EXTRA_DIST = \ - doxygen.m4 \ + doxygen.m4 \ doxygen.mk \ python.m4 diff --git a/configure.ac b/configure.ac index 993a4ea..2300100 100644 --- a/configure.ac +++ b/configure.ac @@ -72,7 +72,7 @@ esac fi #AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse) -#AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo) +AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo) AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian) AM_CONDITIONAL(TARGET_ARCHLINUX, test x"$with_distro" = xarchlinux) @@ -87,24 +87,36 @@ test_gcc_flag() { # If using GCC specify some additional parameters if test "x$GCC" = "xyes" ; then - - DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wlarger-than-4000 -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter" - # Work around a kernel header bug in arch linux where rtnetlink.h - # can't be included with -std=c99 - if test x"$with_distro" != xarchlinux ; then - DESIRED_FLAGS="$DESIRED_FLAGS -std=c99" - fi - - for flag in $DESIRED_FLAGS ; do - AC_MSG_CHECKING([whether $CC accepts $flag]) - if test_gcc_flag $flag ; then - CFLAGS="$CFLAGS $flag" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - done + DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wlarger-than-4000 -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter" + + # Test whether rtnetlink.h can be included when compiled with -std=c99 + # some distributions (e.g. archlinux) have broken headers that dont + # define __u64 with -std=c99 + echo -n "checking whether rtnetlink.h can be included with -std=c99... " + OLDCFLAGS="$CFLAGS" + CFLAGS="-std=c99" + AC_TRY_COMPILE([#include ], [], + use_stdc99=yes, use_stdc99=no) + + if test x"$use_stdc99" = xyes; then + DESIRED_FLAGS="-std=c99 $DESIRED_FLAGS" + echo "yes" + else + echo "no" + fi + + CFLAGS="$OLDCFLAGS" + + for flag in $DESIRED_FLAGS ; do + AC_MSG_CHECKING([whether $CC accepts $flag]) + if test_gcc_flag $flag ; then + CFLAGS="$CFLAGS $flag" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + done fi # Checks for header files. diff --git a/initscript/suse/Makefile.am b/initscript/suse/Makefile.am index 58d35dd..3aa8431 100644 --- a/initscript/suse/Makefile.am +++ b/initscript/suse/Makefile.am @@ -1,4 +1,6 @@ +if ENABLE_DBUS dbusinitddir = $(sysconfdir)/init.d dbusinitd_SCRIPTS = avahi-daemon EXTRA_DIST = $(dbusinitd_SCRIPTS) +endif -- cgit