chiark / gitweb /
Qualify name given to @bres_byname@.
[mLib] / configure.in
CommitLineData
52162d1b 1dnl -*-m4-*-
0875b58f 2dnl
14d7100d 3dnl $Id: configure.in,v 1.37 2003/12/13 20:37:59 mdw Exp $
0875b58f 4dnl
5dnl Configuration script for mLib
6dnl
7dnl (c) 1998 Straylight/Edgeware
8dnl
9
10dnl ----- Licensing notice --------------------------------------------------
11dnl
12dnl This file is part of the mLib utilities library.
13dnl
14dnl mLib is free software; you can redistribute it and/or modify
c846879c 15dnl it under the terms of the GNU Library General Public License as
16dnl published by the Free Software Foundation; either version 2 of the
17dnl License, or (at your option) any later version.
18dnl
0875b58f 19dnl mLib is distributed in the hope that it will be useful,
20dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
21dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c846879c 22dnl GNU Library General Public License for more details.
23dnl
24dnl You should have received a copy of the GNU Library General Public
0bd98442 25dnl License along with mLib; if not, write to the Free
26dnl Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
27dnl MA 02111-1307, USA.
0875b58f 28
29dnl ----- Revision history --------------------------------------------------
30dnl
31dnl $Log: configure.in,v $
14d7100d 32dnl Revision 1.37 2003/12/13 20:37:59 mdw
33dnl Add adns support in background resolver.
34dnl
52162d1b 35dnl Revision 1.36 2003/11/29 20:38:38 mdw
36dnl Debianization fixes.
37dnl
ad61a8f8 38dnl Revision 1.35 2003/11/29 11:59:17 mdw
39dnl Various stuff.
40dnl
e7d93da8 41dnl Revision 1.34 2003/10/12 14:54:18 mdw
42dnl Version bump.
43dnl
c2168cf6 44dnl Revision 1.33 2003/05/18 15:17:04 mdw
45dnl Version bump.
46dnl
9df1e210 47dnl Revision 1.32 2003/05/16 00:26:22 mdw
8a97bb20 48dnl Version bump.
49dnl
c3b137c8 50dnl Revision 1.30 2003/04/23 12:50:30 mdw
51dnl New manpage installer.
52dnl
5d45633f 53dnl Revision 1.29 2001/06/22 19:34:07 mdw
54dnl Find out whether @<float.h>@ exists (hack for uC-Linux).
55dnl
335577d0 56dnl Revision 1.28 2000/10/08 11:07:55 mdw
57dnl Define a constant to tell @mdwopt@ that @str_qword@ is available.
58dnl Reinstate the `-pedantic' option to GCC.
59dnl
37e8702c 60dnl Revision 1.27 2000/08/15 21:39:13 mdw
61dnl New library configuration stuff from `common'.
34eeea53 62dnl
6fe600df 63dnl Revision 1.25 2000/07/16 18:57:42 mdw
64dnl Version bump. Change compiler flags.
8d4ae8c7 65dnl
c7f30b36 66dnl Revision 1.19 1999/11/11 18:47:33 mdw
67dnl Use `libtool' to generate a shared library.
68dnl
ae24fcf7 69dnl Revision 1.18 1999/11/11 17:48:28 mdw
70dnl New configuration system for library clients.
71dnl
685b7e3e 72dnl Revision 1.17 1999/10/04 21:48:50 mdw
73dnl Find libraries for standalone name resolver server.
f7d7caed 74dnl
8f207948 75dnl Revision 1.14 1999/07/06 19:18:47 mdw
76dnl Handle new manual page directory.
77dnl
f45c2e72 78dnl Revision 1.11 1999/05/21 22:11:20 mdw
79dnl Omitted version number changes from change log. Changed version
80dnl number. ;-)
0411cfed 81dnl
f44135a0 82dnl Revision 1.8 1999/05/14 21:08:56 mdw
83dnl Bump version number to 1.3, to celebrate adding in the `select'
84dnl routines.
85dnl
0bd98442 86dnl Revision 1.6 1999/05/06 19:51:35 mdw
87dnl Reformatted the LGPL notice a little bit.
88dnl
c846879c 89dnl Revision 1.5 1999/05/05 18:50:31 mdw
90dnl Change licensing conditions to LGPL.
91dnl
46b7bcaa 92dnl Revision 1.4 1999/03/24 22:22:57 mdw
93dnl Remove redundant call to AC_PROG_INSTALL.
94dnl
9085749a 95dnl Revision 1.3 1998/12/15 23:52:42 mdw
96dnl Reordered and tidied.
97dnl
7989bb45 98dnl Revision 1.1.1.1 1998/06/17 23:44:42 mdw
99dnl Initial version of mLib
0875b58f 100dnl
101
0875b58f 102AC_INIT(exc.c)
ad61a8f8 103mdw_INIT_LIB(mLib, mLib, 2.0.3)
0875b58f 104
105AC_PROG_CC
c7f30b36 106AM_PROG_LIBTOOL
335577d0 107mdw_GCC_FLAGS
c3b137c8 108mdw_MANEXT
0875b58f 109
5d45633f 110AC_CHECK_HEADERS(float.h)
111
685b7e3e 112mdw_CHECK_MANYLIBS(socket, socket)
113mdw_CHECK_MANYLIBS(gethostbyname, nsl resolv)
114
14d7100d 115DEPLIBS=$LIBS AC_SUBST(DEPLIBS)
116BRES_LIBEXEC="bres" BRES_SOURCE="bres"
117AC_SUBST(BRES_LIBEXEC) AC_SUBST(BRES_SOURCE)
118AC_ARG_WITH(adns,
119[ --with-adns use ADNS library for background name resolution],
120[want_adns=$withval], [want_adns=auto])
121if test $want_adns != no; then
122 save_LIBS=$LIBS
123 LIBS=$DEPLIBS
124 mdw_CHECK_MANYLIBS(adns_init, adns, [have_adns=yes], [have_adns=no])
125 DEPLIBS=$LIBS
126 LIBS=$save_LIBS
127 if test $have_adns = yes; then
128 AC_DEFINE(HAVE_ADNS)
129 BRES_LIBEXEC=""
130 BRES_SOURCE="bres-adns"
131 elif test $want_adns = yes; then
132 AC_MSG_ERROR([ADNS library not found, but explicitly requested])
133 fi
134fi
135
ad61a8f8 136AC_CACHE_CHECK([for msg_control], [mdw_cv_msg_control],
137[AC_TRY_COMPILE(
138[#include <sys/types.h>
139#include <sys/socket.h>],
140[struct msghdr msg;
141msg.msg_control = 0;],
142[mdw_cv_msg_control=yes],
143[mdw_cv_msg_control=no])])
144if test $mdw_cv_msg_control = no; then
145 AC_DEFINE([HAVE_MSG_ACCRIGHTS])
146fi
147
335577d0 148AC_DEFINE(BUILDING_MLIB)
0875b58f 149mdw_OPT_mLib_DEBUG(mLib)
150
37e8702c 151AC_OUTPUT(Makefile man/Makefile mLib-config:lib-config.in)