X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=configure.ac;h=a055f7ae700d485d0b972233bac3d223875c06d4;hb=ea6d8d4a844b67c7abe4ae58a460d872fe299156;hp=82d816e821d527ec0829042dd56c64fbecedd5c8;hpb=f726a534b6230de7a5323d811ef375b979f5bddb;p=catta diff --git a/configure.ac b/configure.ac index 82d816e..a055f7a 100644 --- a/configure.ac +++ b/configure.ac @@ -44,10 +44,8 @@ AS_IF([test "x$STOW" = "xyes" && test -d /usr/local/stow], [ # Checks for programs. AC_PROG_CC AC_PROG_CC_C99 -AC_PROG_CXX AM_PROG_CC_C_O AC_USE_SYSTEM_EXTENSIONS -AC_PROG_CPP AC_PROG_MKDIR_P AC_PROG_INSTALL AC_PROG_LN_S @@ -145,6 +143,15 @@ AC_DEFINE([HAVE_NETLINK],[],[Support for Linux netlink]) AM_CONDITIONAL(HAVE_NETLINK, [ test x"$HAVE_NETLINK" = xyes ]) +if test "x$HAVE_NETLINK" = "xyes" ; then + # 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 + AC_MSG_CHECKING([checking whether rtnetlink.h can be included with -std=c99]) + AC_TRY_COMPILE([#include ], [], + [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no])]) +fi + # # Check for net/route.h # @@ -228,7 +235,7 @@ AC_TRY_COMPILE([#include ], [ ]) test_gcc_flag() { - AC_LANG_CONFTEST([int main() {}]) + AC_LANG_CONFTEST([AC_LANG_SOURCE([[int main() {}]])]) $CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null ret=$? rm -f conftest.o @@ -240,28 +247,6 @@ 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 -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -fdiagnostics-show-option -Wno-cast-qual -fno-strict-aliasing" - if test "x$HAVE_NETLINK" = "xyes" ; then - # 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 - AC_MSG_CHECKING([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" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - - CFLAGS="$OLDCFLAGS" - else - DESIRED_FLAGS="-std=c99 $DESIRED_FLAGS" - fi - for flag in $DESIRED_FLAGS ; do AC_MSG_CHECKING([whether $CC accepts $flag]) if test_gcc_flag $flag ; then @@ -274,7 +259,6 @@ if test "x$GCC" = "xyes" ; then 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 netdb.h syslog.h]) AC_HEADER_STDBOOL @@ -308,15 +292,6 @@ AC_CHECK_DECLS(environ) # check if gcc's -fvisibility is supported CHECK_VISIBILITY_HIDDEN -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) @@ -340,16 +315,6 @@ DX_PDF_FEATURE(OFF) DX_PS_FEATURE(OFF) DX_INIT_DOXYGEN(avahi, doxygen.cfg, doxygen) -AC_ARG_ENABLE(core-docs, - AS_HELP_STRING([--enable-core-docs],[Enable building of documentation for avahi-core]), -[case "${enableval}" in - yes) ENABLE_CORE_DOCS=yes ;; - no) ENABLE_CORE_DOCS=no ;; - *) AC_MSG_ERROR([bad value ${enableval} for --enable-core-docs]) ;; -esac],[ENABLE_CORE_DOCS=no]) - -AM_CONDITIONAL([ENABLE_CORE_DOCS], [test "x$ENABLE_CORE_DOCS" = xyes]) - # # Conditionally compile test and example programs # @@ -371,7 +336,6 @@ avahi-common/Makefile avahi-core/Makefile examples/Makefile common/Makefile -po/Makefile.in ]) AC_OUTPUT @@ -390,5 +354,4 @@ echo " echo "\ Building libavahi-core yes Building tests: ${ENABLE_TESTS} - Building avahi-core documentation: ${ENABLE_CORE_DOCS} "