]> git.meshlink.io Git - catta/blobdiff - configure.ac
* Beef up host name and address resolvers to notify about RR changes (Similar to...
[catta] / configure.ac
index 72df643e1993f0799dff7764ca0e53d467913b65..2d33c793bbdabf6809e9851314464c78830ff8da 100644 (file)
@@ -46,6 +46,30 @@ AC_PROG_GCC_TRADITIONAL
 # libtool stuff
 AC_PROG_LIBTOOL
 
+test_gcc_flag() {
+   AC_LANG_CONFTEST([int main() {}])
+   $CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null
+   ret=$?
+   rm -f conftest.o
+   return $ret
+}
+
+# If using GCC specify some additional parameters
+if test "x$GCC" = "xyes" ; then
+   
+   DESIRED_FLAGS="-std=c99 -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"
+
+   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.
 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])
@@ -68,15 +92,6 @@ AC_FUNC_STAT
 AC_TYPE_MODE_T
 AC_TYPE_PID_T
 
-# If using GCC specify some additional parameters
-if test "x$GCC" = "xyes" ; then
-   CFLAGS="$CFLAGS -pipe -W -Wall -pedantic"
-
-   AC_LANG_CONFTEST([int main() {}])
-   $CC -c conftest.c -std=c99 -Wno-unused-parameter $CFLAGS > /dev/null 2> /dev/null && CFLAGS="$CFLAGS -std=c99 -Wno-unused-parameter"
-   rm -f conftest.o
-fi
-
 PKG_PROG_PKG_CONFIG
 
 #
@@ -326,8 +341,6 @@ avahi-discover-standalone/Makefile
 avahi-client/Makefile 
 initscript/Makefile 
 initscript/Debian/Makefile
-initscript/Gentoo/Makefile
-initscript/SUSE/Makefile
 avahi-dnsconfd/Makefile
 avahi-utils/Makefile
 avahi-utils/avahi/Makefile
@@ -370,12 +383,20 @@ BUILD_UTILS="no (!)"
 if test "x$BUILD_DAEMON" = "xyes" -a "x$HAVE_DBUS" = "xyes" -a "x$HAVE_PYTHON" = "xyes" ; then
    BUILD_UTILS=yes
 fi
+
+BUILD_CLIENT="no (!)"
+
+if test "x$BUILD_DAEMON" = "xyes" -a "x$HAVE_DBUS" = "xyes" ; then
+   BUILD_CLIENT=yes
+fi
+
     
 echo "
-    Building avahi-core                 yes
+    Building libavahi-core              yes
     Building avahi-daemon:              ${BUILD_DAEMON}
     Building avahi-dnsconfd:            ${BUILD_DAEMON}
     Building avahi-utils:               ${BUILD_UTILS}
-    Building avahi-glib:                ${HAVE_GLIB}
+    Building libavahi-glib:             ${HAVE_GLIB}
+    Building libavahi-client:           ${BUILD_CLIENT}
     Building avahi-discover-standalone: ${HAVE_GTK}
 "