chiark / gitweb /
Makefile: Ship versioncmp.in.
[mLib] / configure.in
CommitLineData
52162d1b 1dnl -*-m4-*-
0875b58f 2dnl
1a6043f9 3dnl $Id$
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.
d4efbcd9 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.
d4efbcd9 23dnl
c846879c 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
0875b58f 29AC_INIT(exc.c)
3048fcf9 30AM_INIT_AUTOMAKE(mLib, 2.0.5)
0875b58f 31
32AC_PROG_CC
c7f30b36 33AM_PROG_LIBTOOL
e3afa470 34AX_CFLAGS_WARN_ALL
c3b137c8 35mdw_MANEXT
0875b58f 36
5d45633f 37AC_CHECK_HEADERS(float.h)
38
e3afa470
MW
39AC_SEARCH_LIBS(socket, socket)
40AC_SEARCH_LIBS(gethostbyname, nsl resolv)
685b7e3e 41
14d7100d 42DEPLIBS=$LIBS AC_SUBST(DEPLIBS)
1a6043f9 43BRES_LIBEXEC="bres\$(EXEEXT)" BRES_SOURCE="bres"
14d7100d 44AC_SUBST(BRES_LIBEXEC) AC_SUBST(BRES_SOURCE)
45AC_ARG_WITH(adns,
d4efbcd9 46[ --with-adns use ADNS library for background name resolution],
14d7100d 47[want_adns=$withval], [want_adns=auto])
48if test $want_adns != no; then
49 save_LIBS=$LIBS
50 LIBS=$DEPLIBS
e3afa470 51 AC_SEARCH_LIBS(adns_init, adns, [have_adns=yes], [have_adns=no])
14d7100d 52 DEPLIBS=$LIBS
53 LIBS=$save_LIBS
54 if test $have_adns = yes; then
55 AC_DEFINE(HAVE_ADNS)
56 BRES_LIBEXEC=""
57 BRES_SOURCE="bres-adns"
58 elif test $want_adns = yes; then
59 AC_MSG_ERROR([ADNS library not found, but explicitly requested])
60 fi
61fi
62
ad61a8f8 63AC_CACHE_CHECK([for msg_control], [mdw_cv_msg_control],
64[AC_TRY_COMPILE(
65[#include <sys/types.h>
66#include <sys/socket.h>],
67[struct msghdr msg;
68msg.msg_control = 0;],
69[mdw_cv_msg_control=yes],
70[mdw_cv_msg_control=no])])
71if test $mdw_cv_msg_control = no; then
72 AC_DEFINE([HAVE_MSG_ACCRIGHTS])
73fi
74
335577d0 75AC_DEFINE(BUILDING_MLIB)
0875b58f 76
e3afa470 77AC_OUTPUT(Makefile man/Makefile mLib.pc)