-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathconfigure.ac
149 lines (130 loc) · 2.74 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# $Id$
AC_INIT(fdm, 1.9)
RELEASE=1.8
AC_SUBST(RELEASE)
AC_CONFIG_AUX_DIR(etc)
AM_INIT_AUTOMAKE([foreign subdir-objects])
AC_CANONICAL_HOST
: ${CFLAGS=""}
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_YACC
test "$sysconfdir" = '${prefix}/etc' && sysconfdir=/etc
test "$localstatedir" = '${prefix}/var' && localstatedir=/var
AC_ARG_ENABLE(
debug,
AC_HELP_STRING(--enable-debug, create a debug build),
found_debug=$enable_debug
)
AM_CONDITIONAL(IS_DEBUG, test "x$found_debug" = xyes)
AC_ARG_ENABLE(
static,
AC_HELP_STRING(--enable-static, create a static build),
found_static=$enable_static
)
if test "x$found_static" = xyes; then
LDFLAGS="$LDFLAGS -static"
fi
AC_CHECK_HEADERS(
[ \
sys/queue.h \
sys/tree.h \
]
)
AC_CHECK_FUNCS(
[ \
setproctitle \
mremap \
setresuid \
setresgid \
]
)
AC_SEARCH_LIBS(
tdb_open,
[tdb],
found_libtdb=yes,
found_libtdb=no
)
if test "x$found_libtdb" = xno; then
AC_MSG_ERROR("libtdb not found")
fi
AC_SEARCH_LIBS(
gzflush,
[z],
found_libz=yes,
found_libz=no
)
if test "x$found_libz" = xno; then
AC_MSG_ERROR("libz not found")
fi
AC_SEARCH_LIBS(
BIO_new,
[crypto],
found_libcrypto=yes,
found_libcrypto=no
)
if test "x$found_libcrypto" = xno; then
AC_MSG_ERROR("libcrypto not found")
fi
AC_SEARCH_LIBS(
SSL_library_init,
[ssl],
found_libssl=yes,
found_libssl=no
)
if test "x$found_libssl" = xno; then
AC_MSG_ERROR("libssl not found")
fi
AC_CHECK_FUNC(strlcpy, found_strlcpy=yes, found_strlcpy=no)
if test "x$found_strlcpy" = xyes; then
AC_DEFINE(HAVE_STRLCPY)
fi
AM_CONDITIONAL(NO_STRLCPY, [test "x$found_strlcpy" = xno])
AC_CHECK_FUNC(strlcat, found_strlcat=yes, found_strlcat=no)
if test "x$found_strlcat" = xyes; then
AC_DEFINE(HAVE_STRLCAT)
fi
AM_CONDITIONAL(NO_STRLCAT, [test "x$found_strlcat" = xno])
AC_CHECK_FUNC(strtonum, found_strtonum=yes, found_strtonum=no)
if test "x$found_strtonum" = xyes; then
AC_DEFINE(HAVE_STRTONUM)
fi
AM_CONDITIONAL(NO_STRTONUM, [test "x$found_strtonum" = xno])
AC_MSG_CHECKING(for b64_ntop)
AC_TRY_LINK(
[
#include <sys/types.h>
#include <netinet/in.h>
#include <resolv.h>
],
[b64_ntop(NULL, 0, NULL, 0);],
found_b64_ntop=yes,
found_b64_ntop=no
)
if test "x$found_b64_ntop" = xno; then
AC_MSG_RESULT(no)
AC_MSG_CHECKING(for b64_ntop with -lresolv)
LIBS="$LIBS -lresolv"
AC_TRY_LINK(
[
#include <sys/types.h>
#include <netinet/in.h>
#include <resolv.h>
],
[b64_ntop(NULL, 0, NULL, 0);],
found_b64_ntop=yes,
found_b64_ntop=no
)
if test "x$found_b64_ntop" = xno; then
AC_MSG_RESULT(no)
fi
fi
if test "x$found_b64_ntop" = xyes; then
AC_DEFINE(HAVE_B64_NTOP)
AC_MSG_RESULT(yes)
fi
AM_CONDITIONAL(NO_B64_NTOP, [test "x$found_b64_ntop" = xno])
AC_OUTPUT(Makefile)