1 # configure.in - input to autoconf
4 # Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
6 # It is part of adns, which is
7 # Copyright (C) 1997-2000 Ian Jackson <ian@davenant.greenend.org.uk>
8 # Copyright (C) 1999-2000 Tony Finch <dot@dotat.at>
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; either version 2, or (at your option)
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software Foundation,
22 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 AC_CONFIG_HEADER(src/config.h)
27 dnl DPKG_CACHED_TRY_COMPILE(<description>,<cachevar>,<include>,<program>,<ifyes>,<ifno>)
28 define(DPKG_CACHED_TRY_COMPILE,[
31 AC_TRY_COMPILE([$3],[$4],[$2=yes],[$2=no])
33 if test "x$$2" = xyes; then
48 ADNS_C_GETFUNC(socket,socket)
49 ADNS_C_GETFUNC(inet_ntoa,nsl)
51 AC_MSG_CHECKING(for INADDR_LOOPBACK)
52 AC_CACHE_VAL(adns_cv_decl_inaddrloopback,[
54 #include <sys/socket.h>
55 #include <netinet/in.h>
56 #include <arpa/inet.h>
60 adns_cv_decl_inaddrloopback=yes,
61 adns_cv_decl_inaddrloopback=no)])
62 if test "$adns_cv_decl_inaddrloopback" = yes; then
65 AC_MSG_RESULT([not in standard headers, urgh...])
66 AC_CHECK_HEADER(rpc/types.h,[
67 AC_DEFINE(HAVEUSE_RPCTYPES_H)
69 AC_MSG_ERROR([cannot find INADDR_LOOPBACK or rpc/types.h])
73 ADNS_C_GETFUNC(inet_aton,resolv,[
74 LIBS="-lresolv $LIBS";
75 AC_MSG_WARN([inet_aton is in libresolv, urgh. Must use -lresolv.])
78 DPKG_CACHED_TRY_COMPILE(inlines,dpkg_cv_c_inline,,
79 [} inline int foo (int x) {],
81 AC_DEFINE(HAVE_INLINE),
85 AC_CHECK_HEADERS(sys/select.h)
89 if test "${GCC-no}" = yes; then
90 WARNS="-Wall -Wmissing-prototypes -Wwrite-strings -Wstrict-prototypes -Wcast-qual -Wpointer-arith"
96 settings.make Makefile src/Makefile