diff options
author | Trent Lloyd <lathiat@bur.st> | 2005-08-23 13:02:11 +0000 |
---|---|---|
committer | Trent Lloyd <lathiat@bur.st> | 2005-08-23 13:02:11 +0000 |
commit | 5afe2f493d0aca90bb3e05ca7ebd6af50f9daaeb (patch) | |
tree | 5b1a9bceec6bba8b91579b3936b491d0edb2b221 /configure.ac | |
parent | 9d125e3a3ae8a3bc4150756294226b3feb95799e (diff) |
* 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
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 48 |
1 files changed, 30 insertions, 18 deletions
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 <linux/rtnetlink.h>], [], + 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. |