@@ -87,22 +87,22 @@ AC_SEARCH_LIBS(socket, socket)
87
87
AC_SEARCH_LIBS ( inet_aton , resolv )
88
88
AC_SEARCH_LIBS ( inet_pton , resolv ,
89
89
AC_DEFINE ( HAVE_INET_PTON , 1 ,
90
- [ Define to 1 if you have the ` inet_pton()' function.] ) )
90
+ [ Define to 1 if you have the inet_pton() function.] ) )
91
91
AC_SEARCH_LIBS ( inet_ntop , resolv nsl ,
92
92
AC_DEFINE ( HAVE_INET_NTOP , 1 ,
93
- [ Define to 1 if you have the ` inet_ntop()' function.] ) )
93
+ [ Define to 1 if you have the inet_ntop() function.] ) )
94
94
AC_SEARCH_LIBS ( getaddrinfo , resolv ,
95
95
AC_DEFINE ( HAVE_GETADDRINFO , 1 ,
96
- [ Define to 1 if you have the ` getaddrinfo()' function.] ) )
96
+ [ Define to 1 if you have the getaddrinfo() function.] ) )
97
97
AC_SEARCH_LIBS ( res_ninit , resolv ,
98
98
AC_DEFINE ( HAVE_RES_NINIT , 1 ,
99
- [ Define to 1 if you have the ` res_ninit()' function.] ) )
99
+ [ Define to 1 if you have the res_ninit() function.] ) )
100
100
AC_SEARCH_LIBS ( res_sertservers , resolv bind ,
101
101
AC_DEFINE ( HAVE_RES_SETSERVERS , 1 ,
102
- [ Define to 1 if you have the ` res_setservers()' function.] ) )
102
+ [ Define to 1 if you have the res_setservers() function.] ) )
103
103
AC_SEARCH_LIBS ( getopt_long , iberty ,
104
104
AC_DEFINE ( HAVE_GETOPT_LONG , 1 ,
105
- [ Define to 1 if you have the ` getopt_long()' function.] ) )
105
+ [ Define to 1 if you have the getopt_long() function.] ) )
106
106
107
107
AC_HEADER_RESOLV
108
108
@@ -132,23 +132,23 @@ AC_MSG_CHECKING([whether the resolver works without -lresolv])
132
132
LIBRESOLV=
133
133
AC_LINK_IFELSE ( [ AC_LANG_SOURCE ( [
134
134
$dnscheck
135
- ] ) ] , [
136
- AC_MSG_RESULT ( yes )
137
- ] , [
138
- AC_MSG_RESULT ( no )
139
- AC_MSG_CHECKING ( [ whether the resolver works with -lresolv] )
140
- saved_LIBS="$LIBS"
141
- LIBS="$outer_LIBS -lresolv"
142
- AC_LINK_IFELSE ( [ AC_LANG_SOURCE ( [
135
+ ] ) ] , [
136
+ AC_MSG_RESULT ( yes )
137
+ ] , [
138
+ AC_MSG_RESULT ( no )
139
+ AC_MSG_CHECKING ( [ whether the resolver works with -lresolv] )
140
+ saved_LIBS="$LIBS"
141
+ LIBS="$outer_LIBS -lresolv"
142
+ AC_LINK_IFELSE ( [ AC_LANG_SOURCE ( [
143
143
$dnscheck
144
- ] ) ] , [
145
- AC_MSG_RESULT ( yes )
146
- LIBRESOLV=-lresolv
147
- ] , [
148
- AC_MSG_RESULT ( no )
149
- AC_MSG_ERROR ( [ need workable resolver library] )
150
- ] )
151
- LIBS="$saved_LIBS"
144
+ ] ) ] , [
145
+ AC_MSG_RESULT ( yes )
146
+ LIBRESOLV=-lresolv
147
+ ] , [
148
+ AC_MSG_RESULT ( no )
149
+ AC_MSG_ERROR ( [ need workable resolver library] )
150
+ ] )
151
+ LIBS="$saved_LIBS"
152
152
] )
153
153
AC_SUBST ( [ LIBRESOLV] )
154
154
@@ -191,98 +191,83 @@ AC_CHECK_HEADERS([bsd/string.h], [bsdstrl_h_found="yes"])
191
191
192
192
AC_CHECK_FUNCS ( [ strlcat strlcpy] , [ strl_found="yes"] ,
193
193
[
194
- saved_LIBS="$LIBS"
195
- LIBS="$outer_LIBS"
196
- AC_SEARCH_LIBS ( [ strlcat] ,
197
- [ bsd strl] ,
198
- [ libstrl_found="yes"] ,
199
- [ strl_found="no"] )
200
- AC_SEARCH_LIBS ( [ strlcpy] ,
201
- [ bsd strl] ,
202
- [ libstrl_found="yes"] ,
203
- [ strl_found="no"] )
204
- STRL_LIBS="$LIBS"
205
- LIBS="$saved_LIBS"
194
+ saved_LIBS="$LIBS"
195
+ LIBS="$outer_LIBS"
196
+ AC_SEARCH_LIBS ( [ strlcat] ,
197
+ [ bsd strl] ,
198
+ [ libstrl_found="yes"] ,
199
+ [ strl_found="no"] )
200
+ AC_SEARCH_LIBS ( [ strlcpy] ,
201
+ [ bsd strl] ,
202
+ [ libstrl_found="yes"] ,
203
+ [ strl_found="no"] )
204
+ STRL_LIBS="$LIBS"
205
+ LIBS="$saved_LIBS"
206
206
] )
207
207
208
- if test x"$libstrl_found" = x"yes"
209
- then
210
- LIBS="$LIBS $STRL_LIBS"
211
- fi
208
+ AS_IF ( [ test "x$libstrl_found" = xyes] , [ LIBS="$LIBS $STRL_LIBS"] )
212
209
213
210
# we need something above to have worked
214
- if test x"$strl_found" != x"yes" -a x"$libstrl_found" != x"yes"
215
- then
216
- AC_MSG_ERROR ( no strlcpy/strlcat found )
217
- fi
211
+ AS_IF ( [ test "x$strl_found" != xyes -a "x$libstrl_found" != xyes] , [
212
+ AC_MSG_ERROR ( no strlcpy/strlcat found )
213
+ ] )
218
214
219
215
AC_SUBST ( STRL_LIBS )
220
216
221
217
AC_CHECK_HEADERS ( [ strl.h] , [ strl_h_found="yes"] )
222
- if test x"$strl_h_found" != x"yes"
223
- then
224
- strldirs="/usr/local/include /usr/include"
225
-
226
- for d in $strldirs
227
- do
228
- AC_MSG_CHECKING ( [ for strl.h in $d/strl] )
229
- if test -f $d/strl/strl.h
230
- then
231
- unset ac_cv_header_strl_h
232
- saved_CPPFLAGS="$CPPFLAGS"
233
- CPPFLAGS="$CPPFLAGS -I$d/strl"
234
- AC_CHECK_HEADERS ( [ strl.h] , [ strl_h_found="yes"] )
235
- CPPFLAGS="$saved_CPPFLAGS"
236
- fi
237
-
238
- if test x"$strl_h_found" = x"yes"
239
- then
240
- CPPFLAGS="$CPPFLAGS -I$d/strl"
241
- break
242
- fi
243
- done
244
- fi
218
+ AS_IF ( [ test "x$strl_h_found" != xyes] , [
219
+ strldirs="/usr/local/include /usr/include"
220
+
221
+ for d in $strldirs
222
+ do
223
+ AC_MSG_CHECKING ( [ for strl.h in $d/strl] )
224
+ AS_IF ( [ test -f "$d/strl/strl.h"] , [
225
+ unset ac_cv_header_strl_h
226
+ saved_CPPFLAGS="$CPPFLAGS"
227
+ CPPFLAGS="$CPPFLAGS -I$d/strl"
228
+ AC_CHECK_HEADERS ( [ strl.h] , [ strl_h_found="yes"] )
229
+ CPPFLAGS="$saved_CPPFLAGS"
230
+ ] )
231
+
232
+ AS_IF ( [ test "x$strl_h_found" = xyes] , [
233
+ CPPFLAGS="$CPPFLAGS -I$d/strl"
234
+ break
235
+ ] )
236
+ done
237
+ ] )
245
238
246
239
# we need to include <strl.h> if an installed strl.h was found and no
247
240
# bsd/string.h was found
248
- if test x"$strl_h_found" = x"yes" -a x"$bsdstrl_h_found" = x"no"
249
- then
250
- AC_DEFINE ( [ USE_STRL_H] , 1 ,
251
- [ Define to 1 if you need to include <strl.h> to get the strlcat() and strlcpy() functions.] )
252
- fi
241
+ AS_IF ( [ test "x$strl_h_found" = xyes -a "x$bsdstrl_h_found" = xno] , [
242
+ AC_DEFINE ( [ USE_STRL_H] , 1 , [ Define to 1 if you need to include <strl.h> to get the strlcat() and strlcpy() functions.] )
243
+ ] )
253
244
254
- if test x"$bsdstrl_h_found" = x"yes"
255
- then
256
- AC_DEFINE ( [ USE_BSD_H] , 1 ,
257
- [ Define to 1 if you need to include <bsd/string.h> to get the strlcat() and strlcpy() functions.] )
258
- fi
245
+ AS_IF ( [ test "x$bsdstrl_h_found" = xyes] , [
246
+ AC_DEFINE ( [ USE_BSD_H] , 1 , [ Define to 1 if you need to include <bsd/string.h> to get the strlcat() and strlcpy() functions.] )
247
+ ] )
259
248
260
249
#
261
250
# use rpath at load time?
262
251
#
263
252
264
- AC_ARG_ENABLE (
265
- [ rpath] ,
266
- AS_HELP_STRING ( [ --enable-rpath] ,
267
- [ include library load paths in binaries] ) ,
268
- ,
269
- enable_rpath="yes" )
253
+ AC_ARG_ENABLE ( [ rpath] ,
254
+ AS_HELP_STRING ( [ --enable-rpath] , [ include library load paths in binaries] ) ,
255
+ [ ] ,
256
+ enable_rpath="yes" )
270
257
AM_CONDITIONAL([ RPATH] , [ test x"$enable_rpath" = x"yes"] )
271
- if test x"$enable_rpath" != x"yes"
272
- then
273
- AC_MSG_RESULT ( [ Suppressing -rpath use by libtool] )
274
- hardcode_libdir_flag_spec=" -D__LIBTOOL_NO_RPATH__ "
275
- chmod 0755 libtool
276
- fi
258
+ AS_IF ( [ test "x$enable_rpath" != xyes] , [
259
+ AC_MSG_RESULT ( [ Suppressing -rpath use by libtool] )
260
+ hardcode_libdir_flag_spec=" -D__LIBTOOL_NO_RPATH__ "
261
+ chmod 0755 libtool
262
+ ] )
277
263
278
264
#
279
265
# openarc
280
266
#
281
267
AC_ARG_ENABLE ( [ filter] ,
282
- AS_HELP_STRING ( [ --disable-filter] ,
283
- [ do not compile the openarc filter] ) ,
284
- [ enable_filter=$enableval] ,
285
- [ enable_filter=yes] )
268
+ AS_HELP_STRING ( [ --disable-filter] , [ do not compile the openarc filter] ) ,
269
+ [ enable_filter=$enableval] ,
270
+ [ enable_filter=yes] )
286
271
AM_CONDITIONAL([ BUILD_FILTER] , [ test x"$enable_filter" != x"no"] )
287
272
288
273
#
@@ -292,18 +277,15 @@ AM_CONDITIONAL([BUILD_FILTER], [test x"$enable_filter" != x"no"])
292
277
LIBOPENARC_FEATURE_STRING="libopenarc $PACKAGE_VERSION:"
293
278
294
279
AC_ARG_ENABLE ( [ allsymbols] ,
295
- AS_HELP_STRING ( [ --enable-allsymbols] ,
296
- [ export internal-use symbols for better test coverage] ) )
280
+ AS_HELP_STRING ( [ --enable-allsymbols] , [ export internal-use symbols for better test coverage] ) )
297
281
AM_CONDITIONAL(ALL_SYMBOLS, [ test x"$enable_allsymbols" = x"yes"] )
298
282
299
283
AC_ARG_ENABLE ( [ debug] ,
300
- AS_HELP_STRING ( [ --enable-debug] ,
301
- [ produce debugging binaries and libraries] ) ,
302
- AS_IF ( [ test "x$enable_debug" = x"yes"] ,
303
- [
304
- LIBOPENARC_FEATURE_STRING="$LIBOPENARC_FEATURE_STRING debug"
305
- [ [ CFLAGS=`echo $CFLAGS | sed 's/ -O[ 1-9s] *//g'`] ]
306
- ] )
284
+ AS_HELP_STRING ( [ --enable-debug] , [ produce debugging binaries and libraries] ) ,
285
+ AS_IF ( [ test "x$enable_debug" = x"yes"] , [
286
+ LIBOPENARC_FEATURE_STRING="$LIBOPENARC_FEATURE_STRING debug"
287
+ [ [ CFLAGS=`echo $CFLAGS | sed 's/ -O[ 1-9s] *//g'`] ]
288
+ ] )
307
289
)
308
290
309
291
AM_CONDITIONAL([ DEBUG] , [ test x"$enable_debug" = x"yes"] )
0 commit comments