configure revision 1.11 1 1.1 christos #! /bin/sh
2 1.1 christos # Guess values for system-dependent variables and create Makefiles.
3 1.11 christos # Generated by GNU Autoconf 2.69 for tcpdump 4.99.4.
4 1.4 christos #
5 1.4 christos #
6 1.4 christos # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 1.4 christos #
8 1.1 christos #
9 1.1 christos # This configure script is free software; the Free Software Foundation
10 1.1 christos # gives unlimited permission to copy, distribute and modify it.
11 1.4 christos ## -------------------- ##
12 1.4 christos ## M4sh Initialization. ##
13 1.4 christos ## -------------------- ##
14 1.1 christos
15 1.1 christos # Be more Bourne compatible
16 1.1 christos DUALCASE=1; export DUALCASE # for MKS sh
17 1.4 christos if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 1.1 christos emulate sh
19 1.1 christos NULLCMD=:
20 1.4 christos # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 1.1 christos # is contrary to our usage. Disable this feature.
22 1.1 christos alias -g '${1+"$@"}'='"$@"'
23 1.1 christos setopt NO_GLOB_SUBST
24 1.1 christos else
25 1.4 christos case `(set -o) 2>/dev/null` in #(
26 1.4 christos *posix*) :
27 1.4 christos set -o posix ;; #(
28 1.4 christos *) :
29 1.4 christos ;;
30 1.1 christos esac
31 1.1 christos fi
32 1.1 christos
33 1.1 christos
34 1.4 christos as_nl='
35 1.4 christos '
36 1.4 christos export as_nl
37 1.4 christos # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 1.4 christos as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 1.4 christos as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 1.4 christos as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 1.4 christos # Prefer a ksh shell builtin over an external printf program on Solaris,
42 1.4 christos # but without wasting forks for bash or zsh.
43 1.4 christos if test -z "$BASH_VERSION$ZSH_VERSION" \
44 1.4 christos && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 1.4 christos as_echo='print -r --'
46 1.4 christos as_echo_n='print -rn --'
47 1.4 christos elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 1.4 christos as_echo='printf %s\n'
49 1.4 christos as_echo_n='printf %s'
50 1.4 christos else
51 1.4 christos if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 1.4 christos as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 1.4 christos as_echo_n='/usr/ucb/echo -n'
54 1.1 christos else
55 1.4 christos as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 1.4 christos as_echo_n_body='eval
57 1.4 christos arg=$1;
58 1.4 christos case $arg in #(
59 1.4 christos *"$as_nl"*)
60 1.4 christos expr "X$arg" : "X\\(.*\\)$as_nl";
61 1.4 christos arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 1.4 christos esac;
63 1.4 christos expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 1.4 christos '
65 1.4 christos export as_echo_n_body
66 1.4 christos as_echo_n='sh -c $as_echo_n_body as_echo'
67 1.1 christos fi
68 1.4 christos export as_echo_body
69 1.4 christos as_echo='sh -c $as_echo_body as_echo'
70 1.1 christos fi
71 1.1 christos
72 1.4 christos # The user is always right.
73 1.4 christos if test "${PATH_SEPARATOR+set}" != set; then
74 1.4 christos PATH_SEPARATOR=:
75 1.4 christos (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 1.4 christos (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 1.4 christos PATH_SEPARATOR=';'
78 1.4 christos }
79 1.1 christos fi
80 1.1 christos
81 1.1 christos
82 1.1 christos # IFS
83 1.1 christos # We need space, tab and new line, in precisely that order. Quoting is
84 1.1 christos # there to prevent editors from complaining about space-tab.
85 1.1 christos # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 1.1 christos # splitting by setting IFS to empty value.)
87 1.1 christos IFS=" "" $as_nl"
88 1.1 christos
89 1.1 christos # Find who we are. Look in the path if we contain no directory separator.
90 1.4 christos as_myself=
91 1.4 christos case $0 in #((
92 1.1 christos *[\\/]* ) as_myself=$0 ;;
93 1.1 christos *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 1.1 christos for as_dir in $PATH
95 1.1 christos do
96 1.1 christos IFS=$as_save_IFS
97 1.1 christos test -z "$as_dir" && as_dir=.
98 1.4 christos test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 1.4 christos done
100 1.1 christos IFS=$as_save_IFS
101 1.1 christos
102 1.1 christos ;;
103 1.1 christos esac
104 1.1 christos # We did not find ourselves, most probably we were run as `sh COMMAND'
105 1.1 christos # in which case we are not to be found in the path.
106 1.1 christos if test "x$as_myself" = x; then
107 1.1 christos as_myself=$0
108 1.1 christos fi
109 1.1 christos if test ! -f "$as_myself"; then
110 1.4 christos $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 1.4 christos exit 1
112 1.1 christos fi
113 1.1 christos
114 1.4 christos # Unset variables that we do not need and which cause bugs (e.g. in
115 1.4 christos # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116 1.4 christos # suppresses any "Segmentation fault" message there. '((' could
117 1.4 christos # trigger a bug in pdksh 5.2.14.
118 1.4 christos for as_var in BASH_ENV ENV MAIL MAILPATH
119 1.4 christos do eval test x\${$as_var+set} = xset \
120 1.4 christos && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 1.1 christos done
122 1.1 christos PS1='$ '
123 1.1 christos PS2='> '
124 1.1 christos PS4='+ '
125 1.1 christos
126 1.1 christos # NLS nuisances.
127 1.4 christos LC_ALL=C
128 1.4 christos export LC_ALL
129 1.4 christos LANGUAGE=C
130 1.4 christos export LANGUAGE
131 1.1 christos
132 1.1 christos # CDPATH.
133 1.4 christos (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134 1.1 christos
135 1.4 christos # Use a proper internal environment variable to ensure we don't fall
136 1.4 christos # into an infinite loop, continuously re-executing ourselves.
137 1.4 christos if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 1.4 christos _as_can_reexec=no; export _as_can_reexec;
139 1.4 christos # We cannot yet assume a decent shell, so we have to provide a
140 1.4 christos # neutralization value for shells without unset; and this also
141 1.4 christos # works around shells that cannot unset nonexistent variables.
142 1.4 christos # Preserve -v and -x to the replacement shell.
143 1.4 christos BASH_ENV=/dev/null
144 1.4 christos ENV=/dev/null
145 1.4 christos (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 1.4 christos case $- in # ((((
147 1.4 christos *v*x* | *x*v* ) as_opts=-vx ;;
148 1.4 christos *v* ) as_opts=-v ;;
149 1.4 christos *x* ) as_opts=-x ;;
150 1.4 christos * ) as_opts= ;;
151 1.4 christos esac
152 1.4 christos exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 1.4 christos # Admittedly, this is quite paranoid, since all the known shells bail
154 1.4 christos # out after a failed `exec'.
155 1.4 christos $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 1.4 christos as_fn_exit 255
157 1.4 christos fi
158 1.4 christos # We don't want this to propagate to other subprocesses.
159 1.4 christos { _as_can_reexec=; unset _as_can_reexec;}
160 1.1 christos if test "x$CONFIG_SHELL" = x; then
161 1.4 christos as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 1.4 christos emulate sh
163 1.4 christos NULLCMD=:
164 1.4 christos # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 1.4 christos # is contrary to our usage. Disable this feature.
166 1.4 christos alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 1.4 christos setopt NO_GLOB_SUBST
168 1.1 christos else
169 1.4 christos case \`(set -o) 2>/dev/null\` in #(
170 1.4 christos *posix*) :
171 1.4 christos set -o posix ;; #(
172 1.4 christos *) :
173 1.4 christos ;;
174 1.4 christos esac
175 1.1 christos fi
176 1.4 christos "
177 1.4 christos as_required="as_fn_return () { (exit \$1); }
178 1.4 christos as_fn_success () { as_fn_return 0; }
179 1.4 christos as_fn_failure () { as_fn_return 1; }
180 1.4 christos as_fn_ret_success () { return 0; }
181 1.4 christos as_fn_ret_failure () { return 1; }
182 1.1 christos
183 1.1 christos exitcode=0
184 1.4 christos as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 1.4 christos as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 1.4 christos as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 1.4 christos as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 1.4 christos if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189 1.4 christos
190 1.4 christos else
191 1.4 christos exitcode=1; echo positional parameters were not saved.
192 1.4 christos fi
193 1.4 christos test x\$exitcode = x0 || exit 1
194 1.4 christos test -x / || exit 1"
195 1.4 christos as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 1.4 christos as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 1.4 christos eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 1.4 christos test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 1.4 christos test \$(( 1 + 1 )) = 2 || exit 1"
200 1.4 christos if (eval "$as_required") 2>/dev/null; then :
201 1.4 christos as_have_required=yes
202 1.1 christos else
203 1.4 christos as_have_required=no
204 1.1 christos fi
205 1.4 christos if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206 1.1 christos
207 1.1 christos else
208 1.4 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 1.4 christos as_found=false
210 1.1 christos for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 1.1 christos do
212 1.1 christos IFS=$as_save_IFS
213 1.1 christos test -z "$as_dir" && as_dir=.
214 1.4 christos as_found=:
215 1.4 christos case $as_dir in #(
216 1.1 christos /*)
217 1.1 christos for as_base in sh bash ksh sh5; do
218 1.4 christos # Try only shells that exist, to save several forks.
219 1.4 christos as_shell=$as_dir/$as_base
220 1.4 christos if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 1.4 christos { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 1.4 christos CONFIG_SHELL=$as_shell as_have_required=yes
223 1.4 christos if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 1.4 christos break 2
225 1.4 christos fi
226 1.4 christos fi
227 1.1 christos done;;
228 1.1 christos esac
229 1.4 christos as_found=false
230 1.1 christos done
231 1.4 christos $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 1.4 christos { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 1.4 christos CONFIG_SHELL=$SHELL as_have_required=yes
234 1.4 christos fi; }
235 1.1 christos IFS=$as_save_IFS
236 1.1 christos
237 1.1 christos
238 1.4 christos if test "x$CONFIG_SHELL" != x; then :
239 1.4 christos export CONFIG_SHELL
240 1.4 christos # We cannot yet assume a decent shell, so we have to provide a
241 1.4 christos # neutralization value for shells without unset; and this also
242 1.4 christos # works around shells that cannot unset nonexistent variables.
243 1.4 christos # Preserve -v and -x to the replacement shell.
244 1.4 christos BASH_ENV=/dev/null
245 1.4 christos ENV=/dev/null
246 1.4 christos (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 1.4 christos case $- in # ((((
248 1.4 christos *v*x* | *x*v* ) as_opts=-vx ;;
249 1.4 christos *v* ) as_opts=-v ;;
250 1.4 christos *x* ) as_opts=-x ;;
251 1.4 christos * ) as_opts= ;;
252 1.4 christos esac
253 1.4 christos exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 1.4 christos # Admittedly, this is quite paranoid, since all the known shells bail
255 1.4 christos # out after a failed `exec'.
256 1.4 christos $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 1.4 christos exit 255
258 1.4 christos fi
259 1.4 christos
260 1.4 christos if test x$as_have_required = xno; then :
261 1.4 christos $as_echo "$0: This script requires a shell more modern than all"
262 1.4 christos $as_echo "$0: the shells that I found on your system."
263 1.4 christos if test x${ZSH_VERSION+set} = xset ; then
264 1.4 christos $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 1.4 christos $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 1.4 christos else
267 1.4 christos $as_echo "$0: Please tell bug-autoconf (at] gnu.org about your system,
268 1.4 christos $0: including any error possibly output before this
269 1.4 christos $0: message. Then install a modern shell, or manually run
270 1.4 christos $0: the script under such a shell if you do have one."
271 1.4 christos fi
272 1.4 christos exit 1
273 1.4 christos fi
274 1.1 christos fi
275 1.1 christos fi
276 1.4 christos SHELL=${CONFIG_SHELL-/bin/sh}
277 1.4 christos export SHELL
278 1.4 christos # Unset more variables known to interfere with behavior of common tools.
279 1.4 christos CLICOLOR_FORCE= GREP_OPTIONS=
280 1.4 christos unset CLICOLOR_FORCE GREP_OPTIONS
281 1.1 christos
282 1.4 christos ## --------------------- ##
283 1.4 christos ## M4sh Shell Functions. ##
284 1.4 christos ## --------------------- ##
285 1.4 christos # as_fn_unset VAR
286 1.4 christos # ---------------
287 1.4 christos # Portably unset VAR.
288 1.4 christos as_fn_unset ()
289 1.4 christos {
290 1.4 christos { eval $1=; unset $1;}
291 1.4 christos }
292 1.4 christos as_unset=as_fn_unset
293 1.4 christos
294 1.4 christos # as_fn_set_status STATUS
295 1.4 christos # -----------------------
296 1.4 christos # Set $? to STATUS, without forking.
297 1.4 christos as_fn_set_status ()
298 1.4 christos {
299 1.4 christos return $1
300 1.4 christos } # as_fn_set_status
301 1.4 christos
302 1.4 christos # as_fn_exit STATUS
303 1.4 christos # -----------------
304 1.4 christos # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 1.4 christos as_fn_exit ()
306 1.4 christos {
307 1.4 christos set +e
308 1.4 christos as_fn_set_status $1
309 1.4 christos exit $1
310 1.4 christos } # as_fn_exit
311 1.4 christos
312 1.4 christos # as_fn_mkdir_p
313 1.4 christos # -------------
314 1.4 christos # Create "$as_dir" as a directory, including parents if necessary.
315 1.4 christos as_fn_mkdir_p ()
316 1.4 christos {
317 1.1 christos
318 1.4 christos case $as_dir in #(
319 1.4 christos -*) as_dir=./$as_dir;;
320 1.4 christos esac
321 1.4 christos test -d "$as_dir" || eval $as_mkdir_p || {
322 1.4 christos as_dirs=
323 1.4 christos while :; do
324 1.4 christos case $as_dir in #(
325 1.4 christos *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 1.4 christos *) as_qdir=$as_dir;;
327 1.4 christos esac
328 1.4 christos as_dirs="'$as_qdir' $as_dirs"
329 1.4 christos as_dir=`$as_dirname -- "$as_dir" ||
330 1.4 christos $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 1.4 christos X"$as_dir" : 'X\(//\)[^/]' \| \
332 1.4 christos X"$as_dir" : 'X\(//\)$' \| \
333 1.4 christos X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 1.4 christos $as_echo X"$as_dir" |
335 1.4 christos sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 1.4 christos s//\1/
337 1.4 christos q
338 1.4 christos }
339 1.4 christos /^X\(\/\/\)[^/].*/{
340 1.4 christos s//\1/
341 1.4 christos q
342 1.4 christos }
343 1.4 christos /^X\(\/\/\)$/{
344 1.4 christos s//\1/
345 1.4 christos q
346 1.4 christos }
347 1.4 christos /^X\(\/\).*/{
348 1.4 christos s//\1/
349 1.4 christos q
350 1.4 christos }
351 1.4 christos s/.*/./; q'`
352 1.4 christos test -d "$as_dir" && break
353 1.4 christos done
354 1.4 christos test -z "$as_dirs" || eval "mkdir $as_dirs"
355 1.4 christos } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356 1.1 christos
357 1.1 christos
358 1.4 christos } # as_fn_mkdir_p
359 1.1 christos
360 1.4 christos # as_fn_executable_p FILE
361 1.4 christos # -----------------------
362 1.4 christos # Test if FILE is an executable regular file.
363 1.4 christos as_fn_executable_p ()
364 1.4 christos {
365 1.4 christos test -f "$1" && test -x "$1"
366 1.4 christos } # as_fn_executable_p
367 1.4 christos # as_fn_append VAR VALUE
368 1.4 christos # ----------------------
369 1.4 christos # Append the text in VALUE to the end of the definition contained in VAR. Take
370 1.4 christos # advantage of any shell optimizations that allow amortized linear growth over
371 1.4 christos # repeated appends, instead of the typical quadratic growth present in naive
372 1.4 christos # implementations.
373 1.4 christos if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 1.4 christos eval 'as_fn_append ()
375 1.4 christos {
376 1.4 christos eval $1+=\$2
377 1.4 christos }'
378 1.1 christos else
379 1.4 christos as_fn_append ()
380 1.4 christos {
381 1.4 christos eval $1=\$$1\$2
382 1.4 christos }
383 1.4 christos fi # as_fn_append
384 1.1 christos
385 1.4 christos # as_fn_arith ARG...
386 1.4 christos # ------------------
387 1.4 christos # Perform arithmetic evaluation on the ARGs, and store the result in the
388 1.4 christos # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 1.4 christos # must be portable across $(()) and expr.
390 1.4 christos if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 1.4 christos eval 'as_fn_arith ()
392 1.4 christos {
393 1.4 christos as_val=$(( $* ))
394 1.4 christos }'
395 1.1 christos else
396 1.4 christos as_fn_arith ()
397 1.4 christos {
398 1.4 christos as_val=`expr "$@" || test $? -eq 1`
399 1.4 christos }
400 1.4 christos fi # as_fn_arith
401 1.1 christos
402 1.1 christos
403 1.4 christos # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 1.4 christos # ----------------------------------------
405 1.4 christos # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 1.4 christos # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 1.4 christos # script with STATUS, using 1 if that was 0.
408 1.4 christos as_fn_error ()
409 1.4 christos {
410 1.4 christos as_status=$1; test $as_status -eq 0 && as_status=1
411 1.4 christos if test "$4"; then
412 1.4 christos as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 1.4 christos fi
415 1.4 christos $as_echo "$as_me: error: $2" >&2
416 1.4 christos as_fn_exit $as_status
417 1.4 christos } # as_fn_error
418 1.1 christos
419 1.4 christos if expr a : '\(a\)' >/dev/null 2>&1 &&
420 1.4 christos test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 1.4 christos as_expr=expr
422 1.1 christos else
423 1.4 christos as_expr=false
424 1.1 christos fi
425 1.1 christos
426 1.4 christos if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 1.4 christos as_basename=basename
428 1.1 christos else
429 1.4 christos as_basename=false
430 1.1 christos fi
431 1.1 christos
432 1.4 christos if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 1.4 christos as_dirname=dirname
434 1.1 christos else
435 1.4 christos as_dirname=false
436 1.1 christos fi
437 1.1 christos
438 1.4 christos as_me=`$as_basename -- "$0" ||
439 1.4 christos $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 1.4 christos X"$0" : 'X\(//\)$' \| \
441 1.4 christos X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 1.4 christos $as_echo X/"$0" |
443 1.4 christos sed '/^.*\/\([^/][^/]*\)\/*$/{
444 1.4 christos s//\1/
445 1.4 christos q
446 1.4 christos }
447 1.4 christos /^X\/\(\/\/\)$/{
448 1.4 christos s//\1/
449 1.4 christos q
450 1.4 christos }
451 1.4 christos /^X\/\(\/\).*/{
452 1.4 christos s//\1/
453 1.4 christos q
454 1.4 christos }
455 1.4 christos s/.*/./; q'`
456 1.1 christos
457 1.4 christos # Avoid depending upon Character Ranges.
458 1.4 christos as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 1.4 christos as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 1.4 christos as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 1.4 christos as_cr_digits='0123456789'
462 1.4 christos as_cr_alnum=$as_cr_Letters$as_cr_digits
463 1.1 christos
464 1.1 christos
465 1.4 christos as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 1.4 christos as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 1.4 christos eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 1.4 christos test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 1.4 christos # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 1.1 christos sed -n '
471 1.1 christos p
472 1.1 christos /[$]LINENO/=
473 1.1 christos ' <$as_myself |
474 1.1 christos sed '
475 1.1 christos s/[$]LINENO.*/&-/
476 1.1 christos t lineno
477 1.1 christos b
478 1.1 christos :lineno
479 1.1 christos N
480 1.1 christos :loop
481 1.1 christos s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 1.1 christos t loop
483 1.1 christos s/-\n.*//
484 1.1 christos ' >$as_me.lineno &&
485 1.1 christos chmod +x "$as_me.lineno" ||
486 1.4 christos { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487 1.1 christos
488 1.4 christos # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 1.4 christos # already done that, so ensure we don't try to do so again and fall
490 1.4 christos # in an infinite loop. This has already happened in practice.
491 1.4 christos _as_can_reexec=no; export _as_can_reexec
492 1.1 christos # Don't try to exec as it changes $[0], causing all sort of problems
493 1.1 christos # (the dirname of $[0] is not the place where we might find the
494 1.1 christos # original and so on. Autoconf is especially sensitive to this).
495 1.1 christos . "./$as_me.lineno"
496 1.1 christos # Exit status is that of the last command.
497 1.1 christos exit
498 1.1 christos }
499 1.1 christos
500 1.4 christos ECHO_C= ECHO_N= ECHO_T=
501 1.4 christos case `echo -n x` in #(((((
502 1.1 christos -n*)
503 1.4 christos case `echo 'xy\c'` in
504 1.1 christos *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 1.4 christos xy) ECHO_C='\c';;
506 1.4 christos *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 1.4 christos ECHO_T=' ';;
508 1.1 christos esac;;
509 1.1 christos *)
510 1.1 christos ECHO_N='-n';;
511 1.1 christos esac
512 1.1 christos
513 1.1 christos rm -f conf$$ conf$$.exe conf$$.file
514 1.1 christos if test -d conf$$.dir; then
515 1.1 christos rm -f conf$$.dir/conf$$.file
516 1.1 christos else
517 1.1 christos rm -f conf$$.dir
518 1.4 christos mkdir conf$$.dir 2>/dev/null
519 1.1 christos fi
520 1.4 christos if (echo >conf$$.file) 2>/dev/null; then
521 1.4 christos if ln -s conf$$.file conf$$ 2>/dev/null; then
522 1.4 christos as_ln_s='ln -s'
523 1.4 christos # ... but there are two gotchas:
524 1.4 christos # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 1.4 christos # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 1.4 christos # In both cases, we have to default to `cp -pR'.
527 1.4 christos ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 1.4 christos as_ln_s='cp -pR'
529 1.4 christos elif ln conf$$.file conf$$ 2>/dev/null; then
530 1.4 christos as_ln_s=ln
531 1.4 christos else
532 1.4 christos as_ln_s='cp -pR'
533 1.4 christos fi
534 1.1 christos else
535 1.4 christos as_ln_s='cp -pR'
536 1.1 christos fi
537 1.1 christos rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 1.1 christos rmdir conf$$.dir 2>/dev/null
539 1.1 christos
540 1.1 christos if mkdir -p . 2>/dev/null; then
541 1.4 christos as_mkdir_p='mkdir -p "$as_dir"'
542 1.1 christos else
543 1.1 christos test -d ./-p && rmdir ./-p
544 1.1 christos as_mkdir_p=false
545 1.1 christos fi
546 1.1 christos
547 1.4 christos as_test_x='test -x'
548 1.4 christos as_executable_p=as_fn_executable_p
549 1.1 christos
550 1.1 christos # Sed expression to map a string onto a valid CPP name.
551 1.1 christos as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552 1.1 christos
553 1.1 christos # Sed expression to map a string onto a valid variable name.
554 1.1 christos as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555 1.1 christos
556 1.1 christos
557 1.4 christos test -n "$DJDIR" || exec 7<&0 </dev/null
558 1.4 christos exec 6>&1
559 1.1 christos
560 1.1 christos # Name of the host.
561 1.4 christos # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 1.1 christos # so uname gets run too.
563 1.1 christos ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564 1.1 christos
565 1.1 christos #
566 1.1 christos # Initializations.
567 1.1 christos #
568 1.1 christos ac_default_prefix=/usr/local
569 1.1 christos ac_clean_files=
570 1.1 christos ac_config_libobj_dir=.
571 1.1 christos LIBOBJS=
572 1.1 christos cross_compiling=no
573 1.1 christos subdirs=
574 1.1 christos MFLAGS=
575 1.1 christos MAKEFLAGS=
576 1.1 christos
577 1.1 christos # Identity of this package.
578 1.11 christos PACKAGE_NAME='tcpdump'
579 1.11 christos PACKAGE_TARNAME='tcpdump'
580 1.11 christos PACKAGE_VERSION='4.99.4'
581 1.11 christos PACKAGE_STRING='tcpdump 4.99.4'
582 1.11 christos PACKAGE_BUGREPORT=''
583 1.11 christos PACKAGE_URL=''
584 1.1 christos
585 1.1 christos ac_unique_file="tcpdump.c"
586 1.1 christos # Factoring default headers for most tests.
587 1.1 christos ac_includes_default="\
588 1.1 christos #include <stdio.h>
589 1.1 christos #ifdef HAVE_SYS_TYPES_H
590 1.1 christos # include <sys/types.h>
591 1.1 christos #endif
592 1.1 christos #ifdef HAVE_SYS_STAT_H
593 1.1 christos # include <sys/stat.h>
594 1.1 christos #endif
595 1.1 christos #ifdef STDC_HEADERS
596 1.1 christos # include <stdlib.h>
597 1.1 christos # include <stddef.h>
598 1.1 christos #else
599 1.1 christos # ifdef HAVE_STDLIB_H
600 1.1 christos # include <stdlib.h>
601 1.1 christos # endif
602 1.1 christos #endif
603 1.1 christos #ifdef HAVE_STRING_H
604 1.1 christos # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605 1.1 christos # include <memory.h>
606 1.1 christos # endif
607 1.1 christos # include <string.h>
608 1.1 christos #endif
609 1.1 christos #ifdef HAVE_STRINGS_H
610 1.1 christos # include <strings.h>
611 1.1 christos #endif
612 1.1 christos #ifdef HAVE_INTTYPES_H
613 1.1 christos # include <inttypes.h>
614 1.1 christos #endif
615 1.1 christos #ifdef HAVE_STDINT_H
616 1.1 christos # include <stdint.h>
617 1.1 christos #endif
618 1.1 christos #ifdef HAVE_UNISTD_H
619 1.1 christos # include <unistd.h>
620 1.1 christos #endif"
621 1.1 christos
622 1.4 christos ac_subst_vars='LTLIBOBJS
623 1.4 christos INSTALL_DATA
624 1.4 christos INSTALL_SCRIPT
625 1.4 christos INSTALL_PROGRAM
626 1.4 christos MAN_MISC_INFO
627 1.4 christos MAN_FILE_FORMATS
628 1.4 christos LOCALSRC
629 1.4 christos V_PCAPDEP
630 1.4 christos V_INCLS
631 1.4 christos V_GROUP
632 1.4 christos V_DEFS
633 1.4 christos V_CCOPT
634 1.4 christos MKDEP
635 1.4 christos DEPENDENCY_CFLAG
636 1.5 christos AR
637 1.4 christos RANLIB
638 1.4 christos PCAP_CONFIG
639 1.11 christos PKG_CONFIG
640 1.4 christos LIBOBJS
641 1.4 christos EGREP
642 1.4 christos GREP
643 1.4 christos CPP
644 1.4 christos OBJEXT
645 1.4 christos EXEEXT
646 1.4 christos ac_ct_CC
647 1.4 christos CPPFLAGS
648 1.4 christos LDFLAGS
649 1.4 christos CFLAGS
650 1.4 christos CC
651 1.4 christos SHLICC2
652 1.4 christos host_os
653 1.4 christos host_vendor
654 1.4 christos host_cpu
655 1.4 christos host
656 1.4 christos build_os
657 1.4 christos build_vendor
658 1.4 christos build_cpu
659 1.4 christos build
660 1.4 christos target_alias
661 1.4 christos host_alias
662 1.4 christos build_alias
663 1.4 christos LIBS
664 1.4 christos ECHO_T
665 1.4 christos ECHO_N
666 1.4 christos ECHO_C
667 1.4 christos DEFS
668 1.4 christos mandir
669 1.4 christos localedir
670 1.4 christos libdir
671 1.4 christos psdir
672 1.4 christos pdfdir
673 1.4 christos dvidir
674 1.4 christos htmldir
675 1.4 christos infodir
676 1.4 christos docdir
677 1.4 christos oldincludedir
678 1.4 christos includedir
679 1.4 christos localstatedir
680 1.4 christos sharedstatedir
681 1.4 christos sysconfdir
682 1.4 christos datadir
683 1.4 christos datarootdir
684 1.4 christos libexecdir
685 1.4 christos sbindir
686 1.4 christos bindir
687 1.4 christos program_transform_name
688 1.4 christos prefix
689 1.4 christos exec_prefix
690 1.4 christos PACKAGE_URL
691 1.4 christos PACKAGE_BUGREPORT
692 1.4 christos PACKAGE_STRING
693 1.4 christos PACKAGE_VERSION
694 1.4 christos PACKAGE_TARNAME
695 1.4 christos PACKAGE_NAME
696 1.1 christos PATH_SEPARATOR
697 1.4 christos SHELL'
698 1.1 christos ac_subst_files=''
699 1.4 christos ac_user_opts='
700 1.4 christos enable_option_checking
701 1.4 christos with_gcc
702 1.4 christos enable_universal
703 1.4 christos with_smi
704 1.4 christos enable_smb
705 1.4 christos with_user
706 1.4 christos with_chroot
707 1.5 christos with_sandbox_capsicum
708 1.11 christos enable_local_libpcap
709 1.4 christos with_crypto
710 1.6 christos with_cap_ng
711 1.4 christos '
712 1.1 christos ac_precious_vars='build_alias
713 1.1 christos host_alias
714 1.1 christos target_alias
715 1.1 christos CC
716 1.1 christos CFLAGS
717 1.1 christos LDFLAGS
718 1.1 christos LIBS
719 1.1 christos CPPFLAGS
720 1.1 christos CPP'
721 1.1 christos
722 1.1 christos
723 1.1 christos # Initialize some variables set by options.
724 1.1 christos ac_init_help=
725 1.1 christos ac_init_version=false
726 1.4 christos ac_unrecognized_opts=
727 1.4 christos ac_unrecognized_sep=
728 1.1 christos # The variables have the same names as the options, with
729 1.1 christos # dashes changed to underlines.
730 1.1 christos cache_file=/dev/null
731 1.1 christos exec_prefix=NONE
732 1.1 christos no_create=
733 1.1 christos no_recursion=
734 1.1 christos prefix=NONE
735 1.1 christos program_prefix=NONE
736 1.1 christos program_suffix=NONE
737 1.1 christos program_transform_name=s,x,x,
738 1.1 christos silent=
739 1.1 christos site=
740 1.1 christos srcdir=
741 1.1 christos verbose=
742 1.1 christos x_includes=NONE
743 1.1 christos x_libraries=NONE
744 1.1 christos
745 1.1 christos # Installation directory options.
746 1.1 christos # These are left unexpanded so users can "make install exec_prefix=/foo"
747 1.1 christos # and all the variables that are supposed to be based on exec_prefix
748 1.1 christos # by default will actually change.
749 1.1 christos # Use braces instead of parens because sh, perl, etc. also accept them.
750 1.1 christos # (The list follows the same order as the GNU Coding Standards.)
751 1.1 christos bindir='${exec_prefix}/bin'
752 1.1 christos sbindir='${exec_prefix}/sbin'
753 1.1 christos libexecdir='${exec_prefix}/libexec'
754 1.1 christos datarootdir='${prefix}/share'
755 1.1 christos datadir='${datarootdir}'
756 1.1 christos sysconfdir='${prefix}/etc'
757 1.1 christos sharedstatedir='${prefix}/com'
758 1.1 christos localstatedir='${prefix}/var'
759 1.1 christos includedir='${prefix}/include'
760 1.1 christos oldincludedir='/usr/include'
761 1.11 christos docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
762 1.1 christos infodir='${datarootdir}/info'
763 1.1 christos htmldir='${docdir}'
764 1.1 christos dvidir='${docdir}'
765 1.1 christos pdfdir='${docdir}'
766 1.1 christos psdir='${docdir}'
767 1.1 christos libdir='${exec_prefix}/lib'
768 1.1 christos localedir='${datarootdir}/locale'
769 1.1 christos mandir='${datarootdir}/man'
770 1.1 christos
771 1.1 christos ac_prev=
772 1.1 christos ac_dashdash=
773 1.1 christos for ac_option
774 1.1 christos do
775 1.1 christos # If the previous option needs an argument, assign it.
776 1.1 christos if test -n "$ac_prev"; then
777 1.1 christos eval $ac_prev=\$ac_option
778 1.1 christos ac_prev=
779 1.1 christos continue
780 1.1 christos fi
781 1.1 christos
782 1.1 christos case $ac_option in
783 1.4 christos *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
784 1.4 christos *=) ac_optarg= ;;
785 1.4 christos *) ac_optarg=yes ;;
786 1.1 christos esac
787 1.1 christos
788 1.1 christos # Accept the important Cygnus configure options, so we can diagnose typos.
789 1.1 christos
790 1.1 christos case $ac_dashdash$ac_option in
791 1.1 christos --)
792 1.1 christos ac_dashdash=yes ;;
793 1.1 christos
794 1.1 christos -bindir | --bindir | --bindi | --bind | --bin | --bi)
795 1.1 christos ac_prev=bindir ;;
796 1.1 christos -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
797 1.1 christos bindir=$ac_optarg ;;
798 1.1 christos
799 1.1 christos -build | --build | --buil | --bui | --bu)
800 1.1 christos ac_prev=build_alias ;;
801 1.1 christos -build=* | --build=* | --buil=* | --bui=* | --bu=*)
802 1.1 christos build_alias=$ac_optarg ;;
803 1.1 christos
804 1.1 christos -cache-file | --cache-file | --cache-fil | --cache-fi \
805 1.1 christos | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
806 1.1 christos ac_prev=cache_file ;;
807 1.1 christos -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
808 1.1 christos | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
809 1.1 christos cache_file=$ac_optarg ;;
810 1.1 christos
811 1.1 christos --config-cache | -C)
812 1.1 christos cache_file=config.cache ;;
813 1.1 christos
814 1.1 christos -datadir | --datadir | --datadi | --datad)
815 1.1 christos ac_prev=datadir ;;
816 1.1 christos -datadir=* | --datadir=* | --datadi=* | --datad=*)
817 1.1 christos datadir=$ac_optarg ;;
818 1.1 christos
819 1.1 christos -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
820 1.1 christos | --dataroo | --dataro | --datar)
821 1.1 christos ac_prev=datarootdir ;;
822 1.1 christos -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
823 1.1 christos | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
824 1.1 christos datarootdir=$ac_optarg ;;
825 1.1 christos
826 1.1 christos -disable-* | --disable-*)
827 1.4 christos ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
828 1.1 christos # Reject names that are not valid shell variable names.
829 1.4 christos expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
830 1.4 christos as_fn_error $? "invalid feature name: $ac_useropt"
831 1.4 christos ac_useropt_orig=$ac_useropt
832 1.4 christos ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
833 1.4 christos case $ac_user_opts in
834 1.4 christos *"
835 1.4 christos "enable_$ac_useropt"
836 1.4 christos "*) ;;
837 1.4 christos *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
838 1.4 christos ac_unrecognized_sep=', ';;
839 1.4 christos esac
840 1.4 christos eval enable_$ac_useropt=no ;;
841 1.1 christos
842 1.1 christos -docdir | --docdir | --docdi | --doc | --do)
843 1.1 christos ac_prev=docdir ;;
844 1.1 christos -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
845 1.1 christos docdir=$ac_optarg ;;
846 1.1 christos
847 1.1 christos -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
848 1.1 christos ac_prev=dvidir ;;
849 1.1 christos -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
850 1.1 christos dvidir=$ac_optarg ;;
851 1.1 christos
852 1.1 christos -enable-* | --enable-*)
853 1.4 christos ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
854 1.1 christos # Reject names that are not valid shell variable names.
855 1.4 christos expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
856 1.4 christos as_fn_error $? "invalid feature name: $ac_useropt"
857 1.4 christos ac_useropt_orig=$ac_useropt
858 1.4 christos ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
859 1.4 christos case $ac_user_opts in
860 1.4 christos *"
861 1.4 christos "enable_$ac_useropt"
862 1.4 christos "*) ;;
863 1.4 christos *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
864 1.4 christos ac_unrecognized_sep=', ';;
865 1.4 christos esac
866 1.4 christos eval enable_$ac_useropt=\$ac_optarg ;;
867 1.1 christos
868 1.1 christos -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
869 1.1 christos | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
870 1.1 christos | --exec | --exe | --ex)
871 1.1 christos ac_prev=exec_prefix ;;
872 1.1 christos -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
873 1.1 christos | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
874 1.1 christos | --exec=* | --exe=* | --ex=*)
875 1.1 christos exec_prefix=$ac_optarg ;;
876 1.1 christos
877 1.1 christos -gas | --gas | --ga | --g)
878 1.1 christos # Obsolete; use --with-gas.
879 1.1 christos with_gas=yes ;;
880 1.1 christos
881 1.1 christos -help | --help | --hel | --he | -h)
882 1.1 christos ac_init_help=long ;;
883 1.1 christos -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
884 1.1 christos ac_init_help=recursive ;;
885 1.1 christos -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
886 1.1 christos ac_init_help=short ;;
887 1.1 christos
888 1.1 christos -host | --host | --hos | --ho)
889 1.1 christos ac_prev=host_alias ;;
890 1.1 christos -host=* | --host=* | --hos=* | --ho=*)
891 1.1 christos host_alias=$ac_optarg ;;
892 1.1 christos
893 1.1 christos -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
894 1.1 christos ac_prev=htmldir ;;
895 1.1 christos -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
896 1.1 christos | --ht=*)
897 1.1 christos htmldir=$ac_optarg ;;
898 1.1 christos
899 1.1 christos -includedir | --includedir | --includedi | --included | --include \
900 1.1 christos | --includ | --inclu | --incl | --inc)
901 1.1 christos ac_prev=includedir ;;
902 1.1 christos -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
903 1.1 christos | --includ=* | --inclu=* | --incl=* | --inc=*)
904 1.1 christos includedir=$ac_optarg ;;
905 1.1 christos
906 1.1 christos -infodir | --infodir | --infodi | --infod | --info | --inf)
907 1.1 christos ac_prev=infodir ;;
908 1.1 christos -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
909 1.1 christos infodir=$ac_optarg ;;
910 1.1 christos
911 1.1 christos -libdir | --libdir | --libdi | --libd)
912 1.1 christos ac_prev=libdir ;;
913 1.1 christos -libdir=* | --libdir=* | --libdi=* | --libd=*)
914 1.1 christos libdir=$ac_optarg ;;
915 1.1 christos
916 1.1 christos -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
917 1.1 christos | --libexe | --libex | --libe)
918 1.1 christos ac_prev=libexecdir ;;
919 1.1 christos -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
920 1.1 christos | --libexe=* | --libex=* | --libe=*)
921 1.1 christos libexecdir=$ac_optarg ;;
922 1.1 christos
923 1.1 christos -localedir | --localedir | --localedi | --localed | --locale)
924 1.1 christos ac_prev=localedir ;;
925 1.1 christos -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
926 1.1 christos localedir=$ac_optarg ;;
927 1.1 christos
928 1.1 christos -localstatedir | --localstatedir | --localstatedi | --localstated \
929 1.1 christos | --localstate | --localstat | --localsta | --localst | --locals)
930 1.1 christos ac_prev=localstatedir ;;
931 1.1 christos -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
932 1.1 christos | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
933 1.1 christos localstatedir=$ac_optarg ;;
934 1.1 christos
935 1.1 christos -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
936 1.1 christos ac_prev=mandir ;;
937 1.1 christos -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
938 1.1 christos mandir=$ac_optarg ;;
939 1.1 christos
940 1.1 christos -nfp | --nfp | --nf)
941 1.1 christos # Obsolete; use --without-fp.
942 1.1 christos with_fp=no ;;
943 1.1 christos
944 1.1 christos -no-create | --no-create | --no-creat | --no-crea | --no-cre \
945 1.1 christos | --no-cr | --no-c | -n)
946 1.1 christos no_create=yes ;;
947 1.1 christos
948 1.1 christos -no-recursion | --no-recursion | --no-recursio | --no-recursi \
949 1.1 christos | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
950 1.1 christos no_recursion=yes ;;
951 1.1 christos
952 1.1 christos -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
953 1.1 christos | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
954 1.1 christos | --oldin | --oldi | --old | --ol | --o)
955 1.1 christos ac_prev=oldincludedir ;;
956 1.1 christos -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
957 1.1 christos | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
958 1.1 christos | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
959 1.1 christos oldincludedir=$ac_optarg ;;
960 1.1 christos
961 1.1 christos -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
962 1.1 christos ac_prev=prefix ;;
963 1.1 christos -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
964 1.1 christos prefix=$ac_optarg ;;
965 1.1 christos
966 1.1 christos -program-prefix | --program-prefix | --program-prefi | --program-pref \
967 1.1 christos | --program-pre | --program-pr | --program-p)
968 1.1 christos ac_prev=program_prefix ;;
969 1.1 christos -program-prefix=* | --program-prefix=* | --program-prefi=* \
970 1.1 christos | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
971 1.1 christos program_prefix=$ac_optarg ;;
972 1.1 christos
973 1.1 christos -program-suffix | --program-suffix | --program-suffi | --program-suff \
974 1.1 christos | --program-suf | --program-su | --program-s)
975 1.1 christos ac_prev=program_suffix ;;
976 1.1 christos -program-suffix=* | --program-suffix=* | --program-suffi=* \
977 1.1 christos | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
978 1.1 christos program_suffix=$ac_optarg ;;
979 1.1 christos
980 1.1 christos -program-transform-name | --program-transform-name \
981 1.1 christos | --program-transform-nam | --program-transform-na \
982 1.1 christos | --program-transform-n | --program-transform- \
983 1.1 christos | --program-transform | --program-transfor \
984 1.1 christos | --program-transfo | --program-transf \
985 1.1 christos | --program-trans | --program-tran \
986 1.1 christos | --progr-tra | --program-tr | --program-t)
987 1.1 christos ac_prev=program_transform_name ;;
988 1.1 christos -program-transform-name=* | --program-transform-name=* \
989 1.1 christos | --program-transform-nam=* | --program-transform-na=* \
990 1.1 christos | --program-transform-n=* | --program-transform-=* \
991 1.1 christos | --program-transform=* | --program-transfor=* \
992 1.1 christos | --program-transfo=* | --program-transf=* \
993 1.1 christos | --program-trans=* | --program-tran=* \
994 1.1 christos | --progr-tra=* | --program-tr=* | --program-t=*)
995 1.1 christos program_transform_name=$ac_optarg ;;
996 1.1 christos
997 1.1 christos -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
998 1.1 christos ac_prev=pdfdir ;;
999 1.1 christos -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1000 1.1 christos pdfdir=$ac_optarg ;;
1001 1.1 christos
1002 1.1 christos -psdir | --psdir | --psdi | --psd | --ps)
1003 1.1 christos ac_prev=psdir ;;
1004 1.1 christos -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1005 1.1 christos psdir=$ac_optarg ;;
1006 1.1 christos
1007 1.1 christos -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1008 1.1 christos | -silent | --silent | --silen | --sile | --sil)
1009 1.1 christos silent=yes ;;
1010 1.1 christos
1011 1.1 christos -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1012 1.1 christos ac_prev=sbindir ;;
1013 1.1 christos -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1014 1.1 christos | --sbi=* | --sb=*)
1015 1.1 christos sbindir=$ac_optarg ;;
1016 1.1 christos
1017 1.1 christos -sharedstatedir | --sharedstatedir | --sharedstatedi \
1018 1.1 christos | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1019 1.1 christos | --sharedst | --shareds | --shared | --share | --shar \
1020 1.1 christos | --sha | --sh)
1021 1.1 christos ac_prev=sharedstatedir ;;
1022 1.1 christos -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1023 1.1 christos | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1024 1.1 christos | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1025 1.1 christos | --sha=* | --sh=*)
1026 1.1 christos sharedstatedir=$ac_optarg ;;
1027 1.1 christos
1028 1.1 christos -site | --site | --sit)
1029 1.1 christos ac_prev=site ;;
1030 1.1 christos -site=* | --site=* | --sit=*)
1031 1.1 christos site=$ac_optarg ;;
1032 1.1 christos
1033 1.1 christos -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1034 1.1 christos ac_prev=srcdir ;;
1035 1.1 christos -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1036 1.1 christos srcdir=$ac_optarg ;;
1037 1.1 christos
1038 1.1 christos -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1039 1.1 christos | --syscon | --sysco | --sysc | --sys | --sy)
1040 1.1 christos ac_prev=sysconfdir ;;
1041 1.1 christos -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1042 1.1 christos | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1043 1.1 christos sysconfdir=$ac_optarg ;;
1044 1.1 christos
1045 1.1 christos -target | --target | --targe | --targ | --tar | --ta | --t)
1046 1.1 christos ac_prev=target_alias ;;
1047 1.1 christos -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1048 1.1 christos target_alias=$ac_optarg ;;
1049 1.1 christos
1050 1.1 christos -v | -verbose | --verbose | --verbos | --verbo | --verb)
1051 1.1 christos verbose=yes ;;
1052 1.1 christos
1053 1.1 christos -version | --version | --versio | --versi | --vers | -V)
1054 1.1 christos ac_init_version=: ;;
1055 1.1 christos
1056 1.1 christos -with-* | --with-*)
1057 1.4 christos ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1058 1.1 christos # Reject names that are not valid shell variable names.
1059 1.4 christos expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1060 1.4 christos as_fn_error $? "invalid package name: $ac_useropt"
1061 1.4 christos ac_useropt_orig=$ac_useropt
1062 1.4 christos ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1063 1.4 christos case $ac_user_opts in
1064 1.4 christos *"
1065 1.4 christos "with_$ac_useropt"
1066 1.4 christos "*) ;;
1067 1.4 christos *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1068 1.4 christos ac_unrecognized_sep=', ';;
1069 1.4 christos esac
1070 1.4 christos eval with_$ac_useropt=\$ac_optarg ;;
1071 1.1 christos
1072 1.1 christos -without-* | --without-*)
1073 1.4 christos ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1074 1.1 christos # Reject names that are not valid shell variable names.
1075 1.4 christos expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1076 1.4 christos as_fn_error $? "invalid package name: $ac_useropt"
1077 1.4 christos ac_useropt_orig=$ac_useropt
1078 1.4 christos ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1079 1.4 christos case $ac_user_opts in
1080 1.4 christos *"
1081 1.4 christos "with_$ac_useropt"
1082 1.4 christos "*) ;;
1083 1.4 christos *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1084 1.4 christos ac_unrecognized_sep=', ';;
1085 1.4 christos esac
1086 1.4 christos eval with_$ac_useropt=no ;;
1087 1.1 christos
1088 1.1 christos --x)
1089 1.1 christos # Obsolete; use --with-x.
1090 1.1 christos with_x=yes ;;
1091 1.1 christos
1092 1.1 christos -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1093 1.1 christos | --x-incl | --x-inc | --x-in | --x-i)
1094 1.1 christos ac_prev=x_includes ;;
1095 1.1 christos -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1096 1.1 christos | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1097 1.1 christos x_includes=$ac_optarg ;;
1098 1.1 christos
1099 1.1 christos -x-libraries | --x-libraries | --x-librarie | --x-librari \
1100 1.1 christos | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1101 1.1 christos ac_prev=x_libraries ;;
1102 1.1 christos -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1103 1.1 christos | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1104 1.1 christos x_libraries=$ac_optarg ;;
1105 1.1 christos
1106 1.4 christos -*) as_fn_error $? "unrecognized option: \`$ac_option'
1107 1.4 christos Try \`$0 --help' for more information"
1108 1.1 christos ;;
1109 1.1 christos
1110 1.1 christos *=*)
1111 1.1 christos ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1112 1.1 christos # Reject names that are not valid shell variable names.
1113 1.4 christos case $ac_envvar in #(
1114 1.4 christos '' | [0-9]* | *[!_$as_cr_alnum]* )
1115 1.4 christos as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1116 1.4 christos esac
1117 1.1 christos eval $ac_envvar=\$ac_optarg
1118 1.1 christos export $ac_envvar ;;
1119 1.1 christos
1120 1.1 christos *)
1121 1.1 christos # FIXME: should be removed in autoconf 3.0.
1122 1.4 christos $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1123 1.1 christos expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1124 1.4 christos $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1125 1.4 christos : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1126 1.1 christos ;;
1127 1.1 christos
1128 1.1 christos esac
1129 1.1 christos done
1130 1.1 christos
1131 1.1 christos if test -n "$ac_prev"; then
1132 1.1 christos ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1133 1.4 christos as_fn_error $? "missing argument to $ac_option"
1134 1.4 christos fi
1135 1.4 christos
1136 1.4 christos if test -n "$ac_unrecognized_opts"; then
1137 1.4 christos case $enable_option_checking in
1138 1.4 christos no) ;;
1139 1.4 christos fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1140 1.4 christos *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1141 1.4 christos esac
1142 1.1 christos fi
1143 1.1 christos
1144 1.4 christos # Check all directory arguments for consistency.
1145 1.1 christos for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1146 1.1 christos datadir sysconfdir sharedstatedir localstatedir includedir \
1147 1.1 christos oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1148 1.11 christos libdir localedir mandir
1149 1.1 christos do
1150 1.1 christos eval ac_val=\$$ac_var
1151 1.4 christos # Remove trailing slashes.
1152 1.4 christos case $ac_val in
1153 1.4 christos */ )
1154 1.4 christos ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1155 1.4 christos eval $ac_var=\$ac_val;;
1156 1.4 christos esac
1157 1.4 christos # Be sure to have absolute directory names.
1158 1.1 christos case $ac_val in
1159 1.1 christos [\\/$]* | ?:[\\/]* ) continue;;
1160 1.1 christos NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1161 1.1 christos esac
1162 1.4 christos as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1163 1.1 christos done
1164 1.1 christos
1165 1.1 christos # There might be people who depend on the old broken behavior: `$host'
1166 1.1 christos # used to hold the argument of --host etc.
1167 1.1 christos # FIXME: To remove some day.
1168 1.1 christos build=$build_alias
1169 1.1 christos host=$host_alias
1170 1.1 christos target=$target_alias
1171 1.1 christos
1172 1.1 christos # FIXME: To remove some day.
1173 1.1 christos if test "x$host_alias" != x; then
1174 1.1 christos if test "x$build_alias" = x; then
1175 1.1 christos cross_compiling=maybe
1176 1.1 christos elif test "x$build_alias" != "x$host_alias"; then
1177 1.1 christos cross_compiling=yes
1178 1.1 christos fi
1179 1.1 christos fi
1180 1.1 christos
1181 1.1 christos ac_tool_prefix=
1182 1.1 christos test -n "$host_alias" && ac_tool_prefix=$host_alias-
1183 1.1 christos
1184 1.1 christos test "$silent" = yes && exec 6>/dev/null
1185 1.1 christos
1186 1.1 christos
1187 1.1 christos ac_pwd=`pwd` && test -n "$ac_pwd" &&
1188 1.1 christos ac_ls_di=`ls -di .` &&
1189 1.1 christos ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1190 1.4 christos as_fn_error $? "working directory cannot be determined"
1191 1.1 christos test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1192 1.4 christos as_fn_error $? "pwd does not report name of working directory"
1193 1.1 christos
1194 1.1 christos
1195 1.1 christos # Find the source files, if location was not specified.
1196 1.1 christos if test -z "$srcdir"; then
1197 1.1 christos ac_srcdir_defaulted=yes
1198 1.1 christos # Try the directory containing this script, then the parent directory.
1199 1.4 christos ac_confdir=`$as_dirname -- "$as_myself" ||
1200 1.4 christos $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1201 1.4 christos X"$as_myself" : 'X\(//\)[^/]' \| \
1202 1.4 christos X"$as_myself" : 'X\(//\)$' \| \
1203 1.4 christos X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1204 1.4 christos $as_echo X"$as_myself" |
1205 1.1 christos sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1206 1.1 christos s//\1/
1207 1.1 christos q
1208 1.1 christos }
1209 1.1 christos /^X\(\/\/\)[^/].*/{
1210 1.1 christos s//\1/
1211 1.1 christos q
1212 1.1 christos }
1213 1.1 christos /^X\(\/\/\)$/{
1214 1.1 christos s//\1/
1215 1.1 christos q
1216 1.1 christos }
1217 1.1 christos /^X\(\/\).*/{
1218 1.1 christos s//\1/
1219 1.1 christos q
1220 1.1 christos }
1221 1.1 christos s/.*/./; q'`
1222 1.1 christos srcdir=$ac_confdir
1223 1.1 christos if test ! -r "$srcdir/$ac_unique_file"; then
1224 1.1 christos srcdir=..
1225 1.1 christos fi
1226 1.1 christos else
1227 1.1 christos ac_srcdir_defaulted=no
1228 1.1 christos fi
1229 1.1 christos if test ! -r "$srcdir/$ac_unique_file"; then
1230 1.1 christos test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1231 1.4 christos as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1232 1.1 christos fi
1233 1.1 christos ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1234 1.1 christos ac_abs_confdir=`(
1235 1.4 christos cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1236 1.1 christos pwd)`
1237 1.1 christos # When building in place, set srcdir=.
1238 1.1 christos if test "$ac_abs_confdir" = "$ac_pwd"; then
1239 1.1 christos srcdir=.
1240 1.1 christos fi
1241 1.1 christos # Remove unnecessary trailing slashes from srcdir.
1242 1.1 christos # Double slashes in file names in object file debugging info
1243 1.1 christos # mess up M-x gdb in Emacs.
1244 1.1 christos case $srcdir in
1245 1.1 christos */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1246 1.1 christos esac
1247 1.1 christos for ac_var in $ac_precious_vars; do
1248 1.1 christos eval ac_env_${ac_var}_set=\${${ac_var}+set}
1249 1.1 christos eval ac_env_${ac_var}_value=\$${ac_var}
1250 1.1 christos eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1251 1.1 christos eval ac_cv_env_${ac_var}_value=\$${ac_var}
1252 1.1 christos done
1253 1.1 christos
1254 1.1 christos #
1255 1.1 christos # Report the --help message.
1256 1.1 christos #
1257 1.1 christos if test "$ac_init_help" = "long"; then
1258 1.1 christos # Omit some internal or obsolete options to make the list less imposing.
1259 1.1 christos # This message is too long to be a string in the A/UX 3.1 sh.
1260 1.1 christos cat <<_ACEOF
1261 1.11 christos \`configure' configures tcpdump 4.99.4 to adapt to many kinds of systems.
1262 1.1 christos
1263 1.1 christos Usage: $0 [OPTION]... [VAR=VALUE]...
1264 1.1 christos
1265 1.1 christos To assign environment variables (e.g., CC, CFLAGS...), specify them as
1266 1.1 christos VAR=VALUE. See below for descriptions of some of the useful variables.
1267 1.1 christos
1268 1.1 christos Defaults for the options are specified in brackets.
1269 1.1 christos
1270 1.1 christos Configuration:
1271 1.1 christos -h, --help display this help and exit
1272 1.1 christos --help=short display options specific to this package
1273 1.1 christos --help=recursive display the short help of all the included packages
1274 1.1 christos -V, --version display version information and exit
1275 1.4 christos -q, --quiet, --silent do not print \`checking ...' messages
1276 1.1 christos --cache-file=FILE cache test results in FILE [disabled]
1277 1.1 christos -C, --config-cache alias for \`--cache-file=config.cache'
1278 1.1 christos -n, --no-create do not create output files
1279 1.1 christos --srcdir=DIR find the sources in DIR [configure dir or \`..']
1280 1.1 christos
1281 1.1 christos Installation directories:
1282 1.1 christos --prefix=PREFIX install architecture-independent files in PREFIX
1283 1.4 christos [$ac_default_prefix]
1284 1.1 christos --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1285 1.4 christos [PREFIX]
1286 1.1 christos
1287 1.1 christos By default, \`make install' will install all the files in
1288 1.1 christos \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1289 1.1 christos an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1290 1.1 christos for instance \`--prefix=\$HOME'.
1291 1.1 christos
1292 1.1 christos For better control, use the options below.
1293 1.1 christos
1294 1.1 christos Fine tuning of the installation directories:
1295 1.4 christos --bindir=DIR user executables [EPREFIX/bin]
1296 1.4 christos --sbindir=DIR system admin executables [EPREFIX/sbin]
1297 1.4 christos --libexecdir=DIR program executables [EPREFIX/libexec]
1298 1.4 christos --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1299 1.4 christos --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1300 1.4 christos --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1301 1.4 christos --libdir=DIR object code libraries [EPREFIX/lib]
1302 1.4 christos --includedir=DIR C header files [PREFIX/include]
1303 1.4 christos --oldincludedir=DIR C header files for non-gcc [/usr/include]
1304 1.4 christos --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1305 1.4 christos --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1306 1.4 christos --infodir=DIR info documentation [DATAROOTDIR/info]
1307 1.4 christos --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1308 1.4 christos --mandir=DIR man documentation [DATAROOTDIR/man]
1309 1.11 christos --docdir=DIR documentation root [DATAROOTDIR/doc/tcpdump]
1310 1.4 christos --htmldir=DIR html documentation [DOCDIR]
1311 1.4 christos --dvidir=DIR dvi documentation [DOCDIR]
1312 1.4 christos --pdfdir=DIR pdf documentation [DOCDIR]
1313 1.4 christos --psdir=DIR ps documentation [DOCDIR]
1314 1.1 christos _ACEOF
1315 1.1 christos
1316 1.1 christos cat <<\_ACEOF
1317 1.1 christos
1318 1.1 christos System types:
1319 1.1 christos --build=BUILD configure for building on BUILD [guessed]
1320 1.1 christos --host=HOST cross-compile to build programs to run on HOST [BUILD]
1321 1.1 christos _ACEOF
1322 1.1 christos fi
1323 1.1 christos
1324 1.1 christos if test -n "$ac_init_help"; then
1325 1.11 christos case $ac_init_help in
1326 1.11 christos short | recursive ) echo "Configuration of tcpdump 4.99.4:";;
1327 1.11 christos esac
1328 1.1 christos cat <<\_ACEOF
1329 1.1 christos
1330 1.1 christos Optional Features:
1331 1.4 christos --disable-option-checking ignore unrecognized --enable/--with options
1332 1.1 christos --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1333 1.1 christos --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1334 1.11 christos --disable-universal don't build universal on macOS
1335 1.11 christos --enable-smb enable possibly-buggy SMB printer [default=no]
1336 1.11 christos --disable-local-libpcap don't look for a local libpcap [default=check for a
1337 1.11 christos local libpcap]
1338 1.1 christos
1339 1.1 christos Optional Packages:
1340 1.1 christos --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1341 1.1 christos --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1342 1.1 christos --without-gcc don't use gcc
1343 1.11 christos --with-smi link with libsmi (allows to load MIBs on the fly to
1344 1.11 christos decode SNMP packets) [default=yes, if available]
1345 1.1 christos --with-user=USERNAME drop privileges by default to USERNAME
1346 1.1 christos --with-chroot=DIRECTORY when dropping privileges, chroot to DIRECTORY
1347 1.6 christos --with-sandbox-capsicum use Capsicum security functions [default=yes, if
1348 1.6 christos available]
1349 1.7 christos --with-crypto[=DIR] use OpenSSL/libressl libcrypto (located in directory
1350 1.7 christos DIR, if specified) [default=yes, if available]
1351 1.6 christos --with-cap-ng use libcap-ng [default=yes, if available]
1352 1.1 christos
1353 1.1 christos Some influential environment variables:
1354 1.1 christos CC C compiler command
1355 1.1 christos CFLAGS C compiler flags
1356 1.1 christos LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1357 1.1 christos nonstandard directory <lib dir>
1358 1.1 christos LIBS libraries to pass to the linker, e.g. -l<library>
1359 1.4 christos CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1360 1.1 christos you have headers in a nonstandard directory <include dir>
1361 1.1 christos CPP C preprocessor
1362 1.1 christos
1363 1.1 christos Use these variables to override the choices made by `configure' or to help
1364 1.1 christos it to find libraries and programs with nonstandard names/locations.
1365 1.1 christos
1366 1.4 christos Report bugs to the package provider.
1367 1.1 christos _ACEOF
1368 1.1 christos ac_status=$?
1369 1.1 christos fi
1370 1.1 christos
1371 1.1 christos if test "$ac_init_help" = "recursive"; then
1372 1.1 christos # If there are subdirs, report their specific --help.
1373 1.1 christos for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1374 1.4 christos test -d "$ac_dir" ||
1375 1.4 christos { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1376 1.4 christos continue
1377 1.1 christos ac_builddir=.
1378 1.1 christos
1379 1.1 christos case "$ac_dir" in
1380 1.1 christos .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1381 1.1 christos *)
1382 1.4 christos ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1383 1.1 christos # A ".." for each directory in $ac_dir_suffix.
1384 1.4 christos ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1385 1.1 christos case $ac_top_builddir_sub in
1386 1.1 christos "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1387 1.1 christos *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1388 1.1 christos esac ;;
1389 1.1 christos esac
1390 1.1 christos ac_abs_top_builddir=$ac_pwd
1391 1.1 christos ac_abs_builddir=$ac_pwd$ac_dir_suffix
1392 1.1 christos # for backward compatibility:
1393 1.1 christos ac_top_builddir=$ac_top_build_prefix
1394 1.1 christos
1395 1.1 christos case $srcdir in
1396 1.1 christos .) # We are building in place.
1397 1.1 christos ac_srcdir=.
1398 1.1 christos ac_top_srcdir=$ac_top_builddir_sub
1399 1.1 christos ac_abs_top_srcdir=$ac_pwd ;;
1400 1.1 christos [\\/]* | ?:[\\/]* ) # Absolute name.
1401 1.1 christos ac_srcdir=$srcdir$ac_dir_suffix;
1402 1.1 christos ac_top_srcdir=$srcdir
1403 1.1 christos ac_abs_top_srcdir=$srcdir ;;
1404 1.1 christos *) # Relative name.
1405 1.1 christos ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1406 1.1 christos ac_top_srcdir=$ac_top_build_prefix$srcdir
1407 1.1 christos ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1408 1.1 christos esac
1409 1.1 christos ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1410 1.1 christos
1411 1.1 christos cd "$ac_dir" || { ac_status=$?; continue; }
1412 1.1 christos # Check for guested configure.
1413 1.1 christos if test -f "$ac_srcdir/configure.gnu"; then
1414 1.1 christos echo &&
1415 1.1 christos $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1416 1.1 christos elif test -f "$ac_srcdir/configure"; then
1417 1.1 christos echo &&
1418 1.1 christos $SHELL "$ac_srcdir/configure" --help=recursive
1419 1.1 christos else
1420 1.4 christos $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1421 1.1 christos fi || ac_status=$?
1422 1.1 christos cd "$ac_pwd" || { ac_status=$?; break; }
1423 1.1 christos done
1424 1.1 christos fi
1425 1.1 christos
1426 1.1 christos test -n "$ac_init_help" && exit $ac_status
1427 1.1 christos if $ac_init_version; then
1428 1.1 christos cat <<\_ACEOF
1429 1.11 christos tcpdump configure 4.99.4
1430 1.4 christos generated by GNU Autoconf 2.69
1431 1.1 christos
1432 1.4 christos Copyright (C) 2012 Free Software Foundation, Inc.
1433 1.1 christos This configure script is free software; the Free Software Foundation
1434 1.1 christos gives unlimited permission to copy, distribute and modify it.
1435 1.1 christos _ACEOF
1436 1.1 christos exit
1437 1.1 christos fi
1438 1.1 christos
1439 1.4 christos ## ------------------------ ##
1440 1.4 christos ## Autoconf initialization. ##
1441 1.4 christos ## ------------------------ ##
1442 1.4 christos
1443 1.4 christos # ac_fn_c_try_compile LINENO
1444 1.4 christos # --------------------------
1445 1.4 christos # Try to compile conftest.$ac_ext, and return whether this succeeded.
1446 1.4 christos ac_fn_c_try_compile ()
1447 1.1 christos {
1448 1.4 christos as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1449 1.4 christos rm -f conftest.$ac_objext
1450 1.4 christos if { { ac_try="$ac_compile"
1451 1.4 christos case "(($ac_try" in
1452 1.4 christos *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1453 1.4 christos *) ac_try_echo=$ac_try;;
1454 1.4 christos esac
1455 1.4 christos eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1456 1.4 christos $as_echo "$ac_try_echo"; } >&5
1457 1.4 christos (eval "$ac_compile") 2>conftest.err
1458 1.4 christos ac_status=$?
1459 1.4 christos if test -s conftest.err; then
1460 1.4 christos grep -v '^ *+' conftest.err >conftest.er1
1461 1.4 christos cat conftest.er1 >&5
1462 1.4 christos mv -f conftest.er1 conftest.err
1463 1.4 christos fi
1464 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1465 1.4 christos test $ac_status = 0; } && {
1466 1.4 christos test -z "$ac_c_werror_flag" ||
1467 1.4 christos test ! -s conftest.err
1468 1.4 christos } && test -s conftest.$ac_objext; then :
1469 1.4 christos ac_retval=0
1470 1.4 christos else
1471 1.4 christos $as_echo "$as_me: failed program was:" >&5
1472 1.4 christos sed 's/^/| /' conftest.$ac_ext >&5
1473 1.1 christos
1474 1.4 christos ac_retval=1
1475 1.4 christos fi
1476 1.4 christos eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1477 1.4 christos as_fn_set_status $ac_retval
1478 1.1 christos
1479 1.4 christos } # ac_fn_c_try_compile
1480 1.1 christos
1481 1.4 christos # ac_fn_c_try_cpp LINENO
1482 1.4 christos # ----------------------
1483 1.4 christos # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1484 1.4 christos ac_fn_c_try_cpp ()
1485 1.4 christos {
1486 1.4 christos as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1487 1.4 christos if { { ac_try="$ac_cpp conftest.$ac_ext"
1488 1.4 christos case "(($ac_try" in
1489 1.4 christos *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1490 1.4 christos *) ac_try_echo=$ac_try;;
1491 1.4 christos esac
1492 1.4 christos eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1493 1.4 christos $as_echo "$ac_try_echo"; } >&5
1494 1.4 christos (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1495 1.4 christos ac_status=$?
1496 1.4 christos if test -s conftest.err; then
1497 1.4 christos grep -v '^ *+' conftest.err >conftest.er1
1498 1.4 christos cat conftest.er1 >&5
1499 1.4 christos mv -f conftest.er1 conftest.err
1500 1.4 christos fi
1501 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1502 1.4 christos test $ac_status = 0; } > conftest.i && {
1503 1.4 christos test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1504 1.4 christos test ! -s conftest.err
1505 1.4 christos }; then :
1506 1.4 christos ac_retval=0
1507 1.4 christos else
1508 1.4 christos $as_echo "$as_me: failed program was:" >&5
1509 1.4 christos sed 's/^/| /' conftest.$ac_ext >&5
1510 1.1 christos
1511 1.4 christos ac_retval=1
1512 1.4 christos fi
1513 1.4 christos eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1514 1.4 christos as_fn_set_status $ac_retval
1515 1.1 christos
1516 1.4 christos } # ac_fn_c_try_cpp
1517 1.1 christos
1518 1.4 christos # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1519 1.4 christos # -------------------------------------------------------
1520 1.4 christos # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1521 1.4 christos # the include files in INCLUDES and setting the cache variable VAR
1522 1.4 christos # accordingly.
1523 1.4 christos ac_fn_c_check_header_mongrel ()
1524 1.4 christos {
1525 1.4 christos as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1526 1.4 christos if eval \${$3+:} false; then :
1527 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1528 1.4 christos $as_echo_n "checking for $2... " >&6; }
1529 1.4 christos if eval \${$3+:} false; then :
1530 1.4 christos $as_echo_n "(cached) " >&6
1531 1.4 christos fi
1532 1.4 christos eval ac_res=\$$3
1533 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1534 1.4 christos $as_echo "$ac_res" >&6; }
1535 1.4 christos else
1536 1.4 christos # Is the header compilable?
1537 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1538 1.4 christos $as_echo_n "checking $2 usability... " >&6; }
1539 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1540 1.4 christos /* end confdefs.h. */
1541 1.4 christos $4
1542 1.4 christos #include <$2>
1543 1.4 christos _ACEOF
1544 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
1545 1.4 christos ac_header_compiler=yes
1546 1.4 christos else
1547 1.4 christos ac_header_compiler=no
1548 1.4 christos fi
1549 1.4 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1550 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1551 1.4 christos $as_echo "$ac_header_compiler" >&6; }
1552 1.1 christos
1553 1.4 christos # Is the header present?
1554 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1555 1.4 christos $as_echo_n "checking $2 presence... " >&6; }
1556 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1557 1.4 christos /* end confdefs.h. */
1558 1.4 christos #include <$2>
1559 1.4 christos _ACEOF
1560 1.4 christos if ac_fn_c_try_cpp "$LINENO"; then :
1561 1.4 christos ac_header_preproc=yes
1562 1.4 christos else
1563 1.4 christos ac_header_preproc=no
1564 1.4 christos fi
1565 1.4 christos rm -f conftest.err conftest.i conftest.$ac_ext
1566 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1567 1.4 christos $as_echo "$ac_header_preproc" >&6; }
1568 1.4 christos
1569 1.4 christos # So? What about this header?
1570 1.4 christos case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1571 1.4 christos yes:no: )
1572 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1573 1.4 christos $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1574 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1575 1.4 christos $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1576 1.4 christos ;;
1577 1.4 christos no:yes:* )
1578 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1579 1.4 christos $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1580 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1581 1.4 christos $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1582 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1583 1.4 christos $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1584 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1585 1.4 christos $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1586 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1587 1.4 christos $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1588 1.4 christos ;;
1589 1.4 christos esac
1590 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1591 1.4 christos $as_echo_n "checking for $2... " >&6; }
1592 1.4 christos if eval \${$3+:} false; then :
1593 1.4 christos $as_echo_n "(cached) " >&6
1594 1.4 christos else
1595 1.4 christos eval "$3=\$ac_header_compiler"
1596 1.4 christos fi
1597 1.4 christos eval ac_res=\$$3
1598 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1599 1.4 christos $as_echo "$ac_res" >&6; }
1600 1.4 christos fi
1601 1.4 christos eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1602 1.4 christos
1603 1.4 christos } # ac_fn_c_check_header_mongrel
1604 1.4 christos
1605 1.4 christos # ac_fn_c_try_run LINENO
1606 1.4 christos # ----------------------
1607 1.4 christos # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1608 1.4 christos # that executables *can* be run.
1609 1.4 christos ac_fn_c_try_run ()
1610 1.4 christos {
1611 1.4 christos as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1612 1.4 christos if { { ac_try="$ac_link"
1613 1.4 christos case "(($ac_try" in
1614 1.4 christos *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1615 1.4 christos *) ac_try_echo=$ac_try;;
1616 1.4 christos esac
1617 1.4 christos eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1618 1.4 christos $as_echo "$ac_try_echo"; } >&5
1619 1.4 christos (eval "$ac_link") 2>&5
1620 1.4 christos ac_status=$?
1621 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1622 1.4 christos test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1623 1.4 christos { { case "(($ac_try" in
1624 1.4 christos *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1625 1.4 christos *) ac_try_echo=$ac_try;;
1626 1.4 christos esac
1627 1.4 christos eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1628 1.4 christos $as_echo "$ac_try_echo"; } >&5
1629 1.4 christos (eval "$ac_try") 2>&5
1630 1.4 christos ac_status=$?
1631 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1632 1.4 christos test $ac_status = 0; }; }; then :
1633 1.4 christos ac_retval=0
1634 1.4 christos else
1635 1.4 christos $as_echo "$as_me: program exited with status $ac_status" >&5
1636 1.4 christos $as_echo "$as_me: failed program was:" >&5
1637 1.4 christos sed 's/^/| /' conftest.$ac_ext >&5
1638 1.4 christos
1639 1.4 christos ac_retval=$ac_status
1640 1.4 christos fi
1641 1.4 christos rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1642 1.4 christos eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1643 1.4 christos as_fn_set_status $ac_retval
1644 1.4 christos
1645 1.4 christos } # ac_fn_c_try_run
1646 1.4 christos
1647 1.4 christos # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1648 1.4 christos # -------------------------------------------------------
1649 1.4 christos # Tests whether HEADER exists and can be compiled using the include files in
1650 1.4 christos # INCLUDES, setting the cache variable VAR accordingly.
1651 1.4 christos ac_fn_c_check_header_compile ()
1652 1.4 christos {
1653 1.4 christos as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1654 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1655 1.4 christos $as_echo_n "checking for $2... " >&6; }
1656 1.4 christos if eval \${$3+:} false; then :
1657 1.4 christos $as_echo_n "(cached) " >&6
1658 1.4 christos else
1659 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1660 1.4 christos /* end confdefs.h. */
1661 1.4 christos $4
1662 1.4 christos #include <$2>
1663 1.4 christos _ACEOF
1664 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
1665 1.4 christos eval "$3=yes"
1666 1.4 christos else
1667 1.4 christos eval "$3=no"
1668 1.4 christos fi
1669 1.4 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1670 1.4 christos fi
1671 1.4 christos eval ac_res=\$$3
1672 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1673 1.4 christos $as_echo "$ac_res" >&6; }
1674 1.4 christos eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1675 1.4 christos
1676 1.4 christos } # ac_fn_c_check_header_compile
1677 1.4 christos
1678 1.4 christos # ac_fn_c_try_link LINENO
1679 1.4 christos # -----------------------
1680 1.4 christos # Try to link conftest.$ac_ext, and return whether this succeeded.
1681 1.4 christos ac_fn_c_try_link ()
1682 1.4 christos {
1683 1.4 christos as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1684 1.4 christos rm -f conftest.$ac_objext conftest$ac_exeext
1685 1.4 christos if { { ac_try="$ac_link"
1686 1.4 christos case "(($ac_try" in
1687 1.4 christos *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1688 1.4 christos *) ac_try_echo=$ac_try;;
1689 1.4 christos esac
1690 1.4 christos eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1691 1.4 christos $as_echo "$ac_try_echo"; } >&5
1692 1.4 christos (eval "$ac_link") 2>conftest.err
1693 1.4 christos ac_status=$?
1694 1.4 christos if test -s conftest.err; then
1695 1.4 christos grep -v '^ *+' conftest.err >conftest.er1
1696 1.4 christos cat conftest.er1 >&5
1697 1.4 christos mv -f conftest.er1 conftest.err
1698 1.4 christos fi
1699 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1700 1.4 christos test $ac_status = 0; } && {
1701 1.4 christos test -z "$ac_c_werror_flag" ||
1702 1.4 christos test ! -s conftest.err
1703 1.4 christos } && test -s conftest$ac_exeext && {
1704 1.4 christos test "$cross_compiling" = yes ||
1705 1.4 christos test -x conftest$ac_exeext
1706 1.4 christos }; then :
1707 1.4 christos ac_retval=0
1708 1.4 christos else
1709 1.4 christos $as_echo "$as_me: failed program was:" >&5
1710 1.4 christos sed 's/^/| /' conftest.$ac_ext >&5
1711 1.4 christos
1712 1.4 christos ac_retval=1
1713 1.4 christos fi
1714 1.4 christos # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1715 1.4 christos # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1716 1.4 christos # interfere with the next link command; also delete a directory that is
1717 1.4 christos # left behind by Apple's compiler. We do this before executing the actions.
1718 1.4 christos rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1719 1.4 christos eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1720 1.4 christos as_fn_set_status $ac_retval
1721 1.4 christos
1722 1.4 christos } # ac_fn_c_try_link
1723 1.4 christos
1724 1.4 christos # ac_fn_c_check_func LINENO FUNC VAR
1725 1.4 christos # ----------------------------------
1726 1.4 christos # Tests whether FUNC exists, setting the cache variable VAR accordingly
1727 1.4 christos ac_fn_c_check_func ()
1728 1.4 christos {
1729 1.4 christos as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1730 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1731 1.4 christos $as_echo_n "checking for $2... " >&6; }
1732 1.4 christos if eval \${$3+:} false; then :
1733 1.4 christos $as_echo_n "(cached) " >&6
1734 1.4 christos else
1735 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1736 1.4 christos /* end confdefs.h. */
1737 1.4 christos /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1738 1.4 christos For example, HP-UX 11i <limits.h> declares gettimeofday. */
1739 1.4 christos #define $2 innocuous_$2
1740 1.4 christos
1741 1.4 christos /* System header to define __stub macros and hopefully few prototypes,
1742 1.4 christos which can conflict with char $2 (); below.
1743 1.4 christos Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1744 1.4 christos <limits.h> exists even on freestanding compilers. */
1745 1.4 christos
1746 1.4 christos #ifdef __STDC__
1747 1.4 christos # include <limits.h>
1748 1.4 christos #else
1749 1.4 christos # include <assert.h>
1750 1.4 christos #endif
1751 1.4 christos
1752 1.4 christos #undef $2
1753 1.4 christos
1754 1.4 christos /* Override any GCC internal prototype to avoid an error.
1755 1.4 christos Use char because int might match the return type of a GCC
1756 1.4 christos builtin and then its argument prototype would still apply. */
1757 1.4 christos #ifdef __cplusplus
1758 1.4 christos extern "C"
1759 1.4 christos #endif
1760 1.4 christos char $2 ();
1761 1.4 christos /* The GNU C library defines this for functions which it implements
1762 1.4 christos to always fail with ENOSYS. Some functions are actually named
1763 1.4 christos something starting with __ and the normal name is an alias. */
1764 1.4 christos #if defined __stub_$2 || defined __stub___$2
1765 1.4 christos choke me
1766 1.4 christos #endif
1767 1.4 christos
1768 1.4 christos int
1769 1.4 christos main ()
1770 1.4 christos {
1771 1.4 christos return $2 ();
1772 1.4 christos ;
1773 1.4 christos return 0;
1774 1.4 christos }
1775 1.4 christos _ACEOF
1776 1.4 christos if ac_fn_c_try_link "$LINENO"; then :
1777 1.4 christos eval "$3=yes"
1778 1.4 christos else
1779 1.4 christos eval "$3=no"
1780 1.4 christos fi
1781 1.4 christos rm -f core conftest.err conftest.$ac_objext \
1782 1.4 christos conftest$ac_exeext conftest.$ac_ext
1783 1.4 christos fi
1784 1.4 christos eval ac_res=\$$3
1785 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1786 1.4 christos $as_echo "$ac_res" >&6; }
1787 1.4 christos eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1788 1.4 christos
1789 1.4 christos } # ac_fn_c_check_func
1790 1.4 christos
1791 1.11 christos # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1792 1.11 christos # --------------------------------------------
1793 1.11 christos # Tries to find the compile-time value of EXPR in a program that includes
1794 1.11 christos # INCLUDES, setting VAR accordingly. Returns whether the value could be
1795 1.11 christos # computed
1796 1.11 christos ac_fn_c_compute_int ()
1797 1.4 christos {
1798 1.4 christos as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1799 1.11 christos if test "$cross_compiling" = yes; then
1800 1.11 christos # Depending upon the size, compute the lo and hi bounds.
1801 1.11 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1802 1.11 christos /* end confdefs.h. */
1803 1.11 christos $4
1804 1.11 christos int
1805 1.11 christos main ()
1806 1.11 christos {
1807 1.11 christos static int test_array [1 - 2 * !(($2) >= 0)];
1808 1.11 christos test_array [0] = 0;
1809 1.11 christos return test_array [0];
1810 1.11 christos
1811 1.11 christos ;
1812 1.11 christos return 0;
1813 1.11 christos }
1814 1.11 christos _ACEOF
1815 1.11 christos if ac_fn_c_try_compile "$LINENO"; then :
1816 1.11 christos ac_lo=0 ac_mid=0
1817 1.11 christos while :; do
1818 1.11 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1819 1.4 christos /* end confdefs.h. */
1820 1.4 christos $4
1821 1.4 christos int
1822 1.4 christos main ()
1823 1.4 christos {
1824 1.11 christos static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1825 1.11 christos test_array [0] = 0;
1826 1.11 christos return test_array [0];
1827 1.4 christos
1828 1.4 christos ;
1829 1.4 christos return 0;
1830 1.4 christos }
1831 1.4 christos _ACEOF
1832 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
1833 1.11 christos ac_hi=$ac_mid; break
1834 1.4 christos else
1835 1.11 christos as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1836 1.11 christos if test $ac_lo -le $ac_mid; then
1837 1.11 christos ac_lo= ac_hi=
1838 1.11 christos break
1839 1.11 christos fi
1840 1.11 christos as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
1841 1.4 christos fi
1842 1.4 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1843 1.11 christos done
1844 1.4 christos else
1845 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1846 1.4 christos /* end confdefs.h. */
1847 1.4 christos $4
1848 1.4 christos int
1849 1.4 christos main ()
1850 1.4 christos {
1851 1.11 christos static int test_array [1 - 2 * !(($2) < 0)];
1852 1.11 christos test_array [0] = 0;
1853 1.11 christos return test_array [0];
1854 1.11 christos
1855 1.4 christos ;
1856 1.4 christos return 0;
1857 1.4 christos }
1858 1.4 christos _ACEOF
1859 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
1860 1.11 christos ac_hi=-1 ac_mid=-1
1861 1.11 christos while :; do
1862 1.11 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1863 1.4 christos /* end confdefs.h. */
1864 1.4 christos $4
1865 1.4 christos int
1866 1.4 christos main ()
1867 1.4 christos {
1868 1.11 christos static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1869 1.11 christos test_array [0] = 0;
1870 1.11 christos return test_array [0];
1871 1.11 christos
1872 1.4 christos ;
1873 1.4 christos return 0;
1874 1.4 christos }
1875 1.4 christos _ACEOF
1876 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
1877 1.11 christos ac_lo=$ac_mid; break
1878 1.4 christos else
1879 1.11 christos as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1880 1.11 christos if test $ac_mid -le $ac_hi; then
1881 1.11 christos ac_lo= ac_hi=
1882 1.11 christos break
1883 1.11 christos fi
1884 1.11 christos as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1885 1.4 christos fi
1886 1.4 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1887 1.11 christos done
1888 1.11 christos else
1889 1.11 christos ac_lo= ac_hi=
1890 1.4 christos fi
1891 1.4 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1892 1.4 christos fi
1893 1.11 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1894 1.11 christos # Binary search between lo and hi bounds.
1895 1.11 christos while test "x$ac_lo" != "x$ac_hi"; do
1896 1.11 christos as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1897 1.11 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1898 1.4 christos /* end confdefs.h. */
1899 1.11 christos $4
1900 1.4 christos int
1901 1.4 christos main ()
1902 1.4 christos {
1903 1.11 christos static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1904 1.4 christos test_array [0] = 0;
1905 1.4 christos return test_array [0];
1906 1.4 christos
1907 1.4 christos ;
1908 1.4 christos return 0;
1909 1.4 christos }
1910 1.4 christos _ACEOF
1911 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
1912 1.11 christos ac_hi=$ac_mid
1913 1.11 christos else
1914 1.11 christos as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
1915 1.11 christos fi
1916 1.11 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1917 1.11 christos done
1918 1.11 christos case $ac_lo in #((
1919 1.11 christos ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
1920 1.11 christos '') ac_retval=1 ;;
1921 1.11 christos esac
1922 1.11 christos else
1923 1.11 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1924 1.11 christos /* end confdefs.h. */
1925 1.11 christos $4
1926 1.11 christos static long int longval () { return $2; }
1927 1.11 christos static unsigned long int ulongval () { return $2; }
1928 1.11 christos #include <stdio.h>
1929 1.11 christos #include <stdlib.h>
1930 1.11 christos int
1931 1.11 christos main ()
1932 1.11 christos {
1933 1.11 christos
1934 1.11 christos FILE *f = fopen ("conftest.val", "w");
1935 1.11 christos if (! f)
1936 1.11 christos return 1;
1937 1.11 christos if (($2) < 0)
1938 1.11 christos {
1939 1.11 christos long int i = longval ();
1940 1.11 christos if (i != ($2))
1941 1.11 christos return 1;
1942 1.11 christos fprintf (f, "%ld", i);
1943 1.11 christos }
1944 1.11 christos else
1945 1.11 christos {
1946 1.11 christos unsigned long int i = ulongval ();
1947 1.11 christos if (i != ($2))
1948 1.11 christos return 1;
1949 1.11 christos fprintf (f, "%lu", i);
1950 1.11 christos }
1951 1.11 christos /* Do not output a trailing newline, as this causes \r\n confusion
1952 1.11 christos on some platforms. */
1953 1.11 christos return ferror (f) || fclose (f) != 0;
1954 1.11 christos
1955 1.11 christos ;
1956 1.11 christos return 0;
1957 1.11 christos }
1958 1.11 christos _ACEOF
1959 1.11 christos if ac_fn_c_try_run "$LINENO"; then :
1960 1.11 christos echo >>conftest.val; read $3 <conftest.val; ac_retval=0
1961 1.11 christos else
1962 1.11 christos ac_retval=1
1963 1.11 christos fi
1964 1.11 christos rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1965 1.11 christos conftest.$ac_objext conftest.beam conftest.$ac_ext
1966 1.11 christos rm -f conftest.val
1967 1.11 christos
1968 1.11 christos fi
1969 1.11 christos eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1970 1.11 christos as_fn_set_status $ac_retval
1971 1.11 christos
1972 1.11 christos } # ac_fn_c_compute_int
1973 1.11 christos
1974 1.11 christos # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1975 1.11 christos # ---------------------------------------------
1976 1.11 christos # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1977 1.11 christos # accordingly.
1978 1.11 christos ac_fn_c_check_decl ()
1979 1.11 christos {
1980 1.11 christos as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1981 1.11 christos as_decl_name=`echo $2|sed 's/ *(.*//'`
1982 1.11 christos as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1983 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1984 1.11 christos $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1985 1.11 christos if eval \${$3+:} false; then :
1986 1.11 christos $as_echo_n "(cached) " >&6
1987 1.11 christos else
1988 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1989 1.4 christos /* end confdefs.h. */
1990 1.11 christos $4
1991 1.4 christos int
1992 1.4 christos main ()
1993 1.4 christos {
1994 1.11 christos #ifndef $as_decl_name
1995 1.11 christos #ifdef __cplusplus
1996 1.11 christos (void) $as_decl_use;
1997 1.11 christos #else
1998 1.11 christos (void) $as_decl_name;
1999 1.11 christos #endif
2000 1.11 christos #endif
2001 1.4 christos
2002 1.4 christos ;
2003 1.4 christos return 0;
2004 1.4 christos }
2005 1.4 christos _ACEOF
2006 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
2007 1.11 christos eval "$3=yes"
2008 1.4 christos else
2009 1.11 christos eval "$3=no"
2010 1.4 christos fi
2011 1.4 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2012 1.4 christos fi
2013 1.4 christos eval ac_res=\$$3
2014 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2015 1.4 christos $as_echo "$ac_res" >&6; }
2016 1.4 christos eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2017 1.4 christos
2018 1.11 christos } # ac_fn_c_check_decl
2019 1.4 christos
2020 1.11 christos # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2021 1.11 christos # -------------------------------------------
2022 1.11 christos # Tests whether TYPE exists after having included INCLUDES, setting cache
2023 1.11 christos # variable VAR accordingly.
2024 1.11 christos ac_fn_c_check_type ()
2025 1.4 christos {
2026 1.4 christos as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2027 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2028 1.11 christos $as_echo_n "checking for $2... " >&6; }
2029 1.4 christos if eval \${$3+:} false; then :
2030 1.4 christos $as_echo_n "(cached) " >&6
2031 1.4 christos else
2032 1.4 christos eval "$3=no"
2033 1.11 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2034 1.11 christos /* end confdefs.h. */
2035 1.11 christos $4
2036 1.11 christos int
2037 1.11 christos main ()
2038 1.11 christos {
2039 1.11 christos if (sizeof ($2))
2040 1.11 christos return 0;
2041 1.11 christos ;
2042 1.11 christos return 0;
2043 1.11 christos }
2044 1.11 christos _ACEOF
2045 1.11 christos if ac_fn_c_try_compile "$LINENO"; then :
2046 1.11 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047 1.4 christos /* end confdefs.h. */
2048 1.11 christos $4
2049 1.4 christos int
2050 1.4 christos main ()
2051 1.4 christos {
2052 1.11 christos if (sizeof (($2)))
2053 1.11 christos return 0;
2054 1.4 christos ;
2055 1.4 christos return 0;
2056 1.4 christos }
2057 1.4 christos _ACEOF
2058 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
2059 1.11 christos
2060 1.11 christos else
2061 1.11 christos eval "$3=yes"
2062 1.4 christos fi
2063 1.4 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2064 1.4 christos fi
2065 1.11 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2066 1.4 christos fi
2067 1.4 christos eval ac_res=\$$3
2068 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2069 1.4 christos $as_echo "$ac_res" >&6; }
2070 1.4 christos eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2071 1.4 christos
2072 1.11 christos } # ac_fn_c_check_type
2073 1.4 christos cat >config.log <<_ACEOF
2074 1.4 christos This file contains any messages produced by compilers while
2075 1.4 christos running configure, to aid debugging if configure makes a mistake.
2076 1.4 christos
2077 1.11 christos It was created by tcpdump $as_me 4.99.4, which was
2078 1.4 christos generated by GNU Autoconf 2.69. Invocation command line was
2079 1.4 christos
2080 1.4 christos $ $0 $@
2081 1.4 christos
2082 1.4 christos _ACEOF
2083 1.4 christos exec 5>>config.log
2084 1.4 christos {
2085 1.4 christos cat <<_ASUNAME
2086 1.4 christos ## --------- ##
2087 1.4 christos ## Platform. ##
2088 1.4 christos ## --------- ##
2089 1.4 christos
2090 1.4 christos hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2091 1.4 christos uname -m = `(uname -m) 2>/dev/null || echo unknown`
2092 1.4 christos uname -r = `(uname -r) 2>/dev/null || echo unknown`
2093 1.4 christos uname -s = `(uname -s) 2>/dev/null || echo unknown`
2094 1.4 christos uname -v = `(uname -v) 2>/dev/null || echo unknown`
2095 1.4 christos
2096 1.4 christos /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2097 1.4 christos /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2098 1.4 christos
2099 1.4 christos /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2100 1.4 christos /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2101 1.4 christos /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2102 1.4 christos /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2103 1.4 christos /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2104 1.4 christos /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2105 1.4 christos /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2106 1.4 christos
2107 1.4 christos _ASUNAME
2108 1.4 christos
2109 1.4 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2110 1.4 christos for as_dir in $PATH
2111 1.4 christos do
2112 1.4 christos IFS=$as_save_IFS
2113 1.4 christos test -z "$as_dir" && as_dir=.
2114 1.4 christos $as_echo "PATH: $as_dir"
2115 1.4 christos done
2116 1.4 christos IFS=$as_save_IFS
2117 1.4 christos
2118 1.4 christos } >&5
2119 1.4 christos
2120 1.4 christos cat >&5 <<_ACEOF
2121 1.1 christos
2122 1.1 christos
2123 1.1 christos ## ----------- ##
2124 1.1 christos ## Core tests. ##
2125 1.1 christos ## ----------- ##
2126 1.1 christos
2127 1.1 christos _ACEOF
2128 1.1 christos
2129 1.1 christos
2130 1.1 christos # Keep a trace of the command line.
2131 1.1 christos # Strip out --no-create and --no-recursion so they do not pile up.
2132 1.1 christos # Strip out --silent because we don't want to record it for future runs.
2133 1.1 christos # Also quote any args containing shell meta-characters.
2134 1.1 christos # Make two passes to allow for proper duplicate-argument suppression.
2135 1.1 christos ac_configure_args=
2136 1.1 christos ac_configure_args0=
2137 1.1 christos ac_configure_args1=
2138 1.1 christos ac_must_keep_next=false
2139 1.1 christos for ac_pass in 1 2
2140 1.1 christos do
2141 1.1 christos for ac_arg
2142 1.1 christos do
2143 1.1 christos case $ac_arg in
2144 1.1 christos -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2145 1.1 christos -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2146 1.1 christos | -silent | --silent | --silen | --sile | --sil)
2147 1.1 christos continue ;;
2148 1.1 christos *\'*)
2149 1.4 christos ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2150 1.1 christos esac
2151 1.1 christos case $ac_pass in
2152 1.4 christos 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2153 1.1 christos 2)
2154 1.4 christos as_fn_append ac_configure_args1 " '$ac_arg'"
2155 1.1 christos if test $ac_must_keep_next = true; then
2156 1.1 christos ac_must_keep_next=false # Got value, back to normal.
2157 1.1 christos else
2158 1.1 christos case $ac_arg in
2159 1.1 christos *=* | --config-cache | -C | -disable-* | --disable-* \
2160 1.1 christos | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2161 1.1 christos | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2162 1.1 christos | -with-* | --with-* | -without-* | --without-* | --x)
2163 1.1 christos case "$ac_configure_args0 " in
2164 1.1 christos "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2165 1.1 christos esac
2166 1.1 christos ;;
2167 1.1 christos -* ) ac_must_keep_next=true ;;
2168 1.1 christos esac
2169 1.1 christos fi
2170 1.4 christos as_fn_append ac_configure_args " '$ac_arg'"
2171 1.1 christos ;;
2172 1.1 christos esac
2173 1.1 christos done
2174 1.1 christos done
2175 1.4 christos { ac_configure_args0=; unset ac_configure_args0;}
2176 1.4 christos { ac_configure_args1=; unset ac_configure_args1;}
2177 1.1 christos
2178 1.1 christos # When interrupted or exit'd, cleanup temporary files, and complete
2179 1.1 christos # config.log. We remove comments because anyway the quotes in there
2180 1.1 christos # would cause problems or look ugly.
2181 1.1 christos # WARNING: Use '\'' to represent an apostrophe within the trap.
2182 1.1 christos # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2183 1.1 christos trap 'exit_status=$?
2184 1.1 christos # Save into config.log some information that might help in debugging.
2185 1.1 christos {
2186 1.1 christos echo
2187 1.1 christos
2188 1.4 christos $as_echo "## ---------------- ##
2189 1.1 christos ## Cache variables. ##
2190 1.4 christos ## ---------------- ##"
2191 1.1 christos echo
2192 1.1 christos # The following way of writing the cache mishandles newlines in values,
2193 1.1 christos (
2194 1.1 christos for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2195 1.1 christos eval ac_val=\$$ac_var
2196 1.1 christos case $ac_val in #(
2197 1.1 christos *${as_nl}*)
2198 1.1 christos case $ac_var in #(
2199 1.4 christos *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2200 1.4 christos $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2201 1.1 christos esac
2202 1.1 christos case $ac_var in #(
2203 1.1 christos _ | IFS | as_nl) ;; #(
2204 1.4 christos BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2205 1.4 christos *) { eval $ac_var=; unset $ac_var;} ;;
2206 1.1 christos esac ;;
2207 1.1 christos esac
2208 1.1 christos done
2209 1.1 christos (set) 2>&1 |
2210 1.1 christos case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2211 1.1 christos *${as_nl}ac_space=\ *)
2212 1.1 christos sed -n \
2213 1.1 christos "s/'\''/'\''\\\\'\'''\''/g;
2214 1.1 christos s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2215 1.1 christos ;; #(
2216 1.1 christos *)
2217 1.1 christos sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2218 1.1 christos ;;
2219 1.1 christos esac |
2220 1.1 christos sort
2221 1.1 christos )
2222 1.1 christos echo
2223 1.1 christos
2224 1.4 christos $as_echo "## ----------------- ##
2225 1.1 christos ## Output variables. ##
2226 1.4 christos ## ----------------- ##"
2227 1.1 christos echo
2228 1.1 christos for ac_var in $ac_subst_vars
2229 1.1 christos do
2230 1.1 christos eval ac_val=\$$ac_var
2231 1.1 christos case $ac_val in
2232 1.4 christos *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2233 1.1 christos esac
2234 1.4 christos $as_echo "$ac_var='\''$ac_val'\''"
2235 1.1 christos done | sort
2236 1.1 christos echo
2237 1.1 christos
2238 1.1 christos if test -n "$ac_subst_files"; then
2239 1.4 christos $as_echo "## ------------------- ##
2240 1.1 christos ## File substitutions. ##
2241 1.4 christos ## ------------------- ##"
2242 1.1 christos echo
2243 1.1 christos for ac_var in $ac_subst_files
2244 1.1 christos do
2245 1.1 christos eval ac_val=\$$ac_var
2246 1.1 christos case $ac_val in
2247 1.4 christos *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2248 1.1 christos esac
2249 1.4 christos $as_echo "$ac_var='\''$ac_val'\''"
2250 1.1 christos done | sort
2251 1.1 christos echo
2252 1.1 christos fi
2253 1.1 christos
2254 1.1 christos if test -s confdefs.h; then
2255 1.4 christos $as_echo "## ----------- ##
2256 1.1 christos ## confdefs.h. ##
2257 1.4 christos ## ----------- ##"
2258 1.1 christos echo
2259 1.1 christos cat confdefs.h
2260 1.1 christos echo
2261 1.1 christos fi
2262 1.1 christos test "$ac_signal" != 0 &&
2263 1.4 christos $as_echo "$as_me: caught signal $ac_signal"
2264 1.4 christos $as_echo "$as_me: exit $exit_status"
2265 1.1 christos } >&5
2266 1.1 christos rm -f core *.core core.conftest.* &&
2267 1.1 christos rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2268 1.1 christos exit $exit_status
2269 1.1 christos ' 0
2270 1.1 christos for ac_signal in 1 2 13 15; do
2271 1.4 christos trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2272 1.1 christos done
2273 1.1 christos ac_signal=0
2274 1.1 christos
2275 1.1 christos # confdefs.h avoids OS command line length limits that DEFS can exceed.
2276 1.1 christos rm -f -r conftest* confdefs.h
2277 1.1 christos
2278 1.4 christos $as_echo "/* confdefs.h */" > confdefs.h
2279 1.4 christos
2280 1.1 christos # Predefined preprocessor variables.
2281 1.1 christos
2282 1.1 christos cat >>confdefs.h <<_ACEOF
2283 1.1 christos #define PACKAGE_NAME "$PACKAGE_NAME"
2284 1.1 christos _ACEOF
2285 1.1 christos
2286 1.1 christos cat >>confdefs.h <<_ACEOF
2287 1.1 christos #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2288 1.1 christos _ACEOF
2289 1.1 christos
2290 1.1 christos cat >>confdefs.h <<_ACEOF
2291 1.1 christos #define PACKAGE_VERSION "$PACKAGE_VERSION"
2292 1.1 christos _ACEOF
2293 1.1 christos
2294 1.1 christos cat >>confdefs.h <<_ACEOF
2295 1.1 christos #define PACKAGE_STRING "$PACKAGE_STRING"
2296 1.1 christos _ACEOF
2297 1.1 christos
2298 1.4 christos cat >>confdefs.h <<_ACEOF
2299 1.4 christos #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2300 1.4 christos _ACEOF
2301 1.1 christos
2302 1.1 christos cat >>confdefs.h <<_ACEOF
2303 1.4 christos #define PACKAGE_URL "$PACKAGE_URL"
2304 1.1 christos _ACEOF
2305 1.1 christos
2306 1.1 christos
2307 1.1 christos # Let the site file select an alternate cache file if it wants to.
2308 1.4 christos # Prefer an explicitly selected file to automatically selected ones.
2309 1.4 christos ac_site_file1=NONE
2310 1.4 christos ac_site_file2=NONE
2311 1.1 christos if test -n "$CONFIG_SITE"; then
2312 1.4 christos # We do not want a PATH search for config.site.
2313 1.4 christos case $CONFIG_SITE in #((
2314 1.4 christos -*) ac_site_file1=./$CONFIG_SITE;;
2315 1.4 christos */*) ac_site_file1=$CONFIG_SITE;;
2316 1.4 christos *) ac_site_file1=./$CONFIG_SITE;;
2317 1.4 christos esac
2318 1.1 christos elif test "x$prefix" != xNONE; then
2319 1.4 christos ac_site_file1=$prefix/share/config.site
2320 1.4 christos ac_site_file2=$prefix/etc/config.site
2321 1.1 christos else
2322 1.4 christos ac_site_file1=$ac_default_prefix/share/config.site
2323 1.4 christos ac_site_file2=$ac_default_prefix/etc/config.site
2324 1.1 christos fi
2325 1.4 christos for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2326 1.1 christos do
2327 1.4 christos test "x$ac_site_file" = xNONE && continue
2328 1.4 christos if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2329 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2330 1.4 christos $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2331 1.1 christos sed 's/^/| /' "$ac_site_file" >&5
2332 1.4 christos . "$ac_site_file" \
2333 1.4 christos || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2334 1.4 christos $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2335 1.4 christos as_fn_error $? "failed to load site script $ac_site_file
2336 1.4 christos See \`config.log' for more details" "$LINENO" 5; }
2337 1.1 christos fi
2338 1.1 christos done
2339 1.1 christos
2340 1.1 christos if test -r "$cache_file"; then
2341 1.4 christos # Some versions of bash will fail to source /dev/null (special files
2342 1.4 christos # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2343 1.4 christos if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2344 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2345 1.4 christos $as_echo "$as_me: loading cache $cache_file" >&6;}
2346 1.1 christos case $cache_file in
2347 1.1 christos [\\/]* | ?:[\\/]* ) . "$cache_file";;
2348 1.1 christos *) . "./$cache_file";;
2349 1.1 christos esac
2350 1.1 christos fi
2351 1.1 christos else
2352 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2353 1.4 christos $as_echo "$as_me: creating cache $cache_file" >&6;}
2354 1.1 christos >$cache_file
2355 1.1 christos fi
2356 1.1 christos
2357 1.1 christos # Check that the precious variables saved in the cache have kept the same
2358 1.1 christos # value.
2359 1.1 christos ac_cache_corrupted=false
2360 1.1 christos for ac_var in $ac_precious_vars; do
2361 1.1 christos eval ac_old_set=\$ac_cv_env_${ac_var}_set
2362 1.1 christos eval ac_new_set=\$ac_env_${ac_var}_set
2363 1.1 christos eval ac_old_val=\$ac_cv_env_${ac_var}_value
2364 1.1 christos eval ac_new_val=\$ac_env_${ac_var}_value
2365 1.1 christos case $ac_old_set,$ac_new_set in
2366 1.1 christos set,)
2367 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2368 1.4 christos $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2369 1.1 christos ac_cache_corrupted=: ;;
2370 1.1 christos ,set)
2371 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2372 1.4 christos $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2373 1.1 christos ac_cache_corrupted=: ;;
2374 1.1 christos ,);;
2375 1.1 christos *)
2376 1.1 christos if test "x$ac_old_val" != "x$ac_new_val"; then
2377 1.4 christos # differences in whitespace do not lead to failure.
2378 1.4 christos ac_old_val_w=`echo x $ac_old_val`
2379 1.4 christos ac_new_val_w=`echo x $ac_new_val`
2380 1.4 christos if test "$ac_old_val_w" != "$ac_new_val_w"; then
2381 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2382 1.4 christos $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2383 1.4 christos ac_cache_corrupted=:
2384 1.4 christos else
2385 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2386 1.4 christos $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2387 1.4 christos eval $ac_var=\$ac_old_val
2388 1.4 christos fi
2389 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2390 1.4 christos $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2391 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2392 1.4 christos $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2393 1.1 christos fi;;
2394 1.1 christos esac
2395 1.1 christos # Pass precious variables to config.status.
2396 1.1 christos if test "$ac_new_set" = set; then
2397 1.1 christos case $ac_new_val in
2398 1.4 christos *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2399 1.1 christos *) ac_arg=$ac_var=$ac_new_val ;;
2400 1.1 christos esac
2401 1.1 christos case " $ac_configure_args " in
2402 1.1 christos *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2403 1.4 christos *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2404 1.1 christos esac
2405 1.1 christos fi
2406 1.1 christos done
2407 1.1 christos if $ac_cache_corrupted; then
2408 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2409 1.4 christos $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2410 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2411 1.4 christos $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2412 1.4 christos as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2413 1.4 christos fi
2414 1.4 christos ## -------------------- ##
2415 1.4 christos ## Main body of script. ##
2416 1.4 christos ## -------------------- ##
2417 1.1 christos
2418 1.1 christos ac_ext=c
2419 1.1 christos ac_cpp='$CPP $CPPFLAGS'
2420 1.1 christos ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2421 1.1 christos ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2422 1.1 christos ac_compiler_gnu=$ac_cv_c_compiler_gnu
2423 1.1 christos
2424 1.1 christos
2425 1.1 christos
2426 1.11 christos
2427 1.1 christos ac_aux_dir=
2428 1.1 christos for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2429 1.1 christos if test -f "$ac_dir/install-sh"; then
2430 1.1 christos ac_aux_dir=$ac_dir
2431 1.1 christos ac_install_sh="$ac_aux_dir/install-sh -c"
2432 1.1 christos break
2433 1.1 christos elif test -f "$ac_dir/install.sh"; then
2434 1.1 christos ac_aux_dir=$ac_dir
2435 1.1 christos ac_install_sh="$ac_aux_dir/install.sh -c"
2436 1.1 christos break
2437 1.1 christos elif test -f "$ac_dir/shtool"; then
2438 1.1 christos ac_aux_dir=$ac_dir
2439 1.1 christos ac_install_sh="$ac_aux_dir/shtool install -c"
2440 1.1 christos break
2441 1.1 christos fi
2442 1.1 christos done
2443 1.1 christos if test -z "$ac_aux_dir"; then
2444 1.4 christos as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2445 1.1 christos fi
2446 1.1 christos
2447 1.1 christos # These three variables are undocumented and unsupported,
2448 1.1 christos # and are intended to be withdrawn in a future Autoconf release.
2449 1.1 christos # They can cause serious problems if a builder's source tree is in a directory
2450 1.1 christos # whose full name contains unusual characters.
2451 1.1 christos ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2452 1.1 christos ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2453 1.1 christos ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2454 1.1 christos
2455 1.1 christos
2456 1.1 christos # Make sure we can run config.sub.
2457 1.1 christos $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2458 1.4 christos as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2459 1.4 christos
2460 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2461 1.4 christos $as_echo_n "checking build system type... " >&6; }
2462 1.4 christos if ${ac_cv_build+:} false; then :
2463 1.4 christos $as_echo_n "(cached) " >&6
2464 1.1 christos else
2465 1.1 christos ac_build_alias=$build_alias
2466 1.1 christos test "x$ac_build_alias" = x &&
2467 1.1 christos ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2468 1.1 christos test "x$ac_build_alias" = x &&
2469 1.4 christos as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2470 1.1 christos ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2471 1.4 christos as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2472 1.1 christos
2473 1.1 christos fi
2474 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2475 1.4 christos $as_echo "$ac_cv_build" >&6; }
2476 1.1 christos case $ac_cv_build in
2477 1.1 christos *-*-*) ;;
2478 1.4 christos *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2479 1.1 christos esac
2480 1.1 christos build=$ac_cv_build
2481 1.1 christos ac_save_IFS=$IFS; IFS='-'
2482 1.1 christos set x $ac_cv_build
2483 1.1 christos shift
2484 1.1 christos build_cpu=$1
2485 1.1 christos build_vendor=$2
2486 1.1 christos shift; shift
2487 1.1 christos # Remember, the first character of IFS is used to create $*,
2488 1.1 christos # except with old shells:
2489 1.1 christos build_os=$*
2490 1.1 christos IFS=$ac_save_IFS
2491 1.1 christos case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2492 1.1 christos
2493 1.1 christos
2494 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2495 1.4 christos $as_echo_n "checking host system type... " >&6; }
2496 1.4 christos if ${ac_cv_host+:} false; then :
2497 1.4 christos $as_echo_n "(cached) " >&6
2498 1.1 christos else
2499 1.1 christos if test "x$host_alias" = x; then
2500 1.1 christos ac_cv_host=$ac_cv_build
2501 1.1 christos else
2502 1.1 christos ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2503 1.4 christos as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2504 1.1 christos fi
2505 1.1 christos
2506 1.1 christos fi
2507 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2508 1.4 christos $as_echo "$ac_cv_host" >&6; }
2509 1.1 christos case $ac_cv_host in
2510 1.1 christos *-*-*) ;;
2511 1.4 christos *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2512 1.1 christos esac
2513 1.1 christos host=$ac_cv_host
2514 1.1 christos ac_save_IFS=$IFS; IFS='-'
2515 1.1 christos set x $ac_cv_host
2516 1.1 christos shift
2517 1.1 christos host_cpu=$1
2518 1.1 christos host_vendor=$2
2519 1.1 christos shift; shift
2520 1.1 christos # Remember, the first character of IFS is used to create $*,
2521 1.1 christos # except with old shells:
2522 1.1 christos host_os=$*
2523 1.1 christos IFS=$ac_save_IFS
2524 1.1 christos case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2525 1.1 christos
2526 1.1 christos
2527 1.1 christos
2528 1.1 christos
2529 1.1 christos
2530 1.1 christos
2531 1.1 christos
2532 1.1 christos
2533 1.1 christos
2534 1.1 christos # Check whether --with-gcc was given.
2535 1.4 christos if test "${with_gcc+set}" = set; then :
2536 1.1 christos withval=$with_gcc;
2537 1.1 christos fi
2538 1.1 christos
2539 1.1 christos V_INCLS=""
2540 1.1 christos if test "${srcdir}" != "." ; then
2541 1.3 christos V_INCLS="-I$srcdir"
2542 1.1 christos fi
2543 1.1 christos if test "${CFLAGS+set}" = set; then
2544 1.1 christos LBL_CFLAGS="$CFLAGS"
2545 1.1 christos fi
2546 1.1 christos if test -z "$CC" ; then
2547 1.1 christos case "$host_os" in
2548 1.1 christos
2549 1.1 christos bsdi*)
2550 1.1 christos # Extract the first word of "shlicc2", so it can be a program name with args.
2551 1.1 christos set dummy shlicc2; ac_word=$2
2552 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2553 1.4 christos $as_echo_n "checking for $ac_word... " >&6; }
2554 1.4 christos if ${ac_cv_prog_SHLICC2+:} false; then :
2555 1.4 christos $as_echo_n "(cached) " >&6
2556 1.1 christos else
2557 1.1 christos if test -n "$SHLICC2"; then
2558 1.1 christos ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test.
2559 1.1 christos else
2560 1.1 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2561 1.1 christos for as_dir in $PATH
2562 1.1 christos do
2563 1.1 christos IFS=$as_save_IFS
2564 1.1 christos test -z "$as_dir" && as_dir=.
2565 1.4 christos for ac_exec_ext in '' $ac_executable_extensions; do
2566 1.4 christos if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2567 1.1 christos ac_cv_prog_SHLICC2="yes"
2568 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2569 1.1 christos break 2
2570 1.1 christos fi
2571 1.1 christos done
2572 1.4 christos done
2573 1.1 christos IFS=$as_save_IFS
2574 1.1 christos
2575 1.1 christos test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no"
2576 1.1 christos fi
2577 1.1 christos fi
2578 1.1 christos SHLICC2=$ac_cv_prog_SHLICC2
2579 1.1 christos if test -n "$SHLICC2"; then
2580 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLICC2" >&5
2581 1.4 christos $as_echo "$SHLICC2" >&6; }
2582 1.1 christos else
2583 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2584 1.4 christos $as_echo "no" >&6; }
2585 1.1 christos fi
2586 1.1 christos
2587 1.1 christos
2588 1.1 christos if test $SHLICC2 = yes ; then
2589 1.1 christos CC=shlicc2
2590 1.1 christos export CC
2591 1.1 christos fi
2592 1.1 christos ;;
2593 1.1 christos esac
2594 1.1 christos fi
2595 1.1 christos if test -z "$CC" -a "$with_gcc" = no ; then
2596 1.1 christos CC=cc
2597 1.1 christos export CC
2598 1.1 christos fi
2599 1.1 christos
2600 1.11 christos #
2601 1.11 christos # Try to enable as many C99 features as we can.
2602 1.11 christos # At minimum, we want C++/C99-style // comments.
2603 1.11 christos #
2604 1.1 christos ac_ext=c
2605 1.1 christos ac_cpp='$CPP $CPPFLAGS'
2606 1.1 christos ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2607 1.1 christos ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2608 1.1 christos ac_compiler_gnu=$ac_cv_c_compiler_gnu
2609 1.1 christos if test -n "$ac_tool_prefix"; then
2610 1.1 christos # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2611 1.1 christos set dummy ${ac_tool_prefix}gcc; ac_word=$2
2612 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2613 1.4 christos $as_echo_n "checking for $ac_word... " >&6; }
2614 1.4 christos if ${ac_cv_prog_CC+:} false; then :
2615 1.4 christos $as_echo_n "(cached) " >&6
2616 1.1 christos else
2617 1.1 christos if test -n "$CC"; then
2618 1.1 christos ac_cv_prog_CC="$CC" # Let the user override the test.
2619 1.1 christos else
2620 1.1 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2621 1.1 christos for as_dir in $PATH
2622 1.1 christos do
2623 1.1 christos IFS=$as_save_IFS
2624 1.1 christos test -z "$as_dir" && as_dir=.
2625 1.4 christos for ac_exec_ext in '' $ac_executable_extensions; do
2626 1.4 christos if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2627 1.1 christos ac_cv_prog_CC="${ac_tool_prefix}gcc"
2628 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2629 1.1 christos break 2
2630 1.1 christos fi
2631 1.1 christos done
2632 1.4 christos done
2633 1.1 christos IFS=$as_save_IFS
2634 1.1 christos
2635 1.1 christos fi
2636 1.1 christos fi
2637 1.1 christos CC=$ac_cv_prog_CC
2638 1.1 christos if test -n "$CC"; then
2639 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2640 1.4 christos $as_echo "$CC" >&6; }
2641 1.1 christos else
2642 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2643 1.4 christos $as_echo "no" >&6; }
2644 1.1 christos fi
2645 1.1 christos
2646 1.1 christos
2647 1.1 christos fi
2648 1.1 christos if test -z "$ac_cv_prog_CC"; then
2649 1.1 christos ac_ct_CC=$CC
2650 1.1 christos # Extract the first word of "gcc", so it can be a program name with args.
2651 1.1 christos set dummy gcc; ac_word=$2
2652 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2653 1.4 christos $as_echo_n "checking for $ac_word... " >&6; }
2654 1.4 christos if ${ac_cv_prog_ac_ct_CC+:} false; then :
2655 1.4 christos $as_echo_n "(cached) " >&6
2656 1.1 christos else
2657 1.1 christos if test -n "$ac_ct_CC"; then
2658 1.1 christos ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2659 1.1 christos else
2660 1.1 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2661 1.1 christos for as_dir in $PATH
2662 1.1 christos do
2663 1.1 christos IFS=$as_save_IFS
2664 1.1 christos test -z "$as_dir" && as_dir=.
2665 1.4 christos for ac_exec_ext in '' $ac_executable_extensions; do
2666 1.4 christos if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2667 1.1 christos ac_cv_prog_ac_ct_CC="gcc"
2668 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2669 1.1 christos break 2
2670 1.1 christos fi
2671 1.1 christos done
2672 1.4 christos done
2673 1.1 christos IFS=$as_save_IFS
2674 1.1 christos
2675 1.1 christos fi
2676 1.1 christos fi
2677 1.1 christos ac_ct_CC=$ac_cv_prog_ac_ct_CC
2678 1.1 christos if test -n "$ac_ct_CC"; then
2679 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2680 1.4 christos $as_echo "$ac_ct_CC" >&6; }
2681 1.1 christos else
2682 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2683 1.4 christos $as_echo "no" >&6; }
2684 1.1 christos fi
2685 1.1 christos
2686 1.1 christos if test "x$ac_ct_CC" = x; then
2687 1.1 christos CC=""
2688 1.1 christos else
2689 1.1 christos case $cross_compiling:$ac_tool_warned in
2690 1.1 christos yes:)
2691 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2692 1.4 christos $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2693 1.1 christos ac_tool_warned=yes ;;
2694 1.1 christos esac
2695 1.1 christos CC=$ac_ct_CC
2696 1.1 christos fi
2697 1.1 christos else
2698 1.1 christos CC="$ac_cv_prog_CC"
2699 1.1 christos fi
2700 1.1 christos
2701 1.1 christos if test -z "$CC"; then
2702 1.1 christos if test -n "$ac_tool_prefix"; then
2703 1.1 christos # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2704 1.1 christos set dummy ${ac_tool_prefix}cc; ac_word=$2
2705 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2706 1.4 christos $as_echo_n "checking for $ac_word... " >&6; }
2707 1.4 christos if ${ac_cv_prog_CC+:} false; then :
2708 1.4 christos $as_echo_n "(cached) " >&6
2709 1.1 christos else
2710 1.1 christos if test -n "$CC"; then
2711 1.1 christos ac_cv_prog_CC="$CC" # Let the user override the test.
2712 1.1 christos else
2713 1.1 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2714 1.1 christos for as_dir in $PATH
2715 1.1 christos do
2716 1.1 christos IFS=$as_save_IFS
2717 1.1 christos test -z "$as_dir" && as_dir=.
2718 1.4 christos for ac_exec_ext in '' $ac_executable_extensions; do
2719 1.4 christos if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2720 1.1 christos ac_cv_prog_CC="${ac_tool_prefix}cc"
2721 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2722 1.1 christos break 2
2723 1.1 christos fi
2724 1.1 christos done
2725 1.4 christos done
2726 1.1 christos IFS=$as_save_IFS
2727 1.1 christos
2728 1.1 christos fi
2729 1.1 christos fi
2730 1.1 christos CC=$ac_cv_prog_CC
2731 1.1 christos if test -n "$CC"; then
2732 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2733 1.4 christos $as_echo "$CC" >&6; }
2734 1.1 christos else
2735 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2736 1.4 christos $as_echo "no" >&6; }
2737 1.1 christos fi
2738 1.1 christos
2739 1.1 christos
2740 1.1 christos fi
2741 1.1 christos fi
2742 1.1 christos if test -z "$CC"; then
2743 1.1 christos # Extract the first word of "cc", so it can be a program name with args.
2744 1.1 christos set dummy cc; ac_word=$2
2745 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2746 1.4 christos $as_echo_n "checking for $ac_word... " >&6; }
2747 1.4 christos if ${ac_cv_prog_CC+:} false; then :
2748 1.4 christos $as_echo_n "(cached) " >&6
2749 1.1 christos else
2750 1.1 christos if test -n "$CC"; then
2751 1.1 christos ac_cv_prog_CC="$CC" # Let the user override the test.
2752 1.1 christos else
2753 1.1 christos ac_prog_rejected=no
2754 1.1 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2755 1.1 christos for as_dir in $PATH
2756 1.1 christos do
2757 1.1 christos IFS=$as_save_IFS
2758 1.1 christos test -z "$as_dir" && as_dir=.
2759 1.4 christos for ac_exec_ext in '' $ac_executable_extensions; do
2760 1.4 christos if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2761 1.1 christos if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2762 1.1 christos ac_prog_rejected=yes
2763 1.1 christos continue
2764 1.1 christos fi
2765 1.1 christos ac_cv_prog_CC="cc"
2766 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2767 1.1 christos break 2
2768 1.1 christos fi
2769 1.1 christos done
2770 1.4 christos done
2771 1.1 christos IFS=$as_save_IFS
2772 1.1 christos
2773 1.1 christos if test $ac_prog_rejected = yes; then
2774 1.1 christos # We found a bogon in the path, so make sure we never use it.
2775 1.1 christos set dummy $ac_cv_prog_CC
2776 1.1 christos shift
2777 1.1 christos if test $# != 0; then
2778 1.1 christos # We chose a different compiler from the bogus one.
2779 1.1 christos # However, it has the same basename, so the bogon will be chosen
2780 1.1 christos # first if we set CC to just the basename; use the full file name.
2781 1.1 christos shift
2782 1.1 christos ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2783 1.1 christos fi
2784 1.1 christos fi
2785 1.1 christos fi
2786 1.1 christos fi
2787 1.1 christos CC=$ac_cv_prog_CC
2788 1.1 christos if test -n "$CC"; then
2789 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2790 1.4 christos $as_echo "$CC" >&6; }
2791 1.1 christos else
2792 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2793 1.4 christos $as_echo "no" >&6; }
2794 1.1 christos fi
2795 1.1 christos
2796 1.1 christos
2797 1.1 christos fi
2798 1.1 christos if test -z "$CC"; then
2799 1.1 christos if test -n "$ac_tool_prefix"; then
2800 1.1 christos for ac_prog in cl.exe
2801 1.1 christos do
2802 1.1 christos # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2803 1.1 christos set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2804 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2805 1.4 christos $as_echo_n "checking for $ac_word... " >&6; }
2806 1.4 christos if ${ac_cv_prog_CC+:} false; then :
2807 1.4 christos $as_echo_n "(cached) " >&6
2808 1.1 christos else
2809 1.1 christos if test -n "$CC"; then
2810 1.1 christos ac_cv_prog_CC="$CC" # Let the user override the test.
2811 1.1 christos else
2812 1.1 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2813 1.1 christos for as_dir in $PATH
2814 1.1 christos do
2815 1.1 christos IFS=$as_save_IFS
2816 1.1 christos test -z "$as_dir" && as_dir=.
2817 1.4 christos for ac_exec_ext in '' $ac_executable_extensions; do
2818 1.4 christos if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2819 1.1 christos ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2820 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2821 1.1 christos break 2
2822 1.1 christos fi
2823 1.1 christos done
2824 1.4 christos done
2825 1.1 christos IFS=$as_save_IFS
2826 1.1 christos
2827 1.1 christos fi
2828 1.1 christos fi
2829 1.1 christos CC=$ac_cv_prog_CC
2830 1.1 christos if test -n "$CC"; then
2831 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2832 1.4 christos $as_echo "$CC" >&6; }
2833 1.1 christos else
2834 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2835 1.4 christos $as_echo "no" >&6; }
2836 1.1 christos fi
2837 1.1 christos
2838 1.1 christos
2839 1.1 christos test -n "$CC" && break
2840 1.1 christos done
2841 1.1 christos fi
2842 1.1 christos if test -z "$CC"; then
2843 1.1 christos ac_ct_CC=$CC
2844 1.1 christos for ac_prog in cl.exe
2845 1.1 christos do
2846 1.1 christos # Extract the first word of "$ac_prog", so it can be a program name with args.
2847 1.1 christos set dummy $ac_prog; ac_word=$2
2848 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2849 1.4 christos $as_echo_n "checking for $ac_word... " >&6; }
2850 1.4 christos if ${ac_cv_prog_ac_ct_CC+:} false; then :
2851 1.4 christos $as_echo_n "(cached) " >&6
2852 1.1 christos else
2853 1.1 christos if test -n "$ac_ct_CC"; then
2854 1.1 christos ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2855 1.1 christos else
2856 1.1 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2857 1.1 christos for as_dir in $PATH
2858 1.1 christos do
2859 1.1 christos IFS=$as_save_IFS
2860 1.1 christos test -z "$as_dir" && as_dir=.
2861 1.4 christos for ac_exec_ext in '' $ac_executable_extensions; do
2862 1.4 christos if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2863 1.1 christos ac_cv_prog_ac_ct_CC="$ac_prog"
2864 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2865 1.1 christos break 2
2866 1.1 christos fi
2867 1.1 christos done
2868 1.4 christos done
2869 1.1 christos IFS=$as_save_IFS
2870 1.1 christos
2871 1.1 christos fi
2872 1.1 christos fi
2873 1.1 christos ac_ct_CC=$ac_cv_prog_ac_ct_CC
2874 1.1 christos if test -n "$ac_ct_CC"; then
2875 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2876 1.4 christos $as_echo "$ac_ct_CC" >&6; }
2877 1.1 christos else
2878 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2879 1.4 christos $as_echo "no" >&6; }
2880 1.1 christos fi
2881 1.1 christos
2882 1.1 christos
2883 1.1 christos test -n "$ac_ct_CC" && break
2884 1.1 christos done
2885 1.1 christos
2886 1.1 christos if test "x$ac_ct_CC" = x; then
2887 1.1 christos CC=""
2888 1.1 christos else
2889 1.1 christos case $cross_compiling:$ac_tool_warned in
2890 1.1 christos yes:)
2891 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2892 1.4 christos $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2893 1.1 christos ac_tool_warned=yes ;;
2894 1.1 christos esac
2895 1.1 christos CC=$ac_ct_CC
2896 1.1 christos fi
2897 1.1 christos fi
2898 1.1 christos
2899 1.1 christos fi
2900 1.1 christos
2901 1.1 christos
2902 1.4 christos test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2903 1.4 christos $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2904 1.4 christos as_fn_error $? "no acceptable C compiler found in \$PATH
2905 1.4 christos See \`config.log' for more details" "$LINENO" 5; }
2906 1.1 christos
2907 1.1 christos # Provide some information about the compiler.
2908 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2909 1.4 christos set X $ac_compile
2910 1.4 christos ac_compiler=$2
2911 1.4 christos for ac_option in --version -v -V -qversion; do
2912 1.4 christos { { ac_try="$ac_compiler $ac_option >&5"
2913 1.1 christos case "(($ac_try" in
2914 1.1 christos *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2915 1.1 christos *) ac_try_echo=$ac_try;;
2916 1.1 christos esac
2917 1.4 christos eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2918 1.4 christos $as_echo "$ac_try_echo"; } >&5
2919 1.4 christos (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2920 1.1 christos ac_status=$?
2921 1.4 christos if test -s conftest.err; then
2922 1.4 christos sed '10a\
2923 1.4 christos ... rest of stderr output deleted ...
2924 1.4 christos 10q' conftest.err >conftest.er1
2925 1.4 christos cat conftest.er1 >&5
2926 1.4 christos fi
2927 1.4 christos rm -f conftest.er1 conftest.err
2928 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2929 1.4 christos test $ac_status = 0; }
2930 1.4 christos done
2931 1.1 christos
2932 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2933 1.1 christos /* end confdefs.h. */
2934 1.1 christos
2935 1.1 christos int
2936 1.1 christos main ()
2937 1.1 christos {
2938 1.1 christos
2939 1.1 christos ;
2940 1.1 christos return 0;
2941 1.1 christos }
2942 1.1 christos _ACEOF
2943 1.1 christos ac_clean_files_save=$ac_clean_files
2944 1.4 christos ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2945 1.1 christos # Try to create an executable without -o first, disregard a.out.
2946 1.1 christos # It will help us diagnose broken compilers, and finding out an intuition
2947 1.1 christos # of exeext.
2948 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2949 1.4 christos $as_echo_n "checking whether the C compiler works... " >&6; }
2950 1.4 christos ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2951 1.4 christos
2952 1.4 christos # The possible output files:
2953 1.4 christos ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2954 1.4 christos
2955 1.1 christos ac_rmfiles=
2956 1.1 christos for ac_file in $ac_files
2957 1.1 christos do
2958 1.1 christos case $ac_file in
2959 1.4 christos *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2960 1.1 christos * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2961 1.1 christos esac
2962 1.1 christos done
2963 1.1 christos rm -f $ac_rmfiles
2964 1.1 christos
2965 1.4 christos if { { ac_try="$ac_link_default"
2966 1.1 christos case "(($ac_try" in
2967 1.1 christos *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2968 1.1 christos *) ac_try_echo=$ac_try;;
2969 1.1 christos esac
2970 1.4 christos eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2971 1.4 christos $as_echo "$ac_try_echo"; } >&5
2972 1.1 christos (eval "$ac_link_default") 2>&5
2973 1.1 christos ac_status=$?
2974 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2975 1.4 christos test $ac_status = 0; }; then :
2976 1.1 christos # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2977 1.1 christos # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2978 1.1 christos # in a Makefile. We should not override ac_cv_exeext if it was cached,
2979 1.1 christos # so that the user can short-circuit this test for compilers unknown to
2980 1.1 christos # Autoconf.
2981 1.1 christos for ac_file in $ac_files ''
2982 1.1 christos do
2983 1.1 christos test -f "$ac_file" || continue
2984 1.1 christos case $ac_file in
2985 1.4 christos *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2986 1.1 christos ;;
2987 1.1 christos [ab].out )
2988 1.1 christos # We found the default executable, but exeext='' is most
2989 1.1 christos # certainly right.
2990 1.1 christos break;;
2991 1.1 christos *.* )
2992 1.4 christos if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2993 1.1 christos then :; else
2994 1.1 christos ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2995 1.1 christos fi
2996 1.1 christos # We set ac_cv_exeext here because the later test for it is not
2997 1.1 christos # safe: cross compilers may not add the suffix if given an `-o'
2998 1.1 christos # argument, so we may need to know it at that point already.
2999 1.1 christos # Even if this section looks crufty: it has the advantage of
3000 1.1 christos # actually working.
3001 1.1 christos break;;
3002 1.1 christos * )
3003 1.1 christos break;;
3004 1.1 christos esac
3005 1.1 christos done
3006 1.1 christos test "$ac_cv_exeext" = no && ac_cv_exeext=
3007 1.1 christos
3008 1.1 christos else
3009 1.1 christos ac_file=''
3010 1.1 christos fi
3011 1.4 christos if test -z "$ac_file"; then :
3012 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3013 1.4 christos $as_echo "no" >&6; }
3014 1.4 christos $as_echo "$as_me: failed program was:" >&5
3015 1.4 christos sed 's/^/| /' conftest.$ac_ext >&5
3016 1.4 christos
3017 1.4 christos { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3018 1.4 christos $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3019 1.4 christos as_fn_error 77 "C compiler cannot create executables
3020 1.4 christos See \`config.log' for more details" "$LINENO" 5; }
3021 1.4 christos else
3022 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3023 1.4 christos $as_echo "yes" >&6; }
3024 1.4 christos fi
3025 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3026 1.4 christos $as_echo_n "checking for C compiler default output file name... " >&6; }
3027 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3028 1.4 christos $as_echo "$ac_file" >&6; }
3029 1.1 christos ac_exeext=$ac_cv_exeext
3030 1.1 christos
3031 1.4 christos rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3032 1.1 christos ac_clean_files=$ac_clean_files_save
3033 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3034 1.4 christos $as_echo_n "checking for suffix of executables... " >&6; }
3035 1.4 christos if { { ac_try="$ac_link"
3036 1.1 christos case "(($ac_try" in
3037 1.1 christos *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3038 1.1 christos *) ac_try_echo=$ac_try;;
3039 1.1 christos esac
3040 1.4 christos eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3041 1.4 christos $as_echo "$ac_try_echo"; } >&5
3042 1.1 christos (eval "$ac_link") 2>&5
3043 1.1 christos ac_status=$?
3044 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3045 1.4 christos test $ac_status = 0; }; then :
3046 1.1 christos # If both `conftest.exe' and `conftest' are `present' (well, observable)
3047 1.1 christos # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3048 1.1 christos # work properly (i.e., refer to `conftest.exe'), while it won't with
3049 1.1 christos # `rm'.
3050 1.1 christos for ac_file in conftest.exe conftest conftest.*; do
3051 1.1 christos test -f "$ac_file" || continue
3052 1.1 christos case $ac_file in
3053 1.4 christos *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3054 1.1 christos *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3055 1.1 christos break;;
3056 1.1 christos * ) break;;
3057 1.1 christos esac
3058 1.1 christos done
3059 1.1 christos else
3060 1.4 christos { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3061 1.4 christos $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3062 1.4 christos as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3063 1.4 christos See \`config.log' for more details" "$LINENO" 5; }
3064 1.4 christos fi
3065 1.4 christos rm -f conftest conftest$ac_cv_exeext
3066 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3067 1.4 christos $as_echo "$ac_cv_exeext" >&6; }
3068 1.1 christos
3069 1.1 christos rm -f conftest.$ac_ext
3070 1.1 christos EXEEXT=$ac_cv_exeext
3071 1.1 christos ac_exeext=$EXEEXT
3072 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3073 1.4 christos /* end confdefs.h. */
3074 1.4 christos #include <stdio.h>
3075 1.4 christos int
3076 1.4 christos main ()
3077 1.4 christos {
3078 1.4 christos FILE *f = fopen ("conftest.out", "w");
3079 1.4 christos return ferror (f) || fclose (f) != 0;
3080 1.4 christos
3081 1.4 christos ;
3082 1.4 christos return 0;
3083 1.4 christos }
3084 1.4 christos _ACEOF
3085 1.4 christos ac_clean_files="$ac_clean_files conftest.out"
3086 1.4 christos # Check that the compiler produces executables we can run. If not, either
3087 1.4 christos # the compiler is broken, or we cross compile.
3088 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3089 1.4 christos $as_echo_n "checking whether we are cross compiling... " >&6; }
3090 1.4 christos if test "$cross_compiling" != yes; then
3091 1.4 christos { { ac_try="$ac_link"
3092 1.4 christos case "(($ac_try" in
3093 1.4 christos *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3094 1.4 christos *) ac_try_echo=$ac_try;;
3095 1.4 christos esac
3096 1.4 christos eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3097 1.4 christos $as_echo "$ac_try_echo"; } >&5
3098 1.4 christos (eval "$ac_link") 2>&5
3099 1.4 christos ac_status=$?
3100 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3101 1.4 christos test $ac_status = 0; }
3102 1.4 christos if { ac_try='./conftest$ac_cv_exeext'
3103 1.4 christos { { case "(($ac_try" in
3104 1.4 christos *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3105 1.4 christos *) ac_try_echo=$ac_try;;
3106 1.4 christos esac
3107 1.4 christos eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3108 1.4 christos $as_echo "$ac_try_echo"; } >&5
3109 1.4 christos (eval "$ac_try") 2>&5
3110 1.4 christos ac_status=$?
3111 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3112 1.4 christos test $ac_status = 0; }; }; then
3113 1.4 christos cross_compiling=no
3114 1.4 christos else
3115 1.4 christos if test "$cross_compiling" = maybe; then
3116 1.4 christos cross_compiling=yes
3117 1.4 christos else
3118 1.4 christos { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3119 1.4 christos $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3120 1.4 christos as_fn_error $? "cannot run C compiled programs.
3121 1.4 christos If you meant to cross compile, use \`--host'.
3122 1.4 christos See \`config.log' for more details" "$LINENO" 5; }
3123 1.4 christos fi
3124 1.4 christos fi
3125 1.4 christos fi
3126 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3127 1.4 christos $as_echo "$cross_compiling" >&6; }
3128 1.4 christos
3129 1.4 christos rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3130 1.4 christos ac_clean_files=$ac_clean_files_save
3131 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3132 1.4 christos $as_echo_n "checking for suffix of object files... " >&6; }
3133 1.4 christos if ${ac_cv_objext+:} false; then :
3134 1.4 christos $as_echo_n "(cached) " >&6
3135 1.1 christos else
3136 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3137 1.1 christos /* end confdefs.h. */
3138 1.1 christos
3139 1.1 christos int
3140 1.1 christos main ()
3141 1.1 christos {
3142 1.1 christos
3143 1.1 christos ;
3144 1.1 christos return 0;
3145 1.1 christos }
3146 1.1 christos _ACEOF
3147 1.1 christos rm -f conftest.o conftest.obj
3148 1.4 christos if { { ac_try="$ac_compile"
3149 1.1 christos case "(($ac_try" in
3150 1.1 christos *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3151 1.1 christos *) ac_try_echo=$ac_try;;
3152 1.1 christos esac
3153 1.4 christos eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3154 1.4 christos $as_echo "$ac_try_echo"; } >&5
3155 1.1 christos (eval "$ac_compile") 2>&5
3156 1.1 christos ac_status=$?
3157 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3158 1.4 christos test $ac_status = 0; }; then :
3159 1.1 christos for ac_file in conftest.o conftest.obj conftest.*; do
3160 1.1 christos test -f "$ac_file" || continue;
3161 1.1 christos case $ac_file in
3162 1.4 christos *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3163 1.1 christos *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3164 1.1 christos break;;
3165 1.1 christos esac
3166 1.1 christos done
3167 1.1 christos else
3168 1.4 christos $as_echo "$as_me: failed program was:" >&5
3169 1.1 christos sed 's/^/| /' conftest.$ac_ext >&5
3170 1.1 christos
3171 1.4 christos { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3172 1.4 christos $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3173 1.4 christos as_fn_error $? "cannot compute suffix of object files: cannot compile
3174 1.4 christos See \`config.log' for more details" "$LINENO" 5; }
3175 1.1 christos fi
3176 1.1 christos rm -f conftest.$ac_cv_objext conftest.$ac_ext
3177 1.1 christos fi
3178 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3179 1.4 christos $as_echo "$ac_cv_objext" >&6; }
3180 1.1 christos OBJEXT=$ac_cv_objext
3181 1.1 christos ac_objext=$OBJEXT
3182 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3183 1.4 christos $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3184 1.4 christos if ${ac_cv_c_compiler_gnu+:} false; then :
3185 1.4 christos $as_echo_n "(cached) " >&6
3186 1.1 christos else
3187 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3188 1.1 christos /* end confdefs.h. */
3189 1.1 christos
3190 1.1 christos int
3191 1.1 christos main ()
3192 1.1 christos {
3193 1.1 christos #ifndef __GNUC__
3194 1.1 christos choke me
3195 1.1 christos #endif
3196 1.1 christos
3197 1.1 christos ;
3198 1.1 christos return 0;
3199 1.1 christos }
3200 1.1 christos _ACEOF
3201 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
3202 1.1 christos ac_compiler_gnu=yes
3203 1.1 christos else
3204 1.4 christos ac_compiler_gnu=no
3205 1.1 christos fi
3206 1.1 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3207 1.1 christos ac_cv_c_compiler_gnu=$ac_compiler_gnu
3208 1.1 christos
3209 1.1 christos fi
3210 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3211 1.4 christos $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3212 1.4 christos if test $ac_compiler_gnu = yes; then
3213 1.4 christos GCC=yes
3214 1.4 christos else
3215 1.4 christos GCC=
3216 1.4 christos fi
3217 1.1 christos ac_test_CFLAGS=${CFLAGS+set}
3218 1.1 christos ac_save_CFLAGS=$CFLAGS
3219 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3220 1.4 christos $as_echo_n "checking whether $CC accepts -g... " >&6; }
3221 1.4 christos if ${ac_cv_prog_cc_g+:} false; then :
3222 1.4 christos $as_echo_n "(cached) " >&6
3223 1.1 christos else
3224 1.1 christos ac_save_c_werror_flag=$ac_c_werror_flag
3225 1.1 christos ac_c_werror_flag=yes
3226 1.1 christos ac_cv_prog_cc_g=no
3227 1.1 christos CFLAGS="-g"
3228 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3229 1.1 christos /* end confdefs.h. */
3230 1.1 christos
3231 1.1 christos int
3232 1.1 christos main ()
3233 1.1 christos {
3234 1.1 christos
3235 1.1 christos ;
3236 1.1 christos return 0;
3237 1.1 christos }
3238 1.1 christos _ACEOF
3239 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
3240 1.1 christos ac_cv_prog_cc_g=yes
3241 1.1 christos else
3242 1.4 christos CFLAGS=""
3243 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3244 1.1 christos /* end confdefs.h. */
3245 1.1 christos
3246 1.1 christos int
3247 1.1 christos main ()
3248 1.1 christos {
3249 1.1 christos
3250 1.1 christos ;
3251 1.1 christos return 0;
3252 1.1 christos }
3253 1.1 christos _ACEOF
3254 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
3255 1.4 christos
3256 1.1 christos else
3257 1.4 christos ac_c_werror_flag=$ac_save_c_werror_flag
3258 1.1 christos CFLAGS="-g"
3259 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3260 1.1 christos /* end confdefs.h. */
3261 1.1 christos
3262 1.1 christos int
3263 1.1 christos main ()
3264 1.1 christos {
3265 1.1 christos
3266 1.1 christos ;
3267 1.1 christos return 0;
3268 1.1 christos }
3269 1.1 christos _ACEOF
3270 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
3271 1.1 christos ac_cv_prog_cc_g=yes
3272 1.1 christos fi
3273 1.1 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3274 1.1 christos fi
3275 1.1 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3276 1.1 christos fi
3277 1.1 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3278 1.1 christos ac_c_werror_flag=$ac_save_c_werror_flag
3279 1.1 christos fi
3280 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3281 1.4 christos $as_echo "$ac_cv_prog_cc_g" >&6; }
3282 1.1 christos if test "$ac_test_CFLAGS" = set; then
3283 1.1 christos CFLAGS=$ac_save_CFLAGS
3284 1.1 christos elif test $ac_cv_prog_cc_g = yes; then
3285 1.1 christos if test "$GCC" = yes; then
3286 1.1 christos CFLAGS="-g -O2"
3287 1.1 christos else
3288 1.1 christos CFLAGS="-g"
3289 1.1 christos fi
3290 1.1 christos else
3291 1.1 christos if test "$GCC" = yes; then
3292 1.1 christos CFLAGS="-O2"
3293 1.1 christos else
3294 1.1 christos CFLAGS=
3295 1.1 christos fi
3296 1.1 christos fi
3297 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3298 1.4 christos $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3299 1.4 christos if ${ac_cv_prog_cc_c89+:} false; then :
3300 1.4 christos $as_echo_n "(cached) " >&6
3301 1.1 christos else
3302 1.1 christos ac_cv_prog_cc_c89=no
3303 1.1 christos ac_save_CC=$CC
3304 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3305 1.1 christos /* end confdefs.h. */
3306 1.1 christos #include <stdarg.h>
3307 1.1 christos #include <stdio.h>
3308 1.4 christos struct stat;
3309 1.1 christos /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3310 1.1 christos struct buf { int x; };
3311 1.1 christos FILE * (*rcsopen) (struct buf *, struct stat *, int);
3312 1.1 christos static char *e (p, i)
3313 1.1 christos char **p;
3314 1.1 christos int i;
3315 1.1 christos {
3316 1.1 christos return p[i];
3317 1.1 christos }
3318 1.1 christos static char *f (char * (*g) (char **, int), char **p, ...)
3319 1.1 christos {
3320 1.1 christos char *s;
3321 1.1 christos va_list v;
3322 1.1 christos va_start (v,p);
3323 1.1 christos s = g (p, va_arg (v,int));
3324 1.1 christos va_end (v);
3325 1.1 christos return s;
3326 1.1 christos }
3327 1.1 christos
3328 1.1 christos /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3329 1.1 christos function prototypes and stuff, but not '\xHH' hex character constants.
3330 1.1 christos These don't provoke an error unfortunately, instead are silently treated
3331 1.1 christos as 'x'. The following induces an error, until -std is added to get
3332 1.1 christos proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3333 1.1 christos array size at least. It's necessary to write '\x00'==0 to get something
3334 1.1 christos that's true only with -std. */
3335 1.1 christos int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3336 1.1 christos
3337 1.1 christos /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3338 1.1 christos inside strings and character constants. */
3339 1.1 christos #define FOO(x) 'x'
3340 1.1 christos int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3341 1.1 christos
3342 1.1 christos int test (int i, double x);
3343 1.1 christos struct s1 {int (*f) (int a);};
3344 1.1 christos struct s2 {int (*f) (double a);};
3345 1.1 christos int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3346 1.1 christos int argc;
3347 1.1 christos char **argv;
3348 1.1 christos int
3349 1.1 christos main ()
3350 1.1 christos {
3351 1.1 christos return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3352 1.1 christos ;
3353 1.1 christos return 0;
3354 1.1 christos }
3355 1.1 christos _ACEOF
3356 1.1 christos for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3357 1.1 christos -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3358 1.1 christos do
3359 1.1 christos CC="$ac_save_CC $ac_arg"
3360 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
3361 1.1 christos ac_cv_prog_cc_c89=$ac_arg
3362 1.1 christos fi
3363 1.1 christos rm -f core conftest.err conftest.$ac_objext
3364 1.1 christos test "x$ac_cv_prog_cc_c89" != "xno" && break
3365 1.1 christos done
3366 1.1 christos rm -f conftest.$ac_ext
3367 1.1 christos CC=$ac_save_CC
3368 1.1 christos
3369 1.1 christos fi
3370 1.1 christos # AC_CACHE_VAL
3371 1.1 christos case "x$ac_cv_prog_cc_c89" in
3372 1.1 christos x)
3373 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3374 1.4 christos $as_echo "none needed" >&6; } ;;
3375 1.1 christos xno)
3376 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3377 1.4 christos $as_echo "unsupported" >&6; } ;;
3378 1.1 christos *)
3379 1.1 christos CC="$CC $ac_cv_prog_cc_c89"
3380 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3381 1.4 christos $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3382 1.1 christos esac
3383 1.4 christos if test "x$ac_cv_prog_cc_c89" != xno; then :
3384 1.1 christos
3385 1.4 christos fi
3386 1.1 christos
3387 1.1 christos ac_ext=c
3388 1.1 christos ac_cpp='$CPP $CPPFLAGS'
3389 1.1 christos ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3390 1.1 christos ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3391 1.1 christos ac_compiler_gnu=$ac_cv_c_compiler_gnu
3392 1.1 christos
3393 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
3394 1.11 christos $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
3395 1.11 christos if ${ac_cv_prog_cc_c99+:} false; then :
3396 1.11 christos $as_echo_n "(cached) " >&6
3397 1.11 christos else
3398 1.11 christos ac_cv_prog_cc_c99=no
3399 1.11 christos ac_save_CC=$CC
3400 1.11 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3401 1.11 christos /* end confdefs.h. */
3402 1.11 christos #include <stdarg.h>
3403 1.11 christos #include <stdbool.h>
3404 1.11 christos #include <stdlib.h>
3405 1.11 christos #include <wchar.h>
3406 1.11 christos #include <stdio.h>
3407 1.1 christos
3408 1.11 christos // Check varargs macros. These examples are taken from C99 6.10.3.5.
3409 1.11 christos #define debug(...) fprintf (stderr, __VA_ARGS__)
3410 1.11 christos #define showlist(...) puts (#__VA_ARGS__)
3411 1.11 christos #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
3412 1.11 christos static void
3413 1.11 christos test_varargs_macros (void)
3414 1.11 christos {
3415 1.11 christos int x = 1234;
3416 1.11 christos int y = 5678;
3417 1.11 christos debug ("Flag");
3418 1.11 christos debug ("X = %d\n", x);
3419 1.11 christos showlist (The first, second, and third items.);
3420 1.11 christos report (x>y, "x is %d but y is %d", x, y);
3421 1.11 christos }
3422 1.11 christos
3423 1.11 christos // Check long long types.
3424 1.11 christos #define BIG64 18446744073709551615ull
3425 1.11 christos #define BIG32 4294967295ul
3426 1.11 christos #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
3427 1.11 christos #if !BIG_OK
3428 1.11 christos your preprocessor is broken;
3429 1.11 christos #endif
3430 1.11 christos #if BIG_OK
3431 1.11 christos #else
3432 1.11 christos your preprocessor is broken;
3433 1.11 christos #endif
3434 1.11 christos static long long int bignum = -9223372036854775807LL;
3435 1.11 christos static unsigned long long int ubignum = BIG64;
3436 1.1 christos
3437 1.11 christos struct incomplete_array
3438 1.11 christos {
3439 1.11 christos int datasize;
3440 1.11 christos double data[];
3441 1.11 christos };
3442 1.1 christos
3443 1.11 christos struct named_init {
3444 1.11 christos int number;
3445 1.11 christos const wchar_t *name;
3446 1.11 christos double average;
3447 1.11 christos };
3448 1.1 christos
3449 1.11 christos typedef const char *ccp;
3450 1.4 christos
3451 1.11 christos static inline int
3452 1.11 christos test_restrict (ccp restrict text)
3453 1.11 christos {
3454 1.11 christos // See if C++-style comments work.
3455 1.11 christos // Iterate through items via the restricted pointer.
3456 1.11 christos // Also check for declarations in for loops.
3457 1.11 christos for (unsigned int i = 0; *(text+i) != '\0'; ++i)
3458 1.11 christos continue;
3459 1.11 christos return 0;
3460 1.11 christos }
3461 1.4 christos
3462 1.11 christos // Check varargs and va_copy.
3463 1.11 christos static void
3464 1.11 christos test_varargs (const char *format, ...)
3465 1.11 christos {
3466 1.11 christos va_list args;
3467 1.11 christos va_start (args, format);
3468 1.11 christos va_list args_copy;
3469 1.11 christos va_copy (args_copy, args);
3470 1.11 christos
3471 1.11 christos const char *str;
3472 1.11 christos int number;
3473 1.11 christos float fnumber;
3474 1.1 christos
3475 1.11 christos while (*format)
3476 1.11 christos {
3477 1.11 christos switch (*format++)
3478 1.11 christos {
3479 1.11 christos case 's': // string
3480 1.11 christos str = va_arg (args_copy, const char *);
3481 1.11 christos break;
3482 1.11 christos case 'd': // int
3483 1.11 christos number = va_arg (args_copy, int);
3484 1.11 christos break;
3485 1.11 christos case 'f': // float
3486 1.11 christos fnumber = va_arg (args_copy, double);
3487 1.11 christos break;
3488 1.11 christos default:
3489 1.11 christos break;
3490 1.11 christos }
3491 1.11 christos }
3492 1.11 christos va_end (args_copy);
3493 1.11 christos va_end (args);
3494 1.11 christos }
3495 1.4 christos
3496 1.1 christos int
3497 1.1 christos main ()
3498 1.1 christos {
3499 1.11 christos
3500 1.11 christos // Check bool.
3501 1.11 christos _Bool success = false;
3502 1.11 christos
3503 1.11 christos // Check restrict.
3504 1.11 christos if (test_restrict ("String literal") == 0)
3505 1.11 christos success = true;
3506 1.11 christos char *restrict newvar = "Another string";
3507 1.11 christos
3508 1.11 christos // Check varargs.
3509 1.11 christos test_varargs ("s, d' f .", "string", 65, 34.234);
3510 1.11 christos test_varargs_macros ();
3511 1.11 christos
3512 1.11 christos // Check flexible array members.
3513 1.11 christos struct incomplete_array *ia =
3514 1.11 christos malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
3515 1.11 christos ia->datasize = 10;
3516 1.11 christos for (int i = 0; i < ia->datasize; ++i)
3517 1.11 christos ia->data[i] = i * 1.234;
3518 1.11 christos
3519 1.11 christos // Check named initializers.
3520 1.11 christos struct named_init ni = {
3521 1.11 christos .number = 34,
3522 1.11 christos .name = L"Test wide string",
3523 1.11 christos .average = 543.34343,
3524 1.11 christos };
3525 1.11 christos
3526 1.11 christos ni.number = 58;
3527 1.11 christos
3528 1.11 christos int dynamic_array[ni.number];
3529 1.11 christos dynamic_array[ni.number - 1] = 543;
3530 1.11 christos
3531 1.11 christos // work around unused variable warnings
3532 1.11 christos return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
3533 1.11 christos || dynamic_array[ni.number - 1] != 543);
3534 1.11 christos
3535 1.1 christos ;
3536 1.1 christos return 0;
3537 1.1 christos }
3538 1.1 christos _ACEOF
3539 1.11 christos for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
3540 1.11 christos do
3541 1.11 christos CC="$ac_save_CC $ac_arg"
3542 1.11 christos if ac_fn_c_try_compile "$LINENO"; then :
3543 1.11 christos ac_cv_prog_cc_c99=$ac_arg
3544 1.11 christos fi
3545 1.11 christos rm -f core conftest.err conftest.$ac_objext
3546 1.11 christos test "x$ac_cv_prog_cc_c99" != "xno" && break
3547 1.11 christos done
3548 1.11 christos rm -f conftest.$ac_ext
3549 1.11 christos CC=$ac_save_CC
3550 1.4 christos
3551 1.11 christos fi
3552 1.11 christos # AC_CACHE_VAL
3553 1.11 christos case "x$ac_cv_prog_cc_c99" in
3554 1.11 christos x)
3555 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3556 1.11 christos $as_echo "none needed" >&6; } ;;
3557 1.11 christos xno)
3558 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3559 1.11 christos $as_echo "unsupported" >&6; } ;;
3560 1.11 christos *)
3561 1.11 christos CC="$CC $ac_cv_prog_cc_c99"
3562 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3563 1.11 christos $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
3564 1.11 christos esac
3565 1.11 christos if test "x$ac_cv_prog_cc_c99" != xno; then :
3566 1.4 christos
3567 1.11 christos fi
3568 1.1 christos
3569 1.4 christos
3570 1.11 christos if test "$ac_cv_prog_cc_c99" = "no"; then
3571 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The C compiler does not support C99; there may be compiler errors" >&5
3572 1.11 christos $as_echo "$as_me: WARNING: The C compiler does not support C99; there may be compiler errors" >&2;}
3573 1.1 christos fi
3574 1.4 christos
3575 1.11 christos
3576 1.11 christos
3577 1.11 christos
3578 1.11 christos if test "$GCC" = yes ; then
3579 1.11 christos #
3580 1.11 christos # -Werror forces warnings to be errors.
3581 1.11 christos #
3582 1.11 christos ac_lbl_cc_force_warning_errors=-Werror
3583 1.4 christos else
3584 1.4 christos V_INCLS="$V_INCLS -I/usr/local/include"
3585 1.4 christos LDFLAGS="$LDFLAGS -L/usr/local/lib"
3586 1.4 christos
3587 1.4 christos case "$host_os" in
3588 1.4 christos
3589 1.4 christos darwin*)
3590 1.4 christos #
3591 1.4 christos # This is assumed either to be GCC or clang, both
3592 1.4 christos # of which use -Werror to force warnings to be errors.
3593 1.4 christos #
3594 1.4 christos ac_lbl_cc_force_warning_errors=-Werror
3595 1.4 christos ;;
3596 1.4 christos
3597 1.4 christos hpux*)
3598 1.4 christos #
3599 1.4 christos # HP C, which is what we presume we're using, doesn't
3600 1.4 christos # exit with a non-zero exit status if we hand it an
3601 1.4 christos # invalid -W flag, can't be forced to do so even with
3602 1.4 christos # +We, and doesn't handle GCC-style -W flags, so we
3603 1.4 christos # don't want to try using GCC-style -W flags.
3604 1.4 christos #
3605 1.4 christos ac_lbl_cc_dont_try_gcc_dashW=yes
3606 1.4 christos ;;
3607 1.4 christos
3608 1.4 christos irix*)
3609 1.4 christos #
3610 1.4 christos # MIPS C, which is what we presume we're using, doesn't
3611 1.4 christos # necessarily exit with a non-zero exit status if we
3612 1.4 christos # hand it an invalid -W flag, can't be forced to do
3613 1.4 christos # so, and doesn't handle GCC-style -W flags, so we
3614 1.4 christos # don't want to try using GCC-style -W flags.
3615 1.4 christos #
3616 1.4 christos ac_lbl_cc_dont_try_gcc_dashW=yes
3617 1.4 christos #
3618 1.4 christos # It also, apparently, defaults to "char" being
3619 1.4 christos # unsigned, unlike most other C implementations;
3620 1.4 christos # I suppose we could say "signed char" whenever
3621 1.4 christos # we want to guarantee a signed "char", but let's
3622 1.4 christos # just force signed chars.
3623 1.4 christos #
3624 1.4 christos # -xansi is normally the default, but the
3625 1.4 christos # configure script was setting it; perhaps -cckr
3626 1.4 christos # was the default in the Old Days. (Then again,
3627 1.4 christos # that would probably be for backwards compatibility
3628 1.4 christos # in the days when ANSI C was Shiny and New, i.e.
3629 1.4 christos # 1989 and the early '90's, so maybe we can just
3630 1.4 christos # drop support for those compilers.)
3631 1.4 christos #
3632 1.4 christos # -g is equivalent to -g2, which turns off
3633 1.4 christos # optimization; we choose -g3, which generates
3634 1.4 christos # debugging information but doesn't turn off
3635 1.4 christos # optimization (even if the optimization would
3636 1.4 christos # cause inaccuracies in debugging).
3637 1.4 christos #
3638 1.4 christos V_CCOPT="$V_CCOPT -xansi -signed -g3"
3639 1.4 christos ;;
3640 1.4 christos
3641 1.4 christos osf*)
3642 1.11 christos #
3643 1.4 christos # Presumed to be DEC OSF/1, Digital UNIX, or
3644 1.4 christos # Tru64 UNIX.
3645 1.4 christos #
3646 1.4 christos # The DEC C compiler, which is what we presume we're
3647 1.4 christos # using, doesn't exit with a non-zero exit status if we
3648 1.4 christos # hand it an invalid -W flag, can't be forced to do
3649 1.4 christos # so, and doesn't handle GCC-style -W flags, so we
3650 1.4 christos # don't want to try using GCC-style -W flags.
3651 1.4 christos #
3652 1.4 christos ac_lbl_cc_dont_try_gcc_dashW=yes
3653 1.4 christos #
3654 1.4 christos # -g is equivalent to -g2, which turns off
3655 1.4 christos # optimization; we choose -g3, which generates
3656 1.4 christos # debugging information but doesn't turn off
3657 1.4 christos # optimization (even if the optimization would
3658 1.4 christos # cause inaccuracies in debugging).
3659 1.4 christos #
3660 1.4 christos V_CCOPT="$V_CCOPT -g3"
3661 1.4 christos ;;
3662 1.1 christos
3663 1.4 christos solaris*)
3664 1.4 christos #
3665 1.4 christos # Assumed to be Sun C, which requires -errwarn to force
3666 1.4 christos # warnings to be treated as errors.
3667 1.4 christos #
3668 1.4 christos ac_lbl_cc_force_warning_errors=-errwarn
3669 1.4 christos ;;
3670 1.1 christos
3671 1.4 christos ultrix*)
3672 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking that Ultrix $CC hacks const in prototypes" >&5
3673 1.4 christos $as_echo_n "checking that Ultrix $CC hacks const in prototypes... " >&6; }
3674 1.4 christos if ${ac_cv_lbl_cc_const_proto+:} false; then :
3675 1.4 christos $as_echo_n "(cached) " >&6
3676 1.1 christos else
3677 1.11 christos
3678 1.11 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3679 1.1 christos /* end confdefs.h. */
3680 1.1 christos #include <sys/types.h>
3681 1.1 christos int
3682 1.1 christos main ()
3683 1.1 christos {
3684 1.4 christos struct a { int b; };
3685 1.4 christos void c(const struct a *)
3686 1.1 christos ;
3687 1.1 christos return 0;
3688 1.1 christos }
3689 1.1 christos _ACEOF
3690 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
3691 1.4 christos ac_cv_lbl_cc_const_proto=yes
3692 1.4 christos else
3693 1.4 christos ac_cv_lbl_cc_const_proto=no
3694 1.4 christos fi
3695 1.4 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3696 1.4 christos fi
3697 1.4 christos
3698 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_const_proto" >&5
3699 1.4 christos $as_echo "$ac_cv_lbl_cc_const_proto" >&6; }
3700 1.4 christos if test $ac_cv_lbl_cc_const_proto = no ; then
3701 1.1 christos
3702 1.4 christos $as_echo "#define const /**/" >>confdefs.h
3703 1.1 christos
3704 1.1 christos fi
3705 1.1 christos ;;
3706 1.1 christos esac
3707 1.4 christos V_CCOPT="$V_CCOPT -O"
3708 1.1 christos fi
3709 1.1 christos
3710 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
3711 1.4 christos $as_echo_n "checking for inline... " >&6; }
3712 1.1 christos save_CFLAGS="$CFLAGS"
3713 1.1 christos CFLAGS="$V_CCOPT"
3714 1.4 christos if ${ac_cv_lbl_inline+:} false; then :
3715 1.4 christos $as_echo_n "(cached) " >&6
3716 1.1 christos else
3717 1.1 christos
3718 1.1 christos ac_cv_lbl_inline=""
3719 1.1 christos ac_lbl_cc_inline=no
3720 1.1 christos for ac_lbl_inline in inline __inline__ __inline
3721 1.1 christos do
3722 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3723 1.1 christos /* end confdefs.h. */
3724 1.1 christos #define inline $ac_lbl_inline
3725 1.1 christos static inline struct iltest *foo(void);
3726 1.1 christos struct iltest {
3727 1.1 christos int iltest1;
3728 1.1 christos int iltest2;
3729 1.1 christos };
3730 1.1 christos
3731 1.1 christos static inline struct iltest *
3732 1.1 christos foo()
3733 1.1 christos {
3734 1.1 christos static struct iltest xxx;
3735 1.1 christos
3736 1.1 christos return &xxx;
3737 1.1 christos }
3738 1.1 christos int
3739 1.1 christos main ()
3740 1.1 christos {
3741 1.1 christos
3742 1.1 christos ;
3743 1.1 christos return 0;
3744 1.1 christos }
3745 1.1 christos _ACEOF
3746 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
3747 1.1 christos ac_lbl_cc_inline=yes
3748 1.1 christos fi
3749 1.1 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3750 1.1 christos if test "$ac_lbl_cc_inline" = yes ; then
3751 1.1 christos break;
3752 1.1 christos fi
3753 1.1 christos done
3754 1.1 christos if test "$ac_lbl_cc_inline" = yes ; then
3755 1.1 christos ac_cv_lbl_inline=$ac_lbl_inline
3756 1.1 christos fi
3757 1.1 christos fi
3758 1.1 christos
3759 1.1 christos CFLAGS="$save_CFLAGS"
3760 1.1 christos if test ! -z "$ac_cv_lbl_inline" ; then
3761 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_inline" >&5
3762 1.4 christos $as_echo "$ac_cv_lbl_inline" >&6; }
3763 1.1 christos else
3764 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3765 1.4 christos $as_echo "no" >&6; }
3766 1.1 christos fi
3767 1.1 christos
3768 1.1 christos cat >>confdefs.h <<_ACEOF
3769 1.1 christos #define inline $ac_cv_lbl_inline
3770 1.1 christos _ACEOF
3771 1.1 christos
3772 1.1 christos
3773 1.1 christos ac_ext=c
3774 1.1 christos ac_cpp='$CPP $CPPFLAGS'
3775 1.1 christos ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3776 1.1 christos ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3777 1.1 christos ac_compiler_gnu=$ac_cv_c_compiler_gnu
3778 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3779 1.4 christos $as_echo_n "checking how to run the C preprocessor... " >&6; }
3780 1.1 christos # On Suns, sometimes $CPP names a directory.
3781 1.1 christos if test -n "$CPP" && test -d "$CPP"; then
3782 1.1 christos CPP=
3783 1.1 christos fi
3784 1.1 christos if test -z "$CPP"; then
3785 1.4 christos if ${ac_cv_prog_CPP+:} false; then :
3786 1.4 christos $as_echo_n "(cached) " >&6
3787 1.1 christos else
3788 1.1 christos # Double quotes because CPP needs to be expanded
3789 1.1 christos for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3790 1.1 christos do
3791 1.1 christos ac_preproc_ok=false
3792 1.1 christos for ac_c_preproc_warn_flag in '' yes
3793 1.1 christos do
3794 1.1 christos # Use a header file that comes with gcc, so configuring glibc
3795 1.1 christos # with a fresh cross-compiler works.
3796 1.1 christos # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3797 1.1 christos # <limits.h> exists even on freestanding compilers.
3798 1.1 christos # On the NeXT, cc -E runs the code through the compiler's parser,
3799 1.1 christos # not just through cpp. "Syntax error" is here to catch this case.
3800 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3801 1.1 christos /* end confdefs.h. */
3802 1.1 christos #ifdef __STDC__
3803 1.1 christos # include <limits.h>
3804 1.1 christos #else
3805 1.1 christos # include <assert.h>
3806 1.1 christos #endif
3807 1.1 christos Syntax error
3808 1.1 christos _ACEOF
3809 1.4 christos if ac_fn_c_try_cpp "$LINENO"; then :
3810 1.4 christos
3811 1.1 christos else
3812 1.1 christos # Broken: fails on valid input.
3813 1.1 christos continue
3814 1.1 christos fi
3815 1.4 christos rm -f conftest.err conftest.i conftest.$ac_ext
3816 1.1 christos
3817 1.1 christos # OK, works on sane cases. Now check whether nonexistent headers
3818 1.1 christos # can be detected and how.
3819 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3820 1.1 christos /* end confdefs.h. */
3821 1.1 christos #include <ac_nonexistent.h>
3822 1.1 christos _ACEOF
3823 1.4 christos if ac_fn_c_try_cpp "$LINENO"; then :
3824 1.1 christos # Broken: success on invalid input.
3825 1.1 christos continue
3826 1.1 christos else
3827 1.1 christos # Passes both tests.
3828 1.1 christos ac_preproc_ok=:
3829 1.1 christos break
3830 1.1 christos fi
3831 1.4 christos rm -f conftest.err conftest.i conftest.$ac_ext
3832 1.1 christos
3833 1.1 christos done
3834 1.1 christos # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3835 1.4 christos rm -f conftest.i conftest.err conftest.$ac_ext
3836 1.4 christos if $ac_preproc_ok; then :
3837 1.1 christos break
3838 1.1 christos fi
3839 1.1 christos
3840 1.1 christos done
3841 1.1 christos ac_cv_prog_CPP=$CPP
3842 1.1 christos
3843 1.1 christos fi
3844 1.1 christos CPP=$ac_cv_prog_CPP
3845 1.1 christos else
3846 1.1 christos ac_cv_prog_CPP=$CPP
3847 1.1 christos fi
3848 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3849 1.4 christos $as_echo "$CPP" >&6; }
3850 1.1 christos ac_preproc_ok=false
3851 1.1 christos for ac_c_preproc_warn_flag in '' yes
3852 1.1 christos do
3853 1.1 christos # Use a header file that comes with gcc, so configuring glibc
3854 1.1 christos # with a fresh cross-compiler works.
3855 1.1 christos # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3856 1.1 christos # <limits.h> exists even on freestanding compilers.
3857 1.1 christos # On the NeXT, cc -E runs the code through the compiler's parser,
3858 1.1 christos # not just through cpp. "Syntax error" is here to catch this case.
3859 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3860 1.1 christos /* end confdefs.h. */
3861 1.1 christos #ifdef __STDC__
3862 1.1 christos # include <limits.h>
3863 1.1 christos #else
3864 1.1 christos # include <assert.h>
3865 1.1 christos #endif
3866 1.1 christos Syntax error
3867 1.1 christos _ACEOF
3868 1.4 christos if ac_fn_c_try_cpp "$LINENO"; then :
3869 1.4 christos
3870 1.1 christos else
3871 1.1 christos # Broken: fails on valid input.
3872 1.1 christos continue
3873 1.1 christos fi
3874 1.4 christos rm -f conftest.err conftest.i conftest.$ac_ext
3875 1.1 christos
3876 1.1 christos # OK, works on sane cases. Now check whether nonexistent headers
3877 1.1 christos # can be detected and how.
3878 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3879 1.1 christos /* end confdefs.h. */
3880 1.1 christos #include <ac_nonexistent.h>
3881 1.1 christos _ACEOF
3882 1.4 christos if ac_fn_c_try_cpp "$LINENO"; then :
3883 1.1 christos # Broken: success on invalid input.
3884 1.1 christos continue
3885 1.1 christos else
3886 1.1 christos # Passes both tests.
3887 1.1 christos ac_preproc_ok=:
3888 1.1 christos break
3889 1.1 christos fi
3890 1.4 christos rm -f conftest.err conftest.i conftest.$ac_ext
3891 1.1 christos
3892 1.1 christos done
3893 1.1 christos # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3894 1.4 christos rm -f conftest.i conftest.err conftest.$ac_ext
3895 1.4 christos if $ac_preproc_ok; then :
3896 1.4 christos
3897 1.1 christos else
3898 1.4 christos { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3899 1.4 christos $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3900 1.4 christos as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3901 1.4 christos See \`config.log' for more details" "$LINENO" 5; }
3902 1.1 christos fi
3903 1.1 christos
3904 1.1 christos ac_ext=c
3905 1.1 christos ac_cpp='$CPP $CPPFLAGS'
3906 1.1 christos ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3907 1.1 christos ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3908 1.1 christos ac_compiler_gnu=$ac_cv_c_compiler_gnu
3909 1.1 christos
3910 1.1 christos
3911 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3912 1.4 christos $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3913 1.4 christos if ${ac_cv_path_GREP+:} false; then :
3914 1.4 christos $as_echo_n "(cached) " >&6
3915 1.1 christos else
3916 1.4 christos if test -z "$GREP"; then
3917 1.1 christos ac_path_GREP_found=false
3918 1.4 christos # Loop through the user's path and test for each of PROGNAME-LIST
3919 1.4 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3920 1.1 christos for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3921 1.1 christos do
3922 1.1 christos IFS=$as_save_IFS
3923 1.1 christos test -z "$as_dir" && as_dir=.
3924 1.4 christos for ac_prog in grep ggrep; do
3925 1.4 christos for ac_exec_ext in '' $ac_executable_extensions; do
3926 1.4 christos ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3927 1.4 christos as_fn_executable_p "$ac_path_GREP" || continue
3928 1.4 christos # Check for GNU ac_path_GREP and select it if it is found.
3929 1.1 christos # Check for GNU $ac_path_GREP
3930 1.1 christos case `"$ac_path_GREP" --version 2>&1` in
3931 1.1 christos *GNU*)
3932 1.1 christos ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3933 1.1 christos *)
3934 1.1 christos ac_count=0
3935 1.4 christos $as_echo_n 0123456789 >"conftest.in"
3936 1.1 christos while :
3937 1.1 christos do
3938 1.1 christos cat "conftest.in" "conftest.in" >"conftest.tmp"
3939 1.1 christos mv "conftest.tmp" "conftest.in"
3940 1.1 christos cp "conftest.in" "conftest.nl"
3941 1.4 christos $as_echo 'GREP' >> "conftest.nl"
3942 1.1 christos "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3943 1.1 christos diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3944 1.4 christos as_fn_arith $ac_count + 1 && ac_count=$as_val
3945 1.1 christos if test $ac_count -gt ${ac_path_GREP_max-0}; then
3946 1.1 christos # Best one so far, save it but keep looking for a better one
3947 1.1 christos ac_cv_path_GREP="$ac_path_GREP"
3948 1.1 christos ac_path_GREP_max=$ac_count
3949 1.1 christos fi
3950 1.1 christos # 10*(2^10) chars as input seems more than enough
3951 1.1 christos test $ac_count -gt 10 && break
3952 1.1 christos done
3953 1.1 christos rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3954 1.1 christos esac
3955 1.1 christos
3956 1.4 christos $ac_path_GREP_found && break 3
3957 1.4 christos done
3958 1.4 christos done
3959 1.1 christos done
3960 1.1 christos IFS=$as_save_IFS
3961 1.4 christos if test -z "$ac_cv_path_GREP"; then
3962 1.4 christos as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3963 1.4 christos fi
3964 1.1 christos else
3965 1.1 christos ac_cv_path_GREP=$GREP
3966 1.1 christos fi
3967 1.1 christos
3968 1.1 christos fi
3969 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3970 1.4 christos $as_echo "$ac_cv_path_GREP" >&6; }
3971 1.1 christos GREP="$ac_cv_path_GREP"
3972 1.1 christos
3973 1.1 christos
3974 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3975 1.4 christos $as_echo_n "checking for egrep... " >&6; }
3976 1.4 christos if ${ac_cv_path_EGREP+:} false; then :
3977 1.4 christos $as_echo_n "(cached) " >&6
3978 1.1 christos else
3979 1.1 christos if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3980 1.1 christos then ac_cv_path_EGREP="$GREP -E"
3981 1.1 christos else
3982 1.4 christos if test -z "$EGREP"; then
3983 1.1 christos ac_path_EGREP_found=false
3984 1.4 christos # Loop through the user's path and test for each of PROGNAME-LIST
3985 1.4 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3986 1.1 christos for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3987 1.1 christos do
3988 1.1 christos IFS=$as_save_IFS
3989 1.1 christos test -z "$as_dir" && as_dir=.
3990 1.4 christos for ac_prog in egrep; do
3991 1.4 christos for ac_exec_ext in '' $ac_executable_extensions; do
3992 1.4 christos ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3993 1.4 christos as_fn_executable_p "$ac_path_EGREP" || continue
3994 1.4 christos # Check for GNU ac_path_EGREP and select it if it is found.
3995 1.1 christos # Check for GNU $ac_path_EGREP
3996 1.1 christos case `"$ac_path_EGREP" --version 2>&1` in
3997 1.1 christos *GNU*)
3998 1.1 christos ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3999 1.1 christos *)
4000 1.1 christos ac_count=0
4001 1.4 christos $as_echo_n 0123456789 >"conftest.in"
4002 1.1 christos while :
4003 1.1 christos do
4004 1.1 christos cat "conftest.in" "conftest.in" >"conftest.tmp"
4005 1.1 christos mv "conftest.tmp" "conftest.in"
4006 1.1 christos cp "conftest.in" "conftest.nl"
4007 1.4 christos $as_echo 'EGREP' >> "conftest.nl"
4008 1.1 christos "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4009 1.1 christos diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4010 1.4 christos as_fn_arith $ac_count + 1 && ac_count=$as_val
4011 1.1 christos if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4012 1.1 christos # Best one so far, save it but keep looking for a better one
4013 1.1 christos ac_cv_path_EGREP="$ac_path_EGREP"
4014 1.1 christos ac_path_EGREP_max=$ac_count
4015 1.1 christos fi
4016 1.1 christos # 10*(2^10) chars as input seems more than enough
4017 1.1 christos test $ac_count -gt 10 && break
4018 1.1 christos done
4019 1.1 christos rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4020 1.1 christos esac
4021 1.1 christos
4022 1.4 christos $ac_path_EGREP_found && break 3
4023 1.4 christos done
4024 1.4 christos done
4025 1.1 christos done
4026 1.1 christos IFS=$as_save_IFS
4027 1.4 christos if test -z "$ac_cv_path_EGREP"; then
4028 1.4 christos as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4029 1.4 christos fi
4030 1.1 christos else
4031 1.1 christos ac_cv_path_EGREP=$EGREP
4032 1.1 christos fi
4033 1.1 christos
4034 1.1 christos fi
4035 1.1 christos fi
4036 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4037 1.4 christos $as_echo "$ac_cv_path_EGREP" >&6; }
4038 1.1 christos EGREP="$ac_cv_path_EGREP"
4039 1.1 christos
4040 1.1 christos
4041 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4042 1.4 christos $as_echo_n "checking for ANSI C header files... " >&6; }
4043 1.4 christos if ${ac_cv_header_stdc+:} false; then :
4044 1.4 christos $as_echo_n "(cached) " >&6
4045 1.1 christos else
4046 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4047 1.1 christos /* end confdefs.h. */
4048 1.1 christos #include <stdlib.h>
4049 1.1 christos #include <stdarg.h>
4050 1.1 christos #include <string.h>
4051 1.1 christos #include <float.h>
4052 1.1 christos
4053 1.1 christos int
4054 1.1 christos main ()
4055 1.1 christos {
4056 1.1 christos
4057 1.1 christos ;
4058 1.1 christos return 0;
4059 1.1 christos }
4060 1.1 christos _ACEOF
4061 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
4062 1.1 christos ac_cv_header_stdc=yes
4063 1.1 christos else
4064 1.4 christos ac_cv_header_stdc=no
4065 1.1 christos fi
4066 1.1 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4067 1.1 christos
4068 1.1 christos if test $ac_cv_header_stdc = yes; then
4069 1.1 christos # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4070 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4071 1.1 christos /* end confdefs.h. */
4072 1.1 christos #include <string.h>
4073 1.1 christos
4074 1.1 christos _ACEOF
4075 1.1 christos if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4076 1.4 christos $EGREP "memchr" >/dev/null 2>&1; then :
4077 1.4 christos
4078 1.1 christos else
4079 1.1 christos ac_cv_header_stdc=no
4080 1.1 christos fi
4081 1.4 christos rm -f conftest*
4082 1.1 christos
4083 1.1 christos fi
4084 1.1 christos
4085 1.1 christos if test $ac_cv_header_stdc = yes; then
4086 1.1 christos # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4087 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4088 1.1 christos /* end confdefs.h. */
4089 1.1 christos #include <stdlib.h>
4090 1.1 christos
4091 1.1 christos _ACEOF
4092 1.1 christos if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4093 1.4 christos $EGREP "free" >/dev/null 2>&1; then :
4094 1.4 christos
4095 1.1 christos else
4096 1.1 christos ac_cv_header_stdc=no
4097 1.1 christos fi
4098 1.4 christos rm -f conftest*
4099 1.1 christos
4100 1.1 christos fi
4101 1.1 christos
4102 1.1 christos if test $ac_cv_header_stdc = yes; then
4103 1.1 christos # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4104 1.4 christos if test "$cross_compiling" = yes; then :
4105 1.1 christos :
4106 1.1 christos else
4107 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4108 1.1 christos /* end confdefs.h. */
4109 1.1 christos #include <ctype.h>
4110 1.1 christos #include <stdlib.h>
4111 1.1 christos #if ((' ' & 0x0FF) == 0x020)
4112 1.1 christos # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4113 1.1 christos # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4114 1.1 christos #else
4115 1.1 christos # define ISLOWER(c) \
4116 1.1 christos (('a' <= (c) && (c) <= 'i') \
4117 1.1 christos || ('j' <= (c) && (c) <= 'r') \
4118 1.1 christos || ('s' <= (c) && (c) <= 'z'))
4119 1.1 christos # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4120 1.1 christos #endif
4121 1.1 christos
4122 1.1 christos #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4123 1.1 christos int
4124 1.1 christos main ()
4125 1.1 christos {
4126 1.1 christos int i;
4127 1.1 christos for (i = 0; i < 256; i++)
4128 1.1 christos if (XOR (islower (i), ISLOWER (i))
4129 1.1 christos || toupper (i) != TOUPPER (i))
4130 1.1 christos return 2;
4131 1.1 christos return 0;
4132 1.1 christos }
4133 1.1 christos _ACEOF
4134 1.4 christos if ac_fn_c_try_run "$LINENO"; then :
4135 1.4 christos
4136 1.1 christos else
4137 1.4 christos ac_cv_header_stdc=no
4138 1.1 christos fi
4139 1.4 christos rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4140 1.4 christos conftest.$ac_objext conftest.beam conftest.$ac_ext
4141 1.1 christos fi
4142 1.1 christos
4143 1.1 christos fi
4144 1.1 christos fi
4145 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4146 1.4 christos $as_echo "$ac_cv_header_stdc" >&6; }
4147 1.1 christos if test $ac_cv_header_stdc = yes; then
4148 1.1 christos
4149 1.4 christos $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4150 1.1 christos
4151 1.1 christos fi
4152 1.1 christos
4153 1.1 christos # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4154 1.1 christos for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4155 1.1 christos inttypes.h stdint.h unistd.h
4156 1.4 christos do :
4157 1.4 christos as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4158 1.4 christos ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4159 1.4 christos "
4160 1.4 christos if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4161 1.1 christos cat >>confdefs.h <<_ACEOF
4162 1.4 christos #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4163 1.1 christos _ACEOF
4164 1.1 christos
4165 1.1 christos fi
4166 1.1 christos
4167 1.1 christos done
4168 1.1 christos
4169 1.1 christos
4170 1.11 christos for ac_header in fcntl.h rpc/rpc.h rpc/rpcent.h net/if.h
4171 1.4 christos do :
4172 1.4 christos as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4173 1.4 christos ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4174 1.4 christos if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4175 1.1 christos cat >>confdefs.h <<_ACEOF
4176 1.4 christos #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4177 1.1 christos _ACEOF
4178 1.1 christos
4179 1.1 christos fi
4180 1.1 christos
4181 1.1 christos done
4182 1.1 christos
4183 1.1 christos
4184 1.1 christos case "$host_os" in
4185 1.1 christos
4186 1.3 christos darwin*)
4187 1.3 christos # Check whether --enable-universal was given.
4188 1.4 christos if test "${enable_universal+set}" = set; then :
4189 1.3 christos enableval=$enable_universal;
4190 1.3 christos fi
4191 1.3 christos
4192 1.3 christos if test "$enable_universal" != "no"; then
4193 1.3 christos case "$host_os" in
4194 1.3 christos
4195 1.3 christos darwin9.*)
4196 1.3 christos #
4197 1.3 christos # Leopard. Build for x86 and 32-bit PowerPC, with
4198 1.3 christos # x86 first. (That's what Apple does.)
4199 1.3 christos #
4200 1.3 christos V_CCOPT="$V_CCOPT -arch i386 -arch ppc"
4201 1.3 christos LDFLAGS="$LDFLAGS -arch i386 -arch ppc"
4202 1.3 christos ;;
4203 1.3 christos
4204 1.3 christos darwin10.*)
4205 1.3 christos #
4206 1.3 christos # Snow Leopard. Build for x86-64 and x86, with
4207 1.3 christos # x86-64 first. (That's what Apple does.)
4208 1.3 christos #
4209 1.3 christos V_CCOPT="$V_CCOPT -arch x86_64 -arch i386"
4210 1.3 christos LDFLAGS="$LDFLAGS -arch x86_64 -arch i386"
4211 1.3 christos ;;
4212 1.3 christos esac
4213 1.3 christos fi
4214 1.3 christos ;;
4215 1.1 christos esac
4216 1.1 christos
4217 1.1 christos
4218 1.1 christos
4219 1.1 christos # Check whether --with-smi was given.
4220 1.4 christos if test "${with_smi+set}" = set; then :
4221 1.1 christos withval=$with_smi;
4222 1.1 christos else
4223 1.1 christos with_smi=yes
4224 1.1 christos fi
4225 1.1 christos
4226 1.1 christos
4227 1.1 christos if test "x$with_smi" != "xno" ; then
4228 1.5 christos ac_fn_c_check_header_mongrel "$LINENO" "smi.h" "ac_cv_header_smi_h" "$ac_includes_default"
4229 1.4 christos if test "x$ac_cv_header_smi_h" = xyes; then :
4230 1.1 christos
4231 1.5 christos #
4232 1.5 christos # OK, we found smi.h. Do we have libsmi with smiInit?
4233 1.5 christos #
4234 1.5 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for smiInit in -lsmi" >&5
4235 1.4 christos $as_echo_n "checking for smiInit in -lsmi... " >&6; }
4236 1.4 christos if ${ac_cv_lib_smi_smiInit+:} false; then :
4237 1.4 christos $as_echo_n "(cached) " >&6
4238 1.4 christos else
4239 1.1 christos ac_check_lib_save_LIBS=$LIBS
4240 1.1 christos LIBS="-lsmi $LIBS"
4241 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4242 1.1 christos /* end confdefs.h. */
4243 1.1 christos
4244 1.1 christos /* Override any GCC internal prototype to avoid an error.
4245 1.1 christos Use char because int might match the return type of a GCC
4246 1.1 christos builtin and then its argument prototype would still apply. */
4247 1.1 christos #ifdef __cplusplus
4248 1.1 christos extern "C"
4249 1.1 christos #endif
4250 1.1 christos char smiInit ();
4251 1.1 christos int
4252 1.1 christos main ()
4253 1.1 christos {
4254 1.1 christos return smiInit ();
4255 1.1 christos ;
4256 1.1 christos return 0;
4257 1.1 christos }
4258 1.1 christos _ACEOF
4259 1.4 christos if ac_fn_c_try_link "$LINENO"; then :
4260 1.1 christos ac_cv_lib_smi_smiInit=yes
4261 1.1 christos else
4262 1.4 christos ac_cv_lib_smi_smiInit=no
4263 1.1 christos fi
4264 1.4 christos rm -f core conftest.err conftest.$ac_objext \
4265 1.4 christos conftest$ac_exeext conftest.$ac_ext
4266 1.1 christos LIBS=$ac_check_lib_save_LIBS
4267 1.1 christos fi
4268 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_smi_smiInit" >&5
4269 1.4 christos $as_echo "$ac_cv_lib_smi_smiInit" >&6; }
4270 1.4 christos if test "x$ac_cv_lib_smi_smiInit" = xyes; then :
4271 1.1 christos
4272 1.5 christos #
4273 1.5 christos # OK, we have libsmi with smiInit. Can we use it?
4274 1.5 christos #
4275 1.5 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable libsmi" >&5
4276 1.5 christos $as_echo_n "checking whether to enable libsmi... " >&6; }
4277 1.5 christos savedlibs="$LIBS"
4278 1.5 christos LIBS="-lsmi $LIBS"
4279 1.5 christos if test "$cross_compiling" = yes; then :
4280 1.1 christos
4281 1.5 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: not when cross-compiling" >&5
4282 1.5 christos $as_echo "not when cross-compiling" >&6; }
4283 1.5 christos LIBS="$savedlibs"
4284 1.1 christos
4285 1.1 christos
4286 1.1 christos else
4287 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4288 1.1 christos /* end confdefs.h. */
4289 1.5 christos
4290 1.5 christos /* libsmi available check */
4291 1.11 christos #include <stdio.h>
4292 1.11 christos #include <stdlib.h>
4293 1.11 christos #include <string.h>
4294 1.1 christos #include <smi.h>
4295 1.11 christos int main()
4296 1.1 christos {
4297 1.1 christos int current, revision, age, n;
4298 1.1 christos const int required = 2;
4299 1.1 christos if (smiInit(""))
4300 1.1 christos exit(1);
4301 1.1 christos if (strcmp(SMI_LIBRARY_VERSION, smi_library_version))
4302 1.1 christos exit(2);
4303 1.1 christos n = sscanf(smi_library_version, "%d:%d:%d", ¤t, &revision, &age);
4304 1.1 christos if (n != 3)
4305 1.1 christos exit(3);
4306 1.1 christos if (required < current - age || required > current)
4307 1.1 christos exit(4);
4308 1.1 christos exit(0);
4309 1.1 christos }
4310 1.1 christos
4311 1.1 christos _ACEOF
4312 1.4 christos if ac_fn_c_try_run "$LINENO"; then :
4313 1.5 christos
4314 1.5 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4315 1.4 christos $as_echo "yes" >&6; }
4316 1.4 christos
4317 1.5 christos $as_echo "#define USE_LIBSMI 1" >>confdefs.h
4318 1.5 christos
4319 1.1 christos
4320 1.1 christos else
4321 1.5 christos
4322 1.5 christos case $? in
4323 1.5 christos 1) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - smiInit failed" >&5
4324 1.4 christos $as_echo "no - smiInit failed" >&6; } ;;
4325 1.5 christos 2) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - header/library version mismatch" >&5
4326 1.4 christos $as_echo "no - header/library version mismatch" >&6; } ;;
4327 1.5 christos 3) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - can't determine library version" >&5
4328 1.4 christos $as_echo "no - can't determine library version" >&6; } ;;
4329 1.5 christos 4) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - too old" >&5
4330 1.4 christos $as_echo "no - too old" >&6; } ;;
4331 1.5 christos *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4332 1.4 christos $as_echo "no" >&6; } ;;
4333 1.5 christos esac
4334 1.5 christos LIBS="$savedlibs"
4335 1.5 christos
4336 1.1 christos fi
4337 1.4 christos rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4338 1.4 christos conftest.$ac_objext conftest.beam conftest.$ac_ext
4339 1.1 christos fi
4340 1.1 christos
4341 1.5 christos
4342 1.5 christos fi
4343 1.5 christos
4344 1.5 christos
4345 1.1 christos fi
4346 1.5 christos
4347 1.5 christos
4348 1.1 christos fi
4349 1.1 christos
4350 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable the possibly-buggy SMB printer" >&5
4351 1.4 christos $as_echo_n "checking whether to enable the possibly-buggy SMB printer... " >&6; }
4352 1.1 christos # Check whether --enable-smb was given.
4353 1.4 christos if test "${enable_smb+set}" = set; then :
4354 1.1 christos enableval=$enable_smb;
4355 1.1 christos else
4356 1.10 christos enableval=no
4357 1.1 christos fi
4358 1.1 christos
4359 1.1 christos case "$enableval" in
4360 1.4 christos yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4361 1.4 christos $as_echo "yes" >&6; }
4362 1.4 christos
4363 1.7 christos $as_echo "#define ENABLE_SMB 1" >>confdefs.h
4364 1.1 christos
4365 1.1 christos LOCALSRC="print-smb.c smbutil.c $LOCALSRC"
4366 1.1 christos ;;
4367 1.4 christos *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4368 1.4 christos $as_echo "no" >&6; }
4369 1.1 christos ;;
4370 1.1 christos esac
4371 1.1 christos
4372 1.1 christos
4373 1.1 christos # Check whether --with-user was given.
4374 1.4 christos if test "${with_user+set}" = set; then :
4375 1.1 christos withval=$with_user;
4376 1.1 christos fi
4377 1.1 christos
4378 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to drop root privileges by default" >&5
4379 1.4 christos $as_echo_n "checking whether to drop root privileges by default... " >&6; }
4380 1.1 christos if test ! -z "$with_user" ; then
4381 1.4 christos
4382 1.4 christos cat >>confdefs.h <<_ACEOF
4383 1.1 christos #define WITH_USER "$withval"
4384 1.1 christos _ACEOF
4385 1.1 christos
4386 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: to \"$withval\"" >&5
4387 1.4 christos $as_echo "to \"$withval\"" >&6; }
4388 1.1 christos else
4389 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4390 1.4 christos $as_echo "no" >&6; }
4391 1.1 christos fi
4392 1.1 christos
4393 1.1 christos
4394 1.1 christos # Check whether --with-chroot was given.
4395 1.4 christos if test "${with_chroot+set}" = set; then :
4396 1.1 christos withval=$with_chroot;
4397 1.1 christos fi
4398 1.1 christos
4399 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to chroot" >&5
4400 1.4 christos $as_echo_n "checking whether to chroot... " >&6; }
4401 1.1 christos if test ! -z "$with_chroot" && test "$with_chroot" != "no" ; then
4402 1.4 christos
4403 1.4 christos cat >>confdefs.h <<_ACEOF
4404 1.1 christos #define WITH_CHROOT "$withval"
4405 1.1 christos _ACEOF
4406 1.1 christos
4407 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: to \"$withval\"" >&5
4408 1.4 christos $as_echo "to \"$withval\"" >&6; }
4409 1.1 christos else
4410 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4411 1.4 christos $as_echo "no" >&6; }
4412 1.1 christos fi
4413 1.1 christos
4414 1.5 christos
4415 1.5 christos # Check whether --with-sandbox-capsicum was given.
4416 1.5 christos if test "${with_sandbox_capsicum+set}" = set; then :
4417 1.5 christos withval=$with_sandbox_capsicum;
4418 1.5 christos fi
4419 1.5 christos
4420 1.5 christos #
4421 1.5 christos # Check whether various functions are available. If any are, set
4422 1.5 christos # ac_lbl_capsicum_function_seen to yes; if any are not, set
4423 1.5 christos # ac_lbl_capsicum_function_not_seen to yes.
4424 1.5 christos #
4425 1.6 christos # We don't check cap_rights_init(), as it's a macro, wrapping another
4426 1.6 christos # function, in at least some versions of FreeBSD, and AC_CHECK_FUNCS()
4427 1.6 christos # doesn't handle that.
4428 1.6 christos #
4429 1.6 christos # All of the ones we check for must be available in order to enable
4430 1.6 christos # capsicum sandboxing.
4431 1.6 christos #
4432 1.6 christos # XXX - do we need to check for all of them, or are there some that, if
4433 1.6 christos # present, imply others are present?
4434 1.5 christos #
4435 1.11 christos if test -z "$with_sandbox_capsicum" || test "$with_sandbox_capsicum" != "no" ; then
4436 1.11 christos #
4437 1.11 christos # First, make sure we have the required header.
4438 1.11 christos #
4439 1.11 christos ac_fn_c_check_header_mongrel "$LINENO" "sys/capsicum.h" "ac_cv_header_sys_capsicum_h" "$ac_includes_default"
4440 1.11 christos if test "x$ac_cv_header_sys_capsicum_h" = xyes; then :
4441 1.11 christos
4442 1.11 christos #
4443 1.11 christos # We do; now make sure we have the required functions.
4444 1.11 christos #
4445 1.11 christos for ac_func in cap_enter cap_rights_limit cap_ioctls_limit openat
4446 1.5 christos do :
4447 1.5 christos as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
4448 1.5 christos ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
4449 1.5 christos if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
4450 1.5 christos cat >>confdefs.h <<_ACEOF
4451 1.5 christos #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
4452 1.5 christos _ACEOF
4453 1.5 christos ac_lbl_capsicum_function_seen=yes
4454 1.5 christos else
4455 1.5 christos ac_lbl_capsicum_function_not_seen=yes
4456 1.5 christos fi
4457 1.5 christos done
4458 1.5 christos
4459 1.11 christos
4460 1.11 christos fi
4461 1.11 christos
4462 1.11 christos
4463 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_init in -lcasper" >&5
4464 1.11 christos $as_echo_n "checking for cap_init in -lcasper... " >&6; }
4465 1.11 christos if ${ac_cv_lib_casper_cap_init+:} false; then :
4466 1.11 christos $as_echo_n "(cached) " >&6
4467 1.11 christos else
4468 1.11 christos ac_check_lib_save_LIBS=$LIBS
4469 1.11 christos LIBS="-lcasper $LIBS"
4470 1.11 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4471 1.11 christos /* end confdefs.h. */
4472 1.11 christos
4473 1.11 christos /* Override any GCC internal prototype to avoid an error.
4474 1.11 christos Use char because int might match the return type of a GCC
4475 1.11 christos builtin and then its argument prototype would still apply. */
4476 1.11 christos #ifdef __cplusplus
4477 1.11 christos extern "C"
4478 1.11 christos #endif
4479 1.11 christos char cap_init ();
4480 1.11 christos int
4481 1.11 christos main ()
4482 1.11 christos {
4483 1.11 christos return cap_init ();
4484 1.11 christos ;
4485 1.11 christos return 0;
4486 1.11 christos }
4487 1.11 christos _ACEOF
4488 1.11 christos if ac_fn_c_try_link "$LINENO"; then :
4489 1.11 christos ac_cv_lib_casper_cap_init=yes
4490 1.11 christos else
4491 1.11 christos ac_cv_lib_casper_cap_init=no
4492 1.11 christos fi
4493 1.11 christos rm -f core conftest.err conftest.$ac_objext \
4494 1.11 christos conftest$ac_exeext conftest.$ac_ext
4495 1.11 christos LIBS=$ac_check_lib_save_LIBS
4496 1.11 christos fi
4497 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_casper_cap_init" >&5
4498 1.11 christos $as_echo "$ac_cv_lib_casper_cap_init" >&6; }
4499 1.11 christos if test "x$ac_cv_lib_casper_cap_init" = xyes; then :
4500 1.11 christos LIBS="$LIBS -lcasper"
4501 1.11 christos fi
4502 1.11 christos
4503 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_gethostbyaddr in -lcap_dns" >&5
4504 1.11 christos $as_echo_n "checking for cap_gethostbyaddr in -lcap_dns... " >&6; }
4505 1.11 christos if ${ac_cv_lib_cap_dns_cap_gethostbyaddr+:} false; then :
4506 1.11 christos $as_echo_n "(cached) " >&6
4507 1.11 christos else
4508 1.11 christos ac_check_lib_save_LIBS=$LIBS
4509 1.11 christos LIBS="-lcap_dns $LIBS"
4510 1.11 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4511 1.11 christos /* end confdefs.h. */
4512 1.11 christos
4513 1.11 christos /* Override any GCC internal prototype to avoid an error.
4514 1.11 christos Use char because int might match the return type of a GCC
4515 1.11 christos builtin and then its argument prototype would still apply. */
4516 1.11 christos #ifdef __cplusplus
4517 1.11 christos extern "C"
4518 1.11 christos #endif
4519 1.11 christos char cap_gethostbyaddr ();
4520 1.11 christos int
4521 1.11 christos main ()
4522 1.11 christos {
4523 1.11 christos return cap_gethostbyaddr ();
4524 1.11 christos ;
4525 1.11 christos return 0;
4526 1.11 christos }
4527 1.11 christos _ACEOF
4528 1.11 christos if ac_fn_c_try_link "$LINENO"; then :
4529 1.11 christos ac_cv_lib_cap_dns_cap_gethostbyaddr=yes
4530 1.11 christos else
4531 1.11 christos ac_cv_lib_cap_dns_cap_gethostbyaddr=no
4532 1.11 christos fi
4533 1.11 christos rm -f core conftest.err conftest.$ac_objext \
4534 1.11 christos conftest$ac_exeext conftest.$ac_ext
4535 1.11 christos LIBS=$ac_check_lib_save_LIBS
4536 1.11 christos fi
4537 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cap_dns_cap_gethostbyaddr" >&5
4538 1.11 christos $as_echo "$ac_cv_lib_cap_dns_cap_gethostbyaddr" >&6; }
4539 1.11 christos if test "x$ac_cv_lib_cap_dns_cap_gethostbyaddr" = xyes; then :
4540 1.11 christos LIBS="$LIBS -lcap_dns"
4541 1.11 christos fi
4542 1.11 christos
4543 1.5 christos fi
4544 1.5 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to sandbox using capsicum" >&5
4545 1.5 christos $as_echo_n "checking whether to sandbox using capsicum... " >&6; }
4546 1.5 christos if test "x$ac_lbl_capsicum_function_seen" = "xyes" -a "x$ac_lbl_capsicum_function_not_seen" != "xyes"; then
4547 1.5 christos
4548 1.5 christos $as_echo "#define HAVE_CAPSICUM 1" >>confdefs.h
4549 1.5 christos
4550 1.5 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4551 1.5 christos $as_echo "yes" >&6; }
4552 1.5 christos else
4553 1.5 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4554 1.5 christos $as_echo "no" >&6; }
4555 1.5 christos fi
4556 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to sandbox using Casper library" >&5
4557 1.11 christos $as_echo_n "checking whether to sandbox using Casper library... " >&6; }
4558 1.11 christos if test "x$ac_cv_lib_casper_cap_init" = "xyes" -a "x$ac_cv_lib_cap_dns_cap_gethostbyaddr" = "xyes"; then
4559 1.11 christos
4560 1.11 christos $as_echo "#define HAVE_CASPER 1" >>confdefs.h
4561 1.11 christos
4562 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4563 1.11 christos $as_echo "yes" >&6; }
4564 1.11 christos else
4565 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4566 1.11 christos $as_echo "no" >&6; }
4567 1.11 christos fi
4568 1.5 christos
4569 1.4 christos #
4570 1.7 christos # We must check this before checking whether to check the OS's IPv6,
4571 1.7 christos # support because, on some platforms (such as SunOS 5.x), the test
4572 1.7 christos # program requires the extra networking libraries.
4573 1.4 christos #
4574 1.1 christos
4575 1.4 christos # Most operating systems have gethostbyname() in the default searched
4576 1.4 christos # libraries (i.e. libc):
4577 1.4 christos # Some OSes (eg. Solaris) place it in libnsl
4578 1.4 christos # Some strange OSes (SINIX) have it in libsocket:
4579 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
4580 1.4 christos $as_echo_n "checking for library containing gethostbyname... " >&6; }
4581 1.4 christos if ${ac_cv_search_gethostbyname+:} false; then :
4582 1.4 christos $as_echo_n "(cached) " >&6
4583 1.1 christos else
4584 1.4 christos ac_func_search_save_LIBS=$LIBS
4585 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4586 1.4 christos /* end confdefs.h. */
4587 1.1 christos
4588 1.4 christos /* Override any GCC internal prototype to avoid an error.
4589 1.4 christos Use char because int might match the return type of a GCC
4590 1.4 christos builtin and then its argument prototype would still apply. */
4591 1.4 christos #ifdef __cplusplus
4592 1.4 christos extern "C"
4593 1.4 christos #endif
4594 1.4 christos char gethostbyname ();
4595 1.4 christos int
4596 1.4 christos main ()
4597 1.1 christos {
4598 1.4 christos return gethostbyname ();
4599 1.4 christos ;
4600 1.4 christos return 0;
4601 1.1 christos }
4602 1.1 christos _ACEOF
4603 1.4 christos for ac_lib in '' nsl socket resolv; do
4604 1.4 christos if test -z "$ac_lib"; then
4605 1.4 christos ac_res="none required"
4606 1.4 christos else
4607 1.4 christos ac_res=-l$ac_lib
4608 1.4 christos LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4609 1.4 christos fi
4610 1.4 christos if ac_fn_c_try_link "$LINENO"; then :
4611 1.4 christos ac_cv_search_gethostbyname=$ac_res
4612 1.4 christos fi
4613 1.4 christos rm -f core conftest.err conftest.$ac_objext \
4614 1.4 christos conftest$ac_exeext
4615 1.4 christos if ${ac_cv_search_gethostbyname+:} false; then :
4616 1.4 christos break
4617 1.4 christos fi
4618 1.4 christos done
4619 1.4 christos if ${ac_cv_search_gethostbyname+:} false; then :
4620 1.1 christos
4621 1.1 christos else
4622 1.4 christos ac_cv_search_gethostbyname=no
4623 1.1 christos fi
4624 1.4 christos rm conftest.$ac_ext
4625 1.4 christos LIBS=$ac_func_search_save_LIBS
4626 1.1 christos fi
4627 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
4628 1.4 christos $as_echo "$ac_cv_search_gethostbyname" >&6; }
4629 1.4 christos ac_res=$ac_cv_search_gethostbyname
4630 1.4 christos if test "$ac_res" != no; then :
4631 1.4 christos test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4632 1.1 christos
4633 1.1 christos fi
4634 1.1 christos
4635 1.4 christos # Unfortunately libsocket sometimes depends on libnsl and
4636 1.4 christos # AC_SEARCH_LIBS isn't up to the task of handling dependencies like this.
4637 1.4 christos if test "$ac_cv_search_gethostbyname" = "no"
4638 1.4 christos then
4639 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lsocket" >&5
4640 1.4 christos $as_echo_n "checking for gethostbyname in -lsocket... " >&6; }
4641 1.4 christos if ${ac_cv_lib_socket_gethostbyname+:} false; then :
4642 1.4 christos $as_echo_n "(cached) " >&6
4643 1.4 christos else
4644 1.4 christos ac_check_lib_save_LIBS=$LIBS
4645 1.4 christos LIBS="-lsocket -lnsl $LIBS"
4646 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4647 1.4 christos /* end confdefs.h. */
4648 1.1 christos
4649 1.4 christos /* Override any GCC internal prototype to avoid an error.
4650 1.4 christos Use char because int might match the return type of a GCC
4651 1.4 christos builtin and then its argument prototype would still apply. */
4652 1.4 christos #ifdef __cplusplus
4653 1.4 christos extern "C"
4654 1.1 christos #endif
4655 1.4 christos char gethostbyname ();
4656 1.4 christos int
4657 1.4 christos main ()
4658 1.4 christos {
4659 1.4 christos return gethostbyname ();
4660 1.4 christos ;
4661 1.4 christos return 0;
4662 1.4 christos }
4663 1.1 christos _ACEOF
4664 1.4 christos if ac_fn_c_try_link "$LINENO"; then :
4665 1.4 christos ac_cv_lib_socket_gethostbyname=yes
4666 1.4 christos else
4667 1.4 christos ac_cv_lib_socket_gethostbyname=no
4668 1.4 christos fi
4669 1.4 christos rm -f core conftest.err conftest.$ac_objext \
4670 1.4 christos conftest$ac_exeext conftest.$ac_ext
4671 1.4 christos LIBS=$ac_check_lib_save_LIBS
4672 1.4 christos fi
4673 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_gethostbyname" >&5
4674 1.4 christos $as_echo "$ac_cv_lib_socket_gethostbyname" >&6; }
4675 1.4 christos if test "x$ac_cv_lib_socket_gethostbyname" = xyes; then :
4676 1.4 christos LIBS="-lsocket -lnsl $LIBS"
4677 1.1 christos fi
4678 1.1 christos
4679 1.4 christos fi
4680 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
4681 1.4 christos $as_echo_n "checking for library containing socket... " >&6; }
4682 1.4 christos if ${ac_cv_search_socket+:} false; then :
4683 1.4 christos $as_echo_n "(cached) " >&6
4684 1.4 christos else
4685 1.4 christos ac_func_search_save_LIBS=$LIBS
4686 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4687 1.1 christos /* end confdefs.h. */
4688 1.4 christos
4689 1.4 christos /* Override any GCC internal prototype to avoid an error.
4690 1.4 christos Use char because int might match the return type of a GCC
4691 1.4 christos builtin and then its argument prototype would still apply. */
4692 1.4 christos #ifdef __cplusplus
4693 1.4 christos extern "C"
4694 1.1 christos #endif
4695 1.4 christos char socket ();
4696 1.4 christos int
4697 1.4 christos main ()
4698 1.4 christos {
4699 1.4 christos return socket ();
4700 1.4 christos ;
4701 1.4 christos return 0;
4702 1.4 christos }
4703 1.1 christos _ACEOF
4704 1.4 christos for ac_lib in '' socket; do
4705 1.4 christos if test -z "$ac_lib"; then
4706 1.4 christos ac_res="none required"
4707 1.4 christos else
4708 1.4 christos ac_res=-l$ac_lib
4709 1.4 christos LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4710 1.4 christos fi
4711 1.4 christos if ac_fn_c_try_link "$LINENO"; then :
4712 1.4 christos ac_cv_search_socket=$ac_res
4713 1.4 christos fi
4714 1.4 christos rm -f core conftest.err conftest.$ac_objext \
4715 1.4 christos conftest$ac_exeext
4716 1.4 christos if ${ac_cv_search_socket+:} false; then :
4717 1.4 christos break
4718 1.1 christos fi
4719 1.4 christos done
4720 1.4 christos if ${ac_cv_search_socket+:} false; then :
4721 1.1 christos
4722 1.4 christos else
4723 1.4 christos ac_cv_search_socket=no
4724 1.4 christos fi
4725 1.4 christos rm conftest.$ac_ext
4726 1.4 christos LIBS=$ac_func_search_save_LIBS
4727 1.1 christos fi
4728 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
4729 1.4 christos $as_echo "$ac_cv_search_socket" >&6; }
4730 1.4 christos ac_res=$ac_cv_search_socket
4731 1.4 christos if test "$ac_res" != no; then :
4732 1.4 christos test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4733 1.4 christos
4734 1.4 christos else
4735 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
4736 1.4 christos $as_echo_n "checking for socket in -lsocket... " >&6; }
4737 1.4 christos if ${ac_cv_lib_socket_socket+:} false; then :
4738 1.4 christos $as_echo_n "(cached) " >&6
4739 1.4 christos else
4740 1.4 christos ac_check_lib_save_LIBS=$LIBS
4741 1.4 christos LIBS="-lsocket -lnsl $LIBS"
4742 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4743 1.4 christos /* end confdefs.h. */
4744 1.4 christos
4745 1.4 christos /* Override any GCC internal prototype to avoid an error.
4746 1.4 christos Use char because int might match the return type of a GCC
4747 1.4 christos builtin and then its argument prototype would still apply. */
4748 1.4 christos #ifdef __cplusplus
4749 1.4 christos extern "C"
4750 1.4 christos #endif
4751 1.4 christos char socket ();
4752 1.4 christos int
4753 1.4 christos main ()
4754 1.4 christos {
4755 1.4 christos return socket ();
4756 1.4 christos ;
4757 1.4 christos return 0;
4758 1.4 christos }
4759 1.4 christos _ACEOF
4760 1.4 christos if ac_fn_c_try_link "$LINENO"; then :
4761 1.4 christos ac_cv_lib_socket_socket=yes
4762 1.4 christos else
4763 1.4 christos ac_cv_lib_socket_socket=no
4764 1.4 christos fi
4765 1.4 christos rm -f core conftest.err conftest.$ac_objext \
4766 1.4 christos conftest$ac_exeext conftest.$ac_ext
4767 1.4 christos LIBS=$ac_check_lib_save_LIBS
4768 1.4 christos fi
4769 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
4770 1.4 christos $as_echo "$ac_cv_lib_socket_socket" >&6; }
4771 1.4 christos if test "x$ac_cv_lib_socket_socket" = xyes; then :
4772 1.4 christos LIBS="-lsocket -lnsl $LIBS"
4773 1.4 christos fi
4774 1.4 christos
4775 1.4 christos fi
4776 1.4 christos
4777 1.4 christos # DLPI needs putmsg under HPUX so test for -lstr while we're at it
4778 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing putmsg" >&5
4779 1.4 christos $as_echo_n "checking for library containing putmsg... " >&6; }
4780 1.4 christos if ${ac_cv_search_putmsg+:} false; then :
4781 1.4 christos $as_echo_n "(cached) " >&6
4782 1.4 christos else
4783 1.4 christos ac_func_search_save_LIBS=$LIBS
4784 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4785 1.4 christos /* end confdefs.h. */
4786 1.4 christos
4787 1.4 christos /* Override any GCC internal prototype to avoid an error.
4788 1.4 christos Use char because int might match the return type of a GCC
4789 1.4 christos builtin and then its argument prototype would still apply. */
4790 1.4 christos #ifdef __cplusplus
4791 1.4 christos extern "C"
4792 1.4 christos #endif
4793 1.4 christos char putmsg ();
4794 1.4 christos int
4795 1.4 christos main ()
4796 1.4 christos {
4797 1.4 christos return putmsg ();
4798 1.4 christos ;
4799 1.4 christos return 0;
4800 1.4 christos }
4801 1.4 christos _ACEOF
4802 1.4 christos for ac_lib in '' str; do
4803 1.4 christos if test -z "$ac_lib"; then
4804 1.4 christos ac_res="none required"
4805 1.4 christos else
4806 1.4 christos ac_res=-l$ac_lib
4807 1.4 christos LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4808 1.4 christos fi
4809 1.4 christos if ac_fn_c_try_link "$LINENO"; then :
4810 1.4 christos ac_cv_search_putmsg=$ac_res
4811 1.4 christos fi
4812 1.4 christos rm -f core conftest.err conftest.$ac_objext \
4813 1.4 christos conftest$ac_exeext
4814 1.4 christos if ${ac_cv_search_putmsg+:} false; then :
4815 1.4 christos break
4816 1.4 christos fi
4817 1.4 christos done
4818 1.4 christos if ${ac_cv_search_putmsg+:} false; then :
4819 1.4 christos
4820 1.4 christos else
4821 1.4 christos ac_cv_search_putmsg=no
4822 1.4 christos fi
4823 1.4 christos rm conftest.$ac_ext
4824 1.4 christos LIBS=$ac_func_search_save_LIBS
4825 1.4 christos fi
4826 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_putmsg" >&5
4827 1.4 christos $as_echo "$ac_cv_search_putmsg" >&6; }
4828 1.4 christos ac_res=$ac_cv_search_putmsg
4829 1.4 christos if test "$ac_res" != no; then :
4830 1.4 christos test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4831 1.4 christos
4832 1.4 christos fi
4833 1.4 christos
4834 1.4 christos
4835 1.4 christos
4836 1.7 christos #
4837 1.7 christos # Check whether AF_INET6 and struct in6_addr are defined.
4838 1.7 christos # If they aren't both defined, we don't have sufficient OS
4839 1.7 christos # support for IPv6, so we don't look for IPv6 support libraries,
4840 1.7 christos # and we define AF_INET6 and struct in6_addr ourselves.
4841 1.7 christos #
4842 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the operating system supports IPv6" >&5
4843 1.7 christos $as_echo_n "checking whether the operating system supports IPv6... " >&6; }
4844 1.7 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4845 1.7 christos /* end confdefs.h. */
4846 1.4 christos
4847 1.5 christos
4848 1.11 christos #include <string.h>
4849 1.7 christos /* AF_INET6 available check */
4850 1.4 christos #include <sys/types.h>
4851 1.11 christos #ifdef _WIN32
4852 1.11 christos #include <ws2tcpip.h>
4853 1.11 christos #else
4854 1.4 christos #include <sys/socket.h>
4855 1.5 christos #include <netinet/in.h>
4856 1.11 christos #endif
4857 1.5 christos #ifdef AF_INET6
4858 1.5 christos void
4859 1.5 christos foo(struct in6_addr *addr)
4860 1.4 christos {
4861 1.5 christos memset(addr, 0, sizeof (struct in6_addr));
4862 1.4 christos }
4863 1.5 christos #else
4864 1.5 christos #error "AF_INET6 not defined"
4865 1.5 christos #endif
4866 1.5 christos
4867 1.4 christos
4868 1.4 christos _ACEOF
4869 1.5 christos if ac_fn_c_try_compile "$LINENO"; then :
4870 1.7 christos
4871 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4872 1.4 christos $as_echo "yes" >&6; }
4873 1.4 christos
4874 1.7 christos $as_echo "#define HAVE_OS_IPV6_SUPPORT 1" >>confdefs.h
4875 1.7 christos
4876 1.7 christos ipv6=yes
4877 1.4 christos
4878 1.4 christos else
4879 1.7 christos
4880 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4881 1.4 christos $as_echo "no" >&6; }
4882 1.7 christos ipv6=no
4883 1.7 christos
4884 1.7 christos
4885 1.4 christos fi
4886 1.5 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4887 1.4 christos
4888 1.4 christos ipv6type=unknown
4889 1.4 christos ipv6lib=none
4890 1.4 christos ipv6trylibc=no
4891 1.4 christos
4892 1.4 christos if test "$ipv6" = "yes"; then
4893 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
4894 1.4 christos $as_echo_n "checking ipv6 stack type... " >&6; }
4895 1.4 christos for i in inria kame linux-glibc linux-libinet6 toshiba v6d zeta; do
4896 1.4 christos case $i in
4897 1.4 christos inria)
4898 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4899 1.4 christos /* end confdefs.h. */
4900 1.4 christos #include <netinet/in.h>
4901 1.4 christos #ifdef IPV6_INRIA_VERSION
4902 1.4 christos yes
4903 1.4 christos #endif
4904 1.4 christos _ACEOF
4905 1.4 christos if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4906 1.4 christos $EGREP "yes" >/dev/null 2>&1; then :
4907 1.7 christos ipv6type=$i
4908 1.4 christos fi
4909 1.4 christos rm -f conftest*
4910 1.4 christos
4911 1.4 christos ;;
4912 1.4 christos kame)
4913 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4914 1.4 christos /* end confdefs.h. */
4915 1.4 christos #include <netinet/in.h>
4916 1.4 christos #ifdef __KAME__
4917 1.4 christos yes
4918 1.4 christos #endif
4919 1.4 christos _ACEOF
4920 1.4 christos if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4921 1.4 christos $EGREP "yes" >/dev/null 2>&1; then :
4922 1.4 christos ipv6type=$i;
4923 1.4 christos ipv6lib=inet6;
4924 1.4 christos ipv6libdir=/usr/local/v6/lib;
4925 1.7 christos ipv6trylibc=yes
4926 1.4 christos fi
4927 1.4 christos rm -f conftest*
4928 1.4 christos
4929 1.4 christos ;;
4930 1.4 christos linux-glibc)
4931 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4932 1.4 christos /* end confdefs.h. */
4933 1.4 christos #include <features.h>
4934 1.4 christos #if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
4935 1.4 christos yes
4936 1.4 christos #endif
4937 1.4 christos _ACEOF
4938 1.4 christos if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4939 1.4 christos $EGREP "yes" >/dev/null 2>&1; then :
4940 1.7 christos ipv6type=$i
4941 1.4 christos fi
4942 1.4 christos rm -f conftest*
4943 1.1 christos
4944 1.1 christos ;;
4945 1.1 christos linux-libinet6)
4946 1.1 christos if test -d /usr/inet6 -o -f /usr/include/netinet/ip6.h; then
4947 1.1 christos ipv6type=$i
4948 1.1 christos ipv6lib=inet6
4949 1.1 christos ipv6libdir=/usr/inet6/lib
4950 1.1 christos ipv6trylibc=yes;
4951 1.7 christos CFLAGS="-I/usr/inet6/include $CFLAGS"
4952 1.1 christos fi
4953 1.1 christos ;;
4954 1.1 christos toshiba)
4955 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4956 1.1 christos /* end confdefs.h. */
4957 1.1 christos #include <sys/param.h>
4958 1.1 christos #ifdef _TOSHIBA_INET6
4959 1.1 christos yes
4960 1.1 christos #endif
4961 1.1 christos _ACEOF
4962 1.1 christos if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4963 1.4 christos $EGREP "yes" >/dev/null 2>&1; then :
4964 1.1 christos ipv6type=$i;
4965 1.1 christos ipv6lib=inet6;
4966 1.7 christos ipv6libdir=/usr/local/v6/lib
4967 1.1 christos fi
4968 1.4 christos rm -f conftest*
4969 1.1 christos
4970 1.1 christos ;;
4971 1.1 christos v6d)
4972 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4973 1.1 christos /* end confdefs.h. */
4974 1.1 christos #include </usr/local/v6/include/sys/v6config.h>
4975 1.1 christos #ifdef __V6D__
4976 1.1 christos yes
4977 1.1 christos #endif
4978 1.1 christos _ACEOF
4979 1.1 christos if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4980 1.4 christos $EGREP "yes" >/dev/null 2>&1; then :
4981 1.1 christos ipv6type=$i;
4982 1.1 christos ipv6lib=v6;
4983 1.1 christos ipv6libdir=/usr/local/v6/lib;
4984 1.1 christos CFLAGS="-I/usr/local/v6/include $CFLAGS"
4985 1.1 christos fi
4986 1.4 christos rm -f conftest*
4987 1.1 christos
4988 1.1 christos ;;
4989 1.1 christos zeta)
4990 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4991 1.1 christos /* end confdefs.h. */
4992 1.1 christos #include <sys/param.h>
4993 1.1 christos #ifdef _ZETA_MINAMI_INET6
4994 1.1 christos yes
4995 1.1 christos #endif
4996 1.1 christos _ACEOF
4997 1.1 christos if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4998 1.4 christos $EGREP "yes" >/dev/null 2>&1; then :
4999 1.1 christos ipv6type=$i;
5000 1.1 christos ipv6lib=inet6;
5001 1.7 christos ipv6libdir=/usr/local/v6/lib
5002 1.1 christos fi
5003 1.4 christos rm -f conftest*
5004 1.1 christos
5005 1.1 christos ;;
5006 1.1 christos esac
5007 1.1 christos if test "$ipv6type" != "unknown"; then
5008 1.1 christos break
5009 1.1 christos fi
5010 1.1 christos done
5011 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
5012 1.4 christos $as_echo "$ipv6type" >&6; }
5013 1.1 christos fi
5014 1.1 christos
5015 1.1 christos if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
5016 1.1 christos if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
5017 1.1 christos LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
5018 1.1 christos echo "You have $ipv6lib library, using it"
5019 1.1 christos else
5020 1.1 christos if test "$ipv6trylibc" = "yes"; then
5021 1.1 christos echo "You do not have $ipv6lib library, using libc"
5022 1.1 christos else
5023 1.1 christos echo 'Fatal: no $ipv6lib library found. cannot continue.'
5024 1.1 christos echo "You need to fetch lib$ipv6lib.a from appropriate"
5025 1.1 christos echo 'ipv6 kit and compile beforehand.'
5026 1.1 christos exit 1
5027 1.1 christos fi
5028 1.1 christos fi
5029 1.1 christos fi
5030 1.1 christos
5031 1.4 christos ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
5032 1.4 christos if test "x$ac_cv_func_strlcat" = xyes; then :
5033 1.4 christos $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
5034 1.3 christos
5035 1.1 christos else
5036 1.4 christos case " $LIBOBJS " in
5037 1.4 christos *" strlcat.$ac_objext "* ) ;;
5038 1.4 christos *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
5039 1.4 christos ;;
5040 1.4 christos esac
5041 1.4 christos
5042 1.4 christos fi
5043 1.3 christos
5044 1.4 christos ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
5045 1.4 christos if test "x$ac_cv_func_strlcpy" = xyes; then :
5046 1.4 christos $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
5047 1.3 christos
5048 1.4 christos else
5049 1.4 christos case " $LIBOBJS " in
5050 1.4 christos *" strlcpy.$ac_objext "* ) ;;
5051 1.4 christos *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
5052 1.4 christos ;;
5053 1.4 christos esac
5054 1.3 christos
5055 1.4 christos fi
5056 1.3 christos
5057 1.4 christos ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
5058 1.4 christos if test "x$ac_cv_func_strdup" = xyes; then :
5059 1.4 christos $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
5060 1.3 christos
5061 1.4 christos else
5062 1.4 christos case " $LIBOBJS " in
5063 1.4 christos *" strdup.$ac_objext "* ) ;;
5064 1.4 christos *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
5065 1.4 christos ;;
5066 1.1 christos esac
5067 1.1 christos
5068 1.1 christos fi
5069 1.1 christos
5070 1.4 christos ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
5071 1.4 christos if test "x$ac_cv_func_strsep" = xyes; then :
5072 1.4 christos $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
5073 1.1 christos
5074 1.1 christos else
5075 1.1 christos case " $LIBOBJS " in
5076 1.4 christos *" strsep.$ac_objext "* ) ;;
5077 1.4 christos *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
5078 1.1 christos ;;
5079 1.1 christos esac
5080 1.1 christos
5081 1.1 christos fi
5082 1.4 christos
5083 1.11 christos ac_fn_c_check_func "$LINENO" "getservent" "ac_cv_func_getservent"
5084 1.11 christos if test "x$ac_cv_func_getservent" = xyes; then :
5085 1.11 christos $as_echo "#define HAVE_GETSERVENT 1" >>confdefs.h
5086 1.11 christos
5087 1.11 christos else
5088 1.11 christos case " $LIBOBJS " in
5089 1.11 christos *" getservent.$ac_objext "* ) ;;
5090 1.11 christos *) LIBOBJS="$LIBOBJS getservent.$ac_objext"
5091 1.11 christos ;;
5092 1.11 christos esac
5093 1.11 christos
5094 1.11 christos fi
5095 1.11 christos
5096 1.5 christos ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
5097 1.5 christos if test "x$ac_cv_func_getopt_long" = xyes; then :
5098 1.5 christos $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
5099 1.5 christos
5100 1.5 christos else
5101 1.5 christos case " $LIBOBJS " in
5102 1.5 christos *" getopt_long.$ac_objext "* ) ;;
5103 1.5 christos *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
5104 1.5 christos ;;
5105 1.5 christos esac
5106 1.5 christos
5107 1.5 christos fi
5108 1.5 christos
5109 1.4 christos
5110 1.11 christos for ac_func in fork vfork
5111 1.4 christos do :
5112 1.4 christos as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5113 1.4 christos ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5114 1.4 christos if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5115 1.4 christos cat >>confdefs.h <<_ACEOF
5116 1.4 christos #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5117 1.4 christos _ACEOF
5118 1.4 christos
5119 1.4 christos fi
5120 1.1 christos done
5121 1.1 christos
5122 1.11 christos for ac_func in setlinebuf
5123 1.4 christos do :
5124 1.11 christos ac_fn_c_check_func "$LINENO" "setlinebuf" "ac_cv_func_setlinebuf"
5125 1.11 christos if test "x$ac_cv_func_setlinebuf" = xyes; then :
5126 1.4 christos cat >>confdefs.h <<_ACEOF
5127 1.11 christos #define HAVE_SETLINEBUF 1
5128 1.4 christos _ACEOF
5129 1.1 christos
5130 1.4 christos fi
5131 1.4 christos done
5132 1.1 christos
5133 1.3 christos
5134 1.11 christos #
5135 1.11 christos # Make sure we have vsnprintf() and snprintf(); we require them.
5136 1.11 christos #
5137 1.11 christos ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
5138 1.11 christos if test "x$ac_cv_func_vsnprintf" = xyes; then :
5139 1.3 christos
5140 1.1 christos else
5141 1.11 christos as_fn_error $? "vsnprintf() is required but wasn't found" "$LINENO" 5
5142 1.4 christos fi
5143 1.1 christos
5144 1.11 christos ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
5145 1.11 christos if test "x$ac_cv_func_snprintf" = xyes; then :
5146 1.1 christos
5147 1.11 christos else
5148 1.11 christos as_fn_error $? "snprintf() is required but wasn't found" "$LINENO" 5
5149 1.4 christos fi
5150 1.1 christos
5151 1.1 christos
5152 1.11 christos #
5153 1.11 christos # Define HAVE_NO_PRINTF_Z to make it possible to disable test cases that
5154 1.11 christos # depend on %zu.
5155 1.11 christos #
5156 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf(3) supports the z length modifier" >&5
5157 1.11 christos $as_echo_n "checking whether printf(3) supports the z length modifier... " >&6; }
5158 1.11 christos if test "$cross_compiling" = yes; then :
5159 1.11 christos
5160 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: not while cross-compiling" >&5
5161 1.11 christos $as_echo "not while cross-compiling" >&6; }
5162 1.11 christos
5163 1.11 christos
5164 1.4 christos else
5165 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5166 1.4 christos /* end confdefs.h. */
5167 1.1 christos
5168 1.11 christos
5169 1.11 christos #include <stdio.h>
5170 1.11 christos #include <string.h>
5171 1.11 christos
5172 1.11 christos int main()
5173 1.1 christos {
5174 1.11 christos char buf[100];
5175 1.11 christos snprintf(buf, sizeof(buf), "%zu", sizeof(buf));
5176 1.11 christos return strncmp(buf, "100", sizeof(buf)) ? 1 : 0;
5177 1.1 christos }
5178 1.1 christos
5179 1.11 christos
5180 1.1 christos _ACEOF
5181 1.11 christos if ac_fn_c_try_run "$LINENO"; then :
5182 1.1 christos
5183 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5184 1.11 christos $as_echo "yes" >&6; }
5185 1.1 christos
5186 1.11 christos else
5187 1.4 christos
5188 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5189 1.11 christos $as_echo "no" >&6; }
5190 1.1 christos
5191 1.11 christos $as_echo "#define HAVE_NO_PRINTF_Z 1" >>confdefs.h
5192 1.1 christos
5193 1.1 christos
5194 1.1 christos fi
5195 1.11 christos rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5196 1.11 christos conftest.$ac_objext conftest.beam conftest.$ac_ext
5197 1.1 christos fi
5198 1.1 christos
5199 1.1 christos
5200 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lrpc" >&5
5201 1.4 christos $as_echo_n "checking for main in -lrpc... " >&6; }
5202 1.4 christos if ${ac_cv_lib_rpc_main+:} false; then :
5203 1.4 christos $as_echo_n "(cached) " >&6
5204 1.1 christos else
5205 1.4 christos ac_check_lib_save_LIBS=$LIBS
5206 1.4 christos LIBS="-lrpc $LIBS"
5207 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5208 1.1 christos /* end confdefs.h. */
5209 1.1 christos
5210 1.1 christos
5211 1.1 christos int
5212 1.1 christos main ()
5213 1.1 christos {
5214 1.4 christos return main ();
5215 1.1 christos ;
5216 1.1 christos return 0;
5217 1.1 christos }
5218 1.1 christos _ACEOF
5219 1.4 christos if ac_fn_c_try_link "$LINENO"; then :
5220 1.4 christos ac_cv_lib_rpc_main=yes
5221 1.1 christos else
5222 1.4 christos ac_cv_lib_rpc_main=no
5223 1.1 christos fi
5224 1.4 christos rm -f core conftest.err conftest.$ac_objext \
5225 1.4 christos conftest$ac_exeext conftest.$ac_ext
5226 1.4 christos LIBS=$ac_check_lib_save_LIBS
5227 1.1 christos fi
5228 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rpc_main" >&5
5229 1.4 christos $as_echo "$ac_cv_lib_rpc_main" >&6; }
5230 1.4 christos if test "x$ac_cv_lib_rpc_main" = xyes; then :
5231 1.1 christos cat >>confdefs.h <<_ACEOF
5232 1.4 christos #define HAVE_LIBRPC 1
5233 1.1 christos _ACEOF
5234 1.1 christos
5235 1.4 christos LIBS="-lrpc $LIBS"
5236 1.1 christos
5237 1.1 christos fi
5238 1.1 christos
5239 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getrpcbynumber" >&5
5240 1.4 christos $as_echo_n "checking for library containing getrpcbynumber... " >&6; }
5241 1.4 christos if ${ac_cv_search_getrpcbynumber+:} false; then :
5242 1.4 christos $as_echo_n "(cached) " >&6
5243 1.1 christos else
5244 1.1 christos ac_func_search_save_LIBS=$LIBS
5245 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5246 1.1 christos /* end confdefs.h. */
5247 1.1 christos
5248 1.1 christos /* Override any GCC internal prototype to avoid an error.
5249 1.1 christos Use char because int might match the return type of a GCC
5250 1.1 christos builtin and then its argument prototype would still apply. */
5251 1.1 christos #ifdef __cplusplus
5252 1.1 christos extern "C"
5253 1.1 christos #endif
5254 1.4 christos char getrpcbynumber ();
5255 1.1 christos int
5256 1.1 christos main ()
5257 1.1 christos {
5258 1.4 christos return getrpcbynumber ();
5259 1.1 christos ;
5260 1.1 christos return 0;
5261 1.1 christos }
5262 1.1 christos _ACEOF
5263 1.4 christos for ac_lib in '' nsl; do
5264 1.1 christos if test -z "$ac_lib"; then
5265 1.1 christos ac_res="none required"
5266 1.1 christos else
5267 1.1 christos ac_res=-l$ac_lib
5268 1.1 christos LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5269 1.1 christos fi
5270 1.4 christos if ac_fn_c_try_link "$LINENO"; then :
5271 1.4 christos ac_cv_search_getrpcbynumber=$ac_res
5272 1.1 christos fi
5273 1.4 christos rm -f core conftest.err conftest.$ac_objext \
5274 1.4 christos conftest$ac_exeext
5275 1.4 christos if ${ac_cv_search_getrpcbynumber+:} false; then :
5276 1.1 christos break
5277 1.1 christos fi
5278 1.1 christos done
5279 1.4 christos if ${ac_cv_search_getrpcbynumber+:} false; then :
5280 1.4 christos
5281 1.1 christos else
5282 1.4 christos ac_cv_search_getrpcbynumber=no
5283 1.1 christos fi
5284 1.1 christos rm conftest.$ac_ext
5285 1.1 christos LIBS=$ac_func_search_save_LIBS
5286 1.1 christos fi
5287 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getrpcbynumber" >&5
5288 1.4 christos $as_echo "$ac_cv_search_getrpcbynumber" >&6; }
5289 1.4 christos ac_res=$ac_cv_search_getrpcbynumber
5290 1.4 christos if test "$ac_res" != no; then :
5291 1.1 christos test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5292 1.4 christos
5293 1.4 christos $as_echo "#define HAVE_GETRPCBYNUMBER 1" >>confdefs.h
5294 1.1 christos
5295 1.1 christos fi
5296 1.1 christos
5297 1.1 christos
5298 1.1 christos
5299 1.4 christos LBL_LIBS="$LIBS"
5300 1.4 christos pfopen=/usr/examples/packetfilter/pfopen.c
5301 1.4 christos if test -f $pfopen ; then
5302 1.11 christos for ac_func in pfopen
5303 1.4 christos do :
5304 1.4 christos ac_fn_c_check_func "$LINENO" "pfopen" "ac_cv_func_pfopen"
5305 1.4 christos if test "x$ac_cv_func_pfopen" = xyes; then :
5306 1.1 christos cat >>confdefs.h <<_ACEOF
5307 1.4 christos #define HAVE_PFOPEN 1
5308 1.1 christos _ACEOF
5309 1.1 christos
5310 1.1 christos fi
5311 1.4 christos done
5312 1.1 christos
5313 1.11 christos if test $ac_cv_func_pfopen = "no" ; then
5314 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $pfopen" >&5
5315 1.4 christos $as_echo "Using $pfopen" >&6; }
5316 1.11 christos LIBS="$LIBS $pfopen"
5317 1.11 christos fi
5318 1.1 christos fi
5319 1.11 christos libpcap=FAIL
5320 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to look for a local libpcap" >&5
5321 1.11 christos $as_echo_n "checking whether to look for a local libpcap... " >&6; }
5322 1.11 christos # Check whether --enable-local-libpcap was given.
5323 1.11 christos if test "${enable_local_libpcap+set}" = set; then :
5324 1.11 christos enableval=$enable_local_libpcap;
5325 1.11 christos else
5326 1.11 christos enableval=yes
5327 1.11 christos fi
5328 1.11 christos
5329 1.11 christos case "$enableval" in
5330 1.11 christos
5331 1.11 christos no)
5332 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5333 1.11 christos $as_echo "no" >&6; }
5334 1.11 christos #
5335 1.11 christos # Don't look for a local libpcap.
5336 1.11 christos #
5337 1.11 christos using_local_libpcap=no
5338 1.11 christos ;;
5339 1.11 christos
5340 1.11 christos *)
5341 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5342 1.11 christos $as_echo "yes" >&6; }
5343 1.11 christos #
5344 1.11 christos # Look for a local pcap library.
5345 1.11 christos #
5346 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for local pcap library" >&5
5347 1.4 christos $as_echo_n "checking for local pcap library... " >&6; }
5348 1.11 christos lastdir=FAIL
5349 1.11 christos places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
5350 1.11 christos egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT|rc.)?$'`
5351 1.11 christos places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
5352 1.11 christos egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT|rc.)?$'`
5353 1.11 christos for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
5354 1.11 christos basedir=`echo $dir | sed -e 's/[ab][0-9]*$//' | \
5355 1.11 christos sed -e 's/-PRE-GIT$//' `
5356 1.11 christos if test $lastdir = $basedir ; then
5357 1.11 christos continue;
5358 1.11 christos fi
5359 1.11 christos lastdir=$dir
5360 1.11 christos if test -r $dir/libpcap.a ; then
5361 1.11 christos libpcap=$dir/libpcap.a
5362 1.11 christos local_pcap_dir=$dir
5363 1.11 christos fi
5364 1.11 christos done
5365 1.11 christos if test $libpcap = FAIL ; then
5366 1.11 christos #
5367 1.11 christos # We didn't find a local libpcap.
5368 1.11 christos #
5369 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5370 1.11 christos $as_echo "not found" >&6; }
5371 1.11 christos using_local_libpcap=no;
5372 1.11 christos else
5373 1.11 christos #
5374 1.11 christos # We found a local libpcap.
5375 1.11 christos #
5376 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libpcap" >&5
5377 1.11 christos $as_echo "$libpcap" >&6; }
5378 1.11 christos using_local_libpcap=yes
5379 1.11 christos fi
5380 1.11 christos ;;
5381 1.11 christos esac
5382 1.11 christos
5383 1.11 christos if test $using_local_libpcap = no ; then
5384 1.11 christos #
5385 1.11 christos # We didn't find a local libpcap.
5386 1.11 christos # Look for an installed pkg-config.
5387 1.11 christos #
5388 1.11 christos if test -n "$ac_tool_prefix"; then
5389 1.11 christos # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5390 1.11 christos set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5391 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5392 1.11 christos $as_echo_n "checking for $ac_word... " >&6; }
5393 1.11 christos if ${ac_cv_path_PKG_CONFIG+:} false; then :
5394 1.11 christos $as_echo_n "(cached) " >&6
5395 1.11 christos else
5396 1.11 christos case $PKG_CONFIG in
5397 1.11 christos [\\/]* | ?:[\\/]*)
5398 1.11 christos ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5399 1.11 christos ;;
5400 1.11 christos *)
5401 1.11 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5402 1.11 christos for as_dir in $PATH
5403 1.11 christos do
5404 1.11 christos IFS=$as_save_IFS
5405 1.11 christos test -z "$as_dir" && as_dir=.
5406 1.11 christos for ac_exec_ext in '' $ac_executable_extensions; do
5407 1.11 christos if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5408 1.11 christos ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5409 1.11 christos $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5410 1.11 christos break 2
5411 1.11 christos fi
5412 1.11 christos done
5413 1.11 christos done
5414 1.11 christos IFS=$as_save_IFS
5415 1.6 christos
5416 1.11 christos ;;
5417 1.11 christos esac
5418 1.11 christos fi
5419 1.11 christos PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5420 1.11 christos if test -n "$PKG_CONFIG"; then
5421 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
5422 1.11 christos $as_echo "$PKG_CONFIG" >&6; }
5423 1.11 christos else
5424 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5425 1.11 christos $as_echo "no" >&6; }
5426 1.11 christos fi
5427 1.11 christos
5428 1.11 christos
5429 1.11 christos fi
5430 1.11 christos if test -z "$ac_cv_path_PKG_CONFIG"; then
5431 1.11 christos ac_pt_PKG_CONFIG=$PKG_CONFIG
5432 1.11 christos # Extract the first word of "pkg-config", so it can be a program name with args.
5433 1.11 christos set dummy pkg-config; ac_word=$2
5434 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5435 1.11 christos $as_echo_n "checking for $ac_word... " >&6; }
5436 1.11 christos if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
5437 1.11 christos $as_echo_n "(cached) " >&6
5438 1.11 christos else
5439 1.11 christos case $ac_pt_PKG_CONFIG in
5440 1.11 christos [\\/]* | ?:[\\/]*)
5441 1.11 christos ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5442 1.11 christos ;;
5443 1.11 christos *)
5444 1.11 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5445 1.11 christos for as_dir in $PATH
5446 1.11 christos do
5447 1.11 christos IFS=$as_save_IFS
5448 1.11 christos test -z "$as_dir" && as_dir=.
5449 1.11 christos for ac_exec_ext in '' $ac_executable_extensions; do
5450 1.11 christos if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5451 1.11 christos ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5452 1.11 christos $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5453 1.11 christos break 2
5454 1.11 christos fi
5455 1.11 christos done
5456 1.11 christos done
5457 1.11 christos IFS=$as_save_IFS
5458 1.11 christos
5459 1.11 christos ;;
5460 1.11 christos esac
5461 1.11 christos fi
5462 1.11 christos ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5463 1.11 christos if test -n "$ac_pt_PKG_CONFIG"; then
5464 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
5465 1.11 christos $as_echo "$ac_pt_PKG_CONFIG" >&6; }
5466 1.11 christos else
5467 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5468 1.11 christos $as_echo "no" >&6; }
5469 1.11 christos fi
5470 1.11 christos
5471 1.11 christos if test "x$ac_pt_PKG_CONFIG" = x; then
5472 1.11 christos PKG_CONFIG=""
5473 1.11 christos else
5474 1.11 christos case $cross_compiling:$ac_tool_warned in
5475 1.11 christos yes:)
5476 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5477 1.11 christos $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5478 1.11 christos ac_tool_warned=yes ;;
5479 1.11 christos esac
5480 1.11 christos PKG_CONFIG=$ac_pt_PKG_CONFIG
5481 1.11 christos fi
5482 1.11 christos else
5483 1.11 christos PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5484 1.11 christos fi
5485 1.1 christos
5486 1.11 christos if test -n "$PKG_CONFIG" ; then
5487 1.11 christos #
5488 1.11 christos # We have it. Are there .pc files for libpcap?
5489 1.11 christos #
5490 1.11 christos # --exists was introduced in pkg-config 0.4.0; that
5491 1.11 christos # dates back to late 2000, so we won't worry about
5492 1.11 christos # earlier releases that lack it.
5493 1.11 christos #
5494 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether there are .pc files for libpcap" >&5
5495 1.11 christos $as_echo_n "checking whether there are .pc files for libpcap... " >&6; }
5496 1.11 christos if "$PKG_CONFIG" libpcap --exists ; then
5497 1.11 christos #
5498 1.11 christos # Yes, so we can use pkg-config to get configuration
5499 1.11 christos # information for libpcap.
5500 1.11 christos #
5501 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5502 1.11 christos $as_echo "yes" >&6; }
5503 1.11 christos pkg_config_usable=yes
5504 1.11 christos else
5505 1.11 christos #
5506 1.11 christos # No, so we can't use pkg-config to get configuration
5507 1.11 christos # information for libpcap.
5508 1.11 christos #
5509 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5510 1.11 christos $as_echo "no" >&6; }
5511 1.11 christos pkg_config_usable=no
5512 1.11 christos fi
5513 1.11 christos else
5514 1.11 christos #
5515 1.11 christos # We don't have it, so we obviously can't use it.
5516 1.11 christos #
5517 1.11 christos pkg_config_usable=no
5518 1.11 christos fi
5519 1.11 christos if test "$pkg_config_usable" = "yes" ; then
5520 1.11 christos #
5521 1.11 christos # Found both - use pkg-config to get the include flags for
5522 1.11 christos # libpcap and the flags to link with libpcap.
5523 1.11 christos #
5524 1.11 christos # Please read section 11.6 "Shell Substitutions"
5525 1.11 christos # in the autoconf manual before doing anything
5526 1.11 christos # to this that involves quoting. Especially note
5527 1.11 christos # the statement "There is just no portable way to use
5528 1.11 christos # double-quoted strings inside double-quoted back-quoted
5529 1.11 christos # expressions (pfew!)."
5530 1.11 christos #
5531 1.11 christos cflags=`"$PKG_CONFIG" libpcap --cflags`
5532 1.11 christos V_INCLS="$cflags $V_INCLS"
5533 1.11 christos libpcap=`"$PKG_CONFIG" libpcap --libs`
5534 1.11 christos else
5535 1.11 christos #
5536 1.11 christos # No pkg-config
5537 1.11 christos # Look for an installed pcap-config.
5538 1.11 christos #
5539 1.11 christos if test -n "$ac_tool_prefix"; then
5540 1.3 christos # Extract the first word of "${ac_tool_prefix}pcap-config", so it can be a program name with args.
5541 1.3 christos set dummy ${ac_tool_prefix}pcap-config; ac_word=$2
5542 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5543 1.4 christos $as_echo_n "checking for $ac_word... " >&6; }
5544 1.4 christos if ${ac_cv_path_PCAP_CONFIG+:} false; then :
5545 1.4 christos $as_echo_n "(cached) " >&6
5546 1.1 christos else
5547 1.1 christos case $PCAP_CONFIG in
5548 1.1 christos [\\/]* | ?:[\\/]*)
5549 1.1 christos ac_cv_path_PCAP_CONFIG="$PCAP_CONFIG" # Let the user override the test with a path.
5550 1.1 christos ;;
5551 1.1 christos *)
5552 1.1 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5553 1.1 christos for as_dir in $PATH
5554 1.1 christos do
5555 1.1 christos IFS=$as_save_IFS
5556 1.1 christos test -z "$as_dir" && as_dir=.
5557 1.4 christos for ac_exec_ext in '' $ac_executable_extensions; do
5558 1.4 christos if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5559 1.1 christos ac_cv_path_PCAP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5560 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5561 1.1 christos break 2
5562 1.1 christos fi
5563 1.1 christos done
5564 1.4 christos done
5565 1.1 christos IFS=$as_save_IFS
5566 1.1 christos
5567 1.4 christos ;;
5568 1.3 christos esac
5569 1.3 christos fi
5570 1.4 christos PCAP_CONFIG=$ac_cv_path_PCAP_CONFIG
5571 1.4 christos if test -n "$PCAP_CONFIG"; then
5572 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PCAP_CONFIG" >&5
5573 1.4 christos $as_echo "$PCAP_CONFIG" >&6; }
5574 1.3 christos else
5575 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5576 1.4 christos $as_echo "no" >&6; }
5577 1.3 christos fi
5578 1.1 christos
5579 1.1 christos
5580 1.1 christos fi
5581 1.4 christos if test -z "$ac_cv_path_PCAP_CONFIG"; then
5582 1.4 christos ac_pt_PCAP_CONFIG=$PCAP_CONFIG
5583 1.4 christos # Extract the first word of "pcap-config", so it can be a program name with args.
5584 1.4 christos set dummy pcap-config; ac_word=$2
5585 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5586 1.4 christos $as_echo_n "checking for $ac_word... " >&6; }
5587 1.4 christos if ${ac_cv_path_ac_pt_PCAP_CONFIG+:} false; then :
5588 1.4 christos $as_echo_n "(cached) " >&6
5589 1.1 christos else
5590 1.4 christos case $ac_pt_PCAP_CONFIG in
5591 1.4 christos [\\/]* | ?:[\\/]*)
5592 1.4 christos ac_cv_path_ac_pt_PCAP_CONFIG="$ac_pt_PCAP_CONFIG" # Let the user override the test with a path.
5593 1.4 christos ;;
5594 1.4 christos *)
5595 1.4 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5596 1.4 christos for as_dir in $PATH
5597 1.4 christos do
5598 1.4 christos IFS=$as_save_IFS
5599 1.4 christos test -z "$as_dir" && as_dir=.
5600 1.4 christos for ac_exec_ext in '' $ac_executable_extensions; do
5601 1.4 christos if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5602 1.4 christos ac_cv_path_ac_pt_PCAP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5603 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5604 1.4 christos break 2
5605 1.4 christos fi
5606 1.4 christos done
5607 1.4 christos done
5608 1.4 christos IFS=$as_save_IFS
5609 1.1 christos
5610 1.4 christos ;;
5611 1.1 christos esac
5612 1.1 christos fi
5613 1.4 christos ac_pt_PCAP_CONFIG=$ac_cv_path_ac_pt_PCAP_CONFIG
5614 1.4 christos if test -n "$ac_pt_PCAP_CONFIG"; then
5615 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PCAP_CONFIG" >&5
5616 1.4 christos $as_echo "$ac_pt_PCAP_CONFIG" >&6; }
5617 1.1 christos else
5618 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5619 1.4 christos $as_echo "no" >&6; }
5620 1.1 christos fi
5621 1.1 christos
5622 1.4 christos if test "x$ac_pt_PCAP_CONFIG" = x; then
5623 1.4 christos PCAP_CONFIG=""
5624 1.4 christos else
5625 1.4 christos case $cross_compiling:$ac_tool_warned in
5626 1.4 christos yes:)
5627 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5628 1.4 christos $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5629 1.4 christos ac_tool_warned=yes ;;
5630 1.1 christos esac
5631 1.4 christos PCAP_CONFIG=$ac_pt_PCAP_CONFIG
5632 1.4 christos fi
5633 1.1 christos else
5634 1.4 christos PCAP_CONFIG="$ac_cv_path_PCAP_CONFIG"
5635 1.1 christos fi
5636 1.1 christos
5637 1.11 christos if test -n "$PCAP_CONFIG" ; then
5638 1.11 christos #
5639 1.11 christos # Found - use it to get the include flags for
5640 1.11 christos # libpcap and the flags to link with libpcap.
5641 1.11 christos #
5642 1.11 christos # If this is a vendor-supplied pcap-config, which
5643 1.11 christos # we define as being "a pcap-config in /usr/bin
5644 1.11 christos # or /usr/ccs/bin" (the latter is for Solaris and
5645 1.11 christos # Sun/Oracle Studio), there are some issues. Work
5646 1.11 christos # around them.
5647 1.11 christos #
5648 1.11 christos if test \( "$PCAP_CONFIG" = "/usr/bin/pcap-config" \) -o \
5649 1.11 christos \( "$PCAP_CONFIG" = "/usr/ccs/bin/pcap-config" \) ; then
5650 1.11 christos #
5651 1.11 christos # It's vendor-supplied.
5652 1.11 christos #
5653 1.11 christos case "$host_os" in
5654 1.11 christos
5655 1.11 christos darwin*)
5656 1.11 christos #
5657 1.11 christos # This is macOS or another Darwin-based OS.
5658 1.11 christos #
5659 1.11 christos # That means that /usr/bin/pcap-config it
5660 1.11 christos # may provide -I/usr/local/include with --cflags
5661 1.11 christos # and -L/usr/local/lib with --libs, rather than
5662 1.11 christos # pointing to the OS-supplied library and
5663 1.11 christos # Xcode-supplied headers. Remember that, so we
5664 1.11 christos # ignore those values.
5665 1.11 christos #
5666 1.11 christos _broken_apple_pcap_config=yes
5667 1.11 christos ;;
5668 1.11 christos
5669 1.11 christos solaris*)
5670 1.11 christos #
5671 1.11 christos # This is Solaris 2 or later, i.e. SunOS 5.x.
5672 1.11 christos #
5673 1.11 christos # At least on Solaris 11; there's /usr/bin/pcap-config,
5674 1.11 christos # which reports -L/usr/lib with --libs, causing
5675 1.11 christos # the 32-bit libraries to be found, and there's
5676 1.11 christos # /usr/bin/{64bitarch}/pcap-config, where {64bitarch}
5677 1.11 christos # is a name for the 64-bit version of the instruction
5678 1.11 christos # set, which reports -L /usr/lib/{64bitarch}, causing
5679 1.11 christos # the 64-bit libraries to be found.
5680 1.11 christos #
5681 1.11 christos # So if we're building 64-bit targets, we replace
5682 1.11 christos # PCAP_CONFIG with /usr/bin/{64bitarch}; we get
5683 1.11 christos # {64bitarch} as the output of "isainfo -n".
5684 1.11 christos #
5685 1.11 christos # Are we building 32-bit or 64-bit? Get the
5686 1.11 christos # size of void *, and check that.
5687 1.11 christos #
5688 1.11 christos # The cast to long int works around a bug in the HP C Compiler
5689 1.11 christos # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5690 1.11 christos # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5691 1.11 christos # This bug is HP SR number 8606223364.
5692 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
5693 1.11 christos $as_echo_n "checking size of void *... " >&6; }
5694 1.11 christos if ${ac_cv_sizeof_void_p+:} false; then :
5695 1.11 christos $as_echo_n "(cached) " >&6
5696 1.11 christos else
5697 1.11 christos if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
5698 1.11 christos
5699 1.11 christos else
5700 1.11 christos if test "$ac_cv_type_void_p" = yes; then
5701 1.11 christos { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5702 1.11 christos $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5703 1.11 christos as_fn_error 77 "cannot compute sizeof (void *)
5704 1.11 christos See \`config.log' for more details" "$LINENO" 5; }
5705 1.11 christos else
5706 1.11 christos ac_cv_sizeof_void_p=0
5707 1.11 christos fi
5708 1.11 christos fi
5709 1.11 christos
5710 1.11 christos fi
5711 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
5712 1.11 christos $as_echo "$ac_cv_sizeof_void_p" >&6; }
5713 1.11 christos
5714 1.11 christos
5715 1.11 christos
5716 1.11 christos cat >>confdefs.h <<_ACEOF
5717 1.11 christos #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
5718 1.11 christos _ACEOF
5719 1.11 christos
5720 1.11 christos
5721 1.11 christos if test ac_cv_sizeof_void_p -eq 8 ; then
5722 1.11 christos isainfo_output=`isainfo -n`
5723 1.11 christos if test ! -z "$isainfo_output" ; then
5724 1.11 christos #
5725 1.11 christos # Success - change PCAP_CONFIG.
5726 1.11 christos #
5727 1.11 christos PCAP_CONFIG=`echo $PCAP_CONFIG | sed "s;/bin/;/bin/$isainfo_output/;"`
5728 1.11 christos fi
5729 1.11 christos fi
5730 1.11 christos ;;
5731 1.11 christos esac
5732 1.11 christos fi
5733 1.11 christos #
5734 1.11 christos # Please read section 11.6 "Shell Substitutions"
5735 1.11 christos # in the autoconf manual before doing anything
5736 1.11 christos # to this that involves quoting. Especially note
5737 1.11 christos # the statement "There is just no portable way to use
5738 1.11 christos # double-quoted strings inside double-quoted back-quoted
5739 1.11 christos # expressions (pfew!)."
5740 1.11 christos #
5741 1.11 christos cflags=`"$PCAP_CONFIG" --cflags`
5742 1.11 christos #
5743 1.11 christos # Work around macOS (and probably other Darwin) brokenness,
5744 1.11 christos # by not adding /usr/local/include if it's from the broken
5745 1.11 christos # Apple pcap-config.
5746 1.11 christos #
5747 1.11 christos if test "$_broken_apple_pcap_config" = "yes" ; then
5748 1.11 christos #
5749 1.11 christos # Strip -I/usr/local/include with sed.
5750 1.11 christos #
5751 1.11 christos cflags=`echo $cflags | sed 's;-I/usr/local/include;;'`
5752 1.11 christos fi
5753 1.11 christos V_INCLS="$cflags $V_INCLS"
5754 1.11 christos libpcap=`"$PCAP_CONFIG" --libs`
5755 1.11 christos #
5756 1.11 christos # Work around macOS (and probably other Darwin) brokenness,
5757 1.11 christos # by not adding /usr/local/lib if it's from the broken
5758 1.11 christos # Apple pcap-config.
5759 1.11 christos #
5760 1.11 christos if test "$_broken_apple_pcap_config" = "yes" ; then
5761 1.11 christos #
5762 1.11 christos # Strip -L/usr/local/lib with sed.
5763 1.11 christos #
5764 1.11 christos libpcap=`echo $libpcap | sed 's;-L/usr/local/lib;;'`
5765 1.11 christos fi
5766 1.11 christos else
5767 1.11 christos #
5768 1.11 christos # Not found; look for an installed pcap.
5769 1.11 christos #
5770 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpcap" >&5
5771 1.11 christos $as_echo_n "checking for main in -lpcap... " >&6; }
5772 1.11 christos if ${ac_cv_lib_pcap_main+:} false; then :
5773 1.4 christos $as_echo_n "(cached) " >&6
5774 1.1 christos else
5775 1.4 christos ac_check_lib_save_LIBS=$LIBS
5776 1.4 christos LIBS="-lpcap $LIBS"
5777 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5778 1.1 christos /* end confdefs.h. */
5779 1.1 christos
5780 1.1 christos
5781 1.1 christos int
5782 1.1 christos main ()
5783 1.1 christos {
5784 1.4 christos return main ();
5785 1.1 christos ;
5786 1.1 christos return 0;
5787 1.1 christos }
5788 1.1 christos _ACEOF
5789 1.4 christos if ac_fn_c_try_link "$LINENO"; then :
5790 1.4 christos ac_cv_lib_pcap_main=yes
5791 1.1 christos else
5792 1.4 christos ac_cv_lib_pcap_main=no
5793 1.4 christos fi
5794 1.4 christos rm -f core conftest.err conftest.$ac_objext \
5795 1.4 christos conftest$ac_exeext conftest.$ac_ext
5796 1.4 christos LIBS=$ac_check_lib_save_LIBS
5797 1.1 christos fi
5798 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_main" >&5
5799 1.4 christos $as_echo "$ac_cv_lib_pcap_main" >&6; }
5800 1.4 christos if test "x$ac_cv_lib_pcap_main" = xyes; then :
5801 1.4 christos libpcap="-lpcap"
5802 1.1 christos fi
5803 1.1 christos
5804 1.11 christos if test $libpcap = FAIL ; then
5805 1.11 christos as_fn_error $? "see the INSTALL doc for more info" "$LINENO" 5
5806 1.11 christos fi
5807 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extraneous pcap header directories" >&5
5808 1.4 christos $as_echo_n "checking for extraneous pcap header directories... " >&6; }
5809 1.11 christos if test \( ! -r /usr/local/include/pcap.h \) -a \
5810 1.11 christos \( ! -r /usr/include/pcap.h \); then
5811 1.11 christos if test -r /usr/local/include/pcap/pcap.h; then
5812 1.11 christos d="/usr/local/include/pcap"
5813 1.11 christos elif test -r /usr/include/pcap/pcap.h; then
5814 1.11 christos d="/usr/include/pcap"
5815 1.11 christos fi
5816 1.11 christos fi
5817 1.11 christos if test -z "$d" ; then
5818 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5819 1.4 christos $as_echo "not found" >&6; }
5820 1.11 christos else
5821 1.11 christos V_INCLS="-I$d $V_INCLS"
5822 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: found -- -I$d added" >&5
5823 1.4 christos $as_echo "found -- -I$d added" >&6; }
5824 1.11 christos fi
5825 1.11 christos fi
5826 1.11 christos fi
5827 1.4 christos else
5828 1.11 christos #
5829 1.11 christos # We found a local libpcap. Add it to the dependencies for
5830 1.11 christos # tcpdump.
5831 1.11 christos #
5832 1.11 christos V_PCAPDEP=$libpcap
5833 1.11 christos
5834 1.11 christos #
5835 1.11 christos # Look for its pcap-config script.
5836 1.11 christos #
5837 1.11 christos # Extract the first word of "pcap-config", so it can be a program name with args.
5838 1.4 christos set dummy pcap-config; ac_word=$2
5839 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5840 1.4 christos $as_echo_n "checking for $ac_word... " >&6; }
5841 1.4 christos if ${ac_cv_path_PCAP_CONFIG+:} false; then :
5842 1.4 christos $as_echo_n "(cached) " >&6
5843 1.1 christos else
5844 1.4 christos case $PCAP_CONFIG in
5845 1.4 christos [\\/]* | ?:[\\/]*)
5846 1.4 christos ac_cv_path_PCAP_CONFIG="$PCAP_CONFIG" # Let the user override the test with a path.
5847 1.4 christos ;;
5848 1.4 christos *)
5849 1.4 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5850 1.11 christos for as_dir in $local_pcap_dir
5851 1.4 christos do
5852 1.4 christos IFS=$as_save_IFS
5853 1.4 christos test -z "$as_dir" && as_dir=.
5854 1.4 christos for ac_exec_ext in '' $ac_executable_extensions; do
5855 1.4 christos if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5856 1.4 christos ac_cv_path_PCAP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5857 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5858 1.4 christos break 2
5859 1.4 christos fi
5860 1.4 christos done
5861 1.4 christos done
5862 1.4 christos IFS=$as_save_IFS
5863 1.1 christos
5864 1.4 christos ;;
5865 1.1 christos esac
5866 1.4 christos fi
5867 1.4 christos PCAP_CONFIG=$ac_cv_path_PCAP_CONFIG
5868 1.4 christos if test -n "$PCAP_CONFIG"; then
5869 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PCAP_CONFIG" >&5
5870 1.4 christos $as_echo "$PCAP_CONFIG" >&6; }
5871 1.4 christos else
5872 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5873 1.4 christos $as_echo "no" >&6; }
5874 1.4 christos fi
5875 1.4 christos
5876 1.4 christos
5877 1.11 christos
5878 1.11 christos if test -n "$PCAP_CONFIG"; then
5879 1.11 christos #
5880 1.11 christos # We don't want its --cflags or --libs output, because
5881 1.11 christos # those presume it's installed. For the C compiler flags,
5882 1.11 christos # we add the source directory for the local libpcap, so
5883 1.11 christos # we pick up its header files.
5884 1.11 christos #
5885 1.11 christos # We do, however, want its additional libraries, as required
5886 1.11 christos # when linking statically, because it makes calls to
5887 1.11 christos # routines in those libraries, so we'll need to link with
5888 1.11 christos # them, because we'll be linking statically with it.
5889 1.11 christos #
5890 1.11 christos # If it supports --static-pcap-only. use that, as we will be
5891 1.11 christos # linking with a static libpcap but won't be linking
5892 1.11 christos # statically with any of the libraries on which it depends;
5893 1.11 christos # those libraries might not even have static versions
5894 1.11 christos # installed.
5895 1.11 christos #
5896 1.11 christos # That means we need to find out the libraries on which
5897 1.11 christos # libpcap directly depends, so we can link with them, but we
5898 1.11 christos # don't need to link with the libraries on which those
5899 1.11 christos # libraries depend as, on all UN*Xes with which I'm
5900 1.11 christos # familiar, the libraries on which a shared library depends
5901 1.11 christos # are stored in the library and are automatically loaded by
5902 1.11 christos # the run-time linker, without the executable having to be
5903 1.11 christos # linked with those libraries. (This allows a library to be
5904 1.11 christos # changed to depend on more libraries without breaking that
5905 1.11 christos # library's ABI.)
5906 1.11 christos #
5907 1.11 christos # The only way to test for that support is to see if the
5908 1.11 christos # script contains the string "static-pcap-only"; we can't
5909 1.11 christos # try using that flag and checking for errors, as the
5910 1.11 christos # versions of the script that didn't have that flag wouldn't
5911 1.11 christos # report or return an error for an unsupported command-line
5912 1.11 christos # flag. Those older versions provided, with --static, only
5913 1.11 christos # the libraries on which libpcap depends, not the
5914 1.11 christos # dependencies of those libraries; the versions with
5915 1.11 christos # --static-pcap-only provide all the dependencies with
5916 1.11 christos # --static, for the benefit of programs that are completely
5917 1.11 christos # statically linked, and provide only the direct
5918 1.11 christos # dependencies with --static-pcap-only.
5919 1.11 christos #
5920 1.11 christos if grep -s -q "static-pcap-only" "$PCAP_CONFIG"
5921 1.11 christos then
5922 1.11 christos static_opt="--static-pcap-only"
5923 1.11 christos else
5924 1.11 christos static_opt="--static"
5925 1.11 christos fi
5926 1.11 christos V_INCLS="-I$local_pcap_dir $V_INCLS"
5927 1.11 christos additional_libs=`"$PCAP_CONFIG" $static_opt --additional-libs`
5928 1.11 christos libpcap="$libpcap $additional_libs"
5929 1.11 christos else
5930 1.11 christos #
5931 1.11 christos # It doesn't have a pcap-config script.
5932 1.11 christos # Make sure it has a pcap.h file.
5933 1.11 christos #
5934 1.11 christos places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
5935 1.11 christos egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
5936 1.11 christos places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
5937 1.11 christos egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
5938 1.11 christos pcapH=FAIL
5939 1.11 christos if test -r $local_pcap_dir/pcap.h; then
5940 1.11 christos pcapH=$local_pcap_dir
5941 1.11 christos else
5942 1.11 christos for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
5943 1.11 christos if test -r $dir/pcap.h ; then
5944 1.11 christos pcapH=$dir
5945 1.11 christos fi
5946 1.11 christos done
5947 1.11 christos fi
5948 1.11 christos
5949 1.11 christos if test $pcapH = FAIL ; then
5950 1.11 christos as_fn_error $? "cannot find pcap.h: see INSTALL" "$LINENO" 5
5951 1.11 christos fi
5952 1.11 christos
5953 1.11 christos #
5954 1.11 christos # Force the compiler to look for header files in the
5955 1.11 christos # directory containing pcap.h.
5956 1.11 christos #
5957 1.11 christos V_INCLS="-I$pcapH $V_INCLS"
5958 1.11 christos fi
5959 1.4 christos fi
5960 1.4 christos
5961 1.11 christos if test -z "$PKG_CONFIG" -a -z "$PCAP_CONFIG"; then
5962 1.11 christos #
5963 1.11 christos # We don't have pkg-config or pcap-config; find out any additional
5964 1.11 christos # link flags we need. (If we have pkg-config or pcap-config, we
5965 1.11 christos # assume it tells us what we need.)
5966 1.11 christos #
5967 1.11 christos case "$host_os" in
5968 1.11 christos
5969 1.11 christos aix*)
5970 1.11 christos #
5971 1.11 christos # If libpcap is DLPI-based, we have to use /lib/pse.exp if
5972 1.11 christos # present, as we use the STREAMS routines.
5973 1.11 christos #
5974 1.11 christos # (XXX - true only if we're linking with a static libpcap?)
5975 1.11 christos #
5976 1.11 christos pseexe="/lib/pse.exp"
5977 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pseexe" >&5
5978 1.4 christos $as_echo_n "checking for $pseexe... " >&6; }
5979 1.11 christos if test -f $pseexe ; then
5980 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5981 1.4 christos $as_echo "yes" >&6; }
5982 1.11 christos LIBS="$LIBS -I:$pseexe"
5983 1.11 christos fi
5984 1.11 christos
5985 1.11 christos #
5986 1.11 christos # If libpcap is BPF-based, we need "-lodm" and "-lcfg", as
5987 1.11 christos # we use them to load the BPF module.
5988 1.11 christos #
5989 1.11 christos # (XXX - true only if we're linking with a static libpcap?)
5990 1.11 christos #
5991 1.11 christos LIBS="$LIBS -lodm -lcfg"
5992 1.11 christos ;;
5993 1.11 christos
5994 1.11 christos solaris*)
5995 1.11 christos # libdlpi is needed for Solaris 11 and later.
5996 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5
5997 1.11 christos $as_echo_n "checking for dlpi_walk in -ldlpi... " >&6; }
5998 1.11 christos if ${ac_cv_lib_dlpi_dlpi_walk+:} false; then :
5999 1.11 christos $as_echo_n "(cached) " >&6
6000 1.11 christos else
6001 1.11 christos ac_check_lib_save_LIBS=$LIBS
6002 1.11 christos LIBS="-ldlpi -L/lib $LIBS"
6003 1.11 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6004 1.11 christos /* end confdefs.h. */
6005 1.11 christos
6006 1.11 christos /* Override any GCC internal prototype to avoid an error.
6007 1.11 christos Use char because int might match the return type of a GCC
6008 1.11 christos builtin and then its argument prototype would still apply. */
6009 1.11 christos #ifdef __cplusplus
6010 1.11 christos extern "C"
6011 1.11 christos #endif
6012 1.11 christos char dlpi_walk ();
6013 1.11 christos int
6014 1.11 christos main ()
6015 1.11 christos {
6016 1.11 christos return dlpi_walk ();
6017 1.11 christos ;
6018 1.11 christos return 0;
6019 1.11 christos }
6020 1.11 christos _ACEOF
6021 1.11 christos if ac_fn_c_try_link "$LINENO"; then :
6022 1.11 christos ac_cv_lib_dlpi_dlpi_walk=yes
6023 1.11 christos else
6024 1.11 christos ac_cv_lib_dlpi_dlpi_walk=no
6025 1.11 christos fi
6026 1.11 christos rm -f core conftest.err conftest.$ac_objext \
6027 1.11 christos conftest$ac_exeext conftest.$ac_ext
6028 1.11 christos LIBS=$ac_check_lib_save_LIBS
6029 1.11 christos fi
6030 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5
6031 1.11 christos $as_echo "$ac_cv_lib_dlpi_dlpi_walk" >&6; }
6032 1.11 christos if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes; then :
6033 1.11 christos LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS"
6034 1.11 christos fi
6035 1.4 christos
6036 1.11 christos ;;
6037 1.11 christos esac
6038 1.4 christos fi
6039 1.4 christos
6040 1.11 christos LIBS="$libpcap $LIBS"
6041 1.11 christos
6042 1.4 christos ac_fn_c_check_func "$LINENO" "pcap_loop" "ac_cv_func_pcap_loop"
6043 1.4 christos if test "x$ac_cv_func_pcap_loop" = xyes; then :
6044 1.4 christos
6045 1.4 christos else
6046 1.1 christos
6047 1.11 christos as_fn_error $? "This is a bug, please follow the guidelines in CONTRIBUTING.md and include the
6048 1.4 christos config.log file in your report. If you have downloaded libpcap from
6049 1.4 christos tcpdump.org, and built it yourself, please also include the config.log
6050 1.4 christos file from the libpcap source directory, the Makefile from the libpcap
6051 1.4 christos source directory, and the output of the make process for libpcap, as
6052 1.4 christos this could be a problem with the libpcap that was built, and we will
6053 1.4 christos not be able to determine why this is happening, and thus will not be
6054 1.4 christos able to fix it, without that information, as we have not been able to
6055 1.4 christos reproduce this problem ourselves." "$LINENO" 5
6056 1.1 christos
6057 1.1 christos fi
6058 1.1 christos
6059 1.1 christos
6060 1.1 christos
6061 1.1 christos #
6062 1.1 christos # Check for these after AC_LBL_LIBPCAP, so we link with the appropriate
6063 1.1 christos # libraries (e.g., "-lsocket -lnsl" on Solaris).
6064 1.1 christos #
6065 1.7 christos # You are in a twisty little maze of UN*Xes, all different.
6066 1.7 christos # Some might not have ether_ntohost().
6067 1.11 christos # Some might have it and declare it in <net/ethernet.h>.
6068 1.11 christos # Some might have it and declare it in <netinet/ether.h>
6069 1.11 christos # Some might have it and declare it in <sys/ethernet.h>.
6070 1.11 christos # Some might have it and declare it in <arpa/inet.h>.
6071 1.11 christos # Some might have it and declare it in <netinet/if_ether.h>.
6072 1.11 christos # Some might have it and not declare it in any header file.
6073 1.7 christos #
6074 1.7 christos # Before you is a C compiler.
6075 1.1 christos #
6076 1.7 christos for ac_func in ether_ntohost
6077 1.7 christos do :
6078 1.7 christos ac_fn_c_check_func "$LINENO" "ether_ntohost" "ac_cv_func_ether_ntohost"
6079 1.7 christos if test "x$ac_cv_func_ether_ntohost" = xyes; then :
6080 1.7 christos cat >>confdefs.h <<_ACEOF
6081 1.7 christos #define HAVE_ETHER_NTOHOST 1
6082 1.7 christos _ACEOF
6083 1.7 christos
6084 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for buggy ether_ntohost" >&5
6085 1.7 christos $as_echo_n "checking for buggy ether_ntohost... " >&6; }
6086 1.7 christos if ${ac_cv_buggy_ether_ntohost+:} false; then :
6087 1.7 christos $as_echo_n "(cached) " >&6
6088 1.7 christos else
6089 1.7 christos
6090 1.7 christos if test "$cross_compiling" = yes; then :
6091 1.7 christos ac_cv_buggy_ether_ntohost="not while cross-compiling"
6092 1.7 christos else
6093 1.7 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6094 1.1 christos /* end confdefs.h. */
6095 1.7 christos
6096 1.7 christos #include <netdb.h>
6097 1.11 christos #include <netinet/ether.h>
6098 1.11 christos #include <stdlib.h>
6099 1.1 christos #include <sys/types.h>
6100 1.1 christos #include <sys/param.h>
6101 1.1 christos #include <sys/socket.h>
6102 1.1 christos
6103 1.1 christos int
6104 1.1 christos main(int argc, char **argv)
6105 1.1 christos {
6106 1.1 christos u_char ea[6] = { 0xff, 0xff, 0xff, 0xff, 0xff };
6107 1.1 christos char name[MAXHOSTNAMELEN];
6108 1.1 christos
6109 1.1 christos ether_ntohost(name, (struct ether_addr *)ea);
6110 1.1 christos exit(0);
6111 1.1 christos }
6112 1.1 christos
6113 1.1 christos _ACEOF
6114 1.4 christos if ac_fn_c_try_run "$LINENO"; then :
6115 1.1 christos ac_cv_buggy_ether_ntohost=no
6116 1.1 christos else
6117 1.4 christos ac_cv_buggy_ether_ntohost=yes
6118 1.1 christos fi
6119 1.4 christos rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6120 1.4 christos conftest.$ac_objext conftest.beam conftest.$ac_ext
6121 1.1 christos fi
6122 1.1 christos
6123 1.1 christos fi
6124 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_ether_ntohost" >&5
6125 1.4 christos $as_echo "$ac_cv_buggy_ether_ntohost" >&6; }
6126 1.1 christos if test "$ac_cv_buggy_ether_ntohost" = "no"; then
6127 1.4 christos
6128 1.4 christos $as_echo "#define USE_ETHER_NTOHOST 1" >>confdefs.h
6129 1.1 christos
6130 1.1 christos fi
6131 1.1 christos
6132 1.1 christos fi
6133 1.1 christos done
6134 1.1 christos
6135 1.1 christos if test "$ac_cv_func_ether_ntohost" = yes -a \
6136 1.1 christos "$ac_cv_buggy_ether_ntohost" = "no"; then
6137 1.1 christos #
6138 1.11 christos # OK, we have ether_ntohost(). Is it declared in <net/ethernet.h>?
6139 1.11 christos #
6140 1.11 christos # This test fails if we don't have <net/ethernet.h> or if we do
6141 1.11 christos # but it doesn't declare ether_ntohost().
6142 1.11 christos #
6143 1.11 christos ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
6144 1.11 christos #include <net/ethernet.h>
6145 1.11 christos
6146 1.11 christos "
6147 1.11 christos if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
6148 1.11 christos
6149 1.11 christos
6150 1.11 christos $as_echo "#define NET_ETHERNET_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
6151 1.11 christos
6152 1.11 christos
6153 1.11 christos fi
6154 1.11 christos
6155 1.11 christos #
6156 1.11 christos # Did that succeed?
6157 1.1 christos #
6158 1.11 christos if test "$ac_cv_have_decl_ether_ntohost" != yes; then
6159 1.11 christos #
6160 1.11 christos # No, how about <netinet/ether.h>, as on Linux?
6161 1.11 christos #
6162 1.11 christos # This test fails if we don't have <netinet/ether.h>
6163 1.11 christos # or if we do but it doesn't declare ether_ntohost().
6164 1.1 christos #
6165 1.11 christos # Unset ac_cv_have_decl_ether_ntohost so we don't
6166 1.11 christos # treat the previous failure as a cached value and
6167 1.11 christos # suppress the next test.
6168 1.1 christos #
6169 1.11 christos unset ac_cv_have_decl_ether_ntohost
6170 1.4 christos ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
6171 1.11 christos #include <netinet/ether.h>
6172 1.1 christos
6173 1.4 christos "
6174 1.4 christos if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
6175 1.1 christos
6176 1.1 christos
6177 1.11 christos $as_echo "#define NETINET_ETHER_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
6178 1.1 christos
6179 1.1 christos
6180 1.1 christos fi
6181 1.1 christos
6182 1.1 christos fi
6183 1.1 christos #
6184 1.1 christos # Did that succeed?
6185 1.1 christos #
6186 1.1 christos if test "$ac_cv_have_decl_ether_ntohost" != yes; then
6187 1.1 christos #
6188 1.11 christos # No, how about <sys/ethernet.h>, as on Solaris 10
6189 1.11 christos # and later?
6190 1.11 christos #
6191 1.11 christos # This test fails if we don't have <sys/ethernet.h>
6192 1.11 christos # or if we do but it doesn't declare ether_ntohost().
6193 1.11 christos #
6194 1.11 christos # Unset ac_cv_have_decl_ether_ntohost so we don't
6195 1.11 christos # treat the previous failure as a cached value and
6196 1.11 christos # suppress the next test.
6197 1.1 christos #
6198 1.11 christos unset ac_cv_have_decl_ether_ntohost
6199 1.11 christos ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
6200 1.11 christos #include <sys/ethernet.h>
6201 1.11 christos
6202 1.11 christos "
6203 1.11 christos if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
6204 1.11 christos
6205 1.11 christos
6206 1.11 christos $as_echo "#define SYS_ETHERNET_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
6207 1.11 christos
6208 1.1 christos
6209 1.1 christos fi
6210 1.1 christos
6211 1.11 christos fi
6212 1.11 christos #
6213 1.11 christos # Did that succeed?
6214 1.11 christos #
6215 1.11 christos if test "$ac_cv_have_decl_ether_ntohost" != yes; then
6216 1.11 christos #
6217 1.11 christos # No, how about <arpa/inet.h>, as in AIX?
6218 1.11 christos #
6219 1.11 christos # This test fails if we don't have <arpa/inet.h>
6220 1.11 christos # (if we have ether_ntohost(), we should have
6221 1.11 christos # networking, and if we have networking, we should
6222 1.11 christos # have <arpa/inet.h>) or if we do but it doesn't
6223 1.11 christos # declare ether_ntohost().
6224 1.11 christos #
6225 1.11 christos # Unset ac_cv_have_decl_ether_ntohost so we don't
6226 1.11 christos # treat the previous failure as a cached value and
6227 1.11 christos # suppress the next test.
6228 1.11 christos #
6229 1.11 christos unset ac_cv_have_decl_ether_ntohost
6230 1.11 christos ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
6231 1.11 christos #include <arpa/inet.h>
6232 1.1 christos
6233 1.4 christos "
6234 1.4 christos if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
6235 1.1 christos
6236 1.1 christos
6237 1.11 christos $as_echo "#define ARPA_INET_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
6238 1.1 christos
6239 1.1 christos
6240 1.1 christos fi
6241 1.1 christos
6242 1.1 christos fi
6243 1.1 christos #
6244 1.11 christos # Did that succeed?
6245 1.1 christos #
6246 1.1 christos if test "$ac_cv_have_decl_ether_ntohost" != yes; then
6247 1.1 christos #
6248 1.11 christos # No, how about <netinet/if_ether.h>?
6249 1.11 christos # On some platforms, it requires <net/if.h> and
6250 1.11 christos # <netinet/in.h>, and we always include it with
6251 1.11 christos # both of them, so test it with both of them.
6252 1.11 christos #
6253 1.11 christos # This test fails if we don't have <netinet/if_ether.h>
6254 1.11 christos # and the headers we include before it, or if we do but
6255 1.11 christos # <netinet/if_ether.h> doesn't declare ether_hostton().
6256 1.11 christos #
6257 1.11 christos # Unset ac_cv_have_decl_ether_ntohost so we don't
6258 1.11 christos # treat the previous failure as a cached value and
6259 1.11 christos # suppress the next test.
6260 1.1 christos #
6261 1.11 christos unset ac_cv_have_decl_ether_ntohost
6262 1.11 christos ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
6263 1.3 christos #include <sys/types.h>
6264 1.3 christos #include <sys/socket.h>
6265 1.11 christos #include <net/if.h>
6266 1.3 christos #include <netinet/in.h>
6267 1.3 christos #include <netinet/if_ether.h>
6268 1.1 christos
6269 1.4 christos "
6270 1.11 christos if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
6271 1.11 christos
6272 1.3 christos
6273 1.11 christos $as_echo "#define NETINET_IF_ETHER_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
6274 1.1 christos
6275 1.3 christos
6276 1.1 christos fi
6277 1.1 christos
6278 1.11 christos fi
6279 1.11 christos #
6280 1.11 christos # After all that, is ether_ntohost() declared?
6281 1.11 christos #
6282 1.11 christos if test "$ac_cv_have_decl_ether_ntohost" = yes; then
6283 1.11 christos #
6284 1.11 christos # Yes.
6285 1.11 christos #
6286 1.1 christos
6287 1.11 christos $as_echo "#define HAVE_DECL_ETHER_NTOHOST 1" >>confdefs.h
6288 1.3 christos
6289 1.3 christos else
6290 1.11 christos #
6291 1.11 christos # No, we'll have to declare it ourselves.
6292 1.11 christos # Do we have "struct ether_addr" if we include
6293 1.11 christos # <netinet/if_ether.h>?
6294 1.11 christos #
6295 1.11 christos ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" "
6296 1.11 christos #include <sys/types.h>
6297 1.11 christos #include <sys/socket.h>
6298 1.11 christos #include <net/if.h>
6299 1.11 christos #include <netinet/in.h>
6300 1.11 christos #include <netinet/if_ether.h>
6301 1.1 christos
6302 1.11 christos "
6303 1.11 christos if test "x$ac_cv_type_struct_ether_addr" = xyes; then :
6304 1.1 christos
6305 1.11 christos cat >>confdefs.h <<_ACEOF
6306 1.11 christos #define HAVE_STRUCT_ETHER_ADDR 1
6307 1.11 christos _ACEOF
6308 1.1 christos
6309 1.1 christos
6310 1.1 christos fi
6311 1.11 christos
6312 1.11 christos fi
6313 1.1 christos fi
6314 1.1 christos
6315 1.6 christos ac_fn_c_check_func "$LINENO" "pcap_list_datalinks" "ac_cv_func_pcap_list_datalinks"
6316 1.6 christos if test "x$ac_cv_func_pcap_list_datalinks" = xyes; then :
6317 1.6 christos
6318 1.6 christos
6319 1.6 christos $as_echo "#define HAVE_PCAP_LIST_DATALINKS 1" >>confdefs.h
6320 1.6 christos
6321 1.6 christos for ac_func in pcap_free_datalinks
6322 1.6 christos do :
6323 1.6 christos ac_fn_c_check_func "$LINENO" "pcap_free_datalinks" "ac_cv_func_pcap_free_datalinks"
6324 1.6 christos if test "x$ac_cv_func_pcap_free_datalinks" = xyes; then :
6325 1.6 christos cat >>confdefs.h <<_ACEOF
6326 1.6 christos #define HAVE_PCAP_FREE_DATALINKS 1
6327 1.6 christos _ACEOF
6328 1.6 christos
6329 1.6 christos fi
6330 1.6 christos done
6331 1.6 christos
6332 1.6 christos
6333 1.6 christos else
6334 1.6 christos
6335 1.6 christos case " $LIBOBJS " in
6336 1.6 christos *" datalinks.$ac_objext "* ) ;;
6337 1.6 christos *) LIBOBJS="$LIBOBJS datalinks.$ac_objext"
6338 1.6 christos ;;
6339 1.6 christos esac
6340 1.6 christos
6341 1.6 christos
6342 1.6 christos fi
6343 1.6 christos
6344 1.6 christos
6345 1.6 christos ac_fn_c_check_func "$LINENO" "pcap_datalink_name_to_val" "ac_cv_func_pcap_datalink_name_to_val"
6346 1.6 christos if test "x$ac_cv_func_pcap_datalink_name_to_val" = xyes; then :
6347 1.6 christos
6348 1.6 christos
6349 1.6 christos $as_echo "#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1" >>confdefs.h
6350 1.6 christos
6351 1.6 christos ac_fn_c_check_func "$LINENO" "pcap_datalink_val_to_description" "ac_cv_func_pcap_datalink_val_to_description"
6352 1.6 christos if test "x$ac_cv_func_pcap_datalink_val_to_description" = xyes; then :
6353 1.6 christos
6354 1.6 christos $as_echo "#define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1" >>confdefs.h
6355 1.6 christos
6356 1.6 christos else
6357 1.6 christos
6358 1.6 christos case " $LIBOBJS " in
6359 1.6 christos *" dlnames.$ac_objext "* ) ;;
6360 1.6 christos *) LIBOBJS="$LIBOBJS dlnames.$ac_objext"
6361 1.6 christos ;;
6362 1.6 christos esac
6363 1.6 christos
6364 1.6 christos
6365 1.6 christos fi
6366 1.6 christos
6367 1.6 christos
6368 1.6 christos else
6369 1.6 christos
6370 1.6 christos case " $LIBOBJS " in
6371 1.6 christos *" dlnames.$ac_objext "* ) ;;
6372 1.6 christos *) LIBOBJS="$LIBOBJS dlnames.$ac_objext"
6373 1.6 christos ;;
6374 1.6 christos esac
6375 1.6 christos
6376 1.6 christos
6377 1.6 christos fi
6378 1.6 christos
6379 1.6 christos
6380 1.11 christos for ac_func in pcap_set_datalink
6381 1.11 christos do :
6382 1.11 christos ac_fn_c_check_func "$LINENO" "pcap_set_datalink" "ac_cv_func_pcap_set_datalink"
6383 1.11 christos if test "x$ac_cv_func_pcap_set_datalink" = xyes; then :
6384 1.11 christos cat >>confdefs.h <<_ACEOF
6385 1.11 christos #define HAVE_PCAP_SET_DATALINK 1
6386 1.11 christos _ACEOF
6387 1.11 christos
6388 1.11 christos fi
6389 1.11 christos done
6390 1.11 christos
6391 1.11 christos
6392 1.6 christos for ac_func in pcap_breakloop
6393 1.6 christos do :
6394 1.6 christos ac_fn_c_check_func "$LINENO" "pcap_breakloop" "ac_cv_func_pcap_breakloop"
6395 1.6 christos if test "x$ac_cv_func_pcap_breakloop" = xyes; then :
6396 1.6 christos cat >>confdefs.h <<_ACEOF
6397 1.6 christos #define HAVE_PCAP_BREAKLOOP 1
6398 1.6 christos _ACEOF
6399 1.6 christos
6400 1.6 christos fi
6401 1.6 christos done
6402 1.6 christos
6403 1.6 christos
6404 1.3 christos #
6405 1.3 christos # Do we have the new open API? Check for pcap_create, and assume that,
6406 1.3 christos # if we do, we also have pcap_activate() and the other new routines
6407 1.3 christos # introduced in libpcap 1.0.0.
6408 1.3 christos #
6409 1.3 christos for ac_func in pcap_create
6410 1.4 christos do :
6411 1.4 christos ac_fn_c_check_func "$LINENO" "pcap_create" "ac_cv_func_pcap_create"
6412 1.4 christos if test "x$ac_cv_func_pcap_create" = xyes; then :
6413 1.3 christos cat >>confdefs.h <<_ACEOF
6414 1.4 christos #define HAVE_PCAP_CREATE 1
6415 1.1 christos _ACEOF
6416 1.1 christos
6417 1.3 christos fi
6418 1.3 christos done
6419 1.3 christos
6420 1.3 christos if test $ac_cv_func_pcap_create = "yes" ; then
6421 1.1 christos #
6422 1.3 christos # OK, do we have pcap_set_tstamp_type? If so, assume we have
6423 1.3 christos # pcap_list_tstamp_types and pcap_free_tstamp_types as well.
6424 1.1 christos #
6425 1.4 christos for ac_func in pcap_set_tstamp_type
6426 1.4 christos do :
6427 1.4 christos ac_fn_c_check_func "$LINENO" "pcap_set_tstamp_type" "ac_cv_func_pcap_set_tstamp_type"
6428 1.4 christos if test "x$ac_cv_func_pcap_set_tstamp_type" = xyes; then :
6429 1.3 christos cat >>confdefs.h <<_ACEOF
6430 1.4 christos #define HAVE_PCAP_SET_TSTAMP_TYPE 1
6431 1.1 christos _ACEOF
6432 1.1 christos
6433 1.1 christos fi
6434 1.3 christos done
6435 1.3 christos
6436 1.5 christos #
6437 1.5 christos # And do we have pcap_set_tstamp_precision? If so, we assume
6438 1.5 christos # we also have pcap_open_offline_with_tstamp_precision.
6439 1.5 christos #
6440 1.5 christos for ac_func in pcap_set_tstamp_precision
6441 1.5 christos do :
6442 1.5 christos ac_fn_c_check_func "$LINENO" "pcap_set_tstamp_precision" "ac_cv_func_pcap_set_tstamp_precision"
6443 1.5 christos if test "x$ac_cv_func_pcap_set_tstamp_precision" = xyes; then :
6444 1.5 christos cat >>confdefs.h <<_ACEOF
6445 1.5 christos #define HAVE_PCAP_SET_TSTAMP_PRECISION 1
6446 1.5 christos _ACEOF
6447 1.5 christos
6448 1.5 christos fi
6449 1.5 christos done
6450 1.5 christos
6451 1.3 christos fi
6452 1.3 christos
6453 1.6 christos #
6454 1.6 christos # Check for a miscellaneous collection of functions which we use
6455 1.6 christos # if we have them.
6456 1.6 christos #
6457 1.11 christos for ac_func in pcap_findalldevs
6458 1.4 christos do :
6459 1.11 christos ac_fn_c_check_func "$LINENO" "pcap_findalldevs" "ac_cv_func_pcap_findalldevs"
6460 1.11 christos if test "x$ac_cv_func_pcap_findalldevs" = xyes; then :
6461 1.1 christos cat >>confdefs.h <<_ACEOF
6462 1.11 christos #define HAVE_PCAP_FINDALLDEVS 1
6463 1.1 christos _ACEOF
6464 1.1 christos
6465 1.3 christos fi
6466 1.3 christos done
6467 1.3 christos
6468 1.3 christos if test $ac_cv_func_pcap_findalldevs = "yes" ; then
6469 1.3 christos savedcppflags="$CPPFLAGS"
6470 1.3 christos CPPFLAGS="$CPPFLAGS $V_INCLS"
6471 1.4 christos ac_fn_c_check_type "$LINENO" "pcap_if_t" "ac_cv_type_pcap_if_t" "#include <pcap.h>
6472 1.4 christos "
6473 1.4 christos if test "x$ac_cv_type_pcap_if_t" = xyes; then :
6474 1.1 christos
6475 1.3 christos cat >>confdefs.h <<_ACEOF
6476 1.3 christos #define HAVE_PCAP_IF_T 1
6477 1.1 christos _ACEOF
6478 1.1 christos
6479 1.1 christos
6480 1.3 christos fi
6481 1.1 christos
6482 1.3 christos CPPFLAGS="$savedcppflags"
6483 1.1 christos fi
6484 1.11 christos for ac_func in pcap_dump_flush pcap_lib_version
6485 1.11 christos do :
6486 1.11 christos as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6487 1.11 christos ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6488 1.11 christos if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6489 1.11 christos cat >>confdefs.h <<_ACEOF
6490 1.11 christos #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6491 1.11 christos _ACEOF
6492 1.11 christos
6493 1.11 christos fi
6494 1.11 christos done
6495 1.1 christos
6496 1.3 christos if test $ac_cv_func_pcap_lib_version = "no" ; then
6497 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pcap_version is defined by libpcap" >&5
6498 1.4 christos $as_echo_n "checking whether pcap_version is defined by libpcap... " >&6; }
6499 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6500 1.1 christos /* end confdefs.h. */
6501 1.3 christos
6502 1.3 christos int
6503 1.3 christos main ()
6504 1.3 christos {
6505 1.3 christos
6506 1.3 christos extern char pcap_version[];
6507 1.3 christos
6508 1.3 christos return (int)pcap_version;
6509 1.3 christos
6510 1.3 christos ;
6511 1.3 christos return 0;
6512 1.3 christos }
6513 1.1 christos _ACEOF
6514 1.4 christos if ac_fn_c_try_link "$LINENO"; then :
6515 1.3 christos ac_lbl_cv_pcap_version_defined=yes
6516 1.1 christos else
6517 1.4 christos ac_lbl_cv_pcap_version_defined=no
6518 1.1 christos fi
6519 1.4 christos rm -f core conftest.err conftest.$ac_objext \
6520 1.4 christos conftest$ac_exeext conftest.$ac_ext
6521 1.4 christos if test "$ac_lbl_cv_pcap_version_defined" = yes ; then
6522 1.6 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6523 1.4 christos $as_echo "yes" >&6; }
6524 1.1 christos
6525 1.4 christos $as_echo "#define HAVE_PCAP_VERSION 1" >>confdefs.h
6526 1.1 christos
6527 1.3 christos else
6528 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6529 1.4 christos $as_echo "no" >&6; }
6530 1.3 christos fi
6531 1.3 christos fi
6532 1.11 christos for ac_func in pcap_setdirection pcap_set_immediate_mode pcap_dump_ftell64
6533 1.11 christos do :
6534 1.11 christos as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6535 1.11 christos ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6536 1.11 christos if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6537 1.11 christos cat >>confdefs.h <<_ACEOF
6538 1.11 christos #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6539 1.11 christos _ACEOF
6540 1.11 christos
6541 1.11 christos fi
6542 1.11 christos done
6543 1.11 christos
6544 1.11 christos for ac_func in pcap_open pcap_findalldevs_ex
6545 1.11 christos do :
6546 1.11 christos as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6547 1.11 christos ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6548 1.11 christos if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6549 1.11 christos cat >>confdefs.h <<_ACEOF
6550 1.11 christos #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6551 1.11 christos _ACEOF
6552 1.11 christos
6553 1.11 christos fi
6554 1.11 christos done
6555 1.11 christos
6556 1.11 christos ac_fn_c_check_func "$LINENO" "pcap_dump_ftell" "ac_cv_func_pcap_dump_ftell"
6557 1.11 christos if test "x$ac_cv_func_pcap_dump_ftell" = xyes; then :
6558 1.11 christos $as_echo "#define HAVE_PCAP_DUMP_FTELL 1" >>confdefs.h
6559 1.11 christos
6560 1.11 christos else
6561 1.11 christos case " $LIBOBJS " in
6562 1.11 christos *" pcap_dump_ftell.$ac_objext "* ) ;;
6563 1.11 christos *) LIBOBJS="$LIBOBJS pcap_dump_ftell.$ac_objext"
6564 1.11 christos ;;
6565 1.11 christos esac
6566 1.11 christos
6567 1.11 christos fi
6568 1.11 christos
6569 1.11 christos
6570 1.7 christos
6571 1.7 christos #
6572 1.7 christos # Check for special debugging functions
6573 1.7 christos #
6574 1.7 christos for ac_func in pcap_set_parser_debug
6575 1.7 christos do :
6576 1.7 christos ac_fn_c_check_func "$LINENO" "pcap_set_parser_debug" "ac_cv_func_pcap_set_parser_debug"
6577 1.7 christos if test "x$ac_cv_func_pcap_set_parser_debug" = xyes; then :
6578 1.7 christos cat >>confdefs.h <<_ACEOF
6579 1.7 christos #define HAVE_PCAP_SET_PARSER_DEBUG 1
6580 1.7 christos _ACEOF
6581 1.7 christos
6582 1.7 christos fi
6583 1.7 christos done
6584 1.7 christos
6585 1.7 christos if test "$ac_cv_func_pcap_set_parser_debug" = "no" ; then
6586 1.7 christos #
6587 1.7 christos # OK, we don't have pcap_set_parser_debug() to set the libpcap
6588 1.7 christos # filter expression parser debug flag; can we directly set the
6589 1.7 christos # flag?
6590 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pcap_debug is defined by libpcap" >&5
6591 1.4 christos $as_echo_n "checking whether pcap_debug is defined by libpcap... " >&6; }
6592 1.7 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6593 1.1 christos /* end confdefs.h. */
6594 1.3 christos
6595 1.3 christos int
6596 1.3 christos main ()
6597 1.3 christos {
6598 1.3 christos
6599 1.7 christos extern int pcap_debug;
6600 1.3 christos
6601 1.7 christos return pcap_debug;
6602 1.3 christos
6603 1.3 christos ;
6604 1.3 christos return 0;
6605 1.3 christos }
6606 1.1 christos _ACEOF
6607 1.4 christos if ac_fn_c_try_link "$LINENO"; then :
6608 1.3 christos ac_lbl_cv_pcap_debug_defined=yes
6609 1.1 christos else
6610 1.4 christos ac_lbl_cv_pcap_debug_defined=no
6611 1.1 christos fi
6612 1.4 christos rm -f core conftest.err conftest.$ac_objext \
6613 1.4 christos conftest$ac_exeext conftest.$ac_ext
6614 1.7 christos if test "$ac_lbl_cv_pcap_debug_defined" = yes ; then
6615 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6616 1.4 christos $as_echo "yes" >&6; }
6617 1.3 christos
6618 1.4 christos $as_echo "#define HAVE_PCAP_DEBUG 1" >>confdefs.h
6619 1.1 christos
6620 1.7 christos else
6621 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6622 1.4 christos $as_echo "no" >&6; }
6623 1.7 christos #
6624 1.7 christos # OK, what about "yydebug"?
6625 1.7 christos #
6626 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yydebug is defined by libpcap" >&5
6627 1.4 christos $as_echo_n "checking whether yydebug is defined by libpcap... " >&6; }
6628 1.7 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6629 1.1 christos /* end confdefs.h. */
6630 1.3 christos
6631 1.4 christos int
6632 1.4 christos main ()
6633 1.4 christos {
6634 1.3 christos
6635 1.7 christos extern int yydebug;
6636 1.3 christos
6637 1.7 christos return yydebug;
6638 1.3 christos
6639 1.3 christos ;
6640 1.3 christos return 0;
6641 1.3 christos }
6642 1.1 christos _ACEOF
6643 1.4 christos if ac_fn_c_try_link "$LINENO"; then :
6644 1.4 christos ac_lbl_cv_yydebug_defined=yes
6645 1.1 christos else
6646 1.4 christos ac_lbl_cv_yydebug_defined=no
6647 1.4 christos fi
6648 1.4 christos rm -f core conftest.err conftest.$ac_objext \
6649 1.4 christos conftest$ac_exeext conftest.$ac_ext
6650 1.7 christos if test "$ac_lbl_cv_yydebug_defined" = yes ; then
6651 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6652 1.4 christos $as_echo "yes" >&6; }
6653 1.1 christos
6654 1.4 christos $as_echo "#define HAVE_YYDEBUG 1" >>confdefs.h
6655 1.1 christos
6656 1.7 christos else
6657 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6658 1.4 christos $as_echo "no" >&6; }
6659 1.7 christos fi
6660 1.4 christos fi
6661 1.3 christos fi
6662 1.7 christos for ac_func in pcap_set_optimizer_debug
6663 1.7 christos do :
6664 1.7 christos ac_fn_c_check_func "$LINENO" "pcap_set_optimizer_debug" "ac_cv_func_pcap_set_optimizer_debug"
6665 1.7 christos if test "x$ac_cv_func_pcap_set_optimizer_debug" = xyes; then :
6666 1.7 christos cat >>confdefs.h <<_ACEOF
6667 1.7 christos #define HAVE_PCAP_SET_OPTIMIZER_DEBUG 1
6668 1.7 christos _ACEOF
6669 1.7 christos
6670 1.7 christos fi
6671 1.7 christos done
6672 1.7 christos
6673 1.4 christos ac_fn_c_check_func "$LINENO" "bpf_dump" "ac_cv_func_bpf_dump"
6674 1.4 christos if test "x$ac_cv_func_bpf_dump" = xyes; then :
6675 1.4 christos $as_echo "#define HAVE_BPF_DUMP 1" >>confdefs.h
6676 1.1 christos
6677 1.3 christos else
6678 1.3 christos case " $LIBOBJS " in
6679 1.4 christos *" bpf_dump.$ac_objext "* ) ;;
6680 1.4 christos *) LIBOBJS="$LIBOBJS bpf_dump.$ac_objext"
6681 1.3 christos ;;
6682 1.3 christos esac
6683 1.1 christos
6684 1.1 christos fi
6685 1.3 christos
6686 1.1 christos
6687 1.3 christos V_GROUP=0
6688 1.3 christos if test -f /etc/group -a ! -z "`grep '^wheel:' /etc/group`" ; then
6689 1.3 christos V_GROUP=wheel
6690 1.1 christos fi
6691 1.3 christos #
6692 1.3 christos # Assume V7/BSD convention for man pages (file formats in section 5,
6693 1.3 christos # miscellaneous info in section 7).
6694 1.3 christos #
6695 1.3 christos MAN_FILE_FORMATS=5
6696 1.3 christos MAN_MISC_INFO=7
6697 1.3 christos case "$host_os" in
6698 1.3 christos
6699 1.3 christos aix*)
6700 1.3 christos
6701 1.4 christos $as_echo "#define _SUN 1" >>confdefs.h
6702 1.1 christos
6703 1.3 christos ;;
6704 1.3 christos
6705 1.3 christos hpux*)
6706 1.3 christos #
6707 1.3 christos # Use System V conventions for man pages.
6708 1.3 christos #
6709 1.3 christos MAN_FILE_FORMATS=4
6710 1.3 christos MAN_MISC_INFO=5
6711 1.3 christos ;;
6712 1.3 christos
6713 1.3 christos irix*)
6714 1.3 christos V_GROUP=sys
6715 1.3 christos
6716 1.3 christos #
6717 1.3 christos # Use System V conventions for man pages.
6718 1.3 christos #
6719 1.3 christos MAN_FILE_FORMATS=4
6720 1.3 christos MAN_MISC_INFO=5
6721 1.3 christos ;;
6722 1.3 christos
6723 1.3 christos osf*)
6724 1.3 christos V_GROUP=system
6725 1.3 christos
6726 1.3 christos #
6727 1.3 christos # Use System V conventions for man pages.
6728 1.3 christos #
6729 1.3 christos MAN_FILE_FORMATS=4
6730 1.3 christos MAN_MISC_INFO=5
6731 1.3 christos ;;
6732 1.3 christos
6733 1.3 christos solaris*)
6734 1.3 christos V_GROUP=sys
6735 1.1 christos
6736 1.3 christos #
6737 1.3 christos # Use System V conventions for man pages.
6738 1.3 christos #
6739 1.3 christos MAN_FILE_FORMATS=4
6740 1.3 christos MAN_MISC_INFO=5
6741 1.3 christos ;;
6742 1.3 christos esac
6743 1.1 christos
6744 1.3 christos if test -f /dev/bpf0 ; then
6745 1.3 christos V_GROUP=bpf
6746 1.3 christos fi
6747 1.1 christos
6748 1.4 christos #
6749 1.6 christos # Make sure we have a definition for C99's uintptr_t (regardless of
6750 1.6 christos # whether the environment is a C99 environment or not).
6751 1.6 christos #
6752 1.6 christos
6753 1.6 christos ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
6754 1.6 christos if test "x$ac_cv_type_uintptr_t" = xyes; then :
6755 1.6 christos
6756 1.6 christos $as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
6757 1.6 christos
6758 1.6 christos else
6759 1.6 christos for ac_type in 'unsigned int' 'unsigned long int' \
6760 1.6 christos 'unsigned long long int'; do
6761 1.6 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6762 1.6 christos /* end confdefs.h. */
6763 1.6 christos $ac_includes_default
6764 1.6 christos int
6765 1.6 christos main ()
6766 1.6 christos {
6767 1.6 christos static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
6768 1.6 christos test_array [0] = 0;
6769 1.6 christos return test_array [0];
6770 1.6 christos
6771 1.6 christos ;
6772 1.6 christos return 0;
6773 1.6 christos }
6774 1.6 christos _ACEOF
6775 1.6 christos if ac_fn_c_try_compile "$LINENO"; then :
6776 1.6 christos
6777 1.6 christos cat >>confdefs.h <<_ACEOF
6778 1.6 christos #define uintptr_t $ac_type
6779 1.6 christos _ACEOF
6780 1.6 christos
6781 1.6 christos ac_type=
6782 1.6 christos fi
6783 1.6 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6784 1.6 christos test -z "$ac_type" && break
6785 1.6 christos done
6786 1.6 christos fi
6787 1.6 christos
6788 1.6 christos
6789 1.6 christos
6790 1.6 christos #
6791 1.11 christos # Check whether we have pcap/pcap-inttypes.h.
6792 1.11 christos # If we do, we use that to get the C99 types defined.
6793 1.11 christos #
6794 1.11 christos savedcppflags="$CPPFLAGS"
6795 1.11 christos CPPFLAGS="$CPPFLAGS $V_INCLS"
6796 1.11 christos for ac_header in pcap/pcap-inttypes.h
6797 1.11 christos do :
6798 1.11 christos ac_fn_c_check_header_mongrel "$LINENO" "pcap/pcap-inttypes.h" "ac_cv_header_pcap_pcap_inttypes_h" "$ac_includes_default"
6799 1.11 christos if test "x$ac_cv_header_pcap_pcap_inttypes_h" = xyes; then :
6800 1.11 christos cat >>confdefs.h <<_ACEOF
6801 1.11 christos #define HAVE_PCAP_PCAP_INTTYPES_H 1
6802 1.11 christos _ACEOF
6803 1.11 christos
6804 1.11 christos fi
6805 1.11 christos
6806 1.11 christos done
6807 1.11 christos
6808 1.11 christos CPPFLAGS="$savedcppflags"
6809 1.11 christos
6810 1.11 christos #
6811 1.5 christos # Define the old BSD specified-width types in terms of the C99 types;
6812 1.5 christos # we may need them with libpcap include files.
6813 1.4 christos #
6814 1.5 christos ac_fn_c_check_type "$LINENO" "u_int8_t" "ac_cv_type_u_int8_t" "$ac_includes_default
6815 1.5 christos #include <sys/types.h>
6816 1.4 christos
6817 1.4 christos "
6818 1.4 christos if test "x$ac_cv_type_u_int8_t" = xyes; then :
6819 1.1 christos
6820 1.1 christos else
6821 1.1 christos
6822 1.5 christos $as_echo "#define u_int8_t uint8_t" >>confdefs.h
6823 1.4 christos
6824 1.1 christos fi
6825 1.1 christos
6826 1.4 christos ac_fn_c_check_type "$LINENO" "u_int16_t" "ac_cv_type_u_int16_t" "$ac_includes_default
6827 1.5 christos #include <sys/types.h>
6828 1.5 christos
6829 1.4 christos "
6830 1.4 christos if test "x$ac_cv_type_u_int16_t" = xyes; then :
6831 1.4 christos
6832 1.1 christos else
6833 1.1 christos
6834 1.5 christos $as_echo "#define u_int16_t uint16_t" >>confdefs.h
6835 1.1 christos
6836 1.1 christos fi
6837 1.1 christos
6838 1.4 christos ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "$ac_includes_default
6839 1.5 christos #include <sys/types.h>
6840 1.5 christos
6841 1.4 christos "
6842 1.4 christos if test "x$ac_cv_type_u_int32_t" = xyes; then :
6843 1.1 christos
6844 1.1 christos else
6845 1.1 christos
6846 1.5 christos $as_echo "#define u_int32_t uint32_t" >>confdefs.h
6847 1.4 christos
6848 1.1 christos fi
6849 1.1 christos
6850 1.4 christos ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "$ac_includes_default
6851 1.5 christos #include <sys/types.h>
6852 1.5 christos
6853 1.4 christos "
6854 1.4 christos if test "x$ac_cv_type_u_int64_t" = xyes; then :
6855 1.4 christos
6856 1.1 christos else
6857 1.1 christos
6858 1.5 christos $as_echo "#define u_int64_t uint64_t" >>confdefs.h
6859 1.1 christos
6860 1.1 christos fi
6861 1.1 christos
6862 1.1 christos
6863 1.11 christos if test -n "$ac_tool_prefix"; then
6864 1.11 christos # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6865 1.11 christos set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6866 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6867 1.11 christos $as_echo_n "checking for $ac_word... " >&6; }
6868 1.11 christos if ${ac_cv_prog_RANLIB+:} false; then :
6869 1.11 christos $as_echo_n "(cached) " >&6
6870 1.11 christos else
6871 1.11 christos if test -n "$RANLIB"; then
6872 1.11 christos ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6873 1.11 christos else
6874 1.11 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6875 1.11 christos for as_dir in $PATH
6876 1.11 christos do
6877 1.11 christos IFS=$as_save_IFS
6878 1.11 christos test -z "$as_dir" && as_dir=.
6879 1.11 christos for ac_exec_ext in '' $ac_executable_extensions; do
6880 1.11 christos if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6881 1.11 christos ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6882 1.11 christos $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6883 1.11 christos break 2
6884 1.11 christos fi
6885 1.11 christos done
6886 1.11 christos done
6887 1.11 christos IFS=$as_save_IFS
6888 1.1 christos
6889 1.11 christos fi
6890 1.11 christos fi
6891 1.11 christos RANLIB=$ac_cv_prog_RANLIB
6892 1.11 christos if test -n "$RANLIB"; then
6893 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6894 1.11 christos $as_echo "$RANLIB" >&6; }
6895 1.11 christos else
6896 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6897 1.11 christos $as_echo "no" >&6; }
6898 1.11 christos fi
6899 1.1 christos
6900 1.1 christos
6901 1.11 christos fi
6902 1.11 christos if test -z "$ac_cv_prog_RANLIB"; then
6903 1.11 christos ac_ct_RANLIB=$RANLIB
6904 1.11 christos # Extract the first word of "ranlib", so it can be a program name with args.
6905 1.11 christos set dummy ranlib; ac_word=$2
6906 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6907 1.11 christos $as_echo_n "checking for $ac_word... " >&6; }
6908 1.11 christos if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6909 1.11 christos $as_echo_n "(cached) " >&6
6910 1.11 christos else
6911 1.11 christos if test -n "$ac_ct_RANLIB"; then
6912 1.11 christos ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6913 1.11 christos else
6914 1.11 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6915 1.11 christos for as_dir in $PATH
6916 1.11 christos do
6917 1.11 christos IFS=$as_save_IFS
6918 1.11 christos test -z "$as_dir" && as_dir=.
6919 1.11 christos for ac_exec_ext in '' $ac_executable_extensions; do
6920 1.11 christos if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6921 1.11 christos ac_cv_prog_ac_ct_RANLIB="ranlib"
6922 1.11 christos $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6923 1.11 christos break 2
6924 1.11 christos fi
6925 1.11 christos done
6926 1.11 christos done
6927 1.11 christos IFS=$as_save_IFS
6928 1.1 christos
6929 1.11 christos fi
6930 1.11 christos fi
6931 1.11 christos ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6932 1.11 christos if test -n "$ac_ct_RANLIB"; then
6933 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6934 1.11 christos $as_echo "$ac_ct_RANLIB" >&6; }
6935 1.1 christos else
6936 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6937 1.4 christos $as_echo "no" >&6; }
6938 1.1 christos fi
6939 1.1 christos
6940 1.11 christos if test "x$ac_ct_RANLIB" = x; then
6941 1.11 christos RANLIB=":"
6942 1.11 christos else
6943 1.11 christos case $cross_compiling:$ac_tool_warned in
6944 1.11 christos yes:)
6945 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6946 1.11 christos $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6947 1.11 christos ac_tool_warned=yes ;;
6948 1.11 christos esac
6949 1.11 christos RANLIB=$ac_ct_RANLIB
6950 1.11 christos fi
6951 1.1 christos else
6952 1.11 christos RANLIB="$ac_cv_prog_RANLIB"
6953 1.1 christos fi
6954 1.1 christos
6955 1.11 christos if test -n "$ac_tool_prefix"; then
6956 1.11 christos # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6957 1.11 christos set dummy ${ac_tool_prefix}ar; ac_word=$2
6958 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6959 1.11 christos $as_echo_n "checking for $ac_word... " >&6; }
6960 1.11 christos if ${ac_cv_prog_AR+:} false; then :
6961 1.11 christos $as_echo_n "(cached) " >&6
6962 1.11 christos else
6963 1.11 christos if test -n "$AR"; then
6964 1.11 christos ac_cv_prog_AR="$AR" # Let the user override the test.
6965 1.1 christos else
6966 1.11 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6967 1.11 christos for as_dir in $PATH
6968 1.5 christos do
6969 1.5 christos IFS=$as_save_IFS
6970 1.5 christos test -z "$as_dir" && as_dir=.
6971 1.5 christos for ac_exec_ext in '' $ac_executable_extensions; do
6972 1.5 christos if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6973 1.5 christos ac_cv_prog_AR="${ac_tool_prefix}ar"
6974 1.5 christos $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6975 1.5 christos break 2
6976 1.5 christos fi
6977 1.5 christos done
6978 1.5 christos done
6979 1.5 christos IFS=$as_save_IFS
6980 1.5 christos
6981 1.5 christos fi
6982 1.5 christos fi
6983 1.5 christos AR=$ac_cv_prog_AR
6984 1.5 christos if test -n "$AR"; then
6985 1.5 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6986 1.5 christos $as_echo "$AR" >&6; }
6987 1.5 christos else
6988 1.5 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6989 1.5 christos $as_echo "no" >&6; }
6990 1.5 christos fi
6991 1.5 christos
6992 1.5 christos
6993 1.5 christos fi
6994 1.5 christos if test -z "$ac_cv_prog_AR"; then
6995 1.5 christos ac_ct_AR=$AR
6996 1.5 christos # Extract the first word of "ar", so it can be a program name with args.
6997 1.5 christos set dummy ar; ac_word=$2
6998 1.5 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6999 1.5 christos $as_echo_n "checking for $ac_word... " >&6; }
7000 1.5 christos if ${ac_cv_prog_ac_ct_AR+:} false; then :
7001 1.5 christos $as_echo_n "(cached) " >&6
7002 1.5 christos else
7003 1.5 christos if test -n "$ac_ct_AR"; then
7004 1.5 christos ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7005 1.5 christos else
7006 1.5 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7007 1.5 christos for as_dir in $PATH
7008 1.5 christos do
7009 1.5 christos IFS=$as_save_IFS
7010 1.5 christos test -z "$as_dir" && as_dir=.
7011 1.5 christos for ac_exec_ext in '' $ac_executable_extensions; do
7012 1.5 christos if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7013 1.5 christos ac_cv_prog_ac_ct_AR="ar"
7014 1.5 christos $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7015 1.5 christos break 2
7016 1.5 christos fi
7017 1.5 christos done
7018 1.5 christos done
7019 1.5 christos IFS=$as_save_IFS
7020 1.5 christos
7021 1.5 christos fi
7022 1.5 christos fi
7023 1.5 christos ac_ct_AR=$ac_cv_prog_ac_ct_AR
7024 1.5 christos if test -n "$ac_ct_AR"; then
7025 1.5 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7026 1.5 christos $as_echo "$ac_ct_AR" >&6; }
7027 1.5 christos else
7028 1.5 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7029 1.5 christos $as_echo "no" >&6; }
7030 1.5 christos fi
7031 1.5 christos
7032 1.5 christos if test "x$ac_ct_AR" = x; then
7033 1.5 christos AR=""
7034 1.5 christos else
7035 1.5 christos case $cross_compiling:$ac_tool_warned in
7036 1.5 christos yes:)
7037 1.5 christos { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7038 1.5 christos $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7039 1.5 christos ac_tool_warned=yes ;;
7040 1.5 christos esac
7041 1.5 christos AR=$ac_ct_AR
7042 1.5 christos fi
7043 1.5 christos else
7044 1.5 christos AR="$ac_cv_prog_AR"
7045 1.5 christos fi
7046 1.5 christos
7047 1.4 christos
7048 1.4 christos rm -f os-proto.h
7049 1.4 christos if test "${LBL_CFLAGS+set}" = set; then
7050 1.4 christos V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
7051 1.4 christos fi
7052 1.4 christos if test -f .devel ; then
7053 1.4 christos #
7054 1.4 christos # Skip all the warning option stuff on some compilers.
7055 1.4 christos #
7056 1.4 christos if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
7057 1.4 christos
7058 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -W option" >&5
7059 1.11 christos $as_echo_n "checking whether the compiler supports the -W option... " >&6; }
7060 1.7 christos save_CFLAGS="$CFLAGS"
7061 1.11 christos CFLAGS="$CFLAGS -W"
7062 1.11 christos #
7063 1.11 christos # XXX - yes, this depends on the way AC_LANG_WERROR works,
7064 1.11 christos # but no mechanism is provided to turn AC_LANG_WERROR on
7065 1.11 christos # *and then turn it back off*, so that we *only* do it when
7066 1.11 christos # testing compiler options - 15 years after somebody asked
7067 1.11 christos # for it:
7068 1.11 christos #
7069 1.11 christos # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7070 1.11 christos #
7071 1.11 christos save_ac_c_werror_flag="$ac_c_werror_flag"
7072 1.11 christos ac_c_werror_flag=yes
7073 1.11 christos #
7074 1.11 christos # We use AC_LANG_SOURCE() so that we can control the complete
7075 1.11 christos # content of the program being compiled. We do not, for example,
7076 1.11 christos # want the default "int main()" that AC_LANG_PROGRAM() generates,
7077 1.11 christos # as it will generate a warning with -Wold-style-definition, meaning
7078 1.11 christos # that we would treat it as not working, as the test will fail if
7079 1.11 christos # *any* error output, including a warning due to the flag we're
7080 1.11 christos # testing, is generated; see
7081 1.11 christos #
7082 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7083 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7084 1.11 christos #
7085 1.11 christos # This may, as per those two messages, be fixed in autoconf 2.70,
7086 1.11 christos # but we only require 2.64 or newer for now.
7087 1.11 christos #
7088 1.7 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7089 1.7 christos /* end confdefs.h. */
7090 1.11 christos int main(void) { return 0; }
7091 1.11 christos _ACEOF
7092 1.11 christos if ac_fn_c_try_compile "$LINENO"; then :
7093 1.11 christos
7094 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7095 1.11 christos $as_echo "yes" >&6; }
7096 1.11 christos CFLAGS="$save_CFLAGS"
7097 1.11 christos V_CCOPT="$V_CCOPT -W"
7098 1.11 christos
7099 1.11 christos else
7100 1.11 christos
7101 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7102 1.11 christos $as_echo "no" >&6; }
7103 1.11 christos CFLAGS="$save_CFLAGS"
7104 1.11 christos
7105 1.11 christos fi
7106 1.11 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7107 1.11 christos ac_c_werror_flag="$save_ac_c_werror_flag"
7108 1.7 christos
7109 1.11 christos
7110 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5
7111 1.11 christos $as_echo_n "checking whether the compiler supports the -Wall option... " >&6; }
7112 1.11 christos save_CFLAGS="$CFLAGS"
7113 1.11 christos CFLAGS="$CFLAGS -Wall"
7114 1.11 christos #
7115 1.11 christos # XXX - yes, this depends on the way AC_LANG_WERROR works,
7116 1.11 christos # but no mechanism is provided to turn AC_LANG_WERROR on
7117 1.11 christos # *and then turn it back off*, so that we *only* do it when
7118 1.11 christos # testing compiler options - 15 years after somebody asked
7119 1.11 christos # for it:
7120 1.11 christos #
7121 1.11 christos # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7122 1.11 christos #
7123 1.11 christos save_ac_c_werror_flag="$ac_c_werror_flag"
7124 1.11 christos ac_c_werror_flag=yes
7125 1.11 christos #
7126 1.11 christos # We use AC_LANG_SOURCE() so that we can control the complete
7127 1.11 christos # content of the program being compiled. We do not, for example,
7128 1.11 christos # want the default "int main()" that AC_LANG_PROGRAM() generates,
7129 1.11 christos # as it will generate a warning with -Wold-style-definition, meaning
7130 1.11 christos # that we would treat it as not working, as the test will fail if
7131 1.11 christos # *any* error output, including a warning due to the flag we're
7132 1.11 christos # testing, is generated; see
7133 1.11 christos #
7134 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7135 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7136 1.11 christos #
7137 1.11 christos # This may, as per those two messages, be fixed in autoconf 2.70,
7138 1.11 christos # but we only require 2.64 or newer for now.
7139 1.11 christos #
7140 1.11 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7141 1.11 christos /* end confdefs.h. */
7142 1.11 christos int main(void) { return 0; }
7143 1.7 christos _ACEOF
7144 1.7 christos if ac_fn_c_try_compile "$LINENO"; then :
7145 1.7 christos
7146 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7147 1.11 christos $as_echo "yes" >&6; }
7148 1.11 christos CFLAGS="$save_CFLAGS"
7149 1.11 christos V_CCOPT="$V_CCOPT -Wall"
7150 1.11 christos
7151 1.11 christos else
7152 1.11 christos
7153 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7154 1.7 christos $as_echo "no" >&6; }
7155 1.11 christos CFLAGS="$save_CFLAGS"
7156 1.11 christos
7157 1.11 christos fi
7158 1.11 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7159 1.11 christos ac_c_werror_flag="$save_ac_c_werror_flag"
7160 1.11 christos
7161 1.7 christos
7162 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wassign-enum option" >&5
7163 1.11 christos $as_echo_n "checking whether the compiler supports the -Wassign-enum option... " >&6; }
7164 1.11 christos save_CFLAGS="$CFLAGS"
7165 1.11 christos CFLAGS="$CFLAGS -Wassign-enum"
7166 1.11 christos #
7167 1.11 christos # XXX - yes, this depends on the way AC_LANG_WERROR works,
7168 1.11 christos # but no mechanism is provided to turn AC_LANG_WERROR on
7169 1.11 christos # *and then turn it back off*, so that we *only* do it when
7170 1.11 christos # testing compiler options - 15 years after somebody asked
7171 1.11 christos # for it:
7172 1.11 christos #
7173 1.11 christos # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7174 1.11 christos #
7175 1.11 christos save_ac_c_werror_flag="$ac_c_werror_flag"
7176 1.11 christos ac_c_werror_flag=yes
7177 1.11 christos #
7178 1.11 christos # We use AC_LANG_SOURCE() so that we can control the complete
7179 1.11 christos # content of the program being compiled. We do not, for example,
7180 1.11 christos # want the default "int main()" that AC_LANG_PROGRAM() generates,
7181 1.11 christos # as it will generate a warning with -Wold-style-definition, meaning
7182 1.11 christos # that we would treat it as not working, as the test will fail if
7183 1.11 christos # *any* error output, including a warning due to the flag we're
7184 1.11 christos # testing, is generated; see
7185 1.11 christos #
7186 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7187 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7188 1.11 christos #
7189 1.11 christos # This may, as per those two messages, be fixed in autoconf 2.70,
7190 1.11 christos # but we only require 2.64 or newer for now.
7191 1.11 christos #
7192 1.11 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7193 1.11 christos /* end confdefs.h. */
7194 1.11 christos int main(void) { return 0; }
7195 1.11 christos _ACEOF
7196 1.11 christos if ac_fn_c_try_compile "$LINENO"; then :
7197 1.7 christos
7198 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7199 1.7 christos $as_echo "yes" >&6; }
7200 1.11 christos CFLAGS="$save_CFLAGS"
7201 1.11 christos V_CCOPT="$V_CCOPT -Wassign-enum"
7202 1.11 christos
7203 1.11 christos else
7204 1.11 christos
7205 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7206 1.11 christos $as_echo "no" >&6; }
7207 1.11 christos CFLAGS="$save_CFLAGS"
7208 1.7 christos
7209 1.7 christos fi
7210 1.7 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7211 1.11 christos ac_c_werror_flag="$save_ac_c_werror_flag"
7212 1.7 christos
7213 1.7 christos
7214 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcast-qual option" >&5
7215 1.11 christos $as_echo_n "checking whether the compiler supports the -Wcast-qual option... " >&6; }
7216 1.4 christos save_CFLAGS="$CFLAGS"
7217 1.11 christos CFLAGS="$CFLAGS -Wcast-qual"
7218 1.11 christos #
7219 1.11 christos # XXX - yes, this depends on the way AC_LANG_WERROR works,
7220 1.11 christos # but no mechanism is provided to turn AC_LANG_WERROR on
7221 1.11 christos # *and then turn it back off*, so that we *only* do it when
7222 1.11 christos # testing compiler options - 15 years after somebody asked
7223 1.11 christos # for it:
7224 1.11 christos #
7225 1.11 christos # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7226 1.11 christos #
7227 1.11 christos save_ac_c_werror_flag="$ac_c_werror_flag"
7228 1.11 christos ac_c_werror_flag=yes
7229 1.11 christos #
7230 1.11 christos # We use AC_LANG_SOURCE() so that we can control the complete
7231 1.11 christos # content of the program being compiled. We do not, for example,
7232 1.11 christos # want the default "int main()" that AC_LANG_PROGRAM() generates,
7233 1.11 christos # as it will generate a warning with -Wold-style-definition, meaning
7234 1.11 christos # that we would treat it as not working, as the test will fail if
7235 1.11 christos # *any* error output, including a warning due to the flag we're
7236 1.11 christos # testing, is generated; see
7237 1.11 christos #
7238 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7239 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7240 1.11 christos #
7241 1.11 christos # This may, as per those two messages, be fixed in autoconf 2.70,
7242 1.11 christos # but we only require 2.64 or newer for now.
7243 1.11 christos #
7244 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7245 1.4 christos /* end confdefs.h. */
7246 1.11 christos int main(void) { return 0; }
7247 1.4 christos _ACEOF
7248 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
7249 1.4 christos
7250 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7251 1.4 christos $as_echo "yes" >&6; }
7252 1.4 christos CFLAGS="$save_CFLAGS"
7253 1.11 christos V_CCOPT="$V_CCOPT -Wcast-qual"
7254 1.4 christos
7255 1.4 christos else
7256 1.4 christos
7257 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7258 1.4 christos $as_echo "no" >&6; }
7259 1.4 christos CFLAGS="$save_CFLAGS"
7260 1.4 christos
7261 1.4 christos fi
7262 1.4 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7263 1.11 christos ac_c_werror_flag="$save_ac_c_werror_flag"
7264 1.4 christos
7265 1.4 christos
7266 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5
7267 1.4 christos $as_echo_n "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
7268 1.4 christos save_CFLAGS="$CFLAGS"
7269 1.11 christos CFLAGS="$CFLAGS -Wmissing-prototypes"
7270 1.11 christos #
7271 1.11 christos # XXX - yes, this depends on the way AC_LANG_WERROR works,
7272 1.11 christos # but no mechanism is provided to turn AC_LANG_WERROR on
7273 1.11 christos # *and then turn it back off*, so that we *only* do it when
7274 1.11 christos # testing compiler options - 15 years after somebody asked
7275 1.11 christos # for it:
7276 1.11 christos #
7277 1.11 christos # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7278 1.11 christos #
7279 1.11 christos save_ac_c_werror_flag="$ac_c_werror_flag"
7280 1.11 christos ac_c_werror_flag=yes
7281 1.11 christos #
7282 1.11 christos # We use AC_LANG_SOURCE() so that we can control the complete
7283 1.11 christos # content of the program being compiled. We do not, for example,
7284 1.11 christos # want the default "int main()" that AC_LANG_PROGRAM() generates,
7285 1.11 christos # as it will generate a warning with -Wold-style-definition, meaning
7286 1.11 christos # that we would treat it as not working, as the test will fail if
7287 1.11 christos # *any* error output, including a warning due to the flag we're
7288 1.11 christos # testing, is generated; see
7289 1.11 christos #
7290 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7291 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7292 1.11 christos #
7293 1.11 christos # This may, as per those two messages, be fixed in autoconf 2.70,
7294 1.11 christos # but we only require 2.64 or newer for now.
7295 1.11 christos #
7296 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7297 1.4 christos /* end confdefs.h. */
7298 1.11 christos int main(void) { return 0; }
7299 1.11 christos _ACEOF
7300 1.11 christos if ac_fn_c_try_compile "$LINENO"; then :
7301 1.11 christos
7302 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7303 1.11 christos $as_echo "yes" >&6; }
7304 1.11 christos CFLAGS="$save_CFLAGS"
7305 1.11 christos V_CCOPT="$V_CCOPT -Wmissing-prototypes"
7306 1.11 christos
7307 1.11 christos else
7308 1.11 christos
7309 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7310 1.11 christos $as_echo "no" >&6; }
7311 1.11 christos CFLAGS="$save_CFLAGS"
7312 1.11 christos
7313 1.11 christos fi
7314 1.11 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7315 1.11 christos ac_c_werror_flag="$save_ac_c_werror_flag"
7316 1.4 christos
7317 1.11 christos
7318 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-variable-declarations option" >&5
7319 1.11 christos $as_echo_n "checking whether the compiler supports the -Wmissing-variable-declarations option... " >&6; }
7320 1.11 christos save_CFLAGS="$CFLAGS"
7321 1.11 christos CFLAGS="$CFLAGS -Wmissing-variable-declarations"
7322 1.11 christos #
7323 1.11 christos # XXX - yes, this depends on the way AC_LANG_WERROR works,
7324 1.11 christos # but no mechanism is provided to turn AC_LANG_WERROR on
7325 1.11 christos # *and then turn it back off*, so that we *only* do it when
7326 1.11 christos # testing compiler options - 15 years after somebody asked
7327 1.11 christos # for it:
7328 1.11 christos #
7329 1.11 christos # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7330 1.11 christos #
7331 1.11 christos save_ac_c_werror_flag="$ac_c_werror_flag"
7332 1.11 christos ac_c_werror_flag=yes
7333 1.11 christos #
7334 1.11 christos # We use AC_LANG_SOURCE() so that we can control the complete
7335 1.11 christos # content of the program being compiled. We do not, for example,
7336 1.11 christos # want the default "int main()" that AC_LANG_PROGRAM() generates,
7337 1.11 christos # as it will generate a warning with -Wold-style-definition, meaning
7338 1.11 christos # that we would treat it as not working, as the test will fail if
7339 1.11 christos # *any* error output, including a warning due to the flag we're
7340 1.11 christos # testing, is generated; see
7341 1.11 christos #
7342 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7343 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7344 1.11 christos #
7345 1.11 christos # This may, as per those two messages, be fixed in autoconf 2.70,
7346 1.11 christos # but we only require 2.64 or newer for now.
7347 1.11 christos #
7348 1.11 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7349 1.11 christos /* end confdefs.h. */
7350 1.11 christos int main(void) { return 0; }
7351 1.4 christos _ACEOF
7352 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
7353 1.4 christos
7354 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7355 1.4 christos $as_echo "yes" >&6; }
7356 1.4 christos CFLAGS="$save_CFLAGS"
7357 1.11 christos V_CCOPT="$V_CCOPT -Wmissing-variable-declarations"
7358 1.4 christos
7359 1.4 christos else
7360 1.4 christos
7361 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7362 1.4 christos $as_echo "no" >&6; }
7363 1.4 christos CFLAGS="$save_CFLAGS"
7364 1.4 christos
7365 1.4 christos fi
7366 1.4 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7367 1.11 christos ac_c_werror_flag="$save_ac_c_werror_flag"
7368 1.4 christos
7369 1.4 christos
7370 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wold-style-definition option" >&5
7371 1.11 christos $as_echo_n "checking whether the compiler supports the -Wold-style-definition option... " >&6; }
7372 1.11 christos save_CFLAGS="$CFLAGS"
7373 1.11 christos CFLAGS="$CFLAGS -Wold-style-definition"
7374 1.11 christos #
7375 1.11 christos # XXX - yes, this depends on the way AC_LANG_WERROR works,
7376 1.11 christos # but no mechanism is provided to turn AC_LANG_WERROR on
7377 1.11 christos # *and then turn it back off*, so that we *only* do it when
7378 1.11 christos # testing compiler options - 15 years after somebody asked
7379 1.11 christos # for it:
7380 1.11 christos #
7381 1.11 christos # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7382 1.11 christos #
7383 1.11 christos save_ac_c_werror_flag="$ac_c_werror_flag"
7384 1.11 christos ac_c_werror_flag=yes
7385 1.11 christos #
7386 1.11 christos # We use AC_LANG_SOURCE() so that we can control the complete
7387 1.11 christos # content of the program being compiled. We do not, for example,
7388 1.11 christos # want the default "int main()" that AC_LANG_PROGRAM() generates,
7389 1.11 christos # as it will generate a warning with -Wold-style-definition, meaning
7390 1.11 christos # that we would treat it as not working, as the test will fail if
7391 1.11 christos # *any* error output, including a warning due to the flag we're
7392 1.11 christos # testing, is generated; see
7393 1.11 christos #
7394 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7395 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7396 1.11 christos #
7397 1.11 christos # This may, as per those two messages, be fixed in autoconf 2.70,
7398 1.11 christos # but we only require 2.64 or newer for now.
7399 1.11 christos #
7400 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7401 1.4 christos /* end confdefs.h. */
7402 1.11 christos int main(void) { return 0; }
7403 1.4 christos _ACEOF
7404 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
7405 1.4 christos
7406 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7407 1.4 christos $as_echo "yes" >&6; }
7408 1.4 christos CFLAGS="$save_CFLAGS"
7409 1.11 christos V_CCOPT="$V_CCOPT -Wold-style-definition"
7410 1.4 christos
7411 1.4 christos else
7412 1.4 christos
7413 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7414 1.4 christos $as_echo "no" >&6; }
7415 1.4 christos CFLAGS="$save_CFLAGS"
7416 1.4 christos
7417 1.4 christos fi
7418 1.4 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7419 1.11 christos ac_c_werror_flag="$save_ac_c_werror_flag"
7420 1.4 christos
7421 1.4 christos
7422 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpedantic option" >&5
7423 1.11 christos $as_echo_n "checking whether the compiler supports the -Wpedantic option... " >&6; }
7424 1.4 christos save_CFLAGS="$CFLAGS"
7425 1.11 christos CFLAGS="$CFLAGS -Wpedantic"
7426 1.11 christos #
7427 1.11 christos # XXX - yes, this depends on the way AC_LANG_WERROR works,
7428 1.11 christos # but no mechanism is provided to turn AC_LANG_WERROR on
7429 1.11 christos # *and then turn it back off*, so that we *only* do it when
7430 1.11 christos # testing compiler options - 15 years after somebody asked
7431 1.11 christos # for it:
7432 1.11 christos #
7433 1.11 christos # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7434 1.11 christos #
7435 1.11 christos save_ac_c_werror_flag="$ac_c_werror_flag"
7436 1.11 christos ac_c_werror_flag=yes
7437 1.11 christos #
7438 1.11 christos # We use AC_LANG_SOURCE() so that we can control the complete
7439 1.11 christos # content of the program being compiled. We do not, for example,
7440 1.11 christos # want the default "int main()" that AC_LANG_PROGRAM() generates,
7441 1.11 christos # as it will generate a warning with -Wold-style-definition, meaning
7442 1.11 christos # that we would treat it as not working, as the test will fail if
7443 1.11 christos # *any* error output, including a warning due to the flag we're
7444 1.11 christos # testing, is generated; see
7445 1.11 christos #
7446 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7447 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7448 1.11 christos #
7449 1.11 christos # This may, as per those two messages, be fixed in autoconf 2.70,
7450 1.11 christos # but we only require 2.64 or newer for now.
7451 1.11 christos #
7452 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7453 1.4 christos /* end confdefs.h. */
7454 1.11 christos int main(void) { return 0; }
7455 1.4 christos _ACEOF
7456 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
7457 1.4 christos
7458 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7459 1.4 christos $as_echo "yes" >&6; }
7460 1.4 christos CFLAGS="$save_CFLAGS"
7461 1.11 christos V_CCOPT="$V_CCOPT -Wpedantic"
7462 1.4 christos
7463 1.4 christos else
7464 1.4 christos
7465 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7466 1.4 christos $as_echo "no" >&6; }
7467 1.4 christos CFLAGS="$save_CFLAGS"
7468 1.4 christos
7469 1.4 christos fi
7470 1.4 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7471 1.11 christos ac_c_werror_flag="$save_ac_c_werror_flag"
7472 1.4 christos
7473 1.4 christos
7474 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-arith option" >&5
7475 1.4 christos $as_echo_n "checking whether the compiler supports the -Wpointer-arith option... " >&6; }
7476 1.4 christos save_CFLAGS="$CFLAGS"
7477 1.11 christos CFLAGS="$CFLAGS -Wpointer-arith"
7478 1.11 christos #
7479 1.11 christos # XXX - yes, this depends on the way AC_LANG_WERROR works,
7480 1.11 christos # but no mechanism is provided to turn AC_LANG_WERROR on
7481 1.11 christos # *and then turn it back off*, so that we *only* do it when
7482 1.11 christos # testing compiler options - 15 years after somebody asked
7483 1.11 christos # for it:
7484 1.11 christos #
7485 1.11 christos # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7486 1.11 christos #
7487 1.11 christos save_ac_c_werror_flag="$ac_c_werror_flag"
7488 1.11 christos ac_c_werror_flag=yes
7489 1.11 christos #
7490 1.11 christos # We use AC_LANG_SOURCE() so that we can control the complete
7491 1.11 christos # content of the program being compiled. We do not, for example,
7492 1.11 christos # want the default "int main()" that AC_LANG_PROGRAM() generates,
7493 1.11 christos # as it will generate a warning with -Wold-style-definition, meaning
7494 1.11 christos # that we would treat it as not working, as the test will fail if
7495 1.11 christos # *any* error output, including a warning due to the flag we're
7496 1.11 christos # testing, is generated; see
7497 1.11 christos #
7498 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7499 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7500 1.11 christos #
7501 1.11 christos # This may, as per those two messages, be fixed in autoconf 2.70,
7502 1.11 christos # but we only require 2.64 or newer for now.
7503 1.11 christos #
7504 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7505 1.4 christos /* end confdefs.h. */
7506 1.11 christos int main(void) { return 0; }
7507 1.4 christos _ACEOF
7508 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
7509 1.4 christos
7510 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7511 1.4 christos $as_echo "yes" >&6; }
7512 1.4 christos CFLAGS="$save_CFLAGS"
7513 1.4 christos V_CCOPT="$V_CCOPT -Wpointer-arith"
7514 1.1 christos
7515 1.1 christos else
7516 1.4 christos
7517 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7518 1.4 christos $as_echo "no" >&6; }
7519 1.4 christos CFLAGS="$save_CFLAGS"
7520 1.4 christos
7521 1.1 christos fi
7522 1.4 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7523 1.11 christos ac_c_werror_flag="$save_ac_c_werror_flag"
7524 1.4 christos
7525 1.4 christos
7526 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-sign option" >&5
7527 1.11 christos $as_echo_n "checking whether the compiler supports the -Wpointer-sign option... " >&6; }
7528 1.7 christos save_CFLAGS="$CFLAGS"
7529 1.11 christos CFLAGS="$CFLAGS -Wpointer-sign"
7530 1.11 christos #
7531 1.11 christos # XXX - yes, this depends on the way AC_LANG_WERROR works,
7532 1.11 christos # but no mechanism is provided to turn AC_LANG_WERROR on
7533 1.11 christos # *and then turn it back off*, so that we *only* do it when
7534 1.11 christos # testing compiler options - 15 years after somebody asked
7535 1.11 christos # for it:
7536 1.11 christos #
7537 1.11 christos # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7538 1.11 christos #
7539 1.11 christos save_ac_c_werror_flag="$ac_c_werror_flag"
7540 1.11 christos ac_c_werror_flag=yes
7541 1.11 christos #
7542 1.11 christos # We use AC_LANG_SOURCE() so that we can control the complete
7543 1.11 christos # content of the program being compiled. We do not, for example,
7544 1.11 christos # want the default "int main()" that AC_LANG_PROGRAM() generates,
7545 1.11 christos # as it will generate a warning with -Wold-style-definition, meaning
7546 1.11 christos # that we would treat it as not working, as the test will fail if
7547 1.11 christos # *any* error output, including a warning due to the flag we're
7548 1.11 christos # testing, is generated; see
7549 1.11 christos #
7550 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7551 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7552 1.11 christos #
7553 1.11 christos # This may, as per those two messages, be fixed in autoconf 2.70,
7554 1.11 christos # but we only require 2.64 or newer for now.
7555 1.11 christos #
7556 1.7 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7557 1.7 christos /* end confdefs.h. */
7558 1.11 christos int main(void) { return 0; }
7559 1.7 christos _ACEOF
7560 1.7 christos if ac_fn_c_try_compile "$LINENO"; then :
7561 1.7 christos
7562 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7563 1.7 christos $as_echo "yes" >&6; }
7564 1.7 christos CFLAGS="$save_CFLAGS"
7565 1.11 christos V_CCOPT="$V_CCOPT -Wpointer-sign"
7566 1.7 christos
7567 1.7 christos else
7568 1.7 christos
7569 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7570 1.7 christos $as_echo "no" >&6; }
7571 1.7 christos CFLAGS="$save_CFLAGS"
7572 1.7 christos
7573 1.7 christos fi
7574 1.7 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7575 1.11 christos ac_c_werror_flag="$save_ac_c_werror_flag"
7576 1.7 christos
7577 1.7 christos
7578 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshadow option" >&5
7579 1.7 christos $as_echo_n "checking whether the compiler supports the -Wshadow option... " >&6; }
7580 1.7 christos save_CFLAGS="$CFLAGS"
7581 1.11 christos CFLAGS="$CFLAGS -Wshadow"
7582 1.11 christos #
7583 1.11 christos # XXX - yes, this depends on the way AC_LANG_WERROR works,
7584 1.11 christos # but no mechanism is provided to turn AC_LANG_WERROR on
7585 1.11 christos # *and then turn it back off*, so that we *only* do it when
7586 1.11 christos # testing compiler options - 15 years after somebody asked
7587 1.11 christos # for it:
7588 1.11 christos #
7589 1.11 christos # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7590 1.11 christos #
7591 1.11 christos save_ac_c_werror_flag="$ac_c_werror_flag"
7592 1.11 christos ac_c_werror_flag=yes
7593 1.11 christos #
7594 1.11 christos # We use AC_LANG_SOURCE() so that we can control the complete
7595 1.11 christos # content of the program being compiled. We do not, for example,
7596 1.11 christos # want the default "int main()" that AC_LANG_PROGRAM() generates,
7597 1.11 christos # as it will generate a warning with -Wold-style-definition, meaning
7598 1.11 christos # that we would treat it as not working, as the test will fail if
7599 1.11 christos # *any* error output, including a warning due to the flag we're
7600 1.11 christos # testing, is generated; see
7601 1.11 christos #
7602 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7603 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7604 1.11 christos #
7605 1.11 christos # This may, as per those two messages, be fixed in autoconf 2.70,
7606 1.11 christos # but we only require 2.64 or newer for now.
7607 1.11 christos #
7608 1.7 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7609 1.7 christos /* end confdefs.h. */
7610 1.11 christos int main(void) { return 0; }
7611 1.7 christos _ACEOF
7612 1.7 christos if ac_fn_c_try_compile "$LINENO"; then :
7613 1.7 christos
7614 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7615 1.7 christos $as_echo "yes" >&6; }
7616 1.7 christos CFLAGS="$save_CFLAGS"
7617 1.7 christos V_CCOPT="$V_CCOPT -Wshadow"
7618 1.7 christos
7619 1.7 christos else
7620 1.7 christos
7621 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7622 1.7 christos $as_echo "no" >&6; }
7623 1.7 christos CFLAGS="$save_CFLAGS"
7624 1.7 christos
7625 1.7 christos fi
7626 1.7 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7627 1.11 christos ac_c_werror_flag="$save_ac_c_werror_flag"
7628 1.7 christos
7629 1.7 christos
7630 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wsign-compare option" >&5
7631 1.11 christos $as_echo_n "checking whether the compiler supports the -Wsign-compare option... " >&6; }
7632 1.7 christos save_CFLAGS="$CFLAGS"
7633 1.11 christos CFLAGS="$CFLAGS -Wsign-compare"
7634 1.11 christos #
7635 1.11 christos # XXX - yes, this depends on the way AC_LANG_WERROR works,
7636 1.11 christos # but no mechanism is provided to turn AC_LANG_WERROR on
7637 1.11 christos # *and then turn it back off*, so that we *only* do it when
7638 1.11 christos # testing compiler options - 15 years after somebody asked
7639 1.11 christos # for it:
7640 1.11 christos #
7641 1.11 christos # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7642 1.11 christos #
7643 1.11 christos save_ac_c_werror_flag="$ac_c_werror_flag"
7644 1.11 christos ac_c_werror_flag=yes
7645 1.11 christos #
7646 1.11 christos # We use AC_LANG_SOURCE() so that we can control the complete
7647 1.11 christos # content of the program being compiled. We do not, for example,
7648 1.11 christos # want the default "int main()" that AC_LANG_PROGRAM() generates,
7649 1.11 christos # as it will generate a warning with -Wold-style-definition, meaning
7650 1.11 christos # that we would treat it as not working, as the test will fail if
7651 1.11 christos # *any* error output, including a warning due to the flag we're
7652 1.11 christos # testing, is generated; see
7653 1.11 christos #
7654 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7655 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7656 1.11 christos #
7657 1.11 christos # This may, as per those two messages, be fixed in autoconf 2.70,
7658 1.11 christos # but we only require 2.64 or newer for now.
7659 1.11 christos #
7660 1.7 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7661 1.7 christos /* end confdefs.h. */
7662 1.11 christos int main(void) { return 0; }
7663 1.7 christos _ACEOF
7664 1.7 christos if ac_fn_c_try_compile "$LINENO"; then :
7665 1.7 christos
7666 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7667 1.7 christos $as_echo "yes" >&6; }
7668 1.7 christos CFLAGS="$save_CFLAGS"
7669 1.11 christos V_CCOPT="$V_CCOPT -Wsign-compare"
7670 1.7 christos
7671 1.7 christos else
7672 1.7 christos
7673 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7674 1.7 christos $as_echo "no" >&6; }
7675 1.7 christos CFLAGS="$save_CFLAGS"
7676 1.7 christos
7677 1.7 christos fi
7678 1.7 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7679 1.11 christos ac_c_werror_flag="$save_ac_c_werror_flag"
7680 1.7 christos
7681 1.7 christos
7682 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5
7683 1.11 christos $as_echo_n "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; }
7684 1.7 christos save_CFLAGS="$CFLAGS"
7685 1.11 christos CFLAGS="$CFLAGS -Wstrict-prototypes"
7686 1.11 christos #
7687 1.11 christos # XXX - yes, this depends on the way AC_LANG_WERROR works,
7688 1.11 christos # but no mechanism is provided to turn AC_LANG_WERROR on
7689 1.11 christos # *and then turn it back off*, so that we *only* do it when
7690 1.11 christos # testing compiler options - 15 years after somebody asked
7691 1.11 christos # for it:
7692 1.11 christos #
7693 1.11 christos # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7694 1.11 christos #
7695 1.11 christos save_ac_c_werror_flag="$ac_c_werror_flag"
7696 1.11 christos ac_c_werror_flag=yes
7697 1.11 christos #
7698 1.11 christos # We use AC_LANG_SOURCE() so that we can control the complete
7699 1.11 christos # content of the program being compiled. We do not, for example,
7700 1.11 christos # want the default "int main()" that AC_LANG_PROGRAM() generates,
7701 1.11 christos # as it will generate a warning with -Wold-style-definition, meaning
7702 1.11 christos # that we would treat it as not working, as the test will fail if
7703 1.11 christos # *any* error output, including a warning due to the flag we're
7704 1.11 christos # testing, is generated; see
7705 1.11 christos #
7706 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7707 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7708 1.11 christos #
7709 1.11 christos # This may, as per those two messages, be fixed in autoconf 2.70,
7710 1.11 christos # but we only require 2.64 or newer for now.
7711 1.11 christos #
7712 1.7 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7713 1.7 christos /* end confdefs.h. */
7714 1.11 christos int main(void) { return 0; }
7715 1.7 christos _ACEOF
7716 1.7 christos if ac_fn_c_try_compile "$LINENO"; then :
7717 1.7 christos
7718 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7719 1.7 christos $as_echo "yes" >&6; }
7720 1.7 christos CFLAGS="$save_CFLAGS"
7721 1.11 christos V_CCOPT="$V_CCOPT -Wstrict-prototypes"
7722 1.7 christos
7723 1.7 christos else
7724 1.7 christos
7725 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7726 1.7 christos $as_echo "no" >&6; }
7727 1.7 christos CFLAGS="$save_CFLAGS"
7728 1.7 christos
7729 1.7 christos fi
7730 1.7 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7731 1.11 christos ac_c_werror_flag="$save_ac_c_werror_flag"
7732 1.7 christos
7733 1.7 christos
7734 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunreachable-code-return option" >&5
7735 1.11 christos $as_echo_n "checking whether the compiler supports the -Wunreachable-code-return option... " >&6; }
7736 1.7 christos save_CFLAGS="$CFLAGS"
7737 1.11 christos CFLAGS="$CFLAGS -Wunreachable-code-return"
7738 1.11 christos #
7739 1.11 christos # XXX - yes, this depends on the way AC_LANG_WERROR works,
7740 1.11 christos # but no mechanism is provided to turn AC_LANG_WERROR on
7741 1.11 christos # *and then turn it back off*, so that we *only* do it when
7742 1.11 christos # testing compiler options - 15 years after somebody asked
7743 1.11 christos # for it:
7744 1.11 christos #
7745 1.11 christos # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7746 1.11 christos #
7747 1.11 christos save_ac_c_werror_flag="$ac_c_werror_flag"
7748 1.11 christos ac_c_werror_flag=yes
7749 1.11 christos #
7750 1.11 christos # We use AC_LANG_SOURCE() so that we can control the complete
7751 1.11 christos # content of the program being compiled. We do not, for example,
7752 1.11 christos # want the default "int main()" that AC_LANG_PROGRAM() generates,
7753 1.11 christos # as it will generate a warning with -Wold-style-definition, meaning
7754 1.11 christos # that we would treat it as not working, as the test will fail if
7755 1.11 christos # *any* error output, including a warning due to the flag we're
7756 1.11 christos # testing, is generated; see
7757 1.11 christos #
7758 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7759 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7760 1.11 christos #
7761 1.11 christos # This may, as per those two messages, be fixed in autoconf 2.70,
7762 1.11 christos # but we only require 2.64 or newer for now.
7763 1.11 christos #
7764 1.7 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7765 1.7 christos /* end confdefs.h. */
7766 1.11 christos int main(void) { return 0; }
7767 1.7 christos _ACEOF
7768 1.7 christos if ac_fn_c_try_compile "$LINENO"; then :
7769 1.7 christos
7770 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7771 1.7 christos $as_echo "yes" >&6; }
7772 1.7 christos CFLAGS="$save_CFLAGS"
7773 1.11 christos V_CCOPT="$V_CCOPT -Wunreachable-code-return"
7774 1.7 christos
7775 1.7 christos else
7776 1.7 christos
7777 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7778 1.7 christos $as_echo "no" >&6; }
7779 1.7 christos CFLAGS="$save_CFLAGS"
7780 1.7 christos
7781 1.7 christos fi
7782 1.7 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7783 1.11 christos ac_c_werror_flag="$save_ac_c_werror_flag"
7784 1.7 christos
7785 1.7 christos
7786 1.8 spz { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wused-but-marked-unused option" >&5
7787 1.8 spz $as_echo_n "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; }
7788 1.8 spz save_CFLAGS="$CFLAGS"
7789 1.11 christos CFLAGS="$CFLAGS -Wused-but-marked-unused"
7790 1.11 christos #
7791 1.11 christos # XXX - yes, this depends on the way AC_LANG_WERROR works,
7792 1.11 christos # but no mechanism is provided to turn AC_LANG_WERROR on
7793 1.11 christos # *and then turn it back off*, so that we *only* do it when
7794 1.11 christos # testing compiler options - 15 years after somebody asked
7795 1.11 christos # for it:
7796 1.11 christos #
7797 1.11 christos # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7798 1.11 christos #
7799 1.11 christos save_ac_c_werror_flag="$ac_c_werror_flag"
7800 1.11 christos ac_c_werror_flag=yes
7801 1.11 christos #
7802 1.11 christos # We use AC_LANG_SOURCE() so that we can control the complete
7803 1.11 christos # content of the program being compiled. We do not, for example,
7804 1.11 christos # want the default "int main()" that AC_LANG_PROGRAM() generates,
7805 1.11 christos # as it will generate a warning with -Wold-style-definition, meaning
7806 1.11 christos # that we would treat it as not working, as the test will fail if
7807 1.11 christos # *any* error output, including a warning due to the flag we're
7808 1.11 christos # testing, is generated; see
7809 1.11 christos #
7810 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7811 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7812 1.11 christos #
7813 1.11 christos # This may, as per those two messages, be fixed in autoconf 2.70,
7814 1.11 christos # but we only require 2.64 or newer for now.
7815 1.11 christos #
7816 1.8 spz cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7817 1.8 spz /* end confdefs.h. */
7818 1.11 christos int main(void) { return 0; }
7819 1.8 spz _ACEOF
7820 1.8 spz if ac_fn_c_try_compile "$LINENO"; then :
7821 1.8 spz
7822 1.8 spz { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7823 1.8 spz $as_echo "yes" >&6; }
7824 1.8 spz CFLAGS="$save_CFLAGS"
7825 1.8 spz V_CCOPT="$V_CCOPT -Wused-but-marked-unused"
7826 1.8 spz
7827 1.8 spz else
7828 1.8 spz
7829 1.8 spz { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7830 1.8 spz $as_echo "no" >&6; }
7831 1.8 spz CFLAGS="$save_CFLAGS"
7832 1.8 spz
7833 1.8 spz fi
7834 1.8 spz rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7835 1.11 christos ac_c_werror_flag="$save_ac_c_werror_flag"
7836 1.8 spz
7837 1.8 spz
7838 1.11 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wwrite-strings option" >&5
7839 1.11 christos $as_echo_n "checking whether the compiler supports the -Wwrite-strings option... " >&6; }
7840 1.4 christos save_CFLAGS="$CFLAGS"
7841 1.11 christos CFLAGS="$CFLAGS -Wwrite-strings"
7842 1.11 christos #
7843 1.11 christos # XXX - yes, this depends on the way AC_LANG_WERROR works,
7844 1.11 christos # but no mechanism is provided to turn AC_LANG_WERROR on
7845 1.11 christos # *and then turn it back off*, so that we *only* do it when
7846 1.11 christos # testing compiler options - 15 years after somebody asked
7847 1.11 christos # for it:
7848 1.11 christos #
7849 1.11 christos # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
7850 1.11 christos #
7851 1.11 christos save_ac_c_werror_flag="$ac_c_werror_flag"
7852 1.11 christos ac_c_werror_flag=yes
7853 1.11 christos #
7854 1.11 christos # We use AC_LANG_SOURCE() so that we can control the complete
7855 1.11 christos # content of the program being compiled. We do not, for example,
7856 1.11 christos # want the default "int main()" that AC_LANG_PROGRAM() generates,
7857 1.11 christos # as it will generate a warning with -Wold-style-definition, meaning
7858 1.11 christos # that we would treat it as not working, as the test will fail if
7859 1.11 christos # *any* error output, including a warning due to the flag we're
7860 1.11 christos # testing, is generated; see
7861 1.11 christos #
7862 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7863 1.11 christos # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
7864 1.11 christos #
7865 1.11 christos # This may, as per those two messages, be fixed in autoconf 2.70,
7866 1.11 christos # but we only require 2.64 or newer for now.
7867 1.11 christos #
7868 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7869 1.4 christos /* end confdefs.h. */
7870 1.11 christos int main(void) { return 0; }
7871 1.4 christos _ACEOF
7872 1.4 christos if ac_fn_c_try_compile "$LINENO"; then :
7873 1.1 christos
7874 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7875 1.4 christos $as_echo "yes" >&6; }
7876 1.4 christos CFLAGS="$save_CFLAGS"
7877 1.11 christos V_CCOPT="$V_CCOPT -Wwrite-strings"
7878 1.1 christos
7879 1.1 christos else
7880 1.4 christos
7881 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7882 1.4 christos $as_echo "no" >&6; }
7883 1.4 christos CFLAGS="$save_CFLAGS"
7884 1.1 christos
7885 1.1 christos fi
7886 1.4 christos rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7887 1.11 christos ac_c_werror_flag="$save_ac_c_werror_flag"
7888 1.4 christos
7889 1.4 christos fi
7890 1.4 christos
7891 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5
7892 1.4 christos $as_echo_n "checking whether the compiler supports generating dependencies... " >&6; }
7893 1.4 christos if test "$GCC" = yes ; then
7894 1.4 christos #
7895 1.4 christos # GCC, or a compiler deemed to be GCC by AC_PROG_CC (even
7896 1.4 christos # though it's not); we assume that, in this case, the flag
7897 1.4 christos # would be -M.
7898 1.4 christos #
7899 1.4 christos ac_lbl_dependency_flag="-M"
7900 1.4 christos else
7901 1.4 christos #
7902 1.4 christos # Not GCC or a compiler deemed to be GCC; what platform is
7903 1.4 christos # this? (We're assuming that if the compiler isn't GCC
7904 1.4 christos # it's the compiler from the vendor of the OS; that won't
7905 1.4 christos # necessarily be true for x86 platforms, where it might be
7906 1.4 christos # the Intel C compiler.)
7907 1.4 christos #
7908 1.4 christos case "$host_os" in
7909 1.4 christos
7910 1.4 christos irix*|osf*|darwin*)
7911 1.4 christos #
7912 1.4 christos # MIPS C for IRIX, DEC C, and clang all use -M.
7913 1.4 christos #
7914 1.4 christos ac_lbl_dependency_flag="-M"
7915 1.4 christos ;;
7916 1.4 christos
7917 1.4 christos solaris*)
7918 1.4 christos #
7919 1.4 christos # Sun C uses -xM.
7920 1.4 christos #
7921 1.4 christos ac_lbl_dependency_flag="-xM"
7922 1.4 christos ;;
7923 1.4 christos
7924 1.4 christos hpux*)
7925 1.4 christos #
7926 1.4 christos # HP's older C compilers don't support this.
7927 1.4 christos # HP's newer C compilers support this with
7928 1.4 christos # either +M or +Make; the older compilers
7929 1.4 christos # interpret +M as something completely
7930 1.4 christos # different, so we use +Make so we don't
7931 1.4 christos # think it works with the older compilers.
7932 1.4 christos #
7933 1.4 christos ac_lbl_dependency_flag="+Make"
7934 1.4 christos ;;
7935 1.4 christos
7936 1.4 christos *)
7937 1.4 christos #
7938 1.4 christos # Not one of the above; assume no support for
7939 1.4 christos # generating dependencies.
7940 1.4 christos #
7941 1.4 christos ac_lbl_dependency_flag=""
7942 1.4 christos ;;
7943 1.4 christos esac
7944 1.4 christos fi
7945 1.1 christos
7946 1.4 christos #
7947 1.4 christos # Is ac_lbl_dependency_flag defined and, if so, does the compiler
7948 1.4 christos # complain about it?
7949 1.4 christos #
7950 1.4 christos # Note: clang doesn't seem to exit with an error status when handed
7951 1.4 christos # an unknown non-warning error, even if you pass it
7952 1.4 christos # -Werror=unknown-warning-option. However, it always supports
7953 1.4 christos # -M, so the fact that this test always succeeds with clang
7954 1.4 christos # isn't an issue.
7955 1.4 christos #
7956 1.4 christos if test ! -z "$ac_lbl_dependency_flag"; then
7957 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7958 1.4 christos /* end confdefs.h. */
7959 1.4 christos int main(void) { return 0; }
7960 1.4 christos _ACEOF
7961 1.11 christos if { { $as_echo "$as_me:${as_lineno-$LINENO}: eval \"\$CC \$ac_lbl_dependency_flag conftest.c >/dev/null 2>&1\""; } >&5
7962 1.11 christos (eval "$CC $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1") 2>&5
7963 1.11 christos ac_status=$?
7964 1.11 christos $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7965 1.11 christos test $ac_status = 0; }; then
7966 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5
7967 1.4 christos $as_echo "yes, with $ac_lbl_dependency_flag" >&6; }
7968 1.4 christos DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
7969 1.11 christos MKDEP='${top_srcdir}/mkdep'
7970 1.4 christos else
7971 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7972 1.4 christos $as_echo "no" >&6; }
7973 1.4 christos #
7974 1.4 christos # We can't run mkdep, so have "make depend" do
7975 1.4 christos # nothing.
7976 1.4 christos #
7977 1.4 christos MKDEP=:
7978 1.4 christos fi
7979 1.4 christos rm -rf conftest*
7980 1.4 christos else
7981 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7982 1.4 christos $as_echo "no" >&6; }
7983 1.4 christos #
7984 1.4 christos # We can't run mkdep, so have "make depend" do
7985 1.4 christos # nothing.
7986 1.4 christos #
7987 1.4 christos MKDEP=:
7988 1.4 christos fi
7989 1.1 christos
7990 1.1 christos
7991 1.1 christos
7992 1.4 christos #
7993 1.4 christos # We used to set -n32 for IRIX 6 when not using GCC (presumed
7994 1.4 christos # to mean that we're using MIPS C or MIPSpro C); it specified
7995 1.4 christos # the "new" faster 32-bit ABI, introduced in IRIX 6.2. I'm
7996 1.4 christos # not sure why that would be something to do *only* with a
7997 1.4 christos # .devel file; why should the ABI for which we produce code
7998 1.4 christos # depend on .devel?
7999 1.4 christos #
8000 1.1 christos os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
8001 1.1 christos name="lbl/os-$os.h"
8002 1.1 christos if test -f $name ; then
8003 1.1 christos ln -s $name os-proto.h
8004 1.1 christos
8005 1.4 christos $as_echo "#define HAVE_OS_PROTO_H 1" >>confdefs.h
8006 1.1 christos
8007 1.1 christos else
8008 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find $name" >&5
8009 1.4 christos $as_echo "$as_me: WARNING: can't find $name" >&2;}
8010 1.1 christos fi
8011 1.1 christos fi
8012 1.1 christos
8013 1.7 christos # Check for OpenSSL/libressl libcrypto
8014 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use OpenSSL/libressl libcrypto" >&5
8015 1.7 christos $as_echo_n "checking whether to use OpenSSL/libressl libcrypto... " >&6; }
8016 1.1 christos # Specify location for both includes and libraries.
8017 1.4 christos want_libcrypto=ifavailable
8018 1.1 christos
8019 1.1 christos # Check whether --with-crypto was given.
8020 1.4 christos if test "${with_crypto+set}" = set; then :
8021 1.1 christos withval=$with_crypto;
8022 1.1 christos if test $withval = no
8023 1.1 christos then
8024 1.7 christos # User doesn't want to link with libcrypto.
8025 1.1 christos want_libcrypto=no
8026 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8027 1.4 christos $as_echo "no" >&6; }
8028 1.1 christos elif test $withval = yes
8029 1.1 christos then
8030 1.7 christos # User wants to link with libcrypto but hasn't specified
8031 1.7 christos # a directory.
8032 1.1 christos want_libcrypto=yes
8033 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8034 1.4 christos $as_echo "yes" >&6; }
8035 1.7 christos else
8036 1.7 christos # User wants to link with libcrypto and has specified
8037 1.7 christos # a directory, so use the provided value.
8038 1.7 christos want_libcrypto=yes
8039 1.7 christos libcrypto_root=$withval
8040 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, using the version installed in $withval" >&5
8041 1.7 christos $as_echo "yes, using the version installed in $withval" >&6; }
8042 1.7 christos
8043 1.7 christos #
8044 1.7 christos # Put the subdirectories of the libcrypto root directory
8045 1.7 christos # at the front of the header and library search path.
8046 1.7 christos #
8047 1.7 christos CFLAGS="-I$withval/include $CFLAGS"
8048 1.7 christos LIBS="-L$withval/lib $LIBS"
8049 1.1 christos fi
8050 1.1 christos
8051 1.1 christos else
8052 1.1 christos
8053 1.1 christos #
8054 1.7 christos # Use libcrypto if it's present, otherwise don't; no directory
8055 1.7 christos # was specified.
8056 1.1 christos #
8057 1.1 christos want_libcrypto=ifavailable
8058 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, if available" >&5
8059 1.4 christos $as_echo "yes, if available" >&6; }
8060 1.1 christos
8061 1.1 christos fi
8062 1.1 christos
8063 1.1 christos if test "$want_libcrypto" != "no"; then
8064 1.7 christos #
8065 1.7 christos # Don't check for libcrypto unless we have its headers;
8066 1.7 christos # Apple, bless their pointy little heads, apparently ship
8067 1.7 christos # libcrypto as a library, but not the header files, in
8068 1.7 christos # El Capitan, probably because they don't want you writing
8069 1.7 christos # nasty portable code that could run on other UN*Xes, they
8070 1.7 christos # want you writing code that uses their Shiny New Crypto
8071 1.11 christos # Library and that only runs on macOS.
8072 1.7 christos #
8073 1.7 christos ac_fn_c_check_header_mongrel "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default"
8074 1.7 christos if test "x$ac_cv_header_openssl_crypto_h" = xyes; then :
8075 1.7 christos
8076 1.7 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DES_cbc_encrypt in -lcrypto" >&5
8077 1.4 christos $as_echo_n "checking for DES_cbc_encrypt in -lcrypto... " >&6; }
8078 1.4 christos if ${ac_cv_lib_crypto_DES_cbc_encrypt+:} false; then :
8079 1.4 christos $as_echo_n "(cached) " >&6
8080 1.1 christos else
8081 1.1 christos ac_check_lib_save_LIBS=$LIBS
8082 1.1 christos LIBS="-lcrypto $LIBS"
8083 1.4 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8084 1.1 christos /* end confdefs.h. */
8085 1.1 christos
8086 1.1 christos /* Override any GCC internal prototype to avoid an error.
8087 1.1 christos Use char because int might match the return type of a GCC
8088 1.1 christos builtin and then its argument prototype would still apply. */
8089 1.1 christos #ifdef __cplusplus
8090 1.1 christos extern "C"
8091 1.1 christos #endif
8092 1.1 christos char DES_cbc_encrypt ();
8093 1.1 christos int
8094 1.1 christos main ()
8095 1.1 christos {
8096 1.1 christos return DES_cbc_encrypt ();
8097 1.1 christos ;
8098 1.1 christos return 0;
8099 1.1 christos }
8100 1.1 christos _ACEOF
8101 1.4 christos if ac_fn_c_try_link "$LINENO"; then :
8102 1.1 christos ac_cv_lib_crypto_DES_cbc_encrypt=yes
8103 1.1 christos else
8104 1.4 christos ac_cv_lib_crypto_DES_cbc_encrypt=no
8105 1.1 christos fi
8106 1.4 christos rm -f core conftest.err conftest.$ac_objext \
8107 1.4 christos conftest$ac_exeext conftest.$ac_ext
8108 1.1 christos LIBS=$ac_check_lib_save_LIBS
8109 1.1 christos fi
8110 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_DES_cbc_encrypt" >&5
8111 1.4 christos $as_echo "$ac_cv_lib_crypto_DES_cbc_encrypt" >&6; }
8112 1.4 christos if test "x$ac_cv_lib_crypto_DES_cbc_encrypt" = xyes; then :
8113 1.1 christos cat >>confdefs.h <<_ACEOF
8114 1.1 christos #define HAVE_LIBCRYPTO 1
8115 1.1 christos _ACEOF
8116 1.1 christos
8117 1.1 christos LIBS="-lcrypto $LIBS"
8118 1.1 christos
8119 1.1 christos fi
8120 1.1 christos
8121 1.7 christos if test "$ac_cv_lib_crypto_DES_cbc_encrypt" = "yes"; then
8122 1.7 christos for ac_header in openssl/evp.h
8123 1.4 christos do :
8124 1.4 christos ac_fn_c_check_header_mongrel "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default"
8125 1.4 christos if test "x$ac_cv_header_openssl_evp_h" = xyes; then :
8126 1.1 christos cat >>confdefs.h <<_ACEOF
8127 1.4 christos #define HAVE_OPENSSL_EVP_H 1
8128 1.1 christos _ACEOF
8129 1.1 christos
8130 1.1 christos fi
8131 1.1 christos
8132 1.1 christos done
8133 1.1 christos
8134 1.7 christos #
8135 1.9 christos # OK, then:
8136 1.9 christos #
8137 1.9 christos # 1) do we have EVP_CIPHER_CTX_new?
8138 1.7 christos # If so, we use it to allocate an
8139 1.7 christos # EVP_CIPHER_CTX, as EVP_CIPHER_CTX may be
8140 1.7 christos # opaque; otherwise, we allocate it ourselves.
8141 1.7 christos #
8142 1.11 christos # 2) do we have EVP_DecryptInit_ex()?
8143 1.9 christos # If so, we use it, because we need to be
8144 1.9 christos # able to make two "initialize the cipher"
8145 1.9 christos # calls, one with the cipher and key, and
8146 1.9 christos # one with the IV, and, as of OpenSSL 1.1,
8147 1.11 christos # You Can't Do That with EVP_DecryptInit(),
8148 1.11 christos # because a call to EVP_DecryptInit() will
8149 1.9 christos # unconditionally clear the context, and
8150 1.9 christos # if you don't supply a cipher, it'll
8151 1.9 christos # clear the cipher, rendering the context
8152 1.9 christos # unusable and causing a crash.
8153 1.9 christos #
8154 1.11 christos for ac_func in EVP_CIPHER_CTX_new EVP_DecryptInit_ex
8155 1.7 christos do :
8156 1.9 christos as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8157 1.9 christos ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8158 1.9 christos if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8159 1.7 christos cat >>confdefs.h <<_ACEOF
8160 1.9 christos #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8161 1.7 christos _ACEOF
8162 1.7 christos
8163 1.7 christos fi
8164 1.7 christos done
8165 1.7 christos
8166 1.7 christos fi
8167 1.7 christos
8168 1.7 christos fi
8169 1.7 christos
8170 1.7 christos
8171 1.1 christos fi
8172 1.1 christos
8173 1.6 christos # Check for libcap-ng
8174 1.6 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use libcap-ng" >&5
8175 1.6 christos $as_echo_n "checking whether to use libcap-ng... " >&6; }
8176 1.6 christos # Specify location for both includes and libraries.
8177 1.6 christos want_libcap_ng=ifavailable
8178 1.6 christos
8179 1.6 christos # Check whether --with-cap_ng was given.
8180 1.6 christos if test "${with_cap_ng+set}" = set; then :
8181 1.6 christos withval=$with_cap_ng;
8182 1.6 christos if test $withval = no
8183 1.6 christos then
8184 1.6 christos want_libcap_ng=no
8185 1.6 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8186 1.6 christos $as_echo "no" >&6; }
8187 1.6 christos elif test $withval = yes
8188 1.6 christos then
8189 1.6 christos want_libcap_ng=yes
8190 1.6 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8191 1.6 christos $as_echo "yes" >&6; }
8192 1.6 christos fi
8193 1.6 christos
8194 1.6 christos else
8195 1.6 christos
8196 1.6 christos #
8197 1.6 christos # Use libcap-ng if it's present, otherwise don't.
8198 1.6 christos #
8199 1.6 christos want_libcap_ng=ifavailable
8200 1.6 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, if available" >&5
8201 1.6 christos $as_echo "yes, if available" >&6; }
8202 1.6 christos
8203 1.6 christos fi
8204 1.6 christos
8205 1.6 christos if test "$want_libcap_ng" != "no"; then
8206 1.6 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for capng_change_id in -lcap-ng" >&5
8207 1.6 christos $as_echo_n "checking for capng_change_id in -lcap-ng... " >&6; }
8208 1.6 christos if ${ac_cv_lib_cap_ng_capng_change_id+:} false; then :
8209 1.6 christos $as_echo_n "(cached) " >&6
8210 1.6 christos else
8211 1.6 christos ac_check_lib_save_LIBS=$LIBS
8212 1.6 christos LIBS="-lcap-ng $LIBS"
8213 1.6 christos cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8214 1.6 christos /* end confdefs.h. */
8215 1.6 christos
8216 1.6 christos /* Override any GCC internal prototype to avoid an error.
8217 1.6 christos Use char because int might match the return type of a GCC
8218 1.6 christos builtin and then its argument prototype would still apply. */
8219 1.6 christos #ifdef __cplusplus
8220 1.6 christos extern "C"
8221 1.6 christos #endif
8222 1.6 christos char capng_change_id ();
8223 1.6 christos int
8224 1.6 christos main ()
8225 1.6 christos {
8226 1.6 christos return capng_change_id ();
8227 1.6 christos ;
8228 1.6 christos return 0;
8229 1.6 christos }
8230 1.6 christos _ACEOF
8231 1.6 christos if ac_fn_c_try_link "$LINENO"; then :
8232 1.6 christos ac_cv_lib_cap_ng_capng_change_id=yes
8233 1.6 christos else
8234 1.6 christos ac_cv_lib_cap_ng_capng_change_id=no
8235 1.6 christos fi
8236 1.6 christos rm -f core conftest.err conftest.$ac_objext \
8237 1.6 christos conftest$ac_exeext conftest.$ac_ext
8238 1.6 christos LIBS=$ac_check_lib_save_LIBS
8239 1.6 christos fi
8240 1.6 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cap_ng_capng_change_id" >&5
8241 1.6 christos $as_echo "$ac_cv_lib_cap_ng_capng_change_id" >&6; }
8242 1.6 christos if test "x$ac_cv_lib_cap_ng_capng_change_id" = xyes; then :
8243 1.6 christos cat >>confdefs.h <<_ACEOF
8244 1.6 christos #define HAVE_LIBCAP_NG 1
8245 1.6 christos _ACEOF
8246 1.6 christos
8247 1.6 christos LIBS="-lcap-ng $LIBS"
8248 1.6 christos
8249 1.6 christos fi
8250 1.6 christos
8251 1.6 christos for ac_header in cap-ng.h
8252 1.6 christos do :
8253 1.6 christos ac_fn_c_check_header_mongrel "$LINENO" "cap-ng.h" "ac_cv_header_cap_ng_h" "$ac_includes_default"
8254 1.6 christos if test "x$ac_cv_header_cap_ng_h" = xyes; then :
8255 1.6 christos cat >>confdefs.h <<_ACEOF
8256 1.6 christos #define HAVE_CAP_NG_H 1
8257 1.6 christos _ACEOF
8258 1.6 christos
8259 1.6 christos fi
8260 1.6 christos
8261 1.6 christos done
8262 1.6 christos
8263 1.6 christos fi
8264 1.6 christos
8265 1.1 christos if test "$missing_includes" = "yes"; then
8266 1.3 christos CPPFLAGS="$CPPFLAGS -I$srcdir/missing"
8267 1.3 christos V_INCLS="$V_INCLS -I$srcdir/missing"
8268 1.1 christos fi
8269 1.1 christos
8270 1.1 christos
8271 1.1 christos
8272 1.1 christos
8273 1.1 christos
8274 1.1 christos
8275 1.1 christos
8276 1.1 christos
8277 1.1 christos
8278 1.1 christos
8279 1.1 christos # Find a good install program. We prefer a C program (faster),
8280 1.1 christos # so one script is as good as another. But avoid the broken or
8281 1.1 christos # incompatible versions:
8282 1.1 christos # SysV /etc/install, /usr/sbin/install
8283 1.1 christos # SunOS /usr/etc/install
8284 1.1 christos # IRIX /sbin/install
8285 1.1 christos # AIX /bin/install
8286 1.1 christos # AmigaOS /C/install, which installs bootblocks on floppy discs
8287 1.1 christos # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
8288 1.1 christos # AFS /usr/afsws/bin/install, which mishandles nonexistent args
8289 1.1 christos # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8290 1.1 christos # OS/2's system install, which has a completely different semantic
8291 1.1 christos # ./install, which can be erroneously created by make from ./install.sh.
8292 1.4 christos # Reject install programs that cannot install multiple files.
8293 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
8294 1.4 christos $as_echo_n "checking for a BSD-compatible install... " >&6; }
8295 1.1 christos if test -z "$INSTALL"; then
8296 1.4 christos if ${ac_cv_path_install+:} false; then :
8297 1.4 christos $as_echo_n "(cached) " >&6
8298 1.1 christos else
8299 1.1 christos as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8300 1.1 christos for as_dir in $PATH
8301 1.1 christos do
8302 1.1 christos IFS=$as_save_IFS
8303 1.1 christos test -z "$as_dir" && as_dir=.
8304 1.4 christos # Account for people who put trailing slashes in PATH elements.
8305 1.4 christos case $as_dir/ in #((
8306 1.4 christos ./ | .// | /[cC]/* | \
8307 1.1 christos /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
8308 1.4 christos ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
8309 1.1 christos /usr/ucb/* ) ;;
8310 1.1 christos *)
8311 1.1 christos # OSF1 and SCO ODT 3.0 have their own names for install.
8312 1.1 christos # Don't use installbsd from OSF since it installs stuff as root
8313 1.1 christos # by default.
8314 1.1 christos for ac_prog in ginstall scoinst install; do
8315 1.1 christos for ac_exec_ext in '' $ac_executable_extensions; do
8316 1.4 christos if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
8317 1.1 christos if test $ac_prog = install &&
8318 1.1 christos grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8319 1.1 christos # AIX install. It has an incompatible calling convention.
8320 1.1 christos :
8321 1.1 christos elif test $ac_prog = install &&
8322 1.1 christos grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8323 1.1 christos # program-specific install script used by HP pwplus--don't use.
8324 1.1 christos :
8325 1.1 christos else
8326 1.4 christos rm -rf conftest.one conftest.two conftest.dir
8327 1.4 christos echo one > conftest.one
8328 1.4 christos echo two > conftest.two
8329 1.4 christos mkdir conftest.dir
8330 1.4 christos if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
8331 1.4 christos test -s conftest.one && test -s conftest.two &&
8332 1.4 christos test -s conftest.dir/conftest.one &&
8333 1.4 christos test -s conftest.dir/conftest.two
8334 1.4 christos then
8335 1.4 christos ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
8336 1.4 christos break 3
8337 1.4 christos fi
8338 1.1 christos fi
8339 1.1 christos fi
8340 1.1 christos done
8341 1.1 christos done
8342 1.1 christos ;;
8343 1.1 christos esac
8344 1.4 christos
8345 1.4 christos done
8346 1.1 christos IFS=$as_save_IFS
8347 1.1 christos
8348 1.4 christos rm -rf conftest.one conftest.two conftest.dir
8349 1.1 christos
8350 1.1 christos fi
8351 1.1 christos if test "${ac_cv_path_install+set}" = set; then
8352 1.1 christos INSTALL=$ac_cv_path_install
8353 1.1 christos else
8354 1.1 christos # As a last resort, use the slow shell script. Don't cache a
8355 1.1 christos # value for INSTALL within a source directory, because that will
8356 1.1 christos # break other packages using the cache if that directory is
8357 1.1 christos # removed, or if the value is a relative name.
8358 1.1 christos INSTALL=$ac_install_sh
8359 1.1 christos fi
8360 1.1 christos fi
8361 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
8362 1.4 christos $as_echo "$INSTALL" >&6; }
8363 1.1 christos
8364 1.1 christos # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
8365 1.1 christos # It thinks the first close brace ends the variable substitution.
8366 1.1 christos test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
8367 1.1 christos
8368 1.1 christos test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
8369 1.1 christos
8370 1.1 christos test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
8371 1.1 christos
8372 1.1 christos
8373 1.1 christos ac_config_headers="$ac_config_headers config.h"
8374 1.1 christos
8375 1.1 christos
8376 1.1 christos ac_config_commands="$ac_config_commands default-1"
8377 1.1 christos
8378 1.1 christos ac_config_files="$ac_config_files Makefile tcpdump.1"
8379 1.1 christos
8380 1.1 christos cat >confcache <<\_ACEOF
8381 1.1 christos # This file is a shell script that caches the results of configure
8382 1.1 christos # tests run on this system so they can be shared between configure
8383 1.1 christos # scripts and configure runs, see configure's option --config-cache.
8384 1.1 christos # It is not useful on other systems. If it contains results you don't
8385 1.1 christos # want to keep, you may remove or edit it.
8386 1.1 christos #
8387 1.1 christos # config.status only pays attention to the cache file if you give it
8388 1.1 christos # the --recheck option to rerun configure.
8389 1.1 christos #
8390 1.1 christos # `ac_cv_env_foo' variables (set or unset) will be overridden when
8391 1.1 christos # loading this file, other *unset* `ac_cv_foo' will be assigned the
8392 1.1 christos # following values.
8393 1.1 christos
8394 1.1 christos _ACEOF
8395 1.1 christos
8396 1.1 christos # The following way of writing the cache mishandles newlines in values,
8397 1.1 christos # but we know of no workaround that is simple, portable, and efficient.
8398 1.1 christos # So, we kill variables containing newlines.
8399 1.1 christos # Ultrix sh set writes to stderr and can't be redirected directly,
8400 1.1 christos # and sets the high bit in the cache file unless we assign to the vars.
8401 1.1 christos (
8402 1.1 christos for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
8403 1.1 christos eval ac_val=\$$ac_var
8404 1.1 christos case $ac_val in #(
8405 1.1 christos *${as_nl}*)
8406 1.1 christos case $ac_var in #(
8407 1.4 christos *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
8408 1.4 christos $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
8409 1.1 christos esac
8410 1.1 christos case $ac_var in #(
8411 1.1 christos _ | IFS | as_nl) ;; #(
8412 1.4 christos BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
8413 1.4 christos *) { eval $ac_var=; unset $ac_var;} ;;
8414 1.1 christos esac ;;
8415 1.1 christos esac
8416 1.1 christos done
8417 1.1 christos
8418 1.1 christos (set) 2>&1 |
8419 1.1 christos case $as_nl`(ac_space=' '; set) 2>&1` in #(
8420 1.1 christos *${as_nl}ac_space=\ *)
8421 1.4 christos # `set' does not quote correctly, so add quotes: double-quote
8422 1.4 christos # substitution turns \\\\ into \\, and sed turns \\ into \.
8423 1.1 christos sed -n \
8424 1.1 christos "s/'/'\\\\''/g;
8425 1.1 christos s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
8426 1.1 christos ;; #(
8427 1.1 christos *)
8428 1.1 christos # `set' quotes correctly as required by POSIX, so do not add quotes.
8429 1.1 christos sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
8430 1.1 christos ;;
8431 1.1 christos esac |
8432 1.1 christos sort
8433 1.1 christos ) |
8434 1.1 christos sed '
8435 1.1 christos /^ac_cv_env_/b end
8436 1.1 christos t clear
8437 1.1 christos :clear
8438 1.1 christos s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
8439 1.1 christos t end
8440 1.1 christos s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
8441 1.1 christos :end' >>confcache
8442 1.1 christos if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
8443 1.4 christos if test -w "$cache_file"; then
8444 1.4 christos if test "x$cache_file" != "x/dev/null"; then
8445 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
8446 1.4 christos $as_echo "$as_me: updating cache $cache_file" >&6;}
8447 1.4 christos if test ! -f "$cache_file" || test -h "$cache_file"; then
8448 1.4 christos cat confcache >"$cache_file"
8449 1.4 christos else
8450 1.4 christos case $cache_file in #(
8451 1.4 christos */* | ?:*)
8452 1.4 christos mv -f confcache "$cache_file"$$ &&
8453 1.4 christos mv -f "$cache_file"$$ "$cache_file" ;; #(
8454 1.4 christos *)
8455 1.4 christos mv -f confcache "$cache_file" ;;
8456 1.4 christos esac
8457 1.4 christos fi
8458 1.4 christos fi
8459 1.1 christos else
8460 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
8461 1.4 christos $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
8462 1.1 christos fi
8463 1.1 christos fi
8464 1.1 christos rm -f confcache
8465 1.1 christos
8466 1.1 christos test "x$prefix" = xNONE && prefix=$ac_default_prefix
8467 1.1 christos # Let make expand exec_prefix.
8468 1.1 christos test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8469 1.1 christos
8470 1.1 christos DEFS=-DHAVE_CONFIG_H
8471 1.1 christos
8472 1.1 christos ac_libobjs=
8473 1.1 christos ac_ltlibobjs=
8474 1.4 christos U=
8475 1.1 christos for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
8476 1.1 christos # 1. Remove the extension, and $U if already installed.
8477 1.1 christos ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
8478 1.4 christos ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
8479 1.1 christos # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
8480 1.1 christos # will be set to the directory where LIBOBJS objects are built.
8481 1.4 christos as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
8482 1.4 christos as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
8483 1.1 christos done
8484 1.1 christos LIBOBJS=$ac_libobjs
8485 1.1 christos
8486 1.1 christos LTLIBOBJS=$ac_ltlibobjs
8487 1.1 christos
8488 1.1 christos
8489 1.1 christos
8490 1.4 christos : "${CONFIG_STATUS=./config.status}"
8491 1.4 christos ac_write_fail=0
8492 1.1 christos ac_clean_files_save=$ac_clean_files
8493 1.1 christos ac_clean_files="$ac_clean_files $CONFIG_STATUS"
8494 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
8495 1.4 christos $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
8496 1.4 christos as_write_fail=0
8497 1.4 christos cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
8498 1.1 christos #! $SHELL
8499 1.1 christos # Generated by $as_me.
8500 1.1 christos # Run this file to recreate the current configuration.
8501 1.1 christos # Compiler output produced by configure, useful for debugging
8502 1.1 christos # configure, is in config.log if it exists.
8503 1.1 christos
8504 1.1 christos debug=false
8505 1.1 christos ac_cs_recheck=false
8506 1.1 christos ac_cs_silent=false
8507 1.4 christos
8508 1.1 christos SHELL=\${CONFIG_SHELL-$SHELL}
8509 1.4 christos export SHELL
8510 1.4 christos _ASEOF
8511 1.4 christos cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
8512 1.4 christos ## -------------------- ##
8513 1.4 christos ## M4sh Initialization. ##
8514 1.4 christos ## -------------------- ##
8515 1.1 christos
8516 1.1 christos # Be more Bourne compatible
8517 1.1 christos DUALCASE=1; export DUALCASE # for MKS sh
8518 1.4 christos if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
8519 1.1 christos emulate sh
8520 1.1 christos NULLCMD=:
8521 1.4 christos # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
8522 1.1 christos # is contrary to our usage. Disable this feature.
8523 1.1 christos alias -g '${1+"$@"}'='"$@"'
8524 1.1 christos setopt NO_GLOB_SUBST
8525 1.1 christos else
8526 1.4 christos case `(set -o) 2>/dev/null` in #(
8527 1.4 christos *posix*) :
8528 1.4 christos set -o posix ;; #(
8529 1.4 christos *) :
8530 1.4 christos ;;
8531 1.1 christos esac
8532 1.1 christos fi
8533 1.1 christos
8534 1.1 christos
8535 1.4 christos as_nl='
8536 1.4 christos '
8537 1.4 christos export as_nl
8538 1.4 christos # Printing a long string crashes Solaris 7 /usr/bin/printf.
8539 1.4 christos as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
8540 1.4 christos as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
8541 1.4 christos as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
8542 1.4 christos # Prefer a ksh shell builtin over an external printf program on Solaris,
8543 1.4 christos # but without wasting forks for bash or zsh.
8544 1.4 christos if test -z "$BASH_VERSION$ZSH_VERSION" \
8545 1.4 christos && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
8546 1.4 christos as_echo='print -r --'
8547 1.4 christos as_echo_n='print -rn --'
8548 1.4 christos elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
8549 1.4 christos as_echo='printf %s\n'
8550 1.4 christos as_echo_n='printf %s'
8551 1.4 christos else
8552 1.4 christos if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
8553 1.4 christos as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
8554 1.4 christos as_echo_n='/usr/ucb/echo -n'
8555 1.1 christos else
8556 1.4 christos as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
8557 1.4 christos as_echo_n_body='eval
8558 1.4 christos arg=$1;
8559 1.4 christos case $arg in #(
8560 1.4 christos *"$as_nl"*)
8561 1.4 christos expr "X$arg" : "X\\(.*\\)$as_nl";
8562 1.4 christos arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
8563 1.4 christos esac;
8564 1.4 christos expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
8565 1.4 christos '
8566 1.4 christos export as_echo_n_body
8567 1.4 christos as_echo_n='sh -c $as_echo_n_body as_echo'
8568 1.1 christos fi
8569 1.4 christos export as_echo_body
8570 1.4 christos as_echo='sh -c $as_echo_body as_echo'
8571 1.1 christos fi
8572 1.1 christos
8573 1.4 christos # The user is always right.
8574 1.4 christos if test "${PATH_SEPARATOR+set}" != set; then
8575 1.4 christos PATH_SEPARATOR=:
8576 1.4 christos (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
8577 1.4 christos (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
8578 1.4 christos PATH_SEPARATOR=';'
8579 1.4 christos }
8580 1.1 christos fi
8581 1.1 christos
8582 1.1 christos
8583 1.1 christos # IFS
8584 1.1 christos # We need space, tab and new line, in precisely that order. Quoting is
8585 1.1 christos # there to prevent editors from complaining about space-tab.
8586 1.1 christos # (If _AS_PATH_WALK were called with IFS unset, it would disable word
8587 1.1 christos # splitting by setting IFS to empty value.)
8588 1.1 christos IFS=" "" $as_nl"
8589 1.1 christos
8590 1.1 christos # Find who we are. Look in the path if we contain no directory separator.
8591 1.4 christos as_myself=
8592 1.4 christos case $0 in #((
8593 1.1 christos *[\\/]* ) as_myself=$0 ;;
8594 1.1 christos *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8595 1.1 christos for as_dir in $PATH
8596 1.1 christos do
8597 1.1 christos IFS=$as_save_IFS
8598 1.1 christos test -z "$as_dir" && as_dir=.
8599 1.4 christos test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
8600 1.4 christos done
8601 1.1 christos IFS=$as_save_IFS
8602 1.1 christos
8603 1.1 christos ;;
8604 1.1 christos esac
8605 1.1 christos # We did not find ourselves, most probably we were run as `sh COMMAND'
8606 1.1 christos # in which case we are not to be found in the path.
8607 1.1 christos if test "x$as_myself" = x; then
8608 1.1 christos as_myself=$0
8609 1.1 christos fi
8610 1.1 christos if test ! -f "$as_myself"; then
8611 1.4 christos $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
8612 1.4 christos exit 1
8613 1.1 christos fi
8614 1.1 christos
8615 1.4 christos # Unset variables that we do not need and which cause bugs (e.g. in
8616 1.4 christos # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
8617 1.4 christos # suppresses any "Segmentation fault" message there. '((' could
8618 1.4 christos # trigger a bug in pdksh 5.2.14.
8619 1.4 christos for as_var in BASH_ENV ENV MAIL MAILPATH
8620 1.4 christos do eval test x\${$as_var+set} = xset \
8621 1.4 christos && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
8622 1.1 christos done
8623 1.1 christos PS1='$ '
8624 1.1 christos PS2='> '
8625 1.1 christos PS4='+ '
8626 1.1 christos
8627 1.1 christos # NLS nuisances.
8628 1.4 christos LC_ALL=C
8629 1.4 christos export LC_ALL
8630 1.4 christos LANGUAGE=C
8631 1.4 christos export LANGUAGE
8632 1.4 christos
8633 1.4 christos # CDPATH.
8634 1.4 christos (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
8635 1.4 christos
8636 1.4 christos
8637 1.4 christos # as_fn_error STATUS ERROR [LINENO LOG_FD]
8638 1.4 christos # ----------------------------------------
8639 1.4 christos # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
8640 1.4 christos # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
8641 1.4 christos # script with STATUS, using 1 if that was 0.
8642 1.4 christos as_fn_error ()
8643 1.4 christos {
8644 1.4 christos as_status=$1; test $as_status -eq 0 && as_status=1
8645 1.4 christos if test "$4"; then
8646 1.4 christos as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
8647 1.4 christos $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
8648 1.4 christos fi
8649 1.4 christos $as_echo "$as_me: error: $2" >&2
8650 1.4 christos as_fn_exit $as_status
8651 1.4 christos } # as_fn_error
8652 1.4 christos
8653 1.4 christos
8654 1.4 christos # as_fn_set_status STATUS
8655 1.4 christos # -----------------------
8656 1.4 christos # Set $? to STATUS, without forking.
8657 1.4 christos as_fn_set_status ()
8658 1.4 christos {
8659 1.4 christos return $1
8660 1.4 christos } # as_fn_set_status
8661 1.4 christos
8662 1.4 christos # as_fn_exit STATUS
8663 1.4 christos # -----------------
8664 1.4 christos # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
8665 1.4 christos as_fn_exit ()
8666 1.4 christos {
8667 1.4 christos set +e
8668 1.4 christos as_fn_set_status $1
8669 1.4 christos exit $1
8670 1.4 christos } # as_fn_exit
8671 1.4 christos
8672 1.4 christos # as_fn_unset VAR
8673 1.4 christos # ---------------
8674 1.4 christos # Portably unset VAR.
8675 1.4 christos as_fn_unset ()
8676 1.4 christos {
8677 1.4 christos { eval $1=; unset $1;}
8678 1.4 christos }
8679 1.4 christos as_unset=as_fn_unset
8680 1.4 christos # as_fn_append VAR VALUE
8681 1.4 christos # ----------------------
8682 1.4 christos # Append the text in VALUE to the end of the definition contained in VAR. Take
8683 1.4 christos # advantage of any shell optimizations that allow amortized linear growth over
8684 1.4 christos # repeated appends, instead of the typical quadratic growth present in naive
8685 1.4 christos # implementations.
8686 1.4 christos if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
8687 1.4 christos eval 'as_fn_append ()
8688 1.4 christos {
8689 1.4 christos eval $1+=\$2
8690 1.4 christos }'
8691 1.4 christos else
8692 1.4 christos as_fn_append ()
8693 1.4 christos {
8694 1.4 christos eval $1=\$$1\$2
8695 1.4 christos }
8696 1.4 christos fi # as_fn_append
8697 1.4 christos
8698 1.4 christos # as_fn_arith ARG...
8699 1.4 christos # ------------------
8700 1.4 christos # Perform arithmetic evaluation on the ARGs, and store the result in the
8701 1.4 christos # global $as_val. Take advantage of shells that can avoid forks. The arguments
8702 1.4 christos # must be portable across $(()) and expr.
8703 1.4 christos if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
8704 1.4 christos eval 'as_fn_arith ()
8705 1.4 christos {
8706 1.4 christos as_val=$(( $* ))
8707 1.4 christos }'
8708 1.4 christos else
8709 1.4 christos as_fn_arith ()
8710 1.4 christos {
8711 1.4 christos as_val=`expr "$@" || test $? -eq 1`
8712 1.4 christos }
8713 1.4 christos fi # as_fn_arith
8714 1.4 christos
8715 1.1 christos
8716 1.1 christos if expr a : '\(a\)' >/dev/null 2>&1 &&
8717 1.1 christos test "X`expr 00001 : '.*\(...\)'`" = X001; then
8718 1.1 christos as_expr=expr
8719 1.1 christos else
8720 1.1 christos as_expr=false
8721 1.1 christos fi
8722 1.1 christos
8723 1.1 christos if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
8724 1.1 christos as_basename=basename
8725 1.1 christos else
8726 1.1 christos as_basename=false
8727 1.1 christos fi
8728 1.1 christos
8729 1.4 christos if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
8730 1.4 christos as_dirname=dirname
8731 1.4 christos else
8732 1.4 christos as_dirname=false
8733 1.4 christos fi
8734 1.1 christos
8735 1.1 christos as_me=`$as_basename -- "$0" ||
8736 1.1 christos $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
8737 1.1 christos X"$0" : 'X\(//\)$' \| \
8738 1.1 christos X"$0" : 'X\(/\)' \| . 2>/dev/null ||
8739 1.4 christos $as_echo X/"$0" |
8740 1.1 christos sed '/^.*\/\([^/][^/]*\)\/*$/{
8741 1.1 christos s//\1/
8742 1.1 christos q
8743 1.1 christos }
8744 1.1 christos /^X\/\(\/\/\)$/{
8745 1.1 christos s//\1/
8746 1.1 christos q
8747 1.1 christos }
8748 1.1 christos /^X\/\(\/\).*/{
8749 1.1 christos s//\1/
8750 1.1 christos q
8751 1.1 christos }
8752 1.1 christos s/.*/./; q'`
8753 1.1 christos
8754 1.4 christos # Avoid depending upon Character Ranges.
8755 1.4 christos as_cr_letters='abcdefghijklmnopqrstuvwxyz'
8756 1.4 christos as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
8757 1.4 christos as_cr_Letters=$as_cr_letters$as_cr_LETTERS
8758 1.4 christos as_cr_digits='0123456789'
8759 1.4 christos as_cr_alnum=$as_cr_Letters$as_cr_digits
8760 1.1 christos
8761 1.1 christos ECHO_C= ECHO_N= ECHO_T=
8762 1.4 christos case `echo -n x` in #(((((
8763 1.1 christos -n*)
8764 1.4 christos case `echo 'xy\c'` in
8765 1.1 christos *c*) ECHO_T=' ';; # ECHO_T is single tab character.
8766 1.4 christos xy) ECHO_C='\c';;
8767 1.4 christos *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
8768 1.4 christos ECHO_T=' ';;
8769 1.1 christos esac;;
8770 1.1 christos *)
8771 1.1 christos ECHO_N='-n';;
8772 1.1 christos esac
8773 1.1 christos
8774 1.1 christos rm -f conf$$ conf$$.exe conf$$.file
8775 1.1 christos if test -d conf$$.dir; then
8776 1.1 christos rm -f conf$$.dir/conf$$.file
8777 1.1 christos else
8778 1.1 christos rm -f conf$$.dir
8779 1.4 christos mkdir conf$$.dir 2>/dev/null
8780 1.1 christos fi
8781 1.4 christos if (echo >conf$$.file) 2>/dev/null; then
8782 1.4 christos if ln -s conf$$.file conf$$ 2>/dev/null; then
8783 1.4 christos as_ln_s='ln -s'
8784 1.4 christos # ... but there are two gotchas:
8785 1.4 christos # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
8786 1.4 christos # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
8787 1.4 christos # In both cases, we have to default to `cp -pR'.
8788 1.4 christos ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
8789 1.4 christos as_ln_s='cp -pR'
8790 1.4 christos elif ln conf$$.file conf$$ 2>/dev/null; then
8791 1.4 christos as_ln_s=ln
8792 1.4 christos else
8793 1.4 christos as_ln_s='cp -pR'
8794 1.4 christos fi
8795 1.1 christos else
8796 1.4 christos as_ln_s='cp -pR'
8797 1.1 christos fi
8798 1.1 christos rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
8799 1.1 christos rmdir conf$$.dir 2>/dev/null
8800 1.1 christos
8801 1.4 christos
8802 1.4 christos # as_fn_mkdir_p
8803 1.4 christos # -------------
8804 1.4 christos # Create "$as_dir" as a directory, including parents if necessary.
8805 1.4 christos as_fn_mkdir_p ()
8806 1.4 christos {
8807 1.4 christos
8808 1.4 christos case $as_dir in #(
8809 1.4 christos -*) as_dir=./$as_dir;;
8810 1.4 christos esac
8811 1.4 christos test -d "$as_dir" || eval $as_mkdir_p || {
8812 1.4 christos as_dirs=
8813 1.4 christos while :; do
8814 1.4 christos case $as_dir in #(
8815 1.4 christos *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
8816 1.4 christos *) as_qdir=$as_dir;;
8817 1.4 christos esac
8818 1.4 christos as_dirs="'$as_qdir' $as_dirs"
8819 1.4 christos as_dir=`$as_dirname -- "$as_dir" ||
8820 1.4 christos $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8821 1.4 christos X"$as_dir" : 'X\(//\)[^/]' \| \
8822 1.4 christos X"$as_dir" : 'X\(//\)$' \| \
8823 1.4 christos X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
8824 1.4 christos $as_echo X"$as_dir" |
8825 1.4 christos sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
8826 1.4 christos s//\1/
8827 1.4 christos q
8828 1.4 christos }
8829 1.4 christos /^X\(\/\/\)[^/].*/{
8830 1.4 christos s//\1/
8831 1.4 christos q
8832 1.4 christos }
8833 1.4 christos /^X\(\/\/\)$/{
8834 1.4 christos s//\1/
8835 1.4 christos q
8836 1.4 christos }
8837 1.4 christos /^X\(\/\).*/{
8838 1.4 christos s//\1/
8839 1.4 christos q
8840 1.4 christos }
8841 1.4 christos s/.*/./; q'`
8842 1.4 christos test -d "$as_dir" && break
8843 1.4 christos done
8844 1.4 christos test -z "$as_dirs" || eval "mkdir $as_dirs"
8845 1.4 christos } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
8846 1.4 christos
8847 1.4 christos
8848 1.4 christos } # as_fn_mkdir_p
8849 1.1 christos if mkdir -p . 2>/dev/null; then
8850 1.4 christos as_mkdir_p='mkdir -p "$as_dir"'
8851 1.1 christos else
8852 1.1 christos test -d ./-p && rmdir ./-p
8853 1.1 christos as_mkdir_p=false
8854 1.1 christos fi
8855 1.1 christos
8856 1.4 christos
8857 1.4 christos # as_fn_executable_p FILE
8858 1.4 christos # -----------------------
8859 1.4 christos # Test if FILE is an executable regular file.
8860 1.4 christos as_fn_executable_p ()
8861 1.4 christos {
8862 1.4 christos test -f "$1" && test -x "$1"
8863 1.4 christos } # as_fn_executable_p
8864 1.4 christos as_test_x='test -x'
8865 1.4 christos as_executable_p=as_fn_executable_p
8866 1.1 christos
8867 1.1 christos # Sed expression to map a string onto a valid CPP name.
8868 1.1 christos as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
8869 1.1 christos
8870 1.1 christos # Sed expression to map a string onto a valid variable name.
8871 1.1 christos as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
8872 1.1 christos
8873 1.1 christos
8874 1.1 christos exec 6>&1
8875 1.4 christos ## ----------------------------------- ##
8876 1.4 christos ## Main body of $CONFIG_STATUS script. ##
8877 1.4 christos ## ----------------------------------- ##
8878 1.4 christos _ASEOF
8879 1.4 christos test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
8880 1.1 christos
8881 1.4 christos cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8882 1.4 christos # Save the log message, to keep $0 and so on meaningful, and to
8883 1.1 christos # report actual input values of CONFIG_FILES etc. instead of their
8884 1.1 christos # values after options handling.
8885 1.1 christos ac_log="
8886 1.11 christos This file was extended by tcpdump $as_me 4.99.4, which was
8887 1.4 christos generated by GNU Autoconf 2.69. Invocation command line was
8888 1.1 christos
8889 1.1 christos CONFIG_FILES = $CONFIG_FILES
8890 1.1 christos CONFIG_HEADERS = $CONFIG_HEADERS
8891 1.1 christos CONFIG_LINKS = $CONFIG_LINKS
8892 1.1 christos CONFIG_COMMANDS = $CONFIG_COMMANDS
8893 1.1 christos $ $0 $@
8894 1.1 christos
8895 1.1 christos on `(hostname || uname -n) 2>/dev/null | sed 1q`
8896 1.1 christos "
8897 1.1 christos
8898 1.1 christos _ACEOF
8899 1.1 christos
8900 1.4 christos case $ac_config_files in *"
8901 1.4 christos "*) set x $ac_config_files; shift; ac_config_files=$*;;
8902 1.4 christos esac
8903 1.4 christos
8904 1.4 christos case $ac_config_headers in *"
8905 1.4 christos "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
8906 1.4 christos esac
8907 1.4 christos
8908 1.4 christos
8909 1.4 christos cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8910 1.1 christos # Files that config.status was made for.
8911 1.1 christos config_files="$ac_config_files"
8912 1.1 christos config_headers="$ac_config_headers"
8913 1.1 christos config_commands="$ac_config_commands"
8914 1.1 christos
8915 1.1 christos _ACEOF
8916 1.1 christos
8917 1.4 christos cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8918 1.1 christos ac_cs_usage="\
8919 1.4 christos \`$as_me' instantiates files and other configuration actions
8920 1.4 christos from templates according to the current configuration. Unless the files
8921 1.4 christos and actions are specified as TAGs, all are instantiated by default.
8922 1.1 christos
8923 1.4 christos Usage: $0 [OPTION]... [TAG]...
8924 1.1 christos
8925 1.1 christos -h, --help print this help, then exit
8926 1.1 christos -V, --version print version number and configuration settings, then exit
8927 1.4 christos --config print configuration, then exit
8928 1.4 christos -q, --quiet, --silent
8929 1.4 christos do not print progress messages
8930 1.1 christos -d, --debug don't remove temporary files
8931 1.1 christos --recheck update $as_me by reconfiguring in the same conditions
8932 1.4 christos --file=FILE[:TEMPLATE]
8933 1.4 christos instantiate the configuration file FILE
8934 1.4 christos --header=FILE[:TEMPLATE]
8935 1.4 christos instantiate the configuration header FILE
8936 1.1 christos
8937 1.1 christos Configuration files:
8938 1.1 christos $config_files
8939 1.1 christos
8940 1.1 christos Configuration headers:
8941 1.1 christos $config_headers
8942 1.1 christos
8943 1.1 christos Configuration commands:
8944 1.1 christos $config_commands
8945 1.1 christos
8946 1.4 christos Report bugs to the package provider."
8947 1.1 christos
8948 1.1 christos _ACEOF
8949 1.4 christos cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8950 1.4 christos ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
8951 1.1 christos ac_cs_version="\\
8952 1.11 christos tcpdump config.status 4.99.4
8953 1.4 christos configured by $0, generated by GNU Autoconf 2.69,
8954 1.4 christos with options \\"\$ac_cs_config\\"
8955 1.1 christos
8956 1.4 christos Copyright (C) 2012 Free Software Foundation, Inc.
8957 1.1 christos This config.status script is free software; the Free Software Foundation
8958 1.1 christos gives unlimited permission to copy, distribute and modify it."
8959 1.1 christos
8960 1.1 christos ac_pwd='$ac_pwd'
8961 1.1 christos srcdir='$srcdir'
8962 1.1 christos INSTALL='$INSTALL'
8963 1.4 christos test -n "\$AWK" || AWK=awk
8964 1.1 christos _ACEOF
8965 1.1 christos
8966 1.4 christos cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8967 1.4 christos # The default lists apply if the user does not specify any file.
8968 1.1 christos ac_need_defaults=:
8969 1.1 christos while test $# != 0
8970 1.1 christos do
8971 1.1 christos case $1 in
8972 1.4 christos --*=?*)
8973 1.1 christos ac_option=`expr "X$1" : 'X\([^=]*\)='`
8974 1.1 christos ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
8975 1.1 christos ac_shift=:
8976 1.1 christos ;;
8977 1.4 christos --*=)
8978 1.4 christos ac_option=`expr "X$1" : 'X\([^=]*\)='`
8979 1.4 christos ac_optarg=
8980 1.4 christos ac_shift=:
8981 1.4 christos ;;
8982 1.1 christos *)
8983 1.1 christos ac_option=$1
8984 1.1 christos ac_optarg=$2
8985 1.1 christos ac_shift=shift
8986 1.1 christos ;;
8987 1.1 christos esac
8988 1.1 christos
8989 1.1 christos case $ac_option in
8990 1.1 christos # Handling of the options.
8991 1.1 christos -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8992 1.1 christos ac_cs_recheck=: ;;
8993 1.1 christos --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
8994 1.4 christos $as_echo "$ac_cs_version"; exit ;;
8995 1.4 christos --config | --confi | --conf | --con | --co | --c )
8996 1.4 christos $as_echo "$ac_cs_config"; exit ;;
8997 1.1 christos --debug | --debu | --deb | --de | --d | -d )
8998 1.1 christos debug=: ;;
8999 1.1 christos --file | --fil | --fi | --f )
9000 1.1 christos $ac_shift
9001 1.4 christos case $ac_optarg in
9002 1.4 christos *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
9003 1.4 christos '') as_fn_error $? "missing file argument" ;;
9004 1.4 christos esac
9005 1.4 christos as_fn_append CONFIG_FILES " '$ac_optarg'"
9006 1.1 christos ac_need_defaults=false;;
9007 1.1 christos --header | --heade | --head | --hea )
9008 1.1 christos $ac_shift
9009 1.4 christos case $ac_optarg in
9010 1.4 christos *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
9011 1.4 christos esac
9012 1.4 christos as_fn_append CONFIG_HEADERS " '$ac_optarg'"
9013 1.1 christos ac_need_defaults=false;;
9014 1.1 christos --he | --h)
9015 1.1 christos # Conflict between --help and --header
9016 1.4 christos as_fn_error $? "ambiguous option: \`$1'
9017 1.4 christos Try \`$0 --help' for more information.";;
9018 1.1 christos --help | --hel | -h )
9019 1.4 christos $as_echo "$ac_cs_usage"; exit ;;
9020 1.1 christos -q | -quiet | --quiet | --quie | --qui | --qu | --q \
9021 1.1 christos | -silent | --silent | --silen | --sile | --sil | --si | --s)
9022 1.1 christos ac_cs_silent=: ;;
9023 1.1 christos
9024 1.1 christos # This is an error.
9025 1.4 christos -*) as_fn_error $? "unrecognized option: \`$1'
9026 1.4 christos Try \`$0 --help' for more information." ;;
9027 1.1 christos
9028 1.4 christos *) as_fn_append ac_config_targets " $1"
9029 1.1 christos ac_need_defaults=false ;;
9030 1.1 christos
9031 1.1 christos esac
9032 1.1 christos shift
9033 1.1 christos done
9034 1.1 christos
9035 1.1 christos ac_configure_extra_args=
9036 1.1 christos
9037 1.1 christos if $ac_cs_silent; then
9038 1.1 christos exec 6>/dev/null
9039 1.1 christos ac_configure_extra_args="$ac_configure_extra_args --silent"
9040 1.1 christos fi
9041 1.1 christos
9042 1.1 christos _ACEOF
9043 1.4 christos cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9044 1.1 christos if \$ac_cs_recheck; then
9045 1.4 christos set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
9046 1.4 christos shift
9047 1.4 christos \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
9048 1.4 christos CONFIG_SHELL='$SHELL'
9049 1.1 christos export CONFIG_SHELL
9050 1.4 christos exec "\$@"
9051 1.1 christos fi
9052 1.1 christos
9053 1.1 christos _ACEOF
9054 1.4 christos cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9055 1.1 christos exec 5>>config.log
9056 1.1 christos {
9057 1.1 christos echo
9058 1.1 christos sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
9059 1.1 christos ## Running $as_me. ##
9060 1.1 christos _ASBOX
9061 1.4 christos $as_echo "$ac_log"
9062 1.1 christos } >&5
9063 1.1 christos
9064 1.1 christos _ACEOF
9065 1.4 christos cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9066 1.1 christos #
9067 1.1 christos # INIT-COMMANDS
9068 1.1 christos #
9069 1.1 christos
9070 1.1 christos
9071 1.1 christos _ACEOF
9072 1.1 christos
9073 1.4 christos cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9074 1.1 christos
9075 1.1 christos # Handling of arguments.
9076 1.1 christos for ac_config_target in $ac_config_targets
9077 1.1 christos do
9078 1.1 christos case $ac_config_target in
9079 1.1 christos "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
9080 1.1 christos "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
9081 1.1 christos "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
9082 1.1 christos "tcpdump.1") CONFIG_FILES="$CONFIG_FILES tcpdump.1" ;;
9083 1.1 christos
9084 1.4 christos *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
9085 1.1 christos esac
9086 1.1 christos done
9087 1.1 christos
9088 1.1 christos
9089 1.1 christos # If the user did not use the arguments to specify the items to instantiate,
9090 1.1 christos # then the envvar interface is used. Set only those that are not.
9091 1.1 christos # We use the long form for the default assignment because of an extremely
9092 1.1 christos # bizarre bug on SunOS 4.1.3.
9093 1.1 christos if $ac_need_defaults; then
9094 1.1 christos test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
9095 1.1 christos test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
9096 1.1 christos test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
9097 1.1 christos fi
9098 1.1 christos
9099 1.1 christos # Have a temporary directory for convenience. Make it in the build tree
9100 1.1 christos # simply because there is no reason against having it here, and in addition,
9101 1.1 christos # creating and moving files from /tmp can sometimes cause problems.
9102 1.1 christos # Hook for its removal unless debugging.
9103 1.1 christos # Note that there is a small window in which the directory will not be cleaned:
9104 1.1 christos # after its creation but before its name has been assigned to `$tmp'.
9105 1.1 christos $debug ||
9106 1.1 christos {
9107 1.4 christos tmp= ac_tmp=
9108 1.1 christos trap 'exit_status=$?
9109 1.4 christos : "${ac_tmp:=$tmp}"
9110 1.4 christos { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
9111 1.1 christos ' 0
9112 1.4 christos trap 'as_fn_exit 1' 1 2 13 15
9113 1.1 christos }
9114 1.1 christos # Create a (secure) tmp directory for tmp files.
9115 1.1 christos
9116 1.1 christos {
9117 1.1 christos tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
9118 1.4 christos test -d "$tmp"
9119 1.1 christos } ||
9120 1.1 christos {
9121 1.1 christos tmp=./conf$$-$RANDOM
9122 1.1 christos (umask 077 && mkdir "$tmp")
9123 1.4 christos } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
9124 1.4 christos ac_tmp=$tmp
9125 1.4 christos
9126 1.4 christos # Set up the scripts for CONFIG_FILES section.
9127 1.4 christos # No need to generate them if there are no CONFIG_FILES.
9128 1.4 christos # This happens for instance with `./config.status config.h'.
9129 1.4 christos if test -n "$CONFIG_FILES"; then
9130 1.1 christos
9131 1.1 christos
9132 1.4 christos ac_cr=`echo X | tr X '\015'`
9133 1.4 christos # On cygwin, bash can eat \r inside `` if the user requested igncr.
9134 1.4 christos # But we know of no other shell where ac_cr would be empty at this
9135 1.4 christos # point, so we can use a bashism as a fallback.
9136 1.4 christos if test "x$ac_cr" = x; then
9137 1.4 christos eval ac_cr=\$\'\\r\'
9138 1.4 christos fi
9139 1.4 christos ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
9140 1.4 christos if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
9141 1.4 christos ac_cs_awk_cr='\\r'
9142 1.4 christos else
9143 1.4 christos ac_cs_awk_cr=$ac_cr
9144 1.4 christos fi
9145 1.1 christos
9146 1.4 christos echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
9147 1.1 christos _ACEOF
9148 1.1 christos
9149 1.1 christos
9150 1.4 christos {
9151 1.4 christos echo "cat >conf$$subs.awk <<_ACEOF" &&
9152 1.4 christos echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
9153 1.4 christos echo "_ACEOF"
9154 1.4 christos } >conf$$subs.sh ||
9155 1.4 christos as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9156 1.4 christos ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
9157 1.1 christos ac_delim='%!_!# '
9158 1.1 christos for ac_last_try in false false false false false :; do
9159 1.4 christos . ./conf$$subs.sh ||
9160 1.4 christos as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9161 1.1 christos
9162 1.4 christos ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
9163 1.4 christos if test $ac_delim_n = $ac_delim_num; then
9164 1.1 christos break
9165 1.1 christos elif $ac_last_try; then
9166 1.4 christos as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9167 1.1 christos else
9168 1.1 christos ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
9169 1.1 christos fi
9170 1.1 christos done
9171 1.4 christos rm -f conf$$subs.sh
9172 1.1 christos
9173 1.4 christos cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9174 1.4 christos cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
9175 1.1 christos _ACEOF
9176 1.4 christos sed -n '
9177 1.4 christos h
9178 1.4 christos s/^/S["/; s/!.*/"]=/
9179 1.4 christos p
9180 1.4 christos g
9181 1.4 christos s/^[^!]*!//
9182 1.4 christos :repl
9183 1.4 christos t repl
9184 1.4 christos s/'"$ac_delim"'$//
9185 1.4 christos t delim
9186 1.4 christos :nl
9187 1.4 christos h
9188 1.4 christos s/\(.\{148\}\)..*/\1/
9189 1.4 christos t more1
9190 1.4 christos s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
9191 1.4 christos p
9192 1.4 christos n
9193 1.4 christos b repl
9194 1.4 christos :more1
9195 1.4 christos s/["\\]/\\&/g; s/^/"/; s/$/"\\/
9196 1.4 christos p
9197 1.4 christos g
9198 1.4 christos s/.\{148\}//
9199 1.4 christos t nl
9200 1.4 christos :delim
9201 1.4 christos h
9202 1.4 christos s/\(.\{148\}\)..*/\1/
9203 1.4 christos t more2
9204 1.4 christos s/["\\]/\\&/g; s/^/"/; s/$/"/
9205 1.4 christos p
9206 1.4 christos b
9207 1.4 christos :more2
9208 1.4 christos s/["\\]/\\&/g; s/^/"/; s/$/"\\/
9209 1.4 christos p
9210 1.4 christos g
9211 1.4 christos s/.\{148\}//
9212 1.4 christos t delim
9213 1.4 christos ' <conf$$subs.awk | sed '
9214 1.4 christos /^[^""]/{
9215 1.4 christos N
9216 1.4 christos s/\n//
9217 1.4 christos }
9218 1.4 christos ' >>$CONFIG_STATUS || ac_write_fail=1
9219 1.4 christos rm -f conf$$subs.awk
9220 1.4 christos cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9221 1.4 christos _ACAWK
9222 1.4 christos cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
9223 1.4 christos for (key in S) S_is_set[key] = 1
9224 1.4 christos FS = ""
9225 1.4 christos
9226 1.4 christos }
9227 1.4 christos {
9228 1.4 christos line = $ 0
9229 1.4 christos nfields = split(line, field, "@")
9230 1.4 christos substed = 0
9231 1.4 christos len = length(field[1])
9232 1.4 christos for (i = 2; i < nfields; i++) {
9233 1.4 christos key = field[i]
9234 1.4 christos keylen = length(key)
9235 1.4 christos if (S_is_set[key]) {
9236 1.4 christos value = S[key]
9237 1.4 christos line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
9238 1.4 christos len += length(value) + length(field[++i])
9239 1.4 christos substed = 1
9240 1.4 christos } else
9241 1.4 christos len += 1 + keylen
9242 1.4 christos }
9243 1.4 christos
9244 1.4 christos print line
9245 1.4 christos }
9246 1.1 christos
9247 1.4 christos _ACAWK
9248 1.4 christos _ACEOF
9249 1.4 christos cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9250 1.4 christos if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
9251 1.4 christos sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
9252 1.4 christos else
9253 1.4 christos cat
9254 1.4 christos fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
9255 1.4 christos || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
9256 1.4 christos _ACEOF
9257 1.1 christos
9258 1.4 christos # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
9259 1.4 christos # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
9260 1.1 christos # trailing colons and then remove the whole line if VPATH becomes empty
9261 1.1 christos # (actually we leave an empty line to preserve line numbers).
9262 1.1 christos if test "x$srcdir" = x.; then
9263 1.4 christos ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
9264 1.4 christos h
9265 1.4 christos s///
9266 1.4 christos s/^/:/
9267 1.4 christos s/[ ]*$/:/
9268 1.4 christos s/:\$(srcdir):/:/g
9269 1.4 christos s/:\${srcdir}:/:/g
9270 1.4 christos s/:@srcdir@:/:/g
9271 1.4 christos s/^:*//
9272 1.1 christos s/:*$//
9273 1.4 christos x
9274 1.4 christos s/\(=[ ]*\).*/\1/
9275 1.4 christos G
9276 1.4 christos s/\n//
9277 1.1 christos s/^[^=]*=[ ]*$//
9278 1.1 christos }'
9279 1.1 christos fi
9280 1.1 christos
9281 1.4 christos cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9282 1.1 christos fi # test -n "$CONFIG_FILES"
9283 1.1 christos
9284 1.4 christos # Set up the scripts for CONFIG_HEADERS section.
9285 1.4 christos # No need to generate them if there are no CONFIG_HEADERS.
9286 1.4 christos # This happens for instance with `./config.status Makefile'.
9287 1.4 christos if test -n "$CONFIG_HEADERS"; then
9288 1.4 christos cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
9289 1.4 christos BEGIN {
9290 1.4 christos _ACEOF
9291 1.4 christos
9292 1.4 christos # Transform confdefs.h into an awk script `defines.awk', embedded as
9293 1.4 christos # here-document in config.status, that substitutes the proper values into
9294 1.4 christos # config.h.in to produce config.h.
9295 1.4 christos
9296 1.4 christos # Create a delimiter string that does not exist in confdefs.h, to ease
9297 1.4 christos # handling of long lines.
9298 1.4 christos ac_delim='%!_!# '
9299 1.4 christos for ac_last_try in false false :; do
9300 1.4 christos ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
9301 1.4 christos if test -z "$ac_tt"; then
9302 1.4 christos break
9303 1.4 christos elif $ac_last_try; then
9304 1.4 christos as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
9305 1.4 christos else
9306 1.4 christos ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
9307 1.4 christos fi
9308 1.4 christos done
9309 1.4 christos
9310 1.4 christos # For the awk script, D is an array of macro values keyed by name,
9311 1.4 christos # likewise P contains macro parameters if any. Preserve backslash
9312 1.4 christos # newline sequences.
9313 1.4 christos
9314 1.4 christos ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
9315 1.4 christos sed -n '
9316 1.4 christos s/.\{148\}/&'"$ac_delim"'/g
9317 1.4 christos t rset
9318 1.4 christos :rset
9319 1.4 christos s/^[ ]*#[ ]*define[ ][ ]*/ /
9320 1.4 christos t def
9321 1.4 christos d
9322 1.4 christos :def
9323 1.4 christos s/\\$//
9324 1.4 christos t bsnl
9325 1.4 christos s/["\\]/\\&/g
9326 1.4 christos s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
9327 1.4 christos D["\1"]=" \3"/p
9328 1.4 christos s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
9329 1.4 christos d
9330 1.4 christos :bsnl
9331 1.4 christos s/["\\]/\\&/g
9332 1.4 christos s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
9333 1.4 christos D["\1"]=" \3\\\\\\n"\\/p
9334 1.4 christos t cont
9335 1.4 christos s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
9336 1.4 christos t cont
9337 1.4 christos d
9338 1.4 christos :cont
9339 1.4 christos n
9340 1.4 christos s/.\{148\}/&'"$ac_delim"'/g
9341 1.4 christos t clear
9342 1.4 christos :clear
9343 1.4 christos s/\\$//
9344 1.4 christos t bsnlc
9345 1.4 christos s/["\\]/\\&/g; s/^/"/; s/$/"/p
9346 1.4 christos d
9347 1.4 christos :bsnlc
9348 1.4 christos s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
9349 1.4 christos b cont
9350 1.4 christos ' <confdefs.h | sed '
9351 1.4 christos s/'"$ac_delim"'/"\\\
9352 1.4 christos "/g' >>$CONFIG_STATUS || ac_write_fail=1
9353 1.4 christos
9354 1.4 christos cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9355 1.4 christos for (key in D) D_is_set[key] = 1
9356 1.4 christos FS = ""
9357 1.4 christos }
9358 1.4 christos /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
9359 1.4 christos line = \$ 0
9360 1.4 christos split(line, arg, " ")
9361 1.4 christos if (arg[1] == "#") {
9362 1.4 christos defundef = arg[2]
9363 1.4 christos mac1 = arg[3]
9364 1.4 christos } else {
9365 1.4 christos defundef = substr(arg[1], 2)
9366 1.4 christos mac1 = arg[2]
9367 1.4 christos }
9368 1.4 christos split(mac1, mac2, "(") #)
9369 1.4 christos macro = mac2[1]
9370 1.4 christos prefix = substr(line, 1, index(line, defundef) - 1)
9371 1.4 christos if (D_is_set[macro]) {
9372 1.4 christos # Preserve the white space surrounding the "#".
9373 1.4 christos print prefix "define", macro P[macro] D[macro]
9374 1.4 christos next
9375 1.4 christos } else {
9376 1.4 christos # Replace #undef with comments. This is necessary, for example,
9377 1.4 christos # in the case of _POSIX_SOURCE, which is predefined and required
9378 1.4 christos # on some systems where configure will not decide to define it.
9379 1.4 christos if (defundef == "undef") {
9380 1.4 christos print "/*", prefix defundef, macro, "*/"
9381 1.4 christos next
9382 1.4 christos }
9383 1.4 christos }
9384 1.4 christos }
9385 1.4 christos { print }
9386 1.4 christos _ACAWK
9387 1.4 christos _ACEOF
9388 1.4 christos cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9389 1.4 christos as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
9390 1.4 christos fi # test -n "$CONFIG_HEADERS"
9391 1.4 christos
9392 1.1 christos
9393 1.4 christos eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
9394 1.4 christos shift
9395 1.4 christos for ac_tag
9396 1.1 christos do
9397 1.1 christos case $ac_tag in
9398 1.1 christos :[FHLC]) ac_mode=$ac_tag; continue;;
9399 1.1 christos esac
9400 1.1 christos case $ac_mode$ac_tag in
9401 1.1 christos :[FHL]*:*);;
9402 1.4 christos :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
9403 1.1 christos :[FH]-) ac_tag=-:-;;
9404 1.1 christos :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
9405 1.1 christos esac
9406 1.1 christos ac_save_IFS=$IFS
9407 1.1 christos IFS=:
9408 1.1 christos set x $ac_tag
9409 1.1 christos IFS=$ac_save_IFS
9410 1.1 christos shift
9411 1.1 christos ac_file=$1
9412 1.1 christos shift
9413 1.1 christos
9414 1.1 christos case $ac_mode in
9415 1.1 christos :L) ac_source=$1;;
9416 1.1 christos :[FH])
9417 1.1 christos ac_file_inputs=
9418 1.1 christos for ac_f
9419 1.1 christos do
9420 1.1 christos case $ac_f in
9421 1.4 christos -) ac_f="$ac_tmp/stdin";;
9422 1.1 christos *) # Look for the file first in the build tree, then in the source tree
9423 1.1 christos # (if the path is not absolute). The absolute path cannot be DOS-style,
9424 1.1 christos # because $ac_f cannot contain `:'.
9425 1.1 christos test -f "$ac_f" ||
9426 1.1 christos case $ac_f in
9427 1.1 christos [\\/$]*) false;;
9428 1.1 christos *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
9429 1.1 christos esac ||
9430 1.4 christos as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
9431 1.1 christos esac
9432 1.4 christos case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
9433 1.4 christos as_fn_append ac_file_inputs " '$ac_f'"
9434 1.1 christos done
9435 1.1 christos
9436 1.1 christos # Let's still pretend it is `configure' which instantiates (i.e., don't
9437 1.1 christos # use $as_me), people would be surprised to read:
9438 1.1 christos # /* config.h. Generated by config.status. */
9439 1.4 christos configure_input='Generated from '`
9440 1.4 christos $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
9441 1.4 christos `' by configure.'
9442 1.1 christos if test x"$ac_file" != x-; then
9443 1.1 christos configure_input="$ac_file. $configure_input"
9444 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
9445 1.4 christos $as_echo "$as_me: creating $ac_file" >&6;}
9446 1.1 christos fi
9447 1.4 christos # Neutralize special characters interpreted by sed in replacement strings.
9448 1.4 christos case $configure_input in #(
9449 1.4 christos *\&* | *\|* | *\\* )
9450 1.4 christos ac_sed_conf_input=`$as_echo "$configure_input" |
9451 1.4 christos sed 's/[\\\\&|]/\\\\&/g'`;; #(
9452 1.4 christos *) ac_sed_conf_input=$configure_input;;
9453 1.4 christos esac
9454 1.1 christos
9455 1.1 christos case $ac_tag in
9456 1.4 christos *:-:* | *:-) cat >"$ac_tmp/stdin" \
9457 1.4 christos || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
9458 1.1 christos esac
9459 1.1 christos ;;
9460 1.1 christos esac
9461 1.1 christos
9462 1.1 christos ac_dir=`$as_dirname -- "$ac_file" ||
9463 1.1 christos $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9464 1.1 christos X"$ac_file" : 'X\(//\)[^/]' \| \
9465 1.1 christos X"$ac_file" : 'X\(//\)$' \| \
9466 1.1 christos X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
9467 1.4 christos $as_echo X"$ac_file" |
9468 1.1 christos sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
9469 1.1 christos s//\1/
9470 1.1 christos q
9471 1.1 christos }
9472 1.1 christos /^X\(\/\/\)[^/].*/{
9473 1.1 christos s//\1/
9474 1.1 christos q
9475 1.1 christos }
9476 1.1 christos /^X\(\/\/\)$/{
9477 1.1 christos s//\1/
9478 1.1 christos q
9479 1.1 christos }
9480 1.1 christos /^X\(\/\).*/{
9481 1.1 christos s//\1/
9482 1.1 christos q
9483 1.1 christos }
9484 1.1 christos s/.*/./; q'`
9485 1.4 christos as_dir="$ac_dir"; as_fn_mkdir_p
9486 1.1 christos ac_builddir=.
9487 1.1 christos
9488 1.1 christos case "$ac_dir" in
9489 1.1 christos .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
9490 1.1 christos *)
9491 1.4 christos ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
9492 1.1 christos # A ".." for each directory in $ac_dir_suffix.
9493 1.4 christos ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
9494 1.1 christos case $ac_top_builddir_sub in
9495 1.1 christos "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
9496 1.1 christos *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
9497 1.1 christos esac ;;
9498 1.1 christos esac
9499 1.1 christos ac_abs_top_builddir=$ac_pwd
9500 1.1 christos ac_abs_builddir=$ac_pwd$ac_dir_suffix
9501 1.1 christos # for backward compatibility:
9502 1.1 christos ac_top_builddir=$ac_top_build_prefix
9503 1.1 christos
9504 1.1 christos case $srcdir in
9505 1.1 christos .) # We are building in place.
9506 1.1 christos ac_srcdir=.
9507 1.1 christos ac_top_srcdir=$ac_top_builddir_sub
9508 1.1 christos ac_abs_top_srcdir=$ac_pwd ;;
9509 1.1 christos [\\/]* | ?:[\\/]* ) # Absolute name.
9510 1.1 christos ac_srcdir=$srcdir$ac_dir_suffix;
9511 1.1 christos ac_top_srcdir=$srcdir
9512 1.1 christos ac_abs_top_srcdir=$srcdir ;;
9513 1.1 christos *) # Relative name.
9514 1.1 christos ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
9515 1.1 christos ac_top_srcdir=$ac_top_build_prefix$srcdir
9516 1.1 christos ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
9517 1.1 christos esac
9518 1.1 christos ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
9519 1.1 christos
9520 1.1 christos
9521 1.1 christos case $ac_mode in
9522 1.1 christos :F)
9523 1.1 christos #
9524 1.1 christos # CONFIG_FILE
9525 1.1 christos #
9526 1.1 christos
9527 1.1 christos case $INSTALL in
9528 1.1 christos [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
9529 1.1 christos *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
9530 1.1 christos esac
9531 1.1 christos _ACEOF
9532 1.1 christos
9533 1.4 christos cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9534 1.1 christos # If the template does not know about datarootdir, expand it.
9535 1.1 christos # FIXME: This hack should be removed a few years after 2.60.
9536 1.1 christos ac_datarootdir_hack=; ac_datarootdir_seen=
9537 1.4 christos ac_sed_dataroot='
9538 1.4 christos /datarootdir/ {
9539 1.1 christos p
9540 1.1 christos q
9541 1.1 christos }
9542 1.1 christos /@datadir@/p
9543 1.1 christos /@docdir@/p
9544 1.1 christos /@infodir@/p
9545 1.1 christos /@localedir@/p
9546 1.4 christos /@mandir@/p'
9547 1.4 christos case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
9548 1.1 christos *datarootdir*) ac_datarootdir_seen=yes;;
9549 1.1 christos *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
9550 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
9551 1.4 christos $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
9552 1.1 christos _ACEOF
9553 1.4 christos cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9554 1.1 christos ac_datarootdir_hack='
9555 1.1 christos s&@datadir@&$datadir&g
9556 1.1 christos s&@docdir@&$docdir&g
9557 1.1 christos s&@infodir@&$infodir&g
9558 1.1 christos s&@localedir@&$localedir&g
9559 1.1 christos s&@mandir@&$mandir&g
9560 1.4 christos s&\\\${datarootdir}&$datarootdir&g' ;;
9561 1.1 christos esac
9562 1.1 christos _ACEOF
9563 1.1 christos
9564 1.1 christos # Neutralize VPATH when `$srcdir' = `.'.
9565 1.1 christos # Shell code in configure.ac might set extrasub.
9566 1.1 christos # FIXME: do we really want to maintain this feature?
9567 1.4 christos cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9568 1.4 christos ac_sed_extra="$ac_vpsub
9569 1.1 christos $extrasub
9570 1.1 christos _ACEOF
9571 1.4 christos cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9572 1.1 christos :t
9573 1.1 christos /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
9574 1.4 christos s|@configure_input@|$ac_sed_conf_input|;t t
9575 1.1 christos s&@top_builddir@&$ac_top_builddir_sub&;t t
9576 1.4 christos s&@top_build_prefix@&$ac_top_build_prefix&;t t
9577 1.1 christos s&@srcdir@&$ac_srcdir&;t t
9578 1.1 christos s&@abs_srcdir@&$ac_abs_srcdir&;t t
9579 1.1 christos s&@top_srcdir@&$ac_top_srcdir&;t t
9580 1.1 christos s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
9581 1.1 christos s&@builddir@&$ac_builddir&;t t
9582 1.1 christos s&@abs_builddir@&$ac_abs_builddir&;t t
9583 1.1 christos s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
9584 1.1 christos s&@INSTALL@&$ac_INSTALL&;t t
9585 1.1 christos $ac_datarootdir_hack
9586 1.4 christos "
9587 1.4 christos eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
9588 1.4 christos >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
9589 1.1 christos
9590 1.1 christos test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
9591 1.4 christos { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
9592 1.4 christos { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
9593 1.4 christos "$ac_tmp/out"`; test -z "$ac_out"; } &&
9594 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
9595 1.4 christos which seems to be undefined. Please make sure it is defined" >&5
9596 1.4 christos $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
9597 1.4 christos which seems to be undefined. Please make sure it is defined" >&2;}
9598 1.1 christos
9599 1.4 christos rm -f "$ac_tmp/stdin"
9600 1.1 christos case $ac_file in
9601 1.4 christos -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
9602 1.4 christos *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
9603 1.4 christos esac \
9604 1.4 christos || as_fn_error $? "could not create $ac_file" "$LINENO" 5
9605 1.1 christos ;;
9606 1.1 christos :H)
9607 1.1 christos #
9608 1.1 christos # CONFIG_HEADER
9609 1.1 christos #
9610 1.1 christos if test x"$ac_file" != x-; then
9611 1.4 christos {
9612 1.4 christos $as_echo "/* $configure_input */" \
9613 1.4 christos && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
9614 1.4 christos } >"$ac_tmp/config.h" \
9615 1.4 christos || as_fn_error $? "could not create $ac_file" "$LINENO" 5
9616 1.4 christos if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
9617 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
9618 1.4 christos $as_echo "$as_me: $ac_file is unchanged" >&6;}
9619 1.1 christos else
9620 1.4 christos rm -f "$ac_file"
9621 1.4 christos mv "$ac_tmp/config.h" "$ac_file" \
9622 1.4 christos || as_fn_error $? "could not create $ac_file" "$LINENO" 5
9623 1.1 christos fi
9624 1.1 christos else
9625 1.4 christos $as_echo "/* $configure_input */" \
9626 1.4 christos && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
9627 1.4 christos || as_fn_error $? "could not create -" "$LINENO" 5
9628 1.1 christos fi
9629 1.1 christos ;;
9630 1.1 christos
9631 1.4 christos :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
9632 1.4 christos $as_echo "$as_me: executing $ac_file commands" >&6;}
9633 1.1 christos ;;
9634 1.1 christos esac
9635 1.1 christos
9636 1.1 christos
9637 1.1 christos case $ac_file$ac_mode in
9638 1.1 christos "default-1":C) if test -f .devel; then
9639 1.1 christos echo timestamp > stamp-h
9640 1.11 christos cat $srcdir/Makefile-devel-adds >> Makefile
9641 1.11 christos make depend || exit 1
9642 1.1 christos fi ;;
9643 1.1 christos
9644 1.1 christos esac
9645 1.1 christos done # for ac_tag
9646 1.1 christos
9647 1.1 christos
9648 1.4 christos as_fn_exit 0
9649 1.1 christos _ACEOF
9650 1.1 christos ac_clean_files=$ac_clean_files_save
9651 1.1 christos
9652 1.4 christos test $ac_write_fail = 0 ||
9653 1.4 christos as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
9654 1.4 christos
9655 1.1 christos
9656 1.1 christos # configure is writing to config.log, and then calls config.status.
9657 1.1 christos # config.status does its own redirection, appending to config.log.
9658 1.1 christos # Unfortunately, on DOS this fails, as config.log is still kept open
9659 1.1 christos # by configure, so config.status won't be able to write to it; its
9660 1.1 christos # output is simply discarded. So we exec the FD to /dev/null,
9661 1.1 christos # effectively closing config.log, so it can be properly (re)opened and
9662 1.1 christos # appended to by config.status. When coming back to configure, we
9663 1.1 christos # need to make the FD available again.
9664 1.1 christos if test "$no_create" != yes; then
9665 1.1 christos ac_cs_success=:
9666 1.1 christos ac_config_status_args=
9667 1.1 christos test "$silent" = yes &&
9668 1.1 christos ac_config_status_args="$ac_config_status_args --quiet"
9669 1.1 christos exec 5>/dev/null
9670 1.1 christos $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
9671 1.1 christos exec 5>>config.log
9672 1.1 christos # Use ||, not &&, to avoid exiting from the if with $? = 1, which
9673 1.1 christos # would make configure fail if this is the last instruction.
9674 1.4 christos $ac_cs_success || as_fn_exit 1
9675 1.4 christos fi
9676 1.4 christos if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
9677 1.4 christos { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
9678 1.4 christos $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
9679 1.1 christos fi
9680 1.1 christos
9681 1.1 christos exit 0
9682