resetting manifest requested domain to floor
[platform/upstream/libasyncns.git] / configure.ac
1 dnl -*- Autoconf -*-
2 dnl Process this file with autoconf to produce a configure script.
3 dnl
4 dnl This file is part of libasyncns.
5 dnl
6 dnl Copyright 2005-2008 Lennart Poettering
7 dnl
8 dnl libasyncns is free software; you can redistribute it and/or modify
9 dnl it under the terms of the GNU Lesser General Public License as
10 dnl published by the Free Software Foundation, either version 2.1 of the
11 dnl License, or (at your option) any later version.
12 dnl
13 dnl libasyncns is distributed in the hope that it will be useful, but
14 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
15 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 dnl Lesser General Public License for more details.
17 dnl
18 dnl You should have received a copy of the GNU Lesser General Public
19 dnl License along with libasyncns. If not, see
20 dnl <http://www.gnu.org/licenses/>.
21
22 AC_PREREQ(2.63)
23 AC_INIT([libasyncns],[0.8],[mznflapaf (at) 0pointer (dot) de])
24 AC_CONFIG_SRCDIR([libasyncns/asyncns.c])
25 AC_CONFIG_HEADERS([config.h])
26 AC_CONFIG_MACRO_DIR([m4])
27 AM_INIT_AUTOMAKE([foreign 1.10 -Wall])
28
29 AC_SUBST(PACKAGE_URL, [http://0pointer.de/lennart/projects/libasyncns/])
30
31 AC_SUBST(LIBASYNCNS_VERSION_INFO, [3:1:3])
32
33 if type -p stow > /dev/null && test -d /usr/local/stow ; then
34    AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
35    ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
36 fi
37
38 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
39
40 dnl Checks for programs.
41 AC_PROG_CC
42 AC_PROG_CC_C99
43 AM_PROG_CC_C_O
44 AC_PROG_CPP
45
46 AC_USE_SYSTEM_EXTENSIONS
47
48 AC_PROG_INSTALL
49 AC_PROG_LN_S
50 AC_PROG_MAKE_SET
51 AC_PROG_LIBTOOL
52
53 CC_CHECK_CFLAGS_APPEND([-pipe -Wall -W -Wextra -pedantic -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 -Winline -Wno-unused-parameter -Wstrict-aliasing])
54
55 dnl Checks for header files.
56 AC_HEADER_ASSERT
57 AC_HEADER_STDC
58 AC_HEADER_SYS_WAIT
59 AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h stdlib.h string.h sys/socket.h unistd.h sys/prctl.h netinet/in.h arpa/nameser_compat.h])
60
61 dnl Checks for typedefs, structures, and compiler characteristics.
62 AC_C_CONST
63 AC_TYPE_PID_T
64 AC_TYPE_SIZE_T
65 AC_TYPE_SSIZE_T
66 AC_TYPE_UINT16_T
67 AC_TYPE_UINT8_T
68 AC_HEADER_TIME
69
70 dnl Checks for library functions.
71 AC_FUNC_FORK
72 AC_FUNC_MALLOC
73 AC_FUNC_SELECT_ARGTYPES
74 AC_TYPE_SIGNAL
75 AC_CHECK_FUNCS([memset select strndup setresuid setreuid strerror])
76
77 AC_SYS_LARGEFILE
78
79 AC_CHECK_LIB(nsl, gethostbyname)
80 AC_CHECK_LIB(socket, connect)
81
82 ACF_SEARCH_FUNCTION([res_query], [-lresolv, -lbind],
83   [], [AC_MSG_ERROR([res_query not found])],
84   [AC_LANG_PROGRAM([[
85       #include <resolv.h>
86      ]], [[res_query(0, 0, 0, 0, 0);]])
87   ])
88
89 ACX_PTHREAD
90
91 CC_NOUNDEFINED
92
93 ZP_LYNX_DOC
94
95 AC_CONFIG_FILES([Makefile libasyncns/Makefile doc/Makefile doc/README.html doxygen/Makefile doxygen/doxygen.conf libasyncns.pc])
96 AC_OUTPUT