Build: Put build utilities in the config/ subdirectory.
[mLib] / configure.in
... / ...
CommitLineData
1dnl -*-m4-*-
2dnl
3dnl $Id$
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
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
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
22dnl GNU Library General Public License for more details.
23dnl
24dnl You should have received a copy of the GNU Library General Public
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.
28
29AC_INIT(exc.c)
30AC_CONFIG_AUX_DIR(config)
31AM_INIT_AUTOMAKE(mLib, 2.0.5)
32
33AC_PROG_CC
34AM_PROG_LIBTOOL
35AX_CFLAGS_WARN_ALL
36mdw_MANEXT
37
38AC_CHECK_HEADERS(float.h)
39
40AC_SEARCH_LIBS(socket, socket)
41AC_SEARCH_LIBS(gethostbyname, nsl resolv)
42
43DEPLIBS=$LIBS AC_SUBST(DEPLIBS)
44BRES_LIBEXEC="bres\$(EXEEXT)" BRES_SOURCE="bres"
45AC_SUBST(BRES_LIBEXEC) AC_SUBST(BRES_SOURCE)
46AC_ARG_WITH(adns,
47[ --with-adns use ADNS library for background name resolution],
48[want_adns=$withval], [want_adns=auto])
49if test $want_adns != no; then
50 save_LIBS=$LIBS
51 LIBS=$DEPLIBS
52 AC_SEARCH_LIBS(adns_init, adns, [have_adns=yes], [have_adns=no])
53 DEPLIBS=$LIBS
54 LIBS=$save_LIBS
55 if test $have_adns = yes; then
56 AC_DEFINE(HAVE_ADNS)
57 BRES_LIBEXEC=""
58 BRES_SOURCE="bres-adns"
59 elif test $want_adns = yes; then
60 AC_MSG_ERROR([ADNS library not found, but explicitly requested])
61 fi
62fi
63
64AC_CACHE_CHECK([for msg_control], [mdw_cv_msg_control],
65[AC_TRY_COMPILE(
66[#include <sys/types.h>
67#include <sys/socket.h>],
68[struct msghdr msg;
69msg.msg_control = 0;],
70[mdw_cv_msg_control=yes],
71[mdw_cv_msg_control=no])])
72if test $mdw_cv_msg_control = no; then
73 AC_DEFINE([HAVE_MSG_ACCRIGHTS])
74fi
75
76AC_DEFINE(BUILDING_MLIB)
77
78AC_OUTPUT(Makefile man/Makefile mLib.pc)