2 # Process this file with autoconf to produce a configure script.
6 # This file is part of avahi.
8 # avahi is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU Lesser General Public License as
10 # published by the Free Software Foundation; either version 2 of the
11 # License, or (at your option) any later version.
13 # avahi is distributed in the hope that it will be useful, but WITHOUT
14 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 # License for more details.
18 # You should have received a copy of the GNU Lesser General Public
19 # License along with avahi; if not, write to the Free Software
20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
24 AC_INIT([avahi],[0.1],[mzninuv (at) 0pointer (dot) de])
25 AC_CONFIG_SRCDIR([avahi-core])
26 AC_CONFIG_HEADERS([config.h])
27 AM_INIT_AUTOMAKE([foreign -Wall])
29 AC_SUBST(PACKAGE_URL, [http://www.freedesktop.org/Software/Avahi])
31 if type -p stow > /dev/null && test -d /usr/local/stow ; then
32 AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
33 ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
36 # Checks for programs.
46 # Checks for header files.
48 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])
50 # Checks for typedefs, structures, and compiler characteristics.
55 # Checks for library functions.
57 AC_FUNC_SELECT_ARGTYPES
58 AC_CHECK_FUNCS([gethostname memset select socket strchr strcspn strerror uname])
61 PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.4.0 ])
62 AC_SUBST(GLIB20_CFLAGS)
66 PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 0.23, dbus-glib-1 >= 0.23 ])
70 # If using GCC specify some additional parameters
71 if test "x$GCC" = "xyes" ; then
72 CFLAGS="$CFLAGS -pipe -W -Wall -pedantic"
74 AC_LANG_CONFTEST([int main() {}])
75 $CC -c conftest.c -std=c99 -Wno-unused-parameter $CFLAGS > /dev/null 2> /dev/null && CFLAGS="$CFLAGS -std=c99 -Wno-unused-parameter"
79 AC_CONFIG_FILES([Makefile avahi-core.pc doxygen/Makefile doxygen/doxygen.conf avahi-core/Makefile daemon/Makefile])