Commit | Line | Data |
---|---|---|
52162d1b | 1 | dnl -*-m4-*- |
0875b58f | 2 | dnl |
1a6043f9 | 3 | dnl $Id$ |
0875b58f | 4 | dnl |
5 | dnl Configuration script for mLib | |
6 | dnl | |
7 | dnl (c) 1998 Straylight/Edgeware | |
8 | dnl | |
9 | ||
10 | dnl ----- Licensing notice -------------------------------------------------- | |
11 | dnl | |
12 | dnl This file is part of the mLib utilities library. | |
13 | dnl | |
14 | dnl mLib is free software; you can redistribute it and/or modify | |
c846879c | 15 | dnl it under the terms of the GNU Library General Public License as |
16 | dnl published by the Free Software Foundation; either version 2 of the | |
17 | dnl License, or (at your option) any later version. | |
d4efbcd9 | 18 | dnl |
0875b58f | 19 | dnl mLib is distributed in the hope that it will be useful, |
20 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of | |
21 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
c846879c | 22 | dnl GNU Library General Public License for more details. |
d4efbcd9 | 23 | dnl |
c846879c | 24 | dnl You should have received a copy of the GNU Library General Public |
0bd98442 | 25 | dnl License along with mLib; if not, write to the Free |
26 | dnl Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, | |
27 | dnl MA 02111-1307, USA. | |
0875b58f | 28 | |
0875b58f | 29 | AC_INIT(exc.c) |
e57e2b62 | 30 | AC_CONFIG_AUX_DIR(config) |
3048fcf9 | 31 | AM_INIT_AUTOMAKE(mLib, 2.0.5) |
0875b58f | 32 | |
33 | AC_PROG_CC | |
c7f30b36 | 34 | AM_PROG_LIBTOOL |
e3afa470 | 35 | AX_CFLAGS_WARN_ALL |
c3b137c8 | 36 | mdw_MANEXT |
0875b58f | 37 | |
5d45633f | 38 | AC_CHECK_HEADERS(float.h) |
39 | ||
e3afa470 MW |
40 | AC_SEARCH_LIBS(socket, socket) |
41 | AC_SEARCH_LIBS(gethostbyname, nsl resolv) | |
685b7e3e | 42 | |
14d7100d | 43 | DEPLIBS=$LIBS AC_SUBST(DEPLIBS) |
1a6043f9 | 44 | BRES_LIBEXEC="bres\$(EXEEXT)" BRES_SOURCE="bres" |
14d7100d | 45 | AC_SUBST(BRES_LIBEXEC) AC_SUBST(BRES_SOURCE) |
46 | AC_ARG_WITH(adns, | |
d4efbcd9 | 47 | [ --with-adns use ADNS library for background name resolution], |
14d7100d | 48 | [want_adns=$withval], [want_adns=auto]) |
49 | if test $want_adns != no; then | |
50 | save_LIBS=$LIBS | |
51 | LIBS=$DEPLIBS | |
e3afa470 | 52 | AC_SEARCH_LIBS(adns_init, adns, [have_adns=yes], [have_adns=no]) |
14d7100d | 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 | |
62 | fi | |
63 | ||
ad61a8f8 | 64 | AC_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; | |
69 | msg.msg_control = 0;], | |
70 | [mdw_cv_msg_control=yes], | |
71 | [mdw_cv_msg_control=no])]) | |
72 | if test $mdw_cv_msg_control = no; then | |
73 | AC_DEFINE([HAVE_MSG_ACCRIGHTS]) | |
74 | fi | |
75 | ||
335577d0 | 76 | AC_DEFINE(BUILDING_MLIB) |
0875b58f | 77 | |
e3afa470 | 78 | AC_OUTPUT(Makefile man/Makefile mLib.pc) |