chiark / gitweb /
struct/dstr-putf.c (dstr_vputf): Rewrite to support `%n$...' specs.
[mLib] / configure.ac
CommitLineData
a0150d8d
MW
1dnl -*-autoconf-*-
2dnl
3dnl Configuration script for mLib
4dnl
5dnl (c) 2008 Straylight/Edgeware
6dnl
7
51c4088b 8dnl----- Licensing notice ---------------------------------------------------
a0150d8d
MW
9dnl
10dnl This file is part of the mLib utilities library.
11dnl
12dnl mLib is free software; you can redistribute it and/or modify
13dnl it under the terms of the GNU Library General Public License as
14dnl published by the Free Software Foundation; either version 2 of the
15dnl License, or (at your option) any later version.
16dnl
17dnl mLib is distributed in the hope that it will be useful,
18dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
19dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20dnl GNU Library General Public License for more details.
21dnl
22dnl You should have received a copy of the GNU Library General Public
23dnl License along with mLib; if not, write to the Free
24dnl Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
25dnl MA 02111-1307, USA.
26
27dnl--------------------------------------------------------------------------
28dnl Initialization.
29
30mdw_AUTO_VERSION
b3a0ac5e 31AC_INIT([mLib], AUTO_VERSION, [mdw@distorted.org.uk], [mLib])
a0150d8d
MW
32AC_CONFIG_SRCDIR([mLib.pc.in])
33AC_CONFIG_AUX_DIR([config])
34AM_INIT_AUTOMAKE([foreign])
3ac6fc5f 35mdw_SILENT_RULES
a0150d8d
MW
36
37AC_PROG_CC
38AM_PROG_CC_C_O
39AM_PROG_LIBTOOL
40AX_CFLAGS_WARN_ALL
41mdw_LIBTOOL_VERSION_INFO
42
7cf5c72a
MW
43AC_CHECK_PROGS([AUTOM4TE], [autom4te])
44
a0150d8d
MW
45mdw_MANEXT
46
47AC_DEFINE_UNQUOTED([SRCDIR], ["$(cd $srcdir && pwd)"],
48 [absolute pathname for the source directory.])
49
50dnl--------------------------------------------------------------------------
51dnl C programming environment.
52
53dnl Headers.
54AC_CHECK_HEADERS([float.h])
55
56dnl Libraries.
57AC_SEARCH_LIBS([socket], [socket])
58AC_SEARCH_LIBS([gethostbyname], [nsl resolv])
59
eff136f6
MW
60dnl Functions.
61AC_CHECK_FUNCS([snprintf])
62
0ce34834
MW
63dnl Types.
64AC_CHECK_TYPE([socklen_t], [int])
65
a0150d8d
MW
66dnl Which version of struct msghdr do we have?
67AC_CHECK_MEMBERS([struct msgdr.msg_control],,, [
68#include <sys/types.h>
69#include <sys/socket.h>
70])
71
173ff44a 72dnl Find out whether we're cross-compiling.
51c4088b 73AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
173ff44a 74
a0150d8d
MW
75dnl--------------------------------------------------------------------------
76dnl Name resolution.
77
78AC_ARG_WITH([adns],
79 AS_HELP_STRING([--with-adns],
80 [use ADNS library for background name resolution]),
81 [want_adns=$withval],
82 [want_adns=auto])
83
84case $want_adns in
85 no) ;;
86 *) AC_SEARCH_LIBS([adns_init], [adns], [have_adns=yes], [have_adns=no]) ;;
87esac
88case $want_adns,$have_adns in
89 yes,no)
90 AC_MSG_ERROR([ADNS library not found but explicitly requested])
91 ;;
92 yes,yes | auto,yes)
93 use_adns=yes
94 AC_DEFINE([HAVE_ADNS], [1],
95 [define if you have (and want to use) the ADNS library.])
96 ;;
97 no,* | auto,no)
98 use_adns=no
99 mdw_DEFINE_PATHS([
100 AC_DEFINE_UNQUOTED([BRES_SERVER],
101 ["mdw_PATH($libexecdir)/$PACKAGE/mdw_PROG(bres)"],
102 [pathname to the standalone `bres' binary.'])
103 ])
104 ;;
105esac
106AM_CONDITIONAL([WITH_ADNS], [test "$use_adns" = yes])
107
7cf5c72a
MW
108dnl--------------------------------------------------------------------------
109dnl Python (used for testing).
110
111AM_PATH_PYTHON([2.4],, [:])
112
a0150d8d
MW
113dnl--------------------------------------------------------------------------
114dnl Output.
115
116AC_CONFIG_HEADER([config/config.h])
7cf5c72a 117AC_CONFIG_TESTDIR([t])
a0150d8d
MW
118
119AC_CONFIG_FILES(
18c831dc
MW
120 [Makefile]
121 [buf/Makefile]
122 [codec/Makefile]
123 [hash/Makefile]
124 [mem/Makefile]
125 [sel/Makefile]
126 [struct/Makefile]
127 [sys/Makefile]
128 [test/Makefile]
129 [trace/Makefile]
130 [ui/Makefile]
7cf5c72a
MW
131 [utils/Makefile]
132 [t/Makefile t/atlocal])
a0150d8d
MW
133AC_OUTPUT
134
51c4088b 135dnl------ That's all, folks -------------------------------------------------