chiark / gitweb /
Say that we should quote owner in master file format.
[adns] / configure.in
CommitLineData
11b35193 1# configure.in - input to autoconf
2#
d942707d 3# This file is
4# Copyright (C) 1997-1999 Ian Jackson <ian@davenant.greenend.org.uk>
11b35193 5#
d942707d 6# It is part of adns, which is
7# Copyright (C) 1997-1999 Ian Jackson <ian@davenant.greenend.org.uk>
8# Copyright (C) 1999 Tony Finch <dot@dotat.at>
9#
11b35193 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)
13# any later version.
14#
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.
19#
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.
23
24AC_INIT(src/adns.h)
25AC_CONFIG_HEADER(src/config.h)
26AC_PROG_CC
04e7fb4d 27AC_PROG_CPP
9579019a 28AC_PROG_RANLIB
8b5269f2 29
620c146d 30AC_CHECK_FUNCS(poll)
8b5269f2 31ADNS_C_GETFUNC(socket,socket)
32ADNS_C_GETFUNC(inet_ntoa,nsl)
33
04e7fb4d 34AC_MSG_CHECKING(for INADDR_LOOPBACK)
35AC_CACHE_VAL(adns_cv_decl_inaddrloopback,[
36 AC_TRY_COMPILE([
37#include <sys/socket.h>
38#include <netinet/in.h>
39#include <arpa/inet.h>
40 ],[
41 INADDR_LOOPBACK;
42 ],
43 adns_cv_decl_inaddrloopback=yes,
44 adns_cv_decl_inaddrloopback=no)])
45if test "$adns_cv_decl_inaddrloopback" = yes; then
46 AC_MSG_RESULT(found)
47else
48 AC_MSG_RESULT([not in standard headers, urgh...])
49 AC_CHECK_HEADER(rpc/types.h,[
50 AC_DEFINE(HAVEUSE_RPCTYPES_H)
51 ],[
52 AC_MSG_ERROR([cannot find INADDR_LOOPBACK or rpc/types.h])
53 ])
54fi
55
8b5269f2 56ADNS_C_GETFUNC(inet_aton,resolv,[
57 LIBS="-lresolv $LIBS";
58 AC_MSG_WARN([inet_aton is in libresolv, urgh. Must use -lresolv.])
59])
60
11b35193 61ADNS_C_GCCATTRIB
62
63AC_SUBST(WARNS)
64
65if test "${GCC-no}" = yes; then
66 WARNS="-Wall -Wmissing-prototypes -Wwrite-strings -Wstrict-prototypes -Wcast-qual -Wpointer-arith"
67else
68 WARNS=
69fi
70
71AC_SUBST(SHLIBCC)
72AC_SUBST(MKSHLIB_1)
73AC_SUBST(MKSHLIB_2)
74AC_SUBST(MKSHLIB_3)
75AC_SUBST(SHLIBFILE)
76AC_SUBST(SHLIBSONAME)
77
78SHLIBCC='$(CC) $(CFLAGS) -fpic'
79MKSHLIB_1='$(CC) $(LDFLAGS) -shared -Wxl,soname=$(SONAME) -o'
80MKSHLIB_2=''
81MKSHLIB_3='-lc'
82SHLIBFILE='libadns.so.$(MAJOR).$(MINOR)'
83SHLIBSONAME='libadns.so.$(MAJOR)'
84
9579019a 85AC_OUTPUT(
86 settings.make Makefile
87 src/Makefile client/Makefile dynamic/Makefile regress/Makefile
88)