2 # Process this file with autoconf to produce a configure script.
4 # This file is part of nss-myhostname.
6 # Copyright 2008 Lennart Poettering
8 # nss-myhostname is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU Lesser General Public License
10 # as published by the Free Software Foundation, either version 2.1 of
11 # the License, or (at your option) any later version.
13 # nss-myhostname is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # Lesser General Public License for more details.
18 # You should have received a copy of the GNU Lesser General Public
19 # License along with nss-myhostname. If not, If not, see
20 # <http://www.gnu.org/licenses/>.
23 AC_INIT([nss-myhostname],[0.2],[mzzlubfganzr (at) 0pointer (dot) de])
24 AC_CONFIG_SRCDIR([nss-myhostname.c])
25 AC_CONFIG_HEADERS([config.h])
26 AC_CONFIG_MACRO_DIR(m4)
28 AM_INIT_AUTOMAKE([foreign 1.9 -Wall])
30 AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/nss-myhostname/])
34 # Checks for programs.
37 AC_USE_SYSTEM_EXTENSIONS
45 DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissin
46 g-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-un
47 used-parameter -ffast-math"
49 for flag in $DESIRED_FLAGS ; do
50 CC_CHECK_CFLAGS([$flag], [CFLAGS="$CFLAGS $flag"])
57 # Checks for header files.
59 AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h])
61 # Checks for typedefs, structures, and compiler characteristics.
66 # Checks for library functions.
68 AC_FUNC_SELECT_ARGTYPES
69 AC_CHECK_FUNCS([gethostbyaddr gethostbyname gettimeofday inet_ntoa memset select socket strcspn strdup strerror strncasecmp strcasecmp strspn])
71 # LYNX documentation generation
74 AC_CONFIG_FILES([Makefile doc/Makefile doc/README.html ])