From: Sven M. Hallberg Date: Tue, 19 Aug 2014 13:30:16 +0000 (+0200) Subject: forgot to pull the publish_no_reverse change to the example. X-Git-Url: http://git.meshlink.io/?p=catta;a=commitdiff_plain;h=9c0f9c65093cfa53d45f9b68782321eb8063a032;hp=59adc052f88d168d3985b02ad398c1081ea81917 forgot to pull the publish_no_reverse change to the example. --- diff --git a/Makefile.am b/Makefile.am index ec525a3..b49ca9b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -56,19 +56,15 @@ DX_INPUT = \ $(srcdir)/avahi-common/domain.h \ $(srcdir)/avahi-common/watch.h \ $(srcdir)/avahi-common/simple-watch.h \ - $(srcdir)/avahi-common/thread-watch.h - -DX_EXAMPLE_PATH = $(srcdir)/examples -DX_EXAMPLE_PATTERNS = *.c - -if ENABLE_CORE_DOCS -DX_INPUT += \ + $(srcdir)/avahi-common/thread-watch.h \ $(srcdir)/avahi-core/core.h \ $(srcdir)/avahi-core/lookup.h \ $(srcdir)/avahi-core/publish.h \ $(srcdir)/avahi-core/rr.h \ $(srcdir)/avahi-core/log.h -endif + +DX_EXAMPLE_PATH = $(srcdir)/examples +DX_EXAMPLE_PATTERNS = *.c pkgconfigdir = $(libdir)/pkgconfig diff --git a/README b/README index 1233fd7..eba8f3c 100644 --- a/README +++ b/README @@ -4,10 +4,9 @@ containing only the common and core components TO BUILD FROM GIT: -./bootstrap # first time -./configure ... # if other flags desired +autoreconf # first time +./configure make -make check # to run some tests requires: libtool, pkgconfig, autoconf, automake diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index 6aebf96..0000000 --- a/autogen.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh - -# This file is part of avahi. -# -# avahi is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# avahi is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -# License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with avahi; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. - -AM_VERSION=1.11 -AC_VERSION=2.63 - -run_versioned() { - local P - local V - - V=$(echo "$2" | sed -e 's,\.,,g') - - if [ -e "`which $1$V 2> /dev/null`" ] ; then - P="$1$V" - else - if [ -e "`which $1-$2 2> /dev/null`" ] ; then - P="$1-$2" - else - P="$1" - fi - fi - - shift 2 - "$P" "$@" -} - -set -ex - -if [ "x$1" = "xam" ] ; then - # re-run only automake (after changes to Makefile.am) - run_versioned automake "$AM_VERSION" -a -c --foreign - ./config.status -else - rm -rf autom4te.cache - rm -f config.cache - - test "x$LIBTOOLIZE" = "x" && LIBTOOLIZE=libtoolize - "$LIBTOOLIZE" -c --force - - run_versioned aclocal "$AM_VERSION" -I common - run_versioned autoconf "$AC_VERSION" -Wall - run_versioned autoheader "$AC_VERSION" - run_versioned automake "$AM_VERSION" -a -c --foreign -fi diff --git a/bootstrap.sh b/bootstrap.sh deleted file mode 100755 index 2b5c56f..0000000 --- a/bootstrap.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -# This file is part of avahi. -# -# avahi is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# avahi is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -# License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with avahi; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. - -FLAGS="--sysconfdir=/etc --localstatedir=/var --enable-tests" - -case `uname -s` in - Darwin) - export LIBTOOLIZE=/opt/local/bin/glibtoolize - export CFLAGS="-I/opt/local/include" - export LDFLAGS="-L/opt/local/lib" - export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig" - FLAGS="$FLAGS --prefix=/opt/local" - ;; - FreeBSD) - cp /usr/local/share/aclocal/libtool15.m4 common - cp /usr/local/share/aclocal/pkg.m4 common - export LIBTOOLIZE=/usr/local/bin/libtoolize15 - export CFLAGS="-I/usr/local/include" - export LDFLAGS="-L/usr/local/lib" - export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" - FLAGS="$FLAGS --prefix=/opt" - ;; - NetBSD) - export LIBTOOLIZE=libtoolize - export CFLAGS="-I/usr/pkg/include" - export LDFLAGS="-L/usr/pkg/lib" - export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" - FLAGS="$FLAGS --prefix=/opt" - ;; - Linux) - ;; -esac - -export CFLAGS="$CFLAGS -g -O0" -sh autogen.sh && ./configure $FLAGS "$@" diff --git a/configure.ac b/configure.ac index 3f60cd7..6abc045 100644 --- a/configure.ac +++ b/configure.ac @@ -44,16 +44,18 @@ 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 AC_PROG_MAKE_SET AC_PROG_GCC_TRADITIONAL +if test x"$ac_cv_prog_cc_c99" = x"no"; then + AC_MSG_ERROR([C99 support is required]) +fi + # -fstack-protector AC_ARG_ENABLE([stack-protector], [AS_HELP_STRING([--disable-stack-protector], @@ -145,6 +147,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 +239,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 +251,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,15 +263,7 @@ 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 - -# Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_SIZE_T -AC_HEADER_TIME -AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS([arpa/inet.h fcntl.h netinet/in.h sys/ioctl.h sys/socket.h sys/time.h unistd.h]) # Solaris stuff AC_SEARCH_LIBS([inet_ntop],[nsl]) @@ -290,13 +271,8 @@ AC_HEADER_SYS_WAIT AC_CHECK_DECL([CMSG_SPACE],,CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500 -D__EXTENSIONS__", [[#include ]]) # Checks for library functions. -AC_FUNC_MEMCMP AC_FUNC_SELECT_ARGTYPES -# avahi_malloc actually returns NULL for avahi_malloc(0), so it does not matter -# whether libc's malloc does too. (Same for realloc.) -#AC_FUNC_MALLOC -#AC_FUNC_REALLOC -AC_CHECK_FUNCS([gethostname memchr memmove memset mkdir select socket strchr strcspn strdup strerror strrchr strspn strstr uname setresuid setreuid setresgid setregid strcasecmp gettimeofday putenv strncasecmp strlcpy gethostbyname seteuid setegid setproctitle getprogname]) +AC_CHECK_FUNCS([gethostname select socket uname strcasecmp gettimeofday strncasecmp strlcpy]) AC_FUNC_CHOWN AC_FUNC_STAT @@ -331,16 +307,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 # @@ -380,5 +346,4 @@ echo " echo "\ Building libavahi-core yes Building tests: ${ENABLE_TESTS} - Building avahi-core documentation: ${ENABLE_CORE_DOCS} "