nexmon – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for Wireshark 2.2.3.
4 #
5 # Report bugs to <http://bugs.wireshark.org/>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## -------------------- ##
14 ## M4sh Initialization. ##
15 ## -------------------- ##
16  
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20 emulate sh
21 NULLCMD=:
22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
25 setopt NO_GLOB_SUBST
26 else
27 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
32 esac
33 fi
34  
35  
36 as_nl='
37 '
38 export as_nl
39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43 # Prefer a ksh shell builtin over an external printf program on Solaris,
44 # but without wasting forks for bash or zsh.
45 if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52 else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72 fi
73  
74 # The user is always right.
75 if test "${PATH_SEPARATOR+set}" != set; then
76 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
81 fi
82  
83  
84 # IFS
85 # We need space, tab and new line, in precisely that order. Quoting is
86 # there to prevent editors from complaining about space-tab.
87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
88 # splitting by setting IFS to empty value.)
89 IFS=" "" $as_nl"
90  
91 # Find who we are. Look in the path if we contain no directory separator.
92 as_myself=
93 case $0 in #((
94 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96 for as_dir in $PATH
97 do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
102 IFS=$as_save_IFS
103  
104 ;;
105 esac
106 # We did not find ourselves, most probably we were run as `sh COMMAND'
107 # in which case we are not to be found in the path.
108 if test "x$as_myself" = x; then
109 as_myself=$0
110 fi
111 if test ! -f "$as_myself"; then
112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
114 fi
115  
116 # Unset variables that we do not need and which cause bugs (e.g. in
117 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118 # suppresses any "Segmentation fault" message there. '((' could
119 # trigger a bug in pdksh 5.2.14.
120 for as_var in BASH_ENV ENV MAIL MAILPATH
121 do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123 done
124 PS1='$ '
125 PS2='> '
126 PS4='+ '
127  
128 # NLS nuisances.
129 LC_ALL=C
130 export LC_ALL
131 LANGUAGE=C
132 export LANGUAGE
133  
134 # CDPATH.
135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136  
137 # Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142 # neutralization value for shells without unset; and this also
143 # works around shells that cannot unset nonexistent variables.
144 # Preserve -v and -x to the replacement shell.
145 BASH_ENV=/dev/null
146 ENV=/dev/null
147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148 case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153 esac
154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155 # Admittedly, this is quite paranoid, since all the known shells bail
156 # out after a failed `exec'.
157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158 as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
162 if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170 else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176 esac
177 fi
178 "
179 as_required="as_fn_return () { (exit \$1); }
180 as_fn_success () { as_fn_return 0; }
181 as_fn_failure () { as_fn_return 1; }
182 as_fn_ret_success () { return 0; }
183 as_fn_ret_failure () { return 1; }
184  
185 exitcode=0
186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191  
192 else
193 exitcode=1; echo positional parameters were not saved.
194 fi
195 test x\$exitcode = x0 || exit 1
196 test -x / || exit 1"
197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201  
202 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
203 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
204 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
205 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
206 PATH=/empty FPATH=/empty; export PATH FPATH
207 test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
208 || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
209 test \$(( 1 + 1 )) = 2 || exit 1"
210 if (eval "$as_required") 2>/dev/null; then :
211 as_have_required=yes
212 else
213 as_have_required=no
214 fi
215 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
216  
217 else
218 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
219 as_found=false
220 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
221 do
222 IFS=$as_save_IFS
223 test -z "$as_dir" && as_dir=.
224 as_found=:
225 case $as_dir in #(
226 /*)
227 for as_base in sh bash ksh sh5; do
228 # Try only shells that exist, to save several forks.
229 as_shell=$as_dir/$as_base
230 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
231 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
232 CONFIG_SHELL=$as_shell as_have_required=yes
233 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
234 break 2
235 fi
236 fi
237 done;;
238 esac
239 as_found=false
240 done
241 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
242 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
243 CONFIG_SHELL=$SHELL as_have_required=yes
244 fi; }
245 IFS=$as_save_IFS
246  
247  
248 if test "x$CONFIG_SHELL" != x; then :
249 export CONFIG_SHELL
250 # We cannot yet assume a decent shell, so we have to provide a
251 # neutralization value for shells without unset; and this also
252 # works around shells that cannot unset nonexistent variables.
253 # Preserve -v and -x to the replacement shell.
254 BASH_ENV=/dev/null
255 ENV=/dev/null
256 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
257 case $- in # ((((
258 *v*x* | *x*v* ) as_opts=-vx ;;
259 *v* ) as_opts=-v ;;
260 *x* ) as_opts=-x ;;
261 * ) as_opts= ;;
262 esac
263 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
264 # Admittedly, this is quite paranoid, since all the known shells bail
265 # out after a failed `exec'.
266 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
267 exit 255
268 fi
269  
270 if test x$as_have_required = xno; then :
271 $as_echo "$0: This script requires a shell more modern than all"
272 $as_echo "$0: the shells that I found on your system."
273 if test x${ZSH_VERSION+set} = xset ; then
274 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
275 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
276 else
277 $as_echo "$0: Please tell bug-autoconf@gnu.org and
278 $0: http://bugs.wireshark.org/ about your system, including
279 $0: any error possibly output before this message. Then
280 $0: install a modern shell, or manually run the script
281 $0: under such a shell if you do have one."
282 fi
283 exit 1
284 fi
285 fi
286 fi
287 SHELL=${CONFIG_SHELL-/bin/sh}
288 export SHELL
289 # Unset more variables known to interfere with behavior of common tools.
290 CLICOLOR_FORCE= GREP_OPTIONS=
291 unset CLICOLOR_FORCE GREP_OPTIONS
292  
293 ## --------------------- ##
294 ## M4sh Shell Functions. ##
295 ## --------------------- ##
296 # as_fn_unset VAR
297 # ---------------
298 # Portably unset VAR.
299 as_fn_unset ()
300 {
301 { eval $1=; unset $1;}
302 }
303 as_unset=as_fn_unset
304  
305 # as_fn_set_status STATUS
306 # -----------------------
307 # Set $? to STATUS, without forking.
308 as_fn_set_status ()
309 {
310 return $1
311 } # as_fn_set_status
312  
313 # as_fn_exit STATUS
314 # -----------------
315 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
316 as_fn_exit ()
317 {
318 set +e
319 as_fn_set_status $1
320 exit $1
321 } # as_fn_exit
322  
323 # as_fn_mkdir_p
324 # -------------
325 # Create "$as_dir" as a directory, including parents if necessary.
326 as_fn_mkdir_p ()
327 {
328  
329 case $as_dir in #(
330 -*) as_dir=./$as_dir;;
331 esac
332 test -d "$as_dir" || eval $as_mkdir_p || {
333 as_dirs=
334 while :; do
335 case $as_dir in #(
336 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
337 *) as_qdir=$as_dir;;
338 esac
339 as_dirs="'$as_qdir' $as_dirs"
340 as_dir=`$as_dirname -- "$as_dir" ||
341 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
342 X"$as_dir" : 'X\(//\)[^/]' \| \
343 X"$as_dir" : 'X\(//\)$' \| \
344 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
345 $as_echo X"$as_dir" |
346 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\/\)[^/].*/{
351 s//\1/
352 q
353 }
354 /^X\(\/\/\)$/{
355 s//\1/
356 q
357 }
358 /^X\(\/\).*/{
359 s//\1/
360 q
361 }
362 s/.*/./; q'`
363 test -d "$as_dir" && break
364 done
365 test -z "$as_dirs" || eval "mkdir $as_dirs"
366 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
367  
368  
369 } # as_fn_mkdir_p
370  
371 # as_fn_executable_p FILE
372 # -----------------------
373 # Test if FILE is an executable regular file.
374 as_fn_executable_p ()
375 {
376 test -f "$1" && test -x "$1"
377 } # as_fn_executable_p
378 # as_fn_append VAR VALUE
379 # ----------------------
380 # Append the text in VALUE to the end of the definition contained in VAR. Take
381 # advantage of any shell optimizations that allow amortized linear growth over
382 # repeated appends, instead of the typical quadratic growth present in naive
383 # implementations.
384 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
385 eval 'as_fn_append ()
386 {
387 eval $1+=\$2
388 }'
389 else
390 as_fn_append ()
391 {
392 eval $1=\$$1\$2
393 }
394 fi # as_fn_append
395  
396 # as_fn_arith ARG...
397 # ------------------
398 # Perform arithmetic evaluation on the ARGs, and store the result in the
399 # global $as_val. Take advantage of shells that can avoid forks. The arguments
400 # must be portable across $(()) and expr.
401 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
402 eval 'as_fn_arith ()
403 {
404 as_val=$(( $* ))
405 }'
406 else
407 as_fn_arith ()
408 {
409 as_val=`expr "$@" || test $? -eq 1`
410 }
411 fi # as_fn_arith
412  
413  
414 # as_fn_error STATUS ERROR [LINENO LOG_FD]
415 # ----------------------------------------
416 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
417 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
418 # script with STATUS, using 1 if that was 0.
419 as_fn_error ()
420 {
421 as_status=$1; test $as_status -eq 0 && as_status=1
422 if test "$4"; then
423 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
424 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
425 fi
426 $as_echo "$as_me: error: $2" >&2
427 as_fn_exit $as_status
428 } # as_fn_error
429  
430 if expr a : '\(a\)' >/dev/null 2>&1 &&
431 test "X`expr 00001 : '.*\(...\)'`" = X001; then
432 as_expr=expr
433 else
434 as_expr=false
435 fi
436  
437 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
438 as_basename=basename
439 else
440 as_basename=false
441 fi
442  
443 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
444 as_dirname=dirname
445 else
446 as_dirname=false
447 fi
448  
449 as_me=`$as_basename -- "$0" ||
450 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
451 X"$0" : 'X\(//\)$' \| \
452 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
453 $as_echo X/"$0" |
454 sed '/^.*\/\([^/][^/]*\)\/*$/{
455 s//\1/
456 q
457 }
458 /^X\/\(\/\/\)$/{
459 s//\1/
460 q
461 }
462 /^X\/\(\/\).*/{
463 s//\1/
464 q
465 }
466 s/.*/./; q'`
467  
468 # Avoid depending upon Character Ranges.
469 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
470 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
471 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
472 as_cr_digits='0123456789'
473 as_cr_alnum=$as_cr_Letters$as_cr_digits
474  
475  
476 as_lineno_1=$LINENO as_lineno_1a=$LINENO
477 as_lineno_2=$LINENO as_lineno_2a=$LINENO
478 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
479 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
480 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
481 sed -n '
482 p
483 /[$]LINENO/=
484 ' <$as_myself |
485 sed '
486 s/[$]LINENO.*/&-/
487 t lineno
488 b
489 :lineno
490 N
491 :loop
492 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
493 t loop
494 s/-\n.*//
495 ' >$as_me.lineno &&
496 chmod +x "$as_me.lineno" ||
497 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
498  
499 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
500 # already done that, so ensure we don't try to do so again and fall
501 # in an infinite loop. This has already happened in practice.
502 _as_can_reexec=no; export _as_can_reexec
503 # Don't try to exec as it changes $[0], causing all sort of problems
504 # (the dirname of $[0] is not the place where we might find the
505 # original and so on. Autoconf is especially sensitive to this).
506 . "./$as_me.lineno"
507 # Exit status is that of the last command.
508 exit
509 }
510  
511 ECHO_C= ECHO_N= ECHO_T=
512 case `echo -n x` in #(((((
513 -n*)
514 case `echo 'xy\c'` in
515 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
516 xy) ECHO_C='\c';;
517 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
518 ECHO_T=' ';;
519 esac;;
520 *)
521 ECHO_N='-n';;
522 esac
523  
524 rm -f conf$$ conf$$.exe conf$$.file
525 if test -d conf$$.dir; then
526 rm -f conf$$.dir/conf$$.file
527 else
528 rm -f conf$$.dir
529 mkdir conf$$.dir 2>/dev/null
530 fi
531 if (echo >conf$$.file) 2>/dev/null; then
532 if ln -s conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s='ln -s'
534 # ... but there are two gotchas:
535 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
536 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
537 # In both cases, we have to default to `cp -pR'.
538 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
539 as_ln_s='cp -pR'
540 elif ln conf$$.file conf$$ 2>/dev/null; then
541 as_ln_s=ln
542 else
543 as_ln_s='cp -pR'
544 fi
545 else
546 as_ln_s='cp -pR'
547 fi
548 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
549 rmdir conf$$.dir 2>/dev/null
550  
551 if mkdir -p . 2>/dev/null; then
552 as_mkdir_p='mkdir -p "$as_dir"'
553 else
554 test -d ./-p && rmdir ./-p
555 as_mkdir_p=false
556 fi
557  
558 as_test_x='test -x'
559 as_executable_p=as_fn_executable_p
560  
561 # Sed expression to map a string onto a valid CPP name.
562 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
563  
564 # Sed expression to map a string onto a valid variable name.
565 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
566  
567 SHELL=${CONFIG_SHELL-/bin/sh}
568  
569  
570 test -n "$DJDIR" || exec 7<&0 </dev/null
571 exec 6>&1
572  
573 # Name of the host.
574 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
575 # so uname gets run too.
576 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
577  
578 #
579 # Initializations.
580 #
581 ac_default_prefix=/usr/local
582 ac_clean_files=
583 ac_config_libobj_dir=.
584 LIBOBJS=
585 cross_compiling=no
586 subdirs=
587 MFLAGS=
588 MAKEFLAGS=
589  
590 # Identity of this package.
591 PACKAGE_NAME='Wireshark'
592 PACKAGE_TARNAME='wireshark'
593 PACKAGE_VERSION='2.2.3'
594 PACKAGE_STRING='Wireshark 2.2.3'
595 PACKAGE_BUGREPORT='http://bugs.wireshark.org/'
596 PACKAGE_URL='http://www.wireshark.org/'
597  
598 # Factoring default headers for most tests.
599 ac_includes_default="\
600 #include <stdio.h>
601 #ifdef HAVE_SYS_TYPES_H
602 # include <sys/types.h>
603 #endif
604 #ifdef HAVE_SYS_STAT_H
605 # include <sys/stat.h>
606 #endif
607 #ifdef STDC_HEADERS
608 # include <stdlib.h>
609 # include <stddef.h>
610 #else
611 # ifdef HAVE_STDLIB_H
612 # include <stdlib.h>
613 # endif
614 #endif
615 #ifdef HAVE_STRING_H
616 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
617 # include <memory.h>
618 # endif
619 # include <string.h>
620 #endif
621 #ifdef HAVE_STRINGS_H
622 # include <strings.h>
623 #endif
624 #ifdef HAVE_INTTYPES_H
625 # include <inttypes.h>
626 #endif
627 #ifdef HAVE_STDINT_H
628 # include <stdint.h>
629 #endif
630 #ifdef HAVE_UNISTD_H
631 # include <unistd.h>
632 #endif"
633  
634 ac_config_libobj_dir=wsutil
635 ac_subst_vars='am__EXEEXT_FALSE
636 am__EXEEXT_TRUE
637 LTLIBOBJS
638 WS_CFLAGS_FOR_BUILD
639 WS_LDFLAGS
640 WS_CXXFLAGS
641 WS_CFLAGS
642 WS_CPPFLAGS
643 RPM_VERSION
644 RPMBUILD_WITH_ARGS
645 ENABLE_STATIC
646 ENABLE_STATIC_FALSE
647 ENABLE_STATIC_TRUE
648 randpktdump_man
649 randpktdump_bin
650 ciscodump_man
651 ciscodump_bin
652 sshdump_man
653 sshdump_bin
654 androiddump_man
655 androiddump_bin
656 extcapdir
657 extcap_man
658 extcap_subdir
659 HAVE_EXTCAP_FALSE
660 HAVE_EXTCAP_TRUE
661 PLUGIN_LIBS
662 plugindir
663 HAVE_PLUGINS_FALSE
664 HAVE_PLUGINS_TRUE
665 HAVE_SBC_FALSE
666 HAVE_SBC_TRUE
667 SBC_LIBS
668 SBC_CFLAGS
669 HAVE_SPEEXDSP_FALSE
670 HAVE_SPEEXDSP_TRUE
671 SPEEXDSP_LIBS
672 SPEEXDSP_CFLAGS
673 LIBOBJS
674 LIBSSH_LIBS
675 GEOIP_LIBS
676 C_ARES_LIBS
677 KRB5_LIBS
678 KRB5_CFLAGS
679 KRB5_CONFIG
680 SSL_LIBS
681 LIBCAP_LIBS
682 HAVE_DUMPCAP_GROUP_FALSE
683 HAVE_DUMPCAP_GROUP_TRUE
684 DUMPCAP_GROUP
685 SETUID_INSTALL_FALSE
686 SETUID_INSTALL_TRUE
687 SETCAP_INSTALL_FALSE
688 SETCAP_INSTALL_TRUE
689 SETCAP
690 HAVE_LIBPORTAUDIO_FALSE
691 HAVE_LIBPORTAUDIO_TRUE
692 PORTAUDIO_INCLUDES
693 PORTAUDIO_LIBS
694 HAVE_LIBLUA_FALSE
695 HAVE_LIBLUA_TRUE
696 LUA_LIBS
697 LUA_CFLAGS
698 tfshark_man
699 tfshark_bin
700 echld_dir
701 echld_test_bin
702 HAVE_ECHLD_FALSE
703 HAVE_ECHLD_TRUE
704 rawshark_man
705 rawshark_bin
706 dumpcap_man
707 dumpcap_bin
708 PCAP_LIBS
709 PCAP_CONFIG
710 wiresharkfilter_man
711 randpkt_man
712 randpkt_bin
713 dftest_man
714 dftest_bin
715 text2pcap_man
716 text2pcap_bin
717 reordercap_man
718 reordercap_bin
719 mergecap_man
720 mergecap_bin
721 captype_man
722 captype_bin
723 capinfos_man
724 capinfos_bin
725 editcap_man
726 editcap_bin
727 tshark_man
728 tshark_bin
729 OSX_DMG_FLAGS
730 OSX_APP_FLAGS
731 HAVE_GTK_FALSE
732 HAVE_GTK_TRUE
733 HAVE_Qt_FALSE
734 HAVE_Qt_TRUE
735 wireshark_SUBDIRS
736 wireshark_man
737 wireshark_bin
738 plugins_dir
739 HAVE_GRESOURCE_PIXBUF_FALSE
740 HAVE_GRESOURCE_PIXBUF_TRUE
741 GUI_CONFIGURE_FLAGS
742 GTK_LIBS
743 GTK_CFLAGS
744 MOC_OPTIONS
745 Qt_LDFLAGS
746 LRELEASE
747 RCC
748 MOC
749 UIC
750 QTCHOOSER
751 Qt_LIBS
752 Qt_CFLAGS
753 QT_MIN_VERSION
754 GTK3_MIN_VERSION
755 GTK2_MIN_VERSION
756 GLIB_LIBS
757 GLIB_CFLAGS
758 GLIB_MIN_VERSION
759 USE_PROFILE_BUILD_FALSE
760 USE_PROFILE_BUILD_TRUE
761 BUILDING_WIRESHARK_FALSE
762 BUILDING_WIRESHARK_TRUE
763 HAVE_OS_X_FRAMEWORKS_FALSE
764 HAVE_OS_X_FRAMEWORKS_TRUE
765 COREFOUNDATION_FRAMEWORKS
766 SYSTEMCONFIGURATION_FRAMEWORKS
767 APPLICATIONSERVICES_FRAMEWORKS
768 LDFLAGS_SHAREDLIB
769 HAVE_WARNINGS_AS_ERRORS_FALSE
770 HAVE_WARNINGS_AS_ERRORS_TRUE
771 WERROR
772 CFLAGS_SSE42
773 SSE42_SUPPORTED_FALSE
774 SSE42_SUPPORTED_TRUE
775 PIE_LDFLAGS
776 PIE_CFLAGS
777 NOT_OS_X_FALSE
778 NOT_OS_X_TRUE
779 have_sw_vers
780 HAVE_OSX_PACKAGING
781 HAVE_BLESS
782 HAVE_HDIUTIL
783 HAVE_XCODEBUILD
784 HAVE_DPKG_BUILDPACKAGE
785 HAVE_RPM_FALSE
786 HAVE_RPM_TRUE
787 RPMBUILD
788 HAVE_SVR4_PACKAGING
789 HAVE_PKGTRANS
790 HAVE_PKGMK
791 HAVE_PKGPROTO
792 DESKTOP_FILE_INSTALL
793 A2X_LYNX
794 HAVE_A2X_TEXT_FALSE
795 HAVE_A2X_TEXT_TRUE
796 FOP
797 A2X
798 XSLTPROC
799 LIBSMI_VERSION
800 LIBSMI_LDFLAGS
801 LIBSMI_CFLAGS
802 LIBNL_LIBS
803 LIBNL_CFLAGS
804 LIBGCRYPT_LIBS
805 LIBGCRYPT_CFLAGS
806 LIBGCRYPT_CONFIG
807 LIBGNUTLS_LIBS
808 LIBGNUTLS_CFLAGS
809 OSX_MIN_VERSION
810 PKG_CONFIG_LIBDIR
811 PKG_CONFIG_PATH
812 PKG_CONFIG
813 HAVE_DOXYGEN_FALSE
814 HAVE_DOXYGEN_TRUE
815 HAVE_DOXYGEN
816 DOXYGEN
817 POD2HTML
818 POD2MAN
819 LEXLIB
820 LEX_OUTPUT_ROOT
821 LEX
822 YFLAGS
823 YACC
824 PYTHON
825 PERL
826 LDFLAGS_FOR_BUILD
827 CPPFLAGS_FOR_BUILD
828 CFLAGS_FOR_BUILD
829 BUILD_OBJEXT
830 BUILD_EXEEXT
831 CPP_FOR_BUILD
832 ac_ct_CC_FOR_BUILD
833 CC_FOR_BUILD
834 HAVE_CXX11
835 CXXCPP
836 am__fastdepCXX_FALSE
837 am__fastdepCXX_TRUE
838 CXXDEPMODE
839 ac_ct_CXX
840 CXXFLAGS
841 CXX
842 LIBTOOL_DEPS
843 CPP
844 LT_SYS_LIBRARY_PATH
845 OTOOL64
846 OTOOL
847 LIPO
848 NMEDIT
849 DSYMUTIL
850 MANIFEST_TOOL
851 RANLIB
852 ac_ct_AR
853 AR
854 DLLTOOL
855 OBJDUMP
856 LN_S
857 NM
858 ac_ct_DUMPBIN
859 DUMPBIN
860 LD
861 FGREP
862 EGREP
863 GREP
864 SED
865 am__fastdepCC_FALSE
866 am__fastdepCC_TRUE
867 CCDEPMODE
868 am__nodep
869 AMDEPBACKSLASH
870 AMDEP_FALSE
871 AMDEP_TRUE
872 am__quote
873 am__include
874 DEPDIR
875 OBJEXT
876 EXEEXT
877 ac_ct_CC
878 CPPFLAGS
879 LDFLAGS
880 CFLAGS
881 CC
882 LIBTOOL
883 AM_BACKSLASH
884 AM_DEFAULT_VERBOSITY
885 AM_DEFAULT_V
886 AM_V
887 am__untar
888 am__tar
889 AMTAR
890 am__leading_dot
891 SET_MAKE
892 AWK
893 mkdir_p
894 MKDIR_P
895 INSTALL_STRIP_PROGRAM
896 STRIP
897 install_sh
898 MAKEINFO
899 AUTOHEADER
900 AUTOMAKE
901 AUTOCONF
902 ACLOCAL
903 VERSION
904 PACKAGE
905 CYGPATH_W
906 am__isrc
907 INSTALL_DATA
908 INSTALL_SCRIPT
909 INSTALL_PROGRAM
910 target_os
911 target_vendor
912 target_cpu
913 target
914 host_os
915 host_vendor
916 host_cpu
917 host
918 build_os
919 build_vendor
920 build_cpu
921 build
922 AC_MIN_VERSION
923 CONFIG_ARGS
924 target_alias
925 host_alias
926 build_alias
927 LIBS
928 ECHO_T
929 ECHO_N
930 ECHO_C
931 DEFS
932 mandir
933 localedir
934 libdir
935 psdir
936 pdfdir
937 dvidir
938 htmldir
939 infodir
940 docdir
941 oldincludedir
942 includedir
943 runstatedir
944 localstatedir
945 sharedstatedir
946 sysconfdir
947 datadir
948 datarootdir
949 libexecdir
950 sbindir
951 bindir
952 program_transform_name
953 prefix
954 exec_prefix
955 PACKAGE_URL
956 PACKAGE_BUGREPORT
957 PACKAGE_STRING
958 PACKAGE_VERSION
959 PACKAGE_TARNAME
960 PACKAGE_NAME
961 PATH_SEPARATOR
962 SHELL'
963 ac_subst_files=''
964 ac_user_opts='
965 enable_option_checking
966 enable_silent_rules
967 enable_static
968 enable_shared
969 with_pic
970 enable_fast_install
971 with_aix_soname
972 enable_dependency_tracking
973 with_gnu_ld
974 with_sysroot
975 enable_libtool_lock
976 enable_osx_deploy_target
977 enable_largefile
978 with_qt
979 with_gtk
980 with_gnutls
981 with_gcrypt
982 with_libgcrypt_prefix
983 with_libnl
984 with_libsmi
985 enable_extra_compiler_warnings
986 enable_asan
987 enable_checkhf_conflict
988 enable_warnings_as_errors
989 enable_wireshark
990 enable_packet_editor
991 enable_profile_build
992 with_osx_integration
993 enable_tshark
994 enable_editcap
995 enable_capinfos
996 enable_captype
997 enable_mergecap
998 enable_reordercap
999 enable_text2pcap
1000 enable_dftest
1001 enable_randpkt
1002 with_pcap
1003 enable_dumpcap
1004 enable_rawshark
1005 enable_echld
1006 enable_tfshark
1007 enable_pcap_ng_default
1008 with_pcap_remote
1009 with_zlib
1010 with_lua
1011 with_portaudio
1012 enable_setcap_install
1013 enable_setuid_install
1014 with_dumpcap_group
1015 with_libcap
1016 with_ssl
1017 with_krb5
1018 with_c_ares
1019 with_geoip
1020 with_ssh
1021 with_sbc
1022 with_plugins
1023 with_extcap
1024 enable_androiddump
1025 enable_androiddump_use_libpcap
1026 enable_sshdump
1027 enable_ciscodump
1028 enable_randpktdump
1029 '
1030 ac_precious_vars='build_alias
1031 host_alias
1032 target_alias
1033 CC
1034 CFLAGS
1035 LDFLAGS
1036 LIBS
1037 CPPFLAGS
1038 LT_SYS_LIBRARY_PATH
1039 CPP
1040 CXX
1041 CXXFLAGS
1042 CCC
1043 CXXCPP
1044 YACC
1045 YFLAGS
1046 PKG_CONFIG
1047 PKG_CONFIG_PATH
1048 PKG_CONFIG_LIBDIR
1049 LIBGNUTLS_CFLAGS
1050 LIBGNUTLS_LIBS
1051 LIBNL_CFLAGS
1052 LIBNL_LIBS
1053 GLIB_CFLAGS
1054 GLIB_LIBS
1055 GTK_CFLAGS
1056 GTK_LIBS
1057 LUA_CFLAGS
1058 LUA_LIBS
1059 SPEEXDSP_CFLAGS
1060 SPEEXDSP_LIBS
1061 SBC_CFLAGS
1062 SBC_LIBS'
1063  
1064  
1065 # Initialize some variables set by options.
1066 ac_init_help=
1067 ac_init_version=false
1068 ac_unrecognized_opts=
1069 ac_unrecognized_sep=
1070 # The variables have the same names as the options, with
1071 # dashes changed to underlines.
1072 cache_file=/dev/null
1073 exec_prefix=NONE
1074 no_create=
1075 no_recursion=
1076 prefix=NONE
1077 program_prefix=NONE
1078 program_suffix=NONE
1079 program_transform_name=s,x,x,
1080 silent=
1081 site=
1082 srcdir=
1083 verbose=
1084 x_includes=NONE
1085 x_libraries=NONE
1086  
1087 # Installation directory options.
1088 # These are left unexpanded so users can "make install exec_prefix=/foo"
1089 # and all the variables that are supposed to be based on exec_prefix
1090 # by default will actually change.
1091 # Use braces instead of parens because sh, perl, etc. also accept them.
1092 # (The list follows the same order as the GNU Coding Standards.)
1093 bindir='${exec_prefix}/bin'
1094 sbindir='${exec_prefix}/sbin'
1095 libexecdir='${exec_prefix}/libexec'
1096 datarootdir='${prefix}/share'
1097 datadir='${datarootdir}'
1098 sysconfdir='${prefix}/etc'
1099 sharedstatedir='${prefix}/com'
1100 localstatedir='${prefix}/var'
1101 runstatedir='${localstatedir}/run'
1102 includedir='${prefix}/include'
1103 oldincludedir='/usr/include'
1104 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1105 infodir='${datarootdir}/info'
1106 htmldir='${docdir}'
1107 dvidir='${docdir}'
1108 pdfdir='${docdir}'
1109 psdir='${docdir}'
1110 libdir='${exec_prefix}/lib'
1111 localedir='${datarootdir}/locale'
1112 mandir='${datarootdir}/man'
1113  
1114 ac_prev=
1115 ac_dashdash=
1116 for ac_option
1117 do
1118 # If the previous option needs an argument, assign it.
1119 if test -n "$ac_prev"; then
1120 eval $ac_prev=\$ac_option
1121 ac_prev=
1122 continue
1123 fi
1124  
1125 case $ac_option in
1126 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1127 *=) ac_optarg= ;;
1128 *) ac_optarg=yes ;;
1129 esac
1130  
1131 # Accept the important Cygnus configure options, so we can diagnose typos.
1132  
1133 case $ac_dashdash$ac_option in
1134 --)
1135 ac_dashdash=yes ;;
1136  
1137 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1138 ac_prev=bindir ;;
1139 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1140 bindir=$ac_optarg ;;
1141  
1142 -build | --build | --buil | --bui | --bu)
1143 ac_prev=build_alias ;;
1144 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1145 build_alias=$ac_optarg ;;
1146  
1147 -cache-file | --cache-file | --cache-fil | --cache-fi \
1148 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1149 ac_prev=cache_file ;;
1150 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1151 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1152 cache_file=$ac_optarg ;;
1153  
1154 --config-cache | -C)
1155 cache_file=config.cache ;;
1156  
1157 -datadir | --datadir | --datadi | --datad)
1158 ac_prev=datadir ;;
1159 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1160 datadir=$ac_optarg ;;
1161  
1162 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1163 | --dataroo | --dataro | --datar)
1164 ac_prev=datarootdir ;;
1165 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1166 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1167 datarootdir=$ac_optarg ;;
1168  
1169 -disable-* | --disable-*)
1170 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1171 # Reject names that are not valid shell variable names.
1172 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1173 as_fn_error $? "invalid feature name: $ac_useropt"
1174 ac_useropt_orig=$ac_useropt
1175 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1176 case $ac_user_opts in
1177 *"
1178 "enable_$ac_useropt"
1179 "*) ;;
1180 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1181 ac_unrecognized_sep=', ';;
1182 esac
1183 eval enable_$ac_useropt=no ;;
1184  
1185 -docdir | --docdir | --docdi | --doc | --do)
1186 ac_prev=docdir ;;
1187 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1188 docdir=$ac_optarg ;;
1189  
1190 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1191 ac_prev=dvidir ;;
1192 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1193 dvidir=$ac_optarg ;;
1194  
1195 -enable-* | --enable-*)
1196 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1197 # Reject names that are not valid shell variable names.
1198 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1199 as_fn_error $? "invalid feature name: $ac_useropt"
1200 ac_useropt_orig=$ac_useropt
1201 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202 case $ac_user_opts in
1203 *"
1204 "enable_$ac_useropt"
1205 "*) ;;
1206 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1207 ac_unrecognized_sep=', ';;
1208 esac
1209 eval enable_$ac_useropt=\$ac_optarg ;;
1210  
1211 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1212 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1213 | --exec | --exe | --ex)
1214 ac_prev=exec_prefix ;;
1215 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1216 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1217 | --exec=* | --exe=* | --ex=*)
1218 exec_prefix=$ac_optarg ;;
1219  
1220 -gas | --gas | --ga | --g)
1221 # Obsolete; use --with-gas.
1222 with_gas=yes ;;
1223  
1224 -help | --help | --hel | --he | -h)
1225 ac_init_help=long ;;
1226 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1227 ac_init_help=recursive ;;
1228 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1229 ac_init_help=short ;;
1230  
1231 -host | --host | --hos | --ho)
1232 ac_prev=host_alias ;;
1233 -host=* | --host=* | --hos=* | --ho=*)
1234 host_alias=$ac_optarg ;;
1235  
1236 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1237 ac_prev=htmldir ;;
1238 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1239 | --ht=*)
1240 htmldir=$ac_optarg ;;
1241  
1242 -includedir | --includedir | --includedi | --included | --include \
1243 | --includ | --inclu | --incl | --inc)
1244 ac_prev=includedir ;;
1245 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1246 | --includ=* | --inclu=* | --incl=* | --inc=*)
1247 includedir=$ac_optarg ;;
1248  
1249 -infodir | --infodir | --infodi | --infod | --info | --inf)
1250 ac_prev=infodir ;;
1251 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1252 infodir=$ac_optarg ;;
1253  
1254 -libdir | --libdir | --libdi | --libd)
1255 ac_prev=libdir ;;
1256 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1257 libdir=$ac_optarg ;;
1258  
1259 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1260 | --libexe | --libex | --libe)
1261 ac_prev=libexecdir ;;
1262 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1263 | --libexe=* | --libex=* | --libe=*)
1264 libexecdir=$ac_optarg ;;
1265  
1266 -localedir | --localedir | --localedi | --localed | --locale)
1267 ac_prev=localedir ;;
1268 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1269 localedir=$ac_optarg ;;
1270  
1271 -localstatedir | --localstatedir | --localstatedi | --localstated \
1272 | --localstate | --localstat | --localsta | --localst | --locals)
1273 ac_prev=localstatedir ;;
1274 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1275 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1276 localstatedir=$ac_optarg ;;
1277  
1278 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1279 ac_prev=mandir ;;
1280 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1281 mandir=$ac_optarg ;;
1282  
1283 -nfp | --nfp | --nf)
1284 # Obsolete; use --without-fp.
1285 with_fp=no ;;
1286  
1287 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1288 | --no-cr | --no-c | -n)
1289 no_create=yes ;;
1290  
1291 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1292 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1293 no_recursion=yes ;;
1294  
1295 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1296 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1297 | --oldin | --oldi | --old | --ol | --o)
1298 ac_prev=oldincludedir ;;
1299 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1300 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1301 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1302 oldincludedir=$ac_optarg ;;
1303  
1304 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1305 ac_prev=prefix ;;
1306 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1307 prefix=$ac_optarg ;;
1308  
1309 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1310 | --program-pre | --program-pr | --program-p)
1311 ac_prev=program_prefix ;;
1312 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1313 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1314 program_prefix=$ac_optarg ;;
1315  
1316 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1317 | --program-suf | --program-su | --program-s)
1318 ac_prev=program_suffix ;;
1319 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1320 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1321 program_suffix=$ac_optarg ;;
1322  
1323 -program-transform-name | --program-transform-name \
1324 | --program-transform-nam | --program-transform-na \
1325 | --program-transform-n | --program-transform- \
1326 | --program-transform | --program-transfor \
1327 | --program-transfo | --program-transf \
1328 | --program-trans | --program-tran \
1329 | --progr-tra | --program-tr | --program-t)
1330 ac_prev=program_transform_name ;;
1331 -program-transform-name=* | --program-transform-name=* \
1332 | --program-transform-nam=* | --program-transform-na=* \
1333 | --program-transform-n=* | --program-transform-=* \
1334 | --program-transform=* | --program-transfor=* \
1335 | --program-transfo=* | --program-transf=* \
1336 | --program-trans=* | --program-tran=* \
1337 | --progr-tra=* | --program-tr=* | --program-t=*)
1338 program_transform_name=$ac_optarg ;;
1339  
1340 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1341 ac_prev=pdfdir ;;
1342 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1343 pdfdir=$ac_optarg ;;
1344  
1345 -psdir | --psdir | --psdi | --psd | --ps)
1346 ac_prev=psdir ;;
1347 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1348 psdir=$ac_optarg ;;
1349  
1350 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1351 | -silent | --silent | --silen | --sile | --sil)
1352 silent=yes ;;
1353  
1354 -runstatedir | --runstatedir | --runstatedi | --runstated \
1355 | --runstate | --runstat | --runsta | --runst | --runs \
1356 | --run | --ru | --r)
1357 ac_prev=runstatedir ;;
1358 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1359 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1360 | --run=* | --ru=* | --r=*)
1361 runstatedir=$ac_optarg ;;
1362  
1363 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1364 ac_prev=sbindir ;;
1365 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1366 | --sbi=* | --sb=*)
1367 sbindir=$ac_optarg ;;
1368  
1369 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1370 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1371 | --sharedst | --shareds | --shared | --share | --shar \
1372 | --sha | --sh)
1373 ac_prev=sharedstatedir ;;
1374 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1375 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1376 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1377 | --sha=* | --sh=*)
1378 sharedstatedir=$ac_optarg ;;
1379  
1380 -site | --site | --sit)
1381 ac_prev=site ;;
1382 -site=* | --site=* | --sit=*)
1383 site=$ac_optarg ;;
1384  
1385 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1386 ac_prev=srcdir ;;
1387 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1388 srcdir=$ac_optarg ;;
1389  
1390 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1391 | --syscon | --sysco | --sysc | --sys | --sy)
1392 ac_prev=sysconfdir ;;
1393 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1394 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1395 sysconfdir=$ac_optarg ;;
1396  
1397 -target | --target | --targe | --targ | --tar | --ta | --t)
1398 ac_prev=target_alias ;;
1399 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1400 target_alias=$ac_optarg ;;
1401  
1402 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1403 verbose=yes ;;
1404  
1405 -version | --version | --versio | --versi | --vers | -V)
1406 ac_init_version=: ;;
1407  
1408 -with-* | --with-*)
1409 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1410 # Reject names that are not valid shell variable names.
1411 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1412 as_fn_error $? "invalid package name: $ac_useropt"
1413 ac_useropt_orig=$ac_useropt
1414 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1415 case $ac_user_opts in
1416 *"
1417 "with_$ac_useropt"
1418 "*) ;;
1419 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1420 ac_unrecognized_sep=', ';;
1421 esac
1422 eval with_$ac_useropt=\$ac_optarg ;;
1423  
1424 -without-* | --without-*)
1425 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1426 # Reject names that are not valid shell variable names.
1427 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1428 as_fn_error $? "invalid package name: $ac_useropt"
1429 ac_useropt_orig=$ac_useropt
1430 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1431 case $ac_user_opts in
1432 *"
1433 "with_$ac_useropt"
1434 "*) ;;
1435 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1436 ac_unrecognized_sep=', ';;
1437 esac
1438 eval with_$ac_useropt=no ;;
1439  
1440 --x)
1441 # Obsolete; use --with-x.
1442 with_x=yes ;;
1443  
1444 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1445 | --x-incl | --x-inc | --x-in | --x-i)
1446 ac_prev=x_includes ;;
1447 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1448 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1449 x_includes=$ac_optarg ;;
1450  
1451 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1452 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1453 ac_prev=x_libraries ;;
1454 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1455 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1456 x_libraries=$ac_optarg ;;
1457  
1458 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1459 Try \`$0 --help' for more information"
1460 ;;
1461  
1462 *=*)
1463 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1464 # Reject names that are not valid shell variable names.
1465 case $ac_envvar in #(
1466 '' | [0-9]* | *[!_$as_cr_alnum]* )
1467 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1468 esac
1469 eval $ac_envvar=\$ac_optarg
1470 export $ac_envvar ;;
1471  
1472 *)
1473 # FIXME: should be removed in autoconf 3.0.
1474 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1475 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1476 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1477 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1478 ;;
1479  
1480 esac
1481 done
1482  
1483 if test -n "$ac_prev"; then
1484 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1485 as_fn_error $? "missing argument to $ac_option"
1486 fi
1487  
1488 if test -n "$ac_unrecognized_opts"; then
1489 case $enable_option_checking in
1490 no) ;;
1491 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1492 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1493 esac
1494 fi
1495  
1496 # Check all directory arguments for consistency.
1497 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1498 datadir sysconfdir sharedstatedir localstatedir includedir \
1499 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1500 libdir localedir mandir runstatedir
1501 do
1502 eval ac_val=\$$ac_var
1503 # Remove trailing slashes.
1504 case $ac_val in
1505 */ )
1506 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1507 eval $ac_var=\$ac_val;;
1508 esac
1509 # Be sure to have absolute directory names.
1510 case $ac_val in
1511 [\\/$]* | ?:[\\/]* ) continue;;
1512 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1513 esac
1514 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1515 done
1516  
1517 # There might be people who depend on the old broken behavior: `$host'
1518 # used to hold the argument of --host etc.
1519 # FIXME: To remove some day.
1520 build=$build_alias
1521 host=$host_alias
1522 target=$target_alias
1523  
1524 # FIXME: To remove some day.
1525 if test "x$host_alias" != x; then
1526 if test "x$build_alias" = x; then
1527 cross_compiling=maybe
1528 elif test "x$build_alias" != "x$host_alias"; then
1529 cross_compiling=yes
1530 fi
1531 fi
1532  
1533 ac_tool_prefix=
1534 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1535  
1536 test "$silent" = yes && exec 6>/dev/null
1537  
1538  
1539 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1540 ac_ls_di=`ls -di .` &&
1541 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1542 as_fn_error $? "working directory cannot be determined"
1543 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1544 as_fn_error $? "pwd does not report name of working directory"
1545  
1546  
1547 # Find the source files, if location was not specified.
1548 if test -z "$srcdir"; then
1549 ac_srcdir_defaulted=yes
1550 # Try the directory containing this script, then the parent directory.
1551 ac_confdir=`$as_dirname -- "$as_myself" ||
1552 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1553 X"$as_myself" : 'X\(//\)[^/]' \| \
1554 X"$as_myself" : 'X\(//\)$' \| \
1555 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1556 $as_echo X"$as_myself" |
1557 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1558 s//\1/
1559 q
1560 }
1561 /^X\(\/\/\)[^/].*/{
1562 s//\1/
1563 q
1564 }
1565 /^X\(\/\/\)$/{
1566 s//\1/
1567 q
1568 }
1569 /^X\(\/\).*/{
1570 s//\1/
1571 q
1572 }
1573 s/.*/./; q'`
1574 srcdir=$ac_confdir
1575 if test ! -r "$srcdir/$ac_unique_file"; then
1576 srcdir=..
1577 fi
1578 else
1579 ac_srcdir_defaulted=no
1580 fi
1581 if test ! -r "$srcdir/$ac_unique_file"; then
1582 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1583 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1584 fi
1585 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1586 ac_abs_confdir=`(
1587 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1588 pwd)`
1589 # When building in place, set srcdir=.
1590 if test "$ac_abs_confdir" = "$ac_pwd"; then
1591 srcdir=.
1592 fi
1593 # Remove unnecessary trailing slashes from srcdir.
1594 # Double slashes in file names in object file debugging info
1595 # mess up M-x gdb in Emacs.
1596 case $srcdir in
1597 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1598 esac
1599 for ac_var in $ac_precious_vars; do
1600 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1601 eval ac_env_${ac_var}_value=\$${ac_var}
1602 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1603 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1604 done
1605  
1606 #
1607 # Report the --help message.
1608 #
1609 if test "$ac_init_help" = "long"; then
1610 # Omit some internal or obsolete options to make the list less imposing.
1611 # This message is too long to be a string in the A/UX 3.1 sh.
1612 cat <<_ACEOF
1613 \`configure' configures Wireshark 2.2.3 to adapt to many kinds of systems.
1614  
1615 Usage: $0 [OPTION]... [VAR=VALUE]...
1616  
1617 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1618 VAR=VALUE. See below for descriptions of some of the useful variables.
1619  
1620 Defaults for the options are specified in brackets.
1621  
1622 Configuration:
1623 -h, --help display this help and exit
1624 --help=short display options specific to this package
1625 --help=recursive display the short help of all the included packages
1626 -V, --version display version information and exit
1627 -q, --quiet, --silent do not print \`checking ...' messages
1628 --cache-file=FILE cache test results in FILE [disabled]
1629 -C, --config-cache alias for \`--cache-file=config.cache'
1630 -n, --no-create do not create output files
1631 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1632  
1633 Installation directories:
1634 --prefix=PREFIX install architecture-independent files in PREFIX
1635 [$ac_default_prefix]
1636 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1637 [PREFIX]
1638  
1639 By default, \`make install' will install all the files in
1640 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1641 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1642 for instance \`--prefix=\$HOME'.
1643  
1644 For better control, use the options below.
1645  
1646 Fine tuning of the installation directories:
1647 --bindir=DIR user executables [EPREFIX/bin]
1648 --sbindir=DIR system admin executables [EPREFIX/sbin]
1649 --libexecdir=DIR program executables [EPREFIX/libexec]
1650 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1651 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1652 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1653 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
1654 --libdir=DIR object code libraries [EPREFIX/lib]
1655 --includedir=DIR C header files [PREFIX/include]
1656 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1657 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1658 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1659 --infodir=DIR info documentation [DATAROOTDIR/info]
1660 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1661 --mandir=DIR man documentation [DATAROOTDIR/man]
1662 --docdir=DIR documentation root [DATAROOTDIR/doc/wireshark]
1663 --htmldir=DIR html documentation [DOCDIR]
1664 --dvidir=DIR dvi documentation [DOCDIR]
1665 --pdfdir=DIR pdf documentation [DOCDIR]
1666 --psdir=DIR ps documentation [DOCDIR]
1667 _ACEOF
1668  
1669 cat <<\_ACEOF
1670  
1671 Program names:
1672 --program-prefix=PREFIX prepend PREFIX to installed program names
1673 --program-suffix=SUFFIX append SUFFIX to installed program names
1674 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1675  
1676 System types:
1677 --build=BUILD configure for building on BUILD [guessed]
1678 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1679 --target=TARGET configure for building compilers for TARGET [HOST]
1680 _ACEOF
1681 fi
1682  
1683 if test -n "$ac_init_help"; then
1684 case $ac_init_help in
1685 short | recursive ) echo "Configuration of Wireshark 2.2.3:";;
1686 esac
1687 cat <<\_ACEOF
1688  
1689 Optional Features:
1690 --disable-option-checking ignore unrecognized --enable/--with options
1691 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1692 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1693 --enable-silent-rules less verbose build output (undo: "make V=1")
1694 --disable-silent-rules verbose build output (undo: "make V=0")
1695 --enable-static[=PKGS] build static libraries [default=no]
1696 --enable-shared[=PKGS] build shared libraries [default=yes]
1697 --enable-fast-install[=PKGS]
1698 optimize for fast installation [default=yes]
1699 --enable-dependency-tracking
1700 do not reject slow dependency extractors
1701 --disable-dependency-tracking
1702 speeds up one-time build
1703 --disable-libtool-lock avoid locking (might break parallel builds)
1704 --enable-osx-deploy-target
1705 choose an OS X deployment target [default=major
1706 release on which you're building]
1707 --disable-largefile omit support for large files
1708 --enable-extra-compiler-warnings
1709 do additional compiler warnings [default=no]
1710 --enable-asan Enable AddressSanitizer (ASAN) for debugging
1711 (degrades performance)[default=no]
1712 --enable-checkhf-conflict
1713 Enable hf conflict check for debugging (start-up may
1714 be slower)[default=no]
1715 --enable-warnings-as-errors
1716 treat warnings as errors (only for GCC or clang)
1717 [default=no]
1718 --enable-wireshark build the Wireshark GUI (with Gtk+, Qt, or both)
1719 [default=yes]
1720 --enable-packet-editor add support for packet editor in Wireshark
1721 [default=yes]
1722 --enable-profile-build build profile-ready binaries [default=no]
1723 --enable-tshark build tshark [default=yes]
1724 --enable-editcap build editcap [default=yes]
1725 --enable-capinfos build capinfos [default=yes]
1726 --enable-captype build captype [default=yes]
1727 --enable-mergecap build mergecap [default=yes]
1728 --enable-reordercap build reordercap [default=yes]
1729 --enable-text2pcap build text2pcap [default=yes]
1730 --enable-dftest build dftest [default=yes]
1731 --enable-randpkt build randpkt [default=yes]
1732 --enable-dumpcap build dumpcap [default=yes]
1733 --enable-rawshark build rawshark [default=yes]
1734 --enable-echld support echld (Experimental) [default=no]
1735 --enable-tfshark build tfshark (Experimental) [default=no]
1736 --enable-pcap-ng-default
1737 use the pcap-ng file format by default instead of
1738 pcap [default=yes]
1739 --enable-setcap-install install dumpcap with cap_net_admin and cap_net_raw
1740 [default=no]
1741 --enable-setuid-install install dumpcap as setuid [default=no]
1742 --enable-androiddump build androiddump [default=yes]
1743 --enable-androiddump-use-libpcap
1744 build androiddump using libpcap [default=no]
1745 --enable-sshdump build sshdump [default=yes]
1746 --enable-ciscodump build ciscodump [default=yes]
1747 --enable-randpktdump build randpktdump [default=yes]
1748  
1749 Optional Packages:
1750 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1751 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1752 --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
1753 both]
1754 --with-aix-soname=aix|svr4|both
1755 shared library versioning (aka "SONAME") variant to
1756 provide on AIX, [default=aix].
1757 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1758 --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
1759 compiler's sysroot if not specified).
1760 --with-qt=[yes/no/4/5] use Qt [default=yes, if available]
1761 --with-gtk=[yes/no/2/3] use GTK+ [default=yes, if available]
1762 --with-gnutls=[yes/no] use GnuTLS library [default=yes, if available]
1763 --with-gcrypt=[yes/no] use gcrypt library [default=yes, if available]
1764 --with-libgcrypt-prefix=PFX
1765 prefix where LIBGCRYPT is installed (optional)
1766 --with-libnl[=VERSION] use libnl (force version VERSION, if supplied)
1767 [default: yes, if available]
1768 --with-libsmi=[DIR] use libsmi MIB/PIB library [default=yes], optionally
1769 specify the prefix for libsmi
1770 --with-osx-integration use OS X integration functions [default=yes, if
1771 available]
1772 --with-pcap[=DIR] use libpcap for packet capturing [default=yes]
1773 --with-pcap-remote use libpcap remote capturing (requires libpcap)
1774 --with-zlib[=DIR] use zlib (located in directory DIR, if supplied) for
1775 gzip compression and decompression [default=yes, if
1776 available]
1777 --with-lua[=DIR] use liblua (located in directory DIR, if supplied)
1778 for the Lua scripting plugin [default=yes, if
1779 available]
1780 --with-portaudio[=DIR] use libportaudio (located in directory DIR, if
1781 supplied) for the GTK+ RTP player [default=yes, if
1782 available]
1783 --with-dumpcap-group=GROUP
1784 restrict dumpcap to GROUP
1785 --with-libcap[=DIR] use libcap (located in directory DIR, if supplied)
1786 for POSIX.1e capabilities management [default=yes,
1787 if present]
1788 --with-ssl[=DIR] use SSL crypto library (located in directory DIR, if
1789 supplied) [default=no]
1790 --with-krb5[=DIR] use Kerberos library (located in directory DIR, if
1791 supplied) to use in Kerberos dissection
1792 [default=yes]
1793 --with-c-ares[=DIR] use c-ares (located in directory DIR, if supplied)
1794 [default=yes, if present]
1795 --with-geoip[=DIR] use GeoIP (located in directory DIR, if supplied)
1796 [default=yes, if present]
1797 --with-libssh[=DIR] use libssh (located in directory DIR, if supplied)
1798 [default=yes, if present]
1799 --with-sbc=[yes/no] use SBC codec to play Bluetooth A2DP stream
1800 [default=yes, if available]
1801 --with-plugins[=DIR] support plugins (installed in DIR, if supplied)
1802 [default=yes, if possible]
1803 --with-extcap[=DIR] use extcap for external capture sources (installed
1804 in DIR, if supplied) [default=yes, if possible]
1805  
1806 Some influential environment variables:
1807 CC C compiler command
1808 CFLAGS C compiler flags
1809 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1810 nonstandard directory <lib dir>
1811 LIBS libraries to pass to the linker, e.g. -l<library>
1812 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1813 you have headers in a nonstandard directory <include dir>
1814 LT_SYS_LIBRARY_PATH
1815 User-defined run-time library search path.
1816 CPP C preprocessor
1817 CXX C++ compiler command
1818 CXXFLAGS C++ compiler flags
1819 CXXCPP C++ preprocessor
1820 YACC The `Yet Another Compiler Compiler' implementation to use.
1821 Defaults to the first program found out of: `bison -y', `byacc',
1822 `yacc'.
1823 YFLAGS The list of arguments that will be passed by default to $YACC.
1824 This script will default YFLAGS to the empty string to avoid a
1825 default value of `-d' given by some make applications.
1826 PKG_CONFIG path to pkg-config utility
1827 PKG_CONFIG_PATH
1828 directories to add to pkg-config's search path
1829 PKG_CONFIG_LIBDIR
1830 path overriding pkg-config's built-in search path
1831 LIBGNUTLS_CFLAGS
1832 C compiler flags for LIBGNUTLS, overriding pkg-config
1833 LIBGNUTLS_LIBS
1834 linker flags for LIBGNUTLS, overriding pkg-config
1835 LIBNL_CFLAGS
1836 C compiler flags for LIBNL, overriding pkg-config
1837 LIBNL_LIBS linker flags for LIBNL, overriding pkg-config
1838 GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config
1839 GLIB_LIBS linker flags for GLIB, overriding pkg-config
1840 GTK_CFLAGS C compiler flags for GTK, overriding pkg-config
1841 GTK_LIBS linker flags for GTK, overriding pkg-config
1842 LUA_CFLAGS C compiler flags for LUA, overriding pkg-config
1843 LUA_LIBS linker flags for LUA, overriding pkg-config
1844 SPEEXDSP_CFLAGS
1845 C compiler flags for SPEEXDSP, overriding pkg-config
1846 SPEEXDSP_LIBS
1847 linker flags for SPEEXDSP, overriding pkg-config
1848 SBC_CFLAGS C compiler flags for SBC, overriding pkg-config
1849 SBC_LIBS linker flags for SBC, overriding pkg-config
1850  
1851 Use these variables to override the choices made by `configure' or to help
1852 it to find libraries and programs with nonstandard names/locations.
1853  
1854 Report bugs to <http://bugs.wireshark.org/>.
1855 Wireshark home page: <http://www.wireshark.org/>.
1856 _ACEOF
1857 ac_status=$?
1858 fi
1859  
1860 if test "$ac_init_help" = "recursive"; then
1861 # If there are subdirs, report their specific --help.
1862 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1863 test -d "$ac_dir" ||
1864 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1865 continue
1866 ac_builddir=.
1867  
1868 case "$ac_dir" in
1869 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1870 *)
1871 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1872 # A ".." for each directory in $ac_dir_suffix.
1873 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1874 case $ac_top_builddir_sub in
1875 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1876 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1877 esac ;;
1878 esac
1879 ac_abs_top_builddir=$ac_pwd
1880 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1881 # for backward compatibility:
1882 ac_top_builddir=$ac_top_build_prefix
1883  
1884 case $srcdir in
1885 .) # We are building in place.
1886 ac_srcdir=.
1887 ac_top_srcdir=$ac_top_builddir_sub
1888 ac_abs_top_srcdir=$ac_pwd ;;
1889 [\\/]* | ?:[\\/]* ) # Absolute name.
1890 ac_srcdir=$srcdir$ac_dir_suffix;
1891 ac_top_srcdir=$srcdir
1892 ac_abs_top_srcdir=$srcdir ;;
1893 *) # Relative name.
1894 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1895 ac_top_srcdir=$ac_top_build_prefix$srcdir
1896 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1897 esac
1898 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1899  
1900 cd "$ac_dir" || { ac_status=$?; continue; }
1901 # Check for guested configure.
1902 if test -f "$ac_srcdir/configure.gnu"; then
1903 echo &&
1904 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1905 elif test -f "$ac_srcdir/configure"; then
1906 echo &&
1907 $SHELL "$ac_srcdir/configure" --help=recursive
1908 else
1909 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1910 fi || ac_status=$?
1911 cd "$ac_pwd" || { ac_status=$?; break; }
1912 done
1913 fi
1914  
1915 test -n "$ac_init_help" && exit $ac_status
1916 if $ac_init_version; then
1917 cat <<\_ACEOF
1918 Wireshark configure 2.2.3
1919 generated by GNU Autoconf 2.69
1920  
1921 Copyright (C) 2012 Free Software Foundation, Inc.
1922 This configure script is free software; the Free Software Foundation
1923 gives unlimited permission to copy, distribute and modify it.
1924 _ACEOF
1925 exit
1926 fi
1927  
1928 ## ------------------------ ##
1929 ## Autoconf initialization. ##
1930 ## ------------------------ ##
1931  
1932 # ac_fn_c_try_compile LINENO
1933 # --------------------------
1934 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1935 ac_fn_c_try_compile ()
1936 {
1937 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1938 rm -f conftest.$ac_objext
1939 if { { ac_try="$ac_compile"
1940 case "(($ac_try" in
1941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1942 *) ac_try_echo=$ac_try;;
1943 esac
1944 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1945 $as_echo "$ac_try_echo"; } >&5
1946 (eval "$ac_compile") 2>conftest.err
1947 ac_status=$?
1948 if test -s conftest.err; then
1949 grep -v '^ *+' conftest.err >conftest.er1
1950 cat conftest.er1 >&5
1951 mv -f conftest.er1 conftest.err
1952 fi
1953 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1954 test $ac_status = 0; } && {
1955 test -z "$ac_c_werror_flag" ||
1956 test ! -s conftest.err
1957 } && test -s conftest.$ac_objext; then :
1958 ac_retval=0
1959 else
1960 $as_echo "$as_me: failed program was:" >&5
1961 sed 's/^/| /' conftest.$ac_ext >&5
1962  
1963 ac_retval=1
1964 fi
1965 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1966 as_fn_set_status $ac_retval
1967  
1968 } # ac_fn_c_try_compile
1969  
1970 # ac_fn_c_try_link LINENO
1971 # -----------------------
1972 # Try to link conftest.$ac_ext, and return whether this succeeded.
1973 ac_fn_c_try_link ()
1974 {
1975 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1976 rm -f conftest.$ac_objext conftest$ac_exeext
1977 if { { ac_try="$ac_link"
1978 case "(($ac_try" in
1979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1980 *) ac_try_echo=$ac_try;;
1981 esac
1982 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1983 $as_echo "$ac_try_echo"; } >&5
1984 (eval "$ac_link") 2>conftest.err
1985 ac_status=$?
1986 if test -s conftest.err; then
1987 grep -v '^ *+' conftest.err >conftest.er1
1988 cat conftest.er1 >&5
1989 mv -f conftest.er1 conftest.err
1990 fi
1991 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1992 test $ac_status = 0; } && {
1993 test -z "$ac_c_werror_flag" ||
1994 test ! -s conftest.err
1995 } && test -s conftest$ac_exeext && {
1996 test "$cross_compiling" = yes ||
1997 test -x conftest$ac_exeext
1998 }; then :
1999 ac_retval=0
2000 else
2001 $as_echo "$as_me: failed program was:" >&5
2002 sed 's/^/| /' conftest.$ac_ext >&5
2003  
2004 ac_retval=1
2005 fi
2006 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2007 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2008 # interfere with the next link command; also delete a directory that is
2009 # left behind by Apple's compiler. We do this before executing the actions.
2010 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2011 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2012 as_fn_set_status $ac_retval
2013  
2014 } # ac_fn_c_try_link
2015  
2016 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2017 # -------------------------------------------------------
2018 # Tests whether HEADER exists and can be compiled using the include files in
2019 # INCLUDES, setting the cache variable VAR accordingly.
2020 ac_fn_c_check_header_compile ()
2021 {
2022 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2024 $as_echo_n "checking for $2... " >&6; }
2025 if eval \${$3+:} false; then :
2026 $as_echo_n "(cached) " >&6
2027 else
2028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029 /* end confdefs.h. */
2030 $4
2031 #include <$2>
2032 _ACEOF
2033 if ac_fn_c_try_compile "$LINENO"; then :
2034 eval "$3=yes"
2035 else
2036 eval "$3=no"
2037 fi
2038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2039 fi
2040 eval ac_res=\$$3
2041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2042 $as_echo "$ac_res" >&6; }
2043 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2044  
2045 } # ac_fn_c_check_header_compile
2046  
2047 # ac_fn_c_try_cpp LINENO
2048 # ----------------------
2049 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2050 ac_fn_c_try_cpp ()
2051 {
2052 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2053 if { { ac_try="$ac_cpp conftest.$ac_ext"
2054 case "(($ac_try" in
2055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2056 *) ac_try_echo=$ac_try;;
2057 esac
2058 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2059 $as_echo "$ac_try_echo"; } >&5
2060 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2061 ac_status=$?
2062 if test -s conftest.err; then
2063 grep -v '^ *+' conftest.err >conftest.er1
2064 cat conftest.er1 >&5
2065 mv -f conftest.er1 conftest.err
2066 fi
2067 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2068 test $ac_status = 0; } > conftest.i && {
2069 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2070 test ! -s conftest.err
2071 }; then :
2072 ac_retval=0
2073 else
2074 $as_echo "$as_me: failed program was:" >&5
2075 sed 's/^/| /' conftest.$ac_ext >&5
2076  
2077 ac_retval=1
2078 fi
2079 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2080 as_fn_set_status $ac_retval
2081  
2082 } # ac_fn_c_try_cpp
2083  
2084 # ac_fn_c_try_run LINENO
2085 # ----------------------
2086 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2087 # that executables *can* be run.
2088 ac_fn_c_try_run ()
2089 {
2090 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2091 if { { ac_try="$ac_link"
2092 case "(($ac_try" in
2093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2094 *) ac_try_echo=$ac_try;;
2095 esac
2096 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2097 $as_echo "$ac_try_echo"; } >&5
2098 (eval "$ac_link") 2>&5
2099 ac_status=$?
2100 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2101 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2102 { { case "(($ac_try" in
2103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2104 *) ac_try_echo=$ac_try;;
2105 esac
2106 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2107 $as_echo "$ac_try_echo"; } >&5
2108 (eval "$ac_try") 2>&5
2109 ac_status=$?
2110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2111 test $ac_status = 0; }; }; then :
2112 ac_retval=0
2113 else
2114 $as_echo "$as_me: program exited with status $ac_status" >&5
2115 $as_echo "$as_me: failed program was:" >&5
2116 sed 's/^/| /' conftest.$ac_ext >&5
2117  
2118 ac_retval=$ac_status
2119 fi
2120 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2121 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2122 as_fn_set_status $ac_retval
2123  
2124 } # ac_fn_c_try_run
2125  
2126 # ac_fn_c_check_func LINENO FUNC VAR
2127 # ----------------------------------
2128 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2129 ac_fn_c_check_func ()
2130 {
2131 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2133 $as_echo_n "checking for $2... " >&6; }
2134 if eval \${$3+:} false; then :
2135 $as_echo_n "(cached) " >&6
2136 else
2137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2138 /* end confdefs.h. */
2139 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2140 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2141 #define $2 innocuous_$2
2142  
2143 /* System header to define __stub macros and hopefully few prototypes,
2144 which can conflict with char $2 (); below.
2145 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2146 <limits.h> exists even on freestanding compilers. */
2147  
2148 #ifdef __STDC__
2149 # include <limits.h>
2150 #else
2151 # include <assert.h>
2152 #endif
2153  
2154 #undef $2
2155  
2156 /* Override any GCC internal prototype to avoid an error.
2157 Use char because int might match the return type of a GCC
2158 builtin and then its argument prototype would still apply. */
2159 #ifdef __cplusplus
2160 extern "C"
2161 #endif
2162 char $2 ();
2163 /* The GNU C library defines this for functions which it implements
2164 to always fail with ENOSYS. Some functions are actually named
2165 something starting with __ and the normal name is an alias. */
2166 #if defined __stub_$2 || defined __stub___$2
2167 choke me
2168 #endif
2169  
2170 int
2171 main ()
2172 {
2173 return $2 ();
2174 ;
2175 return 0;
2176 }
2177 _ACEOF
2178 if ac_fn_c_try_link "$LINENO"; then :
2179 eval "$3=yes"
2180 else
2181 eval "$3=no"
2182 fi
2183 rm -f core conftest.err conftest.$ac_objext \
2184 conftest$ac_exeext conftest.$ac_ext
2185 fi
2186 eval ac_res=\$$3
2187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2188 $as_echo "$ac_res" >&6; }
2189 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2190  
2191 } # ac_fn_c_check_func
2192  
2193 # ac_fn_cxx_try_compile LINENO
2194 # ----------------------------
2195 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2196 ac_fn_cxx_try_compile ()
2197 {
2198 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2199 rm -f conftest.$ac_objext
2200 if { { ac_try="$ac_compile"
2201 case "(($ac_try" in
2202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2203 *) ac_try_echo=$ac_try;;
2204 esac
2205 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2206 $as_echo "$ac_try_echo"; } >&5
2207 (eval "$ac_compile") 2>conftest.err
2208 ac_status=$?
2209 if test -s conftest.err; then
2210 grep -v '^ *+' conftest.err >conftest.er1
2211 cat conftest.er1 >&5
2212 mv -f conftest.er1 conftest.err
2213 fi
2214 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2215 test $ac_status = 0; } && {
2216 test -z "$ac_cxx_werror_flag" ||
2217 test ! -s conftest.err
2218 } && test -s conftest.$ac_objext; then :
2219 ac_retval=0
2220 else
2221 $as_echo "$as_me: failed program was:" >&5
2222 sed 's/^/| /' conftest.$ac_ext >&5
2223  
2224 ac_retval=1
2225 fi
2226 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2227 as_fn_set_status $ac_retval
2228  
2229 } # ac_fn_cxx_try_compile
2230  
2231 # ac_fn_cxx_try_cpp LINENO
2232 # ------------------------
2233 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2234 ac_fn_cxx_try_cpp ()
2235 {
2236 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2237 if { { ac_try="$ac_cpp conftest.$ac_ext"
2238 case "(($ac_try" in
2239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2240 *) ac_try_echo=$ac_try;;
2241 esac
2242 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2243 $as_echo "$ac_try_echo"; } >&5
2244 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2245 ac_status=$?
2246 if test -s conftest.err; then
2247 grep -v '^ *+' conftest.err >conftest.er1
2248 cat conftest.er1 >&5
2249 mv -f conftest.er1 conftest.err
2250 fi
2251 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2252 test $ac_status = 0; } > conftest.i && {
2253 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2254 test ! -s conftest.err
2255 }; then :
2256 ac_retval=0
2257 else
2258 $as_echo "$as_me: failed program was:" >&5
2259 sed 's/^/| /' conftest.$ac_ext >&5
2260  
2261 ac_retval=1
2262 fi
2263 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2264 as_fn_set_status $ac_retval
2265  
2266 } # ac_fn_cxx_try_cpp
2267  
2268 # ac_fn_cxx_try_link LINENO
2269 # -------------------------
2270 # Try to link conftest.$ac_ext, and return whether this succeeded.
2271 ac_fn_cxx_try_link ()
2272 {
2273 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2274 rm -f conftest.$ac_objext conftest$ac_exeext
2275 if { { ac_try="$ac_link"
2276 case "(($ac_try" in
2277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2278 *) ac_try_echo=$ac_try;;
2279 esac
2280 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2281 $as_echo "$ac_try_echo"; } >&5
2282 (eval "$ac_link") 2>conftest.err
2283 ac_status=$?
2284 if test -s conftest.err; then
2285 grep -v '^ *+' conftest.err >conftest.er1
2286 cat conftest.er1 >&5
2287 mv -f conftest.er1 conftest.err
2288 fi
2289 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2290 test $ac_status = 0; } && {
2291 test -z "$ac_cxx_werror_flag" ||
2292 test ! -s conftest.err
2293 } && test -s conftest$ac_exeext && {
2294 test "$cross_compiling" = yes ||
2295 test -x conftest$ac_exeext
2296 }; then :
2297 ac_retval=0
2298 else
2299 $as_echo "$as_me: failed program was:" >&5
2300 sed 's/^/| /' conftest.$ac_ext >&5
2301  
2302 ac_retval=1
2303 fi
2304 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2305 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2306 # interfere with the next link command; also delete a directory that is
2307 # left behind by Apple's compiler. We do this before executing the actions.
2308 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2309 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2310 as_fn_set_status $ac_retval
2311  
2312 } # ac_fn_cxx_try_link
2313  
2314 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2315 # -------------------------------------------------------
2316 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2317 # the include files in INCLUDES and setting the cache variable VAR
2318 # accordingly.
2319 ac_fn_c_check_header_mongrel ()
2320 {
2321 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2322 if eval \${$3+:} false; then :
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2324 $as_echo_n "checking for $2... " >&6; }
2325 if eval \${$3+:} false; then :
2326 $as_echo_n "(cached) " >&6
2327 fi
2328 eval ac_res=\$$3
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2330 $as_echo "$ac_res" >&6; }
2331 else
2332 # Is the header compilable?
2333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2334 $as_echo_n "checking $2 usability... " >&6; }
2335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2336 /* end confdefs.h. */
2337 $4
2338 #include <$2>
2339 _ACEOF
2340 if ac_fn_c_try_compile "$LINENO"; then :
2341 ac_header_compiler=yes
2342 else
2343 ac_header_compiler=no
2344 fi
2345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2347 $as_echo "$ac_header_compiler" >&6; }
2348  
2349 # Is the header present?
2350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2351 $as_echo_n "checking $2 presence... " >&6; }
2352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2353 /* end confdefs.h. */
2354 #include <$2>
2355 _ACEOF
2356 if ac_fn_c_try_cpp "$LINENO"; then :
2357 ac_header_preproc=yes
2358 else
2359 ac_header_preproc=no
2360 fi
2361 rm -f conftest.err conftest.i conftest.$ac_ext
2362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2363 $as_echo "$ac_header_preproc" >&6; }
2364  
2365 # So? What about this header?
2366 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2367 yes:no: )
2368 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2369 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2370 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2371 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2372 ;;
2373 no:yes:* )
2374 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2375 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2376 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2377 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2378 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2379 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2380 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2381 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2382 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2383 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2384 ( $as_echo "## ----------------------------------------- ##
2385 ## Report this to http://bugs.wireshark.org/ ##
2386 ## ----------------------------------------- ##"
2387 ) | sed "s/^/$as_me: WARNING: /" >&2
2388 ;;
2389 esac
2390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2391 $as_echo_n "checking for $2... " >&6; }
2392 if eval \${$3+:} false; then :
2393 $as_echo_n "(cached) " >&6
2394 else
2395 eval "$3=\$ac_header_compiler"
2396 fi
2397 eval ac_res=\$$3
2398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2399 $as_echo "$ac_res" >&6; }
2400 fi
2401 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2402  
2403 } # ac_fn_c_check_header_mongrel
2404  
2405 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2406 # -------------------------------------------
2407 # Tests whether TYPE exists after having included INCLUDES, setting cache
2408 # variable VAR accordingly.
2409 ac_fn_c_check_type ()
2410 {
2411 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2413 $as_echo_n "checking for $2... " >&6; }
2414 if eval \${$3+:} false; then :
2415 $as_echo_n "(cached) " >&6
2416 else
2417 eval "$3=no"
2418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2419 /* end confdefs.h. */
2420 $4
2421 int
2422 main ()
2423 {
2424 if (sizeof ($2))
2425 return 0;
2426 ;
2427 return 0;
2428 }
2429 _ACEOF
2430 if ac_fn_c_try_compile "$LINENO"; then :
2431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2432 /* end confdefs.h. */
2433 $4
2434 int
2435 main ()
2436 {
2437 if (sizeof (($2)))
2438 return 0;
2439 ;
2440 return 0;
2441 }
2442 _ACEOF
2443 if ac_fn_c_try_compile "$LINENO"; then :
2444  
2445 else
2446 eval "$3=yes"
2447 fi
2448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2449 fi
2450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2451 fi
2452 eval ac_res=\$$3
2453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2454 $as_echo "$ac_res" >&6; }
2455 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2456  
2457 } # ac_fn_c_check_type
2458  
2459 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2460 # ----------------------------------------------------
2461 # Tries to find if the field MEMBER exists in type AGGR, after including
2462 # INCLUDES, setting cache variable VAR accordingly.
2463 ac_fn_c_check_member ()
2464 {
2465 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2467 $as_echo_n "checking for $2.$3... " >&6; }
2468 if eval \${$4+:} false; then :
2469 $as_echo_n "(cached) " >&6
2470 else
2471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2472 /* end confdefs.h. */
2473 $5
2474 int
2475 main ()
2476 {
2477 static $2 ac_aggr;
2478 if (ac_aggr.$3)
2479 return 0;
2480 ;
2481 return 0;
2482 }
2483 _ACEOF
2484 if ac_fn_c_try_compile "$LINENO"; then :
2485 eval "$4=yes"
2486 else
2487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2488 /* end confdefs.h. */
2489 $5
2490 int
2491 main ()
2492 {
2493 static $2 ac_aggr;
2494 if (sizeof ac_aggr.$3)
2495 return 0;
2496 ;
2497 return 0;
2498 }
2499 _ACEOF
2500 if ac_fn_c_try_compile "$LINENO"; then :
2501 eval "$4=yes"
2502 else
2503 eval "$4=no"
2504 fi
2505 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2506 fi
2507 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2508 fi
2509 eval ac_res=\$$4
2510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2511 $as_echo "$ac_res" >&6; }
2512 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2513  
2514 } # ac_fn_c_check_member
2515  
2516 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2517 # ---------------------------------------------
2518 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2519 # accordingly.
2520 ac_fn_c_check_decl ()
2521 {
2522 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2523 as_decl_name=`echo $2|sed 's/ *(.*//'`
2524 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2526 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2527 if eval \${$3+:} false; then :
2528 $as_echo_n "(cached) " >&6
2529 else
2530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2531 /* end confdefs.h. */
2532 $4
2533 int
2534 main ()
2535 {
2536 #ifndef $as_decl_name
2537 #ifdef __cplusplus
2538 (void) $as_decl_use;
2539 #else
2540 (void) $as_decl_name;
2541 #endif
2542 #endif
2543  
2544 ;
2545 return 0;
2546 }
2547 _ACEOF
2548 if ac_fn_c_try_compile "$LINENO"; then :
2549 eval "$3=yes"
2550 else
2551 eval "$3=no"
2552 fi
2553 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2554 fi
2555 eval ac_res=\$$3
2556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2557 $as_echo "$ac_res" >&6; }
2558 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2559  
2560 } # ac_fn_c_check_decl
2561 cat >config.log <<_ACEOF
2562 This file contains any messages produced by compilers while
2563 running configure, to aid debugging if configure makes a mistake.
2564  
2565 It was created by Wireshark $as_me 2.2.3, which was
2566 generated by GNU Autoconf 2.69. Invocation command line was
2567  
2568 $ $0 $@
2569  
2570 _ACEOF
2571 exec 5>>config.log
2572 {
2573 cat <<_ASUNAME
2574 ## --------- ##
2575 ## Platform. ##
2576 ## --------- ##
2577  
2578 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2579 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2580 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2581 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2582 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2583  
2584 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2585 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2586  
2587 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2588 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2589 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2590 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2591 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2592 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2593 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2594  
2595 _ASUNAME
2596  
2597 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2598 for as_dir in $PATH
2599 do
2600 IFS=$as_save_IFS
2601 test -z "$as_dir" && as_dir=.
2602 $as_echo "PATH: $as_dir"
2603 done
2604 IFS=$as_save_IFS
2605  
2606 } >&5
2607  
2608 cat >&5 <<_ACEOF
2609  
2610  
2611 ## ----------- ##
2612 ## Core tests. ##
2613 ## ----------- ##
2614  
2615 _ACEOF
2616  
2617  
2618 # Keep a trace of the command line.
2619 # Strip out --no-create and --no-recursion so they do not pile up.
2620 # Strip out --silent because we don't want to record it for future runs.
2621 # Also quote any args containing shell meta-characters.
2622 # Make two passes to allow for proper duplicate-argument suppression.
2623 ac_configure_args=
2624 ac_configure_args0=
2625 ac_configure_args1=
2626 ac_must_keep_next=false
2627 for ac_pass in 1 2
2628 do
2629 for ac_arg
2630 do
2631 case $ac_arg in
2632 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2633 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2634 | -silent | --silent | --silen | --sile | --sil)
2635 continue ;;
2636 *\'*)
2637 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2638 esac
2639 case $ac_pass in
2640 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2641 2)
2642 as_fn_append ac_configure_args1 " '$ac_arg'"
2643 if test $ac_must_keep_next = true; then
2644 ac_must_keep_next=false # Got value, back to normal.
2645 else
2646 case $ac_arg in
2647 *=* | --config-cache | -C | -disable-* | --disable-* \
2648 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2649 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2650 | -with-* | --with-* | -without-* | --without-* | --x)
2651 case "$ac_configure_args0 " in
2652 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2653 esac
2654 ;;
2655 -* ) ac_must_keep_next=true ;;
2656 esac
2657 fi
2658 as_fn_append ac_configure_args " '$ac_arg'"
2659 ;;
2660 esac
2661 done
2662 done
2663 { ac_configure_args0=; unset ac_configure_args0;}
2664 { ac_configure_args1=; unset ac_configure_args1;}
2665  
2666 # When interrupted or exit'd, cleanup temporary files, and complete
2667 # config.log. We remove comments because anyway the quotes in there
2668 # would cause problems or look ugly.
2669 # WARNING: Use '\'' to represent an apostrophe within the trap.
2670 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2671 trap 'exit_status=$?
2672 # Save into config.log some information that might help in debugging.
2673 {
2674 echo
2675  
2676 $as_echo "## ---------------- ##
2677 ## Cache variables. ##
2678 ## ---------------- ##"
2679 echo
2680 # The following way of writing the cache mishandles newlines in values,
2681 (
2682 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2683 eval ac_val=\$$ac_var
2684 case $ac_val in #(
2685 *${as_nl}*)
2686 case $ac_var in #(
2687 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2688 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2689 esac
2690 case $ac_var in #(
2691 _ | IFS | as_nl) ;; #(
2692 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2693 *) { eval $ac_var=; unset $ac_var;} ;;
2694 esac ;;
2695 esac
2696 done
2697 (set) 2>&1 |
2698 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2699 *${as_nl}ac_space=\ *)
2700 sed -n \
2701 "s/'\''/'\''\\\\'\'''\''/g;
2702 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2703 ;; #(
2704 *)
2705 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2706 ;;
2707 esac |
2708 sort
2709 )
2710 echo
2711  
2712 $as_echo "## ----------------- ##
2713 ## Output variables. ##
2714 ## ----------------- ##"
2715 echo
2716 for ac_var in $ac_subst_vars
2717 do
2718 eval ac_val=\$$ac_var
2719 case $ac_val in
2720 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2721 esac
2722 $as_echo "$ac_var='\''$ac_val'\''"
2723 done | sort
2724 echo
2725  
2726 if test -n "$ac_subst_files"; then
2727 $as_echo "## ------------------- ##
2728 ## File substitutions. ##
2729 ## ------------------- ##"
2730 echo
2731 for ac_var in $ac_subst_files
2732 do
2733 eval ac_val=\$$ac_var
2734 case $ac_val in
2735 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2736 esac
2737 $as_echo "$ac_var='\''$ac_val'\''"
2738 done | sort
2739 echo
2740 fi
2741  
2742 if test -s confdefs.h; then
2743 $as_echo "## ----------- ##
2744 ## confdefs.h. ##
2745 ## ----------- ##"
2746 echo
2747 cat confdefs.h
2748 echo
2749 fi
2750 test "$ac_signal" != 0 &&
2751 $as_echo "$as_me: caught signal $ac_signal"
2752 $as_echo "$as_me: exit $exit_status"
2753 } >&5
2754 rm -f core *.core core.conftest.* &&
2755 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2756 exit $exit_status
2757 ' 0
2758 for ac_signal in 1 2 13 15; do
2759 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2760 done
2761 ac_signal=0
2762  
2763 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2764 rm -f -r conftest* confdefs.h
2765  
2766 $as_echo "/* confdefs.h */" > confdefs.h
2767  
2768 # Predefined preprocessor variables.
2769  
2770 cat >>confdefs.h <<_ACEOF
2771 #define PACKAGE_NAME "$PACKAGE_NAME"
2772 _ACEOF
2773  
2774 cat >>confdefs.h <<_ACEOF
2775 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2776 _ACEOF
2777  
2778 cat >>confdefs.h <<_ACEOF
2779 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2780 _ACEOF
2781  
2782 cat >>confdefs.h <<_ACEOF
2783 #define PACKAGE_STRING "$PACKAGE_STRING"
2784 _ACEOF
2785  
2786 cat >>confdefs.h <<_ACEOF
2787 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2788 _ACEOF
2789  
2790 cat >>confdefs.h <<_ACEOF
2791 #define PACKAGE_URL "$PACKAGE_URL"
2792 _ACEOF
2793  
2794  
2795 # Let the site file select an alternate cache file if it wants to.
2796 # Prefer an explicitly selected file to automatically selected ones.
2797 ac_site_file1=NONE
2798 ac_site_file2=NONE
2799 if test -n "$CONFIG_SITE"; then
2800 # We do not want a PATH search for config.site.
2801 case $CONFIG_SITE in #((
2802 -*) ac_site_file1=./$CONFIG_SITE;;
2803 */*) ac_site_file1=$CONFIG_SITE;;
2804 *) ac_site_file1=./$CONFIG_SITE;;
2805 esac
2806 elif test "x$prefix" != xNONE; then
2807 ac_site_file1=$prefix/share/config.site
2808 ac_site_file2=$prefix/etc/config.site
2809 else
2810 ac_site_file1=$ac_default_prefix/share/config.site
2811 ac_site_file2=$ac_default_prefix/etc/config.site
2812 fi
2813 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2814 do
2815 test "x$ac_site_file" = xNONE && continue
2816 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2817 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2818 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2819 sed 's/^/| /' "$ac_site_file" >&5
2820 . "$ac_site_file" \
2821 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2822 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2823 as_fn_error $? "failed to load site script $ac_site_file
2824 See \`config.log' for more details" "$LINENO" 5; }
2825 fi
2826 done
2827  
2828 if test -r "$cache_file"; then
2829 # Some versions of bash will fail to source /dev/null (special files
2830 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2831 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2832 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2833 $as_echo "$as_me: loading cache $cache_file" >&6;}
2834 case $cache_file in
2835 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2836 *) . "./$cache_file";;
2837 esac
2838 fi
2839 else
2840 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2841 $as_echo "$as_me: creating cache $cache_file" >&6;}
2842 >$cache_file
2843 fi
2844  
2845 # Check that the precious variables saved in the cache have kept the same
2846 # value.
2847 ac_cache_corrupted=false
2848 for ac_var in $ac_precious_vars; do
2849 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2850 eval ac_new_set=\$ac_env_${ac_var}_set
2851 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2852 eval ac_new_val=\$ac_env_${ac_var}_value
2853 case $ac_old_set,$ac_new_set in
2854 set,)
2855 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2856 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2857 ac_cache_corrupted=: ;;
2858 ,set)
2859 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2860 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2861 ac_cache_corrupted=: ;;
2862 ,);;
2863 *)
2864 if test "x$ac_old_val" != "x$ac_new_val"; then
2865 # differences in whitespace do not lead to failure.
2866 ac_old_val_w=`echo x $ac_old_val`
2867 ac_new_val_w=`echo x $ac_new_val`
2868 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2869 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2870 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2871 ac_cache_corrupted=:
2872 else
2873 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2874 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2875 eval $ac_var=\$ac_old_val
2876 fi
2877 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2878 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2879 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2880 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2881 fi;;
2882 esac
2883 # Pass precious variables to config.status.
2884 if test "$ac_new_set" = set; then
2885 case $ac_new_val in
2886 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2887 *) ac_arg=$ac_var=$ac_new_val ;;
2888 esac
2889 case " $ac_configure_args " in
2890 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2891 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2892 esac
2893 fi
2894 done
2895 if $ac_cache_corrupted; then
2896 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2897 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2898 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2899 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2900 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2901 fi
2902 ## -------------------- ##
2903 ## Main body of script. ##
2904 ## -------------------- ##
2905  
2906 ac_ext=c
2907 ac_cpp='$CPP $CPPFLAGS'
2908 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2909 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2910 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2911  
2912  
2913 CONFIG_ARGS="$*"
2914  
2915  
2916 # Minimum autoconf version we require.
2917  
2918 # Variable expansion doesn't work in AC_PREREQ()
2919 AC_MIN_VERSION=2.64
2920  
2921  
2922  
2923  
2924  
2925 ac_aux_dir=
2926 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2927 if test -f "$ac_dir/install-sh"; then
2928 ac_aux_dir=$ac_dir
2929 ac_install_sh="$ac_aux_dir/install-sh -c"
2930 break
2931 elif test -f "$ac_dir/install.sh"; then
2932 ac_aux_dir=$ac_dir
2933 ac_install_sh="$ac_aux_dir/install.sh -c"
2934 break
2935 elif test -f "$ac_dir/shtool"; then
2936 ac_aux_dir=$ac_dir
2937 ac_install_sh="$ac_aux_dir/shtool install -c"
2938 break
2939 fi
2940 done
2941 if test -z "$ac_aux_dir"; then
2942 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2943 fi
2944  
2945 # These three variables are undocumented and unsupported,
2946 # and are intended to be withdrawn in a future Autoconf release.
2947 # They can cause serious problems if a builder's source tree is in a directory
2948 # whose full name contains unusual characters.
2949 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2950 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2951 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2952  
2953  
2954 # Make sure we can run config.sub.
2955 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2956 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2957  
2958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2959 $as_echo_n "checking build system type... " >&6; }
2960 if ${ac_cv_build+:} false; then :
2961 $as_echo_n "(cached) " >&6
2962 else
2963 ac_build_alias=$build_alias
2964 test "x$ac_build_alias" = x &&
2965 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2966 test "x$ac_build_alias" = x &&
2967 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2968 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2969 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2970  
2971 fi
2972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2973 $as_echo "$ac_cv_build" >&6; }
2974 case $ac_cv_build in
2975 *-*-*) ;;
2976 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2977 esac
2978 build=$ac_cv_build
2979 ac_save_IFS=$IFS; IFS='-'
2980 set x $ac_cv_build
2981 shift
2982 build_cpu=$1
2983 build_vendor=$2
2984 shift; shift
2985 # Remember, the first character of IFS is used to create $*,
2986 # except with old shells:
2987 build_os=$*
2988 IFS=$ac_save_IFS
2989 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2990  
2991  
2992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2993 $as_echo_n "checking host system type... " >&6; }
2994 if ${ac_cv_host+:} false; then :
2995 $as_echo_n "(cached) " >&6
2996 else
2997 if test "x$host_alias" = x; then
2998 ac_cv_host=$ac_cv_build
2999 else
3000 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3001 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3002 fi
3003  
3004 fi
3005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3006 $as_echo "$ac_cv_host" >&6; }
3007 case $ac_cv_host in
3008 *-*-*) ;;
3009 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3010 esac
3011 host=$ac_cv_host
3012 ac_save_IFS=$IFS; IFS='-'
3013 set x $ac_cv_host
3014 shift
3015 host_cpu=$1
3016 host_vendor=$2
3017 shift; shift
3018 # Remember, the first character of IFS is used to create $*,
3019 # except with old shells:
3020 host_os=$*
3021 IFS=$ac_save_IFS
3022 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3023  
3024  
3025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
3026 $as_echo_n "checking target system type... " >&6; }
3027 if ${ac_cv_target+:} false; then :
3028 $as_echo_n "(cached) " >&6
3029 else
3030 if test "x$target_alias" = x; then
3031 ac_cv_target=$ac_cv_host
3032 else
3033 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
3034 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3035 fi
3036  
3037 fi
3038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
3039 $as_echo "$ac_cv_target" >&6; }
3040 case $ac_cv_target in
3041 *-*-*) ;;
3042 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3043 esac
3044 target=$ac_cv_target
3045 ac_save_IFS=$IFS; IFS='-'
3046 set x $ac_cv_target
3047 shift
3048 target_cpu=$1
3049 target_vendor=$2
3050 shift; shift
3051 # Remember, the first character of IFS is used to create $*,
3052 # except with old shells:
3053 target_os=$*
3054 IFS=$ac_save_IFS
3055 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
3056  
3057  
3058 # The aliases save the names the user supplied, while $host etc.
3059 # will get canonicalized.
3060 test -n "$target_alias" &&
3061 test "$program_prefix$program_suffix$program_transform_name" = \
3062 NONENONEs,x,x, &&
3063 program_prefix=${target_alias}-
3064  
3065 am__api_version='1.15'
3066  
3067 # Find a good install program. We prefer a C program (faster),
3068 # so one script is as good as another. But avoid the broken or
3069 # incompatible versions:
3070 # SysV /etc/install, /usr/sbin/install
3071 # SunOS /usr/etc/install
3072 # IRIX /sbin/install
3073 # AIX /bin/install
3074 # AmigaOS /C/install, which installs bootblocks on floppy discs
3075 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3076 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3077 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3078 # OS/2's system install, which has a completely different semantic
3079 # ./install, which can be erroneously created by make from ./install.sh.
3080 # Reject install programs that cannot install multiple files.
3081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3082 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3083 if test -z "$INSTALL"; then
3084 if ${ac_cv_path_install+:} false; then :
3085 $as_echo_n "(cached) " >&6
3086 else
3087 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3088 for as_dir in $PATH
3089 do
3090 IFS=$as_save_IFS
3091 test -z "$as_dir" && as_dir=.
3092 # Account for people who put trailing slashes in PATH elements.
3093 case $as_dir/ in #((
3094 ./ | .// | /[cC]/* | \
3095 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3096 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3097 /usr/ucb/* ) ;;
3098 *)
3099 # OSF1 and SCO ODT 3.0 have their own names for install.
3100 # Don't use installbsd from OSF since it installs stuff as root
3101 # by default.
3102 for ac_prog in ginstall scoinst install; do
3103 for ac_exec_ext in '' $ac_executable_extensions; do
3104 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3105 if test $ac_prog = install &&
3106 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3107 # AIX install. It has an incompatible calling convention.
3108 :
3109 elif test $ac_prog = install &&
3110 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3111 # program-specific install script used by HP pwplus--don't use.
3112 :
3113 else
3114 rm -rf conftest.one conftest.two conftest.dir
3115 echo one > conftest.one
3116 echo two > conftest.two
3117 mkdir conftest.dir
3118 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3119 test -s conftest.one && test -s conftest.two &&
3120 test -s conftest.dir/conftest.one &&
3121 test -s conftest.dir/conftest.two
3122 then
3123 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3124 break 3
3125 fi
3126 fi
3127 fi
3128 done
3129 done
3130 ;;
3131 esac
3132  
3133 done
3134 IFS=$as_save_IFS
3135  
3136 rm -rf conftest.one conftest.two conftest.dir
3137  
3138 fi
3139 if test "${ac_cv_path_install+set}" = set; then
3140 INSTALL=$ac_cv_path_install
3141 else
3142 # As a last resort, use the slow shell script. Don't cache a
3143 # value for INSTALL within a source directory, because that will
3144 # break other packages using the cache if that directory is
3145 # removed, or if the value is a relative name.
3146 INSTALL=$ac_install_sh
3147 fi
3148 fi
3149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3150 $as_echo "$INSTALL" >&6; }
3151  
3152 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3153 # It thinks the first close brace ends the variable substitution.
3154 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3155  
3156 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3157  
3158 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3159  
3160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3161 $as_echo_n "checking whether build environment is sane... " >&6; }
3162 # Reject unsafe characters in $srcdir or the absolute working directory
3163 # name. Accept space and tab only in the latter.
3164 am_lf='
3165 '
3166 case `pwd` in
3167 *[\\\"\#\$\&\'\`$am_lf]*)
3168 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3169 esac
3170 case $srcdir in
3171 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3172 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3173 esac
3174  
3175 # Do 'set' in a subshell so we don't clobber the current shell's
3176 # arguments. Must try -L first in case configure is actually a
3177 # symlink; some systems play weird games with the mod time of symlinks
3178 # (eg FreeBSD returns the mod time of the symlink's containing
3179 # directory).
3180 if (
3181 am_has_slept=no
3182 for am_try in 1 2; do
3183 echo "timestamp, slept: $am_has_slept" > conftest.file
3184 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3185 if test "$*" = "X"; then
3186 # -L didn't work.
3187 set X `ls -t "$srcdir/configure" conftest.file`
3188 fi
3189 if test "$*" != "X $srcdir/configure conftest.file" \
3190 && test "$*" != "X conftest.file $srcdir/configure"; then
3191  
3192 # If neither matched, then we have a broken ls. This can happen
3193 # if, for instance, CONFIG_SHELL is bash and it inherits a
3194 # broken ls alias from the environment. This has actually
3195 # happened. Such a system could not be considered "sane".
3196 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
3197 alias in your environment" "$LINENO" 5
3198 fi
3199 if test "$2" = conftest.file || test $am_try -eq 2; then
3200 break
3201 fi
3202 # Just in case.
3203 sleep 1
3204 am_has_slept=yes
3205 done
3206 test "$2" = conftest.file
3207 )
3208 then
3209 # Ok.
3210 :
3211 else
3212 as_fn_error $? "newly created file is older than distributed files!
3213 Check your system clock" "$LINENO" 5
3214 fi
3215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3216 $as_echo "yes" >&6; }
3217 # If we didn't sleep, we still need to ensure time stamps of config.status and
3218 # generated files are strictly newer.
3219 am_sleep_pid=
3220 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3221 ( sleep 1 ) &
3222 am_sleep_pid=$!
3223 fi
3224  
3225 rm -f conftest.file
3226  
3227 test "$program_prefix" != NONE &&
3228 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3229 # Use a double $ so make ignores it.
3230 test "$program_suffix" != NONE &&
3231 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3232 # Double any \ or $.
3233 # By default was `s,x,x', remove it if useless.
3234 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3235 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3236  
3237 # Expand $ac_aux_dir to an absolute path.
3238 am_aux_dir=`cd "$ac_aux_dir" && pwd`
3239  
3240 if test x"${MISSING+set}" != xset; then
3241 case $am_aux_dir in
3242 *\ * | *\ *)
3243 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3244 *)
3245 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3246 esac
3247 fi
3248 # Use eval to expand $SHELL
3249 if eval "$MISSING --is-lightweight"; then
3250 am_missing_run="$MISSING "
3251 else
3252 am_missing_run=
3253 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3254 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3255 fi
3256  
3257 if test x"${install_sh+set}" != xset; then
3258 case $am_aux_dir in
3259 *\ * | *\ *)
3260 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3261 *)
3262 install_sh="\${SHELL} $am_aux_dir/install-sh"
3263 esac
3264 fi
3265  
3266 # Installed binaries are usually stripped using 'strip' when the user
3267 # run "make install-strip". However 'strip' might not be the right
3268 # tool to use in cross-compilation environments, therefore Automake
3269 # will honor the 'STRIP' environment variable to overrule this program.
3270 if test "$cross_compiling" != no; then
3271 if test -n "$ac_tool_prefix"; then
3272 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3273 set dummy ${ac_tool_prefix}strip; ac_word=$2
3274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3275 $as_echo_n "checking for $ac_word... " >&6; }
3276 if ${ac_cv_prog_STRIP+:} false; then :
3277 $as_echo_n "(cached) " >&6
3278 else
3279 if test -n "$STRIP"; then
3280 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3281 else
3282 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3283 for as_dir in $PATH
3284 do
3285 IFS=$as_save_IFS
3286 test -z "$as_dir" && as_dir=.
3287 for ac_exec_ext in '' $ac_executable_extensions; do
3288 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3289 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3290 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3291 break 2
3292 fi
3293 done
3294 done
3295 IFS=$as_save_IFS
3296  
3297 fi
3298 fi
3299 STRIP=$ac_cv_prog_STRIP
3300 if test -n "$STRIP"; then
3301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3302 $as_echo "$STRIP" >&6; }
3303 else
3304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3305 $as_echo "no" >&6; }
3306 fi
3307  
3308  
3309 fi
3310 if test -z "$ac_cv_prog_STRIP"; then
3311 ac_ct_STRIP=$STRIP
3312 # Extract the first word of "strip", so it can be a program name with args.
3313 set dummy strip; ac_word=$2
3314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3315 $as_echo_n "checking for $ac_word... " >&6; }
3316 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3317 $as_echo_n "(cached) " >&6
3318 else
3319 if test -n "$ac_ct_STRIP"; then
3320 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3321 else
3322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3323 for as_dir in $PATH
3324 do
3325 IFS=$as_save_IFS
3326 test -z "$as_dir" && as_dir=.
3327 for ac_exec_ext in '' $ac_executable_extensions; do
3328 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3329 ac_cv_prog_ac_ct_STRIP="strip"
3330 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3331 break 2
3332 fi
3333 done
3334 done
3335 IFS=$as_save_IFS
3336  
3337 fi
3338 fi
3339 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3340 if test -n "$ac_ct_STRIP"; then
3341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3342 $as_echo "$ac_ct_STRIP" >&6; }
3343 else
3344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3345 $as_echo "no" >&6; }
3346 fi
3347  
3348 if test "x$ac_ct_STRIP" = x; then
3349 STRIP=":"
3350 else
3351 case $cross_compiling:$ac_tool_warned in
3352 yes:)
3353 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3354 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3355 ac_tool_warned=yes ;;
3356 esac
3357 STRIP=$ac_ct_STRIP
3358 fi
3359 else
3360 STRIP="$ac_cv_prog_STRIP"
3361 fi
3362  
3363 fi
3364 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3365  
3366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3367 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3368 if test -z "$MKDIR_P"; then
3369 if ${ac_cv_path_mkdir+:} false; then :
3370 $as_echo_n "(cached) " >&6
3371 else
3372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3373 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3374 do
3375 IFS=$as_save_IFS
3376 test -z "$as_dir" && as_dir=.
3377 for ac_prog in mkdir gmkdir; do
3378 for ac_exec_ext in '' $ac_executable_extensions; do
3379 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3380 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3381 'mkdir (GNU coreutils) '* | \
3382 'mkdir (coreutils) '* | \
3383 'mkdir (fileutils) '4.1*)
3384 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3385 break 3;;
3386 esac
3387 done
3388 done
3389 done
3390 IFS=$as_save_IFS
3391  
3392 fi
3393  
3394 test -d ./--version && rmdir ./--version
3395 if test "${ac_cv_path_mkdir+set}" = set; then
3396 MKDIR_P="$ac_cv_path_mkdir -p"
3397 else
3398 # As a last resort, use the slow shell script. Don't cache a
3399 # value for MKDIR_P within a source directory, because that will
3400 # break other packages using the cache if that directory is
3401 # removed, or if the value is a relative name.
3402 MKDIR_P="$ac_install_sh -d"
3403 fi
3404 fi
3405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3406 $as_echo "$MKDIR_P" >&6; }
3407  
3408 for ac_prog in gawk mawk nawk awk
3409 do
3410 # Extract the first word of "$ac_prog", so it can be a program name with args.
3411 set dummy $ac_prog; ac_word=$2
3412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3413 $as_echo_n "checking for $ac_word... " >&6; }
3414 if ${ac_cv_prog_AWK+:} false; then :
3415 $as_echo_n "(cached) " >&6
3416 else
3417 if test -n "$AWK"; then
3418 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3419 else
3420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3421 for as_dir in $PATH
3422 do
3423 IFS=$as_save_IFS
3424 test -z "$as_dir" && as_dir=.
3425 for ac_exec_ext in '' $ac_executable_extensions; do
3426 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3427 ac_cv_prog_AWK="$ac_prog"
3428 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3429 break 2
3430 fi
3431 done
3432 done
3433 IFS=$as_save_IFS
3434  
3435 fi
3436 fi
3437 AWK=$ac_cv_prog_AWK
3438 if test -n "$AWK"; then
3439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3440 $as_echo "$AWK" >&6; }
3441 else
3442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3443 $as_echo "no" >&6; }
3444 fi
3445  
3446  
3447 test -n "$AWK" && break
3448 done
3449  
3450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3451 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3452 set x ${MAKE-make}
3453 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3454 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3455 $as_echo_n "(cached) " >&6
3456 else
3457 cat >conftest.make <<\_ACEOF
3458 SHELL = /bin/sh
3459 all:
3460 @echo '@@@%%%=$(MAKE)=@@@%%%'
3461 _ACEOF
3462 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3463 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3464 *@@@%%%=?*=@@@%%%*)
3465 eval ac_cv_prog_make_${ac_make}_set=yes;;
3466 *)
3467 eval ac_cv_prog_make_${ac_make}_set=no;;
3468 esac
3469 rm -f conftest.make
3470 fi
3471 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3473 $as_echo "yes" >&6; }
3474 SET_MAKE=
3475 else
3476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3477 $as_echo "no" >&6; }
3478 SET_MAKE="MAKE=${MAKE-make}"
3479 fi
3480  
3481 rm -rf .tst 2>/dev/null
3482 mkdir .tst 2>/dev/null
3483 if test -d .tst; then
3484 am__leading_dot=.
3485 else
3486 am__leading_dot=_
3487 fi
3488 rmdir .tst 2>/dev/null
3489  
3490 # Check whether --enable-silent-rules was given.
3491 if test "${enable_silent_rules+set}" = set; then :
3492 enableval=$enable_silent_rules;
3493 fi
3494  
3495 case $enable_silent_rules in # (((
3496 yes) AM_DEFAULT_VERBOSITY=0;;
3497 no) AM_DEFAULT_VERBOSITY=1;;
3498 *) AM_DEFAULT_VERBOSITY=1;;
3499 esac
3500 am_make=${MAKE-make}
3501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3502 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3503 if ${am_cv_make_support_nested_variables+:} false; then :
3504 $as_echo_n "(cached) " >&6
3505 else
3506 if $as_echo 'TRUE=$(BAR$(V))
3507 BAR0=false
3508 BAR1=true
3509 V=1
3510 am__doit:
3511 @$(TRUE)
3512 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3513 am_cv_make_support_nested_variables=yes
3514 else
3515 am_cv_make_support_nested_variables=no
3516 fi
3517 fi
3518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3519 $as_echo "$am_cv_make_support_nested_variables" >&6; }
3520 if test $am_cv_make_support_nested_variables = yes; then
3521 AM_V='$(V)'
3522 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3523 else
3524 AM_V=$AM_DEFAULT_VERBOSITY
3525 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3526 fi
3527 AM_BACKSLASH='\'
3528  
3529 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3530 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3531 # is not polluted with repeated "-I."
3532 am__isrc=' -I$(srcdir)'
3533 # test to see if srcdir already configured
3534 if test -f $srcdir/config.status; then
3535 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3536 fi
3537 fi
3538  
3539 # test whether we have cygpath
3540 if test -z "$CYGPATH_W"; then
3541 if (cygpath --version) >/dev/null 2>/dev/null; then
3542 CYGPATH_W='cygpath -w'
3543 else
3544 CYGPATH_W=echo
3545 fi
3546 fi
3547  
3548  
3549 # Define the identity of the package.
3550 PACKAGE='wireshark'
3551 VERSION='2.2.3'
3552  
3553  
3554 cat >>confdefs.h <<_ACEOF
3555 #define PACKAGE "$PACKAGE"
3556 _ACEOF
3557  
3558  
3559 cat >>confdefs.h <<_ACEOF
3560 #define VERSION "$VERSION"
3561 _ACEOF
3562  
3563 # Some tools Automake needs.
3564  
3565 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3566  
3567  
3568 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3569  
3570  
3571 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3572  
3573  
3574 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3575  
3576  
3577 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3578  
3579 # For better backward compatibility. To be removed once Automake 1.9.x
3580 # dies out for good. For more background, see:
3581 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3582 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3583 mkdir_p='$(MKDIR_P)'
3584  
3585 # We need awk for the "check" target (and possibly the TAP driver). The
3586 # system "awk" is bad on some platforms.
3587 # Always define AMTAR for backward compatibility. Yes, it's still used
3588 # in the wild :-( We should find a proper way to deprecate it ...
3589 AMTAR='$${TAR-tar}'
3590  
3591  
3592 # We'll loop over all known methods to create a tar archive until one works.
3593 _am_tools='gnutar plaintar pax cpio none'
3594  
3595 # The POSIX 1988 'ustar' format is defined with fixed-size fields.
3596 # There is notably a 21 bits limit for the UID and the GID. In fact,
3597 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
3598 # and bug#13588).
3599 am_max_uid=2097151 # 2^21 - 1
3600 am_max_gid=$am_max_uid
3601 # The $UID and $GID variables are not portable, so we need to resort
3602 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
3603 # below are definitely unexpected, so allow the users to see them
3604 # (that is, avoid stderr redirection).
3605 am_uid=`id -u || echo unknown`
3606 am_gid=`id -g || echo unknown`
3607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5
3608 $as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; }
3609 if test $am_uid -le $am_max_uid; then
3610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3611 $as_echo "yes" >&6; }
3612 else
3613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3614 $as_echo "no" >&6; }
3615 _am_tools=none
3616 fi
3617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5
3618 $as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; }
3619 if test $am_gid -le $am_max_gid; then
3620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3621 $as_echo "yes" >&6; }
3622 else
3623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3624 $as_echo "no" >&6; }
3625 _am_tools=none
3626 fi
3627  
3628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
3629 $as_echo_n "checking how to create a ustar tar archive... " >&6; }
3630  
3631 # Go ahead even if we have the value already cached. We do so because we
3632 # need to set the values for the 'am__tar' and 'am__untar' variables.
3633 _am_tools=${am_cv_prog_tar_ustar-$_am_tools}
3634  
3635 for _am_tool in $_am_tools; do
3636 case $_am_tool in
3637 gnutar)
3638 for _am_tar in tar gnutar gtar; do
3639 { echo "$as_me:$LINENO: $_am_tar --version" >&5
3640 ($_am_tar --version) >&5 2>&5
3641 ac_status=$?
3642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3643 (exit $ac_status); } && break
3644 done
3645 am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
3646 am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
3647 am__untar="$_am_tar -xf -"
3648 ;;
3649 plaintar)
3650 # Must skip GNU tar: if it does not support --format= it doesn't create
3651 # ustar tarball either.
3652 (tar --version) >/dev/null 2>&1 && continue
3653 am__tar='tar chf - "$$tardir"'
3654 am__tar_='tar chf - "$tardir"'
3655 am__untar='tar xf -'
3656 ;;
3657 pax)
3658 am__tar='pax -L -x ustar -w "$$tardir"'
3659 am__tar_='pax -L -x ustar -w "$tardir"'
3660 am__untar='pax -r'
3661 ;;
3662 cpio)
3663 am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
3664 am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
3665 am__untar='cpio -i -H ustar -d'
3666 ;;
3667 none)
3668 am__tar=false
3669 am__tar_=false
3670 am__untar=false
3671 ;;
3672 esac
3673  
3674 # If the value was cached, stop now. We just wanted to have am__tar
3675 # and am__untar set.
3676 test -n "${am_cv_prog_tar_ustar}" && break
3677  
3678 # tar/untar a dummy directory, and stop if the command works.
3679 rm -rf conftest.dir
3680 mkdir conftest.dir
3681 echo GrepMe > conftest.dir/file
3682 { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
3683 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
3684 ac_status=$?
3685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3686 (exit $ac_status); }
3687 rm -rf conftest.dir
3688 if test -s conftest.tar; then
3689 { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
3690 ($am__untar <conftest.tar) >&5 2>&5
3691 ac_status=$?
3692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3693 (exit $ac_status); }
3694 { echo "$as_me:$LINENO: cat conftest.dir/file" >&5
3695 (cat conftest.dir/file) >&5 2>&5
3696 ac_status=$?
3697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3698 (exit $ac_status); }
3699 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
3700 fi
3701 done
3702 rm -rf conftest.dir
3703  
3704 if ${am_cv_prog_tar_ustar+:} false; then :
3705 $as_echo_n "(cached) " >&6
3706 else
3707 am_cv_prog_tar_ustar=$_am_tool
3708 fi
3709  
3710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
3711 $as_echo "$am_cv_prog_tar_ustar" >&6; }
3712  
3713  
3714  
3715  
3716  
3717  
3718 # POSIX will say in a future version that running "rm -f" with no argument
3719 # is OK; and we want to be able to make that assumption in our Makefile
3720 # recipes. So use an aggressive probe to check that the usage we want is
3721 # actually supported "in the wild" to an acceptable degree.
3722 # See automake bug#10828.
3723 # To make any issue more visible, cause the running configure to be aborted
3724 # by default if the 'rm' program in use doesn't match our expectations; the
3725 # user can still override this though.
3726 if rm -f && rm -fr && rm -rf; then : OK; else
3727 cat >&2 <<'END'
3728 Oops!
3729  
3730 Your 'rm' program seems unable to run without file operands specified
3731 on the command line, even when the '-f' option is present. This is contrary
3732 to the behaviour of most rm programs out there, and not conforming with
3733 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3734  
3735 Please tell bug-automake@gnu.org about your system, including the value
3736 of your $PATH and any error possibly output before this message. This
3737 can help us improve future automake versions.
3738  
3739 END
3740 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3741 echo 'Configuration will proceed anyway, since you have set the' >&2
3742 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3743 echo >&2
3744 else
3745 cat >&2 <<'END'
3746 Aborting the configuration process, to ensure you take notice of the issue.
3747  
3748 You can download and install GNU coreutils to get an 'rm' implementation
3749 that behaves properly: <http://www.gnu.org/software/coreutils/>.
3750  
3751 If you want to complete the configuration process using your problematic
3752 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3753 to "yes", and re-run configure.
3754  
3755 END
3756 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3757 fi
3758 fi
3759  
3760  
3761 # Enable silent builds by default. Verbose builds can be enabled with "./configure
3762 # --enable-silent-rules ..." or "make V=1 ..."
3763 # Check whether --enable-silent-rules was given.
3764 if test "${enable_silent_rules+set}" = set; then :
3765 enableval=$enable_silent_rules;
3766 fi
3767  
3768 case $enable_silent_rules in # (((
3769 yes) AM_DEFAULT_VERBOSITY=0;;
3770 no) AM_DEFAULT_VERBOSITY=1;;
3771 *) AM_DEFAULT_VERBOSITY=0;;
3772 esac
3773 am_make=${MAKE-make}
3774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3775 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3776 if ${am_cv_make_support_nested_variables+:} false; then :
3777 $as_echo_n "(cached) " >&6
3778 else
3779 if $as_echo 'TRUE=$(BAR$(V))
3780 BAR0=false
3781 BAR1=true
3782 V=1
3783 am__doit:
3784 @$(TRUE)
3785 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3786 am_cv_make_support_nested_variables=yes
3787 else
3788 am_cv_make_support_nested_variables=no
3789 fi
3790 fi
3791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3792 $as_echo "$am_cv_make_support_nested_variables" >&6; }
3793 if test $am_cv_make_support_nested_variables = yes; then
3794 AM_V='$(V)'
3795 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3796 else
3797 AM_V=$AM_DEFAULT_VERBOSITY
3798 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3799 fi
3800 AM_BACKSLASH='\'
3801  
3802  
3803 # Make Wireshark's version available in config.h
3804  
3805 $as_echo "#define VERSION_MAJOR 2" >>confdefs.h
3806  
3807  
3808 $as_echo "#define VERSION_MINOR 2" >>confdefs.h
3809  
3810  
3811 $as_echo "#define VERSION_MICRO 3" >>confdefs.h
3812  
3813  
3814  
3815  
3816 case `pwd` in
3817 *\ * | *\ *)
3818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
3819 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
3820 esac
3821  
3822  
3823  
3824 macro_version='2.4.6'
3825 macro_revision='2.4.6'
3826  
3827  
3828  
3829  
3830  
3831  
3832  
3833  
3834  
3835  
3836  
3837  
3838  
3839 ltmain=$ac_aux_dir/ltmain.sh
3840  
3841 # Backslashify metacharacters that are still active within
3842 # double-quoted strings.
3843 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
3844  
3845 # Same as above, but do not quote variable references.
3846 double_quote_subst='s/\(["`\\]\)/\\\1/g'
3847  
3848 # Sed substitution to delay expansion of an escaped shell variable in a
3849 # double_quote_subst'ed string.
3850 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
3851  
3852 # Sed substitution to delay expansion of an escaped single quote.
3853 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
3854  
3855 # Sed substitution to avoid accidental globbing in evaled expressions
3856 no_glob_subst='s/\*/\\\*/g'
3857  
3858 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3859 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3860 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3861  
3862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
3863 $as_echo_n "checking how to print strings... " >&6; }
3864 # Test print first, because it will be a builtin if present.
3865 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
3866 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
3867 ECHO='print -r --'
3868 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
3869 ECHO='printf %s\n'
3870 else
3871 # Use this function as a fallback that always works.
3872 func_fallback_echo ()
3873 {
3874 eval 'cat <<_LTECHO_EOF
3875 $1
3876 _LTECHO_EOF'
3877 }
3878 ECHO='func_fallback_echo'
3879 fi
3880  
3881 # func_echo_all arg...
3882 # Invoke $ECHO with all args, space-separated.
3883 func_echo_all ()
3884 {
3885 $ECHO ""
3886 }
3887  
3888 case $ECHO in
3889 printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
3890 $as_echo "printf" >&6; } ;;
3891 print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
3892 $as_echo "print -r" >&6; } ;;
3893 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
3894 $as_echo "cat" >&6; } ;;
3895 esac
3896  
3897  
3898  
3899  
3900  
3901  
3902  
3903  
3904  
3905  
3906  
3907  
3908  
3909  
3910 DEPDIR="${am__leading_dot}deps"
3911  
3912 ac_config_commands="$ac_config_commands depfiles"
3913  
3914  
3915 am_make=${MAKE-make}
3916 cat > confinc << 'END'
3917 am__doit:
3918 @echo this is the am__doit target
3919 .PHONY: am__doit
3920 END
3921 # If we don't find an include directive, just comment out the code.
3922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
3923 $as_echo_n "checking for style of include used by $am_make... " >&6; }
3924 am__include="#"
3925 am__quote=
3926 _am_result=none
3927 # First try GNU make style include.
3928 echo "include confinc" > confmf
3929 # Ignore all kinds of additional output from 'make'.
3930 case `$am_make -s -f confmf 2> /dev/null` in #(
3931 *the\ am__doit\ target*)
3932 am__include=include
3933 am__quote=
3934 _am_result=GNU
3935 ;;
3936 esac
3937 # Now try BSD make style include.
3938 if test "$am__include" = "#"; then
3939 echo '.include "confinc"' > confmf
3940 case `$am_make -s -f confmf 2> /dev/null` in #(
3941 *the\ am__doit\ target*)
3942 am__include=.include
3943 am__quote="\""
3944 _am_result=BSD
3945 ;;
3946 esac
3947 fi
3948  
3949  
3950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
3951 $as_echo "$_am_result" >&6; }
3952 rm -f confinc confmf
3953  
3954 # Check whether --enable-dependency-tracking was given.
3955 if test "${enable_dependency_tracking+set}" = set; then :
3956 enableval=$enable_dependency_tracking;
3957 fi
3958  
3959 if test "x$enable_dependency_tracking" != xno; then
3960 am_depcomp="$ac_aux_dir/depcomp"
3961 AMDEPBACKSLASH='\'
3962 am__nodep='_no'
3963 fi
3964 if test "x$enable_dependency_tracking" != xno; then
3965 AMDEP_TRUE=
3966 AMDEP_FALSE='#'
3967 else
3968 AMDEP_TRUE='#'
3969 AMDEP_FALSE=
3970 fi
3971  
3972  
3973 ac_ext=c
3974 ac_cpp='$CPP $CPPFLAGS'
3975 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3976 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3977 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3978 if test -n "$ac_tool_prefix"; then
3979 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3980 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3982 $as_echo_n "checking for $ac_word... " >&6; }
3983 if ${ac_cv_prog_CC+:} false; then :
3984 $as_echo_n "(cached) " >&6
3985 else
3986 if test -n "$CC"; then
3987 ac_cv_prog_CC="$CC" # Let the user override the test.
3988 else
3989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3990 for as_dir in $PATH
3991 do
3992 IFS=$as_save_IFS
3993 test -z "$as_dir" && as_dir=.
3994 for ac_exec_ext in '' $ac_executable_extensions; do
3995 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3996 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3997 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3998 break 2
3999 fi
4000 done
4001 done
4002 IFS=$as_save_IFS
4003  
4004 fi
4005 fi
4006 CC=$ac_cv_prog_CC
4007 if test -n "$CC"; then
4008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4009 $as_echo "$CC" >&6; }
4010 else
4011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4012 $as_echo "no" >&6; }
4013 fi
4014  
4015  
4016 fi
4017 if test -z "$ac_cv_prog_CC"; then
4018 ac_ct_CC=$CC
4019 # Extract the first word of "gcc", so it can be a program name with args.
4020 set dummy gcc; ac_word=$2
4021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4022 $as_echo_n "checking for $ac_word... " >&6; }
4023 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4024 $as_echo_n "(cached) " >&6
4025 else
4026 if test -n "$ac_ct_CC"; then
4027 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4028 else
4029 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4030 for as_dir in $PATH
4031 do
4032 IFS=$as_save_IFS
4033 test -z "$as_dir" && as_dir=.
4034 for ac_exec_ext in '' $ac_executable_extensions; do
4035 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4036 ac_cv_prog_ac_ct_CC="gcc"
4037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4038 break 2
4039 fi
4040 done
4041 done
4042 IFS=$as_save_IFS
4043  
4044 fi
4045 fi
4046 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4047 if test -n "$ac_ct_CC"; then
4048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4049 $as_echo "$ac_ct_CC" >&6; }
4050 else
4051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4052 $as_echo "no" >&6; }
4053 fi
4054  
4055 if test "x$ac_ct_CC" = x; then
4056 CC=""
4057 else
4058 case $cross_compiling:$ac_tool_warned in
4059 yes:)
4060 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4061 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4062 ac_tool_warned=yes ;;
4063 esac
4064 CC=$ac_ct_CC
4065 fi
4066 else
4067 CC="$ac_cv_prog_CC"
4068 fi
4069  
4070 if test -z "$CC"; then
4071 if test -n "$ac_tool_prefix"; then
4072 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4073 set dummy ${ac_tool_prefix}cc; ac_word=$2
4074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4075 $as_echo_n "checking for $ac_word... " >&6; }
4076 if ${ac_cv_prog_CC+:} false; then :
4077 $as_echo_n "(cached) " >&6
4078 else
4079 if test -n "$CC"; then
4080 ac_cv_prog_CC="$CC" # Let the user override the test.
4081 else
4082 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4083 for as_dir in $PATH
4084 do
4085 IFS=$as_save_IFS
4086 test -z "$as_dir" && as_dir=.
4087 for ac_exec_ext in '' $ac_executable_extensions; do
4088 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4089 ac_cv_prog_CC="${ac_tool_prefix}cc"
4090 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4091 break 2
4092 fi
4093 done
4094 done
4095 IFS=$as_save_IFS
4096  
4097 fi
4098 fi
4099 CC=$ac_cv_prog_CC
4100 if test -n "$CC"; then
4101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4102 $as_echo "$CC" >&6; }
4103 else
4104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4105 $as_echo "no" >&6; }
4106 fi
4107  
4108  
4109 fi
4110 fi
4111 if test -z "$CC"; then
4112 # Extract the first word of "cc", so it can be a program name with args.
4113 set dummy cc; ac_word=$2
4114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4115 $as_echo_n "checking for $ac_word... " >&6; }
4116 if ${ac_cv_prog_CC+:} false; then :
4117 $as_echo_n "(cached) " >&6
4118 else
4119 if test -n "$CC"; then
4120 ac_cv_prog_CC="$CC" # Let the user override the test.
4121 else
4122 ac_prog_rejected=no
4123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4124 for as_dir in $PATH
4125 do
4126 IFS=$as_save_IFS
4127 test -z "$as_dir" && as_dir=.
4128 for ac_exec_ext in '' $ac_executable_extensions; do
4129 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4130 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4131 ac_prog_rejected=yes
4132 continue
4133 fi
4134 ac_cv_prog_CC="cc"
4135 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4136 break 2
4137 fi
4138 done
4139 done
4140 IFS=$as_save_IFS
4141  
4142 if test $ac_prog_rejected = yes; then
4143 # We found a bogon in the path, so make sure we never use it.
4144 set dummy $ac_cv_prog_CC
4145 shift
4146 if test $# != 0; then
4147 # We chose a different compiler from the bogus one.
4148 # However, it has the same basename, so the bogon will be chosen
4149 # first if we set CC to just the basename; use the full file name.
4150 shift
4151 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4152 fi
4153 fi
4154 fi
4155 fi
4156 CC=$ac_cv_prog_CC
4157 if test -n "$CC"; then
4158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4159 $as_echo "$CC" >&6; }
4160 else
4161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4162 $as_echo "no" >&6; }
4163 fi
4164  
4165  
4166 fi
4167 if test -z "$CC"; then
4168 if test -n "$ac_tool_prefix"; then
4169 for ac_prog in cl.exe
4170 do
4171 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4172 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4174 $as_echo_n "checking for $ac_word... " >&6; }
4175 if ${ac_cv_prog_CC+:} false; then :
4176 $as_echo_n "(cached) " >&6
4177 else
4178 if test -n "$CC"; then
4179 ac_cv_prog_CC="$CC" # Let the user override the test.
4180 else
4181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4182 for as_dir in $PATH
4183 do
4184 IFS=$as_save_IFS
4185 test -z "$as_dir" && as_dir=.
4186 for ac_exec_ext in '' $ac_executable_extensions; do
4187 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4188 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4189 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4190 break 2
4191 fi
4192 done
4193 done
4194 IFS=$as_save_IFS
4195  
4196 fi
4197 fi
4198 CC=$ac_cv_prog_CC
4199 if test -n "$CC"; then
4200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4201 $as_echo "$CC" >&6; }
4202 else
4203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4204 $as_echo "no" >&6; }
4205 fi
4206  
4207  
4208 test -n "$CC" && break
4209 done
4210 fi
4211 if test -z "$CC"; then
4212 ac_ct_CC=$CC
4213 for ac_prog in cl.exe
4214 do
4215 # Extract the first word of "$ac_prog", so it can be a program name with args.
4216 set dummy $ac_prog; ac_word=$2
4217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4218 $as_echo_n "checking for $ac_word... " >&6; }
4219 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4220 $as_echo_n "(cached) " >&6
4221 else
4222 if test -n "$ac_ct_CC"; then
4223 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4224 else
4225 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4226 for as_dir in $PATH
4227 do
4228 IFS=$as_save_IFS
4229 test -z "$as_dir" && as_dir=.
4230 for ac_exec_ext in '' $ac_executable_extensions; do
4231 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4232 ac_cv_prog_ac_ct_CC="$ac_prog"
4233 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4234 break 2
4235 fi
4236 done
4237 done
4238 IFS=$as_save_IFS
4239  
4240 fi
4241 fi
4242 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4243 if test -n "$ac_ct_CC"; then
4244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4245 $as_echo "$ac_ct_CC" >&6; }
4246 else
4247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4248 $as_echo "no" >&6; }
4249 fi
4250  
4251  
4252 test -n "$ac_ct_CC" && break
4253 done
4254  
4255 if test "x$ac_ct_CC" = x; then
4256 CC=""
4257 else
4258 case $cross_compiling:$ac_tool_warned in
4259 yes:)
4260 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4261 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4262 ac_tool_warned=yes ;;
4263 esac
4264 CC=$ac_ct_CC
4265 fi
4266 fi
4267  
4268 fi
4269  
4270  
4271 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4272 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4273 as_fn_error $? "no acceptable C compiler found in \$PATH
4274 See \`config.log' for more details" "$LINENO" 5; }
4275  
4276 # Provide some information about the compiler.
4277 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4278 set X $ac_compile
4279 ac_compiler=$2
4280 for ac_option in --version -v -V -qversion; do
4281 { { ac_try="$ac_compiler $ac_option >&5"
4282 case "(($ac_try" in
4283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4284 *) ac_try_echo=$ac_try;;
4285 esac
4286 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4287 $as_echo "$ac_try_echo"; } >&5
4288 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4289 ac_status=$?
4290 if test -s conftest.err; then
4291 sed '10a\
4292 ... rest of stderr output deleted ...
4293 10q' conftest.err >conftest.er1
4294 cat conftest.er1 >&5
4295 fi
4296 rm -f conftest.er1 conftest.err
4297 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4298 test $ac_status = 0; }
4299 done
4300  
4301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4302 /* end confdefs.h. */
4303  
4304 int
4305 main ()
4306 {
4307  
4308 ;
4309 return 0;
4310 }
4311 _ACEOF
4312 ac_clean_files_save=$ac_clean_files
4313 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4314 # Try to create an executable without -o first, disregard a.out.
4315 # It will help us diagnose broken compilers, and finding out an intuition
4316 # of exeext.
4317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4318 $as_echo_n "checking whether the C compiler works... " >&6; }
4319 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4320  
4321 # The possible output files:
4322 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4323  
4324 ac_rmfiles=
4325 for ac_file in $ac_files
4326 do
4327 case $ac_file in
4328 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4329 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4330 esac
4331 done
4332 rm -f $ac_rmfiles
4333  
4334 if { { ac_try="$ac_link_default"
4335 case "(($ac_try" in
4336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4337 *) ac_try_echo=$ac_try;;
4338 esac
4339 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4340 $as_echo "$ac_try_echo"; } >&5
4341 (eval "$ac_link_default") 2>&5
4342 ac_status=$?
4343 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4344 test $ac_status = 0; }; then :
4345 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4346 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4347 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4348 # so that the user can short-circuit this test for compilers unknown to
4349 # Autoconf.
4350 for ac_file in $ac_files ''
4351 do
4352 test -f "$ac_file" || continue
4353 case $ac_file in
4354 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4355 ;;
4356 [ab].out )
4357 # We found the default executable, but exeext='' is most
4358 # certainly right.
4359 break;;
4360 *.* )
4361 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4362 then :; else
4363 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4364 fi
4365 # We set ac_cv_exeext here because the later test for it is not
4366 # safe: cross compilers may not add the suffix if given an `-o'
4367 # argument, so we may need to know it at that point already.
4368 # Even if this section looks crufty: it has the advantage of
4369 # actually working.
4370 break;;
4371 * )
4372 break;;
4373 esac
4374 done
4375 test "$ac_cv_exeext" = no && ac_cv_exeext=
4376  
4377 else
4378 ac_file=''
4379 fi
4380 if test -z "$ac_file"; then :
4381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4382 $as_echo "no" >&6; }
4383 $as_echo "$as_me: failed program was:" >&5
4384 sed 's/^/| /' conftest.$ac_ext >&5
4385  
4386 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4387 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4388 as_fn_error 77 "C compiler cannot create executables
4389 See \`config.log' for more details" "$LINENO" 5; }
4390 else
4391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4392 $as_echo "yes" >&6; }
4393 fi
4394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4395 $as_echo_n "checking for C compiler default output file name... " >&6; }
4396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4397 $as_echo "$ac_file" >&6; }
4398 ac_exeext=$ac_cv_exeext
4399  
4400 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4401 ac_clean_files=$ac_clean_files_save
4402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4403 $as_echo_n "checking for suffix of executables... " >&6; }
4404 if { { ac_try="$ac_link"
4405 case "(($ac_try" in
4406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4407 *) ac_try_echo=$ac_try;;
4408 esac
4409 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4410 $as_echo "$ac_try_echo"; } >&5
4411 (eval "$ac_link") 2>&5
4412 ac_status=$?
4413 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4414 test $ac_status = 0; }; then :
4415 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4416 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4417 # work properly (i.e., refer to `conftest.exe'), while it won't with
4418 # `rm'.
4419 for ac_file in conftest.exe conftest conftest.*; do
4420 test -f "$ac_file" || continue
4421 case $ac_file in
4422 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4423 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4424 break;;
4425 * ) break;;
4426 esac
4427 done
4428 else
4429 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4430 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4431 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4432 See \`config.log' for more details" "$LINENO" 5; }
4433 fi
4434 rm -f conftest conftest$ac_cv_exeext
4435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4436 $as_echo "$ac_cv_exeext" >&6; }
4437  
4438 rm -f conftest.$ac_ext
4439 EXEEXT=$ac_cv_exeext
4440 ac_exeext=$EXEEXT
4441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4442 /* end confdefs.h. */
4443 #include <stdio.h>
4444 int
4445 main ()
4446 {
4447 FILE *f = fopen ("conftest.out", "w");
4448 return ferror (f) || fclose (f) != 0;
4449  
4450 ;
4451 return 0;
4452 }
4453 _ACEOF
4454 ac_clean_files="$ac_clean_files conftest.out"
4455 # Check that the compiler produces executables we can run. If not, either
4456 # the compiler is broken, or we cross compile.
4457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4458 $as_echo_n "checking whether we are cross compiling... " >&6; }
4459 if test "$cross_compiling" != yes; then
4460 { { ac_try="$ac_link"
4461 case "(($ac_try" in
4462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4463 *) ac_try_echo=$ac_try;;
4464 esac
4465 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4466 $as_echo "$ac_try_echo"; } >&5
4467 (eval "$ac_link") 2>&5
4468 ac_status=$?
4469 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4470 test $ac_status = 0; }
4471 if { ac_try='./conftest$ac_cv_exeext'
4472 { { case "(($ac_try" in
4473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4474 *) ac_try_echo=$ac_try;;
4475 esac
4476 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4477 $as_echo "$ac_try_echo"; } >&5
4478 (eval "$ac_try") 2>&5
4479 ac_status=$?
4480 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4481 test $ac_status = 0; }; }; then
4482 cross_compiling=no
4483 else
4484 if test "$cross_compiling" = maybe; then
4485 cross_compiling=yes
4486 else
4487 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4488 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4489 as_fn_error $? "cannot run C compiled programs.
4490 If you meant to cross compile, use \`--host'.
4491 See \`config.log' for more details" "$LINENO" 5; }
4492 fi
4493 fi
4494 fi
4495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4496 $as_echo "$cross_compiling" >&6; }
4497  
4498 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4499 ac_clean_files=$ac_clean_files_save
4500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4501 $as_echo_n "checking for suffix of object files... " >&6; }
4502 if ${ac_cv_objext+:} false; then :
4503 $as_echo_n "(cached) " >&6
4504 else
4505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4506 /* end confdefs.h. */
4507  
4508 int
4509 main ()
4510 {
4511  
4512 ;
4513 return 0;
4514 }
4515 _ACEOF
4516 rm -f conftest.o conftest.obj
4517 if { { ac_try="$ac_compile"
4518 case "(($ac_try" in
4519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4520 *) ac_try_echo=$ac_try;;
4521 esac
4522 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4523 $as_echo "$ac_try_echo"; } >&5
4524 (eval "$ac_compile") 2>&5
4525 ac_status=$?
4526 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4527 test $ac_status = 0; }; then :
4528 for ac_file in conftest.o conftest.obj conftest.*; do
4529 test -f "$ac_file" || continue;
4530 case $ac_file in
4531 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4532 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4533 break;;
4534 esac
4535 done
4536 else
4537 $as_echo "$as_me: failed program was:" >&5
4538 sed 's/^/| /' conftest.$ac_ext >&5
4539  
4540 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4541 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4542 as_fn_error $? "cannot compute suffix of object files: cannot compile
4543 See \`config.log' for more details" "$LINENO" 5; }
4544 fi
4545 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4546 fi
4547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4548 $as_echo "$ac_cv_objext" >&6; }
4549 OBJEXT=$ac_cv_objext
4550 ac_objext=$OBJEXT
4551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4552 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4553 if ${ac_cv_c_compiler_gnu+:} false; then :
4554 $as_echo_n "(cached) " >&6
4555 else
4556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4557 /* end confdefs.h. */
4558  
4559 int
4560 main ()
4561 {
4562 #ifndef __GNUC__
4563 choke me
4564 #endif
4565  
4566 ;
4567 return 0;
4568 }
4569 _ACEOF
4570 if ac_fn_c_try_compile "$LINENO"; then :
4571 ac_compiler_gnu=yes
4572 else
4573 ac_compiler_gnu=no
4574 fi
4575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4576 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4577  
4578 fi
4579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4580 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4581 if test $ac_compiler_gnu = yes; then
4582 GCC=yes
4583 else
4584 GCC=
4585 fi
4586 ac_test_CFLAGS=${CFLAGS+set}
4587 ac_save_CFLAGS=$CFLAGS
4588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4589 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4590 if ${ac_cv_prog_cc_g+:} false; then :
4591 $as_echo_n "(cached) " >&6
4592 else
4593 ac_save_c_werror_flag=$ac_c_werror_flag
4594 ac_c_werror_flag=yes
4595 ac_cv_prog_cc_g=no
4596 CFLAGS="-g"
4597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4598 /* end confdefs.h. */
4599  
4600 int
4601 main ()
4602 {
4603  
4604 ;
4605 return 0;
4606 }
4607 _ACEOF
4608 if ac_fn_c_try_compile "$LINENO"; then :
4609 ac_cv_prog_cc_g=yes
4610 else
4611 CFLAGS=""
4612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4613 /* end confdefs.h. */
4614  
4615 int
4616 main ()
4617 {
4618  
4619 ;
4620 return 0;
4621 }
4622 _ACEOF
4623 if ac_fn_c_try_compile "$LINENO"; then :
4624  
4625 else
4626 ac_c_werror_flag=$ac_save_c_werror_flag
4627 CFLAGS="-g"
4628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4629 /* end confdefs.h. */
4630  
4631 int
4632 main ()
4633 {
4634  
4635 ;
4636 return 0;
4637 }
4638 _ACEOF
4639 if ac_fn_c_try_compile "$LINENO"; then :
4640 ac_cv_prog_cc_g=yes
4641 fi
4642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4643 fi
4644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4645 fi
4646 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4647 ac_c_werror_flag=$ac_save_c_werror_flag
4648 fi
4649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4650 $as_echo "$ac_cv_prog_cc_g" >&6; }
4651 if test "$ac_test_CFLAGS" = set; then
4652 CFLAGS=$ac_save_CFLAGS
4653 elif test $ac_cv_prog_cc_g = yes; then
4654 if test "$GCC" = yes; then
4655 CFLAGS="-g -O2"
4656 else
4657 CFLAGS="-g"
4658 fi
4659 else
4660 if test "$GCC" = yes; then
4661 CFLAGS="-O2"
4662 else
4663 CFLAGS=
4664 fi
4665 fi
4666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4667 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4668 if ${ac_cv_prog_cc_c89+:} false; then :
4669 $as_echo_n "(cached) " >&6
4670 else
4671 ac_cv_prog_cc_c89=no
4672 ac_save_CC=$CC
4673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4674 /* end confdefs.h. */
4675 #include <stdarg.h>
4676 #include <stdio.h>
4677 struct stat;
4678 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4679 struct buf { int x; };
4680 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4681 static char *e (p, i)
4682 char **p;
4683 int i;
4684 {
4685 return p[i];
4686 }
4687 static char *f (char * (*g) (char **, int), char **p, ...)
4688 {
4689 char *s;
4690 va_list v;
4691 va_start (v,p);
4692 s = g (p, va_arg (v,int));
4693 va_end (v);
4694 return s;
4695 }
4696  
4697 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4698 function prototypes and stuff, but not '\xHH' hex character constants.
4699 These don't provoke an error unfortunately, instead are silently treated
4700 as 'x'. The following induces an error, until -std is added to get
4701 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4702 array size at least. It's necessary to write '\x00'==0 to get something
4703 that's true only with -std. */
4704 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4705  
4706 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4707 inside strings and character constants. */
4708 #define FOO(x) 'x'
4709 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4710  
4711 int test (int i, double x);
4712 struct s1 {int (*f) (int a);};
4713 struct s2 {int (*f) (double a);};
4714 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4715 int argc;
4716 char **argv;
4717 int
4718 main ()
4719 {
4720 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4721 ;
4722 return 0;
4723 }
4724 _ACEOF
4725 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4726 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4727 do
4728 CC="$ac_save_CC $ac_arg"
4729 if ac_fn_c_try_compile "$LINENO"; then :
4730 ac_cv_prog_cc_c89=$ac_arg
4731 fi
4732 rm -f core conftest.err conftest.$ac_objext
4733 test "x$ac_cv_prog_cc_c89" != "xno" && break
4734 done
4735 rm -f conftest.$ac_ext
4736 CC=$ac_save_CC
4737  
4738 fi
4739 # AC_CACHE_VAL
4740 case "x$ac_cv_prog_cc_c89" in
4741 x)
4742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4743 $as_echo "none needed" >&6; } ;;
4744 xno)
4745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4746 $as_echo "unsupported" >&6; } ;;
4747 *)
4748 CC="$CC $ac_cv_prog_cc_c89"
4749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4750 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4751 esac
4752 if test "x$ac_cv_prog_cc_c89" != xno; then :
4753  
4754 fi
4755  
4756 ac_ext=c
4757 ac_cpp='$CPP $CPPFLAGS'
4758 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4759 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4760 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4761  
4762 ac_ext=c
4763 ac_cpp='$CPP $CPPFLAGS'
4764 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4765 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4766 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4768 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4769 if ${am_cv_prog_cc_c_o+:} false; then :
4770 $as_echo_n "(cached) " >&6
4771 else
4772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4773 /* end confdefs.h. */
4774  
4775 int
4776 main ()
4777 {
4778  
4779 ;
4780 return 0;
4781 }
4782 _ACEOF
4783 # Make sure it works both with $CC and with simple cc.
4784 # Following AC_PROG_CC_C_O, we do the test twice because some
4785 # compilers refuse to overwrite an existing .o file with -o,
4786 # though they will create one.
4787 am_cv_prog_cc_c_o=yes
4788 for am_i in 1 2; do
4789 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4790 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4791 ac_status=$?
4792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4793 (exit $ac_status); } \
4794 && test -f conftest2.$ac_objext; then
4795 : OK
4796 else
4797 am_cv_prog_cc_c_o=no
4798 break
4799 fi
4800 done
4801 rm -f core conftest*
4802 unset am_i
4803 fi
4804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4805 $as_echo "$am_cv_prog_cc_c_o" >&6; }
4806 if test "$am_cv_prog_cc_c_o" != yes; then
4807 # Losing compiler, so override with the script.
4808 # FIXME: It is wrong to rewrite CC.
4809 # But if we don't then we get into trouble of one sort or another.
4810 # A longer-term fix would be to have automake use am__CC in this case,
4811 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4812 CC="$am_aux_dir/compile $CC"
4813 fi
4814 ac_ext=c
4815 ac_cpp='$CPP $CPPFLAGS'
4816 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4817 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4818 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4819  
4820  
4821 depcc="$CC" am_compiler_list=
4822  
4823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4824 $as_echo_n "checking dependency style of $depcc... " >&6; }
4825 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
4826 $as_echo_n "(cached) " >&6
4827 else
4828 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4829 # We make a subdir and do the tests there. Otherwise we can end up
4830 # making bogus files that we don't know about and never remove. For
4831 # instance it was reported that on HP-UX the gcc test will end up
4832 # making a dummy file named 'D' -- because '-MD' means "put the output
4833 # in D".
4834 rm -rf conftest.dir
4835 mkdir conftest.dir
4836 # Copy depcomp to subdir because otherwise we won't find it if we're
4837 # using a relative directory.
4838 cp "$am_depcomp" conftest.dir
4839 cd conftest.dir
4840 # We will build objects and dependencies in a subdirectory because
4841 # it helps to detect inapplicable dependency modes. For instance
4842 # both Tru64's cc and ICC support -MD to output dependencies as a
4843 # side effect of compilation, but ICC will put the dependencies in
4844 # the current directory while Tru64 will put them in the object
4845 # directory.
4846 mkdir sub
4847  
4848 am_cv_CC_dependencies_compiler_type=none
4849 if test "$am_compiler_list" = ""; then
4850 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4851 fi
4852 am__universal=false
4853 case " $depcc " in #(
4854 *\ -arch\ *\ -arch\ *) am__universal=true ;;
4855 esac
4856  
4857 for depmode in $am_compiler_list; do
4858 # Setup a source with many dependencies, because some compilers
4859 # like to wrap large dependency lists on column 80 (with \), and
4860 # we should not choose a depcomp mode which is confused by this.
4861 #
4862 # We need to recreate these files for each test, as the compiler may
4863 # overwrite some of them when testing with obscure command lines.
4864 # This happens at least with the AIX C compiler.
4865 : > sub/conftest.c
4866 for i in 1 2 3 4 5 6; do
4867 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4868 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4869 # Solaris 10 /bin/sh.
4870 echo '/* dummy */' > sub/conftst$i.h
4871 done
4872 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4873  
4874 # We check with '-c' and '-o' for the sake of the "dashmstdout"
4875 # mode. It turns out that the SunPro C++ compiler does not properly
4876 # handle '-M -o', and we need to detect this. Also, some Intel
4877 # versions had trouble with output in subdirs.
4878 am__obj=sub/conftest.${OBJEXT-o}
4879 am__minus_obj="-o $am__obj"
4880 case $depmode in
4881 gcc)
4882 # This depmode causes a compiler race in universal mode.
4883 test "$am__universal" = false || continue
4884 ;;
4885 nosideeffect)
4886 # After this tag, mechanisms are not by side-effect, so they'll
4887 # only be used when explicitly requested.
4888 if test "x$enable_dependency_tracking" = xyes; then
4889 continue
4890 else
4891 break
4892 fi
4893 ;;
4894 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4895 # This compiler won't grok '-c -o', but also, the minuso test has
4896 # not run yet. These depmodes are late enough in the game, and
4897 # so weak that their functioning should not be impacted.
4898 am__obj=conftest.${OBJEXT-o}
4899 am__minus_obj=
4900 ;;
4901 none) break ;;
4902 esac
4903 if depmode=$depmode \
4904 source=sub/conftest.c object=$am__obj \
4905 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4906 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4907 >/dev/null 2>conftest.err &&
4908 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4909 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4910 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4911 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4912 # icc doesn't choke on unknown options, it will just issue warnings
4913 # or remarks (even with -Werror). So we grep stderr for any message
4914 # that says an option was ignored or not supported.
4915 # When given -MP, icc 7.0 and 7.1 complain thusly:
4916 # icc: Command line warning: ignoring option '-M'; no argument required
4917 # The diagnosis changed in icc 8.0:
4918 # icc: Command line remark: option '-MP' not supported
4919 if (grep 'ignoring option' conftest.err ||
4920 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4921 am_cv_CC_dependencies_compiler_type=$depmode
4922 break
4923 fi
4924 fi
4925 done
4926  
4927 cd ..
4928 rm -rf conftest.dir
4929 else
4930 am_cv_CC_dependencies_compiler_type=none
4931 fi
4932  
4933 fi
4934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4935 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4936 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4937  
4938 if
4939 test "x$enable_dependency_tracking" != xno \
4940 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4941 am__fastdepCC_TRUE=
4942 am__fastdepCC_FALSE='#'
4943 else
4944 am__fastdepCC_TRUE='#'
4945 am__fastdepCC_FALSE=
4946 fi
4947  
4948  
4949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4950 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
4951 if ${ac_cv_path_SED+:} false; then :
4952 $as_echo_n "(cached) " >&6
4953 else
4954 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4955 for ac_i in 1 2 3 4 5 6 7; do
4956 ac_script="$ac_script$as_nl$ac_script"
4957 done
4958 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4959 { ac_script=; unset ac_script;}
4960 if test -z "$SED"; then
4961 ac_path_SED_found=false
4962 # Loop through the user's path and test for each of PROGNAME-LIST
4963 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4964 for as_dir in $PATH
4965 do
4966 IFS=$as_save_IFS
4967 test -z "$as_dir" && as_dir=.
4968 for ac_prog in sed gsed; do
4969 for ac_exec_ext in '' $ac_executable_extensions; do
4970 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4971 as_fn_executable_p "$ac_path_SED" || continue
4972 # Check for GNU ac_path_SED and select it if it is found.
4973 # Check for GNU $ac_path_SED
4974 case `"$ac_path_SED" --version 2>&1` in
4975 *GNU*)
4976 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4977 *)
4978 ac_count=0
4979 $as_echo_n 0123456789 >"conftest.in"
4980 while :
4981 do
4982 cat "conftest.in" "conftest.in" >"conftest.tmp"
4983 mv "conftest.tmp" "conftest.in"
4984 cp "conftest.in" "conftest.nl"
4985 $as_echo '' >> "conftest.nl"
4986 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4987 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4988 as_fn_arith $ac_count + 1 && ac_count=$as_val
4989 if test $ac_count -gt ${ac_path_SED_max-0}; then
4990 # Best one so far, save it but keep looking for a better one
4991 ac_cv_path_SED="$ac_path_SED"
4992 ac_path_SED_max=$ac_count
4993 fi
4994 # 10*(2^10) chars as input seems more than enough
4995 test $ac_count -gt 10 && break
4996 done
4997 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4998 esac
4999  
5000 $ac_path_SED_found && break 3
5001 done
5002 done
5003 done
5004 IFS=$as_save_IFS
5005 if test -z "$ac_cv_path_SED"; then
5006 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
5007 fi
5008 else
5009 ac_cv_path_SED=$SED
5010 fi
5011  
5012 fi
5013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
5014 $as_echo "$ac_cv_path_SED" >&6; }
5015 SED="$ac_cv_path_SED"
5016 rm -f conftest.sed
5017  
5018 test -z "$SED" && SED=sed
5019 Xsed="$SED -e 1s/^X//"
5020  
5021  
5022  
5023  
5024  
5025  
5026  
5027  
5028  
5029  
5030  
5031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5032 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5033 if ${ac_cv_path_GREP+:} false; then :
5034 $as_echo_n "(cached) " >&6
5035 else
5036 if test -z "$GREP"; then
5037 ac_path_GREP_found=false
5038 # Loop through the user's path and test for each of PROGNAME-LIST
5039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5040 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5041 do
5042 IFS=$as_save_IFS
5043 test -z "$as_dir" && as_dir=.
5044 for ac_prog in grep ggrep; do
5045 for ac_exec_ext in '' $ac_executable_extensions; do
5046 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5047 as_fn_executable_p "$ac_path_GREP" || continue
5048 # Check for GNU ac_path_GREP and select it if it is found.
5049 # Check for GNU $ac_path_GREP
5050 case `"$ac_path_GREP" --version 2>&1` in
5051 *GNU*)
5052 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5053 *)
5054 ac_count=0
5055 $as_echo_n 0123456789 >"conftest.in"
5056 while :
5057 do
5058 cat "conftest.in" "conftest.in" >"conftest.tmp"
5059 mv "conftest.tmp" "conftest.in"
5060 cp "conftest.in" "conftest.nl"
5061 $as_echo 'GREP' >> "conftest.nl"
5062 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5063 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5064 as_fn_arith $ac_count + 1 && ac_count=$as_val
5065 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5066 # Best one so far, save it but keep looking for a better one
5067 ac_cv_path_GREP="$ac_path_GREP"
5068 ac_path_GREP_max=$ac_count
5069 fi
5070 # 10*(2^10) chars as input seems more than enough
5071 test $ac_count -gt 10 && break
5072 done
5073 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5074 esac
5075  
5076 $ac_path_GREP_found && break 3
5077 done
5078 done
5079 done
5080 IFS=$as_save_IFS
5081 if test -z "$ac_cv_path_GREP"; then
5082 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5083 fi
5084 else
5085 ac_cv_path_GREP=$GREP
5086 fi
5087  
5088 fi
5089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5090 $as_echo "$ac_cv_path_GREP" >&6; }
5091 GREP="$ac_cv_path_GREP"
5092  
5093  
5094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5095 $as_echo_n "checking for egrep... " >&6; }
5096 if ${ac_cv_path_EGREP+:} false; then :
5097 $as_echo_n "(cached) " >&6
5098 else
5099 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5100 then ac_cv_path_EGREP="$GREP -E"
5101 else
5102 if test -z "$EGREP"; then
5103 ac_path_EGREP_found=false
5104 # Loop through the user's path and test for each of PROGNAME-LIST
5105 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5106 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5107 do
5108 IFS=$as_save_IFS
5109 test -z "$as_dir" && as_dir=.
5110 for ac_prog in egrep; do
5111 for ac_exec_ext in '' $ac_executable_extensions; do
5112 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5113 as_fn_executable_p "$ac_path_EGREP" || continue
5114 # Check for GNU ac_path_EGREP and select it if it is found.
5115 # Check for GNU $ac_path_EGREP
5116 case `"$ac_path_EGREP" --version 2>&1` in
5117 *GNU*)
5118 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5119 *)
5120 ac_count=0
5121 $as_echo_n 0123456789 >"conftest.in"
5122 while :
5123 do
5124 cat "conftest.in" "conftest.in" >"conftest.tmp"
5125 mv "conftest.tmp" "conftest.in"
5126 cp "conftest.in" "conftest.nl"
5127 $as_echo 'EGREP' >> "conftest.nl"
5128 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5129 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5130 as_fn_arith $ac_count + 1 && ac_count=$as_val
5131 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5132 # Best one so far, save it but keep looking for a better one
5133 ac_cv_path_EGREP="$ac_path_EGREP"
5134 ac_path_EGREP_max=$ac_count
5135 fi
5136 # 10*(2^10) chars as input seems more than enough
5137 test $ac_count -gt 10 && break
5138 done
5139 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5140 esac
5141  
5142 $ac_path_EGREP_found && break 3
5143 done
5144 done
5145 done
5146 IFS=$as_save_IFS
5147 if test -z "$ac_cv_path_EGREP"; then
5148 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5149 fi
5150 else
5151 ac_cv_path_EGREP=$EGREP
5152 fi
5153  
5154 fi
5155 fi
5156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5157 $as_echo "$ac_cv_path_EGREP" >&6; }
5158 EGREP="$ac_cv_path_EGREP"
5159  
5160  
5161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
5162 $as_echo_n "checking for fgrep... " >&6; }
5163 if ${ac_cv_path_FGREP+:} false; then :
5164 $as_echo_n "(cached) " >&6
5165 else
5166 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5167 then ac_cv_path_FGREP="$GREP -F"
5168 else
5169 if test -z "$FGREP"; then
5170 ac_path_FGREP_found=false
5171 # Loop through the user's path and test for each of PROGNAME-LIST
5172 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5173 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5174 do
5175 IFS=$as_save_IFS
5176 test -z "$as_dir" && as_dir=.
5177 for ac_prog in fgrep; do
5178 for ac_exec_ext in '' $ac_executable_extensions; do
5179 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
5180 as_fn_executable_p "$ac_path_FGREP" || continue
5181 # Check for GNU ac_path_FGREP and select it if it is found.
5182 # Check for GNU $ac_path_FGREP
5183 case `"$ac_path_FGREP" --version 2>&1` in
5184 *GNU*)
5185 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
5186 *)
5187 ac_count=0
5188 $as_echo_n 0123456789 >"conftest.in"
5189 while :
5190 do
5191 cat "conftest.in" "conftest.in" >"conftest.tmp"
5192 mv "conftest.tmp" "conftest.in"
5193 cp "conftest.in" "conftest.nl"
5194 $as_echo 'FGREP' >> "conftest.nl"
5195 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
5196 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5197 as_fn_arith $ac_count + 1 && ac_count=$as_val
5198 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
5199 # Best one so far, save it but keep looking for a better one
5200 ac_cv_path_FGREP="$ac_path_FGREP"
5201 ac_path_FGREP_max=$ac_count
5202 fi
5203 # 10*(2^10) chars as input seems more than enough
5204 test $ac_count -gt 10 && break
5205 done
5206 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5207 esac
5208  
5209 $ac_path_FGREP_found && break 3
5210 done
5211 done
5212 done
5213 IFS=$as_save_IFS
5214 if test -z "$ac_cv_path_FGREP"; then
5215 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5216 fi
5217 else
5218 ac_cv_path_FGREP=$FGREP
5219 fi
5220  
5221 fi
5222 fi
5223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
5224 $as_echo "$ac_cv_path_FGREP" >&6; }
5225 FGREP="$ac_cv_path_FGREP"
5226  
5227  
5228 test -z "$GREP" && GREP=grep
5229  
5230  
5231  
5232  
5233  
5234  
5235  
5236  
5237  
5238  
5239  
5240  
5241  
5242  
5243  
5244  
5245  
5246  
5247  
5248 # Check whether --with-gnu-ld was given.
5249 if test "${with_gnu_ld+set}" = set; then :
5250 withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
5251 else
5252 with_gnu_ld=no
5253 fi
5254  
5255 ac_prog=ld
5256 if test yes = "$GCC"; then
5257 # Check if gcc -print-prog-name=ld gives a path.
5258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
5259 $as_echo_n "checking for ld used by $CC... " >&6; }
5260 case $host in
5261 *-*-mingw*)
5262 # gcc leaves a trailing carriage return, which upsets mingw
5263 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5264 *)
5265 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5266 esac
5267 case $ac_prog in
5268 # Accept absolute paths.
5269 [\\/]* | ?:[\\/]*)
5270 re_direlt='/[^/][^/]*/\.\./'
5271 # Canonicalize the pathname of ld
5272 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
5273 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
5274 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
5275 done
5276 test -z "$LD" && LD=$ac_prog
5277 ;;
5278 "")
5279 # If it fails, then pretend we aren't using GCC.
5280 ac_prog=ld
5281 ;;
5282 *)
5283 # If it is relative, then search for the first ld in PATH.
5284 with_gnu_ld=unknown
5285 ;;
5286 esac
5287 elif test yes = "$with_gnu_ld"; then
5288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5289 $as_echo_n "checking for GNU ld... " >&6; }
5290 else
5291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
5292 $as_echo_n "checking for non-GNU ld... " >&6; }
5293 fi
5294 if ${lt_cv_path_LD+:} false; then :
5295 $as_echo_n "(cached) " >&6
5296 else
5297 if test -z "$LD"; then
5298 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
5299 for ac_dir in $PATH; do
5300 IFS=$lt_save_ifs
5301 test -z "$ac_dir" && ac_dir=.
5302 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5303 lt_cv_path_LD=$ac_dir/$ac_prog
5304 # Check to see if the program is GNU ld. I'd rather use --version,
5305 # but apparently some variants of GNU ld only accept -v.
5306 # Break only if it was the GNU/non-GNU ld that we prefer.
5307 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5308 *GNU* | *'with BFD'*)
5309 test no != "$with_gnu_ld" && break
5310 ;;
5311 *)
5312 test yes != "$with_gnu_ld" && break
5313 ;;
5314 esac
5315 fi
5316 done
5317 IFS=$lt_save_ifs
5318 else
5319 lt_cv_path_LD=$LD # Let the user override the test with a path.
5320 fi
5321 fi
5322  
5323 LD=$lt_cv_path_LD
5324 if test -n "$LD"; then
5325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
5326 $as_echo "$LD" >&6; }
5327 else
5328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5329 $as_echo "no" >&6; }
5330 fi
5331 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
5332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
5333 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
5334 if ${lt_cv_prog_gnu_ld+:} false; then :
5335 $as_echo_n "(cached) " >&6
5336 else
5337 # I'd rather use --version here, but apparently some GNU lds only accept -v.
5338 case `$LD -v 2>&1 </dev/null` in
5339 *GNU* | *'with BFD'*)
5340 lt_cv_prog_gnu_ld=yes
5341 ;;
5342 *)
5343 lt_cv_prog_gnu_ld=no
5344 ;;
5345 esac
5346 fi
5347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
5348 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
5349 with_gnu_ld=$lt_cv_prog_gnu_ld
5350  
5351  
5352  
5353  
5354  
5355  
5356  
5357  
5358  
5359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
5360 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
5361 if ${lt_cv_path_NM+:} false; then :
5362 $as_echo_n "(cached) " >&6
5363 else
5364 if test -n "$NM"; then
5365 # Let the user override the test.
5366 lt_cv_path_NM=$NM
5367 else
5368 lt_nm_to_check=${ac_tool_prefix}nm
5369 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5370 lt_nm_to_check="$lt_nm_to_check nm"
5371 fi
5372 for lt_tmp_nm in $lt_nm_to_check; do
5373 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
5374 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5375 IFS=$lt_save_ifs
5376 test -z "$ac_dir" && ac_dir=.
5377 tmp_nm=$ac_dir/$lt_tmp_nm
5378 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
5379 # Check to see if the nm accepts a BSD-compat flag.
5380 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
5381 # nm: unknown option "B" ignored
5382 # Tru64's nm complains that /dev/null is an invalid object file
5383 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
5384 case $build_os in
5385 mingw*) lt_bad_file=conftest.nm/nofile ;;
5386 *) lt_bad_file=/dev/null ;;
5387 esac
5388 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
5389 *$lt_bad_file* | *'Invalid file or object type'*)
5390 lt_cv_path_NM="$tmp_nm -B"
5391 break 2
5392 ;;
5393 *)
5394 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5395 */dev/null*)
5396 lt_cv_path_NM="$tmp_nm -p"
5397 break 2
5398 ;;
5399 *)
5400 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5401 continue # so that we can try to find one that supports BSD flags
5402 ;;
5403 esac
5404 ;;
5405 esac
5406 fi
5407 done
5408 IFS=$lt_save_ifs
5409 done
5410 : ${lt_cv_path_NM=no}
5411 fi
5412 fi
5413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
5414 $as_echo "$lt_cv_path_NM" >&6; }
5415 if test no != "$lt_cv_path_NM"; then
5416 NM=$lt_cv_path_NM
5417 else
5418 # Didn't find any BSD compatible name lister, look for dumpbin.
5419 if test -n "$DUMPBIN"; then :
5420 # Let the user override the test.
5421 else
5422 if test -n "$ac_tool_prefix"; then
5423 for ac_prog in dumpbin "link -dump"
5424 do
5425 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5426 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5428 $as_echo_n "checking for $ac_word... " >&6; }
5429 if ${ac_cv_prog_DUMPBIN+:} false; then :
5430 $as_echo_n "(cached) " >&6
5431 else
5432 if test -n "$DUMPBIN"; then
5433 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
5434 else
5435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5436 for as_dir in $PATH
5437 do
5438 IFS=$as_save_IFS
5439 test -z "$as_dir" && as_dir=.
5440 for ac_exec_ext in '' $ac_executable_extensions; do
5441 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5442 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
5443 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5444 break 2
5445 fi
5446 done
5447 done
5448 IFS=$as_save_IFS
5449  
5450 fi
5451 fi
5452 DUMPBIN=$ac_cv_prog_DUMPBIN
5453 if test -n "$DUMPBIN"; then
5454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
5455 $as_echo "$DUMPBIN" >&6; }
5456 else
5457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5458 $as_echo "no" >&6; }
5459 fi
5460  
5461  
5462 test -n "$DUMPBIN" && break
5463 done
5464 fi
5465 if test -z "$DUMPBIN"; then
5466 ac_ct_DUMPBIN=$DUMPBIN
5467 for ac_prog in dumpbin "link -dump"
5468 do
5469 # Extract the first word of "$ac_prog", so it can be a program name with args.
5470 set dummy $ac_prog; ac_word=$2
5471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5472 $as_echo_n "checking for $ac_word... " >&6; }
5473 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
5474 $as_echo_n "(cached) " >&6
5475 else
5476 if test -n "$ac_ct_DUMPBIN"; then
5477 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
5478 else
5479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5480 for as_dir in $PATH
5481 do
5482 IFS=$as_save_IFS
5483 test -z "$as_dir" && as_dir=.
5484 for ac_exec_ext in '' $ac_executable_extensions; do
5485 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5486 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
5487 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5488 break 2
5489 fi
5490 done
5491 done
5492 IFS=$as_save_IFS
5493  
5494 fi
5495 fi
5496 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
5497 if test -n "$ac_ct_DUMPBIN"; then
5498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
5499 $as_echo "$ac_ct_DUMPBIN" >&6; }
5500 else
5501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5502 $as_echo "no" >&6; }
5503 fi
5504  
5505  
5506 test -n "$ac_ct_DUMPBIN" && break
5507 done
5508  
5509 if test "x$ac_ct_DUMPBIN" = x; then
5510 DUMPBIN=":"
5511 else
5512 case $cross_compiling:$ac_tool_warned in
5513 yes:)
5514 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5515 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5516 ac_tool_warned=yes ;;
5517 esac
5518 DUMPBIN=$ac_ct_DUMPBIN
5519 fi
5520 fi
5521  
5522 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
5523 *COFF*)
5524 DUMPBIN="$DUMPBIN -symbols -headers"
5525 ;;
5526 *)
5527 DUMPBIN=:
5528 ;;
5529 esac
5530 fi
5531  
5532 if test : != "$DUMPBIN"; then
5533 NM=$DUMPBIN
5534 fi
5535 fi
5536 test -z "$NM" && NM=nm
5537  
5538  
5539  
5540  
5541  
5542  
5543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
5544 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
5545 if ${lt_cv_nm_interface+:} false; then :
5546 $as_echo_n "(cached) " >&6
5547 else
5548 lt_cv_nm_interface="BSD nm"
5549 echo "int some_variable = 0;" > conftest.$ac_ext
5550 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
5551 (eval "$ac_compile" 2>conftest.err)
5552 cat conftest.err >&5
5553 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
5554 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5555 cat conftest.err >&5
5556 (eval echo "\"\$as_me:$LINENO: output\"" >&5)
5557 cat conftest.out >&5
5558 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5559 lt_cv_nm_interface="MS dumpbin"
5560 fi
5561 rm -f conftest*
5562 fi
5563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
5564 $as_echo "$lt_cv_nm_interface" >&6; }
5565  
5566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5567 $as_echo_n "checking whether ln -s works... " >&6; }
5568 LN_S=$as_ln_s
5569 if test "$LN_S" = "ln -s"; then
5570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5571 $as_echo "yes" >&6; }
5572 else
5573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5574 $as_echo "no, using $LN_S" >&6; }
5575 fi
5576  
5577 # find the maximum length of command line arguments
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
5579 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
5580 if ${lt_cv_sys_max_cmd_len+:} false; then :
5581 $as_echo_n "(cached) " >&6
5582 else
5583 i=0
5584 teststring=ABCD
5585  
5586 case $build_os in
5587 msdosdjgpp*)
5588 # On DJGPP, this test can blow up pretty badly due to problems in libc
5589 # (any single argument exceeding 2000 bytes causes a buffer overrun
5590 # during glob expansion). Even if it were fixed, the result of this
5591 # check would be larger than it should be.
5592 lt_cv_sys_max_cmd_len=12288; # 12K is about right
5593 ;;
5594  
5595 gnu*)
5596 # Under GNU Hurd, this test is not required because there is
5597 # no limit to the length of command line arguments.
5598 # Libtool will interpret -1 as no limit whatsoever
5599 lt_cv_sys_max_cmd_len=-1;
5600 ;;
5601  
5602 cygwin* | mingw* | cegcc*)
5603 # On Win9x/ME, this test blows up -- it succeeds, but takes
5604 # about 5 minutes as the teststring grows exponentially.
5605 # Worse, since 9x/ME are not pre-emptively multitasking,
5606 # you end up with a "frozen" computer, even though with patience
5607 # the test eventually succeeds (with a max line length of 256k).
5608 # Instead, let's just punt: use the minimum linelength reported by
5609 # all of the supported platforms: 8192 (on NT/2K/XP).
5610 lt_cv_sys_max_cmd_len=8192;
5611 ;;
5612  
5613 mint*)
5614 # On MiNT this can take a long time and run out of memory.
5615 lt_cv_sys_max_cmd_len=8192;
5616 ;;
5617  
5618 amigaos*)
5619 # On AmigaOS with pdksh, this test takes hours, literally.
5620 # So we just punt and use a minimum line length of 8192.
5621 lt_cv_sys_max_cmd_len=8192;
5622 ;;
5623  
5624 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
5625 # This has been around since 386BSD, at least. Likely further.
5626 if test -x /sbin/sysctl; then
5627 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
5628 elif test -x /usr/sbin/sysctl; then
5629 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
5630 else
5631 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
5632 fi
5633 # And add a safety zone
5634 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
5635 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
5636 ;;
5637  
5638 interix*)
5639 # We know the value 262144 and hardcode it with a safety zone (like BSD)
5640 lt_cv_sys_max_cmd_len=196608
5641 ;;
5642  
5643 os2*)
5644 # The test takes a long time on OS/2.
5645 lt_cv_sys_max_cmd_len=8192
5646 ;;
5647  
5648 osf*)
5649 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
5650 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
5651 # nice to cause kernel panics so lets avoid the loop below.
5652 # First set a reasonable default.
5653 lt_cv_sys_max_cmd_len=16384
5654 #
5655 if test -x /sbin/sysconfig; then
5656 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
5657 *1*) lt_cv_sys_max_cmd_len=-1 ;;
5658 esac
5659 fi
5660 ;;
5661 sco3.2v5*)
5662 lt_cv_sys_max_cmd_len=102400
5663 ;;
5664 sysv5* | sco5v6* | sysv4.2uw2*)
5665 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
5666 if test -n "$kargmax"; then
5667 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
5668 else
5669 lt_cv_sys_max_cmd_len=32768
5670 fi
5671 ;;
5672 *)
5673 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
5674 if test -n "$lt_cv_sys_max_cmd_len" && \
5675 test undefined != "$lt_cv_sys_max_cmd_len"; then
5676 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
5677 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
5678 else
5679 # Make teststring a little bigger before we do anything with it.
5680 # a 1K string should be a reasonable start.
5681 for i in 1 2 3 4 5 6 7 8; do
5682 teststring=$teststring$teststring
5683 done
5684 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
5685 # If test is not a shell built-in, we'll probably end up computing a
5686 # maximum length that is only half of the actual maximum length, but
5687 # we can't tell.
5688 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
5689 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
5690 test 17 != "$i" # 1/2 MB should be enough
5691 do
5692 i=`expr $i + 1`
5693 teststring=$teststring$teststring
5694 done
5695 # Only check the string length outside the loop.
5696 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
5697 teststring=
5698 # Add a significant safety factor because C++ compilers can tack on
5699 # massive amounts of additional arguments before passing them to the
5700 # linker. It appears as though 1/2 is a usable value.
5701 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
5702 fi
5703 ;;
5704 esac
5705  
5706 fi
5707  
5708 if test -n "$lt_cv_sys_max_cmd_len"; then
5709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
5710 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
5711 else
5712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5713 $as_echo "none" >&6; }
5714 fi
5715 max_cmd_len=$lt_cv_sys_max_cmd_len
5716  
5717  
5718  
5719  
5720  
5721  
5722 : ${CP="cp -f"}
5723 : ${MV="mv -f"}
5724 : ${RM="rm -f"}
5725  
5726 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
5727 lt_unset=unset
5728 else
5729 lt_unset=false
5730 fi
5731  
5732  
5733  
5734  
5735  
5736 # test EBCDIC or ASCII
5737 case `echo X|tr X '\101'` in
5738 A) # ASCII based system
5739 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
5740 lt_SP2NL='tr \040 \012'
5741 lt_NL2SP='tr \015\012 \040\040'
5742 ;;
5743 *) # EBCDIC based system
5744 lt_SP2NL='tr \100 \n'
5745 lt_NL2SP='tr \r\n \100\100'
5746 ;;
5747 esac
5748  
5749  
5750  
5751  
5752  
5753  
5754  
5755  
5756  
5757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
5758 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
5759 if ${lt_cv_to_host_file_cmd+:} false; then :
5760 $as_echo_n "(cached) " >&6
5761 else
5762 case $host in
5763 *-*-mingw* )
5764 case $build in
5765 *-*-mingw* ) # actually msys
5766 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
5767 ;;
5768 *-*-cygwin* )
5769 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
5770 ;;
5771 * ) # otherwise, assume *nix
5772 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
5773 ;;
5774 esac
5775 ;;
5776 *-*-cygwin* )
5777 case $build in
5778 *-*-mingw* ) # actually msys
5779 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
5780 ;;
5781 *-*-cygwin* )
5782 lt_cv_to_host_file_cmd=func_convert_file_noop
5783 ;;
5784 * ) # otherwise, assume *nix
5785 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
5786 ;;
5787 esac
5788 ;;
5789 * ) # unhandled hosts (and "normal" native builds)
5790 lt_cv_to_host_file_cmd=func_convert_file_noop
5791 ;;
5792 esac
5793  
5794 fi
5795  
5796 to_host_file_cmd=$lt_cv_to_host_file_cmd
5797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
5798 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
5799  
5800  
5801  
5802  
5803  
5804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
5805 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
5806 if ${lt_cv_to_tool_file_cmd+:} false; then :
5807 $as_echo_n "(cached) " >&6
5808 else
5809 #assume ordinary cross tools, or native build.
5810 lt_cv_to_tool_file_cmd=func_convert_file_noop
5811 case $host in
5812 *-*-mingw* )
5813 case $build in
5814 *-*-mingw* ) # actually msys
5815 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
5816 ;;
5817 esac
5818 ;;
5819 esac
5820  
5821 fi
5822  
5823 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
5824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
5825 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
5826  
5827  
5828  
5829  
5830  
5831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
5832 $as_echo_n "checking for $LD option to reload object files... " >&6; }
5833 if ${lt_cv_ld_reload_flag+:} false; then :
5834 $as_echo_n "(cached) " >&6
5835 else
5836 lt_cv_ld_reload_flag='-r'
5837 fi
5838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
5839 $as_echo "$lt_cv_ld_reload_flag" >&6; }
5840 reload_flag=$lt_cv_ld_reload_flag
5841 case $reload_flag in
5842 "" | " "*) ;;
5843 *) reload_flag=" $reload_flag" ;;
5844 esac
5845 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5846 case $host_os in
5847 cygwin* | mingw* | pw32* | cegcc*)
5848 if test yes != "$GCC"; then
5849 reload_cmds=false
5850 fi
5851 ;;
5852 darwin*)
5853 if test yes = "$GCC"; then
5854 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
5855 else
5856 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5857 fi
5858 ;;
5859 esac
5860  
5861  
5862  
5863  
5864  
5865  
5866  
5867  
5868  
5869 if test -n "$ac_tool_prefix"; then
5870 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
5871 set dummy ${ac_tool_prefix}objdump; ac_word=$2
5872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5873 $as_echo_n "checking for $ac_word... " >&6; }
5874 if ${ac_cv_prog_OBJDUMP+:} false; then :
5875 $as_echo_n "(cached) " >&6
5876 else
5877 if test -n "$OBJDUMP"; then
5878 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
5879 else
5880 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5881 for as_dir in $PATH
5882 do
5883 IFS=$as_save_IFS
5884 test -z "$as_dir" && as_dir=.
5885 for ac_exec_ext in '' $ac_executable_extensions; do
5886 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5887 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
5888 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5889 break 2
5890 fi
5891 done
5892 done
5893 IFS=$as_save_IFS
5894  
5895 fi
5896 fi
5897 OBJDUMP=$ac_cv_prog_OBJDUMP
5898 if test -n "$OBJDUMP"; then
5899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
5900 $as_echo "$OBJDUMP" >&6; }
5901 else
5902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5903 $as_echo "no" >&6; }
5904 fi
5905  
5906  
5907 fi
5908 if test -z "$ac_cv_prog_OBJDUMP"; then
5909 ac_ct_OBJDUMP=$OBJDUMP
5910 # Extract the first word of "objdump", so it can be a program name with args.
5911 set dummy objdump; ac_word=$2
5912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5913 $as_echo_n "checking for $ac_word... " >&6; }
5914 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
5915 $as_echo_n "(cached) " >&6
5916 else
5917 if test -n "$ac_ct_OBJDUMP"; then
5918 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
5919 else
5920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5921 for as_dir in $PATH
5922 do
5923 IFS=$as_save_IFS
5924 test -z "$as_dir" && as_dir=.
5925 for ac_exec_ext in '' $ac_executable_extensions; do
5926 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5927 ac_cv_prog_ac_ct_OBJDUMP="objdump"
5928 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929 break 2
5930 fi
5931 done
5932 done
5933 IFS=$as_save_IFS
5934  
5935 fi
5936 fi
5937 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
5938 if test -n "$ac_ct_OBJDUMP"; then
5939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
5940 $as_echo "$ac_ct_OBJDUMP" >&6; }
5941 else
5942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5943 $as_echo "no" >&6; }
5944 fi
5945  
5946 if test "x$ac_ct_OBJDUMP" = x; then
5947 OBJDUMP="false"
5948 else
5949 case $cross_compiling:$ac_tool_warned in
5950 yes:)
5951 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5952 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5953 ac_tool_warned=yes ;;
5954 esac
5955 OBJDUMP=$ac_ct_OBJDUMP
5956 fi
5957 else
5958 OBJDUMP="$ac_cv_prog_OBJDUMP"
5959 fi
5960  
5961 test -z "$OBJDUMP" && OBJDUMP=objdump
5962  
5963  
5964  
5965  
5966  
5967  
5968  
5969  
5970  
5971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
5972 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
5973 if ${lt_cv_deplibs_check_method+:} false; then :
5974 $as_echo_n "(cached) " >&6
5975 else
5976 lt_cv_file_magic_cmd='$MAGIC_CMD'
5977 lt_cv_file_magic_test_file=
5978 lt_cv_deplibs_check_method='unknown'
5979 # Need to set the preceding variable on all platforms that support
5980 # interlibrary dependencies.
5981 # 'none' -- dependencies not supported.
5982 # 'unknown' -- same as none, but documents that we really don't know.
5983 # 'pass_all' -- all dependencies passed with no checks.
5984 # 'test_compile' -- check by making test program.
5985 # 'file_magic [[regex]]' -- check by looking for files in library path
5986 # that responds to the $file_magic_cmd with a given extended regex.
5987 # If you have 'file' or equivalent on your system and you're not sure
5988 # whether 'pass_all' will *always* work, you probably want this one.
5989  
5990 case $host_os in
5991 aix[4-9]*)
5992 lt_cv_deplibs_check_method=pass_all
5993 ;;
5994  
5995 beos*)
5996 lt_cv_deplibs_check_method=pass_all
5997 ;;
5998  
5999 bsdi[45]*)
6000 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
6001 lt_cv_file_magic_cmd='/usr/bin/file -L'
6002 lt_cv_file_magic_test_file=/shlib/libc.so
6003 ;;
6004  
6005 cygwin*)
6006 # func_win32_libid is a shell function defined in ltmain.sh
6007 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6008 lt_cv_file_magic_cmd='func_win32_libid'
6009 ;;
6010  
6011 mingw* | pw32*)
6012 # Base MSYS/MinGW do not provide the 'file' command needed by
6013 # func_win32_libid shell function, so use a weaker test based on 'objdump',
6014 # unless we find 'file', for example because we are cross-compiling.
6015 if ( file / ) >/dev/null 2>&1; then
6016 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6017 lt_cv_file_magic_cmd='func_win32_libid'
6018 else
6019 # Keep this pattern in sync with the one in func_win32_libid.
6020 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
6021 lt_cv_file_magic_cmd='$OBJDUMP -f'
6022 fi
6023 ;;
6024  
6025 cegcc*)
6026 # use the weaker test based on 'objdump'. See mingw*.
6027 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
6028 lt_cv_file_magic_cmd='$OBJDUMP -f'
6029 ;;
6030  
6031 darwin* | rhapsody*)
6032 lt_cv_deplibs_check_method=pass_all
6033 ;;
6034  
6035 freebsd* | dragonfly*)
6036 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6037 case $host_cpu in
6038 i*86 )
6039 # Not sure whether the presence of OpenBSD here was a mistake.
6040 # Let's accept both of them until this is cleared up.
6041 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
6042 lt_cv_file_magic_cmd=/usr/bin/file
6043 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6044 ;;
6045 esac
6046 else
6047 lt_cv_deplibs_check_method=pass_all
6048 fi
6049 ;;
6050  
6051 haiku*)
6052 lt_cv_deplibs_check_method=pass_all
6053 ;;
6054  
6055 hpux10.20* | hpux11*)
6056 lt_cv_file_magic_cmd=/usr/bin/file
6057 case $host_cpu in
6058 ia64*)
6059 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
6060 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6061 ;;
6062 hppa*64*)
6063 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
6064 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
6065 ;;
6066 *)
6067 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
6068 lt_cv_file_magic_test_file=/usr/lib/libc.sl
6069 ;;
6070 esac
6071 ;;
6072  
6073 interix[3-9]*)
6074 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
6075 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
6076 ;;
6077  
6078 irix5* | irix6* | nonstopux*)
6079 case $LD in
6080 *-32|*"-32 ") libmagic=32-bit;;
6081 *-n32|*"-n32 ") libmagic=N32;;
6082 *-64|*"-64 ") libmagic=64-bit;;
6083 *) libmagic=never-match;;
6084 esac
6085 lt_cv_deplibs_check_method=pass_all
6086 ;;
6087  
6088 # This must be glibc/ELF.
6089 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6090 lt_cv_deplibs_check_method=pass_all
6091 ;;
6092  
6093 netbsd* | netbsdelf*-gnu)
6094 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6095 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6096 else
6097 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
6098 fi
6099 ;;
6100  
6101 newos6*)
6102 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
6103 lt_cv_file_magic_cmd=/usr/bin/file
6104 lt_cv_file_magic_test_file=/usr/lib/libnls.so
6105 ;;
6106  
6107 *nto* | *qnx*)
6108 lt_cv_deplibs_check_method=pass_all
6109 ;;
6110  
6111 openbsd* | bitrig*)
6112 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
6113 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
6114 else
6115 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6116 fi
6117 ;;
6118  
6119 osf3* | osf4* | osf5*)
6120 lt_cv_deplibs_check_method=pass_all
6121 ;;
6122  
6123 rdos*)
6124 lt_cv_deplibs_check_method=pass_all
6125 ;;
6126  
6127 solaris*)
6128 lt_cv_deplibs_check_method=pass_all
6129 ;;
6130  
6131 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
6132 lt_cv_deplibs_check_method=pass_all
6133 ;;
6134  
6135 sysv4 | sysv4.3*)
6136 case $host_vendor in
6137 motorola)
6138 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
6139 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6140 ;;
6141 ncr)
6142 lt_cv_deplibs_check_method=pass_all
6143 ;;
6144 sequent)
6145 lt_cv_file_magic_cmd='/bin/file'
6146 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
6147 ;;
6148 sni)
6149 lt_cv_file_magic_cmd='/bin/file'
6150 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
6151 lt_cv_file_magic_test_file=/lib/libc.so
6152 ;;
6153 siemens)
6154 lt_cv_deplibs_check_method=pass_all
6155 ;;
6156 pc)
6157 lt_cv_deplibs_check_method=pass_all
6158 ;;
6159 esac
6160 ;;
6161  
6162 tpf*)
6163 lt_cv_deplibs_check_method=pass_all
6164 ;;
6165 os2*)
6166 lt_cv_deplibs_check_method=pass_all
6167 ;;
6168 esac
6169  
6170 fi
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
6172 $as_echo "$lt_cv_deplibs_check_method" >&6; }
6173  
6174 file_magic_glob=
6175 want_nocaseglob=no
6176 if test "$build" = "$host"; then
6177 case $host_os in
6178 mingw* | pw32*)
6179 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
6180 want_nocaseglob=yes
6181 else
6182 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
6183 fi
6184 ;;
6185 esac
6186 fi
6187  
6188 file_magic_cmd=$lt_cv_file_magic_cmd
6189 deplibs_check_method=$lt_cv_deplibs_check_method
6190 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6191  
6192  
6193  
6194  
6195  
6196  
6197  
6198  
6199  
6200  
6201  
6202  
6203  
6204  
6205  
6206  
6207  
6208  
6209  
6210  
6211  
6212  
6213 if test -n "$ac_tool_prefix"; then
6214 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6215 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6217 $as_echo_n "checking for $ac_word... " >&6; }
6218 if ${ac_cv_prog_DLLTOOL+:} false; then :
6219 $as_echo_n "(cached) " >&6
6220 else
6221 if test -n "$DLLTOOL"; then
6222 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6223 else
6224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6225 for as_dir in $PATH
6226 do
6227 IFS=$as_save_IFS
6228 test -z "$as_dir" && as_dir=.
6229 for ac_exec_ext in '' $ac_executable_extensions; do
6230 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6231 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6232 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6233 break 2
6234 fi
6235 done
6236 done
6237 IFS=$as_save_IFS
6238  
6239 fi
6240 fi
6241 DLLTOOL=$ac_cv_prog_DLLTOOL
6242 if test -n "$DLLTOOL"; then
6243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
6244 $as_echo "$DLLTOOL" >&6; }
6245 else
6246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6247 $as_echo "no" >&6; }
6248 fi
6249  
6250  
6251 fi
6252 if test -z "$ac_cv_prog_DLLTOOL"; then
6253 ac_ct_DLLTOOL=$DLLTOOL
6254 # Extract the first word of "dlltool", so it can be a program name with args.
6255 set dummy dlltool; ac_word=$2
6256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6257 $as_echo_n "checking for $ac_word... " >&6; }
6258 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
6259 $as_echo_n "(cached) " >&6
6260 else
6261 if test -n "$ac_ct_DLLTOOL"; then
6262 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6263 else
6264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6265 for as_dir in $PATH
6266 do
6267 IFS=$as_save_IFS
6268 test -z "$as_dir" && as_dir=.
6269 for ac_exec_ext in '' $ac_executable_extensions; do
6270 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6271 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6272 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6273 break 2
6274 fi
6275 done
6276 done
6277 IFS=$as_save_IFS
6278  
6279 fi
6280 fi
6281 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6282 if test -n "$ac_ct_DLLTOOL"; then
6283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
6284 $as_echo "$ac_ct_DLLTOOL" >&6; }
6285 else
6286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6287 $as_echo "no" >&6; }
6288 fi
6289  
6290 if test "x$ac_ct_DLLTOOL" = x; then
6291 DLLTOOL="false"
6292 else
6293 case $cross_compiling:$ac_tool_warned in
6294 yes:)
6295 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6296 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6297 ac_tool_warned=yes ;;
6298 esac
6299 DLLTOOL=$ac_ct_DLLTOOL
6300 fi
6301 else
6302 DLLTOOL="$ac_cv_prog_DLLTOOL"
6303 fi
6304  
6305 test -z "$DLLTOOL" && DLLTOOL=dlltool
6306  
6307  
6308  
6309  
6310  
6311  
6312  
6313  
6314  
6315  
6316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
6317 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
6318 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
6319 $as_echo_n "(cached) " >&6
6320 else
6321 lt_cv_sharedlib_from_linklib_cmd='unknown'
6322  
6323 case $host_os in
6324 cygwin* | mingw* | pw32* | cegcc*)
6325 # two different shell functions defined in ltmain.sh;
6326 # decide which one to use based on capabilities of $DLLTOOL
6327 case `$DLLTOOL --help 2>&1` in
6328 *--identify-strict*)
6329 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
6330 ;;
6331 *)
6332 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
6333 ;;
6334 esac
6335 ;;
6336 *)
6337 # fallback: assume linklib IS sharedlib
6338 lt_cv_sharedlib_from_linklib_cmd=$ECHO
6339 ;;
6340 esac
6341  
6342 fi
6343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
6344 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
6345 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
6346 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
6347  
6348  
6349  
6350  
6351  
6352  
6353  
6354  
6355 if test -n "$ac_tool_prefix"; then
6356 for ac_prog in ar
6357 do
6358 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6359 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6361 $as_echo_n "checking for $ac_word... " >&6; }
6362 if ${ac_cv_prog_AR+:} false; then :
6363 $as_echo_n "(cached) " >&6
6364 else
6365 if test -n "$AR"; then
6366 ac_cv_prog_AR="$AR" # Let the user override the test.
6367 else
6368 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6369 for as_dir in $PATH
6370 do
6371 IFS=$as_save_IFS
6372 test -z "$as_dir" && as_dir=.
6373 for ac_exec_ext in '' $ac_executable_extensions; do
6374 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6375 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
6376 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6377 break 2
6378 fi
6379 done
6380 done
6381 IFS=$as_save_IFS
6382  
6383 fi
6384 fi
6385 AR=$ac_cv_prog_AR
6386 if test -n "$AR"; then
6387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6388 $as_echo "$AR" >&6; }
6389 else
6390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6391 $as_echo "no" >&6; }
6392 fi
6393  
6394  
6395 test -n "$AR" && break
6396 done
6397 fi
6398 if test -z "$AR"; then
6399 ac_ct_AR=$AR
6400 for ac_prog in ar
6401 do
6402 # Extract the first word of "$ac_prog", so it can be a program name with args.
6403 set dummy $ac_prog; ac_word=$2
6404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6405 $as_echo_n "checking for $ac_word... " >&6; }
6406 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6407 $as_echo_n "(cached) " >&6
6408 else
6409 if test -n "$ac_ct_AR"; then
6410 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6411 else
6412 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6413 for as_dir in $PATH
6414 do
6415 IFS=$as_save_IFS
6416 test -z "$as_dir" && as_dir=.
6417 for ac_exec_ext in '' $ac_executable_extensions; do
6418 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6419 ac_cv_prog_ac_ct_AR="$ac_prog"
6420 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6421 break 2
6422 fi
6423 done
6424 done
6425 IFS=$as_save_IFS
6426  
6427 fi
6428 fi
6429 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6430 if test -n "$ac_ct_AR"; then
6431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6432 $as_echo "$ac_ct_AR" >&6; }
6433 else
6434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6435 $as_echo "no" >&6; }
6436 fi
6437  
6438  
6439 test -n "$ac_ct_AR" && break
6440 done
6441  
6442 if test "x$ac_ct_AR" = x; then
6443 AR="false"
6444 else
6445 case $cross_compiling:$ac_tool_warned in
6446 yes:)
6447 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6448 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6449 ac_tool_warned=yes ;;
6450 esac
6451 AR=$ac_ct_AR
6452 fi
6453 fi
6454  
6455 : ${AR=ar}
6456 : ${AR_FLAGS=cru}
6457  
6458  
6459  
6460  
6461  
6462  
6463  
6464  
6465  
6466  
6467  
6468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
6469 $as_echo_n "checking for archiver @FILE support... " >&6; }
6470 if ${lt_cv_ar_at_file+:} false; then :
6471 $as_echo_n "(cached) " >&6
6472 else
6473 lt_cv_ar_at_file=no
6474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6475 /* end confdefs.h. */
6476  
6477 int
6478 main ()
6479 {
6480  
6481 ;
6482 return 0;
6483 }
6484 _ACEOF
6485 if ac_fn_c_try_compile "$LINENO"; then :
6486 echo conftest.$ac_objext > conftest.lst
6487 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
6488 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
6489 (eval $lt_ar_try) 2>&5
6490 ac_status=$?
6491 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6492 test $ac_status = 0; }
6493 if test 0 -eq "$ac_status"; then
6494 # Ensure the archiver fails upon bogus file names.
6495 rm -f conftest.$ac_objext libconftest.a
6496 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
6497 (eval $lt_ar_try) 2>&5
6498 ac_status=$?
6499 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6500 test $ac_status = 0; }
6501 if test 0 -ne "$ac_status"; then
6502 lt_cv_ar_at_file=@
6503 fi
6504 fi
6505 rm -f conftest.* libconftest.a
6506  
6507 fi
6508 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6509  
6510 fi
6511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
6512 $as_echo "$lt_cv_ar_at_file" >&6; }
6513  
6514 if test no = "$lt_cv_ar_at_file"; then
6515 archiver_list_spec=
6516 else
6517 archiver_list_spec=$lt_cv_ar_at_file
6518 fi
6519  
6520  
6521  
6522  
6523  
6524  
6525  
6526 if test -n "$ac_tool_prefix"; then
6527 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6528 set dummy ${ac_tool_prefix}strip; ac_word=$2
6529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6530 $as_echo_n "checking for $ac_word... " >&6; }
6531 if ${ac_cv_prog_STRIP+:} false; then :
6532 $as_echo_n "(cached) " >&6
6533 else
6534 if test -n "$STRIP"; then
6535 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6536 else
6537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6538 for as_dir in $PATH
6539 do
6540 IFS=$as_save_IFS
6541 test -z "$as_dir" && as_dir=.
6542 for ac_exec_ext in '' $ac_executable_extensions; do
6543 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6544 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6545 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6546 break 2
6547 fi
6548 done
6549 done
6550 IFS=$as_save_IFS
6551  
6552 fi
6553 fi
6554 STRIP=$ac_cv_prog_STRIP
6555 if test -n "$STRIP"; then
6556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
6557 $as_echo "$STRIP" >&6; }
6558 else
6559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6560 $as_echo "no" >&6; }
6561 fi
6562  
6563  
6564 fi
6565 if test -z "$ac_cv_prog_STRIP"; then
6566 ac_ct_STRIP=$STRIP
6567 # Extract the first word of "strip", so it can be a program name with args.
6568 set dummy strip; ac_word=$2
6569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6570 $as_echo_n "checking for $ac_word... " >&6; }
6571 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
6572 $as_echo_n "(cached) " >&6
6573 else
6574 if test -n "$ac_ct_STRIP"; then
6575 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6576 else
6577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6578 for as_dir in $PATH
6579 do
6580 IFS=$as_save_IFS
6581 test -z "$as_dir" && as_dir=.
6582 for ac_exec_ext in '' $ac_executable_extensions; do
6583 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6584 ac_cv_prog_ac_ct_STRIP="strip"
6585 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6586 break 2
6587 fi
6588 done
6589 done
6590 IFS=$as_save_IFS
6591  
6592 fi
6593 fi
6594 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6595 if test -n "$ac_ct_STRIP"; then
6596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
6597 $as_echo "$ac_ct_STRIP" >&6; }
6598 else
6599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6600 $as_echo "no" >&6; }
6601 fi
6602  
6603 if test "x$ac_ct_STRIP" = x; then
6604 STRIP=":"
6605 else
6606 case $cross_compiling:$ac_tool_warned in
6607 yes:)
6608 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6609 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6610 ac_tool_warned=yes ;;
6611 esac
6612 STRIP=$ac_ct_STRIP
6613 fi
6614 else
6615 STRIP="$ac_cv_prog_STRIP"
6616 fi
6617  
6618 test -z "$STRIP" && STRIP=:
6619  
6620  
6621  
6622  
6623  
6624  
6625 if test -n "$ac_tool_prefix"; then
6626 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6627 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6629 $as_echo_n "checking for $ac_word... " >&6; }
6630 if ${ac_cv_prog_RANLIB+:} false; then :
6631 $as_echo_n "(cached) " >&6
6632 else
6633 if test -n "$RANLIB"; then
6634 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6635 else
6636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6637 for as_dir in $PATH
6638 do
6639 IFS=$as_save_IFS
6640 test -z "$as_dir" && as_dir=.
6641 for ac_exec_ext in '' $ac_executable_extensions; do
6642 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6643 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6644 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6645 break 2
6646 fi
6647 done
6648 done
6649 IFS=$as_save_IFS
6650  
6651 fi
6652 fi
6653 RANLIB=$ac_cv_prog_RANLIB
6654 if test -n "$RANLIB"; then
6655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6656 $as_echo "$RANLIB" >&6; }
6657 else
6658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6659 $as_echo "no" >&6; }
6660 fi
6661  
6662  
6663 fi
6664 if test -z "$ac_cv_prog_RANLIB"; then
6665 ac_ct_RANLIB=$RANLIB
6666 # Extract the first word of "ranlib", so it can be a program name with args.
6667 set dummy ranlib; ac_word=$2
6668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6669 $as_echo_n "checking for $ac_word... " >&6; }
6670 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6671 $as_echo_n "(cached) " >&6
6672 else
6673 if test -n "$ac_ct_RANLIB"; then
6674 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6675 else
6676 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6677 for as_dir in $PATH
6678 do
6679 IFS=$as_save_IFS
6680 test -z "$as_dir" && as_dir=.
6681 for ac_exec_ext in '' $ac_executable_extensions; do
6682 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6683 ac_cv_prog_ac_ct_RANLIB="ranlib"
6684 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6685 break 2
6686 fi
6687 done
6688 done
6689 IFS=$as_save_IFS
6690  
6691 fi
6692 fi
6693 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6694 if test -n "$ac_ct_RANLIB"; then
6695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6696 $as_echo "$ac_ct_RANLIB" >&6; }
6697 else
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6699 $as_echo "no" >&6; }
6700 fi
6701  
6702 if test "x$ac_ct_RANLIB" = x; then
6703 RANLIB=":"
6704 else
6705 case $cross_compiling:$ac_tool_warned in
6706 yes:)
6707 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6708 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6709 ac_tool_warned=yes ;;
6710 esac
6711 RANLIB=$ac_ct_RANLIB
6712 fi
6713 else
6714 RANLIB="$ac_cv_prog_RANLIB"
6715 fi
6716  
6717 test -z "$RANLIB" && RANLIB=:
6718  
6719  
6720  
6721  
6722  
6723  
6724 # Determine commands to create old-style static archives.
6725 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
6726 old_postinstall_cmds='chmod 644 $oldlib'
6727 old_postuninstall_cmds=
6728  
6729 if test -n "$RANLIB"; then
6730 case $host_os in
6731 bitrig* | openbsd*)
6732 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
6733 ;;
6734 *)
6735 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
6736 ;;
6737 esac
6738 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
6739 fi
6740  
6741 case $host_os in
6742 darwin*)
6743 lock_old_archive_extraction=yes ;;
6744 *)
6745 lock_old_archive_extraction=no ;;
6746 esac
6747  
6748  
6749  
6750  
6751  
6752  
6753  
6754  
6755  
6756  
6757  
6758  
6759  
6760  
6761  
6762  
6763  
6764  
6765  
6766  
6767  
6768  
6769  
6770  
6771  
6772  
6773  
6774  
6775  
6776  
6777  
6778  
6779  
6780  
6781  
6782  
6783  
6784  
6785  
6786 # If no C compiler was specified, use CC.
6787 LTCC=${LTCC-"$CC"}
6788  
6789 # If no C compiler flags were specified, use CFLAGS.
6790 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
6791  
6792 # Allow CC to be a program name with arguments.
6793 compiler=$CC
6794  
6795  
6796 # Check for command to grab the raw symbol name followed by C symbol from nm.
6797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
6798 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
6799 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
6800 $as_echo_n "(cached) " >&6
6801 else
6802  
6803 # These are sane defaults that work on at least a few old systems.
6804 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
6805  
6806 # Character class describing NM global symbol codes.
6807 symcode='[BCDEGRST]'
6808  
6809 # Regexp to match symbols that can be accessed directly from C.
6810 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
6811  
6812 # Define system-specific variables.
6813 case $host_os in
6814 aix*)
6815 symcode='[BCDT]'
6816 ;;
6817 cygwin* | mingw* | pw32* | cegcc*)
6818 symcode='[ABCDGISTW]'
6819 ;;
6820 hpux*)
6821 if test ia64 = "$host_cpu"; then
6822 symcode='[ABCDEGRST]'
6823 fi
6824 ;;
6825 irix* | nonstopux*)
6826 symcode='[BCDEGRST]'
6827 ;;
6828 osf*)
6829 symcode='[BCDEGQRST]'
6830 ;;
6831 solaris*)
6832 symcode='[BDRT]'
6833 ;;
6834 sco3.2v5*)
6835 symcode='[DT]'
6836 ;;
6837 sysv4.2uw2*)
6838 symcode='[DT]'
6839 ;;
6840 sysv5* | sco5v6* | unixware* | OpenUNIX*)
6841 symcode='[ABDT]'
6842 ;;
6843 sysv4)
6844 symcode='[DFNSTU]'
6845 ;;
6846 esac
6847  
6848 # If we're using GNU nm, then use its standard symbol codes.
6849 case `$NM -V 2>&1` in
6850 *GNU* | *'with BFD'*)
6851 symcode='[ABCDGIRSTW]' ;;
6852 esac
6853  
6854 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
6855 # Gets list of data symbols to import.
6856 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
6857 # Adjust the below global symbol transforms to fixup imported variables.
6858 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
6859 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
6860 lt_c_name_lib_hook="\
6861 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
6862 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
6863 else
6864 # Disable hooks by default.
6865 lt_cv_sys_global_symbol_to_import=
6866 lt_cdecl_hook=
6867 lt_c_name_hook=
6868 lt_c_name_lib_hook=
6869 fi
6870  
6871 # Transform an extracted symbol line into a proper C declaration.
6872 # Some systems (esp. on ia64) link data and code symbols differently,
6873 # so use this general approach.
6874 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
6875 $lt_cdecl_hook\
6876 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
6877 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
6878  
6879 # Transform an extracted symbol line into symbol name and symbol address
6880 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
6881 $lt_c_name_hook\
6882 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
6883 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
6884  
6885 # Transform an extracted symbol line into symbol name with lib prefix and
6886 # symbol address.
6887 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
6888 $lt_c_name_lib_hook\
6889 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
6890 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
6891 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
6892  
6893 # Handle CRLF in mingw tool chain
6894 opt_cr=
6895 case $build_os in
6896 mingw*)
6897 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6898 ;;
6899 esac
6900  
6901 # Try without a prefix underscore, then with it.
6902 for ac_symprfx in "" "_"; do
6903  
6904 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6905 symxfrm="\\1 $ac_symprfx\\2 \\2"
6906  
6907 # Write the raw and C identifiers.
6908 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
6909 # Fake it for dumpbin and say T for any non-static function,
6910 # D for any global variable and I for any imported variable.
6911 # Also find C++ and __fastcall symbols from MSVC++,
6912 # which start with @ or ?.
6913 lt_cv_sys_global_symbol_pipe="$AWK '"\
6914 " {last_section=section; section=\$ 3};"\
6915 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
6916 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
6917 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
6918 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
6919 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
6920 " \$ 0!~/External *\|/{next};"\
6921 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
6922 " {if(hide[section]) next};"\
6923 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
6924 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
6925 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
6926 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
6927 " ' prfx=^$ac_symprfx"
6928 else
6929 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6930 fi
6931 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
6932  
6933 # Check to see that the pipe works correctly.
6934 pipe_works=no
6935  
6936 rm -f conftest*
6937 cat > conftest.$ac_ext <<_LT_EOF
6938 #ifdef __cplusplus
6939 extern "C" {
6940 #endif
6941 char nm_test_var;
6942 void nm_test_func(void);
6943 void nm_test_func(void){}
6944 #ifdef __cplusplus
6945 }
6946 #endif
6947 int main(){nm_test_var='a';nm_test_func();return(0);}
6948 _LT_EOF
6949  
6950 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6951 (eval $ac_compile) 2>&5
6952 ac_status=$?
6953 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6954 test $ac_status = 0; }; then
6955 # Now try to grab the symbols.
6956 nlist=conftest.nm
6957 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
6958 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
6959 ac_status=$?
6960 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6961 test $ac_status = 0; } && test -s "$nlist"; then
6962 # Try sorting and uniquifying the output.
6963 if sort "$nlist" | uniq > "$nlist"T; then
6964 mv -f "$nlist"T "$nlist"
6965 else
6966 rm -f "$nlist"T
6967 fi
6968  
6969 # Make sure that we snagged all the symbols we need.
6970 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
6971 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
6972 cat <<_LT_EOF > conftest.$ac_ext
6973 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
6974 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
6975 /* DATA imports from DLLs on WIN32 can't be const, because runtime
6976 relocations are performed -- see ld's documentation on pseudo-relocs. */
6977 # define LT_DLSYM_CONST
6978 #elif defined __osf__
6979 /* This system does not cope well with relocations in const data. */
6980 # define LT_DLSYM_CONST
6981 #else
6982 # define LT_DLSYM_CONST const
6983 #endif
6984  
6985 #ifdef __cplusplus
6986 extern "C" {
6987 #endif
6988  
6989 _LT_EOF
6990 # Now generate the symbol file.
6991 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
6992  
6993 cat <<_LT_EOF >> conftest.$ac_ext
6994  
6995 /* The mapping between symbol names and symbols. */
6996 LT_DLSYM_CONST struct {
6997 const char *name;
6998 void *address;
6999 }
7000 lt__PROGRAM__LTX_preloaded_symbols[] =
7001 {
7002 { "@PROGRAM@", (void *) 0 },
7003 _LT_EOF
7004 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
7005 cat <<\_LT_EOF >> conftest.$ac_ext
7006 {0, (void *) 0}
7007 };
7008  
7009 /* This works around a problem in FreeBSD linker */
7010 #ifdef FREEBSD_WORKAROUND
7011 static const void *lt_preloaded_setup() {
7012 return lt__PROGRAM__LTX_preloaded_symbols;
7013 }
7014 #endif
7015  
7016 #ifdef __cplusplus
7017 }
7018 #endif
7019 _LT_EOF
7020 # Now try linking the two files.
7021 mv conftest.$ac_objext conftstm.$ac_objext
7022 lt_globsym_save_LIBS=$LIBS
7023 lt_globsym_save_CFLAGS=$CFLAGS
7024 LIBS=conftstm.$ac_objext
7025 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7026 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7027 (eval $ac_link) 2>&5
7028 ac_status=$?
7029 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7030 test $ac_status = 0; } && test -s conftest$ac_exeext; then
7031 pipe_works=yes
7032 fi
7033 LIBS=$lt_globsym_save_LIBS
7034 CFLAGS=$lt_globsym_save_CFLAGS
7035 else
7036 echo "cannot find nm_test_func in $nlist" >&5
7037 fi
7038 else
7039 echo "cannot find nm_test_var in $nlist" >&5
7040 fi
7041 else
7042 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7043 fi
7044 else
7045 echo "$progname: failed program was:" >&5
7046 cat conftest.$ac_ext >&5
7047 fi
7048 rm -rf conftest* conftst*
7049  
7050 # Do not use the global_symbol_pipe unless it works.
7051 if test yes = "$pipe_works"; then
7052 break
7053 else
7054 lt_cv_sys_global_symbol_pipe=
7055 fi
7056 done
7057  
7058 fi
7059  
7060 if test -z "$lt_cv_sys_global_symbol_pipe"; then
7061 lt_cv_sys_global_symbol_to_cdecl=
7062 fi
7063 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
7065 $as_echo "failed" >&6; }
7066 else
7067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
7068 $as_echo "ok" >&6; }
7069 fi
7070  
7071 # Response file support.
7072 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7073 nm_file_list_spec='@'
7074 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
7075 nm_file_list_spec='@'
7076 fi
7077  
7078  
7079  
7080  
7081  
7082  
7083  
7084  
7085  
7086  
7087  
7088  
7089  
7090  
7091  
7092  
7093  
7094  
7095  
7096  
7097  
7098  
7099  
7100  
7101  
7102  
7103  
7104  
7105  
7106  
7107  
7108  
7109  
7110  
7111  
7112  
7113  
7114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
7115 $as_echo_n "checking for sysroot... " >&6; }
7116  
7117 # Check whether --with-sysroot was given.
7118 if test "${with_sysroot+set}" = set; then :
7119 withval=$with_sysroot;
7120 else
7121 with_sysroot=no
7122 fi
7123  
7124  
7125 lt_sysroot=
7126 case $with_sysroot in #(
7127 yes)
7128 if test yes = "$GCC"; then
7129 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
7130 fi
7131 ;; #(
7132 /*)
7133 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
7134 ;; #(
7135 no|'')
7136 ;; #(
7137 *)
7138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
7139 $as_echo "$with_sysroot" >&6; }
7140 as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
7141 ;;
7142 esac
7143  
7144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
7145 $as_echo "${lt_sysroot:-no}" >&6; }
7146  
7147  
7148  
7149  
7150  
7151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
7152 $as_echo_n "checking for a working dd... " >&6; }
7153 if ${ac_cv_path_lt_DD+:} false; then :
7154 $as_echo_n "(cached) " >&6
7155 else
7156 printf 0123456789abcdef0123456789abcdef >conftest.i
7157 cat conftest.i conftest.i >conftest2.i
7158 : ${lt_DD:=$DD}
7159 if test -z "$lt_DD"; then
7160 ac_path_lt_DD_found=false
7161 # Loop through the user's path and test for each of PROGNAME-LIST
7162 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7163 for as_dir in $PATH
7164 do
7165 IFS=$as_save_IFS
7166 test -z "$as_dir" && as_dir=.
7167 for ac_prog in dd; do
7168 for ac_exec_ext in '' $ac_executable_extensions; do
7169 ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
7170 as_fn_executable_p "$ac_path_lt_DD" || continue
7171 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
7172 cmp -s conftest.i conftest.out \
7173 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
7174 fi
7175 $ac_path_lt_DD_found && break 3
7176 done
7177 done
7178 done
7179 IFS=$as_save_IFS
7180 if test -z "$ac_cv_path_lt_DD"; then
7181 :
7182 fi
7183 else
7184 ac_cv_path_lt_DD=$lt_DD
7185 fi
7186  
7187 rm -f conftest.i conftest2.i conftest.out
7188 fi
7189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
7190 $as_echo "$ac_cv_path_lt_DD" >&6; }
7191  
7192  
7193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
7194 $as_echo_n "checking how to truncate binary pipes... " >&6; }
7195 if ${lt_cv_truncate_bin+:} false; then :
7196 $as_echo_n "(cached) " >&6
7197 else
7198 printf 0123456789abcdef0123456789abcdef >conftest.i
7199 cat conftest.i conftest.i >conftest2.i
7200 lt_cv_truncate_bin=
7201 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
7202 cmp -s conftest.i conftest.out \
7203 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
7204 fi
7205 rm -f conftest.i conftest2.i conftest.out
7206 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
7207 fi
7208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
7209 $as_echo "$lt_cv_truncate_bin" >&6; }
7210  
7211  
7212  
7213  
7214  
7215  
7216  
7217 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
7218 func_cc_basename ()
7219 {
7220 for cc_temp in $*""; do
7221 case $cc_temp in
7222 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
7223 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
7224 \-*) ;;
7225 *) break;;
7226 esac
7227 done
7228 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
7229 }
7230  
7231 # Check whether --enable-libtool-lock was given.
7232 if test "${enable_libtool_lock+set}" = set; then :
7233 enableval=$enable_libtool_lock;
7234 fi
7235  
7236 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
7237  
7238 # Some flags need to be propagated to the compiler or linker for good
7239 # libtool support.
7240 case $host in
7241 ia64-*-hpux*)
7242 # Find out what ABI is being produced by ac_compile, and set mode
7243 # options accordingly.
7244 echo 'int i;' > conftest.$ac_ext
7245 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7246 (eval $ac_compile) 2>&5
7247 ac_status=$?
7248 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7249 test $ac_status = 0; }; then
7250 case `/usr/bin/file conftest.$ac_objext` in
7251 *ELF-32*)
7252 HPUX_IA64_MODE=32
7253 ;;
7254 *ELF-64*)
7255 HPUX_IA64_MODE=64
7256 ;;
7257 esac
7258 fi
7259 rm -rf conftest*
7260 ;;
7261 *-*-irix6*)
7262 # Find out what ABI is being produced by ac_compile, and set linker
7263 # options accordingly.
7264 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
7265 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7266 (eval $ac_compile) 2>&5
7267 ac_status=$?
7268 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7269 test $ac_status = 0; }; then
7270 if test yes = "$lt_cv_prog_gnu_ld"; then
7271 case `/usr/bin/file conftest.$ac_objext` in
7272 *32-bit*)
7273 LD="${LD-ld} -melf32bsmip"
7274 ;;
7275 *N32*)
7276 LD="${LD-ld} -melf32bmipn32"
7277 ;;
7278 *64-bit*)
7279 LD="${LD-ld} -melf64bmip"
7280 ;;
7281 esac
7282 else
7283 case `/usr/bin/file conftest.$ac_objext` in
7284 *32-bit*)
7285 LD="${LD-ld} -32"
7286 ;;
7287 *N32*)
7288 LD="${LD-ld} -n32"
7289 ;;
7290 *64-bit*)
7291 LD="${LD-ld} -64"
7292 ;;
7293 esac
7294 fi
7295 fi
7296 rm -rf conftest*
7297 ;;
7298  
7299 mips64*-*linux*)
7300 # Find out what ABI is being produced by ac_compile, and set linker
7301 # options accordingly.
7302 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
7303 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7304 (eval $ac_compile) 2>&5
7305 ac_status=$?
7306 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7307 test $ac_status = 0; }; then
7308 emul=elf
7309 case `/usr/bin/file conftest.$ac_objext` in
7310 *32-bit*)
7311 emul="${emul}32"
7312 ;;
7313 *64-bit*)
7314 emul="${emul}64"
7315 ;;
7316 esac
7317 case `/usr/bin/file conftest.$ac_objext` in
7318 *MSB*)
7319 emul="${emul}btsmip"
7320 ;;
7321 *LSB*)
7322 emul="${emul}ltsmip"
7323 ;;
7324 esac
7325 case `/usr/bin/file conftest.$ac_objext` in
7326 *N32*)
7327 emul="${emul}n32"
7328 ;;
7329 esac
7330 LD="${LD-ld} -m $emul"
7331 fi
7332 rm -rf conftest*
7333 ;;
7334  
7335 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
7336 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
7337 # Find out what ABI is being produced by ac_compile, and set linker
7338 # options accordingly. Note that the listed cases only cover the
7339 # situations where additional linker options are needed (such as when
7340 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
7341 # vice versa); the common cases where no linker options are needed do
7342 # not appear in the list.
7343 echo 'int i;' > conftest.$ac_ext
7344 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7345 (eval $ac_compile) 2>&5
7346 ac_status=$?
7347 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7348 test $ac_status = 0; }; then
7349 case `/usr/bin/file conftest.o` in
7350 *32-bit*)
7351 case $host in
7352 x86_64-*kfreebsd*-gnu)
7353 LD="${LD-ld} -m elf_i386_fbsd"
7354 ;;
7355 x86_64-*linux*)
7356 case `/usr/bin/file conftest.o` in
7357 *x86-64*)
7358 LD="${LD-ld} -m elf32_x86_64"
7359 ;;
7360 *)
7361 LD="${LD-ld} -m elf_i386"
7362 ;;
7363 esac
7364 ;;
7365 powerpc64le-*linux*)
7366 LD="${LD-ld} -m elf32lppclinux"
7367 ;;
7368 powerpc64-*linux*)
7369 LD="${LD-ld} -m elf32ppclinux"
7370 ;;
7371 s390x-*linux*)
7372 LD="${LD-ld} -m elf_s390"
7373 ;;
7374 sparc64-*linux*)
7375 LD="${LD-ld} -m elf32_sparc"
7376 ;;
7377 esac
7378 ;;
7379 *64-bit*)
7380 case $host in
7381 x86_64-*kfreebsd*-gnu)
7382 LD="${LD-ld} -m elf_x86_64_fbsd"
7383 ;;
7384 x86_64-*linux*)
7385 LD="${LD-ld} -m elf_x86_64"
7386 ;;
7387 powerpcle-*linux*)
7388 LD="${LD-ld} -m elf64lppc"
7389 ;;
7390 powerpc-*linux*)
7391 LD="${LD-ld} -m elf64ppc"
7392 ;;
7393 s390*-*linux*|s390*-*tpf*)
7394 LD="${LD-ld} -m elf64_s390"
7395 ;;
7396 sparc*-*linux*)
7397 LD="${LD-ld} -m elf64_sparc"
7398 ;;
7399 esac
7400 ;;
7401 esac
7402 fi
7403 rm -rf conftest*
7404 ;;
7405  
7406 *-*-sco3.2v5*)
7407 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
7408 SAVE_CFLAGS=$CFLAGS
7409 CFLAGS="$CFLAGS -belf"
7410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
7411 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
7412 if ${lt_cv_cc_needs_belf+:} false; then :
7413 $as_echo_n "(cached) " >&6
7414 else
7415 ac_ext=c
7416 ac_cpp='$CPP $CPPFLAGS'
7417 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7418 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7419 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7420  
7421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7422 /* end confdefs.h. */
7423  
7424 int
7425 main ()
7426 {
7427  
7428 ;
7429 return 0;
7430 }
7431 _ACEOF
7432 if ac_fn_c_try_link "$LINENO"; then :
7433 lt_cv_cc_needs_belf=yes
7434 else
7435 lt_cv_cc_needs_belf=no
7436 fi
7437 rm -f core conftest.err conftest.$ac_objext \
7438 conftest$ac_exeext conftest.$ac_ext
7439 ac_ext=c
7440 ac_cpp='$CPP $CPPFLAGS'
7441 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7442 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7443 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7444  
7445 fi
7446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
7447 $as_echo "$lt_cv_cc_needs_belf" >&6; }
7448 if test yes != "$lt_cv_cc_needs_belf"; then
7449 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
7450 CFLAGS=$SAVE_CFLAGS
7451 fi
7452 ;;
7453 *-*solaris*)
7454 # Find out what ABI is being produced by ac_compile, and set linker
7455 # options accordingly.
7456 echo 'int i;' > conftest.$ac_ext
7457 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7458 (eval $ac_compile) 2>&5
7459 ac_status=$?
7460 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7461 test $ac_status = 0; }; then
7462 case `/usr/bin/file conftest.o` in
7463 *64-bit*)
7464 case $lt_cv_prog_gnu_ld in
7465 yes*)
7466 case $host in
7467 i?86-*-solaris*|x86_64-*-solaris*)
7468 LD="${LD-ld} -m elf_x86_64"
7469 ;;
7470 sparc*-*-solaris*)
7471 LD="${LD-ld} -m elf64_sparc"
7472 ;;
7473 esac
7474 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
7475 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
7476 LD=${LD-ld}_sol2
7477 fi
7478 ;;
7479 *)
7480 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
7481 LD="${LD-ld} -64"
7482 fi
7483 ;;
7484 esac
7485 ;;
7486 esac
7487 fi
7488 rm -rf conftest*
7489 ;;
7490 esac
7491  
7492 need_locks=$enable_libtool_lock
7493  
7494 if test -n "$ac_tool_prefix"; then
7495 # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
7496 set dummy ${ac_tool_prefix}mt; ac_word=$2
7497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7498 $as_echo_n "checking for $ac_word... " >&6; }
7499 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
7500 $as_echo_n "(cached) " >&6
7501 else
7502 if test -n "$MANIFEST_TOOL"; then
7503 ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
7504 else
7505 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7506 for as_dir in $PATH
7507 do
7508 IFS=$as_save_IFS
7509 test -z "$as_dir" && as_dir=.
7510 for ac_exec_ext in '' $ac_executable_extensions; do
7511 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7512 ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
7513 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7514 break 2
7515 fi
7516 done
7517 done
7518 IFS=$as_save_IFS
7519  
7520 fi
7521 fi
7522 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
7523 if test -n "$MANIFEST_TOOL"; then
7524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
7525 $as_echo "$MANIFEST_TOOL" >&6; }
7526 else
7527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7528 $as_echo "no" >&6; }
7529 fi
7530  
7531  
7532 fi
7533 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
7534 ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
7535 # Extract the first word of "mt", so it can be a program name with args.
7536 set dummy mt; ac_word=$2
7537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7538 $as_echo_n "checking for $ac_word... " >&6; }
7539 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
7540 $as_echo_n "(cached) " >&6
7541 else
7542 if test -n "$ac_ct_MANIFEST_TOOL"; then
7543 ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
7544 else
7545 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7546 for as_dir in $PATH
7547 do
7548 IFS=$as_save_IFS
7549 test -z "$as_dir" && as_dir=.
7550 for ac_exec_ext in '' $ac_executable_extensions; do
7551 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7552 ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
7553 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7554 break 2
7555 fi
7556 done
7557 done
7558 IFS=$as_save_IFS
7559  
7560 fi
7561 fi
7562 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
7563 if test -n "$ac_ct_MANIFEST_TOOL"; then
7564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
7565 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
7566 else
7567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7568 $as_echo "no" >&6; }
7569 fi
7570  
7571 if test "x$ac_ct_MANIFEST_TOOL" = x; then
7572 MANIFEST_TOOL=":"
7573 else
7574 case $cross_compiling:$ac_tool_warned in
7575 yes:)
7576 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7577 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7578 ac_tool_warned=yes ;;
7579 esac
7580 MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
7581 fi
7582 else
7583 MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
7584 fi
7585  
7586 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
7587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
7588 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
7589 if ${lt_cv_path_mainfest_tool+:} false; then :
7590 $as_echo_n "(cached) " >&6
7591 else
7592 lt_cv_path_mainfest_tool=no
7593 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
7594 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
7595 cat conftest.err >&5
7596 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
7597 lt_cv_path_mainfest_tool=yes
7598 fi
7599 rm -f conftest*
7600 fi
7601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
7602 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
7603 if test yes != "$lt_cv_path_mainfest_tool"; then
7604 MANIFEST_TOOL=:
7605 fi
7606  
7607  
7608  
7609  
7610  
7611  
7612 case $host_os in
7613 rhapsody* | darwin*)
7614 if test -n "$ac_tool_prefix"; then
7615 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
7616 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
7617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7618 $as_echo_n "checking for $ac_word... " >&6; }
7619 if ${ac_cv_prog_DSYMUTIL+:} false; then :
7620 $as_echo_n "(cached) " >&6
7621 else
7622 if test -n "$DSYMUTIL"; then
7623 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
7624 else
7625 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7626 for as_dir in $PATH
7627 do
7628 IFS=$as_save_IFS
7629 test -z "$as_dir" && as_dir=.
7630 for ac_exec_ext in '' $ac_executable_extensions; do
7631 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7632 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
7633 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7634 break 2
7635 fi
7636 done
7637 done
7638 IFS=$as_save_IFS
7639  
7640 fi
7641 fi
7642 DSYMUTIL=$ac_cv_prog_DSYMUTIL
7643 if test -n "$DSYMUTIL"; then
7644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
7645 $as_echo "$DSYMUTIL" >&6; }
7646 else
7647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7648 $as_echo "no" >&6; }
7649 fi
7650  
7651  
7652 fi
7653 if test -z "$ac_cv_prog_DSYMUTIL"; then
7654 ac_ct_DSYMUTIL=$DSYMUTIL
7655 # Extract the first word of "dsymutil", so it can be a program name with args.
7656 set dummy dsymutil; ac_word=$2
7657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7658 $as_echo_n "checking for $ac_word... " >&6; }
7659 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
7660 $as_echo_n "(cached) " >&6
7661 else
7662 if test -n "$ac_ct_DSYMUTIL"; then
7663 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
7664 else
7665 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7666 for as_dir in $PATH
7667 do
7668 IFS=$as_save_IFS
7669 test -z "$as_dir" && as_dir=.
7670 for ac_exec_ext in '' $ac_executable_extensions; do
7671 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7672 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
7673 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7674 break 2
7675 fi
7676 done
7677 done
7678 IFS=$as_save_IFS
7679  
7680 fi
7681 fi
7682 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
7683 if test -n "$ac_ct_DSYMUTIL"; then
7684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
7685 $as_echo "$ac_ct_DSYMUTIL" >&6; }
7686 else
7687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7688 $as_echo "no" >&6; }
7689 fi
7690  
7691 if test "x$ac_ct_DSYMUTIL" = x; then
7692 DSYMUTIL=":"
7693 else
7694 case $cross_compiling:$ac_tool_warned in
7695 yes:)
7696 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7697 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7698 ac_tool_warned=yes ;;
7699 esac
7700 DSYMUTIL=$ac_ct_DSYMUTIL
7701 fi
7702 else
7703 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
7704 fi
7705  
7706 if test -n "$ac_tool_prefix"; then
7707 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
7708 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
7709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7710 $as_echo_n "checking for $ac_word... " >&6; }
7711 if ${ac_cv_prog_NMEDIT+:} false; then :
7712 $as_echo_n "(cached) " >&6
7713 else
7714 if test -n "$NMEDIT"; then
7715 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
7716 else
7717 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7718 for as_dir in $PATH
7719 do
7720 IFS=$as_save_IFS
7721 test -z "$as_dir" && as_dir=.
7722 for ac_exec_ext in '' $ac_executable_extensions; do
7723 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7724 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
7725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7726 break 2
7727 fi
7728 done
7729 done
7730 IFS=$as_save_IFS
7731  
7732 fi
7733 fi
7734 NMEDIT=$ac_cv_prog_NMEDIT
7735 if test -n "$NMEDIT"; then
7736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
7737 $as_echo "$NMEDIT" >&6; }
7738 else
7739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7740 $as_echo "no" >&6; }
7741 fi
7742  
7743  
7744 fi
7745 if test -z "$ac_cv_prog_NMEDIT"; then
7746 ac_ct_NMEDIT=$NMEDIT
7747 # Extract the first word of "nmedit", so it can be a program name with args.
7748 set dummy nmedit; ac_word=$2
7749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7750 $as_echo_n "checking for $ac_word... " >&6; }
7751 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
7752 $as_echo_n "(cached) " >&6
7753 else
7754 if test -n "$ac_ct_NMEDIT"; then
7755 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
7756 else
7757 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7758 for as_dir in $PATH
7759 do
7760 IFS=$as_save_IFS
7761 test -z "$as_dir" && as_dir=.
7762 for ac_exec_ext in '' $ac_executable_extensions; do
7763 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7764 ac_cv_prog_ac_ct_NMEDIT="nmedit"
7765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7766 break 2
7767 fi
7768 done
7769 done
7770 IFS=$as_save_IFS
7771  
7772 fi
7773 fi
7774 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
7775 if test -n "$ac_ct_NMEDIT"; then
7776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
7777 $as_echo "$ac_ct_NMEDIT" >&6; }
7778 else
7779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7780 $as_echo "no" >&6; }
7781 fi
7782  
7783 if test "x$ac_ct_NMEDIT" = x; then
7784 NMEDIT=":"
7785 else
7786 case $cross_compiling:$ac_tool_warned in
7787 yes:)
7788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7789 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7790 ac_tool_warned=yes ;;
7791 esac
7792 NMEDIT=$ac_ct_NMEDIT
7793 fi
7794 else
7795 NMEDIT="$ac_cv_prog_NMEDIT"
7796 fi
7797  
7798 if test -n "$ac_tool_prefix"; then
7799 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
7800 set dummy ${ac_tool_prefix}lipo; ac_word=$2
7801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7802 $as_echo_n "checking for $ac_word... " >&6; }
7803 if ${ac_cv_prog_LIPO+:} false; then :
7804 $as_echo_n "(cached) " >&6
7805 else
7806 if test -n "$LIPO"; then
7807 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
7808 else
7809 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7810 for as_dir in $PATH
7811 do
7812 IFS=$as_save_IFS
7813 test -z "$as_dir" && as_dir=.
7814 for ac_exec_ext in '' $ac_executable_extensions; do
7815 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7816 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
7817 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7818 break 2
7819 fi
7820 done
7821 done
7822 IFS=$as_save_IFS
7823  
7824 fi
7825 fi
7826 LIPO=$ac_cv_prog_LIPO
7827 if test -n "$LIPO"; then
7828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
7829 $as_echo "$LIPO" >&6; }
7830 else
7831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7832 $as_echo "no" >&6; }
7833 fi
7834  
7835  
7836 fi
7837 if test -z "$ac_cv_prog_LIPO"; then
7838 ac_ct_LIPO=$LIPO
7839 # Extract the first word of "lipo", so it can be a program name with args.
7840 set dummy lipo; ac_word=$2
7841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7842 $as_echo_n "checking for $ac_word... " >&6; }
7843 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
7844 $as_echo_n "(cached) " >&6
7845 else
7846 if test -n "$ac_ct_LIPO"; then
7847 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
7848 else
7849 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7850 for as_dir in $PATH
7851 do
7852 IFS=$as_save_IFS
7853 test -z "$as_dir" && as_dir=.
7854 for ac_exec_ext in '' $ac_executable_extensions; do
7855 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7856 ac_cv_prog_ac_ct_LIPO="lipo"
7857 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7858 break 2
7859 fi
7860 done
7861 done
7862 IFS=$as_save_IFS
7863  
7864 fi
7865 fi
7866 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
7867 if test -n "$ac_ct_LIPO"; then
7868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
7869 $as_echo "$ac_ct_LIPO" >&6; }
7870 else
7871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7872 $as_echo "no" >&6; }
7873 fi
7874  
7875 if test "x$ac_ct_LIPO" = x; then
7876 LIPO=":"
7877 else
7878 case $cross_compiling:$ac_tool_warned in
7879 yes:)
7880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7881 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7882 ac_tool_warned=yes ;;
7883 esac
7884 LIPO=$ac_ct_LIPO
7885 fi
7886 else
7887 LIPO="$ac_cv_prog_LIPO"
7888 fi
7889  
7890 if test -n "$ac_tool_prefix"; then
7891 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
7892 set dummy ${ac_tool_prefix}otool; ac_word=$2
7893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7894 $as_echo_n "checking for $ac_word... " >&6; }
7895 if ${ac_cv_prog_OTOOL+:} false; then :
7896 $as_echo_n "(cached) " >&6
7897 else
7898 if test -n "$OTOOL"; then
7899 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
7900 else
7901 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7902 for as_dir in $PATH
7903 do
7904 IFS=$as_save_IFS
7905 test -z "$as_dir" && as_dir=.
7906 for ac_exec_ext in '' $ac_executable_extensions; do
7907 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7908 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
7909 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7910 break 2
7911 fi
7912 done
7913 done
7914 IFS=$as_save_IFS
7915  
7916 fi
7917 fi
7918 OTOOL=$ac_cv_prog_OTOOL
7919 if test -n "$OTOOL"; then
7920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
7921 $as_echo "$OTOOL" >&6; }
7922 else
7923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7924 $as_echo "no" >&6; }
7925 fi
7926  
7927  
7928 fi
7929 if test -z "$ac_cv_prog_OTOOL"; then
7930 ac_ct_OTOOL=$OTOOL
7931 # Extract the first word of "otool", so it can be a program name with args.
7932 set dummy otool; ac_word=$2
7933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7934 $as_echo_n "checking for $ac_word... " >&6; }
7935 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
7936 $as_echo_n "(cached) " >&6
7937 else
7938 if test -n "$ac_ct_OTOOL"; then
7939 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
7940 else
7941 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7942 for as_dir in $PATH
7943 do
7944 IFS=$as_save_IFS
7945 test -z "$as_dir" && as_dir=.
7946 for ac_exec_ext in '' $ac_executable_extensions; do
7947 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7948 ac_cv_prog_ac_ct_OTOOL="otool"
7949 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7950 break 2
7951 fi
7952 done
7953 done
7954 IFS=$as_save_IFS
7955  
7956 fi
7957 fi
7958 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
7959 if test -n "$ac_ct_OTOOL"; then
7960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
7961 $as_echo "$ac_ct_OTOOL" >&6; }
7962 else
7963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7964 $as_echo "no" >&6; }
7965 fi
7966  
7967 if test "x$ac_ct_OTOOL" = x; then
7968 OTOOL=":"
7969 else
7970 case $cross_compiling:$ac_tool_warned in
7971 yes:)
7972 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7973 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7974 ac_tool_warned=yes ;;
7975 esac
7976 OTOOL=$ac_ct_OTOOL
7977 fi
7978 else
7979 OTOOL="$ac_cv_prog_OTOOL"
7980 fi
7981  
7982 if test -n "$ac_tool_prefix"; then
7983 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
7984 set dummy ${ac_tool_prefix}otool64; ac_word=$2
7985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7986 $as_echo_n "checking for $ac_word... " >&6; }
7987 if ${ac_cv_prog_OTOOL64+:} false; then :
7988 $as_echo_n "(cached) " >&6
7989 else
7990 if test -n "$OTOOL64"; then
7991 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
7992 else
7993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7994 for as_dir in $PATH
7995 do
7996 IFS=$as_save_IFS
7997 test -z "$as_dir" && as_dir=.
7998 for ac_exec_ext in '' $ac_executable_extensions; do
7999 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8000 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
8001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8002 break 2
8003 fi
8004 done
8005 done
8006 IFS=$as_save_IFS
8007  
8008 fi
8009 fi
8010 OTOOL64=$ac_cv_prog_OTOOL64
8011 if test -n "$OTOOL64"; then
8012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
8013 $as_echo "$OTOOL64" >&6; }
8014 else
8015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8016 $as_echo "no" >&6; }
8017 fi
8018  
8019  
8020 fi
8021 if test -z "$ac_cv_prog_OTOOL64"; then
8022 ac_ct_OTOOL64=$OTOOL64
8023 # Extract the first word of "otool64", so it can be a program name with args.
8024 set dummy otool64; ac_word=$2
8025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8026 $as_echo_n "checking for $ac_word... " >&6; }
8027 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
8028 $as_echo_n "(cached) " >&6
8029 else
8030 if test -n "$ac_ct_OTOOL64"; then
8031 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
8032 else
8033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8034 for as_dir in $PATH
8035 do
8036 IFS=$as_save_IFS
8037 test -z "$as_dir" && as_dir=.
8038 for ac_exec_ext in '' $ac_executable_extensions; do
8039 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8040 ac_cv_prog_ac_ct_OTOOL64="otool64"
8041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8042 break 2
8043 fi
8044 done
8045 done
8046 IFS=$as_save_IFS
8047  
8048 fi
8049 fi
8050 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
8051 if test -n "$ac_ct_OTOOL64"; then
8052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
8053 $as_echo "$ac_ct_OTOOL64" >&6; }
8054 else
8055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8056 $as_echo "no" >&6; }
8057 fi
8058  
8059 if test "x$ac_ct_OTOOL64" = x; then
8060 OTOOL64=":"
8061 else
8062 case $cross_compiling:$ac_tool_warned in
8063 yes:)
8064 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8065 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8066 ac_tool_warned=yes ;;
8067 esac
8068 OTOOL64=$ac_ct_OTOOL64
8069 fi
8070 else
8071 OTOOL64="$ac_cv_prog_OTOOL64"
8072 fi
8073  
8074  
8075  
8076  
8077  
8078  
8079  
8080  
8081  
8082  
8083  
8084  
8085  
8086  
8087  
8088  
8089  
8090  
8091  
8092  
8093  
8094  
8095  
8096  
8097  
8098  
8099  
8100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
8101 $as_echo_n "checking for -single_module linker flag... " >&6; }
8102 if ${lt_cv_apple_cc_single_mod+:} false; then :
8103 $as_echo_n "(cached) " >&6
8104 else
8105 lt_cv_apple_cc_single_mod=no
8106 if test -z "$LT_MULTI_MODULE"; then
8107 # By default we will add the -single_module flag. You can override
8108 # by either setting the environment variable LT_MULTI_MODULE
8109 # non-empty at configure time, or by adding -multi_module to the
8110 # link flags.
8111 rm -rf libconftest.dylib*
8112 echo "int foo(void){return 1;}" > conftest.c
8113 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
8114 -dynamiclib -Wl,-single_module conftest.c" >&5
8115 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
8116 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
8117 _lt_result=$?
8118 # If there is a non-empty error log, and "single_module"
8119 # appears in it, assume the flag caused a linker warning
8120 if test -s conftest.err && $GREP single_module conftest.err; then
8121 cat conftest.err >&5
8122 # Otherwise, if the output was created with a 0 exit code from
8123 # the compiler, it worked.
8124 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
8125 lt_cv_apple_cc_single_mod=yes
8126 else
8127 cat conftest.err >&5
8128 fi
8129 rm -rf libconftest.dylib*
8130 rm -f conftest.*
8131 fi
8132 fi
8133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
8134 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
8135  
8136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
8137 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
8138 if ${lt_cv_ld_exported_symbols_list+:} false; then :
8139 $as_echo_n "(cached) " >&6
8140 else
8141 lt_cv_ld_exported_symbols_list=no
8142 save_LDFLAGS=$LDFLAGS
8143 echo "_main" > conftest.sym
8144 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
8145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8146 /* end confdefs.h. */
8147  
8148 int
8149 main ()
8150 {
8151  
8152 ;
8153 return 0;
8154 }
8155 _ACEOF
8156 if ac_fn_c_try_link "$LINENO"; then :
8157 lt_cv_ld_exported_symbols_list=yes
8158 else
8159 lt_cv_ld_exported_symbols_list=no
8160 fi
8161 rm -f core conftest.err conftest.$ac_objext \
8162 conftest$ac_exeext conftest.$ac_ext
8163 LDFLAGS=$save_LDFLAGS
8164  
8165 fi
8166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
8167 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
8168  
8169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
8170 $as_echo_n "checking for -force_load linker flag... " >&6; }
8171 if ${lt_cv_ld_force_load+:} false; then :
8172 $as_echo_n "(cached) " >&6
8173 else
8174 lt_cv_ld_force_load=no
8175 cat > conftest.c << _LT_EOF
8176 int forced_loaded() { return 2;}
8177 _LT_EOF
8178 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
8179 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
8180 echo "$AR cru libconftest.a conftest.o" >&5
8181 $AR cru libconftest.a conftest.o 2>&5
8182 echo "$RANLIB libconftest.a" >&5
8183 $RANLIB libconftest.a 2>&5
8184 cat > conftest.c << _LT_EOF
8185 int main() { return 0;}
8186 _LT_EOF
8187 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
8188 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
8189 _lt_result=$?
8190 if test -s conftest.err && $GREP force_load conftest.err; then
8191 cat conftest.err >&5
8192 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
8193 lt_cv_ld_force_load=yes
8194 else
8195 cat conftest.err >&5
8196 fi
8197 rm -f conftest.err libconftest.a conftest conftest.c
8198 rm -rf conftest.dSYM
8199  
8200 fi
8201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
8202 $as_echo "$lt_cv_ld_force_load" >&6; }
8203 case $host_os in
8204 rhapsody* | darwin1.[012])
8205 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
8206 darwin1.*)
8207 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
8208 darwin*) # darwin 5.x on
8209 # if running on 10.5 or later, the deployment target defaults
8210 # to the OS version, if on x86, and 10.4, the deployment
8211 # target defaults to 10.4. Don't you love it?
8212 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
8213 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
8214 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
8215 10.[012][,.]*)
8216 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
8217 10.*)
8218 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
8219 esac
8220 ;;
8221 esac
8222 if test yes = "$lt_cv_apple_cc_single_mod"; then
8223 _lt_dar_single_mod='$single_module'
8224 fi
8225 if test yes = "$lt_cv_ld_exported_symbols_list"; then
8226 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
8227 else
8228 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
8229 fi
8230 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
8231 _lt_dsymutil='~$DSYMUTIL $lib || :'
8232 else
8233 _lt_dsymutil=
8234 fi
8235 ;;
8236 esac
8237  
8238 # func_munge_path_list VARIABLE PATH
8239 # -----------------------------------
8240 # VARIABLE is name of variable containing _space_ separated list of
8241 # directories to be munged by the contents of PATH, which is string
8242 # having a format:
8243 # "DIR[:DIR]:"
8244 # string "DIR[ DIR]" will be prepended to VARIABLE
8245 # ":DIR[:DIR]"
8246 # string "DIR[ DIR]" will be appended to VARIABLE
8247 # "DIRP[:DIRP]::[DIRA:]DIRA"
8248 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
8249 # "DIRA[ DIRA]" will be appended to VARIABLE
8250 # "DIR[:DIR]"
8251 # VARIABLE will be replaced by "DIR[ DIR]"
8252 func_munge_path_list ()
8253 {
8254 case x$2 in
8255 x)
8256 ;;
8257 *:)
8258 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
8259 ;;
8260 x:*)
8261 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
8262 ;;
8263 *::*)
8264 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
8265 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
8266 ;;
8267 *)
8268 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
8269 ;;
8270 esac
8271 }
8272  
8273 ac_ext=c
8274 ac_cpp='$CPP $CPPFLAGS'
8275 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8276 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8277 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
8279 $as_echo_n "checking how to run the C preprocessor... " >&6; }
8280 # On Suns, sometimes $CPP names a directory.
8281 if test -n "$CPP" && test -d "$CPP"; then
8282 CPP=
8283 fi
8284 if test -z "$CPP"; then
8285 if ${ac_cv_prog_CPP+:} false; then :
8286 $as_echo_n "(cached) " >&6
8287 else
8288 # Double quotes because CPP needs to be expanded
8289 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
8290 do
8291 ac_preproc_ok=false
8292 for ac_c_preproc_warn_flag in '' yes
8293 do
8294 # Use a header file that comes with gcc, so configuring glibc
8295 # with a fresh cross-compiler works.
8296 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8297 # <limits.h> exists even on freestanding compilers.
8298 # On the NeXT, cc -E runs the code through the compiler's parser,
8299 # not just through cpp. "Syntax error" is here to catch this case.
8300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8301 /* end confdefs.h. */
8302 #ifdef __STDC__
8303 # include <limits.h>
8304 #else
8305 # include <assert.h>
8306 #endif
8307 Syntax error
8308 _ACEOF
8309 if ac_fn_c_try_cpp "$LINENO"; then :
8310  
8311 else
8312 # Broken: fails on valid input.
8313 continue
8314 fi
8315 rm -f conftest.err conftest.i conftest.$ac_ext
8316  
8317 # OK, works on sane cases. Now check whether nonexistent headers
8318 # can be detected and how.
8319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8320 /* end confdefs.h. */
8321 #include <ac_nonexistent.h>
8322 _ACEOF
8323 if ac_fn_c_try_cpp "$LINENO"; then :
8324 # Broken: success on invalid input.
8325 continue
8326 else
8327 # Passes both tests.
8328 ac_preproc_ok=:
8329 break
8330 fi
8331 rm -f conftest.err conftest.i conftest.$ac_ext
8332  
8333 done
8334 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8335 rm -f conftest.i conftest.err conftest.$ac_ext
8336 if $ac_preproc_ok; then :
8337 break
8338 fi
8339  
8340 done
8341 ac_cv_prog_CPP=$CPP
8342  
8343 fi
8344 CPP=$ac_cv_prog_CPP
8345 else
8346 ac_cv_prog_CPP=$CPP
8347 fi
8348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
8349 $as_echo "$CPP" >&6; }
8350 ac_preproc_ok=false
8351 for ac_c_preproc_warn_flag in '' yes
8352 do
8353 # Use a header file that comes with gcc, so configuring glibc
8354 # with a fresh cross-compiler works.
8355 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8356 # <limits.h> exists even on freestanding compilers.
8357 # On the NeXT, cc -E runs the code through the compiler's parser,
8358 # not just through cpp. "Syntax error" is here to catch this case.
8359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8360 /* end confdefs.h. */
8361 #ifdef __STDC__
8362 # include <limits.h>
8363 #else
8364 # include <assert.h>
8365 #endif
8366 Syntax error
8367 _ACEOF
8368 if ac_fn_c_try_cpp "$LINENO"; then :
8369  
8370 else
8371 # Broken: fails on valid input.
8372 continue
8373 fi
8374 rm -f conftest.err conftest.i conftest.$ac_ext
8375  
8376 # OK, works on sane cases. Now check whether nonexistent headers
8377 # can be detected and how.
8378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8379 /* end confdefs.h. */
8380 #include <ac_nonexistent.h>
8381 _ACEOF
8382 if ac_fn_c_try_cpp "$LINENO"; then :
8383 # Broken: success on invalid input.
8384 continue
8385 else
8386 # Passes both tests.
8387 ac_preproc_ok=:
8388 break
8389 fi
8390 rm -f conftest.err conftest.i conftest.$ac_ext
8391  
8392 done
8393 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8394 rm -f conftest.i conftest.err conftest.$ac_ext
8395 if $ac_preproc_ok; then :
8396  
8397 else
8398 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8399 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8400 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
8401 See \`config.log' for more details" "$LINENO" 5; }
8402 fi
8403  
8404 ac_ext=c
8405 ac_cpp='$CPP $CPPFLAGS'
8406 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8407 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8408 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8409  
8410  
8411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
8412 $as_echo_n "checking for ANSI C header files... " >&6; }
8413 if ${ac_cv_header_stdc+:} false; then :
8414 $as_echo_n "(cached) " >&6
8415 else
8416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8417 /* end confdefs.h. */
8418 #include <stdlib.h>
8419 #include <stdarg.h>
8420 #include <string.h>
8421 #include <float.h>
8422  
8423 int
8424 main ()
8425 {
8426  
8427 ;
8428 return 0;
8429 }
8430 _ACEOF
8431 if ac_fn_c_try_compile "$LINENO"; then :
8432 ac_cv_header_stdc=yes
8433 else
8434 ac_cv_header_stdc=no
8435 fi
8436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8437  
8438 if test $ac_cv_header_stdc = yes; then
8439 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8441 /* end confdefs.h. */
8442 #include <string.h>
8443  
8444 _ACEOF
8445 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8446 $EGREP "memchr" >/dev/null 2>&1; then :
8447  
8448 else
8449 ac_cv_header_stdc=no
8450 fi
8451 rm -f conftest*
8452  
8453 fi
8454  
8455 if test $ac_cv_header_stdc = yes; then
8456 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8458 /* end confdefs.h. */
8459 #include <stdlib.h>
8460  
8461 _ACEOF
8462 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8463 $EGREP "free" >/dev/null 2>&1; then :
8464  
8465 else
8466 ac_cv_header_stdc=no
8467 fi
8468 rm -f conftest*
8469  
8470 fi
8471  
8472 if test $ac_cv_header_stdc = yes; then
8473 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8474 if test "$cross_compiling" = yes; then :
8475 :
8476 else
8477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8478 /* end confdefs.h. */
8479 #include <ctype.h>
8480 #include <stdlib.h>
8481 #if ((' ' & 0x0FF) == 0x020)
8482 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8483 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8484 #else
8485 # define ISLOWER(c) \
8486 (('a' <= (c) && (c) <= 'i') \
8487 || ('j' <= (c) && (c) <= 'r') \
8488 || ('s' <= (c) && (c) <= 'z'))
8489 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8490 #endif
8491  
8492 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8493 int
8494 main ()
8495 {
8496 int i;
8497 for (i = 0; i < 256; i++)
8498 if (XOR (islower (i), ISLOWER (i))
8499 || toupper (i) != TOUPPER (i))
8500 return 2;
8501 return 0;
8502 }
8503 _ACEOF
8504 if ac_fn_c_try_run "$LINENO"; then :
8505  
8506 else
8507 ac_cv_header_stdc=no
8508 fi
8509 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8510 conftest.$ac_objext conftest.beam conftest.$ac_ext
8511 fi
8512  
8513 fi
8514 fi
8515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
8516 $as_echo "$ac_cv_header_stdc" >&6; }
8517 if test $ac_cv_header_stdc = yes; then
8518  
8519 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
8520  
8521 fi
8522  
8523 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8524 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8525 inttypes.h stdint.h unistd.h
8526 do :
8527 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8528 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8529 "
8530 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8531 cat >>confdefs.h <<_ACEOF
8532 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8533 _ACEOF
8534  
8535 fi
8536  
8537 done
8538  
8539  
8540 for ac_header in dlfcn.h
8541 do :
8542 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
8543 "
8544 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
8545 cat >>confdefs.h <<_ACEOF
8546 #define HAVE_DLFCN_H 1
8547 _ACEOF
8548  
8549 fi
8550  
8551 done
8552  
8553  
8554  
8555  
8556  
8557 # Set options
8558 # Check whether --enable-static was given.
8559 if test "${enable_static+set}" = set; then :
8560 enableval=$enable_static; p=${PACKAGE-default}
8561 case $enableval in
8562 yes) enable_static=yes ;;
8563 no) enable_static=no ;;
8564 *)
8565 enable_static=no
8566 # Look at the argument we got. We use all the common list separators.
8567 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8568 for pkg in $enableval; do
8569 IFS=$lt_save_ifs
8570 if test "X$pkg" = "X$p"; then
8571 enable_static=yes
8572 fi
8573 done
8574 IFS=$lt_save_ifs
8575 ;;
8576 esac
8577 else
8578 enable_static=no
8579 fi
8580  
8581  
8582  
8583  
8584  
8585  
8586  
8587 enable_dlopen=yes
8588  
8589  
8590  
8591  
8592 enable_win32_dll=no
8593  
8594  
8595 # Check whether --enable-shared was given.
8596 if test "${enable_shared+set}" = set; then :
8597 enableval=$enable_shared; p=${PACKAGE-default}
8598 case $enableval in
8599 yes) enable_shared=yes ;;
8600 no) enable_shared=no ;;
8601 *)
8602 enable_shared=no
8603 # Look at the argument we got. We use all the common list separators.
8604 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8605 for pkg in $enableval; do
8606 IFS=$lt_save_ifs
8607 if test "X$pkg" = "X$p"; then
8608 enable_shared=yes
8609 fi
8610 done
8611 IFS=$lt_save_ifs
8612 ;;
8613 esac
8614 else
8615 enable_shared=yes
8616 fi
8617  
8618  
8619  
8620  
8621  
8622  
8623  
8624  
8625  
8626  
8627  
8628 # Check whether --with-pic was given.
8629 if test "${with_pic+set}" = set; then :
8630 withval=$with_pic; lt_p=${PACKAGE-default}
8631 case $withval in
8632 yes|no) pic_mode=$withval ;;
8633 *)
8634 pic_mode=default
8635 # Look at the argument we got. We use all the common list separators.
8636 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8637 for lt_pkg in $withval; do
8638 IFS=$lt_save_ifs
8639 if test "X$lt_pkg" = "X$lt_p"; then
8640 pic_mode=yes
8641 fi
8642 done
8643 IFS=$lt_save_ifs
8644 ;;
8645 esac
8646 else
8647 pic_mode=default
8648 fi
8649  
8650  
8651  
8652  
8653  
8654  
8655  
8656  
8657 # Check whether --enable-fast-install was given.
8658 if test "${enable_fast_install+set}" = set; then :
8659 enableval=$enable_fast_install; p=${PACKAGE-default}
8660 case $enableval in
8661 yes) enable_fast_install=yes ;;
8662 no) enable_fast_install=no ;;
8663 *)
8664 enable_fast_install=no
8665 # Look at the argument we got. We use all the common list separators.
8666 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8667 for pkg in $enableval; do
8668 IFS=$lt_save_ifs
8669 if test "X$pkg" = "X$p"; then
8670 enable_fast_install=yes
8671 fi
8672 done
8673 IFS=$lt_save_ifs
8674 ;;
8675 esac
8676 else
8677 enable_fast_install=yes
8678 fi
8679  
8680  
8681  
8682  
8683  
8684  
8685  
8686  
8687 shared_archive_member_spec=
8688 case $host,$enable_shared in
8689 power*-*-aix[5-9]*,yes)
8690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
8691 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
8692  
8693 # Check whether --with-aix-soname was given.
8694 if test "${with_aix_soname+set}" = set; then :
8695 withval=$with_aix_soname; case $withval in
8696 aix|svr4|both)
8697 ;;
8698 *)
8699 as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
8700 ;;
8701 esac
8702 lt_cv_with_aix_soname=$with_aix_soname
8703 else
8704 if ${lt_cv_with_aix_soname+:} false; then :
8705 $as_echo_n "(cached) " >&6
8706 else
8707 lt_cv_with_aix_soname=aix
8708 fi
8709  
8710 with_aix_soname=$lt_cv_with_aix_soname
8711 fi
8712  
8713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
8714 $as_echo "$with_aix_soname" >&6; }
8715 if test aix != "$with_aix_soname"; then
8716 # For the AIX way of multilib, we name the shared archive member
8717 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
8718 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
8719 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
8720 # the AIX toolchain works better with OBJECT_MODE set (default 32).
8721 if test 64 = "${OBJECT_MODE-32}"; then
8722 shared_archive_member_spec=shr_64
8723 else
8724 shared_archive_member_spec=shr
8725 fi
8726 fi
8727 ;;
8728 *)
8729 with_aix_soname=aix
8730 ;;
8731 esac
8732  
8733  
8734  
8735  
8736  
8737  
8738  
8739  
8740  
8741  
8742 # This can be used to rebuild libtool when needed
8743 LIBTOOL_DEPS=$ltmain
8744  
8745 # Always use our own libtool.
8746 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
8747  
8748  
8749  
8750  
8751  
8752  
8753  
8754  
8755  
8756  
8757  
8758  
8759  
8760  
8761  
8762  
8763  
8764  
8765  
8766  
8767  
8768  
8769  
8770  
8771  
8772  
8773  
8774  
8775  
8776  
8777 test -z "$LN_S" && LN_S="ln -s"
8778  
8779  
8780  
8781  
8782  
8783  
8784  
8785  
8786  
8787  
8788  
8789  
8790  
8791  
8792 if test -n "${ZSH_VERSION+set}"; then
8793 setopt NO_GLOB_SUBST
8794 fi
8795  
8796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
8797 $as_echo_n "checking for objdir... " >&6; }
8798 if ${lt_cv_objdir+:} false; then :
8799 $as_echo_n "(cached) " >&6
8800 else
8801 rm -f .libs 2>/dev/null
8802 mkdir .libs 2>/dev/null
8803 if test -d .libs; then
8804 lt_cv_objdir=.libs
8805 else
8806 # MS-DOS does not allow filenames that begin with a dot.
8807 lt_cv_objdir=_libs
8808 fi
8809 rmdir .libs 2>/dev/null
8810 fi
8811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
8812 $as_echo "$lt_cv_objdir" >&6; }
8813 objdir=$lt_cv_objdir
8814  
8815  
8816  
8817  
8818  
8819 cat >>confdefs.h <<_ACEOF
8820 #define LT_OBJDIR "$lt_cv_objdir/"
8821 _ACEOF
8822  
8823  
8824  
8825  
8826 case $host_os in
8827 aix3*)
8828 # AIX sometimes has problems with the GCC collect2 program. For some
8829 # reason, if we set the COLLECT_NAMES environment variable, the problems
8830 # vanish in a puff of smoke.
8831 if test set != "${COLLECT_NAMES+set}"; then
8832 COLLECT_NAMES=
8833 export COLLECT_NAMES
8834 fi
8835 ;;
8836 esac
8837  
8838 # Global variables:
8839 ofile=libtool
8840 can_build_shared=yes
8841  
8842 # All known linkers require a '.a' archive for static linking (except MSVC,
8843 # which needs '.lib').
8844 libext=a
8845  
8846 with_gnu_ld=$lt_cv_prog_gnu_ld
8847  
8848 old_CC=$CC
8849 old_CFLAGS=$CFLAGS
8850  
8851 # Set sane defaults for various variables
8852 test -z "$CC" && CC=cc
8853 test -z "$LTCC" && LTCC=$CC
8854 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
8855 test -z "$LD" && LD=ld
8856 test -z "$ac_objext" && ac_objext=o
8857  
8858 func_cc_basename $compiler
8859 cc_basename=$func_cc_basename_result
8860  
8861  
8862 # Only perform the check for file, if the check method requires it
8863 test -z "$MAGIC_CMD" && MAGIC_CMD=file
8864 case $deplibs_check_method in
8865 file_magic*)
8866 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
8867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
8868 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
8869 if ${lt_cv_path_MAGIC_CMD+:} false; then :
8870 $as_echo_n "(cached) " >&6
8871 else
8872 case $MAGIC_CMD in
8873 [\\/*] | ?:[\\/]*)
8874 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
8875 ;;
8876 *)
8877 lt_save_MAGIC_CMD=$MAGIC_CMD
8878 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8879 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8880 for ac_dir in $ac_dummy; do
8881 IFS=$lt_save_ifs
8882 test -z "$ac_dir" && ac_dir=.
8883 if test -f "$ac_dir/${ac_tool_prefix}file"; then
8884 lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
8885 if test -n "$file_magic_test_file"; then
8886 case $deplibs_check_method in
8887 "file_magic "*)
8888 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8889 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
8890 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8891 $EGREP "$file_magic_regex" > /dev/null; then
8892 :
8893 else
8894 cat <<_LT_EOF 1>&2
8895  
8896 *** Warning: the command libtool uses to detect shared libraries,
8897 *** $file_magic_cmd, produces output that libtool cannot recognize.
8898 *** The result is that libtool may fail to recognize shared libraries
8899 *** as such. This will affect the creation of libtool libraries that
8900 *** depend on shared libraries, but programs linked with such libtool
8901 *** libraries will work regardless of this problem. Nevertheless, you
8902 *** may want to report the problem to your system manager and/or to
8903 *** bug-libtool@gnu.org
8904  
8905 _LT_EOF
8906 fi ;;
8907 esac
8908 fi
8909 break
8910 fi
8911 done
8912 IFS=$lt_save_ifs
8913 MAGIC_CMD=$lt_save_MAGIC_CMD
8914 ;;
8915 esac
8916 fi
8917  
8918 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
8919 if test -n "$MAGIC_CMD"; then
8920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8921 $as_echo "$MAGIC_CMD" >&6; }
8922 else
8923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8924 $as_echo "no" >&6; }
8925 fi
8926  
8927  
8928  
8929  
8930  
8931 if test -z "$lt_cv_path_MAGIC_CMD"; then
8932 if test -n "$ac_tool_prefix"; then
8933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
8934 $as_echo_n "checking for file... " >&6; }
8935 if ${lt_cv_path_MAGIC_CMD+:} false; then :
8936 $as_echo_n "(cached) " >&6
8937 else
8938 case $MAGIC_CMD in
8939 [\\/*] | ?:[\\/]*)
8940 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
8941 ;;
8942 *)
8943 lt_save_MAGIC_CMD=$MAGIC_CMD
8944 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
8945 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8946 for ac_dir in $ac_dummy; do
8947 IFS=$lt_save_ifs
8948 test -z "$ac_dir" && ac_dir=.
8949 if test -f "$ac_dir/file"; then
8950 lt_cv_path_MAGIC_CMD=$ac_dir/"file"
8951 if test -n "$file_magic_test_file"; then
8952 case $deplibs_check_method in
8953 "file_magic "*)
8954 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8955 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
8956 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8957 $EGREP "$file_magic_regex" > /dev/null; then
8958 :
8959 else
8960 cat <<_LT_EOF 1>&2
8961  
8962 *** Warning: the command libtool uses to detect shared libraries,
8963 *** $file_magic_cmd, produces output that libtool cannot recognize.
8964 *** The result is that libtool may fail to recognize shared libraries
8965 *** as such. This will affect the creation of libtool libraries that
8966 *** depend on shared libraries, but programs linked with such libtool
8967 *** libraries will work regardless of this problem. Nevertheless, you
8968 *** may want to report the problem to your system manager and/or to
8969 *** bug-libtool@gnu.org
8970  
8971 _LT_EOF
8972 fi ;;
8973 esac
8974 fi
8975 break
8976 fi
8977 done
8978 IFS=$lt_save_ifs
8979 MAGIC_CMD=$lt_save_MAGIC_CMD
8980 ;;
8981 esac
8982 fi
8983  
8984 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
8985 if test -n "$MAGIC_CMD"; then
8986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8987 $as_echo "$MAGIC_CMD" >&6; }
8988 else
8989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8990 $as_echo "no" >&6; }
8991 fi
8992  
8993  
8994 else
8995 MAGIC_CMD=:
8996 fi
8997 fi
8998  
8999 fi
9000 ;;
9001 esac
9002  
9003 # Use C for the default configuration in the libtool script
9004  
9005 lt_save_CC=$CC
9006 ac_ext=c
9007 ac_cpp='$CPP $CPPFLAGS'
9008 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9009 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9010 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9011  
9012  
9013 # Source file extension for C test sources.
9014 ac_ext=c
9015  
9016 # Object file extension for compiled C test sources.
9017 objext=o
9018 objext=$objext
9019  
9020 # Code to be used in simple compile tests
9021 lt_simple_compile_test_code="int some_variable = 0;"
9022  
9023 # Code to be used in simple link tests
9024 lt_simple_link_test_code='int main(){return(0);}'
9025  
9026  
9027  
9028  
9029  
9030  
9031  
9032 # If no C compiler was specified, use CC.
9033 LTCC=${LTCC-"$CC"}
9034  
9035 # If no C compiler flags were specified, use CFLAGS.
9036 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9037  
9038 # Allow CC to be a program name with arguments.
9039 compiler=$CC
9040  
9041 # Save the default compiler, since it gets overwritten when the other
9042 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
9043 compiler_DEFAULT=$CC
9044  
9045 # save warnings/boilerplate of simple test code
9046 ac_outfile=conftest.$ac_objext
9047 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
9048 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9049 _lt_compiler_boilerplate=`cat conftest.err`
9050 $RM conftest*
9051  
9052 ac_outfile=conftest.$ac_objext
9053 echo "$lt_simple_link_test_code" >conftest.$ac_ext
9054 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9055 _lt_linker_boilerplate=`cat conftest.err`
9056 $RM -r conftest*
9057  
9058  
9059 if test -n "$compiler"; then
9060  
9061 lt_prog_compiler_no_builtin_flag=
9062  
9063 if test yes = "$GCC"; then
9064 case $cc_basename in
9065 nvcc*)
9066 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
9067 *)
9068 lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
9069 esac
9070  
9071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
9072 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
9073 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
9074 $as_echo_n "(cached) " >&6
9075 else
9076 lt_cv_prog_compiler_rtti_exceptions=no
9077 ac_outfile=conftest.$ac_objext
9078 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9079 lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
9080 # Insert the option either (1) after the last *FLAGS variable, or
9081 # (2) before a word containing "conftest.", or (3) at the end.
9082 # Note that $ac_compile itself does not contain backslashes and begins
9083 # with a dollar sign (not a hyphen), so the echo should work correctly.
9084 # The option is referenced via a variable to avoid confusing sed.
9085 lt_compile=`echo "$ac_compile" | $SED \
9086 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9087 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9088 -e 's:$: $lt_compiler_flag:'`
9089 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
9090 (eval "$lt_compile" 2>conftest.err)
9091 ac_status=$?
9092 cat conftest.err >&5
9093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9094 if (exit $ac_status) && test -s "$ac_outfile"; then
9095 # The compiler can only warn and ignore the option if not recognized
9096 # So say no if there are warnings other than the usual output.
9097 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
9098 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
9099 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
9100 lt_cv_prog_compiler_rtti_exceptions=yes
9101 fi
9102 fi
9103 $RM conftest*
9104  
9105 fi
9106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
9107 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
9108  
9109 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
9110 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
9111 else
9112 :
9113 fi
9114  
9115 fi
9116  
9117  
9118  
9119  
9120  
9121  
9122 lt_prog_compiler_wl=
9123 lt_prog_compiler_pic=
9124 lt_prog_compiler_static=
9125  
9126  
9127 if test yes = "$GCC"; then
9128 lt_prog_compiler_wl='-Wl,'
9129 lt_prog_compiler_static='-static'
9130  
9131 case $host_os in
9132 aix*)
9133 # All AIX code is PIC.
9134 if test ia64 = "$host_cpu"; then
9135 # AIX 5 now supports IA64 processor
9136 lt_prog_compiler_static='-Bstatic'
9137 fi
9138 lt_prog_compiler_pic='-fPIC'
9139 ;;
9140  
9141 amigaos*)
9142 case $host_cpu in
9143 powerpc)
9144 # see comment about AmigaOS4 .so support
9145 lt_prog_compiler_pic='-fPIC'
9146 ;;
9147 m68k)
9148 # FIXME: we need at least 68020 code to build shared libraries, but
9149 # adding the '-m68020' flag to GCC prevents building anything better,
9150 # like '-m68040'.
9151 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
9152 ;;
9153 esac
9154 ;;
9155  
9156 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
9157 # PIC is the default for these OSes.
9158 ;;
9159  
9160 mingw* | cygwin* | pw32* | os2* | cegcc*)
9161 # This hack is so that the source file can tell whether it is being
9162 # built for inclusion in a dll (and should export symbols for example).
9163 # Although the cygwin gcc ignores -fPIC, still need this for old-style
9164 # (--disable-auto-import) libraries
9165 lt_prog_compiler_pic='-DDLL_EXPORT'
9166 case $host_os in
9167 os2*)
9168 lt_prog_compiler_static='$wl-static'
9169 ;;
9170 esac
9171 ;;
9172  
9173 darwin* | rhapsody*)
9174 # PIC is the default on this platform
9175 # Common symbols not allowed in MH_DYLIB files
9176 lt_prog_compiler_pic='-fno-common'
9177 ;;
9178  
9179 haiku*)
9180 # PIC is the default for Haiku.
9181 # The "-static" flag exists, but is broken.
9182 lt_prog_compiler_static=
9183 ;;
9184  
9185 hpux*)
9186 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
9187 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
9188 # sets the default TLS model and affects inlining.
9189 case $host_cpu in
9190 hppa*64*)
9191 # +Z the default
9192 ;;
9193 *)
9194 lt_prog_compiler_pic='-fPIC'
9195 ;;
9196 esac
9197 ;;
9198  
9199 interix[3-9]*)
9200 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
9201 # Instead, we relocate shared libraries at runtime.
9202 ;;
9203  
9204 msdosdjgpp*)
9205 # Just because we use GCC doesn't mean we suddenly get shared libraries
9206 # on systems that don't support them.
9207 lt_prog_compiler_can_build_shared=no
9208 enable_shared=no
9209 ;;
9210  
9211 *nto* | *qnx*)
9212 # QNX uses GNU C++, but need to define -shared option too, otherwise
9213 # it will coredump.
9214 lt_prog_compiler_pic='-fPIC -shared'
9215 ;;
9216  
9217 sysv4*MP*)
9218 if test -d /usr/nec; then
9219 lt_prog_compiler_pic=-Kconform_pic
9220 fi
9221 ;;
9222  
9223 *)
9224 lt_prog_compiler_pic='-fPIC'
9225 ;;
9226 esac
9227  
9228 case $cc_basename in
9229 nvcc*) # Cuda Compiler Driver 2.2
9230 lt_prog_compiler_wl='-Xlinker '
9231 if test -n "$lt_prog_compiler_pic"; then
9232 lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
9233 fi
9234 ;;
9235 esac
9236 else
9237 # PORTME Check for flag to pass linker flags through the system compiler.
9238 case $host_os in
9239 aix*)
9240 lt_prog_compiler_wl='-Wl,'
9241 if test ia64 = "$host_cpu"; then
9242 # AIX 5 now supports IA64 processor
9243 lt_prog_compiler_static='-Bstatic'
9244 else
9245 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
9246 fi
9247 ;;
9248  
9249 darwin* | rhapsody*)
9250 # PIC is the default on this platform
9251 # Common symbols not allowed in MH_DYLIB files
9252 lt_prog_compiler_pic='-fno-common'
9253 case $cc_basename in
9254 nagfor*)
9255 # NAG Fortran compiler
9256 lt_prog_compiler_wl='-Wl,-Wl,,'
9257 lt_prog_compiler_pic='-PIC'
9258 lt_prog_compiler_static='-Bstatic'
9259 ;;
9260 esac
9261 ;;
9262  
9263 mingw* | cygwin* | pw32* | os2* | cegcc*)
9264 # This hack is so that the source file can tell whether it is being
9265 # built for inclusion in a dll (and should export symbols for example).
9266 lt_prog_compiler_pic='-DDLL_EXPORT'
9267 case $host_os in
9268 os2*)
9269 lt_prog_compiler_static='$wl-static'
9270 ;;
9271 esac
9272 ;;
9273  
9274 hpux9* | hpux10* | hpux11*)
9275 lt_prog_compiler_wl='-Wl,'
9276 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
9277 # not for PA HP-UX.
9278 case $host_cpu in
9279 hppa*64*|ia64*)
9280 # +Z the default
9281 ;;
9282 *)
9283 lt_prog_compiler_pic='+Z'
9284 ;;
9285 esac
9286 # Is there a better lt_prog_compiler_static that works with the bundled CC?
9287 lt_prog_compiler_static='$wl-a ${wl}archive'
9288 ;;
9289  
9290 irix5* | irix6* | nonstopux*)
9291 lt_prog_compiler_wl='-Wl,'
9292 # PIC (with -KPIC) is the default.
9293 lt_prog_compiler_static='-non_shared'
9294 ;;
9295  
9296 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
9297 case $cc_basename in
9298 # old Intel for x86_64, which still supported -KPIC.
9299 ecc*)
9300 lt_prog_compiler_wl='-Wl,'
9301 lt_prog_compiler_pic='-KPIC'
9302 lt_prog_compiler_static='-static'
9303 ;;
9304 # icc used to be incompatible with GCC.
9305 # ICC 10 doesn't accept -KPIC any more.
9306 icc* | ifort*)
9307 lt_prog_compiler_wl='-Wl,'
9308 lt_prog_compiler_pic='-fPIC'
9309 lt_prog_compiler_static='-static'
9310 ;;
9311 # Lahey Fortran 8.1.
9312 lf95*)
9313 lt_prog_compiler_wl='-Wl,'
9314 lt_prog_compiler_pic='--shared'
9315 lt_prog_compiler_static='--static'
9316 ;;
9317 nagfor*)
9318 # NAG Fortran compiler
9319 lt_prog_compiler_wl='-Wl,-Wl,,'
9320 lt_prog_compiler_pic='-PIC'
9321 lt_prog_compiler_static='-Bstatic'
9322 ;;
9323 tcc*)
9324 # Fabrice Bellard et al's Tiny C Compiler
9325 lt_prog_compiler_wl='-Wl,'
9326 lt_prog_compiler_pic='-fPIC'
9327 lt_prog_compiler_static='-static'
9328 ;;
9329 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
9330 # Portland Group compilers (*not* the Pentium gcc compiler,
9331 # which looks to be a dead project)
9332 lt_prog_compiler_wl='-Wl,'
9333 lt_prog_compiler_pic='-fpic'
9334 lt_prog_compiler_static='-Bstatic'
9335 ;;
9336 ccc*)
9337 lt_prog_compiler_wl='-Wl,'
9338 # All Alpha code is PIC.
9339 lt_prog_compiler_static='-non_shared'
9340 ;;
9341 xl* | bgxl* | bgf* | mpixl*)
9342 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
9343 lt_prog_compiler_wl='-Wl,'
9344 lt_prog_compiler_pic='-qpic'
9345 lt_prog_compiler_static='-qstaticlink'
9346 ;;
9347 *)
9348 case `$CC -V 2>&1 | sed 5q` in
9349 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
9350 # Sun Fortran 8.3 passes all unrecognized flags to the linker
9351 lt_prog_compiler_pic='-KPIC'
9352 lt_prog_compiler_static='-Bstatic'
9353 lt_prog_compiler_wl=''
9354 ;;
9355 *Sun\ F* | *Sun*Fortran*)
9356 lt_prog_compiler_pic='-KPIC'
9357 lt_prog_compiler_static='-Bstatic'
9358 lt_prog_compiler_wl='-Qoption ld '
9359 ;;
9360 *Sun\ C*)
9361 # Sun C 5.9
9362 lt_prog_compiler_pic='-KPIC'
9363 lt_prog_compiler_static='-Bstatic'
9364 lt_prog_compiler_wl='-Wl,'
9365 ;;
9366 *Intel*\ [CF]*Compiler*)
9367 lt_prog_compiler_wl='-Wl,'
9368 lt_prog_compiler_pic='-fPIC'
9369 lt_prog_compiler_static='-static'
9370 ;;
9371 *Portland\ Group*)
9372 lt_prog_compiler_wl='-Wl,'
9373 lt_prog_compiler_pic='-fpic'
9374 lt_prog_compiler_static='-Bstatic'
9375 ;;
9376 esac
9377 ;;
9378 esac
9379 ;;
9380  
9381 newsos6)
9382 lt_prog_compiler_pic='-KPIC'
9383 lt_prog_compiler_static='-Bstatic'
9384 ;;
9385  
9386 *nto* | *qnx*)
9387 # QNX uses GNU C++, but need to define -shared option too, otherwise
9388 # it will coredump.
9389 lt_prog_compiler_pic='-fPIC -shared'
9390 ;;
9391  
9392 osf3* | osf4* | osf5*)
9393 lt_prog_compiler_wl='-Wl,'
9394 # All OSF/1 code is PIC.
9395 lt_prog_compiler_static='-non_shared'
9396 ;;
9397  
9398 rdos*)
9399 lt_prog_compiler_static='-non_shared'
9400 ;;
9401  
9402 solaris*)
9403 lt_prog_compiler_pic='-KPIC'
9404 lt_prog_compiler_static='-Bstatic'
9405 case $cc_basename in
9406 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
9407 lt_prog_compiler_wl='-Qoption ld ';;
9408 *)
9409 lt_prog_compiler_wl='-Wl,';;
9410 esac
9411 ;;
9412  
9413 sunos4*)
9414 lt_prog_compiler_wl='-Qoption ld '
9415 lt_prog_compiler_pic='-PIC'
9416 lt_prog_compiler_static='-Bstatic'
9417 ;;
9418  
9419 sysv4 | sysv4.2uw2* | sysv4.3*)
9420 lt_prog_compiler_wl='-Wl,'
9421 lt_prog_compiler_pic='-KPIC'
9422 lt_prog_compiler_static='-Bstatic'
9423 ;;
9424  
9425 sysv4*MP*)
9426 if test -d /usr/nec; then
9427 lt_prog_compiler_pic='-Kconform_pic'
9428 lt_prog_compiler_static='-Bstatic'
9429 fi
9430 ;;
9431  
9432 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
9433 lt_prog_compiler_wl='-Wl,'
9434 lt_prog_compiler_pic='-KPIC'
9435 lt_prog_compiler_static='-Bstatic'
9436 ;;
9437  
9438 unicos*)
9439 lt_prog_compiler_wl='-Wl,'
9440 lt_prog_compiler_can_build_shared=no
9441 ;;
9442  
9443 uts4*)
9444 lt_prog_compiler_pic='-pic'
9445 lt_prog_compiler_static='-Bstatic'
9446 ;;
9447  
9448 *)
9449 lt_prog_compiler_can_build_shared=no
9450 ;;
9451 esac
9452 fi
9453  
9454 case $host_os in
9455 # For platforms that do not support PIC, -DPIC is meaningless:
9456 *djgpp*)
9457 lt_prog_compiler_pic=
9458 ;;
9459 *)
9460 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
9461 ;;
9462 esac
9463  
9464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
9465 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
9466 if ${lt_cv_prog_compiler_pic+:} false; then :
9467 $as_echo_n "(cached) " >&6
9468 else
9469 lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
9470 fi
9471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
9472 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
9473 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
9474  
9475 #
9476 # Check to make sure the PIC flag actually works.
9477 #
9478 if test -n "$lt_prog_compiler_pic"; then
9479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
9480 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
9481 if ${lt_cv_prog_compiler_pic_works+:} false; then :
9482 $as_echo_n "(cached) " >&6
9483 else
9484 lt_cv_prog_compiler_pic_works=no
9485 ac_outfile=conftest.$ac_objext
9486 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9487 lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
9488 # Insert the option either (1) after the last *FLAGS variable, or
9489 # (2) before a word containing "conftest.", or (3) at the end.
9490 # Note that $ac_compile itself does not contain backslashes and begins
9491 # with a dollar sign (not a hyphen), so the echo should work correctly.
9492 # The option is referenced via a variable to avoid confusing sed.
9493 lt_compile=`echo "$ac_compile" | $SED \
9494 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9495 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9496 -e 's:$: $lt_compiler_flag:'`
9497 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
9498 (eval "$lt_compile" 2>conftest.err)
9499 ac_status=$?
9500 cat conftest.err >&5
9501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9502 if (exit $ac_status) && test -s "$ac_outfile"; then
9503 # The compiler can only warn and ignore the option if not recognized
9504 # So say no if there are warnings other than the usual output.
9505 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
9506 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
9507 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
9508 lt_cv_prog_compiler_pic_works=yes
9509 fi
9510 fi
9511 $RM conftest*
9512  
9513 fi
9514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
9515 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
9516  
9517 if test yes = "$lt_cv_prog_compiler_pic_works"; then
9518 case $lt_prog_compiler_pic in
9519 "" | " "*) ;;
9520 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
9521 esac
9522 else
9523 lt_prog_compiler_pic=
9524 lt_prog_compiler_can_build_shared=no
9525 fi
9526  
9527 fi
9528  
9529  
9530  
9531  
9532  
9533  
9534  
9535  
9536  
9537  
9538  
9539 #
9540 # Check to make sure the static flag actually works.
9541 #
9542 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
9543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
9544 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
9545 if ${lt_cv_prog_compiler_static_works+:} false; then :
9546 $as_echo_n "(cached) " >&6
9547 else
9548 lt_cv_prog_compiler_static_works=no
9549 save_LDFLAGS=$LDFLAGS
9550 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
9551 echo "$lt_simple_link_test_code" > conftest.$ac_ext
9552 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
9553 # The linker can only warn and ignore the option if not recognized
9554 # So say no if there are warnings
9555 if test -s conftest.err; then
9556 # Append any errors to the config.log.
9557 cat conftest.err 1>&5
9558 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
9559 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
9560 if diff conftest.exp conftest.er2 >/dev/null; then
9561 lt_cv_prog_compiler_static_works=yes
9562 fi
9563 else
9564 lt_cv_prog_compiler_static_works=yes
9565 fi
9566 fi
9567 $RM -r conftest*
9568 LDFLAGS=$save_LDFLAGS
9569  
9570 fi
9571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
9572 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
9573  
9574 if test yes = "$lt_cv_prog_compiler_static_works"; then
9575 :
9576 else
9577 lt_prog_compiler_static=
9578 fi
9579  
9580  
9581  
9582  
9583  
9584  
9585  
9586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
9587 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
9588 if ${lt_cv_prog_compiler_c_o+:} false; then :
9589 $as_echo_n "(cached) " >&6
9590 else
9591 lt_cv_prog_compiler_c_o=no
9592 $RM -r conftest 2>/dev/null
9593 mkdir conftest
9594 cd conftest
9595 mkdir out
9596 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9597  
9598 lt_compiler_flag="-o out/conftest2.$ac_objext"
9599 # Insert the option either (1) after the last *FLAGS variable, or
9600 # (2) before a word containing "conftest.", or (3) at the end.
9601 # Note that $ac_compile itself does not contain backslashes and begins
9602 # with a dollar sign (not a hyphen), so the echo should work correctly.
9603 lt_compile=`echo "$ac_compile" | $SED \
9604 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9605 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9606 -e 's:$: $lt_compiler_flag:'`
9607 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
9608 (eval "$lt_compile" 2>out/conftest.err)
9609 ac_status=$?
9610 cat out/conftest.err >&5
9611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9612 if (exit $ac_status) && test -s out/conftest2.$ac_objext
9613 then
9614 # The compiler can only warn and ignore the option if not recognized
9615 # So say no if there are warnings
9616 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
9617 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
9618 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
9619 lt_cv_prog_compiler_c_o=yes
9620 fi
9621 fi
9622 chmod u+w . 2>&5
9623 $RM conftest*
9624 # SGI C++ compiler will create directory out/ii_files/ for
9625 # template instantiation
9626 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
9627 $RM out/* && rmdir out
9628 cd ..
9629 $RM -r conftest
9630 $RM conftest*
9631  
9632 fi
9633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
9634 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
9635  
9636  
9637  
9638  
9639  
9640  
9641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
9642 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
9643 if ${lt_cv_prog_compiler_c_o+:} false; then :
9644 $as_echo_n "(cached) " >&6
9645 else
9646 lt_cv_prog_compiler_c_o=no
9647 $RM -r conftest 2>/dev/null
9648 mkdir conftest
9649 cd conftest
9650 mkdir out
9651 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9652  
9653 lt_compiler_flag="-o out/conftest2.$ac_objext"
9654 # Insert the option either (1) after the last *FLAGS variable, or
9655 # (2) before a word containing "conftest.", or (3) at the end.
9656 # Note that $ac_compile itself does not contain backslashes and begins
9657 # with a dollar sign (not a hyphen), so the echo should work correctly.
9658 lt_compile=`echo "$ac_compile" | $SED \
9659 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9660 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9661 -e 's:$: $lt_compiler_flag:'`
9662 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
9663 (eval "$lt_compile" 2>out/conftest.err)
9664 ac_status=$?
9665 cat out/conftest.err >&5
9666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9667 if (exit $ac_status) && test -s out/conftest2.$ac_objext
9668 then
9669 # The compiler can only warn and ignore the option if not recognized
9670 # So say no if there are warnings
9671 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
9672 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
9673 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
9674 lt_cv_prog_compiler_c_o=yes
9675 fi
9676 fi
9677 chmod u+w . 2>&5
9678 $RM conftest*
9679 # SGI C++ compiler will create directory out/ii_files/ for
9680 # template instantiation
9681 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
9682 $RM out/* && rmdir out
9683 cd ..
9684 $RM -r conftest
9685 $RM conftest*
9686  
9687 fi
9688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
9689 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
9690  
9691  
9692  
9693  
9694 hard_links=nottested
9695 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
9696 # do not overwrite the value of need_locks provided by the user
9697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
9698 $as_echo_n "checking if we can lock with hard links... " >&6; }
9699 hard_links=yes
9700 $RM conftest*
9701 ln conftest.a conftest.b 2>/dev/null && hard_links=no
9702 touch conftest.a
9703 ln conftest.a conftest.b 2>&5 || hard_links=no
9704 ln conftest.a conftest.b 2>/dev/null && hard_links=no
9705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
9706 $as_echo "$hard_links" >&6; }
9707 if test no = "$hard_links"; then
9708 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
9709 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
9710 need_locks=warn
9711 fi
9712 else
9713 need_locks=no
9714 fi
9715  
9716  
9717  
9718  
9719  
9720  
9721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
9722 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
9723  
9724 runpath_var=
9725 allow_undefined_flag=
9726 always_export_symbols=no
9727 archive_cmds=
9728 archive_expsym_cmds=
9729 compiler_needs_object=no
9730 enable_shared_with_static_runtimes=no
9731 export_dynamic_flag_spec=
9732 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
9733 hardcode_automatic=no
9734 hardcode_direct=no
9735 hardcode_direct_absolute=no
9736 hardcode_libdir_flag_spec=
9737 hardcode_libdir_separator=
9738 hardcode_minus_L=no
9739 hardcode_shlibpath_var=unsupported
9740 inherit_rpath=no
9741 link_all_deplibs=unknown
9742 module_cmds=
9743 module_expsym_cmds=
9744 old_archive_from_new_cmds=
9745 old_archive_from_expsyms_cmds=
9746 thread_safe_flag_spec=
9747 whole_archive_flag_spec=
9748 # include_expsyms should be a list of space-separated symbols to be *always*
9749 # included in the symbol list
9750 include_expsyms=
9751 # exclude_expsyms can be an extended regexp of symbols to exclude
9752 # it will be wrapped by ' (' and ')$', so one must not match beginning or
9753 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
9754 # as well as any symbol that contains 'd'.
9755 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
9756 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
9757 # platforms (ab)use it in PIC code, but their linkers get confused if
9758 # the symbol is explicitly referenced. Since portable code cannot
9759 # rely on this symbol name, it's probably fine to never include it in
9760 # preloaded symbol tables.
9761 # Exclude shared library initialization/finalization symbols.
9762 extract_expsyms_cmds=
9763  
9764 case $host_os in
9765 cygwin* | mingw* | pw32* | cegcc*)
9766 # FIXME: the MSVC++ port hasn't been tested in a loooong time
9767 # When not using gcc, we currently assume that we are using
9768 # Microsoft Visual C++.
9769 if test yes != "$GCC"; then
9770 with_gnu_ld=no
9771 fi
9772 ;;
9773 interix*)
9774 # we just hope/assume this is gcc and not c89 (= MSVC++)
9775 with_gnu_ld=yes
9776 ;;
9777 openbsd* | bitrig*)
9778 with_gnu_ld=no
9779 ;;
9780 linux* | k*bsd*-gnu | gnu*)
9781 link_all_deplibs=no
9782 ;;
9783 esac
9784  
9785 ld_shlibs=yes
9786  
9787 # On some targets, GNU ld is compatible enough with the native linker
9788 # that we're better off using the native interface for both.
9789 lt_use_gnu_ld_interface=no
9790 if test yes = "$with_gnu_ld"; then
9791 case $host_os in
9792 aix*)
9793 # The AIX port of GNU ld has always aspired to compatibility
9794 # with the native linker. However, as the warning in the GNU ld
9795 # block says, versions before 2.19.5* couldn't really create working
9796 # shared libraries, regardless of the interface used.
9797 case `$LD -v 2>&1` in
9798 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
9799 *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
9800 *\ \(GNU\ Binutils\)\ [3-9]*) ;;
9801 *)
9802 lt_use_gnu_ld_interface=yes
9803 ;;
9804 esac
9805 ;;
9806 *)
9807 lt_use_gnu_ld_interface=yes
9808 ;;
9809 esac
9810 fi
9811  
9812 if test yes = "$lt_use_gnu_ld_interface"; then
9813 # If archive_cmds runs LD, not CC, wlarc should be empty
9814 wlarc='$wl'
9815  
9816 # Set some defaults for GNU ld with shared library support. These
9817 # are reset later if shared libraries are not supported. Putting them
9818 # here allows them to be overridden if necessary.
9819 runpath_var=LD_RUN_PATH
9820 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
9821 export_dynamic_flag_spec='$wl--export-dynamic'
9822 # ancient GNU ld didn't support --whole-archive et. al.
9823 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
9824 whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
9825 else
9826 whole_archive_flag_spec=
9827 fi
9828 supports_anon_versioning=no
9829 case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
9830 *GNU\ gold*) supports_anon_versioning=yes ;;
9831 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
9832 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
9833 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
9834 *\ 2.11.*) ;; # other 2.11 versions
9835 *) supports_anon_versioning=yes ;;
9836 esac
9837  
9838 # See if GNU ld supports shared libraries.
9839 case $host_os in
9840 aix[3-9]*)
9841 # On AIX/PPC, the GNU linker is very broken
9842 if test ia64 != "$host_cpu"; then
9843 ld_shlibs=no
9844 cat <<_LT_EOF 1>&2
9845  
9846 *** Warning: the GNU linker, at least up to release 2.19, is reported
9847 *** to be unable to reliably create shared libraries on AIX.
9848 *** Therefore, libtool is disabling shared libraries support. If you
9849 *** really care for shared libraries, you may want to install binutils
9850 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
9851 *** You will then need to restart the configuration process.
9852  
9853 _LT_EOF
9854 fi
9855 ;;
9856  
9857 amigaos*)
9858 case $host_cpu in
9859 powerpc)
9860 # see comment about AmigaOS4 .so support
9861 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9862 archive_expsym_cmds=''
9863 ;;
9864 m68k)
9865 archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
9866 hardcode_libdir_flag_spec='-L$libdir'
9867 hardcode_minus_L=yes
9868 ;;
9869 esac
9870 ;;
9871  
9872 beos*)
9873 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9874 allow_undefined_flag=unsupported
9875 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9876 # support --undefined. This deserves some investigation. FIXME
9877 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9878 else
9879 ld_shlibs=no
9880 fi
9881 ;;
9882  
9883 cygwin* | mingw* | pw32* | cegcc*)
9884 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
9885 # as there is no search path for DLLs.
9886 hardcode_libdir_flag_spec='-L$libdir'
9887 export_dynamic_flag_spec='$wl--export-all-symbols'
9888 allow_undefined_flag=unsupported
9889 always_export_symbols=no
9890 enable_shared_with_static_runtimes=yes
9891 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
9892 exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
9893  
9894 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
9895 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
9896 # If the export-symbols file already is a .def file, use it as
9897 # is; otherwise, prepend EXPORTS...
9898 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
9899 cp $export_symbols $output_objdir/$soname.def;
9900 else
9901 echo EXPORTS > $output_objdir/$soname.def;
9902 cat $export_symbols >> $output_objdir/$soname.def;
9903 fi~
9904 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
9905 else
9906 ld_shlibs=no
9907 fi
9908 ;;
9909  
9910 haiku*)
9911 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9912 link_all_deplibs=yes
9913 ;;
9914  
9915 os2*)
9916 hardcode_libdir_flag_spec='-L$libdir'
9917 hardcode_minus_L=yes
9918 allow_undefined_flag=unsupported
9919 shrext_cmds=.dll
9920 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
9921 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
9922 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
9923 $ECHO EXPORTS >> $output_objdir/$libname.def~
9924 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
9925 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
9926 emximp -o $lib $output_objdir/$libname.def'
9927 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
9928 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
9929 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
9930 $ECHO EXPORTS >> $output_objdir/$libname.def~
9931 prefix_cmds="$SED"~
9932 if test EXPORTS = "`$SED 1q $export_symbols`"; then
9933 prefix_cmds="$prefix_cmds -e 1d";
9934 fi~
9935 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
9936 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
9937 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
9938 emximp -o $lib $output_objdir/$libname.def'
9939 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
9940 enable_shared_with_static_runtimes=yes
9941 ;;
9942  
9943 interix[3-9]*)
9944 hardcode_direct=no
9945 hardcode_shlibpath_var=no
9946 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
9947 export_dynamic_flag_spec='$wl-E'
9948 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
9949 # Instead, shared libraries are loaded at an image base (0x10000000 by
9950 # default) and relocated if they conflict, which is a slow very memory
9951 # consuming and fragmenting process. To avoid this, we pick a random,
9952 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
9953 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
9954 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9955 archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
9956 ;;
9957  
9958 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
9959 tmp_diet=no
9960 if test linux-dietlibc = "$host_os"; then
9961 case $cc_basename in
9962 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
9963 esac
9964 fi
9965 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
9966 && test no = "$tmp_diet"
9967 then
9968 tmp_addflag=' $pic_flag'
9969 tmp_sharedflag='-shared'
9970 case $cc_basename,$host_cpu in
9971 pgcc*) # Portland Group C compiler
9972 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
9973 tmp_addflag=' $pic_flag'
9974 ;;
9975 pgf77* | pgf90* | pgf95* | pgfortran*)
9976 # Portland Group f77 and f90 compilers
9977 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
9978 tmp_addflag=' $pic_flag -Mnomain' ;;
9979 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
9980 tmp_addflag=' -i_dynamic' ;;
9981 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
9982 tmp_addflag=' -i_dynamic -nofor_main' ;;
9983 ifc* | ifort*) # Intel Fortran compiler
9984 tmp_addflag=' -nofor_main' ;;
9985 lf95*) # Lahey Fortran 8.1
9986 whole_archive_flag_spec=
9987 tmp_sharedflag='--shared' ;;
9988 nagfor*) # NAGFOR 5.3
9989 tmp_sharedflag='-Wl,-shared' ;;
9990 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
9991 tmp_sharedflag='-qmkshrobj'
9992 tmp_addflag= ;;
9993 nvcc*) # Cuda Compiler Driver 2.2
9994 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
9995 compiler_needs_object=yes
9996 ;;
9997 esac
9998 case `$CC -V 2>&1 | sed 5q` in
9999 *Sun\ C*) # Sun C 5.9
10000 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
10001 compiler_needs_object=yes
10002 tmp_sharedflag='-G' ;;
10003 *Sun\ F*) # Sun Fortran 8.3
10004 tmp_sharedflag='-G' ;;
10005 esac
10006 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10007  
10008 if test yes = "$supports_anon_versioning"; then
10009 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
10010 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
10011 echo "local: *; };" >> $output_objdir/$libname.ver~
10012 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
10013 fi
10014  
10015 case $cc_basename in
10016 tcc*)
10017 export_dynamic_flag_spec='-rdynamic'
10018 ;;
10019 xlf* | bgf* | bgxlf* | mpixlf*)
10020 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
10021 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
10022 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
10023 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
10024 if test yes = "$supports_anon_versioning"; then
10025 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
10026 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
10027 echo "local: *; };" >> $output_objdir/$libname.ver~
10028 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
10029 fi
10030 ;;
10031 esac
10032 else
10033 ld_shlibs=no
10034 fi
10035 ;;
10036  
10037 netbsd* | netbsdelf*-gnu)
10038 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
10039 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
10040 wlarc=
10041 else
10042 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10043 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
10044 fi
10045 ;;
10046  
10047 solaris*)
10048 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
10049 ld_shlibs=no
10050 cat <<_LT_EOF 1>&2
10051  
10052 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
10053 *** create shared libraries on Solaris systems. Therefore, libtool
10054 *** is disabling shared libraries support. We urge you to upgrade GNU
10055 *** binutils to release 2.9.1 or newer. Another option is to modify
10056 *** your PATH or compiler configuration so that the native linker is
10057 *** used, and then restart.
10058  
10059 _LT_EOF
10060 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
10061 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10062 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
10063 else
10064 ld_shlibs=no
10065 fi
10066 ;;
10067  
10068 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
10069 case `$LD -v 2>&1` in
10070 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
10071 ld_shlibs=no
10072 cat <<_LT_EOF 1>&2
10073  
10074 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
10075 *** reliably create shared libraries on SCO systems. Therefore, libtool
10076 *** is disabling shared libraries support. We urge you to upgrade GNU
10077 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
10078 *** your PATH or compiler configuration so that the native linker is
10079 *** used, and then restart.
10080  
10081 _LT_EOF
10082 ;;
10083 *)
10084 # For security reasons, it is highly recommended that you always
10085 # use absolute paths for naming shared libraries, and exclude the
10086 # DT_RUNPATH tag from executables and libraries. But doing so
10087 # requires that you compile everything twice, which is a pain.
10088 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
10089 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
10090 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10091 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
10092 else
10093 ld_shlibs=no
10094 fi
10095 ;;
10096 esac
10097 ;;
10098  
10099 sunos4*)
10100 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10101 wlarc=
10102 hardcode_direct=yes
10103 hardcode_shlibpath_var=no
10104 ;;
10105  
10106 *)
10107 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
10108 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10109 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
10110 else
10111 ld_shlibs=no
10112 fi
10113 ;;
10114 esac
10115  
10116 if test no = "$ld_shlibs"; then
10117 runpath_var=
10118 hardcode_libdir_flag_spec=
10119 export_dynamic_flag_spec=
10120 whole_archive_flag_spec=
10121 fi
10122 else
10123 # PORTME fill in a description of your system's linker (not GNU ld)
10124 case $host_os in
10125 aix3*)
10126 allow_undefined_flag=unsupported
10127 always_export_symbols=yes
10128 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
10129 # Note: this linker hardcodes the directories in LIBPATH if there
10130 # are no directories specified by -L.
10131 hardcode_minus_L=yes
10132 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
10133 # Neither direct hardcoding nor static linking is supported with a
10134 # broken collect2.
10135 hardcode_direct=unsupported
10136 fi
10137 ;;
10138  
10139 aix[4-9]*)
10140 if test ia64 = "$host_cpu"; then
10141 # On IA64, the linker does run time linking by default, so we don't
10142 # have to do anything special.
10143 aix_use_runtimelinking=no
10144 exp_sym_flag='-Bexport'
10145 no_entry_flag=
10146 else
10147 # If we're using GNU nm, then we don't want the "-C" option.
10148 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
10149 # Without the "-l" option, or with the "-B" option, AIX nm treats
10150 # weak defined symbols like other global defined symbols, whereas
10151 # GNU nm marks them as "W".
10152 # While the 'weak' keyword is ignored in the Export File, we need
10153 # it in the Import File for the 'aix-soname' feature, so we have
10154 # to replace the "-B" option with "-P" for AIX nm.
10155 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
10156 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
10157 else
10158 export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
10159 fi
10160 aix_use_runtimelinking=no
10161  
10162 # Test if we are trying to use run time linking or normal
10163 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
10164 # have runtime linking enabled, and use it for executables.
10165 # For shared libraries, we enable/disable runtime linking
10166 # depending on the kind of the shared library created -
10167 # when "with_aix_soname,aix_use_runtimelinking" is:
10168 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
10169 # "aix,yes" lib.so shared, rtl:yes, for executables
10170 # lib.a static archive
10171 # "both,no" lib.so.V(shr.o) shared, rtl:yes
10172 # lib.a(lib.so.V) shared, rtl:no, for executables
10173 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
10174 # lib.a(lib.so.V) shared, rtl:no
10175 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
10176 # lib.a static archive
10177 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
10178 for ld_flag in $LDFLAGS; do
10179 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
10180 aix_use_runtimelinking=yes
10181 break
10182 fi
10183 done
10184 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
10185 # With aix-soname=svr4, we create the lib.so.V shared archives only,
10186 # so we don't have lib.a shared libs to link our executables.
10187 # We have to force runtime linking in this case.
10188 aix_use_runtimelinking=yes
10189 LDFLAGS="$LDFLAGS -Wl,-brtl"
10190 fi
10191 ;;
10192 esac
10193  
10194 exp_sym_flag='-bexport'
10195 no_entry_flag='-bnoentry'
10196 fi
10197  
10198 # When large executables or shared objects are built, AIX ld can
10199 # have problems creating the table of contents. If linking a library
10200 # or program results in "error TOC overflow" add -mminimal-toc to
10201 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
10202 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10203  
10204 archive_cmds=''
10205 hardcode_direct=yes
10206 hardcode_direct_absolute=yes
10207 hardcode_libdir_separator=':'
10208 link_all_deplibs=yes
10209 file_list_spec='$wl-f,'
10210 case $with_aix_soname,$aix_use_runtimelinking in
10211 aix,*) ;; # traditional, no import file
10212 svr4,* | *,yes) # use import file
10213 # The Import File defines what to hardcode.
10214 hardcode_direct=no
10215 hardcode_direct_absolute=no
10216 ;;
10217 esac
10218  
10219 if test yes = "$GCC"; then
10220 case $host_os in aix4.[012]|aix4.[012].*)
10221 # We only want to do this on AIX 4.2 and lower, the check
10222 # below for broken collect2 doesn't work under 4.3+
10223 collect2name=`$CC -print-prog-name=collect2`
10224 if test -f "$collect2name" &&
10225 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
10226 then
10227 # We have reworked collect2
10228 :
10229 else
10230 # We have old collect2
10231 hardcode_direct=unsupported
10232 # It fails to find uninstalled libraries when the uninstalled
10233 # path is not listed in the libpath. Setting hardcode_minus_L
10234 # to unsupported forces relinking
10235 hardcode_minus_L=yes
10236 hardcode_libdir_flag_spec='-L$libdir'
10237 hardcode_libdir_separator=
10238 fi
10239 ;;
10240 esac
10241 shared_flag='-shared'
10242 if test yes = "$aix_use_runtimelinking"; then
10243 shared_flag="$shared_flag "'$wl-G'
10244 fi
10245 # Need to ensure runtime linking is disabled for the traditional
10246 # shared library, or the linker may eventually find shared libraries
10247 # /with/ Import File - we do not want to mix them.
10248 shared_flag_aix='-shared'
10249 shared_flag_svr4='-shared $wl-G'
10250 else
10251 # not using gcc
10252 if test ia64 = "$host_cpu"; then
10253 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10254 # chokes on -Wl,-G. The following line is correct:
10255 shared_flag='-G'
10256 else
10257 if test yes = "$aix_use_runtimelinking"; then
10258 shared_flag='$wl-G'
10259 else
10260 shared_flag='$wl-bM:SRE'
10261 fi
10262 shared_flag_aix='$wl-bM:SRE'
10263 shared_flag_svr4='$wl-G'
10264 fi
10265 fi
10266  
10267 export_dynamic_flag_spec='$wl-bexpall'
10268 # It seems that -bexpall does not export symbols beginning with
10269 # underscore (_), so it is better to generate a list of symbols to export.
10270 always_export_symbols=yes
10271 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
10272 # Warning - without using the other runtime loading flags (-brtl),
10273 # -berok will link without error, but may produce a broken library.
10274 allow_undefined_flag='-berok'
10275 # Determine the default libpath from the value encoded in an
10276 # empty executable.
10277 if test set = "${lt_cv_aix_libpath+set}"; then
10278 aix_libpath=$lt_cv_aix_libpath
10279 else
10280 if ${lt_cv_aix_libpath_+:} false; then :
10281 $as_echo_n "(cached) " >&6
10282 else
10283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10284 /* end confdefs.h. */
10285  
10286 int
10287 main ()
10288 {
10289  
10290 ;
10291 return 0;
10292 }
10293 _ACEOF
10294 if ac_fn_c_try_link "$LINENO"; then :
10295  
10296 lt_aix_libpath_sed='
10297 /Import File Strings/,/^$/ {
10298 /^0/ {
10299 s/^0 *\([^ ]*\) *$/\1/
10300 p
10301 }
10302 }'
10303 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10304 # Check for a 64-bit object if we didn't find anything.
10305 if test -z "$lt_cv_aix_libpath_"; then
10306 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10307 fi
10308 fi
10309 rm -f core conftest.err conftest.$ac_objext \
10310 conftest$ac_exeext conftest.$ac_ext
10311 if test -z "$lt_cv_aix_libpath_"; then
10312 lt_cv_aix_libpath_=/usr/lib:/lib
10313 fi
10314  
10315 fi
10316  
10317 aix_libpath=$lt_cv_aix_libpath_
10318 fi
10319  
10320 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
10321 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
10322 else
10323 if test ia64 = "$host_cpu"; then
10324 hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
10325 allow_undefined_flag="-z nodefs"
10326 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
10327 else
10328 # Determine the default libpath from the value encoded in an
10329 # empty executable.
10330 if test set = "${lt_cv_aix_libpath+set}"; then
10331 aix_libpath=$lt_cv_aix_libpath
10332 else
10333 if ${lt_cv_aix_libpath_+:} false; then :
10334 $as_echo_n "(cached) " >&6
10335 else
10336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10337 /* end confdefs.h. */
10338  
10339 int
10340 main ()
10341 {
10342  
10343 ;
10344 return 0;
10345 }
10346 _ACEOF
10347 if ac_fn_c_try_link "$LINENO"; then :
10348  
10349 lt_aix_libpath_sed='
10350 /Import File Strings/,/^$/ {
10351 /^0/ {
10352 s/^0 *\([^ ]*\) *$/\1/
10353 p
10354 }
10355 }'
10356 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10357 # Check for a 64-bit object if we didn't find anything.
10358 if test -z "$lt_cv_aix_libpath_"; then
10359 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
10360 fi
10361 fi
10362 rm -f core conftest.err conftest.$ac_objext \
10363 conftest$ac_exeext conftest.$ac_ext
10364 if test -z "$lt_cv_aix_libpath_"; then
10365 lt_cv_aix_libpath_=/usr/lib:/lib
10366 fi
10367  
10368 fi
10369  
10370 aix_libpath=$lt_cv_aix_libpath_
10371 fi
10372  
10373 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
10374 # Warning - without using the other run time loading flags,
10375 # -berok will link without error, but may produce a broken library.
10376 no_undefined_flag=' $wl-bernotok'
10377 allow_undefined_flag=' $wl-berok'
10378 if test yes = "$with_gnu_ld"; then
10379 # We only use this code for GNU lds that support --whole-archive.
10380 whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
10381 else
10382 # Exported symbols can be pulled into shared objects from archives
10383 whole_archive_flag_spec='$convenience'
10384 fi
10385 archive_cmds_need_lc=yes
10386 archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
10387 # -brtl affects multiple linker settings, -berok does not and is overridden later
10388 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
10389 if test svr4 != "$with_aix_soname"; then
10390 # This is similar to how AIX traditionally builds its shared libraries.
10391 archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
10392 fi
10393 if test aix != "$with_aix_soname"; then
10394 archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
10395 else
10396 # used by -dlpreopen to get the symbols
10397 archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
10398 fi
10399 archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
10400 fi
10401 fi
10402 ;;
10403  
10404 amigaos*)
10405 case $host_cpu in
10406 powerpc)
10407 # see comment about AmigaOS4 .so support
10408 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10409 archive_expsym_cmds=''
10410 ;;
10411 m68k)
10412 archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
10413 hardcode_libdir_flag_spec='-L$libdir'
10414 hardcode_minus_L=yes
10415 ;;
10416 esac
10417 ;;
10418  
10419 bsdi[45]*)
10420 export_dynamic_flag_spec=-rdynamic
10421 ;;
10422  
10423 cygwin* | mingw* | pw32* | cegcc*)
10424 # When not using gcc, we currently assume that we are using
10425 # Microsoft Visual C++.
10426 # hardcode_libdir_flag_spec is actually meaningless, as there is
10427 # no search path for DLLs.
10428 case $cc_basename in
10429 cl*)
10430 # Native MSVC
10431 hardcode_libdir_flag_spec=' '
10432 allow_undefined_flag=unsupported
10433 always_export_symbols=yes
10434 file_list_spec='@'
10435 # Tell ltmain to make .lib files, not .a files.
10436 libext=lib
10437 # Tell ltmain to make .dll files, not .so files.
10438 shrext_cmds=.dll
10439 # FIXME: Setting linknames here is a bad hack.
10440 archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
10441 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
10442 cp "$export_symbols" "$output_objdir/$soname.def";
10443 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
10444 else
10445 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
10446 fi~
10447 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
10448 linknames='
10449 # The linker will not automatically build a static lib if we build a DLL.
10450 # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
10451 enable_shared_with_static_runtimes=yes
10452 exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
10453 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
10454 # Don't use ranlib
10455 old_postinstall_cmds='chmod 644 $oldlib'
10456 postlink_cmds='lt_outputfile="@OUTPUT@"~
10457 lt_tool_outputfile="@TOOL_OUTPUT@"~
10458 case $lt_outputfile in
10459 *.exe|*.EXE) ;;
10460 *)
10461 lt_outputfile=$lt_outputfile.exe
10462 lt_tool_outputfile=$lt_tool_outputfile.exe
10463 ;;
10464 esac~
10465 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
10466 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
10467 $RM "$lt_outputfile.manifest";
10468 fi'
10469 ;;
10470 *)
10471 # Assume MSVC wrapper
10472 hardcode_libdir_flag_spec=' '
10473 allow_undefined_flag=unsupported
10474 # Tell ltmain to make .lib files, not .a files.
10475 libext=lib
10476 # Tell ltmain to make .dll files, not .so files.
10477 shrext_cmds=.dll
10478 # FIXME: Setting linknames here is a bad hack.
10479 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
10480 # The linker will automatically build a .lib file if we build a DLL.
10481 old_archive_from_new_cmds='true'
10482 # FIXME: Should let the user specify the lib program.
10483 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
10484 enable_shared_with_static_runtimes=yes
10485 ;;
10486 esac
10487 ;;
10488  
10489 darwin* | rhapsody*)
10490  
10491  
10492 archive_cmds_need_lc=no
10493 hardcode_direct=no
10494 hardcode_automatic=yes
10495 hardcode_shlibpath_var=unsupported
10496 if test yes = "$lt_cv_ld_force_load"; then
10497 whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
10498  
10499 else
10500 whole_archive_flag_spec=''
10501 fi
10502 link_all_deplibs=yes
10503 allow_undefined_flag=$_lt_dar_allow_undefined
10504 case $cc_basename in
10505 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
10506 *) _lt_dar_can_shared=$GCC ;;
10507 esac
10508 if test yes = "$_lt_dar_can_shared"; then
10509 output_verbose_link_cmd=func_echo_all
10510 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
10511 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
10512 archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
10513 module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
10514  
10515 else
10516 ld_shlibs=no
10517 fi
10518  
10519 ;;
10520  
10521 dgux*)
10522 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10523 hardcode_libdir_flag_spec='-L$libdir'
10524 hardcode_shlibpath_var=no
10525 ;;
10526  
10527 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
10528 # support. Future versions do this automatically, but an explicit c++rt0.o
10529 # does not break anything, and helps significantly (at the cost of a little
10530 # extra space).
10531 freebsd2.2*)
10532 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
10533 hardcode_libdir_flag_spec='-R$libdir'
10534 hardcode_direct=yes
10535 hardcode_shlibpath_var=no
10536 ;;
10537  
10538 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
10539 freebsd2.*)
10540 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
10541 hardcode_direct=yes
10542 hardcode_minus_L=yes
10543 hardcode_shlibpath_var=no
10544 ;;
10545  
10546 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
10547 freebsd* | dragonfly*)
10548 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10549 hardcode_libdir_flag_spec='-R$libdir'
10550 hardcode_direct=yes
10551 hardcode_shlibpath_var=no
10552 ;;
10553  
10554 hpux9*)
10555 if test yes = "$GCC"; then
10556 archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
10557 else
10558 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
10559 fi
10560 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
10561 hardcode_libdir_separator=:
10562 hardcode_direct=yes
10563  
10564 # hardcode_minus_L: Not really in the search PATH,
10565 # but as the default location of the library.
10566 hardcode_minus_L=yes
10567 export_dynamic_flag_spec='$wl-E'
10568 ;;
10569  
10570 hpux10*)
10571 if test yes,no = "$GCC,$with_gnu_ld"; then
10572 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10573 else
10574 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
10575 fi
10576 if test no = "$with_gnu_ld"; then
10577 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
10578 hardcode_libdir_separator=:
10579 hardcode_direct=yes
10580 hardcode_direct_absolute=yes
10581 export_dynamic_flag_spec='$wl-E'
10582 # hardcode_minus_L: Not really in the search PATH,
10583 # but as the default location of the library.
10584 hardcode_minus_L=yes
10585 fi
10586 ;;
10587  
10588 hpux11*)
10589 if test yes,no = "$GCC,$with_gnu_ld"; then
10590 case $host_cpu in
10591 hppa*64*)
10592 archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
10593 ;;
10594 ia64*)
10595 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
10596 ;;
10597 *)
10598 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10599 ;;
10600 esac
10601 else
10602 case $host_cpu in
10603 hppa*64*)
10604 archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
10605 ;;
10606 ia64*)
10607 archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
10608 ;;
10609 *)
10610  
10611 # Older versions of the 11.00 compiler do not understand -b yet
10612 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
10613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
10614 $as_echo_n "checking if $CC understands -b... " >&6; }
10615 if ${lt_cv_prog_compiler__b+:} false; then :
10616 $as_echo_n "(cached) " >&6
10617 else
10618 lt_cv_prog_compiler__b=no
10619 save_LDFLAGS=$LDFLAGS
10620 LDFLAGS="$LDFLAGS -b"
10621 echo "$lt_simple_link_test_code" > conftest.$ac_ext
10622 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
10623 # The linker can only warn and ignore the option if not recognized
10624 # So say no if there are warnings
10625 if test -s conftest.err; then
10626 # Append any errors to the config.log.
10627 cat conftest.err 1>&5
10628 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
10629 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10630 if diff conftest.exp conftest.er2 >/dev/null; then
10631 lt_cv_prog_compiler__b=yes
10632 fi
10633 else
10634 lt_cv_prog_compiler__b=yes
10635 fi
10636 fi
10637 $RM -r conftest*
10638 LDFLAGS=$save_LDFLAGS
10639  
10640 fi
10641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
10642 $as_echo "$lt_cv_prog_compiler__b" >&6; }
10643  
10644 if test yes = "$lt_cv_prog_compiler__b"; then
10645 archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
10646 else
10647 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
10648 fi
10649  
10650 ;;
10651 esac
10652 fi
10653 if test no = "$with_gnu_ld"; then
10654 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
10655 hardcode_libdir_separator=:
10656  
10657 case $host_cpu in
10658 hppa*64*|ia64*)
10659 hardcode_direct=no
10660 hardcode_shlibpath_var=no
10661 ;;
10662 *)
10663 hardcode_direct=yes
10664 hardcode_direct_absolute=yes
10665 export_dynamic_flag_spec='$wl-E'
10666  
10667 # hardcode_minus_L: Not really in the search PATH,
10668 # but as the default location of the library.
10669 hardcode_minus_L=yes
10670 ;;
10671 esac
10672 fi
10673 ;;
10674  
10675 irix5* | irix6* | nonstopux*)
10676 if test yes = "$GCC"; then
10677 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
10678 # Try to use the -exported_symbol ld option, if it does not
10679 # work, assume that -exports_file does not work either and
10680 # implicitly export all symbols.
10681 # This should be the same for all languages, so no per-tag cache variable.
10682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
10683 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
10684 if ${lt_cv_irix_exported_symbol+:} false; then :
10685 $as_echo_n "(cached) " >&6
10686 else
10687 save_LDFLAGS=$LDFLAGS
10688 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
10689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10690 /* end confdefs.h. */
10691 int foo (void) { return 0; }
10692 _ACEOF
10693 if ac_fn_c_try_link "$LINENO"; then :
10694 lt_cv_irix_exported_symbol=yes
10695 else
10696 lt_cv_irix_exported_symbol=no
10697 fi
10698 rm -f core conftest.err conftest.$ac_objext \
10699 conftest$ac_exeext conftest.$ac_ext
10700 LDFLAGS=$save_LDFLAGS
10701 fi
10702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
10703 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
10704 if test yes = "$lt_cv_irix_exported_symbol"; then
10705 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
10706 fi
10707 link_all_deplibs=no
10708 else
10709 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
10710 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
10711 fi
10712 archive_cmds_need_lc='no'
10713 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
10714 hardcode_libdir_separator=:
10715 inherit_rpath=yes
10716 link_all_deplibs=yes
10717 ;;
10718  
10719 linux*)
10720 case $cc_basename in
10721 tcc*)
10722 # Fabrice Bellard et al's Tiny C Compiler
10723 ld_shlibs=yes
10724 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10725 ;;
10726 esac
10727 ;;
10728  
10729 netbsd* | netbsdelf*-gnu)
10730 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
10731 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
10732 else
10733 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
10734 fi
10735 hardcode_libdir_flag_spec='-R$libdir'
10736 hardcode_direct=yes
10737 hardcode_shlibpath_var=no
10738 ;;
10739  
10740 newsos6)
10741 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10742 hardcode_direct=yes
10743 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
10744 hardcode_libdir_separator=:
10745 hardcode_shlibpath_var=no
10746 ;;
10747  
10748 *nto* | *qnx*)
10749 ;;
10750  
10751 openbsd* | bitrig*)
10752 if test -f /usr/libexec/ld.so; then
10753 hardcode_direct=yes
10754 hardcode_shlibpath_var=no
10755 hardcode_direct_absolute=yes
10756 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
10757 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10758 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
10759 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
10760 export_dynamic_flag_spec='$wl-E'
10761 else
10762 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
10763 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
10764 fi
10765 else
10766 ld_shlibs=no
10767 fi
10768 ;;
10769  
10770 os2*)
10771 hardcode_libdir_flag_spec='-L$libdir'
10772 hardcode_minus_L=yes
10773 allow_undefined_flag=unsupported
10774 shrext_cmds=.dll
10775 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
10776 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
10777 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
10778 $ECHO EXPORTS >> $output_objdir/$libname.def~
10779 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
10780 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
10781 emximp -o $lib $output_objdir/$libname.def'
10782 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
10783 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
10784 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
10785 $ECHO EXPORTS >> $output_objdir/$libname.def~
10786 prefix_cmds="$SED"~
10787 if test EXPORTS = "`$SED 1q $export_symbols`"; then
10788 prefix_cmds="$prefix_cmds -e 1d";
10789 fi~
10790 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
10791 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
10792 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
10793 emximp -o $lib $output_objdir/$libname.def'
10794 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
10795 enable_shared_with_static_runtimes=yes
10796 ;;
10797  
10798 osf3*)
10799 if test yes = "$GCC"; then
10800 allow_undefined_flag=' $wl-expect_unresolved $wl\*'
10801 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
10802 else
10803 allow_undefined_flag=' -expect_unresolved \*'
10804 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
10805 fi
10806 archive_cmds_need_lc='no'
10807 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
10808 hardcode_libdir_separator=:
10809 ;;
10810  
10811 osf4* | osf5*) # as osf3* with the addition of -msym flag
10812 if test yes = "$GCC"; then
10813 allow_undefined_flag=' $wl-expect_unresolved $wl\*'
10814 archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
10815 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
10816 else
10817 allow_undefined_flag=' -expect_unresolved \*'
10818 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
10819 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
10820 $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
10821  
10822 # Both c and cxx compiler support -rpath directly
10823 hardcode_libdir_flag_spec='-rpath $libdir'
10824 fi
10825 archive_cmds_need_lc='no'
10826 hardcode_libdir_separator=:
10827 ;;
10828  
10829 solaris*)
10830 no_undefined_flag=' -z defs'
10831 if test yes = "$GCC"; then
10832 wlarc='$wl'
10833 archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
10834 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
10835 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
10836 else
10837 case `$CC -V 2>&1` in
10838 *"Compilers 5.0"*)
10839 wlarc=''
10840 archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
10841 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
10842 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
10843 ;;
10844 *)
10845 wlarc='$wl'
10846 archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
10847 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
10848 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
10849 ;;
10850 esac
10851 fi
10852 hardcode_libdir_flag_spec='-R$libdir'
10853 hardcode_shlibpath_var=no
10854 case $host_os in
10855 solaris2.[0-5] | solaris2.[0-5].*) ;;
10856 *)
10857 # The compiler driver will combine and reorder linker options,
10858 # but understands '-z linker_flag'. GCC discards it without '$wl',
10859 # but is careful enough not to reorder.
10860 # Supported since Solaris 2.6 (maybe 2.5.1?)
10861 if test yes = "$GCC"; then
10862 whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
10863 else
10864 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
10865 fi
10866 ;;
10867 esac
10868 link_all_deplibs=yes
10869 ;;
10870  
10871 sunos4*)
10872 if test sequent = "$host_vendor"; then
10873 # Use $CC to link under sequent, because it throws in some extra .o
10874 # files that make .init and .fini sections work.
10875 archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
10876 else
10877 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
10878 fi
10879 hardcode_libdir_flag_spec='-L$libdir'
10880 hardcode_direct=yes
10881 hardcode_minus_L=yes
10882 hardcode_shlibpath_var=no
10883 ;;
10884  
10885 sysv4)
10886 case $host_vendor in
10887 sni)
10888 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10889 hardcode_direct=yes # is this really true???
10890 ;;
10891 siemens)
10892 ## LD is ld it makes a PLAMLIB
10893 ## CC just makes a GrossModule.
10894 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
10895 reload_cmds='$CC -r -o $output$reload_objs'
10896 hardcode_direct=no
10897 ;;
10898 motorola)
10899 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10900 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
10901 ;;
10902 esac
10903 runpath_var='LD_RUN_PATH'
10904 hardcode_shlibpath_var=no
10905 ;;
10906  
10907 sysv4.3*)
10908 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10909 hardcode_shlibpath_var=no
10910 export_dynamic_flag_spec='-Bexport'
10911 ;;
10912  
10913 sysv4*MP*)
10914 if test -d /usr/nec; then
10915 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10916 hardcode_shlibpath_var=no
10917 runpath_var=LD_RUN_PATH
10918 hardcode_runpath_var=yes
10919 ld_shlibs=yes
10920 fi
10921 ;;
10922  
10923 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
10924 no_undefined_flag='$wl-z,text'
10925 archive_cmds_need_lc=no
10926 hardcode_shlibpath_var=no
10927 runpath_var='LD_RUN_PATH'
10928  
10929 if test yes = "$GCC"; then
10930 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10931 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10932 else
10933 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10934 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10935 fi
10936 ;;
10937  
10938 sysv5* | sco3.2v5* | sco5v6*)
10939 # Note: We CANNOT use -z defs as we might desire, because we do not
10940 # link with -lc, and that would cause any symbols used from libc to
10941 # always be unresolved, which means just about no library would
10942 # ever link correctly. If we're not using GNU ld we use -z text
10943 # though, which does catch some bad symbols but isn't as heavy-handed
10944 # as -z defs.
10945 no_undefined_flag='$wl-z,text'
10946 allow_undefined_flag='$wl-z,nodefs'
10947 archive_cmds_need_lc=no
10948 hardcode_shlibpath_var=no
10949 hardcode_libdir_flag_spec='$wl-R,$libdir'
10950 hardcode_libdir_separator=':'
10951 link_all_deplibs=yes
10952 export_dynamic_flag_spec='$wl-Bexport'
10953 runpath_var='LD_RUN_PATH'
10954  
10955 if test yes = "$GCC"; then
10956 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10957 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10958 else
10959 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10960 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10961 fi
10962 ;;
10963  
10964 uts4*)
10965 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
10966 hardcode_libdir_flag_spec='-L$libdir'
10967 hardcode_shlibpath_var=no
10968 ;;
10969  
10970 *)
10971 ld_shlibs=no
10972 ;;
10973 esac
10974  
10975 if test sni = "$host_vendor"; then
10976 case $host in
10977 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10978 export_dynamic_flag_spec='$wl-Blargedynsym'
10979 ;;
10980 esac
10981 fi
10982 fi
10983  
10984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
10985 $as_echo "$ld_shlibs" >&6; }
10986 test no = "$ld_shlibs" && can_build_shared=no
10987  
10988 with_gnu_ld=$with_gnu_ld
10989  
10990  
10991  
10992  
10993  
10994  
10995  
10996  
10997  
10998  
10999  
11000  
11001  
11002  
11003  
11004 #
11005 # Do we need to explicitly link libc?
11006 #
11007 case "x$archive_cmds_need_lc" in
11008 x|xyes)
11009 # Assume -lc should be added
11010 archive_cmds_need_lc=yes
11011  
11012 if test yes,yes = "$GCC,$enable_shared"; then
11013 case $archive_cmds in
11014 *'~'*)
11015 # FIXME: we may have to deal with multi-command sequences.
11016 ;;
11017 '$CC '*)
11018 # Test whether the compiler implicitly links with -lc since on some
11019 # systems, -lgcc has to come before -lc. If gcc already passes -lc
11020 # to ld, don't add -lc before -lgcc.
11021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
11022 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
11023 if ${lt_cv_archive_cmds_need_lc+:} false; then :
11024 $as_echo_n "(cached) " >&6
11025 else
11026 $RM conftest*
11027 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11028  
11029 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
11030 (eval $ac_compile) 2>&5
11031 ac_status=$?
11032 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11033 test $ac_status = 0; } 2>conftest.err; then
11034 soname=conftest
11035 lib=conftest
11036 libobjs=conftest.$ac_objext
11037 deplibs=
11038 wl=$lt_prog_compiler_wl
11039 pic_flag=$lt_prog_compiler_pic
11040 compiler_flags=-v
11041 linker_flags=-v
11042 verstring=
11043 output_objdir=.
11044 libname=conftest
11045 lt_save_allow_undefined_flag=$allow_undefined_flag
11046 allow_undefined_flag=
11047 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
11048 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
11049 ac_status=$?
11050 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11051 test $ac_status = 0; }
11052 then
11053 lt_cv_archive_cmds_need_lc=no
11054 else
11055 lt_cv_archive_cmds_need_lc=yes
11056 fi
11057 allow_undefined_flag=$lt_save_allow_undefined_flag
11058 else
11059 cat conftest.err 1>&5
11060 fi
11061 $RM conftest*
11062  
11063 fi
11064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
11065 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
11066 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
11067 ;;
11068 esac
11069 fi
11070 ;;
11071 esac
11072  
11073  
11074  
11075  
11076  
11077  
11078  
11079  
11080  
11081  
11082  
11083  
11084  
11085  
11086  
11087  
11088  
11089  
11090  
11091  
11092  
11093  
11094  
11095  
11096  
11097  
11098  
11099  
11100  
11101  
11102  
11103  
11104  
11105  
11106  
11107  
11108  
11109  
11110  
11111  
11112  
11113  
11114  
11115  
11116  
11117  
11118  
11119  
11120  
11121  
11122  
11123  
11124  
11125  
11126  
11127  
11128  
11129  
11130  
11131  
11132  
11133  
11134  
11135  
11136  
11137  
11138  
11139  
11140  
11141  
11142  
11143  
11144  
11145  
11146  
11147  
11148  
11149  
11150  
11151  
11152  
11153  
11154  
11155  
11156  
11157  
11158  
11159  
11160  
11161  
11162  
11163  
11164  
11165  
11166  
11167  
11168  
11169  
11170  
11171  
11172  
11173  
11174  
11175  
11176  
11177  
11178  
11179  
11180  
11181  
11182  
11183  
11184  
11185  
11186  
11187  
11188  
11189  
11190  
11191  
11192  
11193  
11194  
11195  
11196  
11197  
11198  
11199  
11200  
11201  
11202  
11203  
11204  
11205  
11206  
11207  
11208  
11209  
11210  
11211  
11212  
11213  
11214  
11215  
11216  
11217  
11218  
11219  
11220  
11221  
11222  
11223  
11224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
11225 $as_echo_n "checking dynamic linker characteristics... " >&6; }
11226  
11227 if test yes = "$GCC"; then
11228 case $host_os in
11229 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
11230 *) lt_awk_arg='/^libraries:/' ;;
11231 esac
11232 case $host_os in
11233 mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
11234 *) lt_sed_strip_eq='s|=/|/|g' ;;
11235 esac
11236 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
11237 case $lt_search_path_spec in
11238 *\;*)
11239 # if the path contains ";" then we assume it to be the separator
11240 # otherwise default to the standard path separator (i.e. ":") - it is
11241 # assumed that no part of a normal pathname contains ";" but that should
11242 # okay in the real world where ";" in dirpaths is itself problematic.
11243 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
11244 ;;
11245 *)
11246 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
11247 ;;
11248 esac
11249 # Ok, now we have the path, separated by spaces, we can step through it
11250 # and add multilib dir if necessary...
11251 lt_tmp_lt_search_path_spec=
11252 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
11253 # ...but if some path component already ends with the multilib dir we assume
11254 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
11255 case "$lt_multi_os_dir; $lt_search_path_spec " in
11256 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
11257 lt_multi_os_dir=
11258 ;;
11259 esac
11260 for lt_sys_path in $lt_search_path_spec; do
11261 if test -d "$lt_sys_path$lt_multi_os_dir"; then
11262 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
11263 elif test -n "$lt_multi_os_dir"; then
11264 test -d "$lt_sys_path" && \
11265 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
11266 fi
11267 done
11268 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
11269 BEGIN {RS = " "; FS = "/|\n";} {
11270 lt_foo = "";
11271 lt_count = 0;
11272 for (lt_i = NF; lt_i > 0; lt_i--) {
11273 if ($lt_i != "" && $lt_i != ".") {
11274 if ($lt_i == "..") {
11275 lt_count++;
11276 } else {
11277 if (lt_count == 0) {
11278 lt_foo = "/" $lt_i lt_foo;
11279 } else {
11280 lt_count--;
11281 }
11282 }
11283 }
11284 }
11285 if (lt_foo != "") { lt_freq[lt_foo]++; }
11286 if (lt_freq[lt_foo] == 1) { print lt_foo; }
11287 }'`
11288 # AWK program above erroneously prepends '/' to C:/dos/paths
11289 # for these hosts.
11290 case $host_os in
11291 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
11292 $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
11293 esac
11294 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
11295 else
11296 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
11297 fi
11298 library_names_spec=
11299 libname_spec='lib$name'
11300 soname_spec=
11301 shrext_cmds=.so
11302 postinstall_cmds=
11303 postuninstall_cmds=
11304 finish_cmds=
11305 finish_eval=
11306 shlibpath_var=
11307 shlibpath_overrides_runpath=unknown
11308 version_type=none
11309 dynamic_linker="$host_os ld.so"
11310 sys_lib_dlsearch_path_spec="/lib /usr/lib"
11311 need_lib_prefix=unknown
11312 hardcode_into_libs=no
11313  
11314 # when you set need_version to no, make sure it does not cause -set_version
11315 # flags to be left without arguments
11316 need_version=unknown
11317  
11318  
11319  
11320 case $host_os in
11321 aix3*)
11322 version_type=linux # correct to gnu/linux during the next big refactor
11323 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
11324 shlibpath_var=LIBPATH
11325  
11326 # AIX 3 has no versioning support, so we append a major version to the name.
11327 soname_spec='$libname$release$shared_ext$major'
11328 ;;
11329  
11330 aix[4-9]*)
11331 version_type=linux # correct to gnu/linux during the next big refactor
11332 need_lib_prefix=no
11333 need_version=no
11334 hardcode_into_libs=yes
11335 if test ia64 = "$host_cpu"; then
11336 # AIX 5 supports IA64
11337 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
11338 shlibpath_var=LD_LIBRARY_PATH
11339 else
11340 # With GCC up to 2.95.x, collect2 would create an import file
11341 # for dependence libraries. The import file would start with
11342 # the line '#! .'. This would cause the generated library to
11343 # depend on '.', always an invalid library. This was fixed in
11344 # development snapshots of GCC prior to 3.0.
11345 case $host_os in
11346 aix4 | aix4.[01] | aix4.[01].*)
11347 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
11348 echo ' yes '
11349 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
11350 :
11351 else
11352 can_build_shared=no
11353 fi
11354 ;;
11355 esac
11356 # Using Import Files as archive members, it is possible to support
11357 # filename-based versioning of shared library archives on AIX. While
11358 # this would work for both with and without runtime linking, it will
11359 # prevent static linking of such archives. So we do filename-based
11360 # shared library versioning with .so extension only, which is used
11361 # when both runtime linking and shared linking is enabled.
11362 # Unfortunately, runtime linking may impact performance, so we do
11363 # not want this to be the default eventually. Also, we use the
11364 # versioned .so libs for executables only if there is the -brtl
11365 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
11366 # To allow for filename-based versioning support, we need to create
11367 # libNAME.so.V as an archive file, containing:
11368 # *) an Import File, referring to the versioned filename of the
11369 # archive as well as the shared archive member, telling the
11370 # bitwidth (32 or 64) of that shared object, and providing the
11371 # list of exported symbols of that shared object, eventually
11372 # decorated with the 'weak' keyword
11373 # *) the shared object with the F_LOADONLY flag set, to really avoid
11374 # it being seen by the linker.
11375 # At run time we better use the real file rather than another symlink,
11376 # but for link time we create the symlink libNAME.so -> libNAME.so.V
11377  
11378 case $with_aix_soname,$aix_use_runtimelinking in
11379 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
11380 # soname into executable. Probably we can add versioning support to
11381 # collect2, so additional links can be useful in future.
11382 aix,yes) # traditional libtool
11383 dynamic_linker='AIX unversionable lib.so'
11384 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
11385 # instead of lib<name>.a to let people know that these are not
11386 # typical AIX shared libraries.
11387 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11388 ;;
11389 aix,no) # traditional AIX only
11390 dynamic_linker='AIX lib.a(lib.so.V)'
11391 # We preserve .a as extension for shared libraries through AIX4.2
11392 # and later when we are not doing run time linking.
11393 library_names_spec='$libname$release.a $libname.a'
11394 soname_spec='$libname$release$shared_ext$major'
11395 ;;
11396 svr4,*) # full svr4 only
11397 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
11398 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
11399 # We do not specify a path in Import Files, so LIBPATH fires.
11400 shlibpath_overrides_runpath=yes
11401 ;;
11402 *,yes) # both, prefer svr4
11403 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
11404 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
11405 # unpreferred sharedlib libNAME.a needs extra handling
11406 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
11407 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
11408 # We do not specify a path in Import Files, so LIBPATH fires.
11409 shlibpath_overrides_runpath=yes
11410 ;;
11411 *,no) # both, prefer aix
11412 dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
11413 library_names_spec='$libname$release.a $libname.a'
11414 soname_spec='$libname$release$shared_ext$major'
11415 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
11416 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
11417 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
11418 ;;
11419 esac
11420 shlibpath_var=LIBPATH
11421 fi
11422 ;;
11423  
11424 amigaos*)
11425 case $host_cpu in
11426 powerpc)
11427 # Since July 2007 AmigaOS4 officially supports .so libraries.
11428 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
11429 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11430 ;;
11431 m68k)
11432 library_names_spec='$libname.ixlibrary $libname.a'
11433 # Create ${libname}_ixlibrary.a entries in /sys/libs.
11434 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
11435 ;;
11436 esac
11437 ;;
11438  
11439 beos*)
11440 library_names_spec='$libname$shared_ext'
11441 dynamic_linker="$host_os ld.so"
11442 shlibpath_var=LIBRARY_PATH
11443 ;;
11444  
11445 bsdi[45]*)
11446 version_type=linux # correct to gnu/linux during the next big refactor
11447 need_version=no
11448 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11449 soname_spec='$libname$release$shared_ext$major'
11450 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
11451 shlibpath_var=LD_LIBRARY_PATH
11452 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
11453 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
11454 # the default ld.so.conf also contains /usr/contrib/lib and
11455 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
11456 # libtool to hard-code these into programs
11457 ;;
11458  
11459 cygwin* | mingw* | pw32* | cegcc*)
11460 version_type=windows
11461 shrext_cmds=.dll
11462 need_version=no
11463 need_lib_prefix=no
11464  
11465 case $GCC,$cc_basename in
11466 yes,*)
11467 # gcc
11468 library_names_spec='$libname.dll.a'
11469 # DLL is installed to $(libdir)/../bin by postinstall_cmds
11470 postinstall_cmds='base_file=`basename \$file`~
11471 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
11472 dldir=$destdir/`dirname \$dlpath`~
11473 test -d \$dldir || mkdir -p \$dldir~
11474 $install_prog $dir/$dlname \$dldir/$dlname~
11475 chmod a+x \$dldir/$dlname~
11476 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
11477 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
11478 fi'
11479 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
11480 dlpath=$dir/\$dldll~
11481 $RM \$dlpath'
11482 shlibpath_overrides_runpath=yes
11483  
11484 case $host_os in
11485 cygwin*)
11486 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
11487 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
11488  
11489 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
11490 ;;
11491 mingw* | cegcc*)
11492 # MinGW DLLs use traditional 'lib' prefix
11493 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
11494 ;;
11495 pw32*)
11496 # pw32 DLLs use 'pw' prefix rather than 'lib'
11497 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
11498 ;;
11499 esac
11500 dynamic_linker='Win32 ld.exe'
11501 ;;
11502  
11503 *,cl*)
11504 # Native MSVC
11505 libname_spec='$name'
11506 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
11507 library_names_spec='$libname.dll.lib'
11508  
11509 case $build_os in
11510 mingw*)
11511 sys_lib_search_path_spec=
11512 lt_save_ifs=$IFS
11513 IFS=';'
11514 for lt_path in $LIB
11515 do
11516 IFS=$lt_save_ifs
11517 # Let DOS variable expansion print the short 8.3 style file name.
11518 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
11519 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
11520 done
11521 IFS=$lt_save_ifs
11522 # Convert to MSYS style.
11523 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
11524 ;;
11525 cygwin*)
11526 # Convert to unix form, then to dos form, then back to unix form
11527 # but this time dos style (no spaces!) so that the unix form looks
11528 # like /cygdrive/c/PROGRA~1:/cygdr...
11529 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
11530 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
11531 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
11532 ;;
11533 *)
11534 sys_lib_search_path_spec=$LIB
11535 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
11536 # It is most probably a Windows format PATH.
11537 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
11538 else
11539 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
11540 fi
11541 # FIXME: find the short name or the path components, as spaces are
11542 # common. (e.g. "Program Files" -> "PROGRA~1")
11543 ;;
11544 esac
11545  
11546 # DLL is installed to $(libdir)/../bin by postinstall_cmds
11547 postinstall_cmds='base_file=`basename \$file`~
11548 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
11549 dldir=$destdir/`dirname \$dlpath`~
11550 test -d \$dldir || mkdir -p \$dldir~
11551 $install_prog $dir/$dlname \$dldir/$dlname'
11552 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
11553 dlpath=$dir/\$dldll~
11554 $RM \$dlpath'
11555 shlibpath_overrides_runpath=yes
11556 dynamic_linker='Win32 link.exe'
11557 ;;
11558  
11559 *)
11560 # Assume MSVC wrapper
11561 library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
11562 dynamic_linker='Win32 ld.exe'
11563 ;;
11564 esac
11565 # FIXME: first we should search . and the directory the executable is in
11566 shlibpath_var=PATH
11567 ;;
11568  
11569 darwin* | rhapsody*)
11570 dynamic_linker="$host_os dyld"
11571 version_type=darwin
11572 need_lib_prefix=no
11573 need_version=no
11574 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
11575 soname_spec='$libname$release$major$shared_ext'
11576 shlibpath_overrides_runpath=yes
11577 shlibpath_var=DYLD_LIBRARY_PATH
11578 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
11579  
11580 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
11581 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
11582 ;;
11583  
11584 dgux*)
11585 version_type=linux # correct to gnu/linux during the next big refactor
11586 need_lib_prefix=no
11587 need_version=no
11588 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11589 soname_spec='$libname$release$shared_ext$major'
11590 shlibpath_var=LD_LIBRARY_PATH
11591 ;;
11592  
11593 freebsd* | dragonfly*)
11594 # DragonFly does not have aout. When/if they implement a new
11595 # versioning mechanism, adjust this.
11596 if test -x /usr/bin/objformat; then
11597 objformat=`/usr/bin/objformat`
11598 else
11599 case $host_os in
11600 freebsd[23].*) objformat=aout ;;
11601 *) objformat=elf ;;
11602 esac
11603 fi
11604 version_type=freebsd-$objformat
11605 case $version_type in
11606 freebsd-elf*)
11607 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11608 soname_spec='$libname$release$shared_ext$major'
11609 need_version=no
11610 need_lib_prefix=no
11611 ;;
11612 freebsd-*)
11613 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
11614 need_version=yes
11615 ;;
11616 esac
11617 shlibpath_var=LD_LIBRARY_PATH
11618 case $host_os in
11619 freebsd2.*)
11620 shlibpath_overrides_runpath=yes
11621 ;;
11622 freebsd3.[01]* | freebsdelf3.[01]*)
11623 shlibpath_overrides_runpath=yes
11624 hardcode_into_libs=yes
11625 ;;
11626 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
11627 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
11628 shlibpath_overrides_runpath=no
11629 hardcode_into_libs=yes
11630 ;;
11631 *) # from 4.6 on, and DragonFly
11632 shlibpath_overrides_runpath=yes
11633 hardcode_into_libs=yes
11634 ;;
11635 esac
11636 ;;
11637  
11638 haiku*)
11639 version_type=linux # correct to gnu/linux during the next big refactor
11640 need_lib_prefix=no
11641 need_version=no
11642 dynamic_linker="$host_os runtime_loader"
11643 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11644 soname_spec='$libname$release$shared_ext$major'
11645 shlibpath_var=LIBRARY_PATH
11646 shlibpath_overrides_runpath=no
11647 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
11648 hardcode_into_libs=yes
11649 ;;
11650  
11651 hpux9* | hpux10* | hpux11*)
11652 # Give a soname corresponding to the major version so that dld.sl refuses to
11653 # link against other versions.
11654 version_type=sunos
11655 need_lib_prefix=no
11656 need_version=no
11657 case $host_cpu in
11658 ia64*)
11659 shrext_cmds='.so'
11660 hardcode_into_libs=yes
11661 dynamic_linker="$host_os dld.so"
11662 shlibpath_var=LD_LIBRARY_PATH
11663 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
11664 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11665 soname_spec='$libname$release$shared_ext$major'
11666 if test 32 = "$HPUX_IA64_MODE"; then
11667 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
11668 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
11669 else
11670 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
11671 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
11672 fi
11673 ;;
11674 hppa*64*)
11675 shrext_cmds='.sl'
11676 hardcode_into_libs=yes
11677 dynamic_linker="$host_os dld.sl"
11678 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
11679 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
11680 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11681 soname_spec='$libname$release$shared_ext$major'
11682 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
11683 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
11684 ;;
11685 *)
11686 shrext_cmds='.sl'
11687 dynamic_linker="$host_os dld.sl"
11688 shlibpath_var=SHLIB_PATH
11689 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
11690 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11691 soname_spec='$libname$release$shared_ext$major'
11692 ;;
11693 esac
11694 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
11695 postinstall_cmds='chmod 555 $lib'
11696 # or fails outright, so override atomically:
11697 install_override_mode=555
11698 ;;
11699  
11700 interix[3-9]*)
11701 version_type=linux # correct to gnu/linux during the next big refactor
11702 need_lib_prefix=no
11703 need_version=no
11704 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11705 soname_spec='$libname$release$shared_ext$major'
11706 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
11707 shlibpath_var=LD_LIBRARY_PATH
11708 shlibpath_overrides_runpath=no
11709 hardcode_into_libs=yes
11710 ;;
11711  
11712 irix5* | irix6* | nonstopux*)
11713 case $host_os in
11714 nonstopux*) version_type=nonstopux ;;
11715 *)
11716 if test yes = "$lt_cv_prog_gnu_ld"; then
11717 version_type=linux # correct to gnu/linux during the next big refactor
11718 else
11719 version_type=irix
11720 fi ;;
11721 esac
11722 need_lib_prefix=no
11723 need_version=no
11724 soname_spec='$libname$release$shared_ext$major'
11725 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
11726 case $host_os in
11727 irix5* | nonstopux*)
11728 libsuff= shlibsuff=
11729 ;;
11730 *)
11731 case $LD in # libtool.m4 will add one of these switches to LD
11732 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
11733 libsuff= shlibsuff= libmagic=32-bit;;
11734 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
11735 libsuff=32 shlibsuff=N32 libmagic=N32;;
11736 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
11737 libsuff=64 shlibsuff=64 libmagic=64-bit;;
11738 *) libsuff= shlibsuff= libmagic=never-match;;
11739 esac
11740 ;;
11741 esac
11742 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
11743 shlibpath_overrides_runpath=no
11744 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
11745 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
11746 hardcode_into_libs=yes
11747 ;;
11748  
11749 # No shared lib support for Linux oldld, aout, or coff.
11750 linux*oldld* | linux*aout* | linux*coff*)
11751 dynamic_linker=no
11752 ;;
11753  
11754 linux*android*)
11755 version_type=none # Android doesn't support versioned libraries.
11756 need_lib_prefix=no
11757 need_version=no
11758 library_names_spec='$libname$release$shared_ext'
11759 soname_spec='$libname$release$shared_ext'
11760 finish_cmds=
11761 shlibpath_var=LD_LIBRARY_PATH
11762 shlibpath_overrides_runpath=yes
11763  
11764 # This implies no fast_install, which is unacceptable.
11765 # Some rework will be needed to allow for fast_install
11766 # before this can be enabled.
11767 hardcode_into_libs=yes
11768  
11769 dynamic_linker='Android linker'
11770 # Don't embed -rpath directories since the linker doesn't support them.
11771 hardcode_libdir_flag_spec='-L$libdir'
11772 ;;
11773  
11774 # This must be glibc/ELF.
11775 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
11776 version_type=linux # correct to gnu/linux during the next big refactor
11777 need_lib_prefix=no
11778 need_version=no
11779 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11780 soname_spec='$libname$release$shared_ext$major'
11781 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
11782 shlibpath_var=LD_LIBRARY_PATH
11783 shlibpath_overrides_runpath=no
11784  
11785 # Some binutils ld are patched to set DT_RUNPATH
11786 if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
11787 $as_echo_n "(cached) " >&6
11788 else
11789 lt_cv_shlibpath_overrides_runpath=no
11790 save_LDFLAGS=$LDFLAGS
11791 save_libdir=$libdir
11792 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
11793 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
11794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11795 /* end confdefs.h. */
11796  
11797 int
11798 main ()
11799 {
11800  
11801 ;
11802 return 0;
11803 }
11804 _ACEOF
11805 if ac_fn_c_try_link "$LINENO"; then :
11806 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
11807 lt_cv_shlibpath_overrides_runpath=yes
11808 fi
11809 fi
11810 rm -f core conftest.err conftest.$ac_objext \
11811 conftest$ac_exeext conftest.$ac_ext
11812 LDFLAGS=$save_LDFLAGS
11813 libdir=$save_libdir
11814  
11815 fi
11816  
11817 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
11818  
11819 # This implies no fast_install, which is unacceptable.
11820 # Some rework will be needed to allow for fast_install
11821 # before this can be enabled.
11822 hardcode_into_libs=yes
11823  
11824 # Ideally, we could use ldconfig to report *all* directores which are
11825 # searched for libraries, however this is still not possible. Aside from not
11826 # being certain /sbin/ldconfig is available, command
11827 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
11828 # even though it is searched at run-time. Try to do the best guess by
11829 # appending ld.so.conf contents (and includes) to the search path.
11830 if test -f /etc/ld.so.conf; then
11831 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
11832 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
11833 fi
11834  
11835 # We used to test for /lib/ld.so.1 and disable shared libraries on
11836 # powerpc, because MkLinux only supported shared libraries with the
11837 # GNU dynamic linker. Since this was broken with cross compilers,
11838 # most powerpc-linux boxes support dynamic linking these days and
11839 # people can always --disable-shared, the test was removed, and we
11840 # assume the GNU/Linux dynamic linker is in use.
11841 dynamic_linker='GNU/Linux ld.so'
11842 ;;
11843  
11844 netbsdelf*-gnu)
11845 version_type=linux
11846 need_lib_prefix=no
11847 need_version=no
11848 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
11849 soname_spec='${libname}${release}${shared_ext}$major'
11850 shlibpath_var=LD_LIBRARY_PATH
11851 shlibpath_overrides_runpath=no
11852 hardcode_into_libs=yes
11853 dynamic_linker='NetBSD ld.elf_so'
11854 ;;
11855  
11856 netbsd*)
11857 version_type=sunos
11858 need_lib_prefix=no
11859 need_version=no
11860 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11861 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
11862 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
11863 dynamic_linker='NetBSD (a.out) ld.so'
11864 else
11865 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11866 soname_spec='$libname$release$shared_ext$major'
11867 dynamic_linker='NetBSD ld.elf_so'
11868 fi
11869 shlibpath_var=LD_LIBRARY_PATH
11870 shlibpath_overrides_runpath=yes
11871 hardcode_into_libs=yes
11872 ;;
11873  
11874 newsos6)
11875 version_type=linux # correct to gnu/linux during the next big refactor
11876 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11877 shlibpath_var=LD_LIBRARY_PATH
11878 shlibpath_overrides_runpath=yes
11879 ;;
11880  
11881 *nto* | *qnx*)
11882 version_type=qnx
11883 need_lib_prefix=no
11884 need_version=no
11885 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11886 soname_spec='$libname$release$shared_ext$major'
11887 shlibpath_var=LD_LIBRARY_PATH
11888 shlibpath_overrides_runpath=no
11889 hardcode_into_libs=yes
11890 dynamic_linker='ldqnx.so'
11891 ;;
11892  
11893 openbsd* | bitrig*)
11894 version_type=sunos
11895 sys_lib_dlsearch_path_spec=/usr/lib
11896 need_lib_prefix=no
11897 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
11898 need_version=no
11899 else
11900 need_version=yes
11901 fi
11902 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
11903 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
11904 shlibpath_var=LD_LIBRARY_PATH
11905 shlibpath_overrides_runpath=yes
11906 ;;
11907  
11908 os2*)
11909 libname_spec='$name'
11910 version_type=windows
11911 shrext_cmds=.dll
11912 need_version=no
11913 need_lib_prefix=no
11914 # OS/2 can only load a DLL with a base name of 8 characters or less.
11915 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
11916 v=$($ECHO $release$versuffix | tr -d .-);
11917 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
11918 $ECHO $n$v`$shared_ext'
11919 library_names_spec='${libname}_dll.$libext'
11920 dynamic_linker='OS/2 ld.exe'
11921 shlibpath_var=BEGINLIBPATH
11922 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
11923 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
11924 postinstall_cmds='base_file=`basename \$file`~
11925 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
11926 dldir=$destdir/`dirname \$dlpath`~
11927 test -d \$dldir || mkdir -p \$dldir~
11928 $install_prog $dir/$dlname \$dldir/$dlname~
11929 chmod a+x \$dldir/$dlname~
11930 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
11931 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
11932 fi'
11933 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
11934 dlpath=$dir/\$dldll~
11935 $RM \$dlpath'
11936 ;;
11937  
11938 osf3* | osf4* | osf5*)
11939 version_type=osf
11940 need_lib_prefix=no
11941 need_version=no
11942 soname_spec='$libname$release$shared_ext$major'
11943 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11944 shlibpath_var=LD_LIBRARY_PATH
11945 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
11946 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
11947 ;;
11948  
11949 rdos*)
11950 dynamic_linker=no
11951 ;;
11952  
11953 solaris*)
11954 version_type=linux # correct to gnu/linux during the next big refactor
11955 need_lib_prefix=no
11956 need_version=no
11957 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11958 soname_spec='$libname$release$shared_ext$major'
11959 shlibpath_var=LD_LIBRARY_PATH
11960 shlibpath_overrides_runpath=yes
11961 hardcode_into_libs=yes
11962 # ldd complains unless libraries are executable
11963 postinstall_cmds='chmod +x $lib'
11964 ;;
11965  
11966 sunos4*)
11967 version_type=sunos
11968 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
11969 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
11970 shlibpath_var=LD_LIBRARY_PATH
11971 shlibpath_overrides_runpath=yes
11972 if test yes = "$with_gnu_ld"; then
11973 need_lib_prefix=no
11974 fi
11975 need_version=yes
11976 ;;
11977  
11978 sysv4 | sysv4.3*)
11979 version_type=linux # correct to gnu/linux during the next big refactor
11980 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
11981 soname_spec='$libname$release$shared_ext$major'
11982 shlibpath_var=LD_LIBRARY_PATH
11983 case $host_vendor in
11984 sni)
11985 shlibpath_overrides_runpath=no
11986 need_lib_prefix=no
11987 runpath_var=LD_RUN_PATH
11988 ;;
11989 siemens)
11990 need_lib_prefix=no
11991 ;;
11992 motorola)
11993 need_lib_prefix=no
11994 need_version=no
11995 shlibpath_overrides_runpath=no
11996 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
11997 ;;
11998 esac
11999 ;;
12000  
12001 sysv4*MP*)
12002 if test -d /usr/nec; then
12003 version_type=linux # correct to gnu/linux during the next big refactor
12004 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
12005 soname_spec='$libname$shared_ext.$major'
12006 shlibpath_var=LD_LIBRARY_PATH
12007 fi
12008 ;;
12009  
12010 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
12011 version_type=sco
12012 need_lib_prefix=no
12013 need_version=no
12014 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
12015 soname_spec='$libname$release$shared_ext$major'
12016 shlibpath_var=LD_LIBRARY_PATH
12017 shlibpath_overrides_runpath=yes
12018 hardcode_into_libs=yes
12019 if test yes = "$with_gnu_ld"; then
12020 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
12021 else
12022 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
12023 case $host_os in
12024 sco3.2v5*)
12025 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
12026 ;;
12027 esac
12028 fi
12029 sys_lib_dlsearch_path_spec='/usr/lib'
12030 ;;
12031  
12032 tpf*)
12033 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
12034 version_type=linux # correct to gnu/linux during the next big refactor
12035 need_lib_prefix=no
12036 need_version=no
12037 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12038 shlibpath_var=LD_LIBRARY_PATH
12039 shlibpath_overrides_runpath=no
12040 hardcode_into_libs=yes
12041 ;;
12042  
12043 uts4*)
12044 version_type=linux # correct to gnu/linux during the next big refactor
12045 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12046 soname_spec='$libname$release$shared_ext$major'
12047 shlibpath_var=LD_LIBRARY_PATH
12048 ;;
12049  
12050 *)
12051 dynamic_linker=no
12052 ;;
12053 esac
12054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
12055 $as_echo "$dynamic_linker" >&6; }
12056 test no = "$dynamic_linker" && can_build_shared=no
12057  
12058 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
12059 if test yes = "$GCC"; then
12060 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
12061 fi
12062  
12063 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
12064 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
12065 fi
12066  
12067 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
12068 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
12069 fi
12070  
12071 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
12072 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
12073  
12074 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
12075 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
12076  
12077 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
12078 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
12079  
12080  
12081  
12082  
12083  
12084  
12085  
12086  
12087  
12088  
12089  
12090  
12091  
12092  
12093  
12094  
12095  
12096  
12097  
12098  
12099  
12100  
12101  
12102  
12103  
12104  
12105  
12106  
12107  
12108  
12109  
12110  
12111  
12112  
12113  
12114  
12115  
12116  
12117  
12118  
12119  
12120  
12121  
12122  
12123  
12124  
12125  
12126  
12127  
12128  
12129  
12130  
12131  
12132  
12133  
12134  
12135  
12136  
12137  
12138  
12139  
12140  
12141  
12142  
12143  
12144  
12145  
12146  
12147  
12148  
12149  
12150  
12151  
12152  
12153  
12154  
12155  
12156  
12157  
12158  
12159  
12160  
12161  
12162  
12163  
12164  
12165  
12166  
12167  
12168  
12169  
12170  
12171  
12172  
12173  
12174  
12175  
12176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
12177 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
12178 hardcode_action=
12179 if test -n "$hardcode_libdir_flag_spec" ||
12180 test -n "$runpath_var" ||
12181 test yes = "$hardcode_automatic"; then
12182  
12183 # We can hardcode non-existent directories.
12184 if test no != "$hardcode_direct" &&
12185 # If the only mechanism to avoid hardcoding is shlibpath_var, we
12186 # have to relink, otherwise we might link with an installed library
12187 # when we should be linking with a yet-to-be-installed one
12188 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
12189 test no != "$hardcode_minus_L"; then
12190 # Linking always hardcodes the temporary library directory.
12191 hardcode_action=relink
12192 else
12193 # We can link without hardcoding, and we can hardcode nonexisting dirs.
12194 hardcode_action=immediate
12195 fi
12196 else
12197 # We cannot hardcode anything, or else we can only hardcode existing
12198 # directories.
12199 hardcode_action=unsupported
12200 fi
12201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
12202 $as_echo "$hardcode_action" >&6; }
12203  
12204 if test relink = "$hardcode_action" ||
12205 test yes = "$inherit_rpath"; then
12206 # Fast installation is not supported
12207 enable_fast_install=no
12208 elif test yes = "$shlibpath_overrides_runpath" ||
12209 test no = "$enable_shared"; then
12210 # Fast installation is not necessary
12211 enable_fast_install=needless
12212 fi
12213  
12214  
12215  
12216  
12217  
12218  
12219 if test yes != "$enable_dlopen"; then
12220 enable_dlopen=unknown
12221 enable_dlopen_self=unknown
12222 enable_dlopen_self_static=unknown
12223 else
12224 lt_cv_dlopen=no
12225 lt_cv_dlopen_libs=
12226  
12227 case $host_os in
12228 beos*)
12229 lt_cv_dlopen=load_add_on
12230 lt_cv_dlopen_libs=
12231 lt_cv_dlopen_self=yes
12232 ;;
12233  
12234 mingw* | pw32* | cegcc*)
12235 lt_cv_dlopen=LoadLibrary
12236 lt_cv_dlopen_libs=
12237 ;;
12238  
12239 cygwin*)
12240 lt_cv_dlopen=dlopen
12241 lt_cv_dlopen_libs=
12242 ;;
12243  
12244 darwin*)
12245 # if libdl is installed we need to link against it
12246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12247 $as_echo_n "checking for dlopen in -ldl... " >&6; }
12248 if ${ac_cv_lib_dl_dlopen+:} false; then :
12249 $as_echo_n "(cached) " >&6
12250 else
12251 ac_check_lib_save_LIBS=$LIBS
12252 LIBS="-ldl $LIBS"
12253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12254 /* end confdefs.h. */
12255  
12256 /* Override any GCC internal prototype to avoid an error.
12257 Use char because int might match the return type of a GCC
12258 builtin and then its argument prototype would still apply. */
12259 #ifdef __cplusplus
12260 extern "C"
12261 #endif
12262 char dlopen ();
12263 int
12264 main ()
12265 {
12266 return dlopen ();
12267 ;
12268 return 0;
12269 }
12270 _ACEOF
12271 if ac_fn_c_try_link "$LINENO"; then :
12272 ac_cv_lib_dl_dlopen=yes
12273 else
12274 ac_cv_lib_dl_dlopen=no
12275 fi
12276 rm -f core conftest.err conftest.$ac_objext \
12277 conftest$ac_exeext conftest.$ac_ext
12278 LIBS=$ac_check_lib_save_LIBS
12279 fi
12280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12281 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12282 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
12283 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
12284 else
12285  
12286 lt_cv_dlopen=dyld
12287 lt_cv_dlopen_libs=
12288 lt_cv_dlopen_self=yes
12289  
12290 fi
12291  
12292 ;;
12293  
12294 tpf*)
12295 # Don't try to run any link tests for TPF. We know it's impossible
12296 # because TPF is a cross-compiler, and we know how we open DSOs.
12297 lt_cv_dlopen=dlopen
12298 lt_cv_dlopen_libs=
12299 lt_cv_dlopen_self=no
12300 ;;
12301  
12302 *)
12303 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
12304 if test "x$ac_cv_func_shl_load" = xyes; then :
12305 lt_cv_dlopen=shl_load
12306 else
12307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
12308 $as_echo_n "checking for shl_load in -ldld... " >&6; }
12309 if ${ac_cv_lib_dld_shl_load+:} false; then :
12310 $as_echo_n "(cached) " >&6
12311 else
12312 ac_check_lib_save_LIBS=$LIBS
12313 LIBS="-ldld $LIBS"
12314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12315 /* end confdefs.h. */
12316  
12317 /* Override any GCC internal prototype to avoid an error.
12318 Use char because int might match the return type of a GCC
12319 builtin and then its argument prototype would still apply. */
12320 #ifdef __cplusplus
12321 extern "C"
12322 #endif
12323 char shl_load ();
12324 int
12325 main ()
12326 {
12327 return shl_load ();
12328 ;
12329 return 0;
12330 }
12331 _ACEOF
12332 if ac_fn_c_try_link "$LINENO"; then :
12333 ac_cv_lib_dld_shl_load=yes
12334 else
12335 ac_cv_lib_dld_shl_load=no
12336 fi
12337 rm -f core conftest.err conftest.$ac_objext \
12338 conftest$ac_exeext conftest.$ac_ext
12339 LIBS=$ac_check_lib_save_LIBS
12340 fi
12341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
12342 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
12343 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
12344 lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
12345 else
12346 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
12347 if test "x$ac_cv_func_dlopen" = xyes; then :
12348 lt_cv_dlopen=dlopen
12349 else
12350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12351 $as_echo_n "checking for dlopen in -ldl... " >&6; }
12352 if ${ac_cv_lib_dl_dlopen+:} false; then :
12353 $as_echo_n "(cached) " >&6
12354 else
12355 ac_check_lib_save_LIBS=$LIBS
12356 LIBS="-ldl $LIBS"
12357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12358 /* end confdefs.h. */
12359  
12360 /* Override any GCC internal prototype to avoid an error.
12361 Use char because int might match the return type of a GCC
12362 builtin and then its argument prototype would still apply. */
12363 #ifdef __cplusplus
12364 extern "C"
12365 #endif
12366 char dlopen ();
12367 int
12368 main ()
12369 {
12370 return dlopen ();
12371 ;
12372 return 0;
12373 }
12374 _ACEOF
12375 if ac_fn_c_try_link "$LINENO"; then :
12376 ac_cv_lib_dl_dlopen=yes
12377 else
12378 ac_cv_lib_dl_dlopen=no
12379 fi
12380 rm -f core conftest.err conftest.$ac_objext \
12381 conftest$ac_exeext conftest.$ac_ext
12382 LIBS=$ac_check_lib_save_LIBS
12383 fi
12384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12385 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12386 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
12387 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
12388 else
12389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
12390 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
12391 if ${ac_cv_lib_svld_dlopen+:} false; then :
12392 $as_echo_n "(cached) " >&6
12393 else
12394 ac_check_lib_save_LIBS=$LIBS
12395 LIBS="-lsvld $LIBS"
12396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12397 /* end confdefs.h. */
12398  
12399 /* Override any GCC internal prototype to avoid an error.
12400 Use char because int might match the return type of a GCC
12401 builtin and then its argument prototype would still apply. */
12402 #ifdef __cplusplus
12403 extern "C"
12404 #endif
12405 char dlopen ();
12406 int
12407 main ()
12408 {
12409 return dlopen ();
12410 ;
12411 return 0;
12412 }
12413 _ACEOF
12414 if ac_fn_c_try_link "$LINENO"; then :
12415 ac_cv_lib_svld_dlopen=yes
12416 else
12417 ac_cv_lib_svld_dlopen=no
12418 fi
12419 rm -f core conftest.err conftest.$ac_objext \
12420 conftest$ac_exeext conftest.$ac_ext
12421 LIBS=$ac_check_lib_save_LIBS
12422 fi
12423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
12424 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
12425 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
12426 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
12427 else
12428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
12429 $as_echo_n "checking for dld_link in -ldld... " >&6; }
12430 if ${ac_cv_lib_dld_dld_link+:} false; then :
12431 $as_echo_n "(cached) " >&6
12432 else
12433 ac_check_lib_save_LIBS=$LIBS
12434 LIBS="-ldld $LIBS"
12435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12436 /* end confdefs.h. */
12437  
12438 /* Override any GCC internal prototype to avoid an error.
12439 Use char because int might match the return type of a GCC
12440 builtin and then its argument prototype would still apply. */
12441 #ifdef __cplusplus
12442 extern "C"
12443 #endif
12444 char dld_link ();
12445 int
12446 main ()
12447 {
12448 return dld_link ();
12449 ;
12450 return 0;
12451 }
12452 _ACEOF
12453 if ac_fn_c_try_link "$LINENO"; then :
12454 ac_cv_lib_dld_dld_link=yes
12455 else
12456 ac_cv_lib_dld_dld_link=no
12457 fi
12458 rm -f core conftest.err conftest.$ac_objext \
12459 conftest$ac_exeext conftest.$ac_ext
12460 LIBS=$ac_check_lib_save_LIBS
12461 fi
12462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
12463 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
12464 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
12465 lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
12466 fi
12467  
12468  
12469 fi
12470  
12471  
12472 fi
12473  
12474  
12475 fi
12476  
12477  
12478 fi
12479  
12480  
12481 fi
12482  
12483 ;;
12484 esac
12485  
12486 if test no = "$lt_cv_dlopen"; then
12487 enable_dlopen=no
12488 else
12489 enable_dlopen=yes
12490 fi
12491  
12492 case $lt_cv_dlopen in
12493 dlopen)
12494 save_CPPFLAGS=$CPPFLAGS
12495 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
12496  
12497 save_LDFLAGS=$LDFLAGS
12498 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
12499  
12500 save_LIBS=$LIBS
12501 LIBS="$lt_cv_dlopen_libs $LIBS"
12502  
12503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
12504 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
12505 if ${lt_cv_dlopen_self+:} false; then :
12506 $as_echo_n "(cached) " >&6
12507 else
12508 if test yes = "$cross_compiling"; then :
12509 lt_cv_dlopen_self=cross
12510 else
12511 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
12512 lt_status=$lt_dlunknown
12513 cat > conftest.$ac_ext <<_LT_EOF
12514 #line $LINENO "configure"
12515 #include "confdefs.h"
12516  
12517 #if HAVE_DLFCN_H
12518 #include <dlfcn.h>
12519 #endif
12520  
12521 #include <stdio.h>
12522  
12523 #ifdef RTLD_GLOBAL
12524 # define LT_DLGLOBAL RTLD_GLOBAL
12525 #else
12526 # ifdef DL_GLOBAL
12527 # define LT_DLGLOBAL DL_GLOBAL
12528 # else
12529 # define LT_DLGLOBAL 0
12530 # endif
12531 #endif
12532  
12533 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
12534 find out it does not work in some platform. */
12535 #ifndef LT_DLLAZY_OR_NOW
12536 # ifdef RTLD_LAZY
12537 # define LT_DLLAZY_OR_NOW RTLD_LAZY
12538 # else
12539 # ifdef DL_LAZY
12540 # define LT_DLLAZY_OR_NOW DL_LAZY
12541 # else
12542 # ifdef RTLD_NOW
12543 # define LT_DLLAZY_OR_NOW RTLD_NOW
12544 # else
12545 # ifdef DL_NOW
12546 # define LT_DLLAZY_OR_NOW DL_NOW
12547 # else
12548 # define LT_DLLAZY_OR_NOW 0
12549 # endif
12550 # endif
12551 # endif
12552 # endif
12553 #endif
12554  
12555 /* When -fvisibility=hidden is used, assume the code has been annotated
12556 correspondingly for the symbols needed. */
12557 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
12558 int fnord () __attribute__((visibility("default")));
12559 #endif
12560  
12561 int fnord () { return 42; }
12562 int main ()
12563 {
12564 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
12565 int status = $lt_dlunknown;
12566  
12567 if (self)
12568 {
12569 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
12570 else
12571 {
12572 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
12573 else puts (dlerror ());
12574 }
12575 /* dlclose (self); */
12576 }
12577 else
12578 puts (dlerror ());
12579  
12580 return status;
12581 }
12582 _LT_EOF
12583 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12584 (eval $ac_link) 2>&5
12585 ac_status=$?
12586 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12587 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
12588 (./conftest; exit; ) >&5 2>/dev/null
12589 lt_status=$?
12590 case x$lt_status in
12591 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
12592 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
12593 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
12594 esac
12595 else :
12596 # compilation failed
12597 lt_cv_dlopen_self=no
12598 fi
12599 fi
12600 rm -fr conftest*
12601  
12602  
12603 fi
12604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
12605 $as_echo "$lt_cv_dlopen_self" >&6; }
12606  
12607 if test yes = "$lt_cv_dlopen_self"; then
12608 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
12609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
12610 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
12611 if ${lt_cv_dlopen_self_static+:} false; then :
12612 $as_echo_n "(cached) " >&6
12613 else
12614 if test yes = "$cross_compiling"; then :
12615 lt_cv_dlopen_self_static=cross
12616 else
12617 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
12618 lt_status=$lt_dlunknown
12619 cat > conftest.$ac_ext <<_LT_EOF
12620 #line $LINENO "configure"
12621 #include "confdefs.h"
12622  
12623 #if HAVE_DLFCN_H
12624 #include <dlfcn.h>
12625 #endif
12626  
12627 #include <stdio.h>
12628  
12629 #ifdef RTLD_GLOBAL
12630 # define LT_DLGLOBAL RTLD_GLOBAL
12631 #else
12632 # ifdef DL_GLOBAL
12633 # define LT_DLGLOBAL DL_GLOBAL
12634 # else
12635 # define LT_DLGLOBAL 0
12636 # endif
12637 #endif
12638  
12639 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
12640 find out it does not work in some platform. */
12641 #ifndef LT_DLLAZY_OR_NOW
12642 # ifdef RTLD_LAZY
12643 # define LT_DLLAZY_OR_NOW RTLD_LAZY
12644 # else
12645 # ifdef DL_LAZY
12646 # define LT_DLLAZY_OR_NOW DL_LAZY
12647 # else
12648 # ifdef RTLD_NOW
12649 # define LT_DLLAZY_OR_NOW RTLD_NOW
12650 # else
12651 # ifdef DL_NOW
12652 # define LT_DLLAZY_OR_NOW DL_NOW
12653 # else
12654 # define LT_DLLAZY_OR_NOW 0
12655 # endif
12656 # endif
12657 # endif
12658 # endif
12659 #endif
12660  
12661 /* When -fvisibility=hidden is used, assume the code has been annotated
12662 correspondingly for the symbols needed. */
12663 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
12664 int fnord () __attribute__((visibility("default")));
12665 #endif
12666  
12667 int fnord () { return 42; }
12668 int main ()
12669 {
12670 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
12671 int status = $lt_dlunknown;
12672  
12673 if (self)
12674 {
12675 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
12676 else
12677 {
12678 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
12679 else puts (dlerror ());
12680 }
12681 /* dlclose (self); */
12682 }
12683 else
12684 puts (dlerror ());
12685  
12686 return status;
12687 }
12688 _LT_EOF
12689 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
12690 (eval $ac_link) 2>&5
12691 ac_status=$?
12692 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12693 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
12694 (./conftest; exit; ) >&5 2>/dev/null
12695 lt_status=$?
12696 case x$lt_status in
12697 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
12698 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
12699 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
12700 esac
12701 else :
12702 # compilation failed
12703 lt_cv_dlopen_self_static=no
12704 fi
12705 fi
12706 rm -fr conftest*
12707  
12708  
12709 fi
12710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
12711 $as_echo "$lt_cv_dlopen_self_static" >&6; }
12712 fi
12713  
12714 CPPFLAGS=$save_CPPFLAGS
12715 LDFLAGS=$save_LDFLAGS
12716 LIBS=$save_LIBS
12717 ;;
12718 esac
12719  
12720 case $lt_cv_dlopen_self in
12721 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
12722 *) enable_dlopen_self=unknown ;;
12723 esac
12724  
12725 case $lt_cv_dlopen_self_static in
12726 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
12727 *) enable_dlopen_self_static=unknown ;;
12728 esac
12729 fi
12730  
12731  
12732  
12733  
12734  
12735  
12736  
12737  
12738  
12739  
12740  
12741  
12742  
12743  
12744  
12745  
12746  
12747 striplib=
12748 old_striplib=
12749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
12750 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
12751 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
12752 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
12753 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
12754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12755 $as_echo "yes" >&6; }
12756 else
12757 # FIXME - insert some real tests, host_os isn't really good enough
12758 case $host_os in
12759 darwin*)
12760 if test -n "$STRIP"; then
12761 striplib="$STRIP -x"
12762 old_striplib="$STRIP -S"
12763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12764 $as_echo "yes" >&6; }
12765 else
12766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12767 $as_echo "no" >&6; }
12768 fi
12769 ;;
12770 *)
12771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12772 $as_echo "no" >&6; }
12773 ;;
12774 esac
12775 fi
12776  
12777  
12778  
12779  
12780  
12781  
12782  
12783  
12784  
12785  
12786  
12787  
12788 # Report what library types will actually be built
12789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
12790 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
12791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
12792 $as_echo "$can_build_shared" >&6; }
12793  
12794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
12795 $as_echo_n "checking whether to build shared libraries... " >&6; }
12796 test no = "$can_build_shared" && enable_shared=no
12797  
12798 # On AIX, shared libraries and static libraries use the same namespace, and
12799 # are all built from PIC.
12800 case $host_os in
12801 aix3*)
12802 test yes = "$enable_shared" && enable_static=no
12803 if test -n "$RANLIB"; then
12804 archive_cmds="$archive_cmds~\$RANLIB \$lib"
12805 postinstall_cmds='$RANLIB $lib'
12806 fi
12807 ;;
12808  
12809 aix[4-9]*)
12810 if test ia64 != "$host_cpu"; then
12811 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
12812 yes,aix,yes) ;; # shared object as lib.so file only
12813 yes,svr4,*) ;; # shared object as lib.so archive member only
12814 yes,*) enable_static=no ;; # shared object in lib.a archive as well
12815 esac
12816 fi
12817 ;;
12818 esac
12819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
12820 $as_echo "$enable_shared" >&6; }
12821  
12822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
12823 $as_echo_n "checking whether to build static libraries... " >&6; }
12824 # Make sure either enable_shared or enable_static is yes.
12825 test yes = "$enable_shared" || enable_static=yes
12826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
12827 $as_echo "$enable_static" >&6; }
12828  
12829  
12830  
12831  
12832 fi
12833 ac_ext=c
12834 ac_cpp='$CPP $CPPFLAGS'
12835 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12836 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12837 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12838  
12839 CC=$lt_save_CC
12840  
12841  
12842  
12843  
12844  
12845  
12846  
12847  
12848  
12849  
12850  
12851  
12852  
12853  
12854  
12855 ac_config_commands="$ac_config_commands libtool"
12856  
12857  
12858  
12859  
12860 # Only expand once:
12861  
12862  
12863  
12864  
12865  
12866  
12867 #
12868 # Checks for programs used in the main build process.
12869 #
12870 case $ac_cv_prog_cc_stdc in #(
12871 no) :
12872 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
12873 *) :
12874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
12875 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
12876 if ${ac_cv_prog_cc_c99+:} false; then :
12877 $as_echo_n "(cached) " >&6
12878 else
12879 ac_cv_prog_cc_c99=no
12880 ac_save_CC=$CC
12881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12882 /* end confdefs.h. */
12883 #include <stdarg.h>
12884 #include <stdbool.h>
12885 #include <stdlib.h>
12886 #include <wchar.h>
12887 #include <stdio.h>
12888  
12889 // Check varargs macros. These examples are taken from C99 6.10.3.5.
12890 #define debug(...) fprintf (stderr, __VA_ARGS__)
12891 #define showlist(...) puts (#__VA_ARGS__)
12892 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
12893 static void
12894 test_varargs_macros (void)
12895 {
12896 int x = 1234;
12897 int y = 5678;
12898 debug ("Flag");
12899 debug ("X = %d\n", x);
12900 showlist (The first, second, and third items.);
12901 report (x>y, "x is %d but y is %d", x, y);
12902 }
12903  
12904 // Check long long types.
12905 #define BIG64 18446744073709551615ull
12906 #define BIG32 4294967295ul
12907 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
12908 #if !BIG_OK
12909 your preprocessor is broken;
12910 #endif
12911 #if BIG_OK
12912 #else
12913 your preprocessor is broken;
12914 #endif
12915 static long long int bignum = -9223372036854775807LL;
12916 static unsigned long long int ubignum = BIG64;
12917  
12918 struct incomplete_array
12919 {
12920 int datasize;
12921 double data[];
12922 };
12923  
12924 struct named_init {
12925 int number;
12926 const wchar_t *name;
12927 double average;
12928 };
12929  
12930 typedef const char *ccp;
12931  
12932 static inline int
12933 test_restrict (ccp restrict text)
12934 {
12935 // See if C++-style comments work.
12936 // Iterate through items via the restricted pointer.
12937 // Also check for declarations in for loops.
12938 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
12939 continue;
12940 return 0;
12941 }
12942  
12943 // Check varargs and va_copy.
12944 static void
12945 test_varargs (const char *format, ...)
12946 {
12947 va_list args;
12948 va_start (args, format);
12949 va_list args_copy;
12950 va_copy (args_copy, args);
12951  
12952 const char *str;
12953 int number;
12954 float fnumber;
12955  
12956 while (*format)
12957 {
12958 switch (*format++)
12959 {
12960 case 's': // string
12961 str = va_arg (args_copy, const char *);
12962 break;
12963 case 'd': // int
12964 number = va_arg (args_copy, int);
12965 break;
12966 case 'f': // float
12967 fnumber = va_arg (args_copy, double);
12968 break;
12969 default:
12970 break;
12971 }
12972 }
12973 va_end (args_copy);
12974 va_end (args);
12975 }
12976  
12977 int
12978 main ()
12979 {
12980  
12981 // Check bool.
12982 _Bool success = false;
12983  
12984 // Check restrict.
12985 if (test_restrict ("String literal") == 0)
12986 success = true;
12987 char *restrict newvar = "Another string";
12988  
12989 // Check varargs.
12990 test_varargs ("s, d' f .", "string", 65, 34.234);
12991 test_varargs_macros ();
12992  
12993 // Check flexible array members.
12994 struct incomplete_array *ia =
12995 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
12996 ia->datasize = 10;
12997 for (int i = 0; i < ia->datasize; ++i)
12998 ia->data[i] = i * 1.234;
12999  
13000 // Check named initializers.
13001 struct named_init ni = {
13002 .number = 34,
13003 .name = L"Test wide string",
13004 .average = 543.34343,
13005 };
13006  
13007 ni.number = 58;
13008  
13009 int dynamic_array[ni.number];
13010 dynamic_array[ni.number - 1] = 543;
13011  
13012 // work around unused variable warnings
13013 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
13014 || dynamic_array[ni.number - 1] != 543);
13015  
13016 ;
13017 return 0;
13018 }
13019 _ACEOF
13020 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
13021 do
13022 CC="$ac_save_CC $ac_arg"
13023 if ac_fn_c_try_compile "$LINENO"; then :
13024 ac_cv_prog_cc_c99=$ac_arg
13025 fi
13026 rm -f core conftest.err conftest.$ac_objext
13027 test "x$ac_cv_prog_cc_c99" != "xno" && break
13028 done
13029 rm -f conftest.$ac_ext
13030 CC=$ac_save_CC
13031  
13032 fi
13033 # AC_CACHE_VAL
13034 case "x$ac_cv_prog_cc_c99" in
13035 x)
13036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
13037 $as_echo "none needed" >&6; } ;;
13038 xno)
13039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
13040 $as_echo "unsupported" >&6; } ;;
13041 *)
13042 CC="$CC $ac_cv_prog_cc_c99"
13043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
13044 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
13045 esac
13046 if test "x$ac_cv_prog_cc_c99" != xno; then :
13047 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
13048 else
13049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
13050 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
13051 if ${ac_cv_prog_cc_c89+:} false; then :
13052 $as_echo_n "(cached) " >&6
13053 else
13054 ac_cv_prog_cc_c89=no
13055 ac_save_CC=$CC
13056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13057 /* end confdefs.h. */
13058 #include <stdarg.h>
13059 #include <stdio.h>
13060 struct stat;
13061 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
13062 struct buf { int x; };
13063 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13064 static char *e (p, i)
13065 char **p;
13066 int i;
13067 {
13068 return p[i];
13069 }
13070 static char *f (char * (*g) (char **, int), char **p, ...)
13071 {
13072 char *s;
13073 va_list v;
13074 va_start (v,p);
13075 s = g (p, va_arg (v,int));
13076 va_end (v);
13077 return s;
13078 }
13079  
13080 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
13081 function prototypes and stuff, but not '\xHH' hex character constants.
13082 These don't provoke an error unfortunately, instead are silently treated
13083 as 'x'. The following induces an error, until -std is added to get
13084 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
13085 array size at least. It's necessary to write '\x00'==0 to get something
13086 that's true only with -std. */
13087 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
13088  
13089 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
13090 inside strings and character constants. */
13091 #define FOO(x) 'x'
13092 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
13093  
13094 int test (int i, double x);
13095 struct s1 {int (*f) (int a);};
13096 struct s2 {int (*f) (double a);};
13097 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13098 int argc;
13099 char **argv;
13100 int
13101 main ()
13102 {
13103 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
13104 ;
13105 return 0;
13106 }
13107 _ACEOF
13108 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
13109 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13110 do
13111 CC="$ac_save_CC $ac_arg"
13112 if ac_fn_c_try_compile "$LINENO"; then :
13113 ac_cv_prog_cc_c89=$ac_arg
13114 fi
13115 rm -f core conftest.err conftest.$ac_objext
13116 test "x$ac_cv_prog_cc_c89" != "xno" && break
13117 done
13118 rm -f conftest.$ac_ext
13119 CC=$ac_save_CC
13120  
13121 fi
13122 # AC_CACHE_VAL
13123 case "x$ac_cv_prog_cc_c89" in
13124 x)
13125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
13126 $as_echo "none needed" >&6; } ;;
13127 xno)
13128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
13129 $as_echo "unsupported" >&6; } ;;
13130 *)
13131 CC="$CC $ac_cv_prog_cc_c89"
13132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
13133 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
13134 esac
13135 if test "x$ac_cv_prog_cc_c89" != xno; then :
13136 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
13137 else
13138 ac_cv_prog_cc_stdc=no
13139 fi
13140  
13141 fi
13142 ;;
13143 esac
13144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
13145 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
13146 if ${ac_cv_prog_cc_stdc+:} false; then :
13147 $as_echo_n "(cached) " >&6
13148 fi
13149  
13150 case $ac_cv_prog_cc_stdc in #(
13151 no) :
13152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
13153 $as_echo "unsupported" >&6; } ;; #(
13154 '') :
13155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
13156 $as_echo "none needed" >&6; } ;; #(
13157 *) :
13158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
13159 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
13160 esac
13161  
13162 if test "$ac_cv_prog_cc_stdc" = "no"
13163 then
13164 as_fn_error $? "The C compiler does not support standard C" "$LINENO" 5
13165 fi
13166 ac_ext=c
13167 ac_cpp='$CPP $CPPFLAGS'
13168 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13169 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13170 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
13172 $as_echo_n "checking how to run the C preprocessor... " >&6; }
13173 # On Suns, sometimes $CPP names a directory.
13174 if test -n "$CPP" && test -d "$CPP"; then
13175 CPP=
13176 fi
13177 if test -z "$CPP"; then
13178 if ${ac_cv_prog_CPP+:} false; then :
13179 $as_echo_n "(cached) " >&6
13180 else
13181 # Double quotes because CPP needs to be expanded
13182 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
13183 do
13184 ac_preproc_ok=false
13185 for ac_c_preproc_warn_flag in '' yes
13186 do
13187 # Use a header file that comes with gcc, so configuring glibc
13188 # with a fresh cross-compiler works.
13189 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13190 # <limits.h> exists even on freestanding compilers.
13191 # On the NeXT, cc -E runs the code through the compiler's parser,
13192 # not just through cpp. "Syntax error" is here to catch this case.
13193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13194 /* end confdefs.h. */
13195 #ifdef __STDC__
13196 # include <limits.h>
13197 #else
13198 # include <assert.h>
13199 #endif
13200 Syntax error
13201 _ACEOF
13202 if ac_fn_c_try_cpp "$LINENO"; then :
13203  
13204 else
13205 # Broken: fails on valid input.
13206 continue
13207 fi
13208 rm -f conftest.err conftest.i conftest.$ac_ext
13209  
13210 # OK, works on sane cases. Now check whether nonexistent headers
13211 # can be detected and how.
13212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13213 /* end confdefs.h. */
13214 #include <ac_nonexistent.h>
13215 _ACEOF
13216 if ac_fn_c_try_cpp "$LINENO"; then :
13217 # Broken: success on invalid input.
13218 continue
13219 else
13220 # Passes both tests.
13221 ac_preproc_ok=:
13222 break
13223 fi
13224 rm -f conftest.err conftest.i conftest.$ac_ext
13225  
13226 done
13227 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13228 rm -f conftest.i conftest.err conftest.$ac_ext
13229 if $ac_preproc_ok; then :
13230 break
13231 fi
13232  
13233 done
13234 ac_cv_prog_CPP=$CPP
13235  
13236 fi
13237 CPP=$ac_cv_prog_CPP
13238 else
13239 ac_cv_prog_CPP=$CPP
13240 fi
13241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
13242 $as_echo "$CPP" >&6; }
13243 ac_preproc_ok=false
13244 for ac_c_preproc_warn_flag in '' yes
13245 do
13246 # Use a header file that comes with gcc, so configuring glibc
13247 # with a fresh cross-compiler works.
13248 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13249 # <limits.h> exists even on freestanding compilers.
13250 # On the NeXT, cc -E runs the code through the compiler's parser,
13251 # not just through cpp. "Syntax error" is here to catch this case.
13252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13253 /* end confdefs.h. */
13254 #ifdef __STDC__
13255 # include <limits.h>
13256 #else
13257 # include <assert.h>
13258 #endif
13259 Syntax error
13260 _ACEOF
13261 if ac_fn_c_try_cpp "$LINENO"; then :
13262  
13263 else
13264 # Broken: fails on valid input.
13265 continue
13266 fi
13267 rm -f conftest.err conftest.i conftest.$ac_ext
13268  
13269 # OK, works on sane cases. Now check whether nonexistent headers
13270 # can be detected and how.
13271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13272 /* end confdefs.h. */
13273 #include <ac_nonexistent.h>
13274 _ACEOF
13275 if ac_fn_c_try_cpp "$LINENO"; then :
13276 # Broken: success on invalid input.
13277 continue
13278 else
13279 # Passes both tests.
13280 ac_preproc_ok=:
13281 break
13282 fi
13283 rm -f conftest.err conftest.i conftest.$ac_ext
13284  
13285 done
13286 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13287 rm -f conftest.i conftest.err conftest.$ac_ext
13288 if $ac_preproc_ok; then :
13289  
13290 else
13291 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13292 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13293 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
13294 See \`config.log' for more details" "$LINENO" 5; }
13295 fi
13296  
13297 ac_ext=c
13298 ac_cpp='$CPP $CPPFLAGS'
13299 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13300 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13301 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13302  
13303  
13304 ac_ext=cpp
13305 ac_cpp='$CXXCPP $CPPFLAGS'
13306 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13307 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13308 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13309 if test -z "$CXX"; then
13310 if test -n "$CCC"; then
13311 CXX=$CCC
13312 else
13313 if test -n "$ac_tool_prefix"; then
13314 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
13315 do
13316 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
13317 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
13318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13319 $as_echo_n "checking for $ac_word... " >&6; }
13320 if ${ac_cv_prog_CXX+:} false; then :
13321 $as_echo_n "(cached) " >&6
13322 else
13323 if test -n "$CXX"; then
13324 ac_cv_prog_CXX="$CXX" # Let the user override the test.
13325 else
13326 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13327 for as_dir in $PATH
13328 do
13329 IFS=$as_save_IFS
13330 test -z "$as_dir" && as_dir=.
13331 for ac_exec_ext in '' $ac_executable_extensions; do
13332 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13333 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
13334 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13335 break 2
13336 fi
13337 done
13338 done
13339 IFS=$as_save_IFS
13340  
13341 fi
13342 fi
13343 CXX=$ac_cv_prog_CXX
13344 if test -n "$CXX"; then
13345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
13346 $as_echo "$CXX" >&6; }
13347 else
13348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13349 $as_echo "no" >&6; }
13350 fi
13351  
13352  
13353 test -n "$CXX" && break
13354 done
13355 fi
13356 if test -z "$CXX"; then
13357 ac_ct_CXX=$CXX
13358 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
13359 do
13360 # Extract the first word of "$ac_prog", so it can be a program name with args.
13361 set dummy $ac_prog; ac_word=$2
13362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13363 $as_echo_n "checking for $ac_word... " >&6; }
13364 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
13365 $as_echo_n "(cached) " >&6
13366 else
13367 if test -n "$ac_ct_CXX"; then
13368 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
13369 else
13370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13371 for as_dir in $PATH
13372 do
13373 IFS=$as_save_IFS
13374 test -z "$as_dir" && as_dir=.
13375 for ac_exec_ext in '' $ac_executable_extensions; do
13376 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13377 ac_cv_prog_ac_ct_CXX="$ac_prog"
13378 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13379 break 2
13380 fi
13381 done
13382 done
13383 IFS=$as_save_IFS
13384  
13385 fi
13386 fi
13387 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
13388 if test -n "$ac_ct_CXX"; then
13389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
13390 $as_echo "$ac_ct_CXX" >&6; }
13391 else
13392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13393 $as_echo "no" >&6; }
13394 fi
13395  
13396  
13397 test -n "$ac_ct_CXX" && break
13398 done
13399  
13400 if test "x$ac_ct_CXX" = x; then
13401 CXX="g++"
13402 else
13403 case $cross_compiling:$ac_tool_warned in
13404 yes:)
13405 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
13406 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
13407 ac_tool_warned=yes ;;
13408 esac
13409 CXX=$ac_ct_CXX
13410 fi
13411 fi
13412  
13413 fi
13414 fi
13415 # Provide some information about the compiler.
13416 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
13417 set X $ac_compile
13418 ac_compiler=$2
13419 for ac_option in --version -v -V -qversion; do
13420 { { ac_try="$ac_compiler $ac_option >&5"
13421 case "(($ac_try" in
13422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13423 *) ac_try_echo=$ac_try;;
13424 esac
13425 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
13426 $as_echo "$ac_try_echo"; } >&5
13427 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
13428 ac_status=$?
13429 if test -s conftest.err; then
13430 sed '10a\
13431 ... rest of stderr output deleted ...
13432 10q' conftest.err >conftest.er1
13433 cat conftest.er1 >&5
13434 fi
13435 rm -f conftest.er1 conftest.err
13436 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13437 test $ac_status = 0; }
13438 done
13439  
13440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
13441 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
13442 if ${ac_cv_cxx_compiler_gnu+:} false; then :
13443 $as_echo_n "(cached) " >&6
13444 else
13445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13446 /* end confdefs.h. */
13447  
13448 int
13449 main ()
13450 {
13451 #ifndef __GNUC__
13452 choke me
13453 #endif
13454  
13455 ;
13456 return 0;
13457 }
13458 _ACEOF
13459 if ac_fn_cxx_try_compile "$LINENO"; then :
13460 ac_compiler_gnu=yes
13461 else
13462 ac_compiler_gnu=no
13463 fi
13464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13465 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
13466  
13467 fi
13468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
13469 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
13470 if test $ac_compiler_gnu = yes; then
13471 GXX=yes
13472 else
13473 GXX=
13474 fi
13475 ac_test_CXXFLAGS=${CXXFLAGS+set}
13476 ac_save_CXXFLAGS=$CXXFLAGS
13477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
13478 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
13479 if ${ac_cv_prog_cxx_g+:} false; then :
13480 $as_echo_n "(cached) " >&6
13481 else
13482 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
13483 ac_cxx_werror_flag=yes
13484 ac_cv_prog_cxx_g=no
13485 CXXFLAGS="-g"
13486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13487 /* end confdefs.h. */
13488  
13489 int
13490 main ()
13491 {
13492  
13493 ;
13494 return 0;
13495 }
13496 _ACEOF
13497 if ac_fn_cxx_try_compile "$LINENO"; then :
13498 ac_cv_prog_cxx_g=yes
13499 else
13500 CXXFLAGS=""
13501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13502 /* end confdefs.h. */
13503  
13504 int
13505 main ()
13506 {
13507  
13508 ;
13509 return 0;
13510 }
13511 _ACEOF
13512 if ac_fn_cxx_try_compile "$LINENO"; then :
13513  
13514 else
13515 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
13516 CXXFLAGS="-g"
13517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13518 /* end confdefs.h. */
13519  
13520 int
13521 main ()
13522 {
13523  
13524 ;
13525 return 0;
13526 }
13527 _ACEOF
13528 if ac_fn_cxx_try_compile "$LINENO"; then :
13529 ac_cv_prog_cxx_g=yes
13530 fi
13531 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13532 fi
13533 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13534 fi
13535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13536 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
13537 fi
13538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
13539 $as_echo "$ac_cv_prog_cxx_g" >&6; }
13540 if test "$ac_test_CXXFLAGS" = set; then
13541 CXXFLAGS=$ac_save_CXXFLAGS
13542 elif test $ac_cv_prog_cxx_g = yes; then
13543 if test "$GXX" = yes; then
13544 CXXFLAGS="-g -O2"
13545 else
13546 CXXFLAGS="-g"
13547 fi
13548 else
13549 if test "$GXX" = yes; then
13550 CXXFLAGS="-O2"
13551 else
13552 CXXFLAGS=
13553 fi
13554 fi
13555 ac_ext=c
13556 ac_cpp='$CPP $CPPFLAGS'
13557 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13558 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13559 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13560  
13561 depcc="$CXX" am_compiler_list=
13562  
13563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
13564 $as_echo_n "checking dependency style of $depcc... " >&6; }
13565 if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
13566 $as_echo_n "(cached) " >&6
13567 else
13568 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
13569 # We make a subdir and do the tests there. Otherwise we can end up
13570 # making bogus files that we don't know about and never remove. For
13571 # instance it was reported that on HP-UX the gcc test will end up
13572 # making a dummy file named 'D' -- because '-MD' means "put the output
13573 # in D".
13574 rm -rf conftest.dir
13575 mkdir conftest.dir
13576 # Copy depcomp to subdir because otherwise we won't find it if we're
13577 # using a relative directory.
13578 cp "$am_depcomp" conftest.dir
13579 cd conftest.dir
13580 # We will build objects and dependencies in a subdirectory because
13581 # it helps to detect inapplicable dependency modes. For instance
13582 # both Tru64's cc and ICC support -MD to output dependencies as a
13583 # side effect of compilation, but ICC will put the dependencies in
13584 # the current directory while Tru64 will put them in the object
13585 # directory.
13586 mkdir sub
13587  
13588 am_cv_CXX_dependencies_compiler_type=none
13589 if test "$am_compiler_list" = ""; then
13590 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
13591 fi
13592 am__universal=false
13593 case " $depcc " in #(
13594 *\ -arch\ *\ -arch\ *) am__universal=true ;;
13595 esac
13596  
13597 for depmode in $am_compiler_list; do
13598 # Setup a source with many dependencies, because some compilers
13599 # like to wrap large dependency lists on column 80 (with \), and
13600 # we should not choose a depcomp mode which is confused by this.
13601 #
13602 # We need to recreate these files for each test, as the compiler may
13603 # overwrite some of them when testing with obscure command lines.
13604 # This happens at least with the AIX C compiler.
13605 : > sub/conftest.c
13606 for i in 1 2 3 4 5 6; do
13607 echo '#include "conftst'$i'.h"' >> sub/conftest.c
13608 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
13609 # Solaris 10 /bin/sh.
13610 echo '/* dummy */' > sub/conftst$i.h
13611 done
13612 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
13613  
13614 # We check with '-c' and '-o' for the sake of the "dashmstdout"
13615 # mode. It turns out that the SunPro C++ compiler does not properly
13616 # handle '-M -o', and we need to detect this. Also, some Intel
13617 # versions had trouble with output in subdirs.
13618 am__obj=sub/conftest.${OBJEXT-o}
13619 am__minus_obj="-o $am__obj"
13620 case $depmode in
13621 gcc)
13622 # This depmode causes a compiler race in universal mode.
13623 test "$am__universal" = false || continue
13624 ;;
13625 nosideeffect)
13626 # After this tag, mechanisms are not by side-effect, so they'll
13627 # only be used when explicitly requested.
13628 if test "x$enable_dependency_tracking" = xyes; then
13629 continue
13630 else
13631 break
13632 fi
13633 ;;
13634 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
13635 # This compiler won't grok '-c -o', but also, the minuso test has
13636 # not run yet. These depmodes are late enough in the game, and
13637 # so weak that their functioning should not be impacted.
13638 am__obj=conftest.${OBJEXT-o}
13639 am__minus_obj=
13640 ;;
13641 none) break ;;
13642 esac
13643 if depmode=$depmode \
13644 source=sub/conftest.c object=$am__obj \
13645 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
13646 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
13647 >/dev/null 2>conftest.err &&
13648 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
13649 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
13650 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
13651 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
13652 # icc doesn't choke on unknown options, it will just issue warnings
13653 # or remarks (even with -Werror). So we grep stderr for any message
13654 # that says an option was ignored or not supported.
13655 # When given -MP, icc 7.0 and 7.1 complain thusly:
13656 # icc: Command line warning: ignoring option '-M'; no argument required
13657 # The diagnosis changed in icc 8.0:
13658 # icc: Command line remark: option '-MP' not supported
13659 if (grep 'ignoring option' conftest.err ||
13660 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
13661 am_cv_CXX_dependencies_compiler_type=$depmode
13662 break
13663 fi
13664 fi
13665 done
13666  
13667 cd ..
13668 rm -rf conftest.dir
13669 else
13670 am_cv_CXX_dependencies_compiler_type=none
13671 fi
13672  
13673 fi
13674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
13675 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
13676 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
13677  
13678 if
13679 test "x$enable_dependency_tracking" != xno \
13680 && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
13681 am__fastdepCXX_TRUE=
13682 am__fastdepCXX_FALSE='#'
13683 else
13684 am__fastdepCXX_TRUE='#'
13685 am__fastdepCXX_FALSE=
13686 fi
13687  
13688  
13689  
13690  
13691 func_stripname_cnf ()
13692 {
13693 case $2 in
13694 .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;;
13695 *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;;
13696 esac
13697 } # func_stripname_cnf
13698  
13699 if test -n "$CXX" && ( test no != "$CXX" &&
13700 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
13701 (test g++ != "$CXX"))); then
13702 ac_ext=cpp
13703 ac_cpp='$CXXCPP $CPPFLAGS'
13704 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13705 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13706 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
13708 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
13709 if test -z "$CXXCPP"; then
13710 if ${ac_cv_prog_CXXCPP+:} false; then :
13711 $as_echo_n "(cached) " >&6
13712 else
13713 # Double quotes because CXXCPP needs to be expanded
13714 for CXXCPP in "$CXX -E" "/lib/cpp"
13715 do
13716 ac_preproc_ok=false
13717 for ac_cxx_preproc_warn_flag in '' yes
13718 do
13719 # Use a header file that comes with gcc, so configuring glibc
13720 # with a fresh cross-compiler works.
13721 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13722 # <limits.h> exists even on freestanding compilers.
13723 # On the NeXT, cc -E runs the code through the compiler's parser,
13724 # not just through cpp. "Syntax error" is here to catch this case.
13725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13726 /* end confdefs.h. */
13727 #ifdef __STDC__
13728 # include <limits.h>
13729 #else
13730 # include <assert.h>
13731 #endif
13732 Syntax error
13733 _ACEOF
13734 if ac_fn_cxx_try_cpp "$LINENO"; then :
13735  
13736 else
13737 # Broken: fails on valid input.
13738 continue
13739 fi
13740 rm -f conftest.err conftest.i conftest.$ac_ext
13741  
13742 # OK, works on sane cases. Now check whether nonexistent headers
13743 # can be detected and how.
13744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13745 /* end confdefs.h. */
13746 #include <ac_nonexistent.h>
13747 _ACEOF
13748 if ac_fn_cxx_try_cpp "$LINENO"; then :
13749 # Broken: success on invalid input.
13750 continue
13751 else
13752 # Passes both tests.
13753 ac_preproc_ok=:
13754 break
13755 fi
13756 rm -f conftest.err conftest.i conftest.$ac_ext
13757  
13758 done
13759 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13760 rm -f conftest.i conftest.err conftest.$ac_ext
13761 if $ac_preproc_ok; then :
13762 break
13763 fi
13764  
13765 done
13766 ac_cv_prog_CXXCPP=$CXXCPP
13767  
13768 fi
13769 CXXCPP=$ac_cv_prog_CXXCPP
13770 else
13771 ac_cv_prog_CXXCPP=$CXXCPP
13772 fi
13773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
13774 $as_echo "$CXXCPP" >&6; }
13775 ac_preproc_ok=false
13776 for ac_cxx_preproc_warn_flag in '' yes
13777 do
13778 # Use a header file that comes with gcc, so configuring glibc
13779 # with a fresh cross-compiler works.
13780 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13781 # <limits.h> exists even on freestanding compilers.
13782 # On the NeXT, cc -E runs the code through the compiler's parser,
13783 # not just through cpp. "Syntax error" is here to catch this case.
13784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13785 /* end confdefs.h. */
13786 #ifdef __STDC__
13787 # include <limits.h>
13788 #else
13789 # include <assert.h>
13790 #endif
13791 Syntax error
13792 _ACEOF
13793 if ac_fn_cxx_try_cpp "$LINENO"; then :
13794  
13795 else
13796 # Broken: fails on valid input.
13797 continue
13798 fi
13799 rm -f conftest.err conftest.i conftest.$ac_ext
13800  
13801 # OK, works on sane cases. Now check whether nonexistent headers
13802 # can be detected and how.
13803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13804 /* end confdefs.h. */
13805 #include <ac_nonexistent.h>
13806 _ACEOF
13807 if ac_fn_cxx_try_cpp "$LINENO"; then :
13808 # Broken: success on invalid input.
13809 continue
13810 else
13811 # Passes both tests.
13812 ac_preproc_ok=:
13813 break
13814 fi
13815 rm -f conftest.err conftest.i conftest.$ac_ext
13816  
13817 done
13818 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13819 rm -f conftest.i conftest.err conftest.$ac_ext
13820 if $ac_preproc_ok; then :
13821  
13822 else
13823 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13824 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13825 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
13826 See \`config.log' for more details" "$LINENO" 5; }
13827 fi
13828  
13829 ac_ext=c
13830 ac_cpp='$CPP $CPPFLAGS'
13831 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13832 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13833 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13834  
13835 else
13836 _lt_caught_CXX_error=yes
13837 fi
13838  
13839 ac_ext=cpp
13840 ac_cpp='$CXXCPP $CPPFLAGS'
13841 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13842 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13843 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13844  
13845 archive_cmds_need_lc_CXX=no
13846 allow_undefined_flag_CXX=
13847 always_export_symbols_CXX=no
13848 archive_expsym_cmds_CXX=
13849 compiler_needs_object_CXX=no
13850 export_dynamic_flag_spec_CXX=
13851 hardcode_direct_CXX=no
13852 hardcode_direct_absolute_CXX=no
13853 hardcode_libdir_flag_spec_CXX=
13854 hardcode_libdir_separator_CXX=
13855 hardcode_minus_L_CXX=no
13856 hardcode_shlibpath_var_CXX=unsupported
13857 hardcode_automatic_CXX=no
13858 inherit_rpath_CXX=no
13859 module_cmds_CXX=
13860 module_expsym_cmds_CXX=
13861 link_all_deplibs_CXX=unknown
13862 old_archive_cmds_CXX=$old_archive_cmds
13863 reload_flag_CXX=$reload_flag
13864 reload_cmds_CXX=$reload_cmds
13865 no_undefined_flag_CXX=
13866 whole_archive_flag_spec_CXX=
13867 enable_shared_with_static_runtimes_CXX=no
13868  
13869 # Source file extension for C++ test sources.
13870 ac_ext=cpp
13871  
13872 # Object file extension for compiled C++ test sources.
13873 objext=o
13874 objext_CXX=$objext
13875  
13876 # No sense in running all these tests if we already determined that
13877 # the CXX compiler isn't working. Some variables (like enable_shared)
13878 # are currently assumed to apply to all compilers on this platform,
13879 # and will be corrupted by setting them based on a non-working compiler.
13880 if test yes != "$_lt_caught_CXX_error"; then
13881 # Code to be used in simple compile tests
13882 lt_simple_compile_test_code="int some_variable = 0;"
13883  
13884 # Code to be used in simple link tests
13885 lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
13886  
13887 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
13888  
13889  
13890  
13891  
13892  
13893  
13894 # If no C compiler was specified, use CC.
13895 LTCC=${LTCC-"$CC"}
13896  
13897 # If no C compiler flags were specified, use CFLAGS.
13898 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
13899  
13900 # Allow CC to be a program name with arguments.
13901 compiler=$CC
13902  
13903  
13904 # save warnings/boilerplate of simple test code
13905 ac_outfile=conftest.$ac_objext
13906 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
13907 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
13908 _lt_compiler_boilerplate=`cat conftest.err`
13909 $RM conftest*
13910  
13911 ac_outfile=conftest.$ac_objext
13912 echo "$lt_simple_link_test_code" >conftest.$ac_ext
13913 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
13914 _lt_linker_boilerplate=`cat conftest.err`
13915 $RM -r conftest*
13916  
13917  
13918 # Allow CC to be a program name with arguments.
13919 lt_save_CC=$CC
13920 lt_save_CFLAGS=$CFLAGS
13921 lt_save_LD=$LD
13922 lt_save_GCC=$GCC
13923 GCC=$GXX
13924 lt_save_with_gnu_ld=$with_gnu_ld
13925 lt_save_path_LD=$lt_cv_path_LD
13926 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
13927 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
13928 else
13929 $as_unset lt_cv_prog_gnu_ld
13930 fi
13931 if test -n "${lt_cv_path_LDCXX+set}"; then
13932 lt_cv_path_LD=$lt_cv_path_LDCXX
13933 else
13934 $as_unset lt_cv_path_LD
13935 fi
13936 test -z "${LDCXX+set}" || LD=$LDCXX
13937 CC=${CXX-"c++"}
13938 CFLAGS=$CXXFLAGS
13939 compiler=$CC
13940 compiler_CXX=$CC
13941 func_cc_basename $compiler
13942 cc_basename=$func_cc_basename_result
13943  
13944  
13945 if test -n "$compiler"; then
13946 # We don't want -fno-exception when compiling C++ code, so set the
13947 # no_builtin_flag separately
13948 if test yes = "$GXX"; then
13949 lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
13950 else
13951 lt_prog_compiler_no_builtin_flag_CXX=
13952 fi
13953  
13954 if test yes = "$GXX"; then
13955 # Set up default GNU C++ configuration
13956  
13957  
13958  
13959 # Check whether --with-gnu-ld was given.
13960 if test "${with_gnu_ld+set}" = set; then :
13961 withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
13962 else
13963 with_gnu_ld=no
13964 fi
13965  
13966 ac_prog=ld
13967 if test yes = "$GCC"; then
13968 # Check if gcc -print-prog-name=ld gives a path.
13969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
13970 $as_echo_n "checking for ld used by $CC... " >&6; }
13971 case $host in
13972 *-*-mingw*)
13973 # gcc leaves a trailing carriage return, which upsets mingw
13974 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
13975 *)
13976 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
13977 esac
13978 case $ac_prog in
13979 # Accept absolute paths.
13980 [\\/]* | ?:[\\/]*)
13981 re_direlt='/[^/][^/]*/\.\./'
13982 # Canonicalize the pathname of ld
13983 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
13984 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
13985 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
13986 done
13987 test -z "$LD" && LD=$ac_prog
13988 ;;
13989 "")
13990 # If it fails, then pretend we aren't using GCC.
13991 ac_prog=ld
13992 ;;
13993 *)
13994 # If it is relative, then search for the first ld in PATH.
13995 with_gnu_ld=unknown
13996 ;;
13997 esac
13998 elif test yes = "$with_gnu_ld"; then
13999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
14000 $as_echo_n "checking for GNU ld... " >&6; }
14001 else
14002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
14003 $as_echo_n "checking for non-GNU ld... " >&6; }
14004 fi
14005 if ${lt_cv_path_LD+:} false; then :
14006 $as_echo_n "(cached) " >&6
14007 else
14008 if test -z "$LD"; then
14009 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
14010 for ac_dir in $PATH; do
14011 IFS=$lt_save_ifs
14012 test -z "$ac_dir" && ac_dir=.
14013 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
14014 lt_cv_path_LD=$ac_dir/$ac_prog
14015 # Check to see if the program is GNU ld. I'd rather use --version,
14016 # but apparently some variants of GNU ld only accept -v.
14017 # Break only if it was the GNU/non-GNU ld that we prefer.
14018 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
14019 *GNU* | *'with BFD'*)
14020 test no != "$with_gnu_ld" && break
14021 ;;
14022 *)
14023 test yes != "$with_gnu_ld" && break
14024 ;;
14025 esac
14026 fi
14027 done
14028 IFS=$lt_save_ifs
14029 else
14030 lt_cv_path_LD=$LD # Let the user override the test with a path.
14031 fi
14032 fi
14033  
14034 LD=$lt_cv_path_LD
14035 if test -n "$LD"; then
14036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
14037 $as_echo "$LD" >&6; }
14038 else
14039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14040 $as_echo "no" >&6; }
14041 fi
14042 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
14043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
14044 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
14045 if ${lt_cv_prog_gnu_ld+:} false; then :
14046 $as_echo_n "(cached) " >&6
14047 else
14048 # I'd rather use --version here, but apparently some GNU lds only accept -v.
14049 case `$LD -v 2>&1 </dev/null` in
14050 *GNU* | *'with BFD'*)
14051 lt_cv_prog_gnu_ld=yes
14052 ;;
14053 *)
14054 lt_cv_prog_gnu_ld=no
14055 ;;
14056 esac
14057 fi
14058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
14059 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
14060 with_gnu_ld=$lt_cv_prog_gnu_ld
14061  
14062  
14063  
14064  
14065  
14066  
14067  
14068 # Check if GNU C++ uses GNU ld as the underlying linker, since the
14069 # archiving commands below assume that GNU ld is being used.
14070 if test yes = "$with_gnu_ld"; then
14071 archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
14072 archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
14073  
14074 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
14075 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
14076  
14077 # If archive_cmds runs LD, not CC, wlarc should be empty
14078 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
14079 # investigate it a little bit more. (MM)
14080 wlarc='$wl'
14081  
14082 # ancient GNU ld didn't support --whole-archive et. al.
14083 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
14084 $GREP 'no-whole-archive' > /dev/null; then
14085 whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
14086 else
14087 whole_archive_flag_spec_CXX=
14088 fi
14089 else
14090 with_gnu_ld=no
14091 wlarc=
14092  
14093 # A generic and very simple default shared library creation
14094 # command for GNU C++ for the case where it uses the native
14095 # linker, instead of GNU ld. If possible, this setting should
14096 # overridden to take advantage of the native linker features on
14097 # the platform it is being used on.
14098 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
14099 fi
14100  
14101 # Commands to make compiler produce verbose output that lists
14102 # what "hidden" libraries, object files and flags are used when
14103 # linking a shared library.
14104 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
14105  
14106 else
14107 GXX=no
14108 with_gnu_ld=no
14109 wlarc=
14110 fi
14111  
14112 # PORTME: fill in a description of your system's C++ link characteristics
14113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
14114 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
14115 ld_shlibs_CXX=yes
14116 case $host_os in
14117 aix3*)
14118 # FIXME: insert proper C++ library support
14119 ld_shlibs_CXX=no
14120 ;;
14121 aix[4-9]*)
14122 if test ia64 = "$host_cpu"; then
14123 # On IA64, the linker does run time linking by default, so we don't
14124 # have to do anything special.
14125 aix_use_runtimelinking=no
14126 exp_sym_flag='-Bexport'
14127 no_entry_flag=
14128 else
14129 aix_use_runtimelinking=no
14130  
14131 # Test if we are trying to use run time linking or normal
14132 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
14133 # have runtime linking enabled, and use it for executables.
14134 # For shared libraries, we enable/disable runtime linking
14135 # depending on the kind of the shared library created -
14136 # when "with_aix_soname,aix_use_runtimelinking" is:
14137 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
14138 # "aix,yes" lib.so shared, rtl:yes, for executables
14139 # lib.a static archive
14140 # "both,no" lib.so.V(shr.o) shared, rtl:yes
14141 # lib.a(lib.so.V) shared, rtl:no, for executables
14142 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
14143 # lib.a(lib.so.V) shared, rtl:no
14144 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
14145 # lib.a static archive
14146 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
14147 for ld_flag in $LDFLAGS; do
14148 case $ld_flag in
14149 *-brtl*)
14150 aix_use_runtimelinking=yes
14151 break
14152 ;;
14153 esac
14154 done
14155 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
14156 # With aix-soname=svr4, we create the lib.so.V shared archives only,
14157 # so we don't have lib.a shared libs to link our executables.
14158 # We have to force runtime linking in this case.
14159 aix_use_runtimelinking=yes
14160 LDFLAGS="$LDFLAGS -Wl,-brtl"
14161 fi
14162 ;;
14163 esac
14164  
14165 exp_sym_flag='-bexport'
14166 no_entry_flag='-bnoentry'
14167 fi
14168  
14169 # When large executables or shared objects are built, AIX ld can
14170 # have problems creating the table of contents. If linking a library
14171 # or program results in "error TOC overflow" add -mminimal-toc to
14172 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
14173 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
14174  
14175 archive_cmds_CXX=''
14176 hardcode_direct_CXX=yes
14177 hardcode_direct_absolute_CXX=yes
14178 hardcode_libdir_separator_CXX=':'
14179 link_all_deplibs_CXX=yes
14180 file_list_spec_CXX='$wl-f,'
14181 case $with_aix_soname,$aix_use_runtimelinking in
14182 aix,*) ;; # no import file
14183 svr4,* | *,yes) # use import file
14184 # The Import File defines what to hardcode.
14185 hardcode_direct_CXX=no
14186 hardcode_direct_absolute_CXX=no
14187 ;;
14188 esac
14189  
14190 if test yes = "$GXX"; then
14191 case $host_os in aix4.[012]|aix4.[012].*)
14192 # We only want to do this on AIX 4.2 and lower, the check
14193 # below for broken collect2 doesn't work under 4.3+
14194 collect2name=`$CC -print-prog-name=collect2`
14195 if test -f "$collect2name" &&
14196 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
14197 then
14198 # We have reworked collect2
14199 :
14200 else
14201 # We have old collect2
14202 hardcode_direct_CXX=unsupported
14203 # It fails to find uninstalled libraries when the uninstalled
14204 # path is not listed in the libpath. Setting hardcode_minus_L
14205 # to unsupported forces relinking
14206 hardcode_minus_L_CXX=yes
14207 hardcode_libdir_flag_spec_CXX='-L$libdir'
14208 hardcode_libdir_separator_CXX=
14209 fi
14210 esac
14211 shared_flag='-shared'
14212 if test yes = "$aix_use_runtimelinking"; then
14213 shared_flag=$shared_flag' $wl-G'
14214 fi
14215 # Need to ensure runtime linking is disabled for the traditional
14216 # shared library, or the linker may eventually find shared libraries
14217 # /with/ Import File - we do not want to mix them.
14218 shared_flag_aix='-shared'
14219 shared_flag_svr4='-shared $wl-G'
14220 else
14221 # not using gcc
14222 if test ia64 = "$host_cpu"; then
14223 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
14224 # chokes on -Wl,-G. The following line is correct:
14225 shared_flag='-G'
14226 else
14227 if test yes = "$aix_use_runtimelinking"; then
14228 shared_flag='$wl-G'
14229 else
14230 shared_flag='$wl-bM:SRE'
14231 fi
14232 shared_flag_aix='$wl-bM:SRE'
14233 shared_flag_svr4='$wl-G'
14234 fi
14235 fi
14236  
14237 export_dynamic_flag_spec_CXX='$wl-bexpall'
14238 # It seems that -bexpall does not export symbols beginning with
14239 # underscore (_), so it is better to generate a list of symbols to
14240 # export.
14241 always_export_symbols_CXX=yes
14242 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
14243 # Warning - without using the other runtime loading flags (-brtl),
14244 # -berok will link without error, but may produce a broken library.
14245 # The "-G" linker flag allows undefined symbols.
14246 no_undefined_flag_CXX='-bernotok'
14247 # Determine the default libpath from the value encoded in an empty
14248 # executable.
14249 if test set = "${lt_cv_aix_libpath+set}"; then
14250 aix_libpath=$lt_cv_aix_libpath
14251 else
14252 if ${lt_cv_aix_libpath__CXX+:} false; then :
14253 $as_echo_n "(cached) " >&6
14254 else
14255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14256 /* end confdefs.h. */
14257  
14258 int
14259 main ()
14260 {
14261  
14262 ;
14263 return 0;
14264 }
14265 _ACEOF
14266 if ac_fn_cxx_try_link "$LINENO"; then :
14267  
14268 lt_aix_libpath_sed='
14269 /Import File Strings/,/^$/ {
14270 /^0/ {
14271 s/^0 *\([^ ]*\) *$/\1/
14272 p
14273 }
14274 }'
14275 lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
14276 # Check for a 64-bit object if we didn't find anything.
14277 if test -z "$lt_cv_aix_libpath__CXX"; then
14278 lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
14279 fi
14280 fi
14281 rm -f core conftest.err conftest.$ac_objext \
14282 conftest$ac_exeext conftest.$ac_ext
14283 if test -z "$lt_cv_aix_libpath__CXX"; then
14284 lt_cv_aix_libpath__CXX=/usr/lib:/lib
14285 fi
14286  
14287 fi
14288  
14289 aix_libpath=$lt_cv_aix_libpath__CXX
14290 fi
14291  
14292 hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
14293  
14294 archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
14295 else
14296 if test ia64 = "$host_cpu"; then
14297 hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib'
14298 allow_undefined_flag_CXX="-z nodefs"
14299 archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
14300 else
14301 # Determine the default libpath from the value encoded in an
14302 # empty executable.
14303 if test set = "${lt_cv_aix_libpath+set}"; then
14304 aix_libpath=$lt_cv_aix_libpath
14305 else
14306 if ${lt_cv_aix_libpath__CXX+:} false; then :
14307 $as_echo_n "(cached) " >&6
14308 else
14309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14310 /* end confdefs.h. */
14311  
14312 int
14313 main ()
14314 {
14315  
14316 ;
14317 return 0;
14318 }
14319 _ACEOF
14320 if ac_fn_cxx_try_link "$LINENO"; then :
14321  
14322 lt_aix_libpath_sed='
14323 /Import File Strings/,/^$/ {
14324 /^0/ {
14325 s/^0 *\([^ ]*\) *$/\1/
14326 p
14327 }
14328 }'
14329 lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
14330 # Check for a 64-bit object if we didn't find anything.
14331 if test -z "$lt_cv_aix_libpath__CXX"; then
14332 lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
14333 fi
14334 fi
14335 rm -f core conftest.err conftest.$ac_objext \
14336 conftest$ac_exeext conftest.$ac_ext
14337 if test -z "$lt_cv_aix_libpath__CXX"; then
14338 lt_cv_aix_libpath__CXX=/usr/lib:/lib
14339 fi
14340  
14341 fi
14342  
14343 aix_libpath=$lt_cv_aix_libpath__CXX
14344 fi
14345  
14346 hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
14347 # Warning - without using the other run time loading flags,
14348 # -berok will link without error, but may produce a broken library.
14349 no_undefined_flag_CXX=' $wl-bernotok'
14350 allow_undefined_flag_CXX=' $wl-berok'
14351 if test yes = "$with_gnu_ld"; then
14352 # We only use this code for GNU lds that support --whole-archive.
14353 whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
14354 else
14355 # Exported symbols can be pulled into shared objects from archives
14356 whole_archive_flag_spec_CXX='$convenience'
14357 fi
14358 archive_cmds_need_lc_CXX=yes
14359 archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
14360 # -brtl affects multiple linker settings, -berok does not and is overridden later
14361 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
14362 if test svr4 != "$with_aix_soname"; then
14363 # This is similar to how AIX traditionally builds its shared
14364 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
14365 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
14366 fi
14367 if test aix != "$with_aix_soname"; then
14368 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
14369 else
14370 # used by -dlpreopen to get the symbols
14371 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
14372 fi
14373 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d'
14374 fi
14375 fi
14376 ;;
14377  
14378 beos*)
14379 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
14380 allow_undefined_flag_CXX=unsupported
14381 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
14382 # support --undefined. This deserves some investigation. FIXME
14383 archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
14384 else
14385 ld_shlibs_CXX=no
14386 fi
14387 ;;
14388  
14389 chorus*)
14390 case $cc_basename in
14391 *)
14392 # FIXME: insert proper C++ library support
14393 ld_shlibs_CXX=no
14394 ;;
14395 esac
14396 ;;
14397  
14398 cygwin* | mingw* | pw32* | cegcc*)
14399 case $GXX,$cc_basename in
14400 ,cl* | no,cl*)
14401 # Native MSVC
14402 # hardcode_libdir_flag_spec is actually meaningless, as there is
14403 # no search path for DLLs.
14404 hardcode_libdir_flag_spec_CXX=' '
14405 allow_undefined_flag_CXX=unsupported
14406 always_export_symbols_CXX=yes
14407 file_list_spec_CXX='@'
14408 # Tell ltmain to make .lib files, not .a files.
14409 libext=lib
14410 # Tell ltmain to make .dll files, not .so files.
14411 shrext_cmds=.dll
14412 # FIXME: Setting linknames here is a bad hack.
14413 archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
14414 archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
14415 cp "$export_symbols" "$output_objdir/$soname.def";
14416 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
14417 else
14418 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
14419 fi~
14420 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
14421 linknames='
14422 # The linker will not automatically build a static lib if we build a DLL.
14423 # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
14424 enable_shared_with_static_runtimes_CXX=yes
14425 # Don't use ranlib
14426 old_postinstall_cmds_CXX='chmod 644 $oldlib'
14427 postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
14428 lt_tool_outputfile="@TOOL_OUTPUT@"~
14429 case $lt_outputfile in
14430 *.exe|*.EXE) ;;
14431 *)
14432 lt_outputfile=$lt_outputfile.exe
14433 lt_tool_outputfile=$lt_tool_outputfile.exe
14434 ;;
14435 esac~
14436 func_to_tool_file "$lt_outputfile"~
14437 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
14438 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
14439 $RM "$lt_outputfile.manifest";
14440 fi'
14441 ;;
14442 *)
14443 # g++
14444 # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
14445 # as there is no search path for DLLs.
14446 hardcode_libdir_flag_spec_CXX='-L$libdir'
14447 export_dynamic_flag_spec_CXX='$wl--export-all-symbols'
14448 allow_undefined_flag_CXX=unsupported
14449 always_export_symbols_CXX=no
14450 enable_shared_with_static_runtimes_CXX=yes
14451  
14452 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
14453 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
14454 # If the export-symbols file already is a .def file, use it as
14455 # is; otherwise, prepend EXPORTS...
14456 archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
14457 cp $export_symbols $output_objdir/$soname.def;
14458 else
14459 echo EXPORTS > $output_objdir/$soname.def;
14460 cat $export_symbols >> $output_objdir/$soname.def;
14461 fi~
14462 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
14463 else
14464 ld_shlibs_CXX=no
14465 fi
14466 ;;
14467 esac
14468 ;;
14469 darwin* | rhapsody*)
14470  
14471  
14472 archive_cmds_need_lc_CXX=no
14473 hardcode_direct_CXX=no
14474 hardcode_automatic_CXX=yes
14475 hardcode_shlibpath_var_CXX=unsupported
14476 if test yes = "$lt_cv_ld_force_load"; then
14477 whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
14478  
14479 else
14480 whole_archive_flag_spec_CXX=''
14481 fi
14482 link_all_deplibs_CXX=yes
14483 allow_undefined_flag_CXX=$_lt_dar_allow_undefined
14484 case $cc_basename in
14485 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
14486 *) _lt_dar_can_shared=$GCC ;;
14487 esac
14488 if test yes = "$_lt_dar_can_shared"; then
14489 output_verbose_link_cmd=func_echo_all
14490 archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
14491 module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
14492 archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
14493 module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
14494 if test yes != "$lt_cv_apple_cc_single_mod"; then
14495 archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
14496 archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
14497 fi
14498  
14499 else
14500 ld_shlibs_CXX=no
14501 fi
14502  
14503 ;;
14504  
14505 os2*)
14506 hardcode_libdir_flag_spec_CXX='-L$libdir'
14507 hardcode_minus_L_CXX=yes
14508 allow_undefined_flag_CXX=unsupported
14509 shrext_cmds=.dll
14510 archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
14511 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
14512 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
14513 $ECHO EXPORTS >> $output_objdir/$libname.def~
14514 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
14515 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
14516 emximp -o $lib $output_objdir/$libname.def'
14517 archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
14518 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
14519 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
14520 $ECHO EXPORTS >> $output_objdir/$libname.def~
14521 prefix_cmds="$SED"~
14522 if test EXPORTS = "`$SED 1q $export_symbols`"; then
14523 prefix_cmds="$prefix_cmds -e 1d";
14524 fi~
14525 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
14526 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
14527 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
14528 emximp -o $lib $output_objdir/$libname.def'
14529 old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
14530 enable_shared_with_static_runtimes_CXX=yes
14531 ;;
14532  
14533 dgux*)
14534 case $cc_basename in
14535 ec++*)
14536 # FIXME: insert proper C++ library support
14537 ld_shlibs_CXX=no
14538 ;;
14539 ghcx*)
14540 # Green Hills C++ Compiler
14541 # FIXME: insert proper C++ library support
14542 ld_shlibs_CXX=no
14543 ;;
14544 *)
14545 # FIXME: insert proper C++ library support
14546 ld_shlibs_CXX=no
14547 ;;
14548 esac
14549 ;;
14550  
14551 freebsd2.*)
14552 # C++ shared libraries reported to be fairly broken before
14553 # switch to ELF
14554 ld_shlibs_CXX=no
14555 ;;
14556  
14557 freebsd-elf*)
14558 archive_cmds_need_lc_CXX=no
14559 ;;
14560  
14561 freebsd* | dragonfly*)
14562 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
14563 # conventions
14564 ld_shlibs_CXX=yes
14565 ;;
14566  
14567 haiku*)
14568 archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
14569 link_all_deplibs_CXX=yes
14570 ;;
14571  
14572 hpux9*)
14573 hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
14574 hardcode_libdir_separator_CXX=:
14575 export_dynamic_flag_spec_CXX='$wl-E'
14576 hardcode_direct_CXX=yes
14577 hardcode_minus_L_CXX=yes # Not in the search PATH,
14578 # but as the default
14579 # location of the library.
14580  
14581 case $cc_basename in
14582 CC*)
14583 # FIXME: insert proper C++ library support
14584 ld_shlibs_CXX=no
14585 ;;
14586 aCC*)
14587 archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
14588 # Commands to make compiler produce verbose output that lists
14589 # what "hidden" libraries, object files and flags are used when
14590 # linking a shared library.
14591 #
14592 # There doesn't appear to be a way to prevent this compiler from
14593 # explicitly linking system object files so we need to strip them
14594 # from the output so that they don't get included in the library
14595 # dependencies.
14596 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
14597 ;;
14598 *)
14599 if test yes = "$GXX"; then
14600 archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
14601 else
14602 # FIXME: insert proper C++ library support
14603 ld_shlibs_CXX=no
14604 fi
14605 ;;
14606 esac
14607 ;;
14608  
14609 hpux10*|hpux11*)
14610 if test no = "$with_gnu_ld"; then
14611 hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
14612 hardcode_libdir_separator_CXX=:
14613  
14614 case $host_cpu in
14615 hppa*64*|ia64*)
14616 ;;
14617 *)
14618 export_dynamic_flag_spec_CXX='$wl-E'
14619 ;;
14620 esac
14621 fi
14622 case $host_cpu in
14623 hppa*64*|ia64*)
14624 hardcode_direct_CXX=no
14625 hardcode_shlibpath_var_CXX=no
14626 ;;
14627 *)
14628 hardcode_direct_CXX=yes
14629 hardcode_direct_absolute_CXX=yes
14630 hardcode_minus_L_CXX=yes # Not in the search PATH,
14631 # but as the default
14632 # location of the library.
14633 ;;
14634 esac
14635  
14636 case $cc_basename in
14637 CC*)
14638 # FIXME: insert proper C++ library support
14639 ld_shlibs_CXX=no
14640 ;;
14641 aCC*)
14642 case $host_cpu in
14643 hppa*64*)
14644 archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
14645 ;;
14646 ia64*)
14647 archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
14648 ;;
14649 *)
14650 archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
14651 ;;
14652 esac
14653 # Commands to make compiler produce verbose output that lists
14654 # what "hidden" libraries, object files and flags are used when
14655 # linking a shared library.
14656 #
14657 # There doesn't appear to be a way to prevent this compiler from
14658 # explicitly linking system object files so we need to strip them
14659 # from the output so that they don't get included in the library
14660 # dependencies.
14661 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
14662 ;;
14663 *)
14664 if test yes = "$GXX"; then
14665 if test no = "$with_gnu_ld"; then
14666 case $host_cpu in
14667 hppa*64*)
14668 archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
14669 ;;
14670 ia64*)
14671 archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
14672 ;;
14673 *)
14674 archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
14675 ;;
14676 esac
14677 fi
14678 else
14679 # FIXME: insert proper C++ library support
14680 ld_shlibs_CXX=no
14681 fi
14682 ;;
14683 esac
14684 ;;
14685  
14686 interix[3-9]*)
14687 hardcode_direct_CXX=no
14688 hardcode_shlibpath_var_CXX=no
14689 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
14690 export_dynamic_flag_spec_CXX='$wl-E'
14691 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
14692 # Instead, shared libraries are loaded at an image base (0x10000000 by
14693 # default) and relocated if they conflict, which is a slow very memory
14694 # consuming and fragmenting process. To avoid this, we pick a random,
14695 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
14696 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
14697 archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
14698 archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
14699 ;;
14700 irix5* | irix6*)
14701 case $cc_basename in
14702 CC*)
14703 # SGI C++
14704 archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
14705  
14706 # Archives containing C++ object files must be created using
14707 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
14708 # necessary to make sure instantiated templates are included
14709 # in the archive.
14710 old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
14711 ;;
14712 *)
14713 if test yes = "$GXX"; then
14714 if test no = "$with_gnu_ld"; then
14715 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
14716 else
14717 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
14718 fi
14719 fi
14720 link_all_deplibs_CXX=yes
14721 ;;
14722 esac
14723 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
14724 hardcode_libdir_separator_CXX=:
14725 inherit_rpath_CXX=yes
14726 ;;
14727  
14728 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
14729 case $cc_basename in
14730 KCC*)
14731 # Kuck and Associates, Inc. (KAI) C++ Compiler
14732  
14733 # KCC will only create a shared library if the output file
14734 # ends with ".so" (or ".sl" for HP-UX), so rename the library
14735 # to its proper name (with version) after linking.
14736 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
14737 archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
14738 # Commands to make compiler produce verbose output that lists
14739 # what "hidden" libraries, object files and flags are used when
14740 # linking a shared library.
14741 #
14742 # There doesn't appear to be a way to prevent this compiler from
14743 # explicitly linking system object files so we need to strip them
14744 # from the output so that they don't get included in the library
14745 # dependencies.
14746 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
14747  
14748 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
14749 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
14750  
14751 # Archives containing C++ object files must be created using
14752 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
14753 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
14754 ;;
14755 icpc* | ecpc* )
14756 # Intel C++
14757 with_gnu_ld=yes
14758 # version 8.0 and above of icpc choke on multiply defined symbols
14759 # if we add $predep_objects and $postdep_objects, however 7.1 and
14760 # earlier do not add the objects themselves.
14761 case `$CC -V 2>&1` in
14762 *"Version 7."*)
14763 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
14764 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
14765 ;;
14766 *) # Version 8.0 or newer
14767 tmp_idyn=
14768 case $host_cpu in
14769 ia64*) tmp_idyn=' -i_dynamic';;
14770 esac
14771 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
14772 archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
14773 ;;
14774 esac
14775 archive_cmds_need_lc_CXX=no
14776 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
14777 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
14778 whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
14779 ;;
14780 pgCC* | pgcpp*)
14781 # Portland Group C++ compiler
14782 case `$CC -V` in
14783 *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
14784 prelink_cmds_CXX='tpldir=Template.dir~
14785 rm -rf $tpldir~
14786 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
14787 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
14788 old_archive_cmds_CXX='tpldir=Template.dir~
14789 rm -rf $tpldir~
14790 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
14791 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
14792 $RANLIB $oldlib'
14793 archive_cmds_CXX='tpldir=Template.dir~
14794 rm -rf $tpldir~
14795 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
14796 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
14797 archive_expsym_cmds_CXX='tpldir=Template.dir~
14798 rm -rf $tpldir~
14799 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
14800 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
14801 ;;
14802 *) # Version 6 and above use weak symbols
14803 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
14804 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
14805 ;;
14806 esac
14807  
14808 hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir'
14809 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
14810 whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
14811 ;;
14812 cxx*)
14813 # Compaq C++
14814 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
14815 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
14816  
14817 runpath_var=LD_RUN_PATH
14818 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
14819 hardcode_libdir_separator_CXX=:
14820  
14821 # Commands to make compiler produce verbose output that lists
14822 # what "hidden" libraries, object files and flags are used when
14823 # linking a shared library.
14824 #
14825 # There doesn't appear to be a way to prevent this compiler from
14826 # explicitly linking system object files so we need to strip them
14827 # from the output so that they don't get included in the library
14828 # dependencies.
14829 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
14830 ;;
14831 xl* | mpixl* | bgxl*)
14832 # IBM XL 8.0 on PPC, with GNU ld
14833 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
14834 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
14835 archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
14836 if test yes = "$supports_anon_versioning"; then
14837 archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
14838 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
14839 echo "local: *; };" >> $output_objdir/$libname.ver~
14840 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
14841 fi
14842 ;;
14843 *)
14844 case `$CC -V 2>&1 | sed 5q` in
14845 *Sun\ C*)
14846 # Sun C++ 5.9
14847 no_undefined_flag_CXX=' -zdefs'
14848 archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
14849 archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
14850 hardcode_libdir_flag_spec_CXX='-R$libdir'
14851 whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
14852 compiler_needs_object_CXX=yes
14853  
14854 # Not sure whether something based on
14855 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
14856 # would be better.
14857 output_verbose_link_cmd='func_echo_all'
14858  
14859 # Archives containing C++ object files must be created using
14860 # "CC -xar", where "CC" is the Sun C++ compiler. This is
14861 # necessary to make sure instantiated templates are included
14862 # in the archive.
14863 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
14864 ;;
14865 esac
14866 ;;
14867 esac
14868 ;;
14869  
14870 lynxos*)
14871 # FIXME: insert proper C++ library support
14872 ld_shlibs_CXX=no
14873 ;;
14874  
14875 m88k*)
14876 # FIXME: insert proper C++ library support
14877 ld_shlibs_CXX=no
14878 ;;
14879  
14880 mvs*)
14881 case $cc_basename in
14882 cxx*)
14883 # FIXME: insert proper C++ library support
14884 ld_shlibs_CXX=no
14885 ;;
14886 *)
14887 # FIXME: insert proper C++ library support
14888 ld_shlibs_CXX=no
14889 ;;
14890 esac
14891 ;;
14892  
14893 netbsd*)
14894 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
14895 archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
14896 wlarc=
14897 hardcode_libdir_flag_spec_CXX='-R$libdir'
14898 hardcode_direct_CXX=yes
14899 hardcode_shlibpath_var_CXX=no
14900 fi
14901 # Workaround some broken pre-1.5 toolchains
14902 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
14903 ;;
14904  
14905 *nto* | *qnx*)
14906 ld_shlibs_CXX=yes
14907 ;;
14908  
14909 openbsd* | bitrig*)
14910 if test -f /usr/libexec/ld.so; then
14911 hardcode_direct_CXX=yes
14912 hardcode_shlibpath_var_CXX=no
14913 hardcode_direct_absolute_CXX=yes
14914 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
14915 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
14916 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
14917 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
14918 export_dynamic_flag_spec_CXX='$wl-E'
14919 whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
14920 fi
14921 output_verbose_link_cmd=func_echo_all
14922 else
14923 ld_shlibs_CXX=no
14924 fi
14925 ;;
14926  
14927 osf3* | osf4* | osf5*)
14928 case $cc_basename in
14929 KCC*)
14930 # Kuck and Associates, Inc. (KAI) C++ Compiler
14931  
14932 # KCC will only create a shared library if the output file
14933 # ends with ".so" (or ".sl" for HP-UX), so rename the library
14934 # to its proper name (with version) after linking.
14935 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
14936  
14937 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
14938 hardcode_libdir_separator_CXX=:
14939  
14940 # Archives containing C++ object files must be created using
14941 # the KAI C++ compiler.
14942 case $host in
14943 osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
14944 *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
14945 esac
14946 ;;
14947 RCC*)
14948 # Rational C++ 2.4.1
14949 # FIXME: insert proper C++ library support
14950 ld_shlibs_CXX=no
14951 ;;
14952 cxx*)
14953 case $host in
14954 osf3*)
14955 allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
14956 archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
14957 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
14958 ;;
14959 *)
14960 allow_undefined_flag_CXX=' -expect_unresolved \*'
14961 archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
14962 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
14963 echo "-hidden">> $lib.exp~
14964 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
14965 $RM $lib.exp'
14966 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
14967 ;;
14968 esac
14969  
14970 hardcode_libdir_separator_CXX=:
14971  
14972 # Commands to make compiler produce verbose output that lists
14973 # what "hidden" libraries, object files and flags are used when
14974 # linking a shared library.
14975 #
14976 # There doesn't appear to be a way to prevent this compiler from
14977 # explicitly linking system object files so we need to strip them
14978 # from the output so that they don't get included in the library
14979 # dependencies.
14980 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
14981 ;;
14982 *)
14983 if test yes,no = "$GXX,$with_gnu_ld"; then
14984 allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
14985 case $host in
14986 osf3*)
14987 archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
14988 ;;
14989 *)
14990 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
14991 ;;
14992 esac
14993  
14994 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
14995 hardcode_libdir_separator_CXX=:
14996  
14997 # Commands to make compiler produce verbose output that lists
14998 # what "hidden" libraries, object files and flags are used when
14999 # linking a shared library.
15000 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
15001  
15002 else
15003 # FIXME: insert proper C++ library support
15004 ld_shlibs_CXX=no
15005 fi
15006 ;;
15007 esac
15008 ;;
15009  
15010 psos*)
15011 # FIXME: insert proper C++ library support
15012 ld_shlibs_CXX=no
15013 ;;
15014  
15015 sunos4*)
15016 case $cc_basename in
15017 CC*)
15018 # Sun C++ 4.x
15019 # FIXME: insert proper C++ library support
15020 ld_shlibs_CXX=no
15021 ;;
15022 lcc*)
15023 # Lucid
15024 # FIXME: insert proper C++ library support
15025 ld_shlibs_CXX=no
15026 ;;
15027 *)
15028 # FIXME: insert proper C++ library support
15029 ld_shlibs_CXX=no
15030 ;;
15031 esac
15032 ;;
15033  
15034 solaris*)
15035 case $cc_basename in
15036 CC* | sunCC*)
15037 # Sun C++ 4.2, 5.x and Centerline C++
15038 archive_cmds_need_lc_CXX=yes
15039 no_undefined_flag_CXX=' -zdefs'
15040 archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
15041 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
15042 $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
15043  
15044 hardcode_libdir_flag_spec_CXX='-R$libdir'
15045 hardcode_shlibpath_var_CXX=no
15046 case $host_os in
15047 solaris2.[0-5] | solaris2.[0-5].*) ;;
15048 *)
15049 # The compiler driver will combine and reorder linker options,
15050 # but understands '-z linker_flag'.
15051 # Supported since Solaris 2.6 (maybe 2.5.1?)
15052 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
15053 ;;
15054 esac
15055 link_all_deplibs_CXX=yes
15056  
15057 output_verbose_link_cmd='func_echo_all'
15058  
15059 # Archives containing C++ object files must be created using
15060 # "CC -xar", where "CC" is the Sun C++ compiler. This is
15061 # necessary to make sure instantiated templates are included
15062 # in the archive.
15063 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
15064 ;;
15065 gcx*)
15066 # Green Hills C++ Compiler
15067 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
15068  
15069 # The C++ compiler must be used to create the archive.
15070 old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
15071 ;;
15072 *)
15073 # GNU C++ compiler with Solaris linker
15074 if test yes,no = "$GXX,$with_gnu_ld"; then
15075 no_undefined_flag_CXX=' $wl-z ${wl}defs'
15076 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
15077 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
15078 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
15079 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
15080  
15081 # Commands to make compiler produce verbose output that lists
15082 # what "hidden" libraries, object files and flags are used when
15083 # linking a shared library.
15084 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
15085 else
15086 # g++ 2.7 appears to require '-G' NOT '-shared' on this
15087 # platform.
15088 archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
15089 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
15090 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
15091  
15092 # Commands to make compiler produce verbose output that lists
15093 # what "hidden" libraries, object files and flags are used when
15094 # linking a shared library.
15095 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
15096 fi
15097  
15098 hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir'
15099 case $host_os in
15100 solaris2.[0-5] | solaris2.[0-5].*) ;;
15101 *)
15102 whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
15103 ;;
15104 esac
15105 fi
15106 ;;
15107 esac
15108 ;;
15109  
15110 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
15111 no_undefined_flag_CXX='$wl-z,text'
15112 archive_cmds_need_lc_CXX=no
15113 hardcode_shlibpath_var_CXX=no
15114 runpath_var='LD_RUN_PATH'
15115  
15116 case $cc_basename in
15117 CC*)
15118 archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15119 archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15120 ;;
15121 *)
15122 archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15123 archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15124 ;;
15125 esac
15126 ;;
15127  
15128 sysv5* | sco3.2v5* | sco5v6*)
15129 # Note: We CANNOT use -z defs as we might desire, because we do not
15130 # link with -lc, and that would cause any symbols used from libc to
15131 # always be unresolved, which means just about no library would
15132 # ever link correctly. If we're not using GNU ld we use -z text
15133 # though, which does catch some bad symbols but isn't as heavy-handed
15134 # as -z defs.
15135 no_undefined_flag_CXX='$wl-z,text'
15136 allow_undefined_flag_CXX='$wl-z,nodefs'
15137 archive_cmds_need_lc_CXX=no
15138 hardcode_shlibpath_var_CXX=no
15139 hardcode_libdir_flag_spec_CXX='$wl-R,$libdir'
15140 hardcode_libdir_separator_CXX=':'
15141 link_all_deplibs_CXX=yes
15142 export_dynamic_flag_spec_CXX='$wl-Bexport'
15143 runpath_var='LD_RUN_PATH'
15144  
15145 case $cc_basename in
15146 CC*)
15147 archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15148 archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15149 old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
15150 '"$old_archive_cmds_CXX"
15151 reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
15152 '"$reload_cmds_CXX"
15153 ;;
15154 *)
15155 archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15156 archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15157 ;;
15158 esac
15159 ;;
15160  
15161 tandem*)
15162 case $cc_basename in
15163 NCC*)
15164 # NonStop-UX NCC 3.20
15165 # FIXME: insert proper C++ library support
15166 ld_shlibs_CXX=no
15167 ;;
15168 *)
15169 # FIXME: insert proper C++ library support
15170 ld_shlibs_CXX=no
15171 ;;
15172 esac
15173 ;;
15174  
15175 vxworks*)
15176 # FIXME: insert proper C++ library support
15177 ld_shlibs_CXX=no
15178 ;;
15179  
15180 *)
15181 # FIXME: insert proper C++ library support
15182 ld_shlibs_CXX=no
15183 ;;
15184 esac
15185  
15186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
15187 $as_echo "$ld_shlibs_CXX" >&6; }
15188 test no = "$ld_shlibs_CXX" && can_build_shared=no
15189  
15190 GCC_CXX=$GXX
15191 LD_CXX=$LD
15192  
15193 ## CAVEAT EMPTOR:
15194 ## There is no encapsulation within the following macros, do not change
15195 ## the running order or otherwise move them around unless you know exactly
15196 ## what you are doing...
15197 # Dependencies to place before and after the object being linked:
15198 predep_objects_CXX=
15199 postdep_objects_CXX=
15200 predeps_CXX=
15201 postdeps_CXX=
15202 compiler_lib_search_path_CXX=
15203  
15204 cat > conftest.$ac_ext <<_LT_EOF
15205 class Foo
15206 {
15207 public:
15208 Foo (void) { a = 0; }
15209 private:
15210 int a;
15211 };
15212 _LT_EOF
15213  
15214  
15215 _lt_libdeps_save_CFLAGS=$CFLAGS
15216 case "$CC $CFLAGS " in #(
15217 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
15218 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
15219 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
15220 esac
15221  
15222 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
15223 (eval $ac_compile) 2>&5
15224 ac_status=$?
15225 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15226 test $ac_status = 0; }; then
15227 # Parse the compiler output and extract the necessary
15228 # objects, libraries and library flags.
15229  
15230 # Sentinel used to keep track of whether or not we are before
15231 # the conftest object file.
15232 pre_test_object_deps_done=no
15233  
15234 for p in `eval "$output_verbose_link_cmd"`; do
15235 case $prev$p in
15236  
15237 -L* | -R* | -l*)
15238 # Some compilers place space between "-{L,R}" and the path.
15239 # Remove the space.
15240 if test x-L = "$p" ||
15241 test x-R = "$p"; then
15242 prev=$p
15243 continue
15244 fi
15245  
15246 # Expand the sysroot to ease extracting the directories later.
15247 if test -z "$prev"; then
15248 case $p in
15249 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
15250 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
15251 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
15252 esac
15253 fi
15254 case $p in
15255 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
15256 esac
15257 if test no = "$pre_test_object_deps_done"; then
15258 case $prev in
15259 -L | -R)
15260 # Internal compiler library paths should come after those
15261 # provided the user. The postdeps already come after the
15262 # user supplied libs so there is no need to process them.
15263 if test -z "$compiler_lib_search_path_CXX"; then
15264 compiler_lib_search_path_CXX=$prev$p
15265 else
15266 compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p"
15267 fi
15268 ;;
15269 # The "-l" case would never come before the object being
15270 # linked, so don't bother handling this case.
15271 esac
15272 else
15273 if test -z "$postdeps_CXX"; then
15274 postdeps_CXX=$prev$p
15275 else
15276 postdeps_CXX="${postdeps_CXX} $prev$p"
15277 fi
15278 fi
15279 prev=
15280 ;;
15281  
15282 *.lto.$objext) ;; # Ignore GCC LTO objects
15283 *.$objext)
15284 # This assumes that the test object file only shows up
15285 # once in the compiler output.
15286 if test "$p" = "conftest.$objext"; then
15287 pre_test_object_deps_done=yes
15288 continue
15289 fi
15290  
15291 if test no = "$pre_test_object_deps_done"; then
15292 if test -z "$predep_objects_CXX"; then
15293 predep_objects_CXX=$p
15294 else
15295 predep_objects_CXX="$predep_objects_CXX $p"
15296 fi
15297 else
15298 if test -z "$postdep_objects_CXX"; then
15299 postdep_objects_CXX=$p
15300 else
15301 postdep_objects_CXX="$postdep_objects_CXX $p"
15302 fi
15303 fi
15304 ;;
15305  
15306 *) ;; # Ignore the rest.
15307  
15308 esac
15309 done
15310  
15311 # Clean up.
15312 rm -f a.out a.exe
15313 else
15314 echo "libtool.m4: error: problem compiling CXX test program"
15315 fi
15316  
15317 $RM -f confest.$objext
15318 CFLAGS=$_lt_libdeps_save_CFLAGS
15319  
15320 # PORTME: override above test on systems where it is broken
15321 case $host_os in
15322 interix[3-9]*)
15323 # Interix 3.5 installs completely hosed .la files for C++, so rather than
15324 # hack all around it, let's just trust "g++" to DTRT.
15325 predep_objects_CXX=
15326 postdep_objects_CXX=
15327 postdeps_CXX=
15328 ;;
15329 esac
15330  
15331  
15332 case " $postdeps_CXX " in
15333 *" -lc "*) archive_cmds_need_lc_CXX=no ;;
15334 esac
15335 compiler_lib_search_dirs_CXX=
15336 if test -n "${compiler_lib_search_path_CXX}"; then
15337 compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'`
15338 fi
15339  
15340  
15341  
15342  
15343  
15344  
15345  
15346  
15347  
15348  
15349  
15350  
15351  
15352  
15353  
15354  
15355  
15356  
15357  
15358  
15359  
15360  
15361  
15362  
15363  
15364  
15365  
15366  
15367  
15368  
15369  
15370 lt_prog_compiler_wl_CXX=
15371 lt_prog_compiler_pic_CXX=
15372 lt_prog_compiler_static_CXX=
15373  
15374  
15375 # C++ specific cases for pic, static, wl, etc.
15376 if test yes = "$GXX"; then
15377 lt_prog_compiler_wl_CXX='-Wl,'
15378 lt_prog_compiler_static_CXX='-static'
15379  
15380 case $host_os in
15381 aix*)
15382 # All AIX code is PIC.
15383 if test ia64 = "$host_cpu"; then
15384 # AIX 5 now supports IA64 processor
15385 lt_prog_compiler_static_CXX='-Bstatic'
15386 fi
15387 lt_prog_compiler_pic_CXX='-fPIC'
15388 ;;
15389  
15390 amigaos*)
15391 case $host_cpu in
15392 powerpc)
15393 # see comment about AmigaOS4 .so support
15394 lt_prog_compiler_pic_CXX='-fPIC'
15395 ;;
15396 m68k)
15397 # FIXME: we need at least 68020 code to build shared libraries, but
15398 # adding the '-m68020' flag to GCC prevents building anything better,
15399 # like '-m68040'.
15400 lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
15401 ;;
15402 esac
15403 ;;
15404  
15405 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
15406 # PIC is the default for these OSes.
15407 ;;
15408 mingw* | cygwin* | os2* | pw32* | cegcc*)
15409 # This hack is so that the source file can tell whether it is being
15410 # built for inclusion in a dll (and should export symbols for example).
15411 # Although the cygwin gcc ignores -fPIC, still need this for old-style
15412 # (--disable-auto-import) libraries
15413 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
15414 case $host_os in
15415 os2*)
15416 lt_prog_compiler_static_CXX='$wl-static'
15417 ;;
15418 esac
15419 ;;
15420 darwin* | rhapsody*)
15421 # PIC is the default on this platform
15422 # Common symbols not allowed in MH_DYLIB files
15423 lt_prog_compiler_pic_CXX='-fno-common'
15424 ;;
15425 *djgpp*)
15426 # DJGPP does not support shared libraries at all
15427 lt_prog_compiler_pic_CXX=
15428 ;;
15429 haiku*)
15430 # PIC is the default for Haiku.
15431 # The "-static" flag exists, but is broken.
15432 lt_prog_compiler_static_CXX=
15433 ;;
15434 interix[3-9]*)
15435 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
15436 # Instead, we relocate shared libraries at runtime.
15437 ;;
15438 sysv4*MP*)
15439 if test -d /usr/nec; then
15440 lt_prog_compiler_pic_CXX=-Kconform_pic
15441 fi
15442 ;;
15443 hpux*)
15444 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
15445 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
15446 # sets the default TLS model and affects inlining.
15447 case $host_cpu in
15448 hppa*64*)
15449 ;;
15450 *)
15451 lt_prog_compiler_pic_CXX='-fPIC'
15452 ;;
15453 esac
15454 ;;
15455 *qnx* | *nto*)
15456 # QNX uses GNU C++, but need to define -shared option too, otherwise
15457 # it will coredump.
15458 lt_prog_compiler_pic_CXX='-fPIC -shared'
15459 ;;
15460 *)
15461 lt_prog_compiler_pic_CXX='-fPIC'
15462 ;;
15463 esac
15464 else
15465 case $host_os in
15466 aix[4-9]*)
15467 # All AIX code is PIC.
15468 if test ia64 = "$host_cpu"; then
15469 # AIX 5 now supports IA64 processor
15470 lt_prog_compiler_static_CXX='-Bstatic'
15471 else
15472 lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
15473 fi
15474 ;;
15475 chorus*)
15476 case $cc_basename in
15477 cxch68*)
15478 # Green Hills C++ Compiler
15479 # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
15480 ;;
15481 esac
15482 ;;
15483 mingw* | cygwin* | os2* | pw32* | cegcc*)
15484 # This hack is so that the source file can tell whether it is being
15485 # built for inclusion in a dll (and should export symbols for example).
15486 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
15487 ;;
15488 dgux*)
15489 case $cc_basename in
15490 ec++*)
15491 lt_prog_compiler_pic_CXX='-KPIC'
15492 ;;
15493 ghcx*)
15494 # Green Hills C++ Compiler
15495 lt_prog_compiler_pic_CXX='-pic'
15496 ;;
15497 *)
15498 ;;
15499 esac
15500 ;;
15501 freebsd* | dragonfly*)
15502 # FreeBSD uses GNU C++
15503 ;;
15504 hpux9* | hpux10* | hpux11*)
15505 case $cc_basename in
15506 CC*)
15507 lt_prog_compiler_wl_CXX='-Wl,'
15508 lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
15509 if test ia64 != "$host_cpu"; then
15510 lt_prog_compiler_pic_CXX='+Z'
15511 fi
15512 ;;
15513 aCC*)
15514 lt_prog_compiler_wl_CXX='-Wl,'
15515 lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
15516 case $host_cpu in
15517 hppa*64*|ia64*)
15518 # +Z the default
15519 ;;
15520 *)
15521 lt_prog_compiler_pic_CXX='+Z'
15522 ;;
15523 esac
15524 ;;
15525 *)
15526 ;;
15527 esac
15528 ;;
15529 interix*)
15530 # This is c89, which is MS Visual C++ (no shared libs)
15531 # Anyone wants to do a port?
15532 ;;
15533 irix5* | irix6* | nonstopux*)
15534 case $cc_basename in
15535 CC*)
15536 lt_prog_compiler_wl_CXX='-Wl,'
15537 lt_prog_compiler_static_CXX='-non_shared'
15538 # CC pic flag -KPIC is the default.
15539 ;;
15540 *)
15541 ;;
15542 esac
15543 ;;
15544 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
15545 case $cc_basename in
15546 KCC*)
15547 # KAI C++ Compiler
15548 lt_prog_compiler_wl_CXX='--backend -Wl,'
15549 lt_prog_compiler_pic_CXX='-fPIC'
15550 ;;
15551 ecpc* )
15552 # old Intel C++ for x86_64, which still supported -KPIC.
15553 lt_prog_compiler_wl_CXX='-Wl,'
15554 lt_prog_compiler_pic_CXX='-KPIC'
15555 lt_prog_compiler_static_CXX='-static'
15556 ;;
15557 icpc* )
15558 # Intel C++, used to be incompatible with GCC.
15559 # ICC 10 doesn't accept -KPIC any more.
15560 lt_prog_compiler_wl_CXX='-Wl,'
15561 lt_prog_compiler_pic_CXX='-fPIC'
15562 lt_prog_compiler_static_CXX='-static'
15563 ;;
15564 pgCC* | pgcpp*)
15565 # Portland Group C++ compiler
15566 lt_prog_compiler_wl_CXX='-Wl,'
15567 lt_prog_compiler_pic_CXX='-fpic'
15568 lt_prog_compiler_static_CXX='-Bstatic'
15569 ;;
15570 cxx*)
15571 # Compaq C++
15572 # Make sure the PIC flag is empty. It appears that all Alpha
15573 # Linux and Compaq Tru64 Unix objects are PIC.
15574 lt_prog_compiler_pic_CXX=
15575 lt_prog_compiler_static_CXX='-non_shared'
15576 ;;
15577 xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
15578 # IBM XL 8.0, 9.0 on PPC and BlueGene
15579 lt_prog_compiler_wl_CXX='-Wl,'
15580 lt_prog_compiler_pic_CXX='-qpic'
15581 lt_prog_compiler_static_CXX='-qstaticlink'
15582 ;;
15583 *)
15584 case `$CC -V 2>&1 | sed 5q` in
15585 *Sun\ C*)
15586 # Sun C++ 5.9
15587 lt_prog_compiler_pic_CXX='-KPIC'
15588 lt_prog_compiler_static_CXX='-Bstatic'
15589 lt_prog_compiler_wl_CXX='-Qoption ld '
15590 ;;
15591 esac
15592 ;;
15593 esac
15594 ;;
15595 lynxos*)
15596 ;;
15597 m88k*)
15598 ;;
15599 mvs*)
15600 case $cc_basename in
15601 cxx*)
15602 lt_prog_compiler_pic_CXX='-W c,exportall'
15603 ;;
15604 *)
15605 ;;
15606 esac
15607 ;;
15608 netbsd* | netbsdelf*-gnu)
15609 ;;
15610 *qnx* | *nto*)
15611 # QNX uses GNU C++, but need to define -shared option too, otherwise
15612 # it will coredump.
15613 lt_prog_compiler_pic_CXX='-fPIC -shared'
15614 ;;
15615 osf3* | osf4* | osf5*)
15616 case $cc_basename in
15617 KCC*)
15618 lt_prog_compiler_wl_CXX='--backend -Wl,'
15619 ;;
15620 RCC*)
15621 # Rational C++ 2.4.1
15622 lt_prog_compiler_pic_CXX='-pic'
15623 ;;
15624 cxx*)
15625 # Digital/Compaq C++
15626 lt_prog_compiler_wl_CXX='-Wl,'
15627 # Make sure the PIC flag is empty. It appears that all Alpha
15628 # Linux and Compaq Tru64 Unix objects are PIC.
15629 lt_prog_compiler_pic_CXX=
15630 lt_prog_compiler_static_CXX='-non_shared'
15631 ;;
15632 *)
15633 ;;
15634 esac
15635 ;;
15636 psos*)
15637 ;;
15638 solaris*)
15639 case $cc_basename in
15640 CC* | sunCC*)
15641 # Sun C++ 4.2, 5.x and Centerline C++
15642 lt_prog_compiler_pic_CXX='-KPIC'
15643 lt_prog_compiler_static_CXX='-Bstatic'
15644 lt_prog_compiler_wl_CXX='-Qoption ld '
15645 ;;
15646 gcx*)
15647 # Green Hills C++ Compiler
15648 lt_prog_compiler_pic_CXX='-PIC'
15649 ;;
15650 *)
15651 ;;
15652 esac
15653 ;;
15654 sunos4*)
15655 case $cc_basename in
15656 CC*)
15657 # Sun C++ 4.x
15658 lt_prog_compiler_pic_CXX='-pic'
15659 lt_prog_compiler_static_CXX='-Bstatic'
15660 ;;
15661 lcc*)
15662 # Lucid
15663 lt_prog_compiler_pic_CXX='-pic'
15664 ;;
15665 *)
15666 ;;
15667 esac
15668 ;;
15669 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
15670 case $cc_basename in
15671 CC*)
15672 lt_prog_compiler_wl_CXX='-Wl,'
15673 lt_prog_compiler_pic_CXX='-KPIC'
15674 lt_prog_compiler_static_CXX='-Bstatic'
15675 ;;
15676 esac
15677 ;;
15678 tandem*)
15679 case $cc_basename in
15680 NCC*)
15681 # NonStop-UX NCC 3.20
15682 lt_prog_compiler_pic_CXX='-KPIC'
15683 ;;
15684 *)
15685 ;;
15686 esac
15687 ;;
15688 vxworks*)
15689 ;;
15690 *)
15691 lt_prog_compiler_can_build_shared_CXX=no
15692 ;;
15693 esac
15694 fi
15695  
15696 case $host_os in
15697 # For platforms that do not support PIC, -DPIC is meaningless:
15698 *djgpp*)
15699 lt_prog_compiler_pic_CXX=
15700 ;;
15701 *)
15702 lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
15703 ;;
15704 esac
15705  
15706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
15707 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
15708 if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
15709 $as_echo_n "(cached) " >&6
15710 else
15711 lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
15712 fi
15713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
15714 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
15715 lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
15716  
15717 #
15718 # Check to make sure the PIC flag actually works.
15719 #
15720 if test -n "$lt_prog_compiler_pic_CXX"; then
15721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
15722 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
15723 if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
15724 $as_echo_n "(cached) " >&6
15725 else
15726 lt_cv_prog_compiler_pic_works_CXX=no
15727 ac_outfile=conftest.$ac_objext
15728 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15729 lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment
15730 # Insert the option either (1) after the last *FLAGS variable, or
15731 # (2) before a word containing "conftest.", or (3) at the end.
15732 # Note that $ac_compile itself does not contain backslashes and begins
15733 # with a dollar sign (not a hyphen), so the echo should work correctly.
15734 # The option is referenced via a variable to avoid confusing sed.
15735 lt_compile=`echo "$ac_compile" | $SED \
15736 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
15737 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
15738 -e 's:$: $lt_compiler_flag:'`
15739 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
15740 (eval "$lt_compile" 2>conftest.err)
15741 ac_status=$?
15742 cat conftest.err >&5
15743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15744 if (exit $ac_status) && test -s "$ac_outfile"; then
15745 # The compiler can only warn and ignore the option if not recognized
15746 # So say no if there are warnings other than the usual output.
15747 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
15748 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
15749 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
15750 lt_cv_prog_compiler_pic_works_CXX=yes
15751 fi
15752 fi
15753 $RM conftest*
15754  
15755 fi
15756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
15757 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
15758  
15759 if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then
15760 case $lt_prog_compiler_pic_CXX in
15761 "" | " "*) ;;
15762 *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
15763 esac
15764 else
15765 lt_prog_compiler_pic_CXX=
15766 lt_prog_compiler_can_build_shared_CXX=no
15767 fi
15768  
15769 fi
15770  
15771  
15772  
15773  
15774  
15775 #
15776 # Check to make sure the static flag actually works.
15777 #
15778 wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
15779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
15780 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
15781 if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
15782 $as_echo_n "(cached) " >&6
15783 else
15784 lt_cv_prog_compiler_static_works_CXX=no
15785 save_LDFLAGS=$LDFLAGS
15786 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
15787 echo "$lt_simple_link_test_code" > conftest.$ac_ext
15788 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
15789 # The linker can only warn and ignore the option if not recognized
15790 # So say no if there are warnings
15791 if test -s conftest.err; then
15792 # Append any errors to the config.log.
15793 cat conftest.err 1>&5
15794 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
15795 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
15796 if diff conftest.exp conftest.er2 >/dev/null; then
15797 lt_cv_prog_compiler_static_works_CXX=yes
15798 fi
15799 else
15800 lt_cv_prog_compiler_static_works_CXX=yes
15801 fi
15802 fi
15803 $RM -r conftest*
15804 LDFLAGS=$save_LDFLAGS
15805  
15806 fi
15807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
15808 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
15809  
15810 if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then
15811 :
15812 else
15813 lt_prog_compiler_static_CXX=
15814 fi
15815  
15816  
15817  
15818  
15819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
15820 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
15821 if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
15822 $as_echo_n "(cached) " >&6
15823 else
15824 lt_cv_prog_compiler_c_o_CXX=no
15825 $RM -r conftest 2>/dev/null
15826 mkdir conftest
15827 cd conftest
15828 mkdir out
15829 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15830  
15831 lt_compiler_flag="-o out/conftest2.$ac_objext"
15832 # Insert the option either (1) after the last *FLAGS variable, or
15833 # (2) before a word containing "conftest.", or (3) at the end.
15834 # Note that $ac_compile itself does not contain backslashes and begins
15835 # with a dollar sign (not a hyphen), so the echo should work correctly.
15836 lt_compile=`echo "$ac_compile" | $SED \
15837 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
15838 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
15839 -e 's:$: $lt_compiler_flag:'`
15840 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
15841 (eval "$lt_compile" 2>out/conftest.err)
15842 ac_status=$?
15843 cat out/conftest.err >&5
15844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15845 if (exit $ac_status) && test -s out/conftest2.$ac_objext
15846 then
15847 # The compiler can only warn and ignore the option if not recognized
15848 # So say no if there are warnings
15849 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
15850 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
15851 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
15852 lt_cv_prog_compiler_c_o_CXX=yes
15853 fi
15854 fi
15855 chmod u+w . 2>&5
15856 $RM conftest*
15857 # SGI C++ compiler will create directory out/ii_files/ for
15858 # template instantiation
15859 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
15860 $RM out/* && rmdir out
15861 cd ..
15862 $RM -r conftest
15863 $RM conftest*
15864  
15865 fi
15866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
15867 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
15868  
15869  
15870  
15871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
15872 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
15873 if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
15874 $as_echo_n "(cached) " >&6
15875 else
15876 lt_cv_prog_compiler_c_o_CXX=no
15877 $RM -r conftest 2>/dev/null
15878 mkdir conftest
15879 cd conftest
15880 mkdir out
15881 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15882  
15883 lt_compiler_flag="-o out/conftest2.$ac_objext"
15884 # Insert the option either (1) after the last *FLAGS variable, or
15885 # (2) before a word containing "conftest.", or (3) at the end.
15886 # Note that $ac_compile itself does not contain backslashes and begins
15887 # with a dollar sign (not a hyphen), so the echo should work correctly.
15888 lt_compile=`echo "$ac_compile" | $SED \
15889 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
15890 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
15891 -e 's:$: $lt_compiler_flag:'`
15892 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
15893 (eval "$lt_compile" 2>out/conftest.err)
15894 ac_status=$?
15895 cat out/conftest.err >&5
15896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15897 if (exit $ac_status) && test -s out/conftest2.$ac_objext
15898 then
15899 # The compiler can only warn and ignore the option if not recognized
15900 # So say no if there are warnings
15901 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
15902 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
15903 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
15904 lt_cv_prog_compiler_c_o_CXX=yes
15905 fi
15906 fi
15907 chmod u+w . 2>&5
15908 $RM conftest*
15909 # SGI C++ compiler will create directory out/ii_files/ for
15910 # template instantiation
15911 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
15912 $RM out/* && rmdir out
15913 cd ..
15914 $RM -r conftest
15915 $RM conftest*
15916  
15917 fi
15918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
15919 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
15920  
15921  
15922  
15923  
15924 hard_links=nottested
15925 if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then
15926 # do not overwrite the value of need_locks provided by the user
15927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
15928 $as_echo_n "checking if we can lock with hard links... " >&6; }
15929 hard_links=yes
15930 $RM conftest*
15931 ln conftest.a conftest.b 2>/dev/null && hard_links=no
15932 touch conftest.a
15933 ln conftest.a conftest.b 2>&5 || hard_links=no
15934 ln conftest.a conftest.b 2>/dev/null && hard_links=no
15935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
15936 $as_echo "$hard_links" >&6; }
15937 if test no = "$hard_links"; then
15938 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
15939 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
15940 need_locks=warn
15941 fi
15942 else
15943 need_locks=no
15944 fi
15945  
15946  
15947  
15948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
15949 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
15950  
15951 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
15952 exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
15953 case $host_os in
15954 aix[4-9]*)
15955 # If we're using GNU nm, then we don't want the "-C" option.
15956 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
15957 # Without the "-l" option, or with the "-B" option, AIX nm treats
15958 # weak defined symbols like other global defined symbols, whereas
15959 # GNU nm marks them as "W".
15960 # While the 'weak' keyword is ignored in the Export File, we need
15961 # it in the Import File for the 'aix-soname' feature, so we have
15962 # to replace the "-B" option with "-P" for AIX nm.
15963 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
15964 export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
15965 else
15966 export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
15967 fi
15968 ;;
15969 pw32*)
15970 export_symbols_cmds_CXX=$ltdll_cmds
15971 ;;
15972 cygwin* | mingw* | cegcc*)
15973 case $cc_basename in
15974 cl*)
15975 exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
15976 ;;
15977 *)
15978 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
15979 exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
15980 ;;
15981 esac
15982 ;;
15983 linux* | k*bsd*-gnu | gnu*)
15984 link_all_deplibs_CXX=no
15985 ;;
15986 *)
15987 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
15988 ;;
15989 esac
15990  
15991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
15992 $as_echo "$ld_shlibs_CXX" >&6; }
15993 test no = "$ld_shlibs_CXX" && can_build_shared=no
15994  
15995 with_gnu_ld_CXX=$with_gnu_ld
15996  
15997  
15998  
15999  
16000  
16001  
16002 #
16003 # Do we need to explicitly link libc?
16004 #
16005 case "x$archive_cmds_need_lc_CXX" in
16006 x|xyes)
16007 # Assume -lc should be added
16008 archive_cmds_need_lc_CXX=yes
16009  
16010 if test yes,yes = "$GCC,$enable_shared"; then
16011 case $archive_cmds_CXX in
16012 *'~'*)
16013 # FIXME: we may have to deal with multi-command sequences.
16014 ;;
16015 '$CC '*)
16016 # Test whether the compiler implicitly links with -lc since on some
16017 # systems, -lgcc has to come before -lc. If gcc already passes -lc
16018 # to ld, don't add -lc before -lgcc.
16019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
16020 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
16021 if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
16022 $as_echo_n "(cached) " >&6
16023 else
16024 $RM conftest*
16025 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16026  
16027 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
16028 (eval $ac_compile) 2>&5
16029 ac_status=$?
16030 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16031 test $ac_status = 0; } 2>conftest.err; then
16032 soname=conftest
16033 lib=conftest
16034 libobjs=conftest.$ac_objext
16035 deplibs=
16036 wl=$lt_prog_compiler_wl_CXX
16037 pic_flag=$lt_prog_compiler_pic_CXX
16038 compiler_flags=-v
16039 linker_flags=-v
16040 verstring=
16041 output_objdir=.
16042 libname=conftest
16043 lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
16044 allow_undefined_flag_CXX=
16045 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
16046 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
16047 ac_status=$?
16048 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16049 test $ac_status = 0; }
16050 then
16051 lt_cv_archive_cmds_need_lc_CXX=no
16052 else
16053 lt_cv_archive_cmds_need_lc_CXX=yes
16054 fi
16055 allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
16056 else
16057 cat conftest.err 1>&5
16058 fi
16059 $RM conftest*
16060  
16061 fi
16062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
16063 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
16064 archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
16065 ;;
16066 esac
16067 fi
16068 ;;
16069 esac
16070  
16071  
16072  
16073  
16074  
16075  
16076  
16077  
16078  
16079  
16080  
16081  
16082  
16083  
16084  
16085  
16086  
16087  
16088  
16089  
16090  
16091  
16092  
16093  
16094  
16095  
16096  
16097  
16098  
16099  
16100  
16101  
16102  
16103  
16104  
16105  
16106  
16107  
16108  
16109  
16110  
16111  
16112  
16113  
16114  
16115  
16116  
16117  
16118  
16119  
16120  
16121  
16122  
16123  
16124  
16125  
16126  
16127  
16128  
16129  
16130  
16131  
16132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
16133 $as_echo_n "checking dynamic linker characteristics... " >&6; }
16134  
16135 library_names_spec=
16136 libname_spec='lib$name'
16137 soname_spec=
16138 shrext_cmds=.so
16139 postinstall_cmds=
16140 postuninstall_cmds=
16141 finish_cmds=
16142 finish_eval=
16143 shlibpath_var=
16144 shlibpath_overrides_runpath=unknown
16145 version_type=none
16146 dynamic_linker="$host_os ld.so"
16147 sys_lib_dlsearch_path_spec="/lib /usr/lib"
16148 need_lib_prefix=unknown
16149 hardcode_into_libs=no
16150  
16151 # when you set need_version to no, make sure it does not cause -set_version
16152 # flags to be left without arguments
16153 need_version=unknown
16154  
16155  
16156  
16157 case $host_os in
16158 aix3*)
16159 version_type=linux # correct to gnu/linux during the next big refactor
16160 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
16161 shlibpath_var=LIBPATH
16162  
16163 # AIX 3 has no versioning support, so we append a major version to the name.
16164 soname_spec='$libname$release$shared_ext$major'
16165 ;;
16166  
16167 aix[4-9]*)
16168 version_type=linux # correct to gnu/linux during the next big refactor
16169 need_lib_prefix=no
16170 need_version=no
16171 hardcode_into_libs=yes
16172 if test ia64 = "$host_cpu"; then
16173 # AIX 5 supports IA64
16174 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
16175 shlibpath_var=LD_LIBRARY_PATH
16176 else
16177 # With GCC up to 2.95.x, collect2 would create an import file
16178 # for dependence libraries. The import file would start with
16179 # the line '#! .'. This would cause the generated library to
16180 # depend on '.', always an invalid library. This was fixed in
16181 # development snapshots of GCC prior to 3.0.
16182 case $host_os in
16183 aix4 | aix4.[01] | aix4.[01].*)
16184 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
16185 echo ' yes '
16186 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
16187 :
16188 else
16189 can_build_shared=no
16190 fi
16191 ;;
16192 esac
16193 # Using Import Files as archive members, it is possible to support
16194 # filename-based versioning of shared library archives on AIX. While
16195 # this would work for both with and without runtime linking, it will
16196 # prevent static linking of such archives. So we do filename-based
16197 # shared library versioning with .so extension only, which is used
16198 # when both runtime linking and shared linking is enabled.
16199 # Unfortunately, runtime linking may impact performance, so we do
16200 # not want this to be the default eventually. Also, we use the
16201 # versioned .so libs for executables only if there is the -brtl
16202 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
16203 # To allow for filename-based versioning support, we need to create
16204 # libNAME.so.V as an archive file, containing:
16205 # *) an Import File, referring to the versioned filename of the
16206 # archive as well as the shared archive member, telling the
16207 # bitwidth (32 or 64) of that shared object, and providing the
16208 # list of exported symbols of that shared object, eventually
16209 # decorated with the 'weak' keyword
16210 # *) the shared object with the F_LOADONLY flag set, to really avoid
16211 # it being seen by the linker.
16212 # At run time we better use the real file rather than another symlink,
16213 # but for link time we create the symlink libNAME.so -> libNAME.so.V
16214  
16215 case $with_aix_soname,$aix_use_runtimelinking in
16216 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
16217 # soname into executable. Probably we can add versioning support to
16218 # collect2, so additional links can be useful in future.
16219 aix,yes) # traditional libtool
16220 dynamic_linker='AIX unversionable lib.so'
16221 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
16222 # instead of lib<name>.a to let people know that these are not
16223 # typical AIX shared libraries.
16224 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16225 ;;
16226 aix,no) # traditional AIX only
16227 dynamic_linker='AIX lib.a(lib.so.V)'
16228 # We preserve .a as extension for shared libraries through AIX4.2
16229 # and later when we are not doing run time linking.
16230 library_names_spec='$libname$release.a $libname.a'
16231 soname_spec='$libname$release$shared_ext$major'
16232 ;;
16233 svr4,*) # full svr4 only
16234 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
16235 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
16236 # We do not specify a path in Import Files, so LIBPATH fires.
16237 shlibpath_overrides_runpath=yes
16238 ;;
16239 *,yes) # both, prefer svr4
16240 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
16241 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
16242 # unpreferred sharedlib libNAME.a needs extra handling
16243 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
16244 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
16245 # We do not specify a path in Import Files, so LIBPATH fires.
16246 shlibpath_overrides_runpath=yes
16247 ;;
16248 *,no) # both, prefer aix
16249 dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
16250 library_names_spec='$libname$release.a $libname.a'
16251 soname_spec='$libname$release$shared_ext$major'
16252 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
16253 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
16254 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
16255 ;;
16256 esac
16257 shlibpath_var=LIBPATH
16258 fi
16259 ;;
16260  
16261 amigaos*)
16262 case $host_cpu in
16263 powerpc)
16264 # Since July 2007 AmigaOS4 officially supports .so libraries.
16265 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
16266 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16267 ;;
16268 m68k)
16269 library_names_spec='$libname.ixlibrary $libname.a'
16270 # Create ${libname}_ixlibrary.a entries in /sys/libs.
16271 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
16272 ;;
16273 esac
16274 ;;
16275  
16276 beos*)
16277 library_names_spec='$libname$shared_ext'
16278 dynamic_linker="$host_os ld.so"
16279 shlibpath_var=LIBRARY_PATH
16280 ;;
16281  
16282 bsdi[45]*)
16283 version_type=linux # correct to gnu/linux during the next big refactor
16284 need_version=no
16285 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16286 soname_spec='$libname$release$shared_ext$major'
16287 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
16288 shlibpath_var=LD_LIBRARY_PATH
16289 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
16290 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
16291 # the default ld.so.conf also contains /usr/contrib/lib and
16292 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
16293 # libtool to hard-code these into programs
16294 ;;
16295  
16296 cygwin* | mingw* | pw32* | cegcc*)
16297 version_type=windows
16298 shrext_cmds=.dll
16299 need_version=no
16300 need_lib_prefix=no
16301  
16302 case $GCC,$cc_basename in
16303 yes,*)
16304 # gcc
16305 library_names_spec='$libname.dll.a'
16306 # DLL is installed to $(libdir)/../bin by postinstall_cmds
16307 postinstall_cmds='base_file=`basename \$file`~
16308 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
16309 dldir=$destdir/`dirname \$dlpath`~
16310 test -d \$dldir || mkdir -p \$dldir~
16311 $install_prog $dir/$dlname \$dldir/$dlname~
16312 chmod a+x \$dldir/$dlname~
16313 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
16314 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
16315 fi'
16316 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
16317 dlpath=$dir/\$dldll~
16318 $RM \$dlpath'
16319 shlibpath_overrides_runpath=yes
16320  
16321 case $host_os in
16322 cygwin*)
16323 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
16324 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
16325  
16326 ;;
16327 mingw* | cegcc*)
16328 # MinGW DLLs use traditional 'lib' prefix
16329 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
16330 ;;
16331 pw32*)
16332 # pw32 DLLs use 'pw' prefix rather than 'lib'
16333 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
16334 ;;
16335 esac
16336 dynamic_linker='Win32 ld.exe'
16337 ;;
16338  
16339 *,cl*)
16340 # Native MSVC
16341 libname_spec='$name'
16342 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
16343 library_names_spec='$libname.dll.lib'
16344  
16345 case $build_os in
16346 mingw*)
16347 sys_lib_search_path_spec=
16348 lt_save_ifs=$IFS
16349 IFS=';'
16350 for lt_path in $LIB
16351 do
16352 IFS=$lt_save_ifs
16353 # Let DOS variable expansion print the short 8.3 style file name.
16354 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
16355 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
16356 done
16357 IFS=$lt_save_ifs
16358 # Convert to MSYS style.
16359 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
16360 ;;
16361 cygwin*)
16362 # Convert to unix form, then to dos form, then back to unix form
16363 # but this time dos style (no spaces!) so that the unix form looks
16364 # like /cygdrive/c/PROGRA~1:/cygdr...
16365 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
16366 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
16367 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
16368 ;;
16369 *)
16370 sys_lib_search_path_spec=$LIB
16371 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
16372 # It is most probably a Windows format PATH.
16373 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
16374 else
16375 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
16376 fi
16377 # FIXME: find the short name or the path components, as spaces are
16378 # common. (e.g. "Program Files" -> "PROGRA~1")
16379 ;;
16380 esac
16381  
16382 # DLL is installed to $(libdir)/../bin by postinstall_cmds
16383 postinstall_cmds='base_file=`basename \$file`~
16384 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
16385 dldir=$destdir/`dirname \$dlpath`~
16386 test -d \$dldir || mkdir -p \$dldir~
16387 $install_prog $dir/$dlname \$dldir/$dlname'
16388 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
16389 dlpath=$dir/\$dldll~
16390 $RM \$dlpath'
16391 shlibpath_overrides_runpath=yes
16392 dynamic_linker='Win32 link.exe'
16393 ;;
16394  
16395 *)
16396 # Assume MSVC wrapper
16397 library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
16398 dynamic_linker='Win32 ld.exe'
16399 ;;
16400 esac
16401 # FIXME: first we should search . and the directory the executable is in
16402 shlibpath_var=PATH
16403 ;;
16404  
16405 darwin* | rhapsody*)
16406 dynamic_linker="$host_os dyld"
16407 version_type=darwin
16408 need_lib_prefix=no
16409 need_version=no
16410 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
16411 soname_spec='$libname$release$major$shared_ext'
16412 shlibpath_overrides_runpath=yes
16413 shlibpath_var=DYLD_LIBRARY_PATH
16414 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
16415  
16416 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
16417 ;;
16418  
16419 dgux*)
16420 version_type=linux # correct to gnu/linux during the next big refactor
16421 need_lib_prefix=no
16422 need_version=no
16423 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16424 soname_spec='$libname$release$shared_ext$major'
16425 shlibpath_var=LD_LIBRARY_PATH
16426 ;;
16427  
16428 freebsd* | dragonfly*)
16429 # DragonFly does not have aout. When/if they implement a new
16430 # versioning mechanism, adjust this.
16431 if test -x /usr/bin/objformat; then
16432 objformat=`/usr/bin/objformat`
16433 else
16434 case $host_os in
16435 freebsd[23].*) objformat=aout ;;
16436 *) objformat=elf ;;
16437 esac
16438 fi
16439 version_type=freebsd-$objformat
16440 case $version_type in
16441 freebsd-elf*)
16442 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16443 soname_spec='$libname$release$shared_ext$major'
16444 need_version=no
16445 need_lib_prefix=no
16446 ;;
16447 freebsd-*)
16448 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
16449 need_version=yes
16450 ;;
16451 esac
16452 shlibpath_var=LD_LIBRARY_PATH
16453 case $host_os in
16454 freebsd2.*)
16455 shlibpath_overrides_runpath=yes
16456 ;;
16457 freebsd3.[01]* | freebsdelf3.[01]*)
16458 shlibpath_overrides_runpath=yes
16459 hardcode_into_libs=yes
16460 ;;
16461 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
16462 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
16463 shlibpath_overrides_runpath=no
16464 hardcode_into_libs=yes
16465 ;;
16466 *) # from 4.6 on, and DragonFly
16467 shlibpath_overrides_runpath=yes
16468 hardcode_into_libs=yes
16469 ;;
16470 esac
16471 ;;
16472  
16473 haiku*)
16474 version_type=linux # correct to gnu/linux during the next big refactor
16475 need_lib_prefix=no
16476 need_version=no
16477 dynamic_linker="$host_os runtime_loader"
16478 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16479 soname_spec='$libname$release$shared_ext$major'
16480 shlibpath_var=LIBRARY_PATH
16481 shlibpath_overrides_runpath=no
16482 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
16483 hardcode_into_libs=yes
16484 ;;
16485  
16486 hpux9* | hpux10* | hpux11*)
16487 # Give a soname corresponding to the major version so that dld.sl refuses to
16488 # link against other versions.
16489 version_type=sunos
16490 need_lib_prefix=no
16491 need_version=no
16492 case $host_cpu in
16493 ia64*)
16494 shrext_cmds='.so'
16495 hardcode_into_libs=yes
16496 dynamic_linker="$host_os dld.so"
16497 shlibpath_var=LD_LIBRARY_PATH
16498 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
16499 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16500 soname_spec='$libname$release$shared_ext$major'
16501 if test 32 = "$HPUX_IA64_MODE"; then
16502 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
16503 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
16504 else
16505 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
16506 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
16507 fi
16508 ;;
16509 hppa*64*)
16510 shrext_cmds='.sl'
16511 hardcode_into_libs=yes
16512 dynamic_linker="$host_os dld.sl"
16513 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
16514 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
16515 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16516 soname_spec='$libname$release$shared_ext$major'
16517 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
16518 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16519 ;;
16520 *)
16521 shrext_cmds='.sl'
16522 dynamic_linker="$host_os dld.sl"
16523 shlibpath_var=SHLIB_PATH
16524 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
16525 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16526 soname_spec='$libname$release$shared_ext$major'
16527 ;;
16528 esac
16529 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
16530 postinstall_cmds='chmod 555 $lib'
16531 # or fails outright, so override atomically:
16532 install_override_mode=555
16533 ;;
16534  
16535 interix[3-9]*)
16536 version_type=linux # correct to gnu/linux during the next big refactor
16537 need_lib_prefix=no
16538 need_version=no
16539 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16540 soname_spec='$libname$release$shared_ext$major'
16541 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
16542 shlibpath_var=LD_LIBRARY_PATH
16543 shlibpath_overrides_runpath=no
16544 hardcode_into_libs=yes
16545 ;;
16546  
16547 irix5* | irix6* | nonstopux*)
16548 case $host_os in
16549 nonstopux*) version_type=nonstopux ;;
16550 *)
16551 if test yes = "$lt_cv_prog_gnu_ld"; then
16552 version_type=linux # correct to gnu/linux during the next big refactor
16553 else
16554 version_type=irix
16555 fi ;;
16556 esac
16557 need_lib_prefix=no
16558 need_version=no
16559 soname_spec='$libname$release$shared_ext$major'
16560 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
16561 case $host_os in
16562 irix5* | nonstopux*)
16563 libsuff= shlibsuff=
16564 ;;
16565 *)
16566 case $LD in # libtool.m4 will add one of these switches to LD
16567 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
16568 libsuff= shlibsuff= libmagic=32-bit;;
16569 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
16570 libsuff=32 shlibsuff=N32 libmagic=N32;;
16571 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
16572 libsuff=64 shlibsuff=64 libmagic=64-bit;;
16573 *) libsuff= shlibsuff= libmagic=never-match;;
16574 esac
16575 ;;
16576 esac
16577 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
16578 shlibpath_overrides_runpath=no
16579 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
16580 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
16581 hardcode_into_libs=yes
16582 ;;
16583  
16584 # No shared lib support for Linux oldld, aout, or coff.
16585 linux*oldld* | linux*aout* | linux*coff*)
16586 dynamic_linker=no
16587 ;;
16588  
16589 linux*android*)
16590 version_type=none # Android doesn't support versioned libraries.
16591 need_lib_prefix=no
16592 need_version=no
16593 library_names_spec='$libname$release$shared_ext'
16594 soname_spec='$libname$release$shared_ext'
16595 finish_cmds=
16596 shlibpath_var=LD_LIBRARY_PATH
16597 shlibpath_overrides_runpath=yes
16598  
16599 # This implies no fast_install, which is unacceptable.
16600 # Some rework will be needed to allow for fast_install
16601 # before this can be enabled.
16602 hardcode_into_libs=yes
16603  
16604 dynamic_linker='Android linker'
16605 # Don't embed -rpath directories since the linker doesn't support them.
16606 hardcode_libdir_flag_spec_CXX='-L$libdir'
16607 ;;
16608  
16609 # This must be glibc/ELF.
16610 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
16611 version_type=linux # correct to gnu/linux during the next big refactor
16612 need_lib_prefix=no
16613 need_version=no
16614 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16615 soname_spec='$libname$release$shared_ext$major'
16616 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
16617 shlibpath_var=LD_LIBRARY_PATH
16618 shlibpath_overrides_runpath=no
16619  
16620 # Some binutils ld are patched to set DT_RUNPATH
16621 if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
16622 $as_echo_n "(cached) " >&6
16623 else
16624 lt_cv_shlibpath_overrides_runpath=no
16625 save_LDFLAGS=$LDFLAGS
16626 save_libdir=$libdir
16627 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
16628 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
16629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16630 /* end confdefs.h. */
16631  
16632 int
16633 main ()
16634 {
16635  
16636 ;
16637 return 0;
16638 }
16639 _ACEOF
16640 if ac_fn_cxx_try_link "$LINENO"; then :
16641 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
16642 lt_cv_shlibpath_overrides_runpath=yes
16643 fi
16644 fi
16645 rm -f core conftest.err conftest.$ac_objext \
16646 conftest$ac_exeext conftest.$ac_ext
16647 LDFLAGS=$save_LDFLAGS
16648 libdir=$save_libdir
16649  
16650 fi
16651  
16652 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
16653  
16654 # This implies no fast_install, which is unacceptable.
16655 # Some rework will be needed to allow for fast_install
16656 # before this can be enabled.
16657 hardcode_into_libs=yes
16658  
16659 # Ideally, we could use ldconfig to report *all* directores which are
16660 # searched for libraries, however this is still not possible. Aside from not
16661 # being certain /sbin/ldconfig is available, command
16662 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
16663 # even though it is searched at run-time. Try to do the best guess by
16664 # appending ld.so.conf contents (and includes) to the search path.
16665 if test -f /etc/ld.so.conf; then
16666 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
16667 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
16668 fi
16669  
16670 # We used to test for /lib/ld.so.1 and disable shared libraries on
16671 # powerpc, because MkLinux only supported shared libraries with the
16672 # GNU dynamic linker. Since this was broken with cross compilers,
16673 # most powerpc-linux boxes support dynamic linking these days and
16674 # people can always --disable-shared, the test was removed, and we
16675 # assume the GNU/Linux dynamic linker is in use.
16676 dynamic_linker='GNU/Linux ld.so'
16677 ;;
16678  
16679 netbsdelf*-gnu)
16680 version_type=linux
16681 need_lib_prefix=no
16682 need_version=no
16683 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
16684 soname_spec='${libname}${release}${shared_ext}$major'
16685 shlibpath_var=LD_LIBRARY_PATH
16686 shlibpath_overrides_runpath=no
16687 hardcode_into_libs=yes
16688 dynamic_linker='NetBSD ld.elf_so'
16689 ;;
16690  
16691 netbsd*)
16692 version_type=sunos
16693 need_lib_prefix=no
16694 need_version=no
16695 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
16696 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
16697 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16698 dynamic_linker='NetBSD (a.out) ld.so'
16699 else
16700 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16701 soname_spec='$libname$release$shared_ext$major'
16702 dynamic_linker='NetBSD ld.elf_so'
16703 fi
16704 shlibpath_var=LD_LIBRARY_PATH
16705 shlibpath_overrides_runpath=yes
16706 hardcode_into_libs=yes
16707 ;;
16708  
16709 newsos6)
16710 version_type=linux # correct to gnu/linux during the next big refactor
16711 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16712 shlibpath_var=LD_LIBRARY_PATH
16713 shlibpath_overrides_runpath=yes
16714 ;;
16715  
16716 *nto* | *qnx*)
16717 version_type=qnx
16718 need_lib_prefix=no
16719 need_version=no
16720 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16721 soname_spec='$libname$release$shared_ext$major'
16722 shlibpath_var=LD_LIBRARY_PATH
16723 shlibpath_overrides_runpath=no
16724 hardcode_into_libs=yes
16725 dynamic_linker='ldqnx.so'
16726 ;;
16727  
16728 openbsd* | bitrig*)
16729 version_type=sunos
16730 sys_lib_dlsearch_path_spec=/usr/lib
16731 need_lib_prefix=no
16732 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
16733 need_version=no
16734 else
16735 need_version=yes
16736 fi
16737 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
16738 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16739 shlibpath_var=LD_LIBRARY_PATH
16740 shlibpath_overrides_runpath=yes
16741 ;;
16742  
16743 os2*)
16744 libname_spec='$name'
16745 version_type=windows
16746 shrext_cmds=.dll
16747 need_version=no
16748 need_lib_prefix=no
16749 # OS/2 can only load a DLL with a base name of 8 characters or less.
16750 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
16751 v=$($ECHO $release$versuffix | tr -d .-);
16752 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
16753 $ECHO $n$v`$shared_ext'
16754 library_names_spec='${libname}_dll.$libext'
16755 dynamic_linker='OS/2 ld.exe'
16756 shlibpath_var=BEGINLIBPATH
16757 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
16758 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16759 postinstall_cmds='base_file=`basename \$file`~
16760 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
16761 dldir=$destdir/`dirname \$dlpath`~
16762 test -d \$dldir || mkdir -p \$dldir~
16763 $install_prog $dir/$dlname \$dldir/$dlname~
16764 chmod a+x \$dldir/$dlname~
16765 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
16766 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
16767 fi'
16768 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
16769 dlpath=$dir/\$dldll~
16770 $RM \$dlpath'
16771 ;;
16772  
16773 osf3* | osf4* | osf5*)
16774 version_type=osf
16775 need_lib_prefix=no
16776 need_version=no
16777 soname_spec='$libname$release$shared_ext$major'
16778 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16779 shlibpath_var=LD_LIBRARY_PATH
16780 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
16781 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
16782 ;;
16783  
16784 rdos*)
16785 dynamic_linker=no
16786 ;;
16787  
16788 solaris*)
16789 version_type=linux # correct to gnu/linux during the next big refactor
16790 need_lib_prefix=no
16791 need_version=no
16792 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16793 soname_spec='$libname$release$shared_ext$major'
16794 shlibpath_var=LD_LIBRARY_PATH
16795 shlibpath_overrides_runpath=yes
16796 hardcode_into_libs=yes
16797 # ldd complains unless libraries are executable
16798 postinstall_cmds='chmod +x $lib'
16799 ;;
16800  
16801 sunos4*)
16802 version_type=sunos
16803 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
16804 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
16805 shlibpath_var=LD_LIBRARY_PATH
16806 shlibpath_overrides_runpath=yes
16807 if test yes = "$with_gnu_ld"; then
16808 need_lib_prefix=no
16809 fi
16810 need_version=yes
16811 ;;
16812  
16813 sysv4 | sysv4.3*)
16814 version_type=linux # correct to gnu/linux during the next big refactor
16815 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16816 soname_spec='$libname$release$shared_ext$major'
16817 shlibpath_var=LD_LIBRARY_PATH
16818 case $host_vendor in
16819 sni)
16820 shlibpath_overrides_runpath=no
16821 need_lib_prefix=no
16822 runpath_var=LD_RUN_PATH
16823 ;;
16824 siemens)
16825 need_lib_prefix=no
16826 ;;
16827 motorola)
16828 need_lib_prefix=no
16829 need_version=no
16830 shlibpath_overrides_runpath=no
16831 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
16832 ;;
16833 esac
16834 ;;
16835  
16836 sysv4*MP*)
16837 if test -d /usr/nec; then
16838 version_type=linux # correct to gnu/linux during the next big refactor
16839 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
16840 soname_spec='$libname$shared_ext.$major'
16841 shlibpath_var=LD_LIBRARY_PATH
16842 fi
16843 ;;
16844  
16845 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
16846 version_type=sco
16847 need_lib_prefix=no
16848 need_version=no
16849 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
16850 soname_spec='$libname$release$shared_ext$major'
16851 shlibpath_var=LD_LIBRARY_PATH
16852 shlibpath_overrides_runpath=yes
16853 hardcode_into_libs=yes
16854 if test yes = "$with_gnu_ld"; then
16855 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
16856 else
16857 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
16858 case $host_os in
16859 sco3.2v5*)
16860 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
16861 ;;
16862 esac
16863 fi
16864 sys_lib_dlsearch_path_spec='/usr/lib'
16865 ;;
16866  
16867 tpf*)
16868 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
16869 version_type=linux # correct to gnu/linux during the next big refactor
16870 need_lib_prefix=no
16871 need_version=no
16872 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16873 shlibpath_var=LD_LIBRARY_PATH
16874 shlibpath_overrides_runpath=no
16875 hardcode_into_libs=yes
16876 ;;
16877  
16878 uts4*)
16879 version_type=linux # correct to gnu/linux during the next big refactor
16880 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
16881 soname_spec='$libname$release$shared_ext$major'
16882 shlibpath_var=LD_LIBRARY_PATH
16883 ;;
16884  
16885 *)
16886 dynamic_linker=no
16887 ;;
16888 esac
16889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
16890 $as_echo "$dynamic_linker" >&6; }
16891 test no = "$dynamic_linker" && can_build_shared=no
16892  
16893 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
16894 if test yes = "$GCC"; then
16895 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
16896 fi
16897  
16898 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
16899 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
16900 fi
16901  
16902 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
16903 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
16904 fi
16905  
16906 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
16907 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
16908  
16909 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
16910 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
16911  
16912 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
16913 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
16914  
16915  
16916  
16917  
16918  
16919  
16920  
16921  
16922  
16923  
16924  
16925  
16926  
16927  
16928  
16929  
16930  
16931  
16932  
16933  
16934  
16935  
16936  
16937  
16938  
16939  
16940  
16941  
16942  
16943  
16944  
16945  
16946  
16947  
16948  
16949  
16950  
16951  
16952  
16953  
16954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
16955 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
16956 hardcode_action_CXX=
16957 if test -n "$hardcode_libdir_flag_spec_CXX" ||
16958 test -n "$runpath_var_CXX" ||
16959 test yes = "$hardcode_automatic_CXX"; then
16960  
16961 # We can hardcode non-existent directories.
16962 if test no != "$hardcode_direct_CXX" &&
16963 # If the only mechanism to avoid hardcoding is shlibpath_var, we
16964 # have to relink, otherwise we might link with an installed library
16965 # when we should be linking with a yet-to-be-installed one
16966 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" &&
16967 test no != "$hardcode_minus_L_CXX"; then
16968 # Linking always hardcodes the temporary library directory.
16969 hardcode_action_CXX=relink
16970 else
16971 # We can link without hardcoding, and we can hardcode nonexisting dirs.
16972 hardcode_action_CXX=immediate
16973 fi
16974 else
16975 # We cannot hardcode anything, or else we can only hardcode existing
16976 # directories.
16977 hardcode_action_CXX=unsupported
16978 fi
16979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
16980 $as_echo "$hardcode_action_CXX" >&6; }
16981  
16982 if test relink = "$hardcode_action_CXX" ||
16983 test yes = "$inherit_rpath_CXX"; then
16984 # Fast installation is not supported
16985 enable_fast_install=no
16986 elif test yes = "$shlibpath_overrides_runpath" ||
16987 test no = "$enable_shared"; then
16988 # Fast installation is not necessary
16989 enable_fast_install=needless
16990 fi
16991  
16992  
16993  
16994  
16995  
16996  
16997  
16998 fi # test -n "$compiler"
16999  
17000 CC=$lt_save_CC
17001 CFLAGS=$lt_save_CFLAGS
17002 LDCXX=$LD
17003 LD=$lt_save_LD
17004 GCC=$lt_save_GCC
17005 with_gnu_ld=$lt_save_with_gnu_ld
17006 lt_cv_path_LDCXX=$lt_cv_path_LD
17007 lt_cv_path_LD=$lt_save_path_LD
17008 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
17009 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
17010 fi # test yes != "$_lt_caught_CXX_error"
17011  
17012 ac_ext=c
17013 ac_cpp='$CPP $CPPFLAGS'
17014 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17015 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17016 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17017  
17018  
17019 if test ! -z "$CXX"; then
17020 #
17021 # OK, we found something AC_LANG_CXX thinks is a C++ compiler,
17022 # but is it one?
17023 #
17024 # Some UN*Xes have, by default, a case-insensitive file
17025 # system, and AC_PROG_CXX looks for, among other things,
17026 # "CC" as a C++ compiler, and, if you have a case-insensitive
17027 # file system and a C compiler named "cc" (both true, by
17028 # default, on OS X), AC_PROG_CXX may end up thinking it's
17029 # the C++ compiler.
17030 #
17031 # So we check by feeding the purported C++ compiler a
17032 # program using C++ features (iostream).
17033 #
17034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX is a C++ compiler" >&5
17035 $as_echo_n "checking whether $CXX is a C++ compiler... " >&6; }
17036 ac_ext=cpp
17037 ac_cpp='$CXXCPP $CPPFLAGS'
17038 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17039 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17040 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17041  
17042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17043 /* end confdefs.h. */
17044  
17045 #include <iostream>
17046  
17047 int
17048 main ()
17049 {
17050  
17051 std::cout << "Hello World! ";
17052 return 0;
17053  
17054 ;
17055 return 0;
17056 }
17057 _ACEOF
17058 if ac_fn_cxx_try_link "$LINENO"; then :
17059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17060 $as_echo "yes" >&6; }
17061 else
17062  
17063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17064 $as_echo "no" >&6; }
17065 CXX=""
17066  
17067 fi
17068 rm -f core conftest.err conftest.$ac_objext \
17069 conftest$ac_exeext conftest.$ac_ext
17070 ac_ext=c
17071 ac_cpp='$CPP $CPPFLAGS'
17072 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17073 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17074 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17075  
17076 fi
17077  
17078 # Qt 5.7 or later requires C++11
17079 if test -n "$CXX"; then :
17080 ax_cxx_compile_cxx11_required=false
17081 ac_ext=cpp
17082 ac_cpp='$CXXCPP $CPPFLAGS'
17083 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17084 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17085 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17086 ac_success=no
17087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
17088 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
17089 if ${ax_cv_cxx_compile_cxx11+:} false; then :
17090 $as_echo_n "(cached) " >&6
17091 else
17092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17093 /* end confdefs.h. */
17094  
17095  
17096 // If the compiler admits that it is not ready for C++11, why torture it?
17097 // Hopefully, this will speed up the test.
17098  
17099 #ifndef __cplusplus
17100  
17101 #error "This is not a C++ compiler"
17102  
17103 #elif __cplusplus < 201103L
17104  
17105 #error "This is not a C++11 compiler"
17106  
17107 #else
17108  
17109 namespace cxx11
17110 {
17111  
17112 namespace test_static_assert
17113 {
17114  
17115 template <typename T>
17116 struct check
17117 {
17118 static_assert(sizeof(int) <= sizeof(T), "not big enough");
17119 };
17120  
17121 }
17122  
17123 namespace test_final_override
17124 {
17125  
17126 struct Base
17127 {
17128 virtual void f() {}
17129 };
17130  
17131 struct Derived : public Base
17132 {
17133 virtual void f() override {}
17134 };
17135  
17136 }
17137  
17138 namespace test_double_right_angle_brackets
17139 {
17140  
17141 template < typename T >
17142 struct check {};
17143  
17144 typedef check<void> single_type;
17145 typedef check<check<void>> double_type;
17146 typedef check<check<check<void>>> triple_type;
17147 typedef check<check<check<check<void>>>> quadruple_type;
17148  
17149 }
17150  
17151 namespace test_decltype
17152 {
17153  
17154 int
17155 f()
17156 {
17157 int a = 1;
17158 decltype(a) b = 2;
17159 return a + b;
17160 }
17161  
17162 }
17163  
17164 namespace test_type_deduction
17165 {
17166  
17167 template < typename T1, typename T2 >
17168 struct is_same
17169 {
17170 static const bool value = false;
17171 };
17172  
17173 template < typename T >
17174 struct is_same<T, T>
17175 {
17176 static const bool value = true;
17177 };
17178  
17179 template < typename T1, typename T2 >
17180 auto
17181 add(T1 a1, T2 a2) -> decltype(a1 + a2)
17182 {
17183 return a1 + a2;
17184 }
17185  
17186 int
17187 test(const int c, volatile int v)
17188 {
17189 static_assert(is_same<int, decltype(0)>::value == true, "");
17190 static_assert(is_same<int, decltype(c)>::value == false, "");
17191 static_assert(is_same<int, decltype(v)>::value == false, "");
17192 auto ac = c;
17193 auto av = v;
17194 auto sumi = ac + av + 'x';
17195 auto sumf = ac + av + 1.0;
17196 static_assert(is_same<int, decltype(ac)>::value == true, "");
17197 static_assert(is_same<int, decltype(av)>::value == true, "");
17198 static_assert(is_same<int, decltype(sumi)>::value == true, "");
17199 static_assert(is_same<int, decltype(sumf)>::value == false, "");
17200 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
17201 return (sumf > 0.0) ? sumi : add(c, v);
17202 }
17203  
17204 }
17205  
17206 namespace test_noexcept
17207 {
17208  
17209 int f() { return 0; }
17210 int g() noexcept { return 0; }
17211  
17212 static_assert(noexcept(f()) == false, "");
17213 static_assert(noexcept(g()) == true, "");
17214  
17215 }
17216  
17217 namespace test_constexpr
17218 {
17219  
17220 template < typename CharT >
17221 unsigned long constexpr
17222 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
17223 {
17224 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
17225 }
17226  
17227 template < typename CharT >
17228 unsigned long constexpr
17229 strlen_c(const CharT *const s) noexcept
17230 {
17231 return strlen_c_r(s, 0UL);
17232 }
17233  
17234 static_assert(strlen_c("") == 0UL, "");
17235 static_assert(strlen_c("1") == 1UL, "");
17236 static_assert(strlen_c("example") == 7UL, "");
17237 static_assert(strlen_c("another\0example") == 7UL, "");
17238  
17239 }
17240  
17241 namespace test_rvalue_references
17242 {
17243  
17244 template < int N >
17245 struct answer
17246 {
17247 static constexpr int value = N;
17248 };
17249  
17250 answer<1> f(int&) { return answer<1>(); }
17251 answer<2> f(const int&) { return answer<2>(); }
17252 answer<3> f(int&&) { return answer<3>(); }
17253  
17254 void
17255 test()
17256 {
17257 int i = 0;
17258 const int c = 0;
17259 static_assert(decltype(f(i))::value == 1, "");
17260 static_assert(decltype(f(c))::value == 2, "");
17261 static_assert(decltype(f(0))::value == 3, "");
17262 }
17263  
17264 }
17265  
17266 namespace test_uniform_initialization
17267 {
17268  
17269 struct test
17270 {
17271 static const int zero {};
17272 static const int one {1};
17273 };
17274  
17275 static_assert(test::zero == 0, "");
17276 static_assert(test::one == 1, "");
17277  
17278 }
17279  
17280 namespace test_lambdas
17281 {
17282  
17283 void
17284 test1()
17285 {
17286 auto lambda1 = [](){};
17287 auto lambda2 = lambda1;
17288 lambda1();
17289 lambda2();
17290 }
17291  
17292 int
17293 test2()
17294 {
17295 auto a = [](int i, int j){ return i + j; }(1, 2);
17296 auto b = []() -> int { return '0'; }();
17297 auto c = [=](){ return a + b; }();
17298 auto d = [&](){ return c; }();
17299 auto e = [a, &b](int x) mutable {
17300 const auto identity = [](int y){ return y; };
17301 for (auto i = 0; i < a; ++i)
17302 a += b--;
17303 return x + identity(a + b);
17304 }(0);
17305 return a + b + c + d + e;
17306 }
17307  
17308 int
17309 test3()
17310 {
17311 const auto nullary = [](){ return 0; };
17312 const auto unary = [](int x){ return x; };
17313 using nullary_t = decltype(nullary);
17314 using unary_t = decltype(unary);
17315 const auto higher1st = [](nullary_t f){ return f(); };
17316 const auto higher2nd = [unary](nullary_t f1){
17317 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
17318 };
17319 return higher1st(nullary) + higher2nd(nullary)(unary);
17320 }
17321  
17322 }
17323  
17324 namespace test_variadic_templates
17325 {
17326  
17327 template <int...>
17328 struct sum;
17329  
17330 template <int N0, int... N1toN>
17331 struct sum<N0, N1toN...>
17332 {
17333 static constexpr auto value = N0 + sum<N1toN...>::value;
17334 };
17335  
17336 template <>
17337 struct sum<>
17338 {
17339 static constexpr auto value = 0;
17340 };
17341  
17342 static_assert(sum<>::value == 0, "");
17343 static_assert(sum<1>::value == 1, "");
17344 static_assert(sum<23>::value == 23, "");
17345 static_assert(sum<1, 2>::value == 3, "");
17346 static_assert(sum<5, 5, 11>::value == 21, "");
17347 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
17348  
17349 }
17350  
17351 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
17352 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
17353 // because of this.
17354 namespace test_template_alias_sfinae
17355 {
17356  
17357 struct foo {};
17358  
17359 template<typename T>
17360 using member = typename T::member_type;
17361  
17362 template<typename T>
17363 void func(...) {}
17364  
17365 template<typename T>
17366 void func(member<T>*) {}
17367  
17368 void test();
17369  
17370 void test() { func<foo>(0); }
17371  
17372 }
17373  
17374 } // namespace cxx11
17375  
17376 #endif // __cplusplus >= 201103L
17377  
17378  
17379  
17380 _ACEOF
17381 if ac_fn_cxx_try_compile "$LINENO"; then :
17382 ax_cv_cxx_compile_cxx11=yes
17383 else
17384 ax_cv_cxx_compile_cxx11=no
17385 fi
17386 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17387 fi
17388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
17389 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
17390 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
17391 ac_success=yes
17392 fi
17393  
17394  
17395  
17396 if test x$ac_success = xno; then
17397 for switch in -std=c++11 -std=c++0x +std=c++11 "-h std=c++11"; do
17398 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
17399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
17400 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
17401 if eval \${$cachevar+:} false; then :
17402 $as_echo_n "(cached) " >&6
17403 else
17404 ac_save_CXX="$CXX"
17405 CXX="$CXX $switch"
17406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17407 /* end confdefs.h. */
17408  
17409  
17410 // If the compiler admits that it is not ready for C++11, why torture it?
17411 // Hopefully, this will speed up the test.
17412  
17413 #ifndef __cplusplus
17414  
17415 #error "This is not a C++ compiler"
17416  
17417 #elif __cplusplus < 201103L
17418  
17419 #error "This is not a C++11 compiler"
17420  
17421 #else
17422  
17423 namespace cxx11
17424 {
17425  
17426 namespace test_static_assert
17427 {
17428  
17429 template <typename T>
17430 struct check
17431 {
17432 static_assert(sizeof(int) <= sizeof(T), "not big enough");
17433 };
17434  
17435 }
17436  
17437 namespace test_final_override
17438 {
17439  
17440 struct Base
17441 {
17442 virtual void f() {}
17443 };
17444  
17445 struct Derived : public Base
17446 {
17447 virtual void f() override {}
17448 };
17449  
17450 }
17451  
17452 namespace test_double_right_angle_brackets
17453 {
17454  
17455 template < typename T >
17456 struct check {};
17457  
17458 typedef check<void> single_type;
17459 typedef check<check<void>> double_type;
17460 typedef check<check<check<void>>> triple_type;
17461 typedef check<check<check<check<void>>>> quadruple_type;
17462  
17463 }
17464  
17465 namespace test_decltype
17466 {
17467  
17468 int
17469 f()
17470 {
17471 int a = 1;
17472 decltype(a) b = 2;
17473 return a + b;
17474 }
17475  
17476 }
17477  
17478 namespace test_type_deduction
17479 {
17480  
17481 template < typename T1, typename T2 >
17482 struct is_same
17483 {
17484 static const bool value = false;
17485 };
17486  
17487 template < typename T >
17488 struct is_same<T, T>
17489 {
17490 static const bool value = true;
17491 };
17492  
17493 template < typename T1, typename T2 >
17494 auto
17495 add(T1 a1, T2 a2) -> decltype(a1 + a2)
17496 {
17497 return a1 + a2;
17498 }
17499  
17500 int
17501 test(const int c, volatile int v)
17502 {
17503 static_assert(is_same<int, decltype(0)>::value == true, "");
17504 static_assert(is_same<int, decltype(c)>::value == false, "");
17505 static_assert(is_same<int, decltype(v)>::value == false, "");
17506 auto ac = c;
17507 auto av = v;
17508 auto sumi = ac + av + 'x';
17509 auto sumf = ac + av + 1.0;
17510 static_assert(is_same<int, decltype(ac)>::value == true, "");
17511 static_assert(is_same<int, decltype(av)>::value == true, "");
17512 static_assert(is_same<int, decltype(sumi)>::value == true, "");
17513 static_assert(is_same<int, decltype(sumf)>::value == false, "");
17514 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
17515 return (sumf > 0.0) ? sumi : add(c, v);
17516 }
17517  
17518 }
17519  
17520 namespace test_noexcept
17521 {
17522  
17523 int f() { return 0; }
17524 int g() noexcept { return 0; }
17525  
17526 static_assert(noexcept(f()) == false, "");
17527 static_assert(noexcept(g()) == true, "");
17528  
17529 }
17530  
17531 namespace test_constexpr
17532 {
17533  
17534 template < typename CharT >
17535 unsigned long constexpr
17536 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
17537 {
17538 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
17539 }
17540  
17541 template < typename CharT >
17542 unsigned long constexpr
17543 strlen_c(const CharT *const s) noexcept
17544 {
17545 return strlen_c_r(s, 0UL);
17546 }
17547  
17548 static_assert(strlen_c("") == 0UL, "");
17549 static_assert(strlen_c("1") == 1UL, "");
17550 static_assert(strlen_c("example") == 7UL, "");
17551 static_assert(strlen_c("another\0example") == 7UL, "");
17552  
17553 }
17554  
17555 namespace test_rvalue_references
17556 {
17557  
17558 template < int N >
17559 struct answer
17560 {
17561 static constexpr int value = N;
17562 };
17563  
17564 answer<1> f(int&) { return answer<1>(); }
17565 answer<2> f(const int&) { return answer<2>(); }
17566 answer<3> f(int&&) { return answer<3>(); }
17567  
17568 void
17569 test()
17570 {
17571 int i = 0;
17572 const int c = 0;
17573 static_assert(decltype(f(i))::value == 1, "");
17574 static_assert(decltype(f(c))::value == 2, "");
17575 static_assert(decltype(f(0))::value == 3, "");
17576 }
17577  
17578 }
17579  
17580 namespace test_uniform_initialization
17581 {
17582  
17583 struct test
17584 {
17585 static const int zero {};
17586 static const int one {1};
17587 };
17588  
17589 static_assert(test::zero == 0, "");
17590 static_assert(test::one == 1, "");
17591  
17592 }
17593  
17594 namespace test_lambdas
17595 {
17596  
17597 void
17598 test1()
17599 {
17600 auto lambda1 = [](){};
17601 auto lambda2 = lambda1;
17602 lambda1();
17603 lambda2();
17604 }
17605  
17606 int
17607 test2()
17608 {
17609 auto a = [](int i, int j){ return i + j; }(1, 2);
17610 auto b = []() -> int { return '0'; }();
17611 auto c = [=](){ return a + b; }();
17612 auto d = [&](){ return c; }();
17613 auto e = [a, &b](int x) mutable {
17614 const auto identity = [](int y){ return y; };
17615 for (auto i = 0; i < a; ++i)
17616 a += b--;
17617 return x + identity(a + b);
17618 }(0);
17619 return a + b + c + d + e;
17620 }
17621  
17622 int
17623 test3()
17624 {
17625 const auto nullary = [](){ return 0; };
17626 const auto unary = [](int x){ return x; };
17627 using nullary_t = decltype(nullary);
17628 using unary_t = decltype(unary);
17629 const auto higher1st = [](nullary_t f){ return f(); };
17630 const auto higher2nd = [unary](nullary_t f1){
17631 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
17632 };
17633 return higher1st(nullary) + higher2nd(nullary)(unary);
17634 }
17635  
17636 }
17637  
17638 namespace test_variadic_templates
17639 {
17640  
17641 template <int...>
17642 struct sum;
17643  
17644 template <int N0, int... N1toN>
17645 struct sum<N0, N1toN...>
17646 {
17647 static constexpr auto value = N0 + sum<N1toN...>::value;
17648 };
17649  
17650 template <>
17651 struct sum<>
17652 {
17653 static constexpr auto value = 0;
17654 };
17655  
17656 static_assert(sum<>::value == 0, "");
17657 static_assert(sum<1>::value == 1, "");
17658 static_assert(sum<23>::value == 23, "");
17659 static_assert(sum<1, 2>::value == 3, "");
17660 static_assert(sum<5, 5, 11>::value == 21, "");
17661 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
17662  
17663 }
17664  
17665 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
17666 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
17667 // because of this.
17668 namespace test_template_alias_sfinae
17669 {
17670  
17671 struct foo {};
17672  
17673 template<typename T>
17674 using member = typename T::member_type;
17675  
17676 template<typename T>
17677 void func(...) {}
17678  
17679 template<typename T>
17680 void func(member<T>*) {}
17681  
17682 void test();
17683  
17684 void test() { func<foo>(0); }
17685  
17686 }
17687  
17688 } // namespace cxx11
17689  
17690 #endif // __cplusplus >= 201103L
17691  
17692  
17693  
17694 _ACEOF
17695 if ac_fn_cxx_try_compile "$LINENO"; then :
17696 eval $cachevar=yes
17697 else
17698 eval $cachevar=no
17699 fi
17700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17701 CXX="$ac_save_CXX"
17702 fi
17703 eval ac_res=\$$cachevar
17704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17705 $as_echo "$ac_res" >&6; }
17706 if eval test x\$$cachevar = xyes; then
17707 CXX="$CXX $switch"
17708 if test -n "$CXXCPP" ; then
17709 CXXCPP="$CXXCPP $switch"
17710 fi
17711 ac_success=yes
17712 break
17713 fi
17714 done
17715 fi
17716 ac_ext=c
17717 ac_cpp='$CPP $CPPFLAGS'
17718 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17719 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17720 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17721  
17722 if test x$ax_cxx_compile_cxx11_required = xtrue; then
17723 if test x$ac_success = xno; then
17724 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
17725 fi
17726 fi
17727 if test x$ac_success = xno; then
17728 HAVE_CXX11=0
17729 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
17730 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
17731 else
17732 HAVE_CXX11=1
17733  
17734 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
17735  
17736 fi
17737  
17738  
17739 fi
17740  
17741 # Set CC_FOR_BUILD (the *local* gcc to use for building e.g. lemon)
17742 if test "x$cross_compiling" = xno -a -z "$CC_FOR_BUILD"; then
17743 CC_FOR_BUILD="$CC"
17744 fi
17745  
17746  
17747  
17748 save_cross_compiling=$cross_compiling
17749 save_ac_tool_prefix=$ac_tool_prefix
17750 cross_compiling=no
17751 ac_tool_prefix=
17752  
17753 ac_ext=c
17754 ac_build_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD'
17755 ac_build_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5'
17756 ac_build_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5'
17757 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17758 if test -n "$ac_tool_prefix"; then
17759 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
17760 set dummy ${ac_tool_prefix}gcc; ac_word=$2
17761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17762 $as_echo_n "checking for $ac_word... " >&6; }
17763 if ${ac_cv_prog_CC_FOR_BUILD+:} false; then :
17764 $as_echo_n "(cached) " >&6
17765 else
17766 if test -n "$CC_FOR_BUILD"; then
17767 ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test.
17768 else
17769 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17770 for as_dir in $PATH
17771 do
17772 IFS=$as_save_IFS
17773 test -z "$as_dir" && as_dir=.
17774 for ac_exec_ext in '' $ac_executable_extensions; do
17775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17776 ac_cv_prog_CC_FOR_BUILD="${ac_tool_prefix}gcc"
17777 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17778 break 2
17779 fi
17780 done
17781 done
17782 IFS=$as_save_IFS
17783  
17784 fi
17785 fi
17786 CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD
17787 if test -n "$CC_FOR_BUILD"; then
17788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5
17789 $as_echo "$CC_FOR_BUILD" >&6; }
17790 else
17791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17792 $as_echo "no" >&6; }
17793 fi
17794  
17795  
17796 fi
17797 if test -z "$ac_cv_prog_CC_FOR_BUILD"; then
17798 ac_ct_CC_FOR_BUILD=$CC_FOR_BUILD
17799 # Extract the first word of "gcc", so it can be a program name with args.
17800 set dummy gcc; ac_word=$2
17801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17802 $as_echo_n "checking for $ac_word... " >&6; }
17803 if ${ac_cv_prog_ac_ct_CC_FOR_BUILD+:} false; then :
17804 $as_echo_n "(cached) " >&6
17805 else
17806 if test -n "$ac_ct_CC_FOR_BUILD"; then
17807 ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_ct_CC_FOR_BUILD" # Let the user override the test.
17808 else
17809 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17810 for as_dir in $PATH
17811 do
17812 IFS=$as_save_IFS
17813 test -z "$as_dir" && as_dir=.
17814 for ac_exec_ext in '' $ac_executable_extensions; do
17815 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17816 ac_cv_prog_ac_ct_CC_FOR_BUILD="gcc"
17817 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17818 break 2
17819 fi
17820 done
17821 done
17822 IFS=$as_save_IFS
17823  
17824 fi
17825 fi
17826 ac_ct_CC_FOR_BUILD=$ac_cv_prog_ac_ct_CC_FOR_BUILD
17827 if test -n "$ac_ct_CC_FOR_BUILD"; then
17828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC_FOR_BUILD" >&5
17829 $as_echo "$ac_ct_CC_FOR_BUILD" >&6; }
17830 else
17831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17832 $as_echo "no" >&6; }
17833 fi
17834  
17835 if test "x$ac_ct_CC_FOR_BUILD" = x; then
17836 CC_FOR_BUILD=""
17837 else
17838 case $cross_compiling:$ac_tool_warned in
17839 yes:)
17840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with build triplet" >&5
17841 $as_echo "$as_me: WARNING: using cross tools not prefixed with build triplet" >&2;}
17842 ac_tool_warned=yes ;;
17843 esac
17844 CC_FOR_BUILD=$ac_ct_CC_FOR_BUILD
17845 fi
17846 else
17847 CC_FOR_BUILD="$ac_cv_prog_CC_FOR_BUILD"
17848 fi
17849  
17850 if test -z "$CC_FOR_BUILD"; then
17851 if test -n "$ac_tool_prefix"; then
17852 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
17853 set dummy ${ac_tool_prefix}cc; ac_word=$2
17854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17855 $as_echo_n "checking for $ac_word... " >&6; }
17856 if ${ac_cv_prog_CC_FOR_BUILD+:} false; then :
17857 $as_echo_n "(cached) " >&6
17858 else
17859 if test -n "$CC_FOR_BUILD"; then
17860 ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test.
17861 else
17862 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17863 for as_dir in $PATH
17864 do
17865 IFS=$as_save_IFS
17866 test -z "$as_dir" && as_dir=.
17867 for ac_exec_ext in '' $ac_executable_extensions; do
17868 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17869 ac_cv_prog_CC_FOR_BUILD="${ac_tool_prefix}cc"
17870 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17871 break 2
17872 fi
17873 done
17874 done
17875 IFS=$as_save_IFS
17876  
17877 fi
17878 fi
17879 CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD
17880 if test -n "$CC_FOR_BUILD"; then
17881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5
17882 $as_echo "$CC_FOR_BUILD" >&6; }
17883 else
17884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17885 $as_echo "no" >&6; }
17886 fi
17887  
17888  
17889 fi
17890 fi
17891 if test -z "$CC_FOR_BUILD"; then
17892 # Extract the first word of "cc", so it can be a program name with args.
17893 set dummy cc; ac_word=$2
17894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17895 $as_echo_n "checking for $ac_word... " >&6; }
17896 if ${ac_cv_prog_CC_FOR_BUILD+:} false; then :
17897 $as_echo_n "(cached) " >&6
17898 else
17899 if test -n "$CC_FOR_BUILD"; then
17900 ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test.
17901 else
17902 ac_prog_rejected=no
17903 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17904 for as_dir in $PATH
17905 do
17906 IFS=$as_save_IFS
17907 test -z "$as_dir" && as_dir=.
17908 for ac_exec_ext in '' $ac_executable_extensions; do
17909 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17910 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
17911 ac_prog_rejected=yes
17912 continue
17913 fi
17914 ac_cv_prog_CC_FOR_BUILD="cc"
17915 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17916 break 2
17917 fi
17918 done
17919 done
17920 IFS=$as_save_IFS
17921  
17922 if test $ac_prog_rejected = yes; then
17923 # We found a bogon in the path, so make sure we never use it.
17924 set dummy $ac_cv_prog_CC_FOR_BUILD
17925 shift
17926 if test $# != 0; then
17927 # We chose a different compiler from the bogus one.
17928 # However, it has the same basename, so the bogon will be chosen
17929 # first if we set CC_FOR_BUILD to just the basename; use the full file name.
17930 shift
17931 ac_cv_prog_CC_FOR_BUILD="$as_dir/$ac_word${1+' '}$@"
17932 fi
17933 fi
17934 fi
17935 fi
17936 CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD
17937 if test -n "$CC_FOR_BUILD"; then
17938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5
17939 $as_echo "$CC_FOR_BUILD" >&6; }
17940 else
17941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17942 $as_echo "no" >&6; }
17943 fi
17944  
17945  
17946 fi
17947 if test -z "$CC_FOR_BUILD"; then
17948 if test -n "$ac_tool_prefix"; then
17949 for ac_prog in cl.exe
17950 do
17951 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
17952 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
17953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17954 $as_echo_n "checking for $ac_word... " >&6; }
17955 if ${ac_cv_prog_CC_FOR_BUILD+:} false; then :
17956 $as_echo_n "(cached) " >&6
17957 else
17958 if test -n "$CC_FOR_BUILD"; then
17959 ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test.
17960 else
17961 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17962 for as_dir in $PATH
17963 do
17964 IFS=$as_save_IFS
17965 test -z "$as_dir" && as_dir=.
17966 for ac_exec_ext in '' $ac_executable_extensions; do
17967 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17968 ac_cv_prog_CC_FOR_BUILD="$ac_tool_prefix$ac_prog"
17969 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17970 break 2
17971 fi
17972 done
17973 done
17974 IFS=$as_save_IFS
17975  
17976 fi
17977 fi
17978 CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD
17979 if test -n "$CC_FOR_BUILD"; then
17980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5
17981 $as_echo "$CC_FOR_BUILD" >&6; }
17982 else
17983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17984 $as_echo "no" >&6; }
17985 fi
17986  
17987  
17988 test -n "$CC_FOR_BUILD" && break
17989 done
17990 fi
17991 if test -z "$CC_FOR_BUILD"; then
17992 ac_ct_CC_FOR_BUILD=$CC_FOR_BUILD
17993 for ac_prog in cl.exe
17994 do
17995 # Extract the first word of "$ac_prog", so it can be a program name with args.
17996 set dummy $ac_prog; ac_word=$2
17997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17998 $as_echo_n "checking for $ac_word... " >&6; }
17999 if ${ac_cv_prog_ac_ct_CC_FOR_BUILD+:} false; then :
18000 $as_echo_n "(cached) " >&6
18001 else
18002 if test -n "$ac_ct_CC_FOR_BUILD"; then
18003 ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_ct_CC_FOR_BUILD" # Let the user override the test.
18004 else
18005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18006 for as_dir in $PATH
18007 do
18008 IFS=$as_save_IFS
18009 test -z "$as_dir" && as_dir=.
18010 for ac_exec_ext in '' $ac_executable_extensions; do
18011 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18012 ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_prog"
18013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18014 break 2
18015 fi
18016 done
18017 done
18018 IFS=$as_save_IFS
18019  
18020 fi
18021 fi
18022 ac_ct_CC_FOR_BUILD=$ac_cv_prog_ac_ct_CC_FOR_BUILD
18023 if test -n "$ac_ct_CC_FOR_BUILD"; then
18024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC_FOR_BUILD" >&5
18025 $as_echo "$ac_ct_CC_FOR_BUILD" >&6; }
18026 else
18027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18028 $as_echo "no" >&6; }
18029 fi
18030  
18031  
18032 test -n "$ac_ct_CC_FOR_BUILD" && break
18033 done
18034  
18035 if test "x$ac_ct_CC_FOR_BUILD" = x; then
18036 CC_FOR_BUILD=""
18037 else
18038 case $cross_compiling:$ac_tool_warned in
18039 yes:)
18040 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with build triplet" >&5
18041 $as_echo "$as_me: WARNING: using cross tools not prefixed with build triplet" >&2;}
18042 ac_tool_warned=yes ;;
18043 esac
18044 CC_FOR_BUILD=$ac_ct_CC_FOR_BUILD
18045 fi
18046 fi
18047  
18048 fi
18049  
18050  
18051 test -z "$CC_FOR_BUILD" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18052 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18053 as_fn_error $? "no acceptable C compiler found in \$PATH
18054 See \`config.log' for more details" "$LINENO" 5; }
18055  
18056 # Provide some information about the compiler.
18057 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
18058 set X $ac_build_compile
18059 ac_compiler=$2
18060 for ac_option in --version -v -V -qversion; do
18061 { { ac_try="$ac_compiler $ac_option >&5"
18062 case "(($ac_try" in
18063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18064 *) ac_try_echo=$ac_try;;
18065 esac
18066 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18067 $as_echo "$ac_try_echo"; } >&5
18068 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
18069 ac_status=$?
18070 if test -s conftest.err; then
18071 sed '10a\
18072 ... rest of stderr output deleted ...
18073 10q' conftest.err >conftest.er1
18074 cat conftest.er1 >&5
18075 fi
18076 rm -f conftest.er1 conftest.err
18077 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18078 test $ac_status = 0; }
18079 done
18080  
18081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
18082 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
18083 if ${ac_cv_c_compiler_gnu+:} false; then :
18084 $as_echo_n "(cached) " >&6
18085 else
18086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18087 /* end confdefs.h. */
18088  
18089 int
18090 main ()
18091 {
18092 #ifndef __GNUC__
18093 choke me
18094 #endif
18095  
18096 ;
18097 return 0;
18098 }
18099 _ACEOF
18100 if ac_fn_c_try_compile "$LINENO"; then :
18101 ac_compiler_gnu=yes
18102 else
18103 ac_compiler_gnu=no
18104 fi
18105 rm -f core conftest.err conftest.$ac_build_objext conftest.$ac_ext
18106 ac_cv_c_compiler_gnu=$ac_compiler_gnu
18107  
18108 fi
18109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
18110 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
18111 if test $ac_compiler_gnu = yes; then
18112 GCC=yes
18113 else
18114 GCC=
18115 fi
18116 ac_test_CFLAGS=${CFLAGS_FOR_BUILD+set}
18117 ac_save_CFLAGS=$CFLAGS_FOR_BUILD
18118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD accepts -g" >&5
18119 $as_echo_n "checking whether $CC_FOR_BUILD accepts -g... " >&6; }
18120 if ${ac_cv_build_prog_cc_g+:} false; then :
18121 $as_echo_n "(cached) " >&6
18122 else
18123 ac_save_c_werror_flag=$ac_c_werror_flag
18124 ac_c_werror_flag=yes
18125 ac_cv_build_prog_cc_g=no
18126 CFLAGS_FOR_BUILD="-g"
18127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18128 /* end confdefs.h. */
18129  
18130 int
18131 main ()
18132 {
18133  
18134 ;
18135 return 0;
18136 }
18137 _ACEOF
18138 if ac_fn_c_try_compile "$LINENO"; then :
18139 ac_cv_build_prog_cc_g=yes
18140 else
18141 CFLAGS_FOR_BUILD=""
18142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18143 /* end confdefs.h. */
18144  
18145 int
18146 main ()
18147 {
18148  
18149 ;
18150 return 0;
18151 }
18152 _ACEOF
18153 if ac_fn_c_try_compile "$LINENO"; then :
18154  
18155 else
18156 ac_c_werror_flag=$ac_save_c_werror_flag
18157 CFLAGS_FOR_BUILD="-g"
18158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18159 /* end confdefs.h. */
18160  
18161 int
18162 main ()
18163 {
18164  
18165 ;
18166 return 0;
18167 }
18168 _ACEOF
18169 if ac_fn_c_try_compile "$LINENO"; then :
18170 ac_cv_build_prog_cc_g=yes
18171 fi
18172 rm -f core conftest.err conftest.$ac_build_objext conftest.$ac_ext
18173 fi
18174 rm -f core conftest.err conftest.$ac_build_objext conftest.$ac_ext
18175 fi
18176 rm -f core conftest.err conftest.$ac_build_objext conftest.$ac_ext
18177 ac_c_werror_flag=$ac_save_c_werror_flag
18178 fi
18179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_g" >&5
18180 $as_echo "$ac_cv_build_prog_cc_g" >&6; }
18181 if test "$ac_test_CFLAGS" = set; then
18182 CFLAGS_FOR_BUILD=$ac_save_CFLAGS
18183 elif test $ac_cv_build_prog_cc_g = yes; then
18184 if test "$GCC" = yes; then
18185 CFLAGS_FOR_BUILD="-g -O2"
18186 else
18187 CFLAGS_FOR_BUILD="-g"
18188 fi
18189 else
18190 if test "$GCC" = yes; then
18191 CFLAGS_FOR_BUILD="-O2"
18192 else
18193 CFLAGS_FOR_BUILD=
18194 fi
18195 fi
18196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC_FOR_BUILD option to accept ISO C89" >&5
18197 $as_echo_n "checking for $CC_FOR_BUILD option to accept ISO C89... " >&6; }
18198 if ${ac_cv_prog_cc_c89+:} false; then :
18199 $as_echo_n "(cached) " >&6
18200 else
18201 ac_cv_prog_cc_c89=no
18202 ac_save_CC=$CC_FOR_BUILD
18203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18204 /* end confdefs.h. */
18205 #include <stdarg.h>
18206 #include <stdio.h>
18207 struct stat;
18208 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
18209 struct buf { int x; };
18210 FILE * (*rcsopen) (struct buf *, struct stat *, int);
18211 static char *e (p, i)
18212 char **p;
18213 int i;
18214 {
18215 return p[i];
18216 }
18217 static char *f (char * (*g) (char **, int), char **p, ...)
18218 {
18219 char *s;
18220 va_list v;
18221 va_start (v,p);
18222 s = g (p, va_arg (v,int));
18223 va_end (v);
18224 return s;
18225 }
18226  
18227 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
18228 function prototypes and stuff, but not '\xHH' hex character constants.
18229 These don't provoke an error unfortunately, instead are silently treated
18230 as 'x'. The following induces an error, until -std is added to get
18231 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
18232 array size at least. It's necessary to write '\x00'==0 to get something
18233 that's true only with -std. */
18234 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
18235  
18236 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
18237 inside strings and character constants. */
18238 #define FOO(x) 'x'
18239 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
18240  
18241 int test (int i, double x);
18242 struct s1 {int (*f) (int a);};
18243 struct s2 {int (*f) (double a);};
18244 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
18245 int argc;
18246 char **argv;
18247 int
18248 main ()
18249 {
18250 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
18251 ;
18252 return 0;
18253 }
18254 _ACEOF
18255 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
18256 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
18257 do
18258 CC_FOR_BUILD="$ac_save_CC $ac_arg"
18259 if ac_fn_c_try_compile "$LINENO"; then :
18260 ac_cv_prog_cc_c89=$ac_arg
18261 fi
18262 rm -f core conftest.err conftest.$ac_build_objext
18263 test "x$ac_cv_prog_cc_c89" != "xno" && break
18264 done
18265 rm -f conftest.$ac_ext
18266 CC_FOR_BUILD=$ac_save_CC
18267  
18268 fi
18269 # AC_CACHE_VAL
18270 case "x$ac_cv_prog_cc_c89" in
18271 x)
18272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
18273 $as_echo "none needed" >&6; } ;;
18274 xno)
18275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
18276 $as_echo "unsupported" >&6; } ;;
18277 *)
18278 CC_FOR_BUILD="$CC_FOR_BUILD $ac_cv_prog_cc_c89"
18279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
18280 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
18281 esac
18282 if test "x$ac_cv_prog_cc_c89" != xno; then :
18283  
18284 fi
18285  
18286 ac_ext=c
18287 ac_build_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD'
18288 ac_build_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5'
18289 ac_build_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5'
18290 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18291  
18292 ac_ext=c
18293 ac_build_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD'
18294 ac_build_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5'
18295 ac_build_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5'
18296 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD understands -c and -o together" >&5
18298 $as_echo_n "checking whether $CC_FOR_BUILD understands -c and -o together... " >&6; }
18299 if ${am_cv_prog_cc_c_o+:} false; then :
18300 $as_echo_n "(cached) " >&6
18301 else
18302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18303 /* end confdefs.h. */
18304  
18305 int
18306 main ()
18307 {
18308  
18309 ;
18310 return 0;
18311 }
18312 _ACEOF
18313 # Make sure it works both with $CC and with simple cc.
18314 # Following AC_PROG_CC_C_O, we do the test twice because some
18315 # compilers refuse to overwrite an existing .o file with -o,
18316 # though they will create one.
18317 am_cv_prog_cc_c_o=yes
18318 for am_i in 1 2; do
18319 if { echo "$as_me:$LINENO: $CC_FOR_BUILD -c conftest.$ac_ext -o conftest2.$ac_build_objext" >&5
18320 ($CC_FOR_BUILD -c conftest.$ac_ext -o conftest2.$ac_build_objext) >&5 2>&5
18321 ac_status=$?
18322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18323 (exit $ac_status); } \
18324 && test -f conftest2.$ac_build_objext; then
18325 : OK
18326 else
18327 am_cv_prog_cc_c_o=no
18328 break
18329 fi
18330 done
18331 rm -f core conftest*
18332 unset am_i
18333 fi
18334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
18335 $as_echo "$am_cv_prog_cc_c_o" >&6; }
18336 if test "$am_cv_prog_cc_c_o" != yes; then
18337 # Losing compiler, so override with the script.
18338 # FIXME: It is wrong to rewrite CC.
18339 # But if we don't then we get into trouble of one sort or another.
18340 # A longer-term fix would be to have automake use am__CC in this case,
18341 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
18342 CC_FOR_BUILD="$am_aux_dir/compile $CC_FOR_BUILD"
18343 fi
18344 ac_ext=c
18345 ac_build_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD'
18346 ac_build_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5'
18347 ac_build_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5'
18348 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18349  
18350  
18351 depcc="$CC_FOR_BUILD" am_compiler_list=
18352  
18353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
18354 $as_echo_n "checking dependency style of $depcc... " >&6; }
18355 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
18356 $as_echo_n "(cached) " >&6
18357 else
18358 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
18359 # We make a subdir and do the tests there. Otherwise we can end up
18360 # making bogus files that we don't know about and never remove. For
18361 # instance it was reported that on HP-UX the gcc test will end up
18362 # making a dummy file named 'D' -- because '-MD' means "put the output
18363 # in D".
18364 rm -rf conftest.dir
18365 mkdir conftest.dir
18366 # Copy depcomp to subdir because otherwise we won't find it if we're
18367 # using a relative directory.
18368 cp "$am_depcomp" conftest.dir
18369 cd conftest.dir
18370 # We will build objects and dependencies in a subdirectory because
18371 # it helps to detect inapplicable dependency modes. For instance
18372 # both Tru64's cc and ICC support -MD to output dependencies as a
18373 # side effect of compilation, but ICC will put the dependencies in
18374 # the current directory while Tru64 will put them in the object
18375 # directory.
18376 mkdir sub
18377  
18378 am_cv_CC_dependencies_compiler_type=none
18379 if test "$am_compiler_list" = ""; then
18380 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
18381 fi
18382 am__universal=false
18383 case " $depcc " in #(
18384 *\ -arch\ *\ -arch\ *) am__universal=true ;;
18385 esac
18386  
18387 for depmode in $am_compiler_list; do
18388 # Setup a source with many dependencies, because some compilers
18389 # like to wrap large dependency lists on column 80 (with \), and
18390 # we should not choose a depcomp mode which is confused by this.
18391 #
18392 # We need to recreate these files for each test, as the compiler may
18393 # overwrite some of them when testing with obscure command lines.
18394 # This happens at least with the AIX C compiler.
18395 : > sub/conftest.c
18396 for i in 1 2 3 4 5 6; do
18397 echo '#include "conftst'$i'.h"' >> sub/conftest.c
18398 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
18399 # Solaris 10 /bin/sh.
18400 echo '/* dummy */' > sub/conftst$i.h
18401 done
18402 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
18403  
18404 # We check with '-c' and '-o' for the sake of the "dashmstdout"
18405 # mode. It turns out that the SunPro C++ compiler does not properly
18406 # handle '-M -o', and we need to detect this. Also, some Intel
18407 # versions had trouble with output in subdirs.
18408 am__obj=sub/conftest.${OBJEXT-o}
18409 am__minus_obj="-o $am__obj"
18410 case $depmode in
18411 gcc)
18412 # This depmode causes a compiler race in universal mode.
18413 test "$am__universal" = false || continue
18414 ;;
18415 nosideeffect)
18416 # After this tag, mechanisms are not by side-effect, so they'll
18417 # only be used when explicitly requested.
18418 if test "x$enable_dependency_tracking" = xyes; then
18419 continue
18420 else
18421 break
18422 fi
18423 ;;
18424 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
18425 # This compiler won't grok '-c -o', but also, the minuso test has
18426 # not run yet. These depmodes are late enough in the game, and
18427 # so weak that their functioning should not be impacted.
18428 am__obj=conftest.${OBJEXT-o}
18429 am__minus_obj=
18430 ;;
18431 none) break ;;
18432 esac
18433 if depmode=$depmode \
18434 source=sub/conftest.c object=$am__obj \
18435 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
18436 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
18437 >/dev/null 2>conftest.err &&
18438 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
18439 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
18440 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
18441 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
18442 # icc doesn't choke on unknown options, it will just issue warnings
18443 # or remarks (even with -Werror). So we grep stderr for any message
18444 # that says an option was ignored or not supported.
18445 # When given -MP, icc 7.0 and 7.1 complain thusly:
18446 # icc: Command line warning: ignoring option '-M'; no argument required
18447 # The diagnosis changed in icc 8.0:
18448 # icc: Command line remark: option '-MP' not supported
18449 if (grep 'ignoring option' conftest.err ||
18450 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
18451 am_cv_CC_dependencies_compiler_type=$depmode
18452 break
18453 fi
18454 fi
18455 done
18456  
18457 cd ..
18458 rm -rf conftest.dir
18459 else
18460 am_cv_CC_dependencies_compiler_type=none
18461 fi
18462  
18463 fi
18464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
18465 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
18466 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
18467  
18468 if
18469 test "x$enable_dependency_tracking" != xno \
18470 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
18471 am__fastdepCC_TRUE=
18472 am__fastdepCC_FALSE='#'
18473 else
18474 am__fastdepCC_TRUE='#'
18475 am__fastdepCC_FALSE=
18476 fi
18477  
18478  
18479 ac_ext=c
18480 ac_build_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD'
18481 ac_build_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5'
18482 ac_build_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5'
18483 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
18485 $as_echo_n "checking how to run the C preprocessor... " >&6; }
18486 # On Suns, sometimes $CPP names a directory.
18487 if test -n "$CPP_FOR_BUILD" && test -d "$CPP_FOR_BUILD"; then
18488 CPP_FOR_BUILD=
18489 fi
18490 if test -z "$CPP_FOR_BUILD"; then
18491 if ${ac_cv_build_prog_CPP+:} false; then :
18492 $as_echo_n "(cached) " >&6
18493 else
18494 # Double quotes because CPP needs to be expanded
18495 for CPP_FOR_BUILD in "$CC_FOR_BUILD -E" "$CC_FOR_BUILD -E -traditional-cpp" "/lib/cpp"
18496 do
18497 ac_preproc_ok=false
18498 for ac_c_preproc_warn_flag in '' yes
18499 do
18500 # Use a header file that comes with gcc, so configuring glibc
18501 # with a fresh cross-compiler works.
18502 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18503 # <limits.h> exists even on freestanding compilers.
18504 # On the NeXT, cc -E runs the code through the compiler's parser,
18505 # not just through cpp. "Syntax error" is here to catch this case.
18506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18507 /* end confdefs.h. */
18508 #ifdef __STDC__
18509 # include <limits.h>
18510 #else
18511 # include <assert.h>
18512 #endif
18513 Syntax error
18514 _ACEOF
18515 if ac_fn_c_try_cpp "$LINENO"; then :
18516  
18517 else
18518 # Broken: fails on valid input.
18519 continue
18520 fi
18521 rm -f conftest.err conftest.i conftest.$ac_ext
18522  
18523 # OK, works on sane cases. Now check whether nonexistent headers
18524 # can be detected and how.
18525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18526 /* end confdefs.h. */
18527 #include <ac_nonexistent.h>
18528 _ACEOF
18529 if ac_fn_c_try_cpp "$LINENO"; then :
18530 # Broken: success on invalid input.
18531 continue
18532 else
18533 # Passes both tests.
18534 ac_preproc_ok=:
18535 break
18536 fi
18537 rm -f conftest.err conftest.i conftest.$ac_ext
18538  
18539 done
18540 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18541 rm -f conftest.i conftest.err conftest.$ac_ext
18542 if $ac_preproc_ok; then :
18543 break
18544 fi
18545  
18546 done
18547 ac_cv_build_prog_CPP=$CPP_FOR_BUILD
18548  
18549 fi
18550 CPP_FOR_BUILD=$ac_cv_build_prog_CPP
18551 else
18552 ac_cv_build_prog_CPP=$CPP_FOR_BUILD
18553 fi
18554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP_FOR_BUILD" >&5
18555 $as_echo "$CPP_FOR_BUILD" >&6; }
18556 ac_preproc_ok=false
18557 for ac_c_preproc_warn_flag in '' yes
18558 do
18559 # Use a header file that comes with gcc, so configuring glibc
18560 # with a fresh cross-compiler works.
18561 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18562 # <limits.h> exists even on freestanding compilers.
18563 # On the NeXT, cc -E runs the code through the compiler's parser,
18564 # not just through cpp. "Syntax error" is here to catch this case.
18565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18566 /* end confdefs.h. */
18567 #ifdef __STDC__
18568 # include <limits.h>
18569 #else
18570 # include <assert.h>
18571 #endif
18572 Syntax error
18573 _ACEOF
18574 if ac_fn_c_try_cpp "$LINENO"; then :
18575  
18576 else
18577 # Broken: fails on valid input.
18578 continue
18579 fi
18580 rm -f conftest.err conftest.i conftest.$ac_ext
18581  
18582 # OK, works on sane cases. Now check whether nonexistent headers
18583 # can be detected and how.
18584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18585 /* end confdefs.h. */
18586 #include <ac_nonexistent.h>
18587 _ACEOF
18588 if ac_fn_c_try_cpp "$LINENO"; then :
18589 # Broken: success on invalid input.
18590 continue
18591 else
18592 # Passes both tests.
18593 ac_preproc_ok=:
18594 break
18595 fi
18596 rm -f conftest.err conftest.i conftest.$ac_ext
18597  
18598 done
18599 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18600 rm -f conftest.i conftest.err conftest.$ac_ext
18601 if $ac_preproc_ok; then :
18602  
18603 else
18604 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18605 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18606 as_fn_error $? "C preprocessor \"$CPP_FOR_BUILD\" fails sanity check
18607 See \`config.log' for more details" "$LINENO" 5; }
18608 fi
18609  
18610 ac_ext=c
18611 ac_build_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD'
18612 ac_build_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5'
18613 ac_build_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5'
18614 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18615  
18616  
18617  
18618 ac_tool_prefix=$save_ac_tool_prefix
18619 cross_compiling=$save_cross_compiling
18620  
18621  
18622 BUILD_EXEEXT=$ac_build_exeext
18623 BUILD_OBJEXT=$ac_build_objext
18624  
18625  
18626 #
18627 # Check for versions of "sed" inadequate to handle, in libtool, a list
18628 # of object files as large as the list in Wireshark.
18629 #
18630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
18631 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
18632 if ${ac_cv_path_SED+:} false; then :
18633 $as_echo_n "(cached) " >&6
18634 else
18635 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
18636 for ac_i in 1 2 3 4 5 6 7; do
18637 ac_script="$ac_script$as_nl$ac_script"
18638 done
18639 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
18640 { ac_script=; unset ac_script;}
18641 if test -z "$SED"; then
18642 ac_path_SED_found=false
18643 # Loop through the user's path and test for each of PROGNAME-LIST
18644 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18645 for as_dir in $PATH
18646 do
18647 IFS=$as_save_IFS
18648 test -z "$as_dir" && as_dir=.
18649 for ac_prog in sed gsed; do
18650 for ac_exec_ext in '' $ac_executable_extensions; do
18651 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
18652 as_fn_executable_p "$ac_path_SED" || continue
18653 # Check for GNU ac_path_SED and select it if it is found.
18654 # Check for GNU $ac_path_SED
18655 case `"$ac_path_SED" --version 2>&1` in
18656 *GNU*)
18657 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
18658 *)
18659 ac_count=0
18660 $as_echo_n 0123456789 >"conftest.in"
18661 while :
18662 do
18663 cat "conftest.in" "conftest.in" >"conftest.tmp"
18664 mv "conftest.tmp" "conftest.in"
18665 cp "conftest.in" "conftest.nl"
18666 $as_echo '' >> "conftest.nl"
18667 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
18668 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
18669 as_fn_arith $ac_count + 1 && ac_count=$as_val
18670 if test $ac_count -gt ${ac_path_SED_max-0}; then
18671 # Best one so far, save it but keep looking for a better one
18672 ac_cv_path_SED="$ac_path_SED"
18673 ac_path_SED_max=$ac_count
18674 fi
18675 # 10*(2^10) chars as input seems more than enough
18676 test $ac_count -gt 10 && break
18677 done
18678 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
18679 esac
18680  
18681 $ac_path_SED_found && break 3
18682 done
18683 done
18684 done
18685 IFS=$as_save_IFS
18686 if test -z "$ac_cv_path_SED"; then
18687 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
18688 fi
18689 else
18690 ac_cv_path_SED=$SED
18691 fi
18692  
18693 fi
18694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
18695 $as_echo "$ac_cv_path_SED" >&6; }
18696 SED="$ac_cv_path_SED"
18697 rm -f conftest.sed
18698  
18699  
18700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
18701 $as_echo_n "checking whether ln -s works... " >&6; }
18702 LN_S=$as_ln_s
18703 if test "$LN_S" = "ln -s"; then
18704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18705 $as_echo "yes" >&6; }
18706 else
18707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
18708 $as_echo "no, using $LN_S" >&6; }
18709 fi
18710  
18711  
18712  
18713 # Extract the first word of "perl", so it can be a program name with args.
18714 set dummy perl; ac_word=$2
18715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18716 $as_echo_n "checking for $ac_word... " >&6; }
18717 if ${ac_cv_path_PERL+:} false; then :
18718 $as_echo_n "(cached) " >&6
18719 else
18720 case $PERL in
18721 [\\/]* | ?:[\\/]*)
18722 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
18723 ;;
18724 *)
18725 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18726 for as_dir in $PATH
18727 do
18728 IFS=$as_save_IFS
18729 test -z "$as_dir" && as_dir=.
18730 for ac_exec_ext in '' $ac_executable_extensions; do
18731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18732 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
18733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18734 break 2
18735 fi
18736 done
18737 done
18738 IFS=$as_save_IFS
18739  
18740 ;;
18741 esac
18742 fi
18743 PERL=$ac_cv_path_PERL
18744 if test -n "$PERL"; then
18745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
18746 $as_echo "$PERL" >&6; }
18747 else
18748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18749 $as_echo "no" >&6; }
18750 fi
18751  
18752  
18753  
18754 # Check for Python.
18755 for ac_prog in python python3
18756 do
18757 # Extract the first word of "$ac_prog", so it can be a program name with args.
18758 set dummy $ac_prog; ac_word=$2
18759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18760 $as_echo_n "checking for $ac_word... " >&6; }
18761 if ${ac_cv_path_PYTHON+:} false; then :
18762 $as_echo_n "(cached) " >&6
18763 else
18764 case $PYTHON in
18765 [\\/]* | ?:[\\/]*)
18766 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
18767 ;;
18768 *)
18769 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18770 for as_dir in $PATH
18771 do
18772 IFS=$as_save_IFS
18773 test -z "$as_dir" && as_dir=.
18774 for ac_exec_ext in '' $ac_executable_extensions; do
18775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18776 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
18777 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18778 break 2
18779 fi
18780 done
18781 done
18782 IFS=$as_save_IFS
18783  
18784 ;;
18785 esac
18786 fi
18787 PYTHON=$ac_cv_path_PYTHON
18788 if test -n "$PYTHON"; then
18789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
18790 $as_echo "$PYTHON" >&6; }
18791 else
18792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18793 $as_echo "no" >&6; }
18794 fi
18795  
18796  
18797 test -n "$PYTHON" && break
18798 done
18799  
18800 if test ! -z "$PYTHON"; then
18801 #
18802 # OK, we found Python; is it Python 2.5 or later?
18803 # Note: we don't use named components for sys.version_info to get
18804 # the major version number, as named components for version_info
18805 # were apparently introduced in Python 2.7.
18806 #
18807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON is Python 2.5 or later" >&5
18808 $as_echo_n "checking whether $PYTHON is Python 2.5 or later... " >&6; }
18809 python_major_version=`$PYTHON -c 'import sys; print (sys.version_info[0])'`
18810 python_minor_version=`$PYTHON -c 'import sys; print (sys.version_info[1])'`
18811 if test "$python_major_version" -eq 2 -a "$python_minor_version" -lt 5 ; then
18812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18813 $as_echo "no" >&6; }
18814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Building with Python $python_major_version.$python_minor_version may not work" >&5
18815 $as_echo "$as_me: WARNING: Building with Python $python_major_version.$python_minor_version may not work" >&2;}
18816 else
18817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18818 $as_echo "yes" >&6; }
18819 fi
18820 else
18821 as_fn_error $? "I couldn't find python; make sure it's installed and in your path" "$LINENO" 5
18822 fi
18823  
18824 for ac_prog in 'bison -y' byacc
18825 do
18826 # Extract the first word of "$ac_prog", so it can be a program name with args.
18827 set dummy $ac_prog; ac_word=$2
18828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18829 $as_echo_n "checking for $ac_word... " >&6; }
18830 if ${ac_cv_prog_YACC+:} false; then :
18831 $as_echo_n "(cached) " >&6
18832 else
18833 if test -n "$YACC"; then
18834 ac_cv_prog_YACC="$YACC" # Let the user override the test.
18835 else
18836 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18837 for as_dir in $PATH
18838 do
18839 IFS=$as_save_IFS
18840 test -z "$as_dir" && as_dir=.
18841 for ac_exec_ext in '' $ac_executable_extensions; do
18842 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18843 ac_cv_prog_YACC="$ac_prog"
18844 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18845 break 2
18846 fi
18847 done
18848 done
18849 IFS=$as_save_IFS
18850  
18851 fi
18852 fi
18853 YACC=$ac_cv_prog_YACC
18854 if test -n "$YACC"; then
18855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
18856 $as_echo "$YACC" >&6; }
18857 else
18858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18859 $as_echo "no" >&6; }
18860 fi
18861  
18862  
18863 test -n "$YACC" && break
18864 done
18865 test -n "$YACC" || YACC="yacc"
18866  
18867 if test "x$YACC" = xyacc; then :
18868 { YACC=; unset YACC;}
18869 fi
18870 if test -z "$YACC" -a ! -f $srcdir/wiretap/ascend.c; then :
18871 as_fn_error $? "I couldn't find bison or byacc; make sure it's installed and in your path" "$LINENO" 5
18872 fi
18873  
18874 YACC=${YACC-"${am_missing_run}bison"}
18875  
18876 for ac_prog in flex lex
18877 do
18878 # Extract the first word of "$ac_prog", so it can be a program name with args.
18879 set dummy $ac_prog; ac_word=$2
18880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18881 $as_echo_n "checking for $ac_word... " >&6; }
18882 if ${ac_cv_prog_LEX+:} false; then :
18883 $as_echo_n "(cached) " >&6
18884 else
18885 if test -n "$LEX"; then
18886 ac_cv_prog_LEX="$LEX" # Let the user override the test.
18887 else
18888 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18889 for as_dir in $PATH
18890 do
18891 IFS=$as_save_IFS
18892 test -z "$as_dir" && as_dir=.
18893 for ac_exec_ext in '' $ac_executable_extensions; do
18894 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18895 ac_cv_prog_LEX="$ac_prog"
18896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18897 break 2
18898 fi
18899 done
18900 done
18901 IFS=$as_save_IFS
18902  
18903 fi
18904 fi
18905 LEX=$ac_cv_prog_LEX
18906 if test -n "$LEX"; then
18907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
18908 $as_echo "$LEX" >&6; }
18909 else
18910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18911 $as_echo "no" >&6; }
18912 fi
18913  
18914  
18915 test -n "$LEX" && break
18916 done
18917 test -n "$LEX" || LEX=":"
18918  
18919 if test "x$LEX" != "x:"; then
18920 cat >conftest.l <<_ACEOF
18921 %%
18922 a { ECHO; }
18923 b { REJECT; }
18924 c { yymore (); }
18925 d { yyless (1); }
18926 e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */
18927 yyless ((input () != 0)); }
18928 f { unput (yytext[0]); }
18929 . { BEGIN INITIAL; }
18930 %%
18931 #ifdef YYTEXT_POINTER
18932 extern char *yytext;
18933 #endif
18934 int
18935 main (void)
18936 {
18937 return ! yylex () + ! yywrap ();
18938 }
18939 _ACEOF
18940 { { ac_try="$LEX conftest.l"
18941 case "(($ac_try" in
18942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18943 *) ac_try_echo=$ac_try;;
18944 esac
18945 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18946 $as_echo "$ac_try_echo"; } >&5
18947 (eval "$LEX conftest.l") 2>&5
18948 ac_status=$?
18949 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18950 test $ac_status = 0; }
18951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
18952 $as_echo_n "checking lex output file root... " >&6; }
18953 if ${ac_cv_prog_lex_root+:} false; then :
18954 $as_echo_n "(cached) " >&6
18955 else
18956  
18957 if test -f lex.yy.c; then
18958 ac_cv_prog_lex_root=lex.yy
18959 elif test -f lexyy.c; then
18960 ac_cv_prog_lex_root=lexyy
18961 else
18962 as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
18963 fi
18964 fi
18965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
18966 $as_echo "$ac_cv_prog_lex_root" >&6; }
18967 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
18968  
18969 if test -z "${LEXLIB+set}"; then
18970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
18971 $as_echo_n "checking lex library... " >&6; }
18972 if ${ac_cv_lib_lex+:} false; then :
18973 $as_echo_n "(cached) " >&6
18974 else
18975  
18976 ac_save_LIBS=$LIBS
18977 ac_cv_lib_lex='none needed'
18978 for ac_lib in '' -lfl -ll; do
18979 LIBS="$ac_lib $ac_save_LIBS"
18980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18981 /* end confdefs.h. */
18982 `cat $LEX_OUTPUT_ROOT.c`
18983 _ACEOF
18984 if ac_fn_c_try_link "$LINENO"; then :
18985 ac_cv_lib_lex=$ac_lib
18986 fi
18987 rm -f core conftest.err conftest.$ac_objext \
18988 conftest$ac_exeext conftest.$ac_ext
18989 test "$ac_cv_lib_lex" != 'none needed' && break
18990 done
18991 LIBS=$ac_save_LIBS
18992  
18993 fi
18994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
18995 $as_echo "$ac_cv_lib_lex" >&6; }
18996 test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
18997 fi
18998  
18999  
19000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
19001 $as_echo_n "checking whether yytext is a pointer... " >&6; }
19002 if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
19003 $as_echo_n "(cached) " >&6
19004 else
19005 # POSIX says lex can declare yytext either as a pointer or an array; the
19006 # default is implementation-dependent. Figure out which it is, since
19007 # not all implementations provide the %pointer and %array declarations.
19008 ac_cv_prog_lex_yytext_pointer=no
19009 ac_save_LIBS=$LIBS
19010 LIBS="$LEXLIB $ac_save_LIBS"
19011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19012 /* end confdefs.h. */
19013  
19014 #define YYTEXT_POINTER 1
19015 `cat $LEX_OUTPUT_ROOT.c`
19016 _ACEOF
19017 if ac_fn_c_try_link "$LINENO"; then :
19018 ac_cv_prog_lex_yytext_pointer=yes
19019 fi
19020 rm -f core conftest.err conftest.$ac_objext \
19021 conftest$ac_exeext conftest.$ac_ext
19022 LIBS=$ac_save_LIBS
19023  
19024 fi
19025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
19026 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
19027 if test $ac_cv_prog_lex_yytext_pointer = yes; then
19028  
19029 $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
19030  
19031 fi
19032 rm -f conftest.l $LEX_OUTPUT_ROOT.c
19033  
19034 fi
19035 if test "x$LEX" != xflex; then :
19036 { LEX=; unset LEX;}
19037 fi
19038 if test -z "$LEX" -a ! -f $srcdir/wiretap/ascend_scanner.c; then :
19039 as_fn_error $? "I couldn't find flex; make sure it's installed and in your path" "$LINENO" 5
19040 fi
19041  
19042 LEX=${LEX-"${am_missing_run}flex"}
19043  
19044  
19045 # Extract the first word of "pod2man", so it can be a program name with args.
19046 set dummy pod2man; ac_word=$2
19047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19048 $as_echo_n "checking for $ac_word... " >&6; }
19049 if ${ac_cv_path_POD2MAN+:} false; then :
19050 $as_echo_n "(cached) " >&6
19051 else
19052 case $POD2MAN in
19053 [\\/]* | ?:[\\/]*)
19054 ac_cv_path_POD2MAN="$POD2MAN" # Let the user override the test with a path.
19055 ;;
19056 *)
19057 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19058 for as_dir in $PATH
19059 do
19060 IFS=$as_save_IFS
19061 test -z "$as_dir" && as_dir=.
19062 for ac_exec_ext in '' $ac_executable_extensions; do
19063 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19064 ac_cv_path_POD2MAN="$as_dir/$ac_word$ac_exec_ext"
19065 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19066 break 2
19067 fi
19068 done
19069 done
19070 IFS=$as_save_IFS
19071  
19072 ;;
19073 esac
19074 fi
19075 POD2MAN=$ac_cv_path_POD2MAN
19076 if test -n "$POD2MAN"; then
19077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POD2MAN" >&5
19078 $as_echo "$POD2MAN" >&6; }
19079 else
19080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19081 $as_echo "no" >&6; }
19082 fi
19083  
19084  
19085 if test "x$POD2MAN" = x
19086 then
19087 #
19088 # The alternative is not to build the man pages....
19089 #
19090 as_fn_error $? "I couldn't find pod2man; make sure it's installed and in your path" "$LINENO" 5
19091 fi
19092 # Extract the first word of "pod2html", so it can be a program name with args.
19093 set dummy pod2html; ac_word=$2
19094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19095 $as_echo_n "checking for $ac_word... " >&6; }
19096 if ${ac_cv_path_POD2HTML+:} false; then :
19097 $as_echo_n "(cached) " >&6
19098 else
19099 case $POD2HTML in
19100 [\\/]* | ?:[\\/]*)
19101 ac_cv_path_POD2HTML="$POD2HTML" # Let the user override the test with a path.
19102 ;;
19103 *)
19104 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19105 for as_dir in $PATH
19106 do
19107 IFS=$as_save_IFS
19108 test -z "$as_dir" && as_dir=.
19109 for ac_exec_ext in '' $ac_executable_extensions; do
19110 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19111 ac_cv_path_POD2HTML="$as_dir/$ac_word$ac_exec_ext"
19112 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19113 break 2
19114 fi
19115 done
19116 done
19117 IFS=$as_save_IFS
19118  
19119 ;;
19120 esac
19121 fi
19122 POD2HTML=$ac_cv_path_POD2HTML
19123 if test -n "$POD2HTML"; then
19124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POD2HTML" >&5
19125 $as_echo "$POD2HTML" >&6; }
19126 else
19127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19128 $as_echo "no" >&6; }
19129 fi
19130  
19131  
19132 if test "x$POD2HTML" = x
19133 then
19134 #
19135 # The alternative is not to build the HTML man pages....
19136 #
19137 as_fn_error $? "I couldn't find pod2html; make sure it's installed and in your path" "$LINENO" 5
19138 fi
19139  
19140 #
19141 # Set "ac_supports_gcc_flags" if the compiler is known to support GCC-style
19142 # flags such as -pedantic, -W warning flags and -f feature flags. Currently,
19143 # we assume GCC and clang do; other compilers should be added here.
19144 #
19145 # This is done to avoid getting tripped up by compilers that support
19146 # those flags but give them a different meaning.
19147 #
19148 if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
19149 ac_supports_gcc_flags=yes
19150 fi
19151  
19152 # Check for doxygen
19153 # Extract the first word of "doxygen", so it can be a program name with args.
19154 set dummy doxygen; ac_word=$2
19155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19156 $as_echo_n "checking for $ac_word... " >&6; }
19157 if ${ac_cv_path_DOXYGEN+:} false; then :
19158 $as_echo_n "(cached) " >&6
19159 else
19160 case $DOXYGEN in
19161 [\\/]* | ?:[\\/]*)
19162 ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path.
19163 ;;
19164 *)
19165 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19166 for as_dir in $PATH
19167 do
19168 IFS=$as_save_IFS
19169 test -z "$as_dir" && as_dir=.
19170 for ac_exec_ext in '' $ac_executable_extensions; do
19171 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19172 ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext"
19173 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19174 break 2
19175 fi
19176 done
19177 done
19178 IFS=$as_save_IFS
19179  
19180 ;;
19181 esac
19182 fi
19183 DOXYGEN=$ac_cv_path_DOXYGEN
19184 if test -n "$DOXYGEN"; then
19185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5
19186 $as_echo "$DOXYGEN" >&6; }
19187 else
19188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19189 $as_echo "no" >&6; }
19190 fi
19191  
19192  
19193 # Extract the first word of "doxygen", so it can be a program name with args.
19194 set dummy doxygen; ac_word=$2
19195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19196 $as_echo_n "checking for $ac_word... " >&6; }
19197 if ${ac_cv_prog_HAVE_DOXYGEN+:} false; then :
19198 $as_echo_n "(cached) " >&6
19199 else
19200 if test -n "$HAVE_DOXYGEN"; then
19201 ac_cv_prog_HAVE_DOXYGEN="$HAVE_DOXYGEN" # Let the user override the test.
19202 else
19203 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19204 for as_dir in $PATH
19205 do
19206 IFS=$as_save_IFS
19207 test -z "$as_dir" && as_dir=.
19208 for ac_exec_ext in '' $ac_executable_extensions; do
19209 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19210 ac_cv_prog_HAVE_DOXYGEN=""yes""
19211 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19212 break 2
19213 fi
19214 done
19215 done
19216 IFS=$as_save_IFS
19217  
19218 test -z "$ac_cv_prog_HAVE_DOXYGEN" && ac_cv_prog_HAVE_DOXYGEN=""no""
19219 fi
19220 fi
19221 HAVE_DOXYGEN=$ac_cv_prog_HAVE_DOXYGEN
19222 if test -n "$HAVE_DOXYGEN"; then
19223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_DOXYGEN" >&5
19224 $as_echo "$HAVE_DOXYGEN" >&6; }
19225 else
19226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19227 $as_echo "no" >&6; }
19228 fi
19229  
19230  
19231 if test x$HAVE_DOXYGEN = xyes; then
19232 HAVE_DOXYGEN_TRUE=
19233 HAVE_DOXYGEN_FALSE='#'
19234 else
19235 HAVE_DOXYGEN_TRUE='#'
19236 HAVE_DOXYGEN_FALSE=
19237 fi
19238  
19239  
19240 #
19241 # Check for pkg-config and set PKG_CONFIG accordingly.
19242 #
19243 # This is referenced via AC_REQUIRE([PKG_PROG_PKG_CONFIG] in some macros
19244 # like PKG_CHECK_MODULES. If the first call to such a macro is under an
19245 # "if" statement, it's safer to call PKG_PROG_PKG_CONFIG directly, see
19246 # the comments in acolocal.m4
19247 #
19248 # We want version 0.7 or better. (XXX - explain why. Is that just
19249 # because our Qt tests were originally based on AM_PATH_GTK, and *it*
19250 # requires 0.7 or better?)
19251 #
19252  
19253  
19254  
19255  
19256  
19257  
19258  
19259 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19260 if test -n "$ac_tool_prefix"; then
19261 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19262 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19264 $as_echo_n "checking for $ac_word... " >&6; }
19265 if ${ac_cv_path_PKG_CONFIG+:} false; then :
19266 $as_echo_n "(cached) " >&6
19267 else
19268 case $PKG_CONFIG in
19269 [\\/]* | ?:[\\/]*)
19270 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19271 ;;
19272 *)
19273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19274 for as_dir in $PATH
19275 do
19276 IFS=$as_save_IFS
19277 test -z "$as_dir" && as_dir=.
19278 for ac_exec_ext in '' $ac_executable_extensions; do
19279 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19280 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19281 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19282 break 2
19283 fi
19284 done
19285 done
19286 IFS=$as_save_IFS
19287  
19288 ;;
19289 esac
19290 fi
19291 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19292 if test -n "$PKG_CONFIG"; then
19293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19294 $as_echo "$PKG_CONFIG" >&6; }
19295 else
19296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19297 $as_echo "no" >&6; }
19298 fi
19299  
19300  
19301 fi
19302 if test -z "$ac_cv_path_PKG_CONFIG"; then
19303 ac_pt_PKG_CONFIG=$PKG_CONFIG
19304 # Extract the first word of "pkg-config", so it can be a program name with args.
19305 set dummy pkg-config; ac_word=$2
19306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19307 $as_echo_n "checking for $ac_word... " >&6; }
19308 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19309 $as_echo_n "(cached) " >&6
19310 else
19311 case $ac_pt_PKG_CONFIG in
19312 [\\/]* | ?:[\\/]*)
19313 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19314 ;;
19315 *)
19316 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19317 for as_dir in $PATH
19318 do
19319 IFS=$as_save_IFS
19320 test -z "$as_dir" && as_dir=.
19321 for ac_exec_ext in '' $ac_executable_extensions; do
19322 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19323 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19324 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19325 break 2
19326 fi
19327 done
19328 done
19329 IFS=$as_save_IFS
19330  
19331 ;;
19332 esac
19333 fi
19334 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19335 if test -n "$ac_pt_PKG_CONFIG"; then
19336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19337 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
19338 else
19339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19340 $as_echo "no" >&6; }
19341 fi
19342  
19343 if test "x$ac_pt_PKG_CONFIG" = x; then
19344 PKG_CONFIG=""
19345 else
19346 case $cross_compiling:$ac_tool_warned in
19347 yes:)
19348 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19349 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19350 ac_tool_warned=yes ;;
19351 esac
19352 PKG_CONFIG=$ac_pt_PKG_CONFIG
19353 fi
19354 else
19355 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19356 fi
19357  
19358 fi
19359 if test -n "$PKG_CONFIG"; then
19360 _pkg_min_version=0.7
19361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19362 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19363 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19365 $as_echo "yes" >&6; }
19366 else
19367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19368 $as_echo "no" >&6; }
19369 PKG_CONFIG=""
19370 fi
19371 fi
19372 if test -z "$PKG_CONFIG"; then
19373 as_fn_error $? "I couldn't find pkg-config; make sure it's installed and in your path" "$LINENO" 5
19374 fi
19375  
19376 #
19377 # Add configure argument to select OSX deployment target.
19378 #
19379 # Check whether --enable-osx-deploy-target was given.
19380 if test "${enable_osx_deploy_target+set}" = set; then :
19381 enableval=$enable_osx_deploy_target;
19382 #
19383 # Is this OS X?
19384 #
19385 case "$host_os" in
19386 darwin*)
19387 #
19388 # Yes.
19389 #
19390 # Let the user specify an OS X release to use as a
19391 # deplayment target; if they specify that we should
19392 # have a deployment target but don't specify the
19393 # deployment target, then, if we have SDKs available,
19394 # pick the OS version on which the build is being done.
19395 # This also causes the build to be done against an SDK
19396 # rather than against the headers and libraries in
19397 # /usr/include and /usr/lib.
19398 #
19399 # Check for an OS X deployment target early, so that
19400 # as many tests using the compiler are done using the
19401 # flags that we'll be using when building.
19402 #
19403 if test $enableval = no
19404 then
19405 #
19406 # The user explicitly said
19407 # --disable-osx-deploy-target, so don't build
19408 # against an SDK.
19409 #
19410 deploy_target=
19411 elif test $enableval = yes
19412 then
19413 #
19414 # The user said --enable-osx-deploy-target, but
19415 # didn't say what version to target; target the
19416 # major version number of the version of OS X on
19417 # which we're running.
19418 #
19419 # (We quote the command so that we can use
19420 # autoconf's M4 quoting characters, [ and ], in
19421 # the sed expression.)
19422 #
19423 deploy_target=`sw_vers -productVersion | sed 's/\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.[0-9]*/\1.\2/'`
19424 else
19425 deploy_target="$enableval"
19426 fi
19427 ;;
19428  
19429 *)
19430 #
19431 # No. Fail, because whatever the user intended for us to
19432 # do, we can't do it.
19433 #
19434 as_fn_error $? "--enable-osx-deploy-target specified on an OS other than OS X" "$LINENO" 5
19435 ;;
19436 esac
19437  
19438 else
19439  
19440 #
19441 # Is this OS X?
19442 #
19443 case "$host_os" in
19444 darwin*)
19445 #
19446 # Yes.
19447 #
19448 # If we have SDKs available, default to targeting the major
19449 # version number of the version of OS X on which we're
19450 # running.
19451 #
19452 # (We quote the command so that we can use autoconf's
19453 # M4 quoting characters, [ and ], in the sed expression.)
19454 #
19455 for i in /Developer/SDKs \
19456 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs \
19457 /Library/Developer/CommandLineTools/SDKs
19458 do
19459 if test -d "$i"
19460 then
19461 deploy_target=`sw_vers -productVersion | sed 's/\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.[0-9]*/\1.\2/'`
19462 break
19463 fi
19464 done
19465 ;;
19466  
19467 *)
19468 #
19469 # No. There's nothing to do.
19470 #
19471 ;;
19472 esac
19473  
19474 fi
19475  
19476  
19477 if test ! -z "$deploy_target"
19478 then
19479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can build for OS X $deploy_target" >&5
19480 $as_echo_n "checking whether we can build for OS X $deploy_target... " >&6; }
19481 case $deploy_target in
19482  
19483 10.0|10.1|10.2)
19484 #
19485 # I'm not sure this would even work.
19486 #
19487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19488 $as_echo "no" >&6; }
19489 as_fn_error $? "We don't support building for OS X $deploy_target" "$LINENO" 5
19490 ;;
19491  
19492 10.3)
19493 #
19494 # XXX - never tested.
19495 #
19496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19497 $as_echo "yes" >&6; }
19498 SDKPATH="/Developer/SDKs/MacOSX10.3.9.sdk"
19499 ;;
19500  
19501 *)
19502 #
19503 # Look for the oldest SDK we can find that's
19504 # for an OS equal to or later than this one.
19505 #
19506 # XXX - for 10.4, do we need 10.4u? We're
19507 # not currently doing fat builds (we'd need
19508 # fat versions of the support libraries for
19509 # that to be useful), but, if we do, we'd
19510 # need to use 10.4u.
19511 #
19512  
19513 #
19514 # Get the real version - strip off the "10.".
19515 # We'll worry about that if, as, and when there's ever
19516 # an OS XI.
19517 #
19518 deploy_real_version=`echo "$deploy_target" | sed -n 's/10\.\(.*\)/\1/p'`
19519  
19520 #
19521 # Search each directory that might contain SDKs.
19522 #
19523 sdkpath=""
19524 for sdksdir in /Developer/SDKs \
19525 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs \
19526 /Library/Developer/CommandLineTools/SDKs
19527 do
19528 #
19529 # Get a list of all the SDKs.
19530 #
19531 if ! test -d "$sdksdir"
19532 then
19533 #
19534 # There is no directory with that name.
19535 # Move on to the next one in the list,
19536 # if any.
19537 #
19538 continue
19539 fi
19540  
19541 #
19542 # Get a list of all the SDKs in that directory,
19543 # if any.
19544 #
19545 # We have to use [ for [ and ] for ] to
19546 # avoid m4 removing the square brackets.
19547 #
19548 sdklist=`(cd "$sdksdir"; ls -d MacOSX10.[0-9]*.sdk 2>/dev/null)`
19549  
19550 for sdk in $sdklist
19551 do
19552 #
19553 # Get the real version for this SDK.
19554 #
19555 sdk_real_version=`echo "$sdk" | sed -n 's/MacOSX10\.\(.*\)\.sdk/\1/p'`
19556  
19557 #
19558 # Is it for the deployment target or
19559 # some later release?
19560 #
19561 if test "$sdk_real_version" -ge "$deploy_real_version"
19562 then
19563 #
19564 # Yes, use it.
19565 #
19566 sdkpath="$sdksdir/$sdk"
19567 break 2
19568 fi
19569 done
19570 done
19571 if test -z "$sdkpath"
19572 then
19573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19574 $as_echo "no" >&6; }
19575 as_fn_error $? "We couldn't find an SDK for OS X $deploy_target or later" "$LINENO" 5
19576 fi
19577 SDKPATH="$sdkpath"
19578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with the 10.$sdk_real_version SDK" >&5
19579 $as_echo "yes, with the 10.$sdk_real_version SDK" >&6; }
19580 ;;
19581 esac
19582  
19583 #
19584 # Add a -mmacosx-version-min flag to force tests that
19585 # use the compiler, as well as the build itself, not to,
19586 # for example, use compiler or linker features not supported
19587 # by the minimum targeted version of the OS.
19588 #
19589 # Add an -isysroot flag to use the SDK.
19590 #
19591 WS_CFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $WS_CFLAGS"
19592 WS_CXXFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $WS_CXXFLAGS"
19593 WS_LDFLAGS="-mmacosx-version-min=$deploy_target -isysroot $SDKPATH $WS_LDFLAGS"
19594  
19595 #
19596 # Add a -sdkroot flag to use with osx-app.sh.
19597 #
19598 OSX_APP_FLAGS="-sdkroot $SDKPATH"
19599  
19600 #
19601 # XXX - do we need this to build the Wireshark wrapper?
19602 # XXX - is this still necessary with the -mmacosx-version-min
19603 # flag being set?
19604 #
19605 OSX_DEPLOY_TARGET="MACOSX_DEPLOYMENT_TARGET=$deploy_target"
19606  
19607 #
19608 # In the installer package XML file, give the deployment target
19609 # as the minimum version.
19610 #
19611 OSX_MIN_VERSION="$deploy_target"
19612  
19613 case $deploy_target in
19614  
19615 10.4|10.5)
19616 #
19617 # Only 32-bit builds are supported. 10.5
19618 # (and 10.4?) had a bug that causes some BPF
19619 # functions not to work with 64-bit userland
19620 # code, so capturing won't work.
19621 #
19622 WS_CFLAGS="-m32 $WS_CFLAGS"
19623 WS_CXXFLAGS="-m32 $WS_CXXFLAGS"
19624 WS_LDFLAGS="-m32 $WS_LDFLAGS"
19625 ;;
19626 esac
19627 else
19628 #
19629 # Is this OS X?
19630 #
19631 case "$host_os" in
19632 darwin*)
19633 #
19634 # Yes.
19635 #
19636 # In the installer package XML file, give the current OS
19637 # version, minor version and all, as the minimum version.
19638 # We can't guarantee that the resulting binary will work
19639 # on older OS versions, not even older minor versions
19640 # (original release or earlier software updates).
19641 #
19642 OSX_MIN_VERSION=`sw_vers -productVersion`
19643 ;;
19644 esac
19645 fi
19646  
19647  
19648  
19649 #
19650 # Try to arrange for large file support.
19651 #
19652 # Check whether --enable-largefile was given.
19653 if test "${enable_largefile+set}" = set; then :
19654 enableval=$enable_largefile;
19655 fi
19656  
19657 if test "$enable_largefile" != no; then
19658  
19659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
19660 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
19661 if ${ac_cv_sys_largefile_CC+:} false; then :
19662 $as_echo_n "(cached) " >&6
19663 else
19664 ac_cv_sys_largefile_CC=no
19665 if test "$GCC" != yes; then
19666 ac_save_CC=$CC
19667 while :; do
19668 # IRIX 6.2 and later do not support large files by default,
19669 # so use the C compiler's -n32 option if that helps.
19670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19671 /* end confdefs.h. */
19672 #include <sys/types.h>
19673 /* Check that off_t can represent 2**63 - 1 correctly.
19674 We can't simply define LARGE_OFF_T to be 9223372036854775807,
19675 since some C++ compilers masquerading as C compilers
19676 incorrectly reject 9223372036854775807. */
19677 #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
19678 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
19679 && LARGE_OFF_T % 2147483647 == 1)
19680 ? 1 : -1];
19681 int
19682 main ()
19683 {
19684  
19685 ;
19686 return 0;
19687 }
19688 _ACEOF
19689 if ac_fn_c_try_compile "$LINENO"; then :
19690 break
19691 fi
19692 rm -f core conftest.err conftest.$ac_objext
19693 CC="$CC -n32"
19694 if ac_fn_c_try_compile "$LINENO"; then :
19695 ac_cv_sys_largefile_CC=' -n32'; break
19696 fi
19697 rm -f core conftest.err conftest.$ac_objext
19698 break
19699 done
19700 CC=$ac_save_CC
19701 rm -f conftest.$ac_ext
19702 fi
19703 fi
19704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
19705 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
19706 if test "$ac_cv_sys_largefile_CC" != no; then
19707 CC=$CC$ac_cv_sys_largefile_CC
19708 fi
19709  
19710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
19711 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
19712 if ${ac_cv_sys_file_offset_bits+:} false; then :
19713 $as_echo_n "(cached) " >&6
19714 else
19715 while :; do
19716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19717 /* end confdefs.h. */
19718 #include <sys/types.h>
19719 /* Check that off_t can represent 2**63 - 1 correctly.
19720 We can't simply define LARGE_OFF_T to be 9223372036854775807,
19721 since some C++ compilers masquerading as C compilers
19722 incorrectly reject 9223372036854775807. */
19723 #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
19724 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
19725 && LARGE_OFF_T % 2147483647 == 1)
19726 ? 1 : -1];
19727 int
19728 main ()
19729 {
19730  
19731 ;
19732 return 0;
19733 }
19734 _ACEOF
19735 if ac_fn_c_try_compile "$LINENO"; then :
19736 ac_cv_sys_file_offset_bits=no; break
19737 fi
19738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19740 /* end confdefs.h. */
19741 #define _FILE_OFFSET_BITS 64
19742 #include <sys/types.h>
19743 /* Check that off_t can represent 2**63 - 1 correctly.
19744 We can't simply define LARGE_OFF_T to be 9223372036854775807,
19745 since some C++ compilers masquerading as C compilers
19746 incorrectly reject 9223372036854775807. */
19747 #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
19748 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
19749 && LARGE_OFF_T % 2147483647 == 1)
19750 ? 1 : -1];
19751 int
19752 main ()
19753 {
19754  
19755 ;
19756 return 0;
19757 }
19758 _ACEOF
19759 if ac_fn_c_try_compile "$LINENO"; then :
19760 ac_cv_sys_file_offset_bits=64; break
19761 fi
19762 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19763 ac_cv_sys_file_offset_bits=unknown
19764 break
19765 done
19766 fi
19767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
19768 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
19769 case $ac_cv_sys_file_offset_bits in #(
19770 no | unknown) ;;
19771 *)
19772 cat >>confdefs.h <<_ACEOF
19773 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
19774 _ACEOF
19775 ;;
19776 esac
19777 rm -rf conftest*
19778 if test $ac_cv_sys_file_offset_bits = unknown; then
19779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
19780 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
19781 if ${ac_cv_sys_large_files+:} false; then :
19782 $as_echo_n "(cached) " >&6
19783 else
19784 while :; do
19785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19786 /* end confdefs.h. */
19787 #include <sys/types.h>
19788 /* Check that off_t can represent 2**63 - 1 correctly.
19789 We can't simply define LARGE_OFF_T to be 9223372036854775807,
19790 since some C++ compilers masquerading as C compilers
19791 incorrectly reject 9223372036854775807. */
19792 #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
19793 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
19794 && LARGE_OFF_T % 2147483647 == 1)
19795 ? 1 : -1];
19796 int
19797 main ()
19798 {
19799  
19800 ;
19801 return 0;
19802 }
19803 _ACEOF
19804 if ac_fn_c_try_compile "$LINENO"; then :
19805 ac_cv_sys_large_files=no; break
19806 fi
19807 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19809 /* end confdefs.h. */
19810 #define _LARGE_FILES 1
19811 #include <sys/types.h>
19812 /* Check that off_t can represent 2**63 - 1 correctly.
19813 We can't simply define LARGE_OFF_T to be 9223372036854775807,
19814 since some C++ compilers masquerading as C compilers
19815 incorrectly reject 9223372036854775807. */
19816 #define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
19817 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
19818 && LARGE_OFF_T % 2147483647 == 1)
19819 ? 1 : -1];
19820 int
19821 main ()
19822 {
19823  
19824 ;
19825 return 0;
19826 }
19827 _ACEOF
19828 if ac_fn_c_try_compile "$LINENO"; then :
19829 ac_cv_sys_large_files=1; break
19830 fi
19831 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19832 ac_cv_sys_large_files=unknown
19833 break
19834 done
19835 fi
19836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
19837 $as_echo "$ac_cv_sys_large_files" >&6; }
19838 case $ac_cv_sys_large_files in #(
19839 no | unknown) ;;
19840 *)
19841 cat >>confdefs.h <<_ACEOF
19842 #define _LARGE_FILES $ac_cv_sys_large_files
19843 _ACEOF
19844 ;;
19845 esac
19846 rm -rf conftest*
19847 fi
19848  
19849  
19850 fi
19851  
19852  
19853 #
19854 # Check if we need to link with libm
19855 #
19856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cos" >&5
19857 $as_echo_n "checking for library containing cos... " >&6; }
19858 if ${ac_cv_search_cos+:} false; then :
19859 $as_echo_n "(cached) " >&6
19860 else
19861 ac_func_search_save_LIBS=$LIBS
19862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19863 /* end confdefs.h. */
19864  
19865 /* Override any GCC internal prototype to avoid an error.
19866 Use char because int might match the return type of a GCC
19867 builtin and then its argument prototype would still apply. */
19868 #ifdef __cplusplus
19869 extern "C"
19870 #endif
19871 char cos ();
19872 int
19873 main ()
19874 {
19875 return cos ();
19876 ;
19877 return 0;
19878 }
19879 _ACEOF
19880 for ac_lib in '' m; do
19881 if test -z "$ac_lib"; then
19882 ac_res="none required"
19883 else
19884 ac_res=-l$ac_lib
19885 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19886 fi
19887 if ac_fn_c_try_link "$LINENO"; then :
19888 ac_cv_search_cos=$ac_res
19889 fi
19890 rm -f core conftest.err conftest.$ac_objext \
19891 conftest$ac_exeext
19892 if ${ac_cv_search_cos+:} false; then :
19893 break
19894 fi
19895 done
19896 if ${ac_cv_search_cos+:} false; then :
19897  
19898 else
19899 ac_cv_search_cos=no
19900 fi
19901 rm conftest.$ac_ext
19902 LIBS=$ac_func_search_save_LIBS
19903 fi
19904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5
19905 $as_echo "$ac_cv_search_cos" >&6; }
19906 ac_res=$ac_cv_search_cos
19907 if test "$ac_res" != no; then :
19908 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19909  
19910 fi
19911  
19912  
19913 #
19914 # Check for C99 math functions.
19915 #
19916 for ac_func in floorl lrint
19917 do :
19918 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19919 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19920 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
19921 cat >>confdefs.h <<_ACEOF
19922 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19923 _ACEOF
19924  
19925 fi
19926 done
19927  
19928  
19929 #
19930 # Check if we need to link with -lnsl and -lsocket
19931 #
19932  
19933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
19934 $as_echo_n "checking for library containing gethostbyname... " >&6; }
19935 if ${ac_cv_search_gethostbyname+:} false; then :
19936 $as_echo_n "(cached) " >&6
19937 else
19938 ac_func_search_save_LIBS=$LIBS
19939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19940 /* end confdefs.h. */
19941  
19942 /* Override any GCC internal prototype to avoid an error.
19943 Use char because int might match the return type of a GCC
19944 builtin and then its argument prototype would still apply. */
19945 #ifdef __cplusplus
19946 extern "C"
19947 #endif
19948 char gethostbyname ();
19949 int
19950 main ()
19951 {
19952 return gethostbyname ();
19953 ;
19954 return 0;
19955 }
19956 _ACEOF
19957 for ac_lib in '' nsl; do
19958 if test -z "$ac_lib"; then
19959 ac_res="none required"
19960 else
19961 ac_res=-l$ac_lib
19962 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19963 fi
19964 if ac_fn_c_try_link "$LINENO"; then :
19965 ac_cv_search_gethostbyname=$ac_res
19966 fi
19967 rm -f core conftest.err conftest.$ac_objext \
19968 conftest$ac_exeext
19969 if ${ac_cv_search_gethostbyname+:} false; then :
19970 break
19971 fi
19972 done
19973 if ${ac_cv_search_gethostbyname+:} false; then :
19974  
19975 else
19976 ac_cv_search_gethostbyname=no
19977 fi
19978 rm conftest.$ac_ext
19979 LIBS=$ac_func_search_save_LIBS
19980 fi
19981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
19982 $as_echo "$ac_cv_search_gethostbyname" >&6; }
19983 ac_res=$ac_cv_search_gethostbyname
19984 if test "$ac_res" != no; then :
19985 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19986  
19987 fi
19988  
19989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
19990 $as_echo_n "checking for library containing socket... " >&6; }
19991 if ${ac_cv_search_socket+:} false; then :
19992 $as_echo_n "(cached) " >&6
19993 else
19994 ac_func_search_save_LIBS=$LIBS
19995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19996 /* end confdefs.h. */
19997  
19998 /* Override any GCC internal prototype to avoid an error.
19999 Use char because int might match the return type of a GCC
20000 builtin and then its argument prototype would still apply. */
20001 #ifdef __cplusplus
20002 extern "C"
20003 #endif
20004 char socket ();
20005 int
20006 main ()
20007 {
20008 return socket ();
20009 ;
20010 return 0;
20011 }
20012 _ACEOF
20013 for ac_lib in '' socket; do
20014 if test -z "$ac_lib"; then
20015 ac_res="none required"
20016 else
20017 ac_res=-l$ac_lib
20018 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20019 fi
20020 if ac_fn_c_try_link "$LINENO"; then :
20021 ac_cv_search_socket=$ac_res
20022 fi
20023 rm -f core conftest.err conftest.$ac_objext \
20024 conftest$ac_exeext
20025 if ${ac_cv_search_socket+:} false; then :
20026 break
20027 fi
20028 done
20029 if ${ac_cv_search_socket+:} false; then :
20030  
20031 else
20032 ac_cv_search_socket=no
20033 fi
20034 rm conftest.$ac_ext
20035 LIBS=$ac_func_search_save_LIBS
20036 fi
20037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
20038 $as_echo "$ac_cv_search_socket" >&6; }
20039 ac_res=$ac_cv_search_socket
20040 if test "$ac_res" != no; then :
20041 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20042  
20043 else
20044  
20045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
20046 $as_echo_n "checking for socket in -lsocket... " >&6; }
20047 if ${ac_cv_lib_socket_socket+:} false; then :
20048 $as_echo_n "(cached) " >&6
20049 else
20050 ac_check_lib_save_LIBS=$LIBS
20051 LIBS="-lsocket -lnsl $LIBS"
20052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20053 /* end confdefs.h. */
20054  
20055 /* Override any GCC internal prototype to avoid an error.
20056 Use char because int might match the return type of a GCC
20057 builtin and then its argument prototype would still apply. */
20058 #ifdef __cplusplus
20059 extern "C"
20060 #endif
20061 char socket ();
20062 int
20063 main ()
20064 {
20065 return socket ();
20066 ;
20067 return 0;
20068 }
20069 _ACEOF
20070 if ac_fn_c_try_link "$LINENO"; then :
20071 ac_cv_lib_socket_socket=yes
20072 else
20073 ac_cv_lib_socket_socket=no
20074 fi
20075 rm -f core conftest.err conftest.$ac_objext \
20076 conftest$ac_exeext conftest.$ac_ext
20077 LIBS=$ac_check_lib_save_LIBS
20078 fi
20079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
20080 $as_echo "$ac_cv_lib_socket_socket" >&6; }
20081 if test "x$ac_cv_lib_socket_socket" = xyes; then :
20082 LIBS="-lsocket -lnsl $LIBS"
20083 fi
20084  
20085 fi
20086  
20087  
20088  
20089 #
20090 # GUI toolkit options
20091 #
20092  
20093 # Check whether --with-qt was given.
20094 if test "${with_qt+set}" = set; then :
20095 withval=$with_qt; with_qt="$withval"
20096 else
20097 with_qt="unspecified"
20098 fi
20099  
20100  
20101  
20102 # Check whether --with-gtk was given.
20103 if test "${with_gtk+set}" = set; then :
20104 withval=$with_gtk; case $withval in #(
20105 yes) :
20106 with_gtk="3 2 fail" ;; #(
20107 no) :
20108 with_gtk="no" ;; #(
20109 3) :
20110 with_gtk="3 fail3" ;; #(
20111 2) :
20112 with_gtk="2 fail2" ;; #(
20113 *) :
20114 as_fn_error $? "--with-gtk must be one of yes/no/2/3" "$LINENO" 5 ;;
20115 esac
20116 else
20117 with_gtk="3 2"
20118 fi
20119  
20120  
20121 # GnuTLS
20122 # Version 3.0 switched from LGPLv2.1+ to LGPLv3+, then switched back to
20123 # LGPLv2.1+ in version 3.1.10.
20124 # GnuTLS depends on GMP which switched from LGPLv2.1+ to LGPLv3+ in
20125 # version 4.2.2, the switched to LGPLv3+ / GPLv2+ in version 6.0.0.
20126  
20127 tls_message="no"
20128 want_gnutls="if_available"
20129  
20130 # Check whether --with-gnutls was given.
20131 if test "${with_gnutls+set}" = set; then :
20132 withval=$with_gnutls; with_gnutls="$withval"; want_gnutls="yes"
20133 else
20134 with_gnutls="yes"
20135 fi
20136  
20137  
20138 if test "x$with_gnutls" = "xyes"; then
20139 have_license_compatible_gnutls="no"
20140  
20141 pkg_failed=no
20142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBGNUTLS" >&5
20143 $as_echo_n "checking for LIBGNUTLS... " >&6; }
20144  
20145 if test -n "$LIBGNUTLS_CFLAGS"; then
20146 pkg_cv_LIBGNUTLS_CFLAGS="$LIBGNUTLS_CFLAGS"
20147 elif test -n "$PKG_CONFIG"; then
20148 if test -n "$PKG_CONFIG" && \
20149 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 3.1.10 \""; } >&5
20150 ($PKG_CONFIG --exists --print-errors "gnutls >= 3.1.10 ") 2>&5
20151 ac_status=$?
20152 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20153 test $ac_status = 0; }; then
20154 pkg_cv_LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 3.1.10 " 2>/dev/null`
20155 test "x$?" != "x0" && pkg_failed=yes
20156 else
20157 pkg_failed=yes
20158 fi
20159 else
20160 pkg_failed=untried
20161 fi
20162 if test -n "$LIBGNUTLS_LIBS"; then
20163 pkg_cv_LIBGNUTLS_LIBS="$LIBGNUTLS_LIBS"
20164 elif test -n "$PKG_CONFIG"; then
20165 if test -n "$PKG_CONFIG" && \
20166 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 3.1.10 \""; } >&5
20167 ($PKG_CONFIG --exists --print-errors "gnutls >= 3.1.10 ") 2>&5
20168 ac_status=$?
20169 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20170 test $ac_status = 0; }; then
20171 pkg_cv_LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 3.1.10 " 2>/dev/null`
20172 test "x$?" != "x0" && pkg_failed=yes
20173 else
20174 pkg_failed=yes
20175 fi
20176 else
20177 pkg_failed=untried
20178 fi
20179  
20180  
20181  
20182 if test $pkg_failed = yes; then
20183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20184 $as_echo "no" >&6; }
20185  
20186 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
20187 _pkg_short_errors_supported=yes
20188 else
20189 _pkg_short_errors_supported=no
20190 fi
20191 if test $_pkg_short_errors_supported = yes; then
20192 LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gnutls >= 3.1.10 " 2>&1`
20193 else
20194 LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gnutls >= 3.1.10 " 2>&1`
20195 fi
20196 # Put the nasty error message in config.log where it belongs
20197 echo "$LIBGNUTLS_PKG_ERRORS" >&5
20198  
20199 echo "GnuTLS >= 3.1.10 not found "
20200  
20201 elif test $pkg_failed = untried; then
20202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20203 $as_echo "no" >&6; }
20204 echo "GnuTLS >= 3.1.10 not found "
20205  
20206 else
20207 LIBGNUTLS_CFLAGS=$pkg_cv_LIBGNUTLS_CFLAGS
20208 LIBGNUTLS_LIBS=$pkg_cv_LIBGNUTLS_LIBS
20209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20210 $as_echo "yes" >&6; }
20211 have_license_compatible_gnutls="yes"
20212 fi
20213  
20214 if test "x$have_license_compatible_gnutls" != "xyes"; then
20215  
20216 pkg_failed=no
20217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBGNUTLS" >&5
20218 $as_echo_n "checking for LIBGNUTLS... " >&6; }
20219  
20220 if test -n "$LIBGNUTLS_CFLAGS"; then
20221 pkg_cv_LIBGNUTLS_CFLAGS="$LIBGNUTLS_CFLAGS"
20222 elif test -n "$PKG_CONFIG"; then
20223 if test -n "$PKG_CONFIG" && \
20224 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 2.12.0 gnutls < 3\""; } >&5
20225 ($PKG_CONFIG --exists --print-errors "gnutls >= 2.12.0 gnutls < 3") 2>&5
20226 ac_status=$?
20227 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20228 test $ac_status = 0; }; then
20229 pkg_cv_LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.12.0 gnutls < 3" 2>/dev/null`
20230 test "x$?" != "x0" && pkg_failed=yes
20231 else
20232 pkg_failed=yes
20233 fi
20234 else
20235 pkg_failed=untried
20236 fi
20237 if test -n "$LIBGNUTLS_LIBS"; then
20238 pkg_cv_LIBGNUTLS_LIBS="$LIBGNUTLS_LIBS"
20239 elif test -n "$PKG_CONFIG"; then
20240 if test -n "$PKG_CONFIG" && \
20241 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 2.12.0 gnutls < 3\""; } >&5
20242 ($PKG_CONFIG --exists --print-errors "gnutls >= 2.12.0 gnutls < 3") 2>&5
20243 ac_status=$?
20244 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20245 test $ac_status = 0; }; then
20246 pkg_cv_LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.12.0 gnutls < 3" 2>/dev/null`
20247 test "x$?" != "x0" && pkg_failed=yes
20248 else
20249 pkg_failed=yes
20250 fi
20251 else
20252 pkg_failed=untried
20253 fi
20254  
20255  
20256  
20257 if test $pkg_failed = yes; then
20258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20259 $as_echo "no" >&6; }
20260  
20261 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
20262 _pkg_short_errors_supported=yes
20263 else
20264 _pkg_short_errors_supported=no
20265 fi
20266 if test $_pkg_short_errors_supported = yes; then
20267 LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gnutls >= 2.12.0 gnutls < 3" 2>&1`
20268 else
20269 LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gnutls >= 2.12.0 gnutls < 3" 2>&1`
20270 fi
20271 # Put the nasty error message in config.log where it belongs
20272 echo "$LIBGNUTLS_PKG_ERRORS" >&5
20273  
20274 echo "GnuTLS >= 2.12.0, < 3.0 not found "
20275  
20276 elif test $pkg_failed = untried; then
20277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20278 $as_echo "no" >&6; }
20279 echo "GnuTLS >= 2.12.0, < 3.0 not found "
20280  
20281 else
20282 LIBGNUTLS_CFLAGS=$pkg_cv_LIBGNUTLS_CFLAGS
20283 LIBGNUTLS_LIBS=$pkg_cv_LIBGNUTLS_LIBS
20284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20285 $as_echo "yes" >&6; }
20286 have_license_compatible_gnutls="yes"
20287 fi
20288 fi
20289  
20290 if test "x$have_license_compatible_gnutls" != "xyes"; then
20291 if test "x$want_gnutls" = "xyes"; then
20292 as_fn_error $? "GnuTLS crypto library was requested, but is not available" "$LINENO" 5
20293 else
20294 $as_echo "GnuTLS with compatible license not found, disabling SSL decryption"
20295 fi
20296 else
20297  
20298 $as_echo "#define HAVE_LIBGNUTLS 1" >>confdefs.h
20299  
20300 tls_message="yes"
20301 fi
20302 fi
20303  
20304 # libgrypt
20305 gcrypt_message="no"
20306 want_gcrypt="if_available"
20307  
20308 # Check whether --with-gcrypt was given.
20309 if test "${with_gcrypt+set}" = set; then :
20310 withval=$with_gcrypt; with_gcrypt="$withval"; want_gcrypt="yes"
20311 else
20312 with_gcrypt="yes"
20313 fi
20314  
20315  
20316 if test "x$with_gcrypt" = "xyes"; then
20317  
20318 # Check whether --with-libgcrypt-prefix was given.
20319 if test "${with_libgcrypt_prefix+set}" = set; then :
20320 withval=$with_libgcrypt_prefix; libgcrypt_config_prefix="$withval"
20321 else
20322 libgcrypt_config_prefix=""
20323 fi
20324  
20325 if test x$libgcrypt_config_prefix != x ; then
20326 if test x${LIBGCRYPT_CONFIG+set} != xset ; then
20327 LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config
20328 fi
20329 fi
20330  
20331 # Extract the first word of "libgcrypt-config", so it can be a program name with args.
20332 set dummy libgcrypt-config; ac_word=$2
20333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20334 $as_echo_n "checking for $ac_word... " >&6; }
20335 if ${ac_cv_path_LIBGCRYPT_CONFIG+:} false; then :
20336 $as_echo_n "(cached) " >&6
20337 else
20338 case $LIBGCRYPT_CONFIG in
20339 [\\/]* | ?:[\\/]*)
20340 ac_cv_path_LIBGCRYPT_CONFIG="$LIBGCRYPT_CONFIG" # Let the user override the test with a path.
20341 ;;
20342 *)
20343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20344 for as_dir in $PATH
20345 do
20346 IFS=$as_save_IFS
20347 test -z "$as_dir" && as_dir=.
20348 for ac_exec_ext in '' $ac_executable_extensions; do
20349 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20350 ac_cv_path_LIBGCRYPT_CONFIG="$as_dir/$ac_word$ac_exec_ext"
20351 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20352 break 2
20353 fi
20354 done
20355 done
20356 IFS=$as_save_IFS
20357  
20358 test -z "$ac_cv_path_LIBGCRYPT_CONFIG" && ac_cv_path_LIBGCRYPT_CONFIG="no"
20359 ;;
20360 esac
20361 fi
20362 LIBGCRYPT_CONFIG=$ac_cv_path_LIBGCRYPT_CONFIG
20363 if test -n "$LIBGCRYPT_CONFIG"; then
20364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGCRYPT_CONFIG" >&5
20365 $as_echo "$LIBGCRYPT_CONFIG" >&6; }
20366 else
20367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20368 $as_echo "no" >&6; }
20369 fi
20370  
20371  
20372 tmp=1.4.2
20373 if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
20374 req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
20375 min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
20376 else
20377 req_libgcrypt_api=0
20378 min_libgcrypt_version="$tmp"
20379 fi
20380  
20381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBGCRYPT - version >= $min_libgcrypt_version" >&5
20382 $as_echo_n "checking for LIBGCRYPT - version >= $min_libgcrypt_version... " >&6; }
20383 ok=no
20384 if test "$LIBGCRYPT_CONFIG" != "no" ; then
20385 req_major=`echo $min_libgcrypt_version | \
20386 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
20387 req_minor=`echo $min_libgcrypt_version | \
20388 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
20389 req_micro=`echo $min_libgcrypt_version | \
20390 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
20391 libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
20392 major=`echo $libgcrypt_config_version | \
20393 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'`
20394 minor=`echo $libgcrypt_config_version | \
20395 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'`
20396 micro=`echo $libgcrypt_config_version | \
20397 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'`
20398 if test "$major" -gt "$req_major"; then
20399 ok=yes
20400 else
20401 if test "$major" -eq "$req_major"; then
20402 if test "$minor" -gt "$req_minor"; then
20403 ok=yes
20404 else
20405 if test "$minor" -eq "$req_minor"; then
20406 if test "$micro" -ge "$req_micro"; then
20407 ok=yes
20408 fi
20409 fi
20410 fi
20411 fi
20412 fi
20413 fi
20414 if test $ok = yes; then
20415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20416 $as_echo "yes" >&6; }
20417 else
20418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20419 $as_echo "no" >&6; }
20420 fi
20421 if test $ok = yes; then
20422 # If we have a recent libgcrypt, we should also check that the
20423 # API is compatible
20424 if test "$req_libgcrypt_api" -gt 0 ; then
20425 tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
20426 if test "$tmp" -gt 0 ; then
20427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGCRYPT API version" >&5
20428 $as_echo_n "checking LIBGCRYPT API version... " >&6; }
20429 if test "$req_libgcrypt_api" -eq "$tmp" ; then
20430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: okay" >&5
20431 $as_echo "okay" >&6; }
20432 else
20433 ok=no
20434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: does not match (want=$req_libgcrypt_api got=$tmp)" >&5
20435 $as_echo "does not match (want=$req_libgcrypt_api got=$tmp)" >&6; }
20436 fi
20437 fi
20438 fi
20439 fi
20440 if test $ok = yes; then
20441 LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
20442 LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
20443  
20444  
20445 $as_echo "#define HAVE_LIBGCRYPT 1" >>confdefs.h
20446  
20447 gcrypt_message="yes"
20448  
20449  
20450 else
20451 LIBGCRYPT_CFLAGS=""
20452 LIBGCRYPT_LIBS=""
20453  
20454 if test x$libgcrypt_config_prefix != x ; then
20455 as_fn_error $? "libgcrypt not found; install libgcrypt-devel package for your system" "$LINENO" 5
20456 else
20457 $as_echo "libgcrypt not found, disabling decryption for ipsec, ssl, etc."
20458 gcrypt_message="no"
20459 fi
20460  
20461 # Error out if the user explicitly requested gcrypt
20462 if test "x$want_gcrypt" = "xyes"; then
20463 as_fn_error $? "libgcrypt library was requested, but is not available" "$LINENO" 5
20464 fi
20465  
20466  
20467 fi
20468  
20469  
20470  
20471 fi
20472  
20473  
20474 # Check whether --with-libnl was given.
20475 if test "${with_libnl+set}" = set; then :
20476 withval=$with_libnl;
20477 if test "x$withval" = "xno"
20478 then
20479 want_libnl=no
20480 elif test "x$withval" = "xyes"
20481 then
20482 want_libnl=yes
20483 libnl_version=any
20484 elif test "x$withval" = "x1"
20485 then
20486 want_libnl=yes
20487 libnl_version=1
20488 elif test "x$withval" = "x2"
20489 then
20490 want_libnl=yes
20491 libnl_version=2
20492 elif test "x$withval" = "x3"
20493 then
20494 want_libnl=yes
20495 libnl_version=3
20496 else
20497 as_fn_error $? "\"$withval\" is not a valid argument to --with-libnl" "$LINENO" 5
20498 fi
20499  
20500 else
20501  
20502 #
20503 # Use libnl if it's present, otherwise don't.
20504 #
20505 want_libnl=ifavailable
20506 libnl_version=any
20507  
20508 fi
20509  
20510 #
20511 # Libnl is Linux-specific.
20512 #
20513 libnl_message="no"
20514 case "$host_os" in
20515 linux*)
20516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use libnl for various network interface purposes" >&5
20517 $as_echo_n "checking whether to use libnl for various network interface purposes... " >&6; }
20518  
20519 if test x$want_libnl = "xno"; then
20520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20521 $as_echo "no" >&6; }
20522 else
20523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20524 $as_echo "yes" >&6; }
20525 #
20526 # Test for specific libnl versions only if no version
20527 # was specified by the user or if the version in question
20528 # was requested by the user.
20529 #
20530 if test x$libnl_version = "xany" -o x$libnl_version = "x3"; then
20531 if test -n "$PKG_CONFIG" && \
20532 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-3.0 libnl-route-3.0 libnl-genl-3.0\""; } >&5
20533 ($PKG_CONFIG --exists --print-errors "libnl-3.0 libnl-route-3.0 libnl-genl-3.0") 2>&5
20534 ac_status=$?
20535 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20536 test $ac_status = 0; }; then
20537 have_libnl3=yes
20538 else
20539 have_libnl3=no
20540 fi
20541 fi
20542 if test x$libnl_version = "xany" -o x$libnl_version = "x2"; then
20543 if test -n "$PKG_CONFIG" && \
20544 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-2.0\""; } >&5
20545 ($PKG_CONFIG --exists --print-errors "libnl-2.0") 2>&5
20546 ac_status=$?
20547 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20548 test $ac_status = 0; }; then
20549 have_libnl2=yes
20550 else
20551 have_libnl2=no
20552 fi
20553 fi
20554 if test x$libnl_version = "xany" -o x$libnl_version = "x1"; then
20555 if test -n "$PKG_CONFIG" && \
20556 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-1\""; } >&5
20557 ($PKG_CONFIG --exists --print-errors "libnl-1") 2>&5
20558 ac_status=$?
20559 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20560 test $ac_status = 0; }; then
20561 have_libnl1=yes
20562 else
20563 have_libnl1=no
20564 fi
20565 fi
20566 if (test "${have_libnl3}" = "yes"); then
20567  
20568  
20569 pkg_failed=no
20570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBNL" >&5
20571 $as_echo_n "checking for LIBNL... " >&6; }
20572  
20573 if test -n "$LIBNL_CFLAGS"; then
20574 pkg_cv_LIBNL_CFLAGS="$LIBNL_CFLAGS"
20575 elif test -n "$PKG_CONFIG"; then
20576 if test -n "$PKG_CONFIG" && \
20577 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-3.0 libnl-route-3.0 libnl-genl-3.0\""; } >&5
20578 ($PKG_CONFIG --exists --print-errors "libnl-3.0 libnl-route-3.0 libnl-genl-3.0") 2>&5
20579 ac_status=$?
20580 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20581 test $ac_status = 0; }; then
20582 pkg_cv_LIBNL_CFLAGS=`$PKG_CONFIG --cflags "libnl-3.0 libnl-route-3.0 libnl-genl-3.0" 2>/dev/null`
20583 test "x$?" != "x0" && pkg_failed=yes
20584 else
20585 pkg_failed=yes
20586 fi
20587 else
20588 pkg_failed=untried
20589 fi
20590 if test -n "$LIBNL_LIBS"; then
20591 pkg_cv_LIBNL_LIBS="$LIBNL_LIBS"
20592 elif test -n "$PKG_CONFIG"; then
20593 if test -n "$PKG_CONFIG" && \
20594 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-3.0 libnl-route-3.0 libnl-genl-3.0\""; } >&5
20595 ($PKG_CONFIG --exists --print-errors "libnl-3.0 libnl-route-3.0 libnl-genl-3.0") 2>&5
20596 ac_status=$?
20597 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20598 test $ac_status = 0; }; then
20599 pkg_cv_LIBNL_LIBS=`$PKG_CONFIG --libs "libnl-3.0 libnl-route-3.0 libnl-genl-3.0" 2>/dev/null`
20600 test "x$?" != "x0" && pkg_failed=yes
20601 else
20602 pkg_failed=yes
20603 fi
20604 else
20605 pkg_failed=untried
20606 fi
20607  
20608  
20609  
20610 if test $pkg_failed = yes; then
20611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20612 $as_echo "no" >&6; }
20613  
20614 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
20615 _pkg_short_errors_supported=yes
20616 else
20617 _pkg_short_errors_supported=no
20618 fi
20619 if test $_pkg_short_errors_supported = yes; then
20620 LIBNL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnl-3.0 libnl-route-3.0 libnl-genl-3.0" 2>&1`
20621 else
20622 LIBNL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnl-3.0 libnl-route-3.0 libnl-genl-3.0" 2>&1`
20623 fi
20624 # Put the nasty error message in config.log where it belongs
20625 echo "$LIBNL_PKG_ERRORS" >&5
20626  
20627 as_fn_error $? "Package requirements (libnl-3.0 libnl-route-3.0 libnl-genl-3.0) were not met:
20628  
20629 $LIBNL_PKG_ERRORS
20630  
20631 Consider adjusting the PKG_CONFIG_PATH environment variable if you
20632 installed software in a non-standard prefix.
20633  
20634 Alternatively, you may set the environment variables LIBNL_CFLAGS
20635 and LIBNL_LIBS to avoid the need to call pkg-config.
20636 See the pkg-config man page for more details." "$LINENO" 5
20637 elif test $pkg_failed = untried; then
20638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20639 $as_echo "no" >&6; }
20640 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20641 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20642 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
20643 is in your PATH or set the PKG_CONFIG environment variable to the full
20644 path to pkg-config.
20645  
20646 Alternatively, you may set the environment variables LIBNL_CFLAGS
20647 and LIBNL_LIBS to avoid the need to call pkg-config.
20648 See the pkg-config man page for more details.
20649  
20650 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
20651 See \`config.log' for more details" "$LINENO" 5; }
20652 else
20653 LIBNL_CFLAGS=$pkg_cv_LIBNL_CFLAGS
20654 LIBNL_LIBS=$pkg_cv_LIBNL_LIBS
20655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20656 $as_echo "yes" >&6; }
20657  
20658 fi
20659  
20660 if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
20661 LIBNL_CFLAGS=`echo " $LIBNL_CFLAGS" \
20662 | sed -e 's/ *-I *\// -isystem\//g' -e 's/^ *//'`
20663 fi
20664  
20665  
20666  
20667 $as_echo "#define HAVE_LIBNL 1" >>confdefs.h
20668  
20669  
20670 $as_echo "#define HAVE_LIBNL3 1" >>confdefs.h
20671  
20672 libnl_message="yes (v3)"
20673 elif (test "${have_libnl2}" = "yes"); then
20674  
20675  
20676 pkg_failed=no
20677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBNL" >&5
20678 $as_echo_n "checking for LIBNL... " >&6; }
20679  
20680 if test -n "$LIBNL_CFLAGS"; then
20681 pkg_cv_LIBNL_CFLAGS="$LIBNL_CFLAGS"
20682 elif test -n "$PKG_CONFIG"; then
20683 if test -n "$PKG_CONFIG" && \
20684 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-2.0\""; } >&5
20685 ($PKG_CONFIG --exists --print-errors "libnl-2.0") 2>&5
20686 ac_status=$?
20687 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20688 test $ac_status = 0; }; then
20689 pkg_cv_LIBNL_CFLAGS=`$PKG_CONFIG --cflags "libnl-2.0" 2>/dev/null`
20690 test "x$?" != "x0" && pkg_failed=yes
20691 else
20692 pkg_failed=yes
20693 fi
20694 else
20695 pkg_failed=untried
20696 fi
20697 if test -n "$LIBNL_LIBS"; then
20698 pkg_cv_LIBNL_LIBS="$LIBNL_LIBS"
20699 elif test -n "$PKG_CONFIG"; then
20700 if test -n "$PKG_CONFIG" && \
20701 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-2.0\""; } >&5
20702 ($PKG_CONFIG --exists --print-errors "libnl-2.0") 2>&5
20703 ac_status=$?
20704 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20705 test $ac_status = 0; }; then
20706 pkg_cv_LIBNL_LIBS=`$PKG_CONFIG --libs "libnl-2.0" 2>/dev/null`
20707 test "x$?" != "x0" && pkg_failed=yes
20708 else
20709 pkg_failed=yes
20710 fi
20711 else
20712 pkg_failed=untried
20713 fi
20714  
20715  
20716  
20717 if test $pkg_failed = yes; then
20718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20719 $as_echo "no" >&6; }
20720  
20721 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
20722 _pkg_short_errors_supported=yes
20723 else
20724 _pkg_short_errors_supported=no
20725 fi
20726 if test $_pkg_short_errors_supported = yes; then
20727 LIBNL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnl-2.0" 2>&1`
20728 else
20729 LIBNL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnl-2.0" 2>&1`
20730 fi
20731 # Put the nasty error message in config.log where it belongs
20732 echo "$LIBNL_PKG_ERRORS" >&5
20733  
20734 as_fn_error $? "Package requirements (libnl-2.0) were not met:
20735  
20736 $LIBNL_PKG_ERRORS
20737  
20738 Consider adjusting the PKG_CONFIG_PATH environment variable if you
20739 installed software in a non-standard prefix.
20740  
20741 Alternatively, you may set the environment variables LIBNL_CFLAGS
20742 and LIBNL_LIBS to avoid the need to call pkg-config.
20743 See the pkg-config man page for more details." "$LINENO" 5
20744 elif test $pkg_failed = untried; then
20745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20746 $as_echo "no" >&6; }
20747 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20748 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20749 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
20750 is in your PATH or set the PKG_CONFIG environment variable to the full
20751 path to pkg-config.
20752  
20753 Alternatively, you may set the environment variables LIBNL_CFLAGS
20754 and LIBNL_LIBS to avoid the need to call pkg-config.
20755 See the pkg-config man page for more details.
20756  
20757 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
20758 See \`config.log' for more details" "$LINENO" 5; }
20759 else
20760 LIBNL_CFLAGS=$pkg_cv_LIBNL_CFLAGS
20761 LIBNL_LIBS=$pkg_cv_LIBNL_LIBS
20762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20763 $as_echo "yes" >&6; }
20764  
20765 fi
20766  
20767 if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
20768 LIBNL_CFLAGS=`echo " $LIBNL_CFLAGS" \
20769 | sed -e 's/ *-I *\// -isystem\//g' -e 's/^ *//'`
20770 fi
20771  
20772  
20773  
20774 $as_echo "#define HAVE_LIBNL 1" >>confdefs.h
20775  
20776  
20777 $as_echo "#define HAVE_LIBNL2 1" >>confdefs.h
20778  
20779 libnl_message="yes (v2)"
20780 elif (test "${have_libnl1}" = "yes"); then
20781  
20782  
20783 pkg_failed=no
20784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBNL" >&5
20785 $as_echo_n "checking for LIBNL... " >&6; }
20786  
20787 if test -n "$LIBNL_CFLAGS"; then
20788 pkg_cv_LIBNL_CFLAGS="$LIBNL_CFLAGS"
20789 elif test -n "$PKG_CONFIG"; then
20790 if test -n "$PKG_CONFIG" && \
20791 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-1\""; } >&5
20792 ($PKG_CONFIG --exists --print-errors "libnl-1") 2>&5
20793 ac_status=$?
20794 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20795 test $ac_status = 0; }; then
20796 pkg_cv_LIBNL_CFLAGS=`$PKG_CONFIG --cflags "libnl-1" 2>/dev/null`
20797 test "x$?" != "x0" && pkg_failed=yes
20798 else
20799 pkg_failed=yes
20800 fi
20801 else
20802 pkg_failed=untried
20803 fi
20804 if test -n "$LIBNL_LIBS"; then
20805 pkg_cv_LIBNL_LIBS="$LIBNL_LIBS"
20806 elif test -n "$PKG_CONFIG"; then
20807 if test -n "$PKG_CONFIG" && \
20808 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-1\""; } >&5
20809 ($PKG_CONFIG --exists --print-errors "libnl-1") 2>&5
20810 ac_status=$?
20811 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20812 test $ac_status = 0; }; then
20813 pkg_cv_LIBNL_LIBS=`$PKG_CONFIG --libs "libnl-1" 2>/dev/null`
20814 test "x$?" != "x0" && pkg_failed=yes
20815 else
20816 pkg_failed=yes
20817 fi
20818 else
20819 pkg_failed=untried
20820 fi
20821  
20822  
20823  
20824 if test $pkg_failed = yes; then
20825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20826 $as_echo "no" >&6; }
20827  
20828 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
20829 _pkg_short_errors_supported=yes
20830 else
20831 _pkg_short_errors_supported=no
20832 fi
20833 if test $_pkg_short_errors_supported = yes; then
20834 LIBNL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnl-1" 2>&1`
20835 else
20836 LIBNL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnl-1" 2>&1`
20837 fi
20838 # Put the nasty error message in config.log where it belongs
20839 echo "$LIBNL_PKG_ERRORS" >&5
20840  
20841 as_fn_error $? "Package requirements (libnl-1) were not met:
20842  
20843 $LIBNL_PKG_ERRORS
20844  
20845 Consider adjusting the PKG_CONFIG_PATH environment variable if you
20846 installed software in a non-standard prefix.
20847  
20848 Alternatively, you may set the environment variables LIBNL_CFLAGS
20849 and LIBNL_LIBS to avoid the need to call pkg-config.
20850 See the pkg-config man page for more details." "$LINENO" 5
20851 elif test $pkg_failed = untried; then
20852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20853 $as_echo "no" >&6; }
20854 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20855 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20856 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
20857 is in your PATH or set the PKG_CONFIG environment variable to the full
20858 path to pkg-config.
20859  
20860 Alternatively, you may set the environment variables LIBNL_CFLAGS
20861 and LIBNL_LIBS to avoid the need to call pkg-config.
20862 See the pkg-config man page for more details.
20863  
20864 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
20865 See \`config.log' for more details" "$LINENO" 5; }
20866 else
20867 LIBNL_CFLAGS=$pkg_cv_LIBNL_CFLAGS
20868 LIBNL_LIBS=$pkg_cv_LIBNL_LIBS
20869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20870 $as_echo "yes" >&6; }
20871  
20872 fi
20873  
20874 if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
20875 LIBNL_CFLAGS=`echo " $LIBNL_CFLAGS" \
20876 | sed -e 's/ *-I *\// -isystem\//g' -e 's/^ *//'`
20877 fi
20878  
20879  
20880  
20881 $as_echo "#define HAVE_LIBNL 1" >>confdefs.h
20882  
20883  
20884 $as_echo "#define HAVE_LIBNL1 1" >>confdefs.h
20885  
20886 libnl_message="yes (v1)"
20887 else
20888 if test x$want_libnl = "xyes"; then
20889 case "$libnl_version" in
20890  
20891 any)
20892 as_fn_error $? "\"I couldn't find libnl even though you manually enabled it.\"" "$LINENO" 5
20893 ;;
20894  
20895 *)
20896 as_fn_error $? "\"I couldn't find libnl version $libnl_version even though you manually enabled it.\"" "$LINENO" 5
20897 ;;
20898 esac
20899 fi
20900 fi
20901 fi
20902  
20903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nl80211.h is new enough" >&5
20904 $as_echo_n "checking if nl80211.h is new enough... " >&6; }
20905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20906 /* end confdefs.h. */
20907 #include <linux/nl80211.h>
20908 int
20909 main ()
20910 {
20911 int x = NL80211_FREQUENCY_ATTR_MAX_TX_POWER;
20912 x |= NL80211_ATTR_SUPPORTED_IFTYPES;
20913 x |= NL80211_ATTR_SUPPORTED_COMMANDS;
20914 x |= NL80211_ATTR_WIPHY_FREQ;
20915 x |= NL80211_CHAN_NO_HT;
20916 (void)x;
20917 ;
20918 return 0;
20919 }
20920 _ACEOF
20921 if ac_fn_c_try_compile "$LINENO"; then :
20922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20923 $as_echo "yes" >&6; }
20924 $as_echo "#define HAVE_NL80211 1" >>confdefs.h
20925  
20926 else
20927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20928 $as_echo "no" >&6; }
20929 fi
20930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20931  
20932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NL80211_SET_CHANNEL" >&5
20933 $as_echo_n "checking for NL80211_SET_CHANNEL... " >&6; }
20934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20935 /* end confdefs.h. */
20936 #include <linux/nl80211.h>
20937 int
20938 main ()
20939 {
20940 enum nl80211_commands x = NL80211_CMD_SET_CHANNEL;
20941 ;
20942 return 0;
20943 }
20944 _ACEOF
20945 if ac_fn_c_try_compile "$LINENO"; then :
20946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20947 $as_echo "yes" >&6; }
20948 $as_echo "#define HAVE_NL80211_CMD_SET_CHANNEL 1" >>confdefs.h
20949  
20950 else
20951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20952 $as_echo "no" >&6; }
20953 fi
20954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20955  
20956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NL80211_SPLIT_WIPHY_DUMP" >&5
20957 $as_echo_n "checking for NL80211_SPLIT_WIPHY_DUMP... " >&6; }
20958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20959 /* end confdefs.h. */
20960 #include <linux/nl80211.h>
20961 int
20962 main ()
20963 {
20964 enum nl80211_protocol_features x = NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP;
20965 ;
20966 return 0;
20967 }
20968 _ACEOF
20969 if ac_fn_c_try_compile "$LINENO"; then :
20970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20971 $as_echo "yes" >&6; }
20972 $as_echo "#define HAVE_NL80211_SPLIT_WIPHY_DUMP 1" >>confdefs.h
20973  
20974 else
20975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20976 $as_echo "no" >&6; }
20977 fi
20978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20979  
20980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NL80211_VHT_CAPABILITY" >&5
20981 $as_echo_n "checking for NL80211_VHT_CAPABILITY... " >&6; }
20982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20983 /* end confdefs.h. */
20984 #include <linux/nl80211.h>
20985 int
20986 main ()
20987 {
20988 enum nl80211_attrs x = NL80211_ATTR_VHT_CAPABILITY;
20989 ;
20990 return 0;
20991 }
20992 _ACEOF
20993 if ac_fn_c_try_compile "$LINENO"; then :
20994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20995 $as_echo "yes" >&6; }
20996 $as_echo "#define HAVE_NL80211_VHT_CAPABILITY 1" >>confdefs.h
20997  
20998 else
20999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21000 $as_echo "no" >&6; }
21001 fi
21002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21003 ;;
21004  
21005 *)
21006 if test x$want_libnl != "xno" -a x$want_libnl != "xifavailable"; then
21007 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libnl is Linux-specific, ignoring --with-libnl" >&5
21008 $as_echo "$as_me: WARNING: libnl is Linux-specific, ignoring --with-libnl" >&2;}
21009 fi
21010 esac
21011  
21012 # libsmi
21013 # FIXME: currently the path argument to with-libsmi is being ignored
21014  
21015  
21016 # Check whether --with-libsmi was given.
21017 if test "${with_libsmi+set}" = set; then :
21018 withval=$with_libsmi;
21019 if test "$withval" = "no"; then
21020 WANT_LIBSMI="no"
21021 elif test "$withval" = "yes"; then
21022 WANT_LIBSMI="yes"
21023 ac_libsmi_path=""
21024 else
21025 WANT_LIBSMI="yes"
21026 ac_libsmi_path="$withval"
21027 fi
21028  
21029 else
21030 WANT_LIBSMI="yes"
21031  
21032 fi
21033  
21034  
21035 libsmi_message="no"
21036 LIBSMI_CFLAGS=""
21037 LIBSMI_LDFLAGS=""
21038 LIBSMI_VERSION=""
21039  
21040 if test "x$WANT_LIBSMI" = "xyes"; then
21041  
21042 ac_libsmi_header="smi.h"
21043  
21044 libsmi_version_req=2
21045  
21046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsmi >= $libsmi_version_req" >&5
21047 $as_echo_n "checking for libsmi >= $libsmi_version_req... " >&6; }
21048  
21049 if test "$ac_libsmi_path" != ""; then
21050 ac_libsmi_ldflags="-L$ac_libsmi_path/lib"
21051 ac_libsmi_cflags="-I$ac_libsmi_path/include"
21052 else
21053 for ac_libsmi_path_tmp in /usr /usr/local /opt $prefix; do
21054 if test -f "$ac_libsmi_path_tmp/include/$ac_libsmi_header" \
21055 && test -r "$ac_libsmi_path_tmp/include/$ac_libsmi_header"; then
21056 ac_libsmi_path=$ac_libsmi_path_tmp
21057 ac_libsmi_ldflags="-L$ac_libsmi_path_tmp/lib"
21058 ac_libsmi_cflags="-I$ac_libsmi_path_tmp/include"
21059 break;
21060 fi
21061 done
21062 fi
21063  
21064 ac_libsmi_ldflags="$ac_libsmi_ldflags -lsmi"
21065  
21066 saved_CFLAGS="$CFLAGS"
21067 CFLAGS="$CFLAGS $ac_libsmi_cflags"
21068  
21069 ac_ext=c
21070 ac_cpp='$CPP $CPPFLAGS'
21071 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21072 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21073 ac_compiler_gnu=$ac_cv_c_compiler_gnu
21074  
21075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21076 /* end confdefs.h. */
21077  
21078 #include <smi.h>
21079 int
21080 main ()
21081 {
21082  
21083 int current, revision, age, n;
21084 const int required = $libsmi_version_req;
21085 if (smiInit(""))
21086 exit(1);
21087 if (strcmp(SMI_LIBRARY_VERSION, smi_library_version))
21088 exit(2);
21089 n = sscanf(smi_library_version, "%d:%d:%d", &current, &revision, &age);
21090 if (n != 3)
21091 exit(3);
21092 if (required < current - age || required > current)
21093 exit(4);
21094  
21095  
21096 ;
21097 return 0;
21098 }
21099  
21100 _ACEOF
21101 if ac_fn_c_try_compile "$LINENO"; then :
21102  
21103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21104 $as_echo "yes" >&6; }
21105 libsmi_message="yes"
21106  
21107 else
21108  
21109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21110 $as_echo "not found" >&6; }
21111 libsmi_message="no"
21112  
21113  
21114 fi
21115 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21116 ac_ext=c
21117 ac_cpp='$CPP $CPPFLAGS'
21118 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21119 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21120 ac_compiler_gnu=$ac_cv_c_compiler_gnu
21121  
21122  
21123 CFLAGS="$saved_CFLAGS"
21124  
21125 if test "$libsmi_message" = "yes"; then
21126  
21127 LIBSMI_CFLAGS="$ac_libsmi_cflags"
21128 LIBSMI_LDFLAGS="$ac_libsmi_ldflags"
21129  
21130 ac_libsmi_header_path="$ac_libsmi_path/include/$ac_libsmi_header"
21131  
21132 if test "x$ac_libsmi_header_path" != "x"; then
21133 ac_libsmi_version=`cat $ac_libsmi_header_path \
21134 | grep '#define.*SMI_LIBRARY_VERSION.*\"' | sed -e 's/.* "//' \
21135 | sed -e 's/"//'`
21136 if test $ac_libsmi_version != ""; then
21137 LIBSMI_VERSION=$ac_libsmi_version
21138 else
21139 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find SMI_LIBRARY_VERSION macro in smi.h header to retrieve libsmi version!" >&5
21140 $as_echo "$as_me: WARNING: Can not find SMI_LIBRARY_VERSION macro in smi.h header to retrieve libsmi version!" >&2;}
21141 fi
21142 fi
21143  
21144  
21145  
21146  
21147  
21148 $as_echo "#define HAVE_LIBSMI 1" >>confdefs.h
21149  
21150 fi
21151 fi
21152  
21153  
21154 #
21155 # Check for programs used when building DocBook documentation.
21156 #
21157 for ac_prog in xsltproc
21158 do
21159 # Extract the first word of "$ac_prog", so it can be a program name with args.
21160 set dummy $ac_prog; ac_word=$2
21161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21162 $as_echo_n "checking for $ac_word... " >&6; }
21163 if ${ac_cv_prog_XSLTPROC+:} false; then :
21164 $as_echo_n "(cached) " >&6
21165 else
21166 if test -n "$XSLTPROC"; then
21167 ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test.
21168 else
21169 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21170 for as_dir in $PATH
21171 do
21172 IFS=$as_save_IFS
21173 test -z "$as_dir" && as_dir=.
21174 for ac_exec_ext in '' $ac_executable_extensions; do
21175 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21176 ac_cv_prog_XSLTPROC="$ac_prog"
21177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21178 break 2
21179 fi
21180 done
21181 done
21182 IFS=$as_save_IFS
21183  
21184 fi
21185 fi
21186 XSLTPROC=$ac_cv_prog_XSLTPROC
21187 if test -n "$XSLTPROC"; then
21188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
21189 $as_echo "$XSLTPROC" >&6; }
21190 else
21191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21192 $as_echo "no" >&6; }
21193 fi
21194  
21195  
21196 test -n "$XSLTPROC" && break
21197 done
21198 test -n "$XSLTPROC" || XSLTPROC="xsltproc"
21199  
21200 for ac_prog in a2x
21201 do
21202 # Extract the first word of "$ac_prog", so it can be a program name with args.
21203 set dummy $ac_prog; ac_word=$2
21204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21205 $as_echo_n "checking for $ac_word... " >&6; }
21206 if ${ac_cv_prog_A2X+:} false; then :
21207 $as_echo_n "(cached) " >&6
21208 else
21209 if test -n "$A2X"; then
21210 ac_cv_prog_A2X="$A2X" # Let the user override the test.
21211 else
21212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21213 for as_dir in $PATH
21214 do
21215 IFS=$as_save_IFS
21216 test -z "$as_dir" && as_dir=.
21217 for ac_exec_ext in '' $ac_executable_extensions; do
21218 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21219 ac_cv_prog_A2X="$ac_prog"
21220 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21221 break 2
21222 fi
21223 done
21224 done
21225 IFS=$as_save_IFS
21226  
21227 fi
21228 fi
21229 A2X=$ac_cv_prog_A2X
21230 if test -n "$A2X"; then
21231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $A2X" >&5
21232 $as_echo "$A2X" >&6; }
21233 else
21234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21235 $as_echo "no" >&6; }
21236 fi
21237  
21238  
21239 test -n "$A2X" && break
21240 done
21241 test -n "$A2X" || A2X="a2x"
21242  
21243 for ac_prog in fop
21244 do
21245 # Extract the first word of "$ac_prog", so it can be a program name with args.
21246 set dummy $ac_prog; ac_word=$2
21247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21248 $as_echo_n "checking for $ac_word... " >&6; }
21249 if ${ac_cv_prog_FOP+:} false; then :
21250 $as_echo_n "(cached) " >&6
21251 else
21252 if test -n "$FOP"; then
21253 ac_cv_prog_FOP="$FOP" # Let the user override the test.
21254 else
21255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21256 for as_dir in $PATH
21257 do
21258 IFS=$as_save_IFS
21259 test -z "$as_dir" && as_dir=.
21260 for ac_exec_ext in '' $ac_executable_extensions; do
21261 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21262 ac_cv_prog_FOP="$ac_prog"
21263 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21264 break 2
21265 fi
21266 done
21267 done
21268 IFS=$as_save_IFS
21269  
21270 fi
21271 fi
21272 FOP=$ac_cv_prog_FOP
21273 if test -n "$FOP"; then
21274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
21275 $as_echo "$FOP" >&6; }
21276 else
21277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21278 $as_echo "no" >&6; }
21279 fi
21280  
21281  
21282 test -n "$FOP" && break
21283 done
21284 test -n "$FOP" || FOP="fop"
21285  
21286  
21287 # HTML to text processor
21288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an HTML to text processor" >&5
21289 $as_echo_n "checking for an HTML to text processor... " >&6; }
21290 if w3m -version >&5 2>&1; then :
21291 have_a2x_text=w3m
21292 elif lynx -version >&5 2>&1; then :
21293 have_a2x_text=lynx
21294 else
21295 have_a2x_text=no
21296 fi
21297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_a2x_text" >&5
21298 $as_echo "$have_a2x_text" >&6; }
21299 if test "x$have_a2x_text" != xno; then
21300 HAVE_A2X_TEXT_TRUE=
21301 HAVE_A2X_TEXT_FALSE='#'
21302 else
21303 HAVE_A2X_TEXT_TRUE='#'
21304 HAVE_A2X_TEXT_FALSE=
21305 fi
21306  
21307 if test $have_a2x_text = lynx; then :
21308 A2X_LYNX="--lynx"
21309 fi
21310  
21311  
21312 # Check for packaging utilities
21313 # For now, we check to see if the various packaging utilites are in our
21314 # path. I'm too lazy to write code to go hunt for them. - Gerald
21315  
21316 #
21317 # Source packages.
21318 # (Lets you install the desktop files.)
21319 #
21320 # Extract the first word of "desktop-file-install", so it can be a program name with args.
21321 set dummy desktop-file-install; ac_word=$2
21322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21323 $as_echo_n "checking for $ac_word... " >&6; }
21324 if ${ac_cv_path_DESKTOP_FILE_INSTALL+:} false; then :
21325 $as_echo_n "(cached) " >&6
21326 else
21327 case $DESKTOP_FILE_INSTALL in
21328 [\\/]* | ?:[\\/]*)
21329 ac_cv_path_DESKTOP_FILE_INSTALL="$DESKTOP_FILE_INSTALL" # Let the user override the test with a path.
21330 ;;
21331 *)
21332 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21333 for as_dir in $PATH
21334 do
21335 IFS=$as_save_IFS
21336 test -z "$as_dir" && as_dir=.
21337 for ac_exec_ext in '' $ac_executable_extensions; do
21338 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21339 ac_cv_path_DESKTOP_FILE_INSTALL="$as_dir/$ac_word$ac_exec_ext"
21340 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21341 break 2
21342 fi
21343 done
21344 done
21345 IFS=$as_save_IFS
21346  
21347 ;;
21348 esac
21349 fi
21350 DESKTOP_FILE_INSTALL=$ac_cv_path_DESKTOP_FILE_INSTALL
21351 if test -n "$DESKTOP_FILE_INSTALL"; then
21352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DESKTOP_FILE_INSTALL" >&5
21353 $as_echo "$DESKTOP_FILE_INSTALL" >&6; }
21354 else
21355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21356 $as_echo "no" >&6; }
21357 fi
21358  
21359  
21360  
21361 # SVR4/Solaris
21362 # Extract the first word of "pkgproto", so it can be a program name with args.
21363 set dummy pkgproto; ac_word=$2
21364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21365 $as_echo_n "checking for $ac_word... " >&6; }
21366 if ${ac_cv_prog_HAVE_PKGPROTO+:} false; then :
21367 $as_echo_n "(cached) " >&6
21368 else
21369 if test -n "$HAVE_PKGPROTO"; then
21370 ac_cv_prog_HAVE_PKGPROTO="$HAVE_PKGPROTO" # Let the user override the test.
21371 else
21372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21373 for as_dir in $PATH
21374 do
21375 IFS=$as_save_IFS
21376 test -z "$as_dir" && as_dir=.
21377 for ac_exec_ext in '' $ac_executable_extensions; do
21378 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21379 ac_cv_prog_HAVE_PKGPROTO=""yes""
21380 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21381 break 2
21382 fi
21383 done
21384 done
21385 IFS=$as_save_IFS
21386  
21387 test -z "$ac_cv_prog_HAVE_PKGPROTO" && ac_cv_prog_HAVE_PKGPROTO=""no""
21388 fi
21389 fi
21390 HAVE_PKGPROTO=$ac_cv_prog_HAVE_PKGPROTO
21391 if test -n "$HAVE_PKGPROTO"; then
21392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_PKGPROTO" >&5
21393 $as_echo "$HAVE_PKGPROTO" >&6; }
21394 else
21395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21396 $as_echo "no" >&6; }
21397 fi
21398  
21399  
21400 # Extract the first word of "pkgmk", so it can be a program name with args.
21401 set dummy pkgmk; ac_word=$2
21402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21403 $as_echo_n "checking for $ac_word... " >&6; }
21404 if ${ac_cv_prog_HAVE_PKGMK+:} false; then :
21405 $as_echo_n "(cached) " >&6
21406 else
21407 if test -n "$HAVE_PKGMK"; then
21408 ac_cv_prog_HAVE_PKGMK="$HAVE_PKGMK" # Let the user override the test.
21409 else
21410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21411 for as_dir in $PATH
21412 do
21413 IFS=$as_save_IFS
21414 test -z "$as_dir" && as_dir=.
21415 for ac_exec_ext in '' $ac_executable_extensions; do
21416 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21417 ac_cv_prog_HAVE_PKGMK=""yes""
21418 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21419 break 2
21420 fi
21421 done
21422 done
21423 IFS=$as_save_IFS
21424  
21425 test -z "$ac_cv_prog_HAVE_PKGMK" && ac_cv_prog_HAVE_PKGMK=""no""
21426 fi
21427 fi
21428 HAVE_PKGMK=$ac_cv_prog_HAVE_PKGMK
21429 if test -n "$HAVE_PKGMK"; then
21430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_PKGMK" >&5
21431 $as_echo "$HAVE_PKGMK" >&6; }
21432 else
21433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21434 $as_echo "no" >&6; }
21435 fi
21436  
21437  
21438 # Extract the first word of "pkgtrans", so it can be a program name with args.
21439 set dummy pkgtrans; ac_word=$2
21440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21441 $as_echo_n "checking for $ac_word... " >&6; }
21442 if ${ac_cv_prog_HAVE_PKGTRANS+:} false; then :
21443 $as_echo_n "(cached) " >&6
21444 else
21445 if test -n "$HAVE_PKGTRANS"; then
21446 ac_cv_prog_HAVE_PKGTRANS="$HAVE_PKGTRANS" # Let the user override the test.
21447 else
21448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21449 for as_dir in $PATH
21450 do
21451 IFS=$as_save_IFS
21452 test -z "$as_dir" && as_dir=.
21453 for ac_exec_ext in '' $ac_executable_extensions; do
21454 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21455 ac_cv_prog_HAVE_PKGTRANS=""yes""
21456 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21457 break 2
21458 fi
21459 done
21460 done
21461 IFS=$as_save_IFS
21462  
21463 test -z "$ac_cv_prog_HAVE_PKGTRANS" && ac_cv_prog_HAVE_PKGTRANS=""no""
21464 fi
21465 fi
21466 HAVE_PKGTRANS=$ac_cv_prog_HAVE_PKGTRANS
21467 if test -n "$HAVE_PKGTRANS"; then
21468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_PKGTRANS" >&5
21469 $as_echo "$HAVE_PKGTRANS" >&6; }
21470 else
21471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21472 $as_echo "no" >&6; }
21473 fi
21474  
21475  
21476  
21477 if test x$HAVE_PKGPROTO = xyes -a x$HAVE_PKGMK = xyes \
21478 -a x$HAVE_PKGTRANS = xyes ; then
21479 HAVE_SVR4_PACKAGING=yes
21480 else
21481 HAVE_SVR4_PACKAGING=no
21482 fi
21483  
21484  
21485 # RPM
21486 #
21487 # Looks for the rpmbuild program, and checks to see if we can redefine "_topdir".
21488 #
21489 for ac_prog in rpmbuild
21490 do
21491 # Extract the first word of "$ac_prog", so it can be a program name with args.
21492 set dummy $ac_prog; ac_word=$2
21493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21494 $as_echo_n "checking for $ac_word... " >&6; }
21495 if ${ac_cv_prog_RPMBUILD+:} false; then :
21496 $as_echo_n "(cached) " >&6
21497 else
21498 if test -n "$RPMBUILD"; then
21499 ac_cv_prog_RPMBUILD="$RPMBUILD" # Let the user override the test.
21500 else
21501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21502 for as_dir in $PATH
21503 do
21504 IFS=$as_save_IFS
21505 test -z "$as_dir" && as_dir=.
21506 for ac_exec_ext in '' $ac_executable_extensions; do
21507 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21508 ac_cv_prog_RPMBUILD="$ac_prog"
21509 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21510 break 2
21511 fi
21512 done
21513 done
21514 IFS=$as_save_IFS
21515  
21516 fi
21517 fi
21518 RPMBUILD=$ac_cv_prog_RPMBUILD
21519 if test -n "$RPMBUILD"; then
21520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RPMBUILD" >&5
21521 $as_echo "$RPMBUILD" >&6; }
21522 else
21523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21524 $as_echo "no" >&6; }
21525 fi
21526  
21527  
21528 test -n "$RPMBUILD" && break
21529 done
21530 test -n "$RPMBUILD" || RPMBUILD="false"
21531  
21532 if test "x$RPMBUILD" != "xfalse" ; then
21533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if we can redefine _topdir" >&5
21534 $as_echo_n "checking to see if we can redefine _topdir... " >&6; }
21535 rpm --define '_topdir /tmp' > /dev/null 2>&1
21536 if test $? -eq 0 ; then
21537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21538 $as_echo "yes" >&6; }
21539 have_rpm=yes
21540 else
21541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, you'll have to build packages manually" >&5
21542 $as_echo "no, you'll have to build packages manually" >&6; }
21543 have_rpm=no
21544 fi
21545 fi
21546 if test "x$have_rpm" = xyes; then
21547 HAVE_RPM_TRUE=
21548 HAVE_RPM_FALSE='#'
21549 else
21550 HAVE_RPM_TRUE='#'
21551 HAVE_RPM_FALSE=
21552 fi
21553  
21554  
21555 # Debian
21556 # Extract the first word of "dpkg-buildpackage", so it can be a program name with args.
21557 set dummy dpkg-buildpackage; ac_word=$2
21558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21559 $as_echo_n "checking for $ac_word... " >&6; }
21560 if ${ac_cv_prog_HAVE_DPKG_BUILDPACKAGE+:} false; then :
21561 $as_echo_n "(cached) " >&6
21562 else
21563 if test -n "$HAVE_DPKG_BUILDPACKAGE"; then
21564 ac_cv_prog_HAVE_DPKG_BUILDPACKAGE="$HAVE_DPKG_BUILDPACKAGE" # Let the user override the test.
21565 else
21566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21567 for as_dir in $PATH
21568 do
21569 IFS=$as_save_IFS
21570 test -z "$as_dir" && as_dir=.
21571 for ac_exec_ext in '' $ac_executable_extensions; do
21572 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21573 ac_cv_prog_HAVE_DPKG_BUILDPACKAGE=""yes""
21574 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21575 break 2
21576 fi
21577 done
21578 done
21579 IFS=$as_save_IFS
21580  
21581 test -z "$ac_cv_prog_HAVE_DPKG_BUILDPACKAGE" && ac_cv_prog_HAVE_DPKG_BUILDPACKAGE=""no""
21582 fi
21583 fi
21584 HAVE_DPKG_BUILDPACKAGE=$ac_cv_prog_HAVE_DPKG_BUILDPACKAGE
21585 if test -n "$HAVE_DPKG_BUILDPACKAGE"; then
21586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_DPKG_BUILDPACKAGE" >&5
21587 $as_echo "$HAVE_DPKG_BUILDPACKAGE" >&6; }
21588 else
21589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21590 $as_echo "no" >&6; }
21591 fi
21592  
21593  
21594  
21595 # OS X
21596 # Extract the first word of "xcodebuild", so it can be a program name with args.
21597 set dummy xcodebuild; ac_word=$2
21598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21599 $as_echo_n "checking for $ac_word... " >&6; }
21600 if ${ac_cv_prog_HAVE_XCODEBUILD+:} false; then :
21601 $as_echo_n "(cached) " >&6
21602 else
21603 if test -n "$HAVE_XCODEBUILD"; then
21604 ac_cv_prog_HAVE_XCODEBUILD="$HAVE_XCODEBUILD" # Let the user override the test.
21605 else
21606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21607 for as_dir in $PATH
21608 do
21609 IFS=$as_save_IFS
21610 test -z "$as_dir" && as_dir=.
21611 for ac_exec_ext in '' $ac_executable_extensions; do
21612 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21613 ac_cv_prog_HAVE_XCODEBUILD=""yes""
21614 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21615 break 2
21616 fi
21617 done
21618 done
21619 IFS=$as_save_IFS
21620  
21621 test -z "$ac_cv_prog_HAVE_XCODEBUILD" && ac_cv_prog_HAVE_XCODEBUILD=""no""
21622 fi
21623 fi
21624 HAVE_XCODEBUILD=$ac_cv_prog_HAVE_XCODEBUILD
21625 if test -n "$HAVE_XCODEBUILD"; then
21626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XCODEBUILD" >&5
21627 $as_echo "$HAVE_XCODEBUILD" >&6; }
21628 else
21629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21630 $as_echo "no" >&6; }
21631 fi
21632  
21633  
21634 # Extract the first word of "hdiutil", so it can be a program name with args.
21635 set dummy hdiutil; ac_word=$2
21636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21637 $as_echo_n "checking for $ac_word... " >&6; }
21638 if ${ac_cv_prog_HAVE_HDIUTIL+:} false; then :
21639 $as_echo_n "(cached) " >&6
21640 else
21641 if test -n "$HAVE_HDIUTIL"; then
21642 ac_cv_prog_HAVE_HDIUTIL="$HAVE_HDIUTIL" # Let the user override the test.
21643 else
21644 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21645 for as_dir in $PATH
21646 do
21647 IFS=$as_save_IFS
21648 test -z "$as_dir" && as_dir=.
21649 for ac_exec_ext in '' $ac_executable_extensions; do
21650 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21651 ac_cv_prog_HAVE_HDIUTIL=""yes""
21652 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21653 break 2
21654 fi
21655 done
21656 done
21657 IFS=$as_save_IFS
21658  
21659 test -z "$ac_cv_prog_HAVE_HDIUTIL" && ac_cv_prog_HAVE_HDIUTIL=""no""
21660 fi
21661 fi
21662 HAVE_HDIUTIL=$ac_cv_prog_HAVE_HDIUTIL
21663 if test -n "$HAVE_HDIUTIL"; then
21664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_HDIUTIL" >&5
21665 $as_echo "$HAVE_HDIUTIL" >&6; }
21666 else
21667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21668 $as_echo "no" >&6; }
21669 fi
21670  
21671  
21672 # Extract the first word of "bless", so it can be a program name with args.
21673 set dummy bless; ac_word=$2
21674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21675 $as_echo_n "checking for $ac_word... " >&6; }
21676 if ${ac_cv_prog_HAVE_BLESS+:} false; then :
21677 $as_echo_n "(cached) " >&6
21678 else
21679 if test -n "$HAVE_BLESS"; then
21680 ac_cv_prog_HAVE_BLESS="$HAVE_BLESS" # Let the user override the test.
21681 else
21682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21683 for as_dir in $PATH
21684 do
21685 IFS=$as_save_IFS
21686 test -z "$as_dir" && as_dir=.
21687 for ac_exec_ext in '' $ac_executable_extensions; do
21688 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21689 ac_cv_prog_HAVE_BLESS=""yes""
21690 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21691 break 2
21692 fi
21693 done
21694 done
21695 IFS=$as_save_IFS
21696  
21697 test -z "$ac_cv_prog_HAVE_BLESS" && ac_cv_prog_HAVE_BLESS=""no""
21698 fi
21699 fi
21700 HAVE_BLESS=$ac_cv_prog_HAVE_BLESS
21701 if test -n "$HAVE_BLESS"; then
21702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_BLESS" >&5
21703 $as_echo "$HAVE_BLESS" >&6; }
21704 else
21705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21706 $as_echo "no" >&6; }
21707 fi
21708  
21709  
21710  
21711 if test x$HAVE_XCODEBUILD = xyes -a x$HAVE_HDIUTIL = xyes \
21712 -a x$HAVE_BLESS = xyes ; then
21713 HAVE_OSX_PACKAGING=yes
21714 else
21715 HAVE_OSX_PACKAGING=no
21716 fi
21717  
21718  
21719 #
21720 # Use this as a proxy for "is this OS X" (just in case somebody actually
21721 # built and installed Darwin as an OS, perhaps with some X11-based GUI,
21722 # don't look for Darwin).
21723 #
21724 # Extract the first word of "sw_vers", so it can be a program name with args.
21725 set dummy sw_vers; ac_word=$2
21726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21727 $as_echo_n "checking for $ac_word... " >&6; }
21728 if ${ac_cv_prog_have_sw_vers+:} false; then :
21729 $as_echo_n "(cached) " >&6
21730 else
21731 if test -n "$have_sw_vers"; then
21732 ac_cv_prog_have_sw_vers="$have_sw_vers" # Let the user override the test.
21733 else
21734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21735 for as_dir in $PATH
21736 do
21737 IFS=$as_save_IFS
21738 test -z "$as_dir" && as_dir=.
21739 for ac_exec_ext in '' $ac_executable_extensions; do
21740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21741 ac_cv_prog_have_sw_vers=""yes""
21742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21743 break 2
21744 fi
21745 done
21746 done
21747 IFS=$as_save_IFS
21748  
21749 test -z "$ac_cv_prog_have_sw_vers" && ac_cv_prog_have_sw_vers=""no""
21750 fi
21751 fi
21752 have_sw_vers=$ac_cv_prog_have_sw_vers
21753 if test -n "$have_sw_vers"; then
21754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sw_vers" >&5
21755 $as_echo "$have_sw_vers" >&6; }
21756 else
21757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21758 $as_echo "no" >&6; }
21759 fi
21760  
21761  
21762 if test "x$have_sw_vers" = "xno"; then
21763 NOT_OS_X_TRUE=
21764 NOT_OS_X_FALSE='#'
21765 else
21766 NOT_OS_X_TRUE='#'
21767 NOT_OS_X_FALSE=
21768 fi
21769  
21770  
21771 #
21772 # Check compiler vendor. For GCC this will be 'gnu' and for Clang 'clang'.
21773 #
21774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler vendor" >&5
21775 $as_echo_n "checking for C compiler vendor... " >&6; }
21776 if ${ax_cv_c_compiler_vendor+:} false; then :
21777 $as_echo_n "(cached) " >&6
21778 else
21779 # note: don't check for gcc first since some other compilers define __GNUC__
21780 vendors="intel: __ICC,__ECC,__INTEL_COMPILER
21781 ibm: __xlc__,__xlC__,__IBMC__,__IBMCPP__
21782 pathscale: __PATHCC__,__PATHSCALE__
21783 clang: __clang__
21784 cray: _CRAYC
21785 fujitsu: __FUJITSU
21786 gnu: __GNUC__
21787 sun: __SUNPRO_C,__SUNPRO_CC
21788 hp: __HP_cc,__HP_aCC
21789 dec: __DECC,__DECCXX,__DECC_VER,__DECCXX_VER
21790 borland: __BORLANDC__,__CODEGEARC__,__TURBOC__
21791 comeau: __COMO__
21792 kai: __KCC
21793 lcc: __LCC__
21794 sgi: __sgi,sgi
21795 microsoft: _MSC_VER
21796 metrowerks: __MWERKS__
21797 watcom: __WATCOMC__
21798 portland: __PGI
21799 tcc: __TINYC__
21800 unknown: UNKNOWN"
21801 for ventest in $vendors; do
21802 case $ventest in
21803 *:) vendor=$ventest; continue ;;
21804 *) vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" ;;
21805 esac
21806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21807 /* end confdefs.h. */
21808  
21809 int
21810 main ()
21811 {
21812  
21813 #if !($vencpp)
21814 thisisanerror;
21815 #endif
21816  
21817 ;
21818 return 0;
21819 }
21820 _ACEOF
21821 if ac_fn_c_try_compile "$LINENO"; then :
21822 break
21823 fi
21824 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21825 done
21826 ax_cv_c_compiler_vendor=`echo $vendor | cut -d: -f1`
21827  
21828 fi
21829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_vendor" >&5
21830 $as_echo "$ax_cv_c_compiler_vendor" >&6; }
21831  
21832 if test "x$CXX" != "x" ; then
21833 ac_ext=cpp
21834 ac_cpp='$CXXCPP $CPPFLAGS'
21835 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21836 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21837 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21838  
21839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler vendor" >&5
21840 $as_echo_n "checking for C++ compiler vendor... " >&6; }
21841 if ${ax_cv_cxx_compiler_vendor+:} false; then :
21842 $as_echo_n "(cached) " >&6
21843 else
21844 # note: don't check for gcc first since some other compilers define __GNUC__
21845 vendors="intel: __ICC,__ECC,__INTEL_COMPILER
21846 ibm: __xlc__,__xlC__,__IBMC__,__IBMCPP__
21847 pathscale: __PATHCC__,__PATHSCALE__
21848 clang: __clang__
21849 cray: _CRAYC
21850 fujitsu: __FUJITSU
21851 gnu: __GNUC__
21852 sun: __SUNPRO_C,__SUNPRO_CC
21853 hp: __HP_cc,__HP_aCC
21854 dec: __DECC,__DECCXX,__DECC_VER,__DECCXX_VER
21855 borland: __BORLANDC__,__CODEGEARC__,__TURBOC__
21856 comeau: __COMO__
21857 kai: __KCC
21858 lcc: __LCC__
21859 sgi: __sgi,sgi
21860 microsoft: _MSC_VER
21861 metrowerks: __MWERKS__
21862 watcom: __WATCOMC__
21863 portland: __PGI
21864 tcc: __TINYC__
21865 unknown: UNKNOWN"
21866 for ventest in $vendors; do
21867 case $ventest in
21868 *:) vendor=$ventest; continue ;;
21869 *) vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" ;;
21870 esac
21871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21872 /* end confdefs.h. */
21873  
21874 int
21875 main ()
21876 {
21877  
21878 #if !($vencpp)
21879 thisisanerror;
21880 #endif
21881  
21882 ;
21883 return 0;
21884 }
21885 _ACEOF
21886 if ac_fn_cxx_try_compile "$LINENO"; then :
21887 break
21888 fi
21889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21890 done
21891 ax_cv_cxx_compiler_vendor=`echo $vendor | cut -d: -f1`
21892  
21893 fi
21894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compiler_vendor" >&5
21895 $as_echo "$ax_cv_cxx_compiler_vendor" >&6; }
21896  
21897 ac_ext=c
21898 ac_cpp='$CPP $CPPFLAGS'
21899 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21900 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21901 ac_compiler_gnu=$ac_cv_c_compiler_gnu
21902  
21903 fi
21904  
21905 #
21906 # Some compilers have to be told to fail when passed an unknown -W flag;
21907 # make sure we do that.
21908 #
21909  
21910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler fails when given an unknown warning option" >&5
21911 $as_echo_n "checking whether the compiler fails when given an unknown warning option... " >&6; }
21912  
21913 ac_ws_CPPLAGS_saved="$CPPFLAGS"
21914 ac_ws_CFLAGS_saved="$CFLAGS"
21915 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
21916 ac_ws_LDFLAGS_saved="$LDFLAGS"
21917 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
21918 CFLAGS="$WS_CFLAGS $CFLAGS"
21919 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
21920 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
21921  
21922 CFLAGS="$CFLAGS -Wxyzzy-this-will-never-succeed-xyzzy"
21923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21924 /* end confdefs.h. */
21925  
21926 int
21927 main ()
21928 {
21929 return 0
21930 ;
21931 return 0;
21932 }
21933 _ACEOF
21934 if ac_fn_c_try_compile "$LINENO"; then :
21935  
21936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, adding -Werror=unknown-warning-option" >&5
21937 $as_echo "no, adding -Werror=unknown-warning-option" >&6; }
21938 #
21939 # We're assuming this is clang, where
21940 # -Werror=unknown-warning-option is the appropriate
21941 # option to force the compiler to fail.
21942 #
21943 ac_wireshark_unknown_warning_option_error="-Werror=unknown-warning-option"
21944  
21945 else
21946  
21947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21948 $as_echo "yes" >&6; }
21949  
21950 fi
21951 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21952  
21953 CPPFLAGS="$ac_ws_CPPLAGS_saved"
21954 CFLAGS="$ac_ws_CFLAGS_saved"
21955 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
21956 LDFLAGS="$ac_ws_LDFLAGS_saved"
21957  
21958  
21959  
21960 #
21961 # Some C++ compilers have to be told to fail when passed a -W flag that
21962 # they don't think should apply to C++; make sure we do that.
21963 #
21964  
21965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler fails when given an warning option not supported for C++" >&5
21966 $as_echo_n "checking whether the compiler fails when given an warning option not supported for C++... " >&6; }
21967 #
21968 # Some C+ compilers warn about -Wmissing-prototypes, and some warn
21969 # about -Wmissing-declarations. Check both.
21970 #
21971 ac_ext=cpp
21972 ac_cpp='$CXXCPP $CPPFLAGS'
21973 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21974 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21975 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21976  
21977  
21978 ac_ws_CPPLAGS_saved="$CPPFLAGS"
21979 ac_ws_CFLAGS_saved="$CFLAGS"
21980 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
21981 ac_ws_LDFLAGS_saved="$LDFLAGS"
21982 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
21983 CFLAGS="$WS_CFLAGS $CFLAGS"
21984 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
21985 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
21986  
21987 save_CXXFLAGS="$CXXFLAGS"
21988 for flag in -Wmissing-prototypes -Wmissing-declarations; do
21989 CXXFLAGS="$save_CXXFLAGS $flag"
21990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21991 /* end confdefs.h. */
21992  
21993 int
21994 main ()
21995 {
21996 return 0
21997 ;
21998 return 0;
21999 }
22000 _ACEOF
22001 if ac_fn_cxx_try_compile "$LINENO"; then :
22002  
22003 #
22004 # We're assuming this is g++, where -Werror is the
22005 # appropriate option to force the compiler to fail.
22006 # Check whether it fails with -Werror.
22007 #
22008 # NOTE: it's important to put -Werror *before*
22009 # the flag, otherwise, when it sees the flag,
22010 # it doesn't yet know that warnings should be
22011 # treated as errors, and doesn't treat the
22012 # "that's C-only" warning as an error.
22013 #
22014 CXXFLAGS="$save_CXXFLAGS -Werror $flag"
22015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22016 /* end confdefs.h. */
22017  
22018 int
22019 main ()
22020 {
22021 return 0
22022 ;
22023 return 0;
22024 }
22025 _ACEOF
22026 if ac_fn_cxx_try_compile "$LINENO"; then :
22027  
22028 #
22029 # No, so this option is actually OK
22030 # with our C++ compiler.
22031 #
22032 # (We need an empty command here to
22033 # prevent some versions of autoconf
22034 # from generating a script with an
22035 # empty "then" clause for an if statement.)
22036 #
22037 :
22038  
22039 else
22040  
22041 #
22042 # Yes, so we need -Werror for the tests.
22043 #
22044 ac_wireshark_non_cxx_warning_option_error="-Werror"
22045 break
22046  
22047 fi
22048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22049  
22050 fi
22051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22052 done
22053  
22054 CPPFLAGS="$ac_ws_CPPLAGS_saved"
22055 CFLAGS="$ac_ws_CFLAGS_saved"
22056 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
22057 LDFLAGS="$ac_ws_LDFLAGS_saved"
22058  
22059 ac_ext=c
22060 ac_cpp='$CPP $CPPFLAGS'
22061 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22062 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22063 ac_compiler_gnu=$ac_cv_c_compiler_gnu
22064  
22065 if test x$ac_wireshark_non_cxx_warning_option_error = x; then
22066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22067 $as_echo "yes" >&6; }
22068 else
22069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, adding -Werror" >&5
22070 $as_echo "no, adding -Werror" >&6; }
22071 fi
22072  
22073  
22074 #
22075 # The following are for C and C++
22076 #
22077 GCC_OPTION="-Wall"
22078 can_add_to_cflags=""
22079 can_add_to_cxxflags=""
22080 if test "x$ac_supports_gcc_flags" = "xyes" ; then
22081 if test "" != CXX ; then
22082 #
22083 # Not C++-only; if this can be added to the C compiler flags, add them.
22084 #
22085 # If the option begins with "-W", add
22086 # $ac_wireshark_unknown_warning_option_error to make sure that
22087 # we'll get an error if it's an unknown warning option; not all
22088 # compilers treat unknown warning options as errors (I'm looking at
22089 # you, clang).
22090 #
22091 # If the option begins with "-f" or "-m", add -Werror to make sure
22092 # that we'll get an error if we get "argument unused during compilation"
22093 # warnings, as those will either cause a failure for files compiled
22094 # with -Werror or annoying noise for files compiled without it.
22095 # (Yeah, you, clang.)
22096 #
22097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
22098 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
22099  
22100 ac_ws_CPPLAGS_saved="$CPPFLAGS"
22101 ac_ws_CFLAGS_saved="$CFLAGS"
22102 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
22103 ac_ws_LDFLAGS_saved="$LDFLAGS"
22104 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
22105 CFLAGS="$WS_CFLAGS $CFLAGS"
22106 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
22107 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
22108  
22109 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
22110 then
22111 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
22112 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
22113 then
22114 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
22115 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
22116 then
22117 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
22118 else
22119 CFLAGS="$CFLAGS $GCC_OPTION"
22120 fi
22121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22122 /* end confdefs.h. */
22123  
22124 int foo;
22125  
22126 _ACEOF
22127 if ac_fn_c_try_compile "$LINENO"; then :
22128  
22129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22130 $as_echo "yes" >&6; }
22131 can_add_to_cflags=yes
22132 #
22133 # OK, do we have a test program? If so, check
22134 # whether it fails with this option and -Werror,
22135 # and, if so, don't include it.
22136 #
22137 # We test arg 4 here because arg 3 is a program which
22138 # could contain quotes (breaking the comparison).
22139 #
22140 if test "x" != "x" ; then
22141 CFLAGS="$CFLAGS -Werror"
22142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
22143 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
22144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22145 /* end confdefs.h. */
22146  
22147 _ACEOF
22148 if ac_fn_c_try_compile "$LINENO"; then :
22149  
22150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22151 $as_echo "no" >&6; }
22152 #
22153 # Remove "force an error for a warning" options, if we
22154 # added them, by setting CFLAGS to the saved value plus
22155 # just the new option.
22156 #
22157  
22158 if ${WS_CFLAGS+:} false; then :
22159  
22160 case " $WS_CFLAGS " in #(
22161 *" $GCC_OPTION "*) :
22162 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
22163 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
22164 ac_status=$?
22165 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22166 test $ac_status = 0; } ;; #(
22167 *) :
22168  
22169 as_fn_append WS_CFLAGS " $GCC_OPTION"
22170 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
22171 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
22172 ac_status=$?
22173 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22174 test $ac_status = 0; }
22175 ;;
22176 esac
22177  
22178 else
22179  
22180 WS_CFLAGS=$GCC_OPTION
22181 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
22182 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
22183 ac_status=$?
22184 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22185 test $ac_status = 0; }
22186  
22187 fi
22188  
22189 if test "$CC" = "$CC_FOR_BUILD"; then
22190 #
22191 # We're building the build tools with the same compiler
22192 # with which we're building Wireshark, so add the flags
22193 # to the flags for that compiler as well.
22194 #
22195  
22196 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
22197  
22198 case " $WS_CFLAGS_FOR_BUILD " in #(
22199 *" $GCC_OPTION "*) :
22200 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
22201 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
22202 ac_status=$?
22203 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22204 test $ac_status = 0; } ;; #(
22205 *) :
22206  
22207 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
22208 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
22209 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
22210 ac_status=$?
22211 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22212 test $ac_status = 0; }
22213 ;;
22214 esac
22215  
22216 else
22217  
22218 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
22219 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
22220 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
22221 ac_status=$?
22222 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22223 test $ac_status = 0; }
22224  
22225 fi
22226  
22227 fi
22228  
22229 else
22230  
22231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22232 $as_echo "yes" >&6; }
22233  
22234 fi
22235 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22236 else
22237 #
22238 # Remove "force an error for a warning" options, if we
22239 # added them, by setting CFLAGS to the saved value plus
22240 # just the new option.
22241 #
22242  
22243 if ${WS_CFLAGS+:} false; then :
22244  
22245 case " $WS_CFLAGS " in #(
22246 *" $GCC_OPTION "*) :
22247 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
22248 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
22249 ac_status=$?
22250 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22251 test $ac_status = 0; } ;; #(
22252 *) :
22253  
22254 as_fn_append WS_CFLAGS " $GCC_OPTION"
22255 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
22256 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
22257 ac_status=$?
22258 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22259 test $ac_status = 0; }
22260 ;;
22261 esac
22262  
22263 else
22264  
22265 WS_CFLAGS=$GCC_OPTION
22266 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
22267 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
22268 ac_status=$?
22269 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22270 test $ac_status = 0; }
22271  
22272 fi
22273  
22274 if test "$CC" = "$CC_FOR_BUILD"; then
22275 #
22276 # We're building the build tools with the same compiler
22277 # with which we're building Wireshark, so add the flags
22278 # to the flags for that compiler as well.
22279 #
22280  
22281 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
22282  
22283 case " $WS_CFLAGS_FOR_BUILD " in #(
22284 *" $GCC_OPTION "*) :
22285 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
22286 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
22287 ac_status=$?
22288 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22289 test $ac_status = 0; } ;; #(
22290 *) :
22291  
22292 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
22293 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
22294 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
22295 ac_status=$?
22296 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22297 test $ac_status = 0; }
22298 ;;
22299 esac
22300  
22301 else
22302  
22303 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
22304 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
22305 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
22306 ac_status=$?
22307 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22308 test $ac_status = 0; }
22309  
22310 fi
22311  
22312 fi
22313 fi
22314  
22315 else
22316  
22317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22318 $as_echo "no" >&6; }
22319 can_add_to_cflags=no
22320  
22321 fi
22322 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22323  
22324 CPPFLAGS="$ac_ws_CPPLAGS_saved"
22325 CFLAGS="$ac_ws_CFLAGS_saved"
22326 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
22327 LDFLAGS="$ac_ws_LDFLAGS_saved"
22328  
22329 fi
22330 #
22331 # Did we find a C++ compiler?
22332 #
22333 if test "x$CXX" != "x" ; then
22334 #
22335 # Yes. Is this option only for the C compiler?
22336 #
22337 if test "" != C ; then
22338 #
22339 # Not C-only; if this option can be added to the C++ compiler
22340 # options, add it.
22341 #
22342 # If the option begins with "-W", add
22343 # $ac_wireshark_unknown_warning_option_error, as per the above, and
22344 # also add $ac_wireshark_non_cxx_warning_option_error, because at
22345 # lease some versions of g++ whine about -Wmissing-prototypes, the
22346 # fact that at least one of those versions refuses to warn about
22347 # function declarations without an earlier declaration nonwithstanding;
22348 # perhaps there's a reason not to warn about that with C++ even though
22349 # warning about it can be a Good Idea with C, but it's not obvious to
22350 # me).
22351 #
22352 # If the option begins with "-f" or "-m", add -Werror to make sure
22353 # that we'll get an error if we get "argument unused during compilation"
22354 # warnings, as those will either cause a failure for files compiled
22355 # with -Werror or annoying noise for files compiled without it.
22356 # (Yeah, you, clang++.)
22357 #
22358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
22359 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
22360  
22361 ac_ws_CPPLAGS_saved="$CPPFLAGS"
22362 ac_ws_CFLAGS_saved="$CFLAGS"
22363 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
22364 ac_ws_LDFLAGS_saved="$LDFLAGS"
22365 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
22366 CFLAGS="$WS_CFLAGS $CFLAGS"
22367 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
22368 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
22369  
22370 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
22371 then
22372 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
22373 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
22374 then
22375 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
22376 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
22377 then
22378 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
22379 else
22380 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
22381 fi
22382 ac_ext=cpp
22383 ac_cpp='$CXXCPP $CPPFLAGS'
22384 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22385 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22386 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22387  
22388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22389 /* end confdefs.h. */
22390  
22391 int foo;
22392  
22393 _ACEOF
22394 if ac_fn_cxx_try_compile "$LINENO"; then :
22395  
22396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22397 $as_echo "yes" >&6; }
22398 can_add_to_cxxflags=yes
22399 #
22400 # OK, do we have a test program? If so, check
22401 # whether it fails with this option and -Werror,
22402 # and, if so, don't include it.
22403 #
22404 # We test arg 4 here because arg 3 is a program which
22405 # could contain quotes (breaking the comparison).
22406 #
22407 if test "x" != "x" ; then
22408 CXXFLAGS="$CXXFLAGS -Werror"
22409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
22410 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
22411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22412 /* end confdefs.h. */
22413  
22414 _ACEOF
22415 if ac_fn_cxx_try_compile "$LINENO"; then :
22416  
22417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22418 $as_echo "no" >&6; }
22419 #
22420 # Remove "force an error for a warning" options, if we
22421 # added them, by setting CXXFLAGS to the saved value plus
22422 # just the new option.
22423 #
22424  
22425 if ${WS_CXXFLAGS+:} false; then :
22426  
22427 case " $WS_CXXFLAGS " in #(
22428 *" $GCC_OPTION "*) :
22429 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
22430 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
22431 ac_status=$?
22432 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22433 test $ac_status = 0; } ;; #(
22434 *) :
22435  
22436 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
22437 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
22438 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
22439 ac_status=$?
22440 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22441 test $ac_status = 0; }
22442 ;;
22443 esac
22444  
22445 else
22446  
22447 WS_CXXFLAGS=$GCC_OPTION
22448 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
22449 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
22450 ac_status=$?
22451 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22452 test $ac_status = 0; }
22453  
22454 fi
22455  
22456  
22457 else
22458  
22459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22460 $as_echo "yes" >&6; }
22461  
22462 fi
22463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22464 else
22465 #
22466 # Remove "force an error for a warning" options, if we
22467 # added them, by setting CXXFLAGS to the saved value plus
22468 # just the new option.
22469 #
22470  
22471 if ${WS_CXXFLAGS+:} false; then :
22472  
22473 case " $WS_CXXFLAGS " in #(
22474 *" $GCC_OPTION "*) :
22475 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
22476 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
22477 ac_status=$?
22478 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22479 test $ac_status = 0; } ;; #(
22480 *) :
22481  
22482 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
22483 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
22484 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
22485 ac_status=$?
22486 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22487 test $ac_status = 0; }
22488 ;;
22489 esac
22490  
22491 else
22492  
22493 WS_CXXFLAGS=$GCC_OPTION
22494 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
22495 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
22496 ac_status=$?
22497 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22498 test $ac_status = 0; }
22499  
22500 fi
22501  
22502 fi
22503  
22504 else
22505  
22506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22507 $as_echo "no" >&6; }
22508 can_add_to_cxxflags=no
22509  
22510 fi
22511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22512  
22513 CPPFLAGS="$ac_ws_CPPLAGS_saved"
22514 CFLAGS="$ac_ws_CFLAGS_saved"
22515 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
22516 LDFLAGS="$ac_ws_LDFLAGS_saved"
22517  
22518 ac_ext=c
22519 ac_cpp='$CPP $CPPFLAGS'
22520 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22521 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22522 ac_compiler_gnu=$ac_cv_c_compiler_gnu
22523  
22524 fi
22525 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
22526 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
22527 then
22528 #
22529 # Confusingly, some C++ compilers like -Wmissing-prototypes but
22530 # don't like -Wmissing-declarations and others like
22531 # -Wmissing-declarations but don't like -Wmissing-prototypes,
22532 # the fact that the corresponding C compiler likes both. Don't
22533 # warn about them.
22534 #
22535 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
22536 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
22537 then
22538 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
22539 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
22540 fi
22541 fi
22542 fi
22543 fi
22544  
22545 GCC_OPTION="-Wextra"
22546 can_add_to_cflags=""
22547 can_add_to_cxxflags=""
22548 if test "x$ac_supports_gcc_flags" = "xyes" ; then
22549 if test "" != CXX ; then
22550 #
22551 # Not C++-only; if this can be added to the C compiler flags, add them.
22552 #
22553 # If the option begins with "-W", add
22554 # $ac_wireshark_unknown_warning_option_error to make sure that
22555 # we'll get an error if it's an unknown warning option; not all
22556 # compilers treat unknown warning options as errors (I'm looking at
22557 # you, clang).
22558 #
22559 # If the option begins with "-f" or "-m", add -Werror to make sure
22560 # that we'll get an error if we get "argument unused during compilation"
22561 # warnings, as those will either cause a failure for files compiled
22562 # with -Werror or annoying noise for files compiled without it.
22563 # (Yeah, you, clang.)
22564 #
22565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
22566 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
22567  
22568 ac_ws_CPPLAGS_saved="$CPPFLAGS"
22569 ac_ws_CFLAGS_saved="$CFLAGS"
22570 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
22571 ac_ws_LDFLAGS_saved="$LDFLAGS"
22572 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
22573 CFLAGS="$WS_CFLAGS $CFLAGS"
22574 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
22575 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
22576  
22577 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
22578 then
22579 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
22580 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
22581 then
22582 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
22583 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
22584 then
22585 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
22586 else
22587 CFLAGS="$CFLAGS $GCC_OPTION"
22588 fi
22589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22590 /* end confdefs.h. */
22591  
22592 int foo;
22593  
22594 _ACEOF
22595 if ac_fn_c_try_compile "$LINENO"; then :
22596  
22597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22598 $as_echo "yes" >&6; }
22599 can_add_to_cflags=yes
22600 #
22601 # OK, do we have a test program? If so, check
22602 # whether it fails with this option and -Werror,
22603 # and, if so, don't include it.
22604 #
22605 # We test arg 4 here because arg 3 is a program which
22606 # could contain quotes (breaking the comparison).
22607 #
22608 if test "x" != "x" ; then
22609 CFLAGS="$CFLAGS -Werror"
22610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
22611 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
22612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22613 /* end confdefs.h. */
22614  
22615 _ACEOF
22616 if ac_fn_c_try_compile "$LINENO"; then :
22617  
22618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22619 $as_echo "no" >&6; }
22620 #
22621 # Remove "force an error for a warning" options, if we
22622 # added them, by setting CFLAGS to the saved value plus
22623 # just the new option.
22624 #
22625  
22626 if ${WS_CFLAGS+:} false; then :
22627  
22628 case " $WS_CFLAGS " in #(
22629 *" $GCC_OPTION "*) :
22630 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
22631 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
22632 ac_status=$?
22633 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22634 test $ac_status = 0; } ;; #(
22635 *) :
22636  
22637 as_fn_append WS_CFLAGS " $GCC_OPTION"
22638 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
22639 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
22640 ac_status=$?
22641 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22642 test $ac_status = 0; }
22643 ;;
22644 esac
22645  
22646 else
22647  
22648 WS_CFLAGS=$GCC_OPTION
22649 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
22650 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
22651 ac_status=$?
22652 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22653 test $ac_status = 0; }
22654  
22655 fi
22656  
22657 if test "$CC" = "$CC_FOR_BUILD"; then
22658 #
22659 # We're building the build tools with the same compiler
22660 # with which we're building Wireshark, so add the flags
22661 # to the flags for that compiler as well.
22662 #
22663  
22664 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
22665  
22666 case " $WS_CFLAGS_FOR_BUILD " in #(
22667 *" $GCC_OPTION "*) :
22668 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
22669 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
22670 ac_status=$?
22671 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22672 test $ac_status = 0; } ;; #(
22673 *) :
22674  
22675 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
22676 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
22677 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
22678 ac_status=$?
22679 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22680 test $ac_status = 0; }
22681 ;;
22682 esac
22683  
22684 else
22685  
22686 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
22687 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
22688 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
22689 ac_status=$?
22690 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22691 test $ac_status = 0; }
22692  
22693 fi
22694  
22695 fi
22696  
22697 else
22698  
22699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22700 $as_echo "yes" >&6; }
22701  
22702 fi
22703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22704 else
22705 #
22706 # Remove "force an error for a warning" options, if we
22707 # added them, by setting CFLAGS to the saved value plus
22708 # just the new option.
22709 #
22710  
22711 if ${WS_CFLAGS+:} false; then :
22712  
22713 case " $WS_CFLAGS " in #(
22714 *" $GCC_OPTION "*) :
22715 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
22716 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
22717 ac_status=$?
22718 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22719 test $ac_status = 0; } ;; #(
22720 *) :
22721  
22722 as_fn_append WS_CFLAGS " $GCC_OPTION"
22723 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
22724 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
22725 ac_status=$?
22726 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22727 test $ac_status = 0; }
22728 ;;
22729 esac
22730  
22731 else
22732  
22733 WS_CFLAGS=$GCC_OPTION
22734 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
22735 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
22736 ac_status=$?
22737 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22738 test $ac_status = 0; }
22739  
22740 fi
22741  
22742 if test "$CC" = "$CC_FOR_BUILD"; then
22743 #
22744 # We're building the build tools with the same compiler
22745 # with which we're building Wireshark, so add the flags
22746 # to the flags for that compiler as well.
22747 #
22748  
22749 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
22750  
22751 case " $WS_CFLAGS_FOR_BUILD " in #(
22752 *" $GCC_OPTION "*) :
22753 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
22754 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
22755 ac_status=$?
22756 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22757 test $ac_status = 0; } ;; #(
22758 *) :
22759  
22760 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
22761 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
22762 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
22763 ac_status=$?
22764 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22765 test $ac_status = 0; }
22766 ;;
22767 esac
22768  
22769 else
22770  
22771 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
22772 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
22773 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
22774 ac_status=$?
22775 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22776 test $ac_status = 0; }
22777  
22778 fi
22779  
22780 fi
22781 fi
22782  
22783 else
22784  
22785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22786 $as_echo "no" >&6; }
22787 can_add_to_cflags=no
22788  
22789 fi
22790 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22791  
22792 CPPFLAGS="$ac_ws_CPPLAGS_saved"
22793 CFLAGS="$ac_ws_CFLAGS_saved"
22794 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
22795 LDFLAGS="$ac_ws_LDFLAGS_saved"
22796  
22797 fi
22798 #
22799 # Did we find a C++ compiler?
22800 #
22801 if test "x$CXX" != "x" ; then
22802 #
22803 # Yes. Is this option only for the C compiler?
22804 #
22805 if test "" != C ; then
22806 #
22807 # Not C-only; if this option can be added to the C++ compiler
22808 # options, add it.
22809 #
22810 # If the option begins with "-W", add
22811 # $ac_wireshark_unknown_warning_option_error, as per the above, and
22812 # also add $ac_wireshark_non_cxx_warning_option_error, because at
22813 # lease some versions of g++ whine about -Wmissing-prototypes, the
22814 # fact that at least one of those versions refuses to warn about
22815 # function declarations without an earlier declaration nonwithstanding;
22816 # perhaps there's a reason not to warn about that with C++ even though
22817 # warning about it can be a Good Idea with C, but it's not obvious to
22818 # me).
22819 #
22820 # If the option begins with "-f" or "-m", add -Werror to make sure
22821 # that we'll get an error if we get "argument unused during compilation"
22822 # warnings, as those will either cause a failure for files compiled
22823 # with -Werror or annoying noise for files compiled without it.
22824 # (Yeah, you, clang++.)
22825 #
22826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
22827 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
22828  
22829 ac_ws_CPPLAGS_saved="$CPPFLAGS"
22830 ac_ws_CFLAGS_saved="$CFLAGS"
22831 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
22832 ac_ws_LDFLAGS_saved="$LDFLAGS"
22833 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
22834 CFLAGS="$WS_CFLAGS $CFLAGS"
22835 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
22836 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
22837  
22838 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
22839 then
22840 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
22841 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
22842 then
22843 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
22844 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
22845 then
22846 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
22847 else
22848 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
22849 fi
22850 ac_ext=cpp
22851 ac_cpp='$CXXCPP $CPPFLAGS'
22852 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22853 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22854 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22855  
22856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22857 /* end confdefs.h. */
22858  
22859 int foo;
22860  
22861 _ACEOF
22862 if ac_fn_cxx_try_compile "$LINENO"; then :
22863  
22864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22865 $as_echo "yes" >&6; }
22866 can_add_to_cxxflags=yes
22867 #
22868 # OK, do we have a test program? If so, check
22869 # whether it fails with this option and -Werror,
22870 # and, if so, don't include it.
22871 #
22872 # We test arg 4 here because arg 3 is a program which
22873 # could contain quotes (breaking the comparison).
22874 #
22875 if test "x" != "x" ; then
22876 CXXFLAGS="$CXXFLAGS -Werror"
22877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
22878 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
22879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22880 /* end confdefs.h. */
22881  
22882 _ACEOF
22883 if ac_fn_cxx_try_compile "$LINENO"; then :
22884  
22885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22886 $as_echo "no" >&6; }
22887 #
22888 # Remove "force an error for a warning" options, if we
22889 # added them, by setting CXXFLAGS to the saved value plus
22890 # just the new option.
22891 #
22892  
22893 if ${WS_CXXFLAGS+:} false; then :
22894  
22895 case " $WS_CXXFLAGS " in #(
22896 *" $GCC_OPTION "*) :
22897 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
22898 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
22899 ac_status=$?
22900 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22901 test $ac_status = 0; } ;; #(
22902 *) :
22903  
22904 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
22905 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
22906 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
22907 ac_status=$?
22908 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22909 test $ac_status = 0; }
22910 ;;
22911 esac
22912  
22913 else
22914  
22915 WS_CXXFLAGS=$GCC_OPTION
22916 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
22917 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
22918 ac_status=$?
22919 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22920 test $ac_status = 0; }
22921  
22922 fi
22923  
22924  
22925 else
22926  
22927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22928 $as_echo "yes" >&6; }
22929  
22930 fi
22931 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22932 else
22933 #
22934 # Remove "force an error for a warning" options, if we
22935 # added them, by setting CXXFLAGS to the saved value plus
22936 # just the new option.
22937 #
22938  
22939 if ${WS_CXXFLAGS+:} false; then :
22940  
22941 case " $WS_CXXFLAGS " in #(
22942 *" $GCC_OPTION "*) :
22943 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
22944 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
22945 ac_status=$?
22946 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22947 test $ac_status = 0; } ;; #(
22948 *) :
22949  
22950 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
22951 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
22952 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
22953 ac_status=$?
22954 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22955 test $ac_status = 0; }
22956 ;;
22957 esac
22958  
22959 else
22960  
22961 WS_CXXFLAGS=$GCC_OPTION
22962 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
22963 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
22964 ac_status=$?
22965 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22966 test $ac_status = 0; }
22967  
22968 fi
22969  
22970 fi
22971  
22972 else
22973  
22974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22975 $as_echo "no" >&6; }
22976 can_add_to_cxxflags=no
22977  
22978 fi
22979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22980  
22981 CPPFLAGS="$ac_ws_CPPLAGS_saved"
22982 CFLAGS="$ac_ws_CFLAGS_saved"
22983 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
22984 LDFLAGS="$ac_ws_LDFLAGS_saved"
22985  
22986 ac_ext=c
22987 ac_cpp='$CPP $CPPFLAGS'
22988 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22989 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22990 ac_compiler_gnu=$ac_cv_c_compiler_gnu
22991  
22992 fi
22993 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
22994 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
22995 then
22996 #
22997 # Confusingly, some C++ compilers like -Wmissing-prototypes but
22998 # don't like -Wmissing-declarations and others like
22999 # -Wmissing-declarations but don't like -Wmissing-prototypes,
23000 # the fact that the corresponding C compiler likes both. Don't
23001 # warn about them.
23002 #
23003 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
23004 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
23005 then
23006 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
23007 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
23008 fi
23009 fi
23010 fi
23011 fi
23012  
23013 GCC_OPTION="-Wendif-labels"
23014 can_add_to_cflags=""
23015 can_add_to_cxxflags=""
23016 if test "x$ac_supports_gcc_flags" = "xyes" ; then
23017 if test "" != CXX ; then
23018 #
23019 # Not C++-only; if this can be added to the C compiler flags, add them.
23020 #
23021 # If the option begins with "-W", add
23022 # $ac_wireshark_unknown_warning_option_error to make sure that
23023 # we'll get an error if it's an unknown warning option; not all
23024 # compilers treat unknown warning options as errors (I'm looking at
23025 # you, clang).
23026 #
23027 # If the option begins with "-f" or "-m", add -Werror to make sure
23028 # that we'll get an error if we get "argument unused during compilation"
23029 # warnings, as those will either cause a failure for files compiled
23030 # with -Werror or annoying noise for files compiled without it.
23031 # (Yeah, you, clang.)
23032 #
23033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
23034 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
23035  
23036 ac_ws_CPPLAGS_saved="$CPPFLAGS"
23037 ac_ws_CFLAGS_saved="$CFLAGS"
23038 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
23039 ac_ws_LDFLAGS_saved="$LDFLAGS"
23040 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
23041 CFLAGS="$WS_CFLAGS $CFLAGS"
23042 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
23043 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
23044  
23045 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
23046 then
23047 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
23048 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
23049 then
23050 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
23051 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
23052 then
23053 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
23054 else
23055 CFLAGS="$CFLAGS $GCC_OPTION"
23056 fi
23057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23058 /* end confdefs.h. */
23059  
23060 int foo;
23061  
23062 _ACEOF
23063 if ac_fn_c_try_compile "$LINENO"; then :
23064  
23065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23066 $as_echo "yes" >&6; }
23067 can_add_to_cflags=yes
23068 #
23069 # OK, do we have a test program? If so, check
23070 # whether it fails with this option and -Werror,
23071 # and, if so, don't include it.
23072 #
23073 # We test arg 4 here because arg 3 is a program which
23074 # could contain quotes (breaking the comparison).
23075 #
23076 if test "x" != "x" ; then
23077 CFLAGS="$CFLAGS -Werror"
23078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
23079 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
23080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23081 /* end confdefs.h. */
23082  
23083 _ACEOF
23084 if ac_fn_c_try_compile "$LINENO"; then :
23085  
23086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23087 $as_echo "no" >&6; }
23088 #
23089 # Remove "force an error for a warning" options, if we
23090 # added them, by setting CFLAGS to the saved value plus
23091 # just the new option.
23092 #
23093  
23094 if ${WS_CFLAGS+:} false; then :
23095  
23096 case " $WS_CFLAGS " in #(
23097 *" $GCC_OPTION "*) :
23098 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
23099 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
23100 ac_status=$?
23101 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23102 test $ac_status = 0; } ;; #(
23103 *) :
23104  
23105 as_fn_append WS_CFLAGS " $GCC_OPTION"
23106 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
23107 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
23108 ac_status=$?
23109 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23110 test $ac_status = 0; }
23111 ;;
23112 esac
23113  
23114 else
23115  
23116 WS_CFLAGS=$GCC_OPTION
23117 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
23118 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
23119 ac_status=$?
23120 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23121 test $ac_status = 0; }
23122  
23123 fi
23124  
23125 if test "$CC" = "$CC_FOR_BUILD"; then
23126 #
23127 # We're building the build tools with the same compiler
23128 # with which we're building Wireshark, so add the flags
23129 # to the flags for that compiler as well.
23130 #
23131  
23132 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
23133  
23134 case " $WS_CFLAGS_FOR_BUILD " in #(
23135 *" $GCC_OPTION "*) :
23136 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
23137 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
23138 ac_status=$?
23139 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23140 test $ac_status = 0; } ;; #(
23141 *) :
23142  
23143 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
23144 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
23145 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
23146 ac_status=$?
23147 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23148 test $ac_status = 0; }
23149 ;;
23150 esac
23151  
23152 else
23153  
23154 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
23155 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
23156 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
23157 ac_status=$?
23158 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23159 test $ac_status = 0; }
23160  
23161 fi
23162  
23163 fi
23164  
23165 else
23166  
23167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23168 $as_echo "yes" >&6; }
23169  
23170 fi
23171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23172 else
23173 #
23174 # Remove "force an error for a warning" options, if we
23175 # added them, by setting CFLAGS to the saved value plus
23176 # just the new option.
23177 #
23178  
23179 if ${WS_CFLAGS+:} false; then :
23180  
23181 case " $WS_CFLAGS " in #(
23182 *" $GCC_OPTION "*) :
23183 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
23184 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
23185 ac_status=$?
23186 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23187 test $ac_status = 0; } ;; #(
23188 *) :
23189  
23190 as_fn_append WS_CFLAGS " $GCC_OPTION"
23191 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
23192 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
23193 ac_status=$?
23194 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23195 test $ac_status = 0; }
23196 ;;
23197 esac
23198  
23199 else
23200  
23201 WS_CFLAGS=$GCC_OPTION
23202 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
23203 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
23204 ac_status=$?
23205 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23206 test $ac_status = 0; }
23207  
23208 fi
23209  
23210 if test "$CC" = "$CC_FOR_BUILD"; then
23211 #
23212 # We're building the build tools with the same compiler
23213 # with which we're building Wireshark, so add the flags
23214 # to the flags for that compiler as well.
23215 #
23216  
23217 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
23218  
23219 case " $WS_CFLAGS_FOR_BUILD " in #(
23220 *" $GCC_OPTION "*) :
23221 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
23222 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
23223 ac_status=$?
23224 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23225 test $ac_status = 0; } ;; #(
23226 *) :
23227  
23228 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
23229 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
23230 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
23231 ac_status=$?
23232 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23233 test $ac_status = 0; }
23234 ;;
23235 esac
23236  
23237 else
23238  
23239 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
23240 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
23241 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
23242 ac_status=$?
23243 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23244 test $ac_status = 0; }
23245  
23246 fi
23247  
23248 fi
23249 fi
23250  
23251 else
23252  
23253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23254 $as_echo "no" >&6; }
23255 can_add_to_cflags=no
23256  
23257 fi
23258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23259  
23260 CPPFLAGS="$ac_ws_CPPLAGS_saved"
23261 CFLAGS="$ac_ws_CFLAGS_saved"
23262 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
23263 LDFLAGS="$ac_ws_LDFLAGS_saved"
23264  
23265 fi
23266 #
23267 # Did we find a C++ compiler?
23268 #
23269 if test "x$CXX" != "x" ; then
23270 #
23271 # Yes. Is this option only for the C compiler?
23272 #
23273 if test "" != C ; then
23274 #
23275 # Not C-only; if this option can be added to the C++ compiler
23276 # options, add it.
23277 #
23278 # If the option begins with "-W", add
23279 # $ac_wireshark_unknown_warning_option_error, as per the above, and
23280 # also add $ac_wireshark_non_cxx_warning_option_error, because at
23281 # lease some versions of g++ whine about -Wmissing-prototypes, the
23282 # fact that at least one of those versions refuses to warn about
23283 # function declarations without an earlier declaration nonwithstanding;
23284 # perhaps there's a reason not to warn about that with C++ even though
23285 # warning about it can be a Good Idea with C, but it's not obvious to
23286 # me).
23287 #
23288 # If the option begins with "-f" or "-m", add -Werror to make sure
23289 # that we'll get an error if we get "argument unused during compilation"
23290 # warnings, as those will either cause a failure for files compiled
23291 # with -Werror or annoying noise for files compiled without it.
23292 # (Yeah, you, clang++.)
23293 #
23294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
23295 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
23296  
23297 ac_ws_CPPLAGS_saved="$CPPFLAGS"
23298 ac_ws_CFLAGS_saved="$CFLAGS"
23299 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
23300 ac_ws_LDFLAGS_saved="$LDFLAGS"
23301 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
23302 CFLAGS="$WS_CFLAGS $CFLAGS"
23303 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
23304 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
23305  
23306 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
23307 then
23308 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
23309 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
23310 then
23311 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
23312 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
23313 then
23314 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
23315 else
23316 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
23317 fi
23318 ac_ext=cpp
23319 ac_cpp='$CXXCPP $CPPFLAGS'
23320 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23321 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23322 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23323  
23324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23325 /* end confdefs.h. */
23326  
23327 int foo;
23328  
23329 _ACEOF
23330 if ac_fn_cxx_try_compile "$LINENO"; then :
23331  
23332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23333 $as_echo "yes" >&6; }
23334 can_add_to_cxxflags=yes
23335 #
23336 # OK, do we have a test program? If so, check
23337 # whether it fails with this option and -Werror,
23338 # and, if so, don't include it.
23339 #
23340 # We test arg 4 here because arg 3 is a program which
23341 # could contain quotes (breaking the comparison).
23342 #
23343 if test "x" != "x" ; then
23344 CXXFLAGS="$CXXFLAGS -Werror"
23345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
23346 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
23347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23348 /* end confdefs.h. */
23349  
23350 _ACEOF
23351 if ac_fn_cxx_try_compile "$LINENO"; then :
23352  
23353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23354 $as_echo "no" >&6; }
23355 #
23356 # Remove "force an error for a warning" options, if we
23357 # added them, by setting CXXFLAGS to the saved value plus
23358 # just the new option.
23359 #
23360  
23361 if ${WS_CXXFLAGS+:} false; then :
23362  
23363 case " $WS_CXXFLAGS " in #(
23364 *" $GCC_OPTION "*) :
23365 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
23366 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
23367 ac_status=$?
23368 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23369 test $ac_status = 0; } ;; #(
23370 *) :
23371  
23372 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
23373 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
23374 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
23375 ac_status=$?
23376 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23377 test $ac_status = 0; }
23378 ;;
23379 esac
23380  
23381 else
23382  
23383 WS_CXXFLAGS=$GCC_OPTION
23384 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
23385 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
23386 ac_status=$?
23387 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23388 test $ac_status = 0; }
23389  
23390 fi
23391  
23392  
23393 else
23394  
23395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23396 $as_echo "yes" >&6; }
23397  
23398 fi
23399 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23400 else
23401 #
23402 # Remove "force an error for a warning" options, if we
23403 # added them, by setting CXXFLAGS to the saved value plus
23404 # just the new option.
23405 #
23406  
23407 if ${WS_CXXFLAGS+:} false; then :
23408  
23409 case " $WS_CXXFLAGS " in #(
23410 *" $GCC_OPTION "*) :
23411 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
23412 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
23413 ac_status=$?
23414 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23415 test $ac_status = 0; } ;; #(
23416 *) :
23417  
23418 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
23419 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
23420 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
23421 ac_status=$?
23422 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23423 test $ac_status = 0; }
23424 ;;
23425 esac
23426  
23427 else
23428  
23429 WS_CXXFLAGS=$GCC_OPTION
23430 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
23431 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
23432 ac_status=$?
23433 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23434 test $ac_status = 0; }
23435  
23436 fi
23437  
23438 fi
23439  
23440 else
23441  
23442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23443 $as_echo "no" >&6; }
23444 can_add_to_cxxflags=no
23445  
23446 fi
23447 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23448  
23449 CPPFLAGS="$ac_ws_CPPLAGS_saved"
23450 CFLAGS="$ac_ws_CFLAGS_saved"
23451 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
23452 LDFLAGS="$ac_ws_LDFLAGS_saved"
23453  
23454 ac_ext=c
23455 ac_cpp='$CPP $CPPFLAGS'
23456 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23457 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23458 ac_compiler_gnu=$ac_cv_c_compiler_gnu
23459  
23460 fi
23461 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
23462 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
23463 then
23464 #
23465 # Confusingly, some C++ compilers like -Wmissing-prototypes but
23466 # don't like -Wmissing-declarations and others like
23467 # -Wmissing-declarations but don't like -Wmissing-prototypes,
23468 # the fact that the corresponding C compiler likes both. Don't
23469 # warn about them.
23470 #
23471 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
23472 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
23473 then
23474 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
23475 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
23476 fi
23477 fi
23478 fi
23479 fi
23480  
23481 GCC_OPTION="-Wpointer-arith"
23482 can_add_to_cflags=""
23483 can_add_to_cxxflags=""
23484 if test "x$ac_supports_gcc_flags" = "xyes" ; then
23485 if test "" != CXX ; then
23486 #
23487 # Not C++-only; if this can be added to the C compiler flags, add them.
23488 #
23489 # If the option begins with "-W", add
23490 # $ac_wireshark_unknown_warning_option_error to make sure that
23491 # we'll get an error if it's an unknown warning option; not all
23492 # compilers treat unknown warning options as errors (I'm looking at
23493 # you, clang).
23494 #
23495 # If the option begins with "-f" or "-m", add -Werror to make sure
23496 # that we'll get an error if we get "argument unused during compilation"
23497 # warnings, as those will either cause a failure for files compiled
23498 # with -Werror or annoying noise for files compiled without it.
23499 # (Yeah, you, clang.)
23500 #
23501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
23502 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
23503  
23504 ac_ws_CPPLAGS_saved="$CPPFLAGS"
23505 ac_ws_CFLAGS_saved="$CFLAGS"
23506 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
23507 ac_ws_LDFLAGS_saved="$LDFLAGS"
23508 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
23509 CFLAGS="$WS_CFLAGS $CFLAGS"
23510 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
23511 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
23512  
23513 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
23514 then
23515 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
23516 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
23517 then
23518 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
23519 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
23520 then
23521 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
23522 else
23523 CFLAGS="$CFLAGS $GCC_OPTION"
23524 fi
23525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23526 /* end confdefs.h. */
23527  
23528 int foo;
23529  
23530 _ACEOF
23531 if ac_fn_c_try_compile "$LINENO"; then :
23532  
23533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23534 $as_echo "yes" >&6; }
23535 can_add_to_cflags=yes
23536 #
23537 # OK, do we have a test program? If so, check
23538 # whether it fails with this option and -Werror,
23539 # and, if so, don't include it.
23540 #
23541 # We test arg 4 here because arg 3 is a program which
23542 # could contain quotes (breaking the comparison).
23543 #
23544 if test "x" != "x" ; then
23545 CFLAGS="$CFLAGS -Werror"
23546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
23547 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
23548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23549 /* end confdefs.h. */
23550  
23551 _ACEOF
23552 if ac_fn_c_try_compile "$LINENO"; then :
23553  
23554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23555 $as_echo "no" >&6; }
23556 #
23557 # Remove "force an error for a warning" options, if we
23558 # added them, by setting CFLAGS to the saved value plus
23559 # just the new option.
23560 #
23561  
23562 if ${WS_CFLAGS+:} false; then :
23563  
23564 case " $WS_CFLAGS " in #(
23565 *" $GCC_OPTION "*) :
23566 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
23567 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
23568 ac_status=$?
23569 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23570 test $ac_status = 0; } ;; #(
23571 *) :
23572  
23573 as_fn_append WS_CFLAGS " $GCC_OPTION"
23574 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
23575 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
23576 ac_status=$?
23577 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23578 test $ac_status = 0; }
23579 ;;
23580 esac
23581  
23582 else
23583  
23584 WS_CFLAGS=$GCC_OPTION
23585 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
23586 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
23587 ac_status=$?
23588 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23589 test $ac_status = 0; }
23590  
23591 fi
23592  
23593 if test "$CC" = "$CC_FOR_BUILD"; then
23594 #
23595 # We're building the build tools with the same compiler
23596 # with which we're building Wireshark, so add the flags
23597 # to the flags for that compiler as well.
23598 #
23599  
23600 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
23601  
23602 case " $WS_CFLAGS_FOR_BUILD " in #(
23603 *" $GCC_OPTION "*) :
23604 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
23605 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
23606 ac_status=$?
23607 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23608 test $ac_status = 0; } ;; #(
23609 *) :
23610  
23611 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
23612 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
23613 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
23614 ac_status=$?
23615 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23616 test $ac_status = 0; }
23617 ;;
23618 esac
23619  
23620 else
23621  
23622 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
23623 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
23624 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
23625 ac_status=$?
23626 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23627 test $ac_status = 0; }
23628  
23629 fi
23630  
23631 fi
23632  
23633 else
23634  
23635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23636 $as_echo "yes" >&6; }
23637  
23638 fi
23639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23640 else
23641 #
23642 # Remove "force an error for a warning" options, if we
23643 # added them, by setting CFLAGS to the saved value plus
23644 # just the new option.
23645 #
23646  
23647 if ${WS_CFLAGS+:} false; then :
23648  
23649 case " $WS_CFLAGS " in #(
23650 *" $GCC_OPTION "*) :
23651 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
23652 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
23653 ac_status=$?
23654 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23655 test $ac_status = 0; } ;; #(
23656 *) :
23657  
23658 as_fn_append WS_CFLAGS " $GCC_OPTION"
23659 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
23660 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
23661 ac_status=$?
23662 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23663 test $ac_status = 0; }
23664 ;;
23665 esac
23666  
23667 else
23668  
23669 WS_CFLAGS=$GCC_OPTION
23670 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
23671 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
23672 ac_status=$?
23673 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23674 test $ac_status = 0; }
23675  
23676 fi
23677  
23678 if test "$CC" = "$CC_FOR_BUILD"; then
23679 #
23680 # We're building the build tools with the same compiler
23681 # with which we're building Wireshark, so add the flags
23682 # to the flags for that compiler as well.
23683 #
23684  
23685 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
23686  
23687 case " $WS_CFLAGS_FOR_BUILD " in #(
23688 *" $GCC_OPTION "*) :
23689 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
23690 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
23691 ac_status=$?
23692 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23693 test $ac_status = 0; } ;; #(
23694 *) :
23695  
23696 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
23697 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
23698 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
23699 ac_status=$?
23700 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23701 test $ac_status = 0; }
23702 ;;
23703 esac
23704  
23705 else
23706  
23707 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
23708 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
23709 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
23710 ac_status=$?
23711 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23712 test $ac_status = 0; }
23713  
23714 fi
23715  
23716 fi
23717 fi
23718  
23719 else
23720  
23721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23722 $as_echo "no" >&6; }
23723 can_add_to_cflags=no
23724  
23725 fi
23726 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23727  
23728 CPPFLAGS="$ac_ws_CPPLAGS_saved"
23729 CFLAGS="$ac_ws_CFLAGS_saved"
23730 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
23731 LDFLAGS="$ac_ws_LDFLAGS_saved"
23732  
23733 fi
23734 #
23735 # Did we find a C++ compiler?
23736 #
23737 if test "x$CXX" != "x" ; then
23738 #
23739 # Yes. Is this option only for the C compiler?
23740 #
23741 if test "" != C ; then
23742 #
23743 # Not C-only; if this option can be added to the C++ compiler
23744 # options, add it.
23745 #
23746 # If the option begins with "-W", add
23747 # $ac_wireshark_unknown_warning_option_error, as per the above, and
23748 # also add $ac_wireshark_non_cxx_warning_option_error, because at
23749 # lease some versions of g++ whine about -Wmissing-prototypes, the
23750 # fact that at least one of those versions refuses to warn about
23751 # function declarations without an earlier declaration nonwithstanding;
23752 # perhaps there's a reason not to warn about that with C++ even though
23753 # warning about it can be a Good Idea with C, but it's not obvious to
23754 # me).
23755 #
23756 # If the option begins with "-f" or "-m", add -Werror to make sure
23757 # that we'll get an error if we get "argument unused during compilation"
23758 # warnings, as those will either cause a failure for files compiled
23759 # with -Werror or annoying noise for files compiled without it.
23760 # (Yeah, you, clang++.)
23761 #
23762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
23763 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
23764  
23765 ac_ws_CPPLAGS_saved="$CPPFLAGS"
23766 ac_ws_CFLAGS_saved="$CFLAGS"
23767 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
23768 ac_ws_LDFLAGS_saved="$LDFLAGS"
23769 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
23770 CFLAGS="$WS_CFLAGS $CFLAGS"
23771 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
23772 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
23773  
23774 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
23775 then
23776 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
23777 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
23778 then
23779 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
23780 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
23781 then
23782 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
23783 else
23784 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
23785 fi
23786 ac_ext=cpp
23787 ac_cpp='$CXXCPP $CPPFLAGS'
23788 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23789 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23790 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23791  
23792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23793 /* end confdefs.h. */
23794  
23795 int foo;
23796  
23797 _ACEOF
23798 if ac_fn_cxx_try_compile "$LINENO"; then :
23799  
23800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23801 $as_echo "yes" >&6; }
23802 can_add_to_cxxflags=yes
23803 #
23804 # OK, do we have a test program? If so, check
23805 # whether it fails with this option and -Werror,
23806 # and, if so, don't include it.
23807 #
23808 # We test arg 4 here because arg 3 is a program which
23809 # could contain quotes (breaking the comparison).
23810 #
23811 if test "x" != "x" ; then
23812 CXXFLAGS="$CXXFLAGS -Werror"
23813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
23814 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
23815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23816 /* end confdefs.h. */
23817  
23818 _ACEOF
23819 if ac_fn_cxx_try_compile "$LINENO"; then :
23820  
23821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23822 $as_echo "no" >&6; }
23823 #
23824 # Remove "force an error for a warning" options, if we
23825 # added them, by setting CXXFLAGS to the saved value plus
23826 # just the new option.
23827 #
23828  
23829 if ${WS_CXXFLAGS+:} false; then :
23830  
23831 case " $WS_CXXFLAGS " in #(
23832 *" $GCC_OPTION "*) :
23833 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
23834 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
23835 ac_status=$?
23836 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23837 test $ac_status = 0; } ;; #(
23838 *) :
23839  
23840 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
23841 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
23842 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
23843 ac_status=$?
23844 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23845 test $ac_status = 0; }
23846 ;;
23847 esac
23848  
23849 else
23850  
23851 WS_CXXFLAGS=$GCC_OPTION
23852 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
23853 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
23854 ac_status=$?
23855 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23856 test $ac_status = 0; }
23857  
23858 fi
23859  
23860  
23861 else
23862  
23863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23864 $as_echo "yes" >&6; }
23865  
23866 fi
23867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23868 else
23869 #
23870 # Remove "force an error for a warning" options, if we
23871 # added them, by setting CXXFLAGS to the saved value plus
23872 # just the new option.
23873 #
23874  
23875 if ${WS_CXXFLAGS+:} false; then :
23876  
23877 case " $WS_CXXFLAGS " in #(
23878 *" $GCC_OPTION "*) :
23879 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
23880 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
23881 ac_status=$?
23882 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23883 test $ac_status = 0; } ;; #(
23884 *) :
23885  
23886 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
23887 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
23888 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
23889 ac_status=$?
23890 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23891 test $ac_status = 0; }
23892 ;;
23893 esac
23894  
23895 else
23896  
23897 WS_CXXFLAGS=$GCC_OPTION
23898 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
23899 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
23900 ac_status=$?
23901 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
23902 test $ac_status = 0; }
23903  
23904 fi
23905  
23906 fi
23907  
23908 else
23909  
23910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23911 $as_echo "no" >&6; }
23912 can_add_to_cxxflags=no
23913  
23914 fi
23915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23916  
23917 CPPFLAGS="$ac_ws_CPPLAGS_saved"
23918 CFLAGS="$ac_ws_CFLAGS_saved"
23919 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
23920 LDFLAGS="$ac_ws_LDFLAGS_saved"
23921  
23922 ac_ext=c
23923 ac_cpp='$CPP $CPPFLAGS'
23924 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23925 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23926 ac_compiler_gnu=$ac_cv_c_compiler_gnu
23927  
23928 fi
23929 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
23930 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
23931 then
23932 #
23933 # Confusingly, some C++ compilers like -Wmissing-prototypes but
23934 # don't like -Wmissing-declarations and others like
23935 # -Wmissing-declarations but don't like -Wmissing-prototypes,
23936 # the fact that the corresponding C compiler likes both. Don't
23937 # warn about them.
23938 #
23939 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
23940 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
23941 then
23942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
23943 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
23944 fi
23945 fi
23946 fi
23947 fi
23948  
23949 GCC_OPTION="-Wformat-security"
23950 can_add_to_cflags=""
23951 can_add_to_cxxflags=""
23952 if test "x$ac_supports_gcc_flags" = "xyes" ; then
23953 if test "" != CXX ; then
23954 #
23955 # Not C++-only; if this can be added to the C compiler flags, add them.
23956 #
23957 # If the option begins with "-W", add
23958 # $ac_wireshark_unknown_warning_option_error to make sure that
23959 # we'll get an error if it's an unknown warning option; not all
23960 # compilers treat unknown warning options as errors (I'm looking at
23961 # you, clang).
23962 #
23963 # If the option begins with "-f" or "-m", add -Werror to make sure
23964 # that we'll get an error if we get "argument unused during compilation"
23965 # warnings, as those will either cause a failure for files compiled
23966 # with -Werror or annoying noise for files compiled without it.
23967 # (Yeah, you, clang.)
23968 #
23969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
23970 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
23971  
23972 ac_ws_CPPLAGS_saved="$CPPFLAGS"
23973 ac_ws_CFLAGS_saved="$CFLAGS"
23974 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
23975 ac_ws_LDFLAGS_saved="$LDFLAGS"
23976 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
23977 CFLAGS="$WS_CFLAGS $CFLAGS"
23978 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
23979 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
23980  
23981 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
23982 then
23983 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
23984 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
23985 then
23986 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
23987 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
23988 then
23989 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
23990 else
23991 CFLAGS="$CFLAGS $GCC_OPTION"
23992 fi
23993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23994 /* end confdefs.h. */
23995  
23996 int foo;
23997  
23998 _ACEOF
23999 if ac_fn_c_try_compile "$LINENO"; then :
24000  
24001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24002 $as_echo "yes" >&6; }
24003 can_add_to_cflags=yes
24004 #
24005 # OK, do we have a test program? If so, check
24006 # whether it fails with this option and -Werror,
24007 # and, if so, don't include it.
24008 #
24009 # We test arg 4 here because arg 3 is a program which
24010 # could contain quotes (breaking the comparison).
24011 #
24012 if test "x" != "x" ; then
24013 CFLAGS="$CFLAGS -Werror"
24014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
24015 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
24016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24017 /* end confdefs.h. */
24018  
24019 _ACEOF
24020 if ac_fn_c_try_compile "$LINENO"; then :
24021  
24022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24023 $as_echo "no" >&6; }
24024 #
24025 # Remove "force an error for a warning" options, if we
24026 # added them, by setting CFLAGS to the saved value plus
24027 # just the new option.
24028 #
24029  
24030 if ${WS_CFLAGS+:} false; then :
24031  
24032 case " $WS_CFLAGS " in #(
24033 *" $GCC_OPTION "*) :
24034 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
24035 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
24036 ac_status=$?
24037 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24038 test $ac_status = 0; } ;; #(
24039 *) :
24040  
24041 as_fn_append WS_CFLAGS " $GCC_OPTION"
24042 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
24043 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
24044 ac_status=$?
24045 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24046 test $ac_status = 0; }
24047 ;;
24048 esac
24049  
24050 else
24051  
24052 WS_CFLAGS=$GCC_OPTION
24053 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
24054 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
24055 ac_status=$?
24056 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24057 test $ac_status = 0; }
24058  
24059 fi
24060  
24061 if test "$CC" = "$CC_FOR_BUILD"; then
24062 #
24063 # We're building the build tools with the same compiler
24064 # with which we're building Wireshark, so add the flags
24065 # to the flags for that compiler as well.
24066 #
24067  
24068 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
24069  
24070 case " $WS_CFLAGS_FOR_BUILD " in #(
24071 *" $GCC_OPTION "*) :
24072 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
24073 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
24074 ac_status=$?
24075 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24076 test $ac_status = 0; } ;; #(
24077 *) :
24078  
24079 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
24080 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
24081 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
24082 ac_status=$?
24083 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24084 test $ac_status = 0; }
24085 ;;
24086 esac
24087  
24088 else
24089  
24090 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
24091 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
24092 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
24093 ac_status=$?
24094 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24095 test $ac_status = 0; }
24096  
24097 fi
24098  
24099 fi
24100  
24101 else
24102  
24103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24104 $as_echo "yes" >&6; }
24105  
24106 fi
24107 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24108 else
24109 #
24110 # Remove "force an error for a warning" options, if we
24111 # added them, by setting CFLAGS to the saved value plus
24112 # just the new option.
24113 #
24114  
24115 if ${WS_CFLAGS+:} false; then :
24116  
24117 case " $WS_CFLAGS " in #(
24118 *" $GCC_OPTION "*) :
24119 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
24120 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
24121 ac_status=$?
24122 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24123 test $ac_status = 0; } ;; #(
24124 *) :
24125  
24126 as_fn_append WS_CFLAGS " $GCC_OPTION"
24127 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
24128 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
24129 ac_status=$?
24130 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24131 test $ac_status = 0; }
24132 ;;
24133 esac
24134  
24135 else
24136  
24137 WS_CFLAGS=$GCC_OPTION
24138 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
24139 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
24140 ac_status=$?
24141 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24142 test $ac_status = 0; }
24143  
24144 fi
24145  
24146 if test "$CC" = "$CC_FOR_BUILD"; then
24147 #
24148 # We're building the build tools with the same compiler
24149 # with which we're building Wireshark, so add the flags
24150 # to the flags for that compiler as well.
24151 #
24152  
24153 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
24154  
24155 case " $WS_CFLAGS_FOR_BUILD " in #(
24156 *" $GCC_OPTION "*) :
24157 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
24158 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
24159 ac_status=$?
24160 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24161 test $ac_status = 0; } ;; #(
24162 *) :
24163  
24164 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
24165 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
24166 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
24167 ac_status=$?
24168 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24169 test $ac_status = 0; }
24170 ;;
24171 esac
24172  
24173 else
24174  
24175 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
24176 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
24177 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
24178 ac_status=$?
24179 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24180 test $ac_status = 0; }
24181  
24182 fi
24183  
24184 fi
24185 fi
24186  
24187 else
24188  
24189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24190 $as_echo "no" >&6; }
24191 can_add_to_cflags=no
24192  
24193 fi
24194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24195  
24196 CPPFLAGS="$ac_ws_CPPLAGS_saved"
24197 CFLAGS="$ac_ws_CFLAGS_saved"
24198 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
24199 LDFLAGS="$ac_ws_LDFLAGS_saved"
24200  
24201 fi
24202 #
24203 # Did we find a C++ compiler?
24204 #
24205 if test "x$CXX" != "x" ; then
24206 #
24207 # Yes. Is this option only for the C compiler?
24208 #
24209 if test "" != C ; then
24210 #
24211 # Not C-only; if this option can be added to the C++ compiler
24212 # options, add it.
24213 #
24214 # If the option begins with "-W", add
24215 # $ac_wireshark_unknown_warning_option_error, as per the above, and
24216 # also add $ac_wireshark_non_cxx_warning_option_error, because at
24217 # lease some versions of g++ whine about -Wmissing-prototypes, the
24218 # fact that at least one of those versions refuses to warn about
24219 # function declarations without an earlier declaration nonwithstanding;
24220 # perhaps there's a reason not to warn about that with C++ even though
24221 # warning about it can be a Good Idea with C, but it's not obvious to
24222 # me).
24223 #
24224 # If the option begins with "-f" or "-m", add -Werror to make sure
24225 # that we'll get an error if we get "argument unused during compilation"
24226 # warnings, as those will either cause a failure for files compiled
24227 # with -Werror or annoying noise for files compiled without it.
24228 # (Yeah, you, clang++.)
24229 #
24230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
24231 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
24232  
24233 ac_ws_CPPLAGS_saved="$CPPFLAGS"
24234 ac_ws_CFLAGS_saved="$CFLAGS"
24235 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
24236 ac_ws_LDFLAGS_saved="$LDFLAGS"
24237 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
24238 CFLAGS="$WS_CFLAGS $CFLAGS"
24239 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
24240 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
24241  
24242 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
24243 then
24244 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
24245 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
24246 then
24247 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
24248 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
24249 then
24250 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
24251 else
24252 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
24253 fi
24254 ac_ext=cpp
24255 ac_cpp='$CXXCPP $CPPFLAGS'
24256 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24257 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24258 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24259  
24260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24261 /* end confdefs.h. */
24262  
24263 int foo;
24264  
24265 _ACEOF
24266 if ac_fn_cxx_try_compile "$LINENO"; then :
24267  
24268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24269 $as_echo "yes" >&6; }
24270 can_add_to_cxxflags=yes
24271 #
24272 # OK, do we have a test program? If so, check
24273 # whether it fails with this option and -Werror,
24274 # and, if so, don't include it.
24275 #
24276 # We test arg 4 here because arg 3 is a program which
24277 # could contain quotes (breaking the comparison).
24278 #
24279 if test "x" != "x" ; then
24280 CXXFLAGS="$CXXFLAGS -Werror"
24281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
24282 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
24283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24284 /* end confdefs.h. */
24285  
24286 _ACEOF
24287 if ac_fn_cxx_try_compile "$LINENO"; then :
24288  
24289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24290 $as_echo "no" >&6; }
24291 #
24292 # Remove "force an error for a warning" options, if we
24293 # added them, by setting CXXFLAGS to the saved value plus
24294 # just the new option.
24295 #
24296  
24297 if ${WS_CXXFLAGS+:} false; then :
24298  
24299 case " $WS_CXXFLAGS " in #(
24300 *" $GCC_OPTION "*) :
24301 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
24302 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
24303 ac_status=$?
24304 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24305 test $ac_status = 0; } ;; #(
24306 *) :
24307  
24308 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
24309 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
24310 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
24311 ac_status=$?
24312 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24313 test $ac_status = 0; }
24314 ;;
24315 esac
24316  
24317 else
24318  
24319 WS_CXXFLAGS=$GCC_OPTION
24320 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
24321 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
24322 ac_status=$?
24323 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24324 test $ac_status = 0; }
24325  
24326 fi
24327  
24328  
24329 else
24330  
24331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24332 $as_echo "yes" >&6; }
24333  
24334 fi
24335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24336 else
24337 #
24338 # Remove "force an error for a warning" options, if we
24339 # added them, by setting CXXFLAGS to the saved value plus
24340 # just the new option.
24341 #
24342  
24343 if ${WS_CXXFLAGS+:} false; then :
24344  
24345 case " $WS_CXXFLAGS " in #(
24346 *" $GCC_OPTION "*) :
24347 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
24348 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
24349 ac_status=$?
24350 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24351 test $ac_status = 0; } ;; #(
24352 *) :
24353  
24354 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
24355 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
24356 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
24357 ac_status=$?
24358 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24359 test $ac_status = 0; }
24360 ;;
24361 esac
24362  
24363 else
24364  
24365 WS_CXXFLAGS=$GCC_OPTION
24366 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
24367 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
24368 ac_status=$?
24369 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24370 test $ac_status = 0; }
24371  
24372 fi
24373  
24374 fi
24375  
24376 else
24377  
24378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24379 $as_echo "no" >&6; }
24380 can_add_to_cxxflags=no
24381  
24382 fi
24383 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24384  
24385 CPPFLAGS="$ac_ws_CPPLAGS_saved"
24386 CFLAGS="$ac_ws_CFLAGS_saved"
24387 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
24388 LDFLAGS="$ac_ws_LDFLAGS_saved"
24389  
24390 ac_ext=c
24391 ac_cpp='$CPP $CPPFLAGS'
24392 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24393 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24394 ac_compiler_gnu=$ac_cv_c_compiler_gnu
24395  
24396 fi
24397 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
24398 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
24399 then
24400 #
24401 # Confusingly, some C++ compilers like -Wmissing-prototypes but
24402 # don't like -Wmissing-declarations and others like
24403 # -Wmissing-declarations but don't like -Wmissing-prototypes,
24404 # the fact that the corresponding C compiler likes both. Don't
24405 # warn about them.
24406 #
24407 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
24408 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
24409 then
24410 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
24411 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
24412 fi
24413 fi
24414 fi
24415 fi
24416  
24417 GCC_OPTION="-fwrapv"
24418 can_add_to_cflags=""
24419 can_add_to_cxxflags=""
24420 if test "x$ac_supports_gcc_flags" = "xyes" ; then
24421 if test "" != CXX ; then
24422 #
24423 # Not C++-only; if this can be added to the C compiler flags, add them.
24424 #
24425 # If the option begins with "-W", add
24426 # $ac_wireshark_unknown_warning_option_error to make sure that
24427 # we'll get an error if it's an unknown warning option; not all
24428 # compilers treat unknown warning options as errors (I'm looking at
24429 # you, clang).
24430 #
24431 # If the option begins with "-f" or "-m", add -Werror to make sure
24432 # that we'll get an error if we get "argument unused during compilation"
24433 # warnings, as those will either cause a failure for files compiled
24434 # with -Werror or annoying noise for files compiled without it.
24435 # (Yeah, you, clang.)
24436 #
24437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
24438 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
24439  
24440 ac_ws_CPPLAGS_saved="$CPPFLAGS"
24441 ac_ws_CFLAGS_saved="$CFLAGS"
24442 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
24443 ac_ws_LDFLAGS_saved="$LDFLAGS"
24444 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
24445 CFLAGS="$WS_CFLAGS $CFLAGS"
24446 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
24447 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
24448  
24449 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
24450 then
24451 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
24452 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
24453 then
24454 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
24455 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
24456 then
24457 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
24458 else
24459 CFLAGS="$CFLAGS $GCC_OPTION"
24460 fi
24461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24462 /* end confdefs.h. */
24463  
24464 int foo;
24465  
24466 _ACEOF
24467 if ac_fn_c_try_compile "$LINENO"; then :
24468  
24469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24470 $as_echo "yes" >&6; }
24471 can_add_to_cflags=yes
24472 #
24473 # OK, do we have a test program? If so, check
24474 # whether it fails with this option and -Werror,
24475 # and, if so, don't include it.
24476 #
24477 # We test arg 4 here because arg 3 is a program which
24478 # could contain quotes (breaking the comparison).
24479 #
24480 if test "x" != "x" ; then
24481 CFLAGS="$CFLAGS -Werror"
24482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
24483 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
24484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24485 /* end confdefs.h. */
24486  
24487 _ACEOF
24488 if ac_fn_c_try_compile "$LINENO"; then :
24489  
24490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24491 $as_echo "no" >&6; }
24492 #
24493 # Remove "force an error for a warning" options, if we
24494 # added them, by setting CFLAGS to the saved value plus
24495 # just the new option.
24496 #
24497  
24498 if ${WS_CFLAGS+:} false; then :
24499  
24500 case " $WS_CFLAGS " in #(
24501 *" $GCC_OPTION "*) :
24502 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
24503 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
24504 ac_status=$?
24505 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24506 test $ac_status = 0; } ;; #(
24507 *) :
24508  
24509 as_fn_append WS_CFLAGS " $GCC_OPTION"
24510 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
24511 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
24512 ac_status=$?
24513 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24514 test $ac_status = 0; }
24515 ;;
24516 esac
24517  
24518 else
24519  
24520 WS_CFLAGS=$GCC_OPTION
24521 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
24522 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
24523 ac_status=$?
24524 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24525 test $ac_status = 0; }
24526  
24527 fi
24528  
24529 if test "$CC" = "$CC_FOR_BUILD"; then
24530 #
24531 # We're building the build tools with the same compiler
24532 # with which we're building Wireshark, so add the flags
24533 # to the flags for that compiler as well.
24534 #
24535  
24536 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
24537  
24538 case " $WS_CFLAGS_FOR_BUILD " in #(
24539 *" $GCC_OPTION "*) :
24540 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
24541 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
24542 ac_status=$?
24543 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24544 test $ac_status = 0; } ;; #(
24545 *) :
24546  
24547 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
24548 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
24549 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
24550 ac_status=$?
24551 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24552 test $ac_status = 0; }
24553 ;;
24554 esac
24555  
24556 else
24557  
24558 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
24559 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
24560 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
24561 ac_status=$?
24562 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24563 test $ac_status = 0; }
24564  
24565 fi
24566  
24567 fi
24568  
24569 else
24570  
24571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24572 $as_echo "yes" >&6; }
24573  
24574 fi
24575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24576 else
24577 #
24578 # Remove "force an error for a warning" options, if we
24579 # added them, by setting CFLAGS to the saved value plus
24580 # just the new option.
24581 #
24582  
24583 if ${WS_CFLAGS+:} false; then :
24584  
24585 case " $WS_CFLAGS " in #(
24586 *" $GCC_OPTION "*) :
24587 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
24588 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
24589 ac_status=$?
24590 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24591 test $ac_status = 0; } ;; #(
24592 *) :
24593  
24594 as_fn_append WS_CFLAGS " $GCC_OPTION"
24595 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
24596 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
24597 ac_status=$?
24598 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24599 test $ac_status = 0; }
24600 ;;
24601 esac
24602  
24603 else
24604  
24605 WS_CFLAGS=$GCC_OPTION
24606 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
24607 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
24608 ac_status=$?
24609 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24610 test $ac_status = 0; }
24611  
24612 fi
24613  
24614 if test "$CC" = "$CC_FOR_BUILD"; then
24615 #
24616 # We're building the build tools with the same compiler
24617 # with which we're building Wireshark, so add the flags
24618 # to the flags for that compiler as well.
24619 #
24620  
24621 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
24622  
24623 case " $WS_CFLAGS_FOR_BUILD " in #(
24624 *" $GCC_OPTION "*) :
24625 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
24626 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
24627 ac_status=$?
24628 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24629 test $ac_status = 0; } ;; #(
24630 *) :
24631  
24632 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
24633 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
24634 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
24635 ac_status=$?
24636 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24637 test $ac_status = 0; }
24638 ;;
24639 esac
24640  
24641 else
24642  
24643 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
24644 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
24645 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
24646 ac_status=$?
24647 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24648 test $ac_status = 0; }
24649  
24650 fi
24651  
24652 fi
24653 fi
24654  
24655 else
24656  
24657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24658 $as_echo "no" >&6; }
24659 can_add_to_cflags=no
24660  
24661 fi
24662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24663  
24664 CPPFLAGS="$ac_ws_CPPLAGS_saved"
24665 CFLAGS="$ac_ws_CFLAGS_saved"
24666 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
24667 LDFLAGS="$ac_ws_LDFLAGS_saved"
24668  
24669 fi
24670 #
24671 # Did we find a C++ compiler?
24672 #
24673 if test "x$CXX" != "x" ; then
24674 #
24675 # Yes. Is this option only for the C compiler?
24676 #
24677 if test "" != C ; then
24678 #
24679 # Not C-only; if this option can be added to the C++ compiler
24680 # options, add it.
24681 #
24682 # If the option begins with "-W", add
24683 # $ac_wireshark_unknown_warning_option_error, as per the above, and
24684 # also add $ac_wireshark_non_cxx_warning_option_error, because at
24685 # lease some versions of g++ whine about -Wmissing-prototypes, the
24686 # fact that at least one of those versions refuses to warn about
24687 # function declarations without an earlier declaration nonwithstanding;
24688 # perhaps there's a reason not to warn about that with C++ even though
24689 # warning about it can be a Good Idea with C, but it's not obvious to
24690 # me).
24691 #
24692 # If the option begins with "-f" or "-m", add -Werror to make sure
24693 # that we'll get an error if we get "argument unused during compilation"
24694 # warnings, as those will either cause a failure for files compiled
24695 # with -Werror or annoying noise for files compiled without it.
24696 # (Yeah, you, clang++.)
24697 #
24698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
24699 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
24700  
24701 ac_ws_CPPLAGS_saved="$CPPFLAGS"
24702 ac_ws_CFLAGS_saved="$CFLAGS"
24703 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
24704 ac_ws_LDFLAGS_saved="$LDFLAGS"
24705 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
24706 CFLAGS="$WS_CFLAGS $CFLAGS"
24707 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
24708 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
24709  
24710 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
24711 then
24712 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
24713 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
24714 then
24715 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
24716 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
24717 then
24718 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
24719 else
24720 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
24721 fi
24722 ac_ext=cpp
24723 ac_cpp='$CXXCPP $CPPFLAGS'
24724 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24725 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24726 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24727  
24728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24729 /* end confdefs.h. */
24730  
24731 int foo;
24732  
24733 _ACEOF
24734 if ac_fn_cxx_try_compile "$LINENO"; then :
24735  
24736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24737 $as_echo "yes" >&6; }
24738 can_add_to_cxxflags=yes
24739 #
24740 # OK, do we have a test program? If so, check
24741 # whether it fails with this option and -Werror,
24742 # and, if so, don't include it.
24743 #
24744 # We test arg 4 here because arg 3 is a program which
24745 # could contain quotes (breaking the comparison).
24746 #
24747 if test "x" != "x" ; then
24748 CXXFLAGS="$CXXFLAGS -Werror"
24749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
24750 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
24751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24752 /* end confdefs.h. */
24753  
24754 _ACEOF
24755 if ac_fn_cxx_try_compile "$LINENO"; then :
24756  
24757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24758 $as_echo "no" >&6; }
24759 #
24760 # Remove "force an error for a warning" options, if we
24761 # added them, by setting CXXFLAGS to the saved value plus
24762 # just the new option.
24763 #
24764  
24765 if ${WS_CXXFLAGS+:} false; then :
24766  
24767 case " $WS_CXXFLAGS " in #(
24768 *" $GCC_OPTION "*) :
24769 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
24770 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
24771 ac_status=$?
24772 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24773 test $ac_status = 0; } ;; #(
24774 *) :
24775  
24776 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
24777 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
24778 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
24779 ac_status=$?
24780 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24781 test $ac_status = 0; }
24782 ;;
24783 esac
24784  
24785 else
24786  
24787 WS_CXXFLAGS=$GCC_OPTION
24788 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
24789 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
24790 ac_status=$?
24791 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24792 test $ac_status = 0; }
24793  
24794 fi
24795  
24796  
24797 else
24798  
24799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24800 $as_echo "yes" >&6; }
24801  
24802 fi
24803 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24804 else
24805 #
24806 # Remove "force an error for a warning" options, if we
24807 # added them, by setting CXXFLAGS to the saved value plus
24808 # just the new option.
24809 #
24810  
24811 if ${WS_CXXFLAGS+:} false; then :
24812  
24813 case " $WS_CXXFLAGS " in #(
24814 *" $GCC_OPTION "*) :
24815 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
24816 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
24817 ac_status=$?
24818 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24819 test $ac_status = 0; } ;; #(
24820 *) :
24821  
24822 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
24823 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
24824 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
24825 ac_status=$?
24826 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24827 test $ac_status = 0; }
24828 ;;
24829 esac
24830  
24831 else
24832  
24833 WS_CXXFLAGS=$GCC_OPTION
24834 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
24835 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
24836 ac_status=$?
24837 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24838 test $ac_status = 0; }
24839  
24840 fi
24841  
24842 fi
24843  
24844 else
24845  
24846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24847 $as_echo "no" >&6; }
24848 can_add_to_cxxflags=no
24849  
24850 fi
24851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24852  
24853 CPPFLAGS="$ac_ws_CPPLAGS_saved"
24854 CFLAGS="$ac_ws_CFLAGS_saved"
24855 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
24856 LDFLAGS="$ac_ws_LDFLAGS_saved"
24857  
24858 ac_ext=c
24859 ac_cpp='$CPP $CPPFLAGS'
24860 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24861 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24862 ac_compiler_gnu=$ac_cv_c_compiler_gnu
24863  
24864 fi
24865 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
24866 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
24867 then
24868 #
24869 # Confusingly, some C++ compilers like -Wmissing-prototypes but
24870 # don't like -Wmissing-declarations and others like
24871 # -Wmissing-declarations but don't like -Wmissing-prototypes,
24872 # the fact that the corresponding C compiler likes both. Don't
24873 # warn about them.
24874 #
24875 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
24876 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
24877 then
24878 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
24879 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
24880 fi
24881 fi
24882 fi
24883 fi
24884  
24885 GCC_OPTION="-fno-strict-overflow"
24886 can_add_to_cflags=""
24887 can_add_to_cxxflags=""
24888 if test "x$ac_supports_gcc_flags" = "xyes" ; then
24889 if test "" != CXX ; then
24890 #
24891 # Not C++-only; if this can be added to the C compiler flags, add them.
24892 #
24893 # If the option begins with "-W", add
24894 # $ac_wireshark_unknown_warning_option_error to make sure that
24895 # we'll get an error if it's an unknown warning option; not all
24896 # compilers treat unknown warning options as errors (I'm looking at
24897 # you, clang).
24898 #
24899 # If the option begins with "-f" or "-m", add -Werror to make sure
24900 # that we'll get an error if we get "argument unused during compilation"
24901 # warnings, as those will either cause a failure for files compiled
24902 # with -Werror or annoying noise for files compiled without it.
24903 # (Yeah, you, clang.)
24904 #
24905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
24906 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
24907  
24908 ac_ws_CPPLAGS_saved="$CPPFLAGS"
24909 ac_ws_CFLAGS_saved="$CFLAGS"
24910 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
24911 ac_ws_LDFLAGS_saved="$LDFLAGS"
24912 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
24913 CFLAGS="$WS_CFLAGS $CFLAGS"
24914 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
24915 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
24916  
24917 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
24918 then
24919 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
24920 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
24921 then
24922 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
24923 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
24924 then
24925 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
24926 else
24927 CFLAGS="$CFLAGS $GCC_OPTION"
24928 fi
24929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24930 /* end confdefs.h. */
24931  
24932 int foo;
24933  
24934 _ACEOF
24935 if ac_fn_c_try_compile "$LINENO"; then :
24936  
24937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24938 $as_echo "yes" >&6; }
24939 can_add_to_cflags=yes
24940 #
24941 # OK, do we have a test program? If so, check
24942 # whether it fails with this option and -Werror,
24943 # and, if so, don't include it.
24944 #
24945 # We test arg 4 here because arg 3 is a program which
24946 # could contain quotes (breaking the comparison).
24947 #
24948 if test "x" != "x" ; then
24949 CFLAGS="$CFLAGS -Werror"
24950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
24951 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
24952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24953 /* end confdefs.h. */
24954  
24955 _ACEOF
24956 if ac_fn_c_try_compile "$LINENO"; then :
24957  
24958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24959 $as_echo "no" >&6; }
24960 #
24961 # Remove "force an error for a warning" options, if we
24962 # added them, by setting CFLAGS to the saved value plus
24963 # just the new option.
24964 #
24965  
24966 if ${WS_CFLAGS+:} false; then :
24967  
24968 case " $WS_CFLAGS " in #(
24969 *" $GCC_OPTION "*) :
24970 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
24971 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
24972 ac_status=$?
24973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24974 test $ac_status = 0; } ;; #(
24975 *) :
24976  
24977 as_fn_append WS_CFLAGS " $GCC_OPTION"
24978 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
24979 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
24980 ac_status=$?
24981 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24982 test $ac_status = 0; }
24983 ;;
24984 esac
24985  
24986 else
24987  
24988 WS_CFLAGS=$GCC_OPTION
24989 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
24990 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
24991 ac_status=$?
24992 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
24993 test $ac_status = 0; }
24994  
24995 fi
24996  
24997 if test "$CC" = "$CC_FOR_BUILD"; then
24998 #
24999 # We're building the build tools with the same compiler
25000 # with which we're building Wireshark, so add the flags
25001 # to the flags for that compiler as well.
25002 #
25003  
25004 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
25005  
25006 case " $WS_CFLAGS_FOR_BUILD " in #(
25007 *" $GCC_OPTION "*) :
25008 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
25009 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
25010 ac_status=$?
25011 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25012 test $ac_status = 0; } ;; #(
25013 *) :
25014  
25015 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
25016 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
25017 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
25018 ac_status=$?
25019 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25020 test $ac_status = 0; }
25021 ;;
25022 esac
25023  
25024 else
25025  
25026 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
25027 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
25028 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
25029 ac_status=$?
25030 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25031 test $ac_status = 0; }
25032  
25033 fi
25034  
25035 fi
25036  
25037 else
25038  
25039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25040 $as_echo "yes" >&6; }
25041  
25042 fi
25043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25044 else
25045 #
25046 # Remove "force an error for a warning" options, if we
25047 # added them, by setting CFLAGS to the saved value plus
25048 # just the new option.
25049 #
25050  
25051 if ${WS_CFLAGS+:} false; then :
25052  
25053 case " $WS_CFLAGS " in #(
25054 *" $GCC_OPTION "*) :
25055 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
25056 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
25057 ac_status=$?
25058 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25059 test $ac_status = 0; } ;; #(
25060 *) :
25061  
25062 as_fn_append WS_CFLAGS " $GCC_OPTION"
25063 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
25064 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
25065 ac_status=$?
25066 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25067 test $ac_status = 0; }
25068 ;;
25069 esac
25070  
25071 else
25072  
25073 WS_CFLAGS=$GCC_OPTION
25074 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
25075 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
25076 ac_status=$?
25077 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25078 test $ac_status = 0; }
25079  
25080 fi
25081  
25082 if test "$CC" = "$CC_FOR_BUILD"; then
25083 #
25084 # We're building the build tools with the same compiler
25085 # with which we're building Wireshark, so add the flags
25086 # to the flags for that compiler as well.
25087 #
25088  
25089 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
25090  
25091 case " $WS_CFLAGS_FOR_BUILD " in #(
25092 *" $GCC_OPTION "*) :
25093 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
25094 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
25095 ac_status=$?
25096 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25097 test $ac_status = 0; } ;; #(
25098 *) :
25099  
25100 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
25101 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
25102 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
25103 ac_status=$?
25104 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25105 test $ac_status = 0; }
25106 ;;
25107 esac
25108  
25109 else
25110  
25111 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
25112 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
25113 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
25114 ac_status=$?
25115 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25116 test $ac_status = 0; }
25117  
25118 fi
25119  
25120 fi
25121 fi
25122  
25123 else
25124  
25125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25126 $as_echo "no" >&6; }
25127 can_add_to_cflags=no
25128  
25129 fi
25130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25131  
25132 CPPFLAGS="$ac_ws_CPPLAGS_saved"
25133 CFLAGS="$ac_ws_CFLAGS_saved"
25134 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
25135 LDFLAGS="$ac_ws_LDFLAGS_saved"
25136  
25137 fi
25138 #
25139 # Did we find a C++ compiler?
25140 #
25141 if test "x$CXX" != "x" ; then
25142 #
25143 # Yes. Is this option only for the C compiler?
25144 #
25145 if test "" != C ; then
25146 #
25147 # Not C-only; if this option can be added to the C++ compiler
25148 # options, add it.
25149 #
25150 # If the option begins with "-W", add
25151 # $ac_wireshark_unknown_warning_option_error, as per the above, and
25152 # also add $ac_wireshark_non_cxx_warning_option_error, because at
25153 # lease some versions of g++ whine about -Wmissing-prototypes, the
25154 # fact that at least one of those versions refuses to warn about
25155 # function declarations without an earlier declaration nonwithstanding;
25156 # perhaps there's a reason not to warn about that with C++ even though
25157 # warning about it can be a Good Idea with C, but it's not obvious to
25158 # me).
25159 #
25160 # If the option begins with "-f" or "-m", add -Werror to make sure
25161 # that we'll get an error if we get "argument unused during compilation"
25162 # warnings, as those will either cause a failure for files compiled
25163 # with -Werror or annoying noise for files compiled without it.
25164 # (Yeah, you, clang++.)
25165 #
25166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
25167 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
25168  
25169 ac_ws_CPPLAGS_saved="$CPPFLAGS"
25170 ac_ws_CFLAGS_saved="$CFLAGS"
25171 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
25172 ac_ws_LDFLAGS_saved="$LDFLAGS"
25173 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
25174 CFLAGS="$WS_CFLAGS $CFLAGS"
25175 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
25176 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
25177  
25178 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
25179 then
25180 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
25181 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
25182 then
25183 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
25184 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
25185 then
25186 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
25187 else
25188 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
25189 fi
25190 ac_ext=cpp
25191 ac_cpp='$CXXCPP $CPPFLAGS'
25192 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25193 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25194 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25195  
25196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25197 /* end confdefs.h. */
25198  
25199 int foo;
25200  
25201 _ACEOF
25202 if ac_fn_cxx_try_compile "$LINENO"; then :
25203  
25204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25205 $as_echo "yes" >&6; }
25206 can_add_to_cxxflags=yes
25207 #
25208 # OK, do we have a test program? If so, check
25209 # whether it fails with this option and -Werror,
25210 # and, if so, don't include it.
25211 #
25212 # We test arg 4 here because arg 3 is a program which
25213 # could contain quotes (breaking the comparison).
25214 #
25215 if test "x" != "x" ; then
25216 CXXFLAGS="$CXXFLAGS -Werror"
25217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
25218 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
25219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25220 /* end confdefs.h. */
25221  
25222 _ACEOF
25223 if ac_fn_cxx_try_compile "$LINENO"; then :
25224  
25225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25226 $as_echo "no" >&6; }
25227 #
25228 # Remove "force an error for a warning" options, if we
25229 # added them, by setting CXXFLAGS to the saved value plus
25230 # just the new option.
25231 #
25232  
25233 if ${WS_CXXFLAGS+:} false; then :
25234  
25235 case " $WS_CXXFLAGS " in #(
25236 *" $GCC_OPTION "*) :
25237 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
25238 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
25239 ac_status=$?
25240 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25241 test $ac_status = 0; } ;; #(
25242 *) :
25243  
25244 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
25245 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
25246 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
25247 ac_status=$?
25248 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25249 test $ac_status = 0; }
25250 ;;
25251 esac
25252  
25253 else
25254  
25255 WS_CXXFLAGS=$GCC_OPTION
25256 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
25257 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
25258 ac_status=$?
25259 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25260 test $ac_status = 0; }
25261  
25262 fi
25263  
25264  
25265 else
25266  
25267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25268 $as_echo "yes" >&6; }
25269  
25270 fi
25271 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25272 else
25273 #
25274 # Remove "force an error for a warning" options, if we
25275 # added them, by setting CXXFLAGS to the saved value plus
25276 # just the new option.
25277 #
25278  
25279 if ${WS_CXXFLAGS+:} false; then :
25280  
25281 case " $WS_CXXFLAGS " in #(
25282 *" $GCC_OPTION "*) :
25283 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
25284 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
25285 ac_status=$?
25286 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25287 test $ac_status = 0; } ;; #(
25288 *) :
25289  
25290 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
25291 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
25292 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
25293 ac_status=$?
25294 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25295 test $ac_status = 0; }
25296 ;;
25297 esac
25298  
25299 else
25300  
25301 WS_CXXFLAGS=$GCC_OPTION
25302 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
25303 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
25304 ac_status=$?
25305 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25306 test $ac_status = 0; }
25307  
25308 fi
25309  
25310 fi
25311  
25312 else
25313  
25314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25315 $as_echo "no" >&6; }
25316 can_add_to_cxxflags=no
25317  
25318 fi
25319 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25320  
25321 CPPFLAGS="$ac_ws_CPPLAGS_saved"
25322 CFLAGS="$ac_ws_CFLAGS_saved"
25323 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
25324 LDFLAGS="$ac_ws_LDFLAGS_saved"
25325  
25326 ac_ext=c
25327 ac_cpp='$CPP $CPPFLAGS'
25328 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25329 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25330 ac_compiler_gnu=$ac_cv_c_compiler_gnu
25331  
25332 fi
25333 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
25334 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
25335 then
25336 #
25337 # Confusingly, some C++ compilers like -Wmissing-prototypes but
25338 # don't like -Wmissing-declarations and others like
25339 # -Wmissing-declarations but don't like -Wmissing-prototypes,
25340 # the fact that the corresponding C compiler likes both. Don't
25341 # warn about them.
25342 #
25343 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
25344 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
25345 then
25346 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
25347 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
25348 fi
25349 fi
25350 fi
25351 fi
25352  
25353 GCC_OPTION="-fno-delete-null-pointer-checks"
25354 can_add_to_cflags=""
25355 can_add_to_cxxflags=""
25356 if test "x$ac_supports_gcc_flags" = "xyes" ; then
25357 if test "" != CXX ; then
25358 #
25359 # Not C++-only; if this can be added to the C compiler flags, add them.
25360 #
25361 # If the option begins with "-W", add
25362 # $ac_wireshark_unknown_warning_option_error to make sure that
25363 # we'll get an error if it's an unknown warning option; not all
25364 # compilers treat unknown warning options as errors (I'm looking at
25365 # you, clang).
25366 #
25367 # If the option begins with "-f" or "-m", add -Werror to make sure
25368 # that we'll get an error if we get "argument unused during compilation"
25369 # warnings, as those will either cause a failure for files compiled
25370 # with -Werror or annoying noise for files compiled without it.
25371 # (Yeah, you, clang.)
25372 #
25373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
25374 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
25375  
25376 ac_ws_CPPLAGS_saved="$CPPFLAGS"
25377 ac_ws_CFLAGS_saved="$CFLAGS"
25378 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
25379 ac_ws_LDFLAGS_saved="$LDFLAGS"
25380 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
25381 CFLAGS="$WS_CFLAGS $CFLAGS"
25382 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
25383 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
25384  
25385 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
25386 then
25387 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
25388 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
25389 then
25390 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
25391 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
25392 then
25393 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
25394 else
25395 CFLAGS="$CFLAGS $GCC_OPTION"
25396 fi
25397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25398 /* end confdefs.h. */
25399  
25400 int foo;
25401  
25402 _ACEOF
25403 if ac_fn_c_try_compile "$LINENO"; then :
25404  
25405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25406 $as_echo "yes" >&6; }
25407 can_add_to_cflags=yes
25408 #
25409 # OK, do we have a test program? If so, check
25410 # whether it fails with this option and -Werror,
25411 # and, if so, don't include it.
25412 #
25413 # We test arg 4 here because arg 3 is a program which
25414 # could contain quotes (breaking the comparison).
25415 #
25416 if test "x" != "x" ; then
25417 CFLAGS="$CFLAGS -Werror"
25418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
25419 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
25420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25421 /* end confdefs.h. */
25422  
25423 _ACEOF
25424 if ac_fn_c_try_compile "$LINENO"; then :
25425  
25426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25427 $as_echo "no" >&6; }
25428 #
25429 # Remove "force an error for a warning" options, if we
25430 # added them, by setting CFLAGS to the saved value plus
25431 # just the new option.
25432 #
25433  
25434 if ${WS_CFLAGS+:} false; then :
25435  
25436 case " $WS_CFLAGS " in #(
25437 *" $GCC_OPTION "*) :
25438 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
25439 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
25440 ac_status=$?
25441 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25442 test $ac_status = 0; } ;; #(
25443 *) :
25444  
25445 as_fn_append WS_CFLAGS " $GCC_OPTION"
25446 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
25447 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
25448 ac_status=$?
25449 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25450 test $ac_status = 0; }
25451 ;;
25452 esac
25453  
25454 else
25455  
25456 WS_CFLAGS=$GCC_OPTION
25457 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
25458 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
25459 ac_status=$?
25460 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25461 test $ac_status = 0; }
25462  
25463 fi
25464  
25465 if test "$CC" = "$CC_FOR_BUILD"; then
25466 #
25467 # We're building the build tools with the same compiler
25468 # with which we're building Wireshark, so add the flags
25469 # to the flags for that compiler as well.
25470 #
25471  
25472 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
25473  
25474 case " $WS_CFLAGS_FOR_BUILD " in #(
25475 *" $GCC_OPTION "*) :
25476 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
25477 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
25478 ac_status=$?
25479 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25480 test $ac_status = 0; } ;; #(
25481 *) :
25482  
25483 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
25484 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
25485 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
25486 ac_status=$?
25487 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25488 test $ac_status = 0; }
25489 ;;
25490 esac
25491  
25492 else
25493  
25494 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
25495 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
25496 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
25497 ac_status=$?
25498 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25499 test $ac_status = 0; }
25500  
25501 fi
25502  
25503 fi
25504  
25505 else
25506  
25507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25508 $as_echo "yes" >&6; }
25509  
25510 fi
25511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25512 else
25513 #
25514 # Remove "force an error for a warning" options, if we
25515 # added them, by setting CFLAGS to the saved value plus
25516 # just the new option.
25517 #
25518  
25519 if ${WS_CFLAGS+:} false; then :
25520  
25521 case " $WS_CFLAGS " in #(
25522 *" $GCC_OPTION "*) :
25523 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
25524 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
25525 ac_status=$?
25526 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25527 test $ac_status = 0; } ;; #(
25528 *) :
25529  
25530 as_fn_append WS_CFLAGS " $GCC_OPTION"
25531 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
25532 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
25533 ac_status=$?
25534 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25535 test $ac_status = 0; }
25536 ;;
25537 esac
25538  
25539 else
25540  
25541 WS_CFLAGS=$GCC_OPTION
25542 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
25543 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
25544 ac_status=$?
25545 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25546 test $ac_status = 0; }
25547  
25548 fi
25549  
25550 if test "$CC" = "$CC_FOR_BUILD"; then
25551 #
25552 # We're building the build tools with the same compiler
25553 # with which we're building Wireshark, so add the flags
25554 # to the flags for that compiler as well.
25555 #
25556  
25557 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
25558  
25559 case " $WS_CFLAGS_FOR_BUILD " in #(
25560 *" $GCC_OPTION "*) :
25561 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
25562 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
25563 ac_status=$?
25564 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25565 test $ac_status = 0; } ;; #(
25566 *) :
25567  
25568 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
25569 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
25570 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
25571 ac_status=$?
25572 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25573 test $ac_status = 0; }
25574 ;;
25575 esac
25576  
25577 else
25578  
25579 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
25580 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
25581 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
25582 ac_status=$?
25583 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25584 test $ac_status = 0; }
25585  
25586 fi
25587  
25588 fi
25589 fi
25590  
25591 else
25592  
25593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25594 $as_echo "no" >&6; }
25595 can_add_to_cflags=no
25596  
25597 fi
25598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25599  
25600 CPPFLAGS="$ac_ws_CPPLAGS_saved"
25601 CFLAGS="$ac_ws_CFLAGS_saved"
25602 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
25603 LDFLAGS="$ac_ws_LDFLAGS_saved"
25604  
25605 fi
25606 #
25607 # Did we find a C++ compiler?
25608 #
25609 if test "x$CXX" != "x" ; then
25610 #
25611 # Yes. Is this option only for the C compiler?
25612 #
25613 if test "" != C ; then
25614 #
25615 # Not C-only; if this option can be added to the C++ compiler
25616 # options, add it.
25617 #
25618 # If the option begins with "-W", add
25619 # $ac_wireshark_unknown_warning_option_error, as per the above, and
25620 # also add $ac_wireshark_non_cxx_warning_option_error, because at
25621 # lease some versions of g++ whine about -Wmissing-prototypes, the
25622 # fact that at least one of those versions refuses to warn about
25623 # function declarations without an earlier declaration nonwithstanding;
25624 # perhaps there's a reason not to warn about that with C++ even though
25625 # warning about it can be a Good Idea with C, but it's not obvious to
25626 # me).
25627 #
25628 # If the option begins with "-f" or "-m", add -Werror to make sure
25629 # that we'll get an error if we get "argument unused during compilation"
25630 # warnings, as those will either cause a failure for files compiled
25631 # with -Werror or annoying noise for files compiled without it.
25632 # (Yeah, you, clang++.)
25633 #
25634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
25635 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
25636  
25637 ac_ws_CPPLAGS_saved="$CPPFLAGS"
25638 ac_ws_CFLAGS_saved="$CFLAGS"
25639 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
25640 ac_ws_LDFLAGS_saved="$LDFLAGS"
25641 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
25642 CFLAGS="$WS_CFLAGS $CFLAGS"
25643 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
25644 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
25645  
25646 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
25647 then
25648 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
25649 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
25650 then
25651 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
25652 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
25653 then
25654 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
25655 else
25656 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
25657 fi
25658 ac_ext=cpp
25659 ac_cpp='$CXXCPP $CPPFLAGS'
25660 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25661 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25662 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25663  
25664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25665 /* end confdefs.h. */
25666  
25667 int foo;
25668  
25669 _ACEOF
25670 if ac_fn_cxx_try_compile "$LINENO"; then :
25671  
25672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25673 $as_echo "yes" >&6; }
25674 can_add_to_cxxflags=yes
25675 #
25676 # OK, do we have a test program? If so, check
25677 # whether it fails with this option and -Werror,
25678 # and, if so, don't include it.
25679 #
25680 # We test arg 4 here because arg 3 is a program which
25681 # could contain quotes (breaking the comparison).
25682 #
25683 if test "x" != "x" ; then
25684 CXXFLAGS="$CXXFLAGS -Werror"
25685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
25686 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
25687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25688 /* end confdefs.h. */
25689  
25690 _ACEOF
25691 if ac_fn_cxx_try_compile "$LINENO"; then :
25692  
25693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25694 $as_echo "no" >&6; }
25695 #
25696 # Remove "force an error for a warning" options, if we
25697 # added them, by setting CXXFLAGS to the saved value plus
25698 # just the new option.
25699 #
25700  
25701 if ${WS_CXXFLAGS+:} false; then :
25702  
25703 case " $WS_CXXFLAGS " in #(
25704 *" $GCC_OPTION "*) :
25705 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
25706 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
25707 ac_status=$?
25708 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25709 test $ac_status = 0; } ;; #(
25710 *) :
25711  
25712 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
25713 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
25714 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
25715 ac_status=$?
25716 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25717 test $ac_status = 0; }
25718 ;;
25719 esac
25720  
25721 else
25722  
25723 WS_CXXFLAGS=$GCC_OPTION
25724 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
25725 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
25726 ac_status=$?
25727 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25728 test $ac_status = 0; }
25729  
25730 fi
25731  
25732  
25733 else
25734  
25735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25736 $as_echo "yes" >&6; }
25737  
25738 fi
25739 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25740 else
25741 #
25742 # Remove "force an error for a warning" options, if we
25743 # added them, by setting CXXFLAGS to the saved value plus
25744 # just the new option.
25745 #
25746  
25747 if ${WS_CXXFLAGS+:} false; then :
25748  
25749 case " $WS_CXXFLAGS " in #(
25750 *" $GCC_OPTION "*) :
25751 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
25752 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
25753 ac_status=$?
25754 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25755 test $ac_status = 0; } ;; #(
25756 *) :
25757  
25758 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
25759 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
25760 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
25761 ac_status=$?
25762 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25763 test $ac_status = 0; }
25764 ;;
25765 esac
25766  
25767 else
25768  
25769 WS_CXXFLAGS=$GCC_OPTION
25770 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
25771 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
25772 ac_status=$?
25773 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25774 test $ac_status = 0; }
25775  
25776 fi
25777  
25778 fi
25779  
25780 else
25781  
25782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25783 $as_echo "no" >&6; }
25784 can_add_to_cxxflags=no
25785  
25786 fi
25787 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25788  
25789 CPPFLAGS="$ac_ws_CPPLAGS_saved"
25790 CFLAGS="$ac_ws_CFLAGS_saved"
25791 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
25792 LDFLAGS="$ac_ws_LDFLAGS_saved"
25793  
25794 ac_ext=c
25795 ac_cpp='$CPP $CPPFLAGS'
25796 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25797 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25798 ac_compiler_gnu=$ac_cv_c_compiler_gnu
25799  
25800 fi
25801 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
25802 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
25803 then
25804 #
25805 # Confusingly, some C++ compilers like -Wmissing-prototypes but
25806 # don't like -Wmissing-declarations and others like
25807 # -Wmissing-declarations but don't like -Wmissing-prototypes,
25808 # the fact that the corresponding C compiler likes both. Don't
25809 # warn about them.
25810 #
25811 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
25812 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
25813 then
25814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
25815 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
25816 fi
25817 fi
25818 fi
25819 fi
25820  
25821 GCC_OPTION="-Wvla"
25822 can_add_to_cflags=""
25823 can_add_to_cxxflags=""
25824 if test "x$ac_supports_gcc_flags" = "xyes" ; then
25825 if test "" != CXX ; then
25826 #
25827 # Not C++-only; if this can be added to the C compiler flags, add them.
25828 #
25829 # If the option begins with "-W", add
25830 # $ac_wireshark_unknown_warning_option_error to make sure that
25831 # we'll get an error if it's an unknown warning option; not all
25832 # compilers treat unknown warning options as errors (I'm looking at
25833 # you, clang).
25834 #
25835 # If the option begins with "-f" or "-m", add -Werror to make sure
25836 # that we'll get an error if we get "argument unused during compilation"
25837 # warnings, as those will either cause a failure for files compiled
25838 # with -Werror or annoying noise for files compiled without it.
25839 # (Yeah, you, clang.)
25840 #
25841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
25842 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
25843  
25844 ac_ws_CPPLAGS_saved="$CPPFLAGS"
25845 ac_ws_CFLAGS_saved="$CFLAGS"
25846 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
25847 ac_ws_LDFLAGS_saved="$LDFLAGS"
25848 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
25849 CFLAGS="$WS_CFLAGS $CFLAGS"
25850 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
25851 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
25852  
25853 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
25854 then
25855 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
25856 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
25857 then
25858 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
25859 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
25860 then
25861 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
25862 else
25863 CFLAGS="$CFLAGS $GCC_OPTION"
25864 fi
25865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25866 /* end confdefs.h. */
25867  
25868 int foo;
25869  
25870 _ACEOF
25871 if ac_fn_c_try_compile "$LINENO"; then :
25872  
25873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25874 $as_echo "yes" >&6; }
25875 can_add_to_cflags=yes
25876 #
25877 # OK, do we have a test program? If so, check
25878 # whether it fails with this option and -Werror,
25879 # and, if so, don't include it.
25880 #
25881 # We test arg 4 here because arg 3 is a program which
25882 # could contain quotes (breaking the comparison).
25883 #
25884 if test "x" != "x" ; then
25885 CFLAGS="$CFLAGS -Werror"
25886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
25887 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
25888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25889 /* end confdefs.h. */
25890  
25891 _ACEOF
25892 if ac_fn_c_try_compile "$LINENO"; then :
25893  
25894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25895 $as_echo "no" >&6; }
25896 #
25897 # Remove "force an error for a warning" options, if we
25898 # added them, by setting CFLAGS to the saved value plus
25899 # just the new option.
25900 #
25901  
25902 if ${WS_CFLAGS+:} false; then :
25903  
25904 case " $WS_CFLAGS " in #(
25905 *" $GCC_OPTION "*) :
25906 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
25907 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
25908 ac_status=$?
25909 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25910 test $ac_status = 0; } ;; #(
25911 *) :
25912  
25913 as_fn_append WS_CFLAGS " $GCC_OPTION"
25914 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
25915 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
25916 ac_status=$?
25917 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25918 test $ac_status = 0; }
25919 ;;
25920 esac
25921  
25922 else
25923  
25924 WS_CFLAGS=$GCC_OPTION
25925 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
25926 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
25927 ac_status=$?
25928 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25929 test $ac_status = 0; }
25930  
25931 fi
25932  
25933 if test "$CC" = "$CC_FOR_BUILD"; then
25934 #
25935 # We're building the build tools with the same compiler
25936 # with which we're building Wireshark, so add the flags
25937 # to the flags for that compiler as well.
25938 #
25939  
25940 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
25941  
25942 case " $WS_CFLAGS_FOR_BUILD " in #(
25943 *" $GCC_OPTION "*) :
25944 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
25945 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
25946 ac_status=$?
25947 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25948 test $ac_status = 0; } ;; #(
25949 *) :
25950  
25951 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
25952 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
25953 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
25954 ac_status=$?
25955 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25956 test $ac_status = 0; }
25957 ;;
25958 esac
25959  
25960 else
25961  
25962 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
25963 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
25964 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
25965 ac_status=$?
25966 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25967 test $ac_status = 0; }
25968  
25969 fi
25970  
25971 fi
25972  
25973 else
25974  
25975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25976 $as_echo "yes" >&6; }
25977  
25978 fi
25979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25980 else
25981 #
25982 # Remove "force an error for a warning" options, if we
25983 # added them, by setting CFLAGS to the saved value plus
25984 # just the new option.
25985 #
25986  
25987 if ${WS_CFLAGS+:} false; then :
25988  
25989 case " $WS_CFLAGS " in #(
25990 *" $GCC_OPTION "*) :
25991 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
25992 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
25993 ac_status=$?
25994 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
25995 test $ac_status = 0; } ;; #(
25996 *) :
25997  
25998 as_fn_append WS_CFLAGS " $GCC_OPTION"
25999 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
26000 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
26001 ac_status=$?
26002 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26003 test $ac_status = 0; }
26004 ;;
26005 esac
26006  
26007 else
26008  
26009 WS_CFLAGS=$GCC_OPTION
26010 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
26011 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
26012 ac_status=$?
26013 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26014 test $ac_status = 0; }
26015  
26016 fi
26017  
26018 if test "$CC" = "$CC_FOR_BUILD"; then
26019 #
26020 # We're building the build tools with the same compiler
26021 # with which we're building Wireshark, so add the flags
26022 # to the flags for that compiler as well.
26023 #
26024  
26025 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
26026  
26027 case " $WS_CFLAGS_FOR_BUILD " in #(
26028 *" $GCC_OPTION "*) :
26029 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
26030 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
26031 ac_status=$?
26032 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26033 test $ac_status = 0; } ;; #(
26034 *) :
26035  
26036 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
26037 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
26038 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
26039 ac_status=$?
26040 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26041 test $ac_status = 0; }
26042 ;;
26043 esac
26044  
26045 else
26046  
26047 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
26048 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
26049 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
26050 ac_status=$?
26051 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26052 test $ac_status = 0; }
26053  
26054 fi
26055  
26056 fi
26057 fi
26058  
26059 else
26060  
26061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26062 $as_echo "no" >&6; }
26063 can_add_to_cflags=no
26064  
26065 fi
26066 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26067  
26068 CPPFLAGS="$ac_ws_CPPLAGS_saved"
26069 CFLAGS="$ac_ws_CFLAGS_saved"
26070 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
26071 LDFLAGS="$ac_ws_LDFLAGS_saved"
26072  
26073 fi
26074 #
26075 # Did we find a C++ compiler?
26076 #
26077 if test "x$CXX" != "x" ; then
26078 #
26079 # Yes. Is this option only for the C compiler?
26080 #
26081 if test "" != C ; then
26082 #
26083 # Not C-only; if this option can be added to the C++ compiler
26084 # options, add it.
26085 #
26086 # If the option begins with "-W", add
26087 # $ac_wireshark_unknown_warning_option_error, as per the above, and
26088 # also add $ac_wireshark_non_cxx_warning_option_error, because at
26089 # lease some versions of g++ whine about -Wmissing-prototypes, the
26090 # fact that at least one of those versions refuses to warn about
26091 # function declarations without an earlier declaration nonwithstanding;
26092 # perhaps there's a reason not to warn about that with C++ even though
26093 # warning about it can be a Good Idea with C, but it's not obvious to
26094 # me).
26095 #
26096 # If the option begins with "-f" or "-m", add -Werror to make sure
26097 # that we'll get an error if we get "argument unused during compilation"
26098 # warnings, as those will either cause a failure for files compiled
26099 # with -Werror or annoying noise for files compiled without it.
26100 # (Yeah, you, clang++.)
26101 #
26102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
26103 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
26104  
26105 ac_ws_CPPLAGS_saved="$CPPFLAGS"
26106 ac_ws_CFLAGS_saved="$CFLAGS"
26107 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
26108 ac_ws_LDFLAGS_saved="$LDFLAGS"
26109 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
26110 CFLAGS="$WS_CFLAGS $CFLAGS"
26111 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
26112 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
26113  
26114 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
26115 then
26116 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
26117 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
26118 then
26119 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
26120 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
26121 then
26122 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
26123 else
26124 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
26125 fi
26126 ac_ext=cpp
26127 ac_cpp='$CXXCPP $CPPFLAGS'
26128 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26129 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26130 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26131  
26132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26133 /* end confdefs.h. */
26134  
26135 int foo;
26136  
26137 _ACEOF
26138 if ac_fn_cxx_try_compile "$LINENO"; then :
26139  
26140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26141 $as_echo "yes" >&6; }
26142 can_add_to_cxxflags=yes
26143 #
26144 # OK, do we have a test program? If so, check
26145 # whether it fails with this option and -Werror,
26146 # and, if so, don't include it.
26147 #
26148 # We test arg 4 here because arg 3 is a program which
26149 # could contain quotes (breaking the comparison).
26150 #
26151 if test "x" != "x" ; then
26152 CXXFLAGS="$CXXFLAGS -Werror"
26153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
26154 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
26155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26156 /* end confdefs.h. */
26157  
26158 _ACEOF
26159 if ac_fn_cxx_try_compile "$LINENO"; then :
26160  
26161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26162 $as_echo "no" >&6; }
26163 #
26164 # Remove "force an error for a warning" options, if we
26165 # added them, by setting CXXFLAGS to the saved value plus
26166 # just the new option.
26167 #
26168  
26169 if ${WS_CXXFLAGS+:} false; then :
26170  
26171 case " $WS_CXXFLAGS " in #(
26172 *" $GCC_OPTION "*) :
26173 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
26174 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
26175 ac_status=$?
26176 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26177 test $ac_status = 0; } ;; #(
26178 *) :
26179  
26180 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
26181 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
26182 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
26183 ac_status=$?
26184 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26185 test $ac_status = 0; }
26186 ;;
26187 esac
26188  
26189 else
26190  
26191 WS_CXXFLAGS=$GCC_OPTION
26192 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
26193 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
26194 ac_status=$?
26195 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26196 test $ac_status = 0; }
26197  
26198 fi
26199  
26200  
26201 else
26202  
26203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26204 $as_echo "yes" >&6; }
26205  
26206 fi
26207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26208 else
26209 #
26210 # Remove "force an error for a warning" options, if we
26211 # added them, by setting CXXFLAGS to the saved value plus
26212 # just the new option.
26213 #
26214  
26215 if ${WS_CXXFLAGS+:} false; then :
26216  
26217 case " $WS_CXXFLAGS " in #(
26218 *" $GCC_OPTION "*) :
26219 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
26220 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
26221 ac_status=$?
26222 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26223 test $ac_status = 0; } ;; #(
26224 *) :
26225  
26226 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
26227 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
26228 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
26229 ac_status=$?
26230 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26231 test $ac_status = 0; }
26232 ;;
26233 esac
26234  
26235 else
26236  
26237 WS_CXXFLAGS=$GCC_OPTION
26238 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
26239 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
26240 ac_status=$?
26241 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26242 test $ac_status = 0; }
26243  
26244 fi
26245  
26246 fi
26247  
26248 else
26249  
26250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26251 $as_echo "no" >&6; }
26252 can_add_to_cxxflags=no
26253  
26254 fi
26255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26256  
26257 CPPFLAGS="$ac_ws_CPPLAGS_saved"
26258 CFLAGS="$ac_ws_CFLAGS_saved"
26259 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
26260 LDFLAGS="$ac_ws_LDFLAGS_saved"
26261  
26262 ac_ext=c
26263 ac_cpp='$CPP $CPPFLAGS'
26264 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26265 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26266 ac_compiler_gnu=$ac_cv_c_compiler_gnu
26267  
26268 fi
26269 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
26270 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
26271 then
26272 #
26273 # Confusingly, some C++ compilers like -Wmissing-prototypes but
26274 # don't like -Wmissing-declarations and others like
26275 # -Wmissing-declarations but don't like -Wmissing-prototypes,
26276 # the fact that the corresponding C compiler likes both. Don't
26277 # warn about them.
26278 #
26279 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
26280 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
26281 then
26282 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
26283 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
26284 fi
26285 fi
26286 fi
26287 fi
26288  
26289 GCC_OPTION="-Waddress"
26290 can_add_to_cflags=""
26291 can_add_to_cxxflags=""
26292 if test "x$ac_supports_gcc_flags" = "xyes" ; then
26293 if test "" != CXX ; then
26294 #
26295 # Not C++-only; if this can be added to the C compiler flags, add them.
26296 #
26297 # If the option begins with "-W", add
26298 # $ac_wireshark_unknown_warning_option_error to make sure that
26299 # we'll get an error if it's an unknown warning option; not all
26300 # compilers treat unknown warning options as errors (I'm looking at
26301 # you, clang).
26302 #
26303 # If the option begins with "-f" or "-m", add -Werror to make sure
26304 # that we'll get an error if we get "argument unused during compilation"
26305 # warnings, as those will either cause a failure for files compiled
26306 # with -Werror or annoying noise for files compiled without it.
26307 # (Yeah, you, clang.)
26308 #
26309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
26310 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
26311  
26312 ac_ws_CPPLAGS_saved="$CPPFLAGS"
26313 ac_ws_CFLAGS_saved="$CFLAGS"
26314 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
26315 ac_ws_LDFLAGS_saved="$LDFLAGS"
26316 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
26317 CFLAGS="$WS_CFLAGS $CFLAGS"
26318 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
26319 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
26320  
26321 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
26322 then
26323 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
26324 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
26325 then
26326 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
26327 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
26328 then
26329 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
26330 else
26331 CFLAGS="$CFLAGS $GCC_OPTION"
26332 fi
26333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26334 /* end confdefs.h. */
26335  
26336 int foo;
26337  
26338 _ACEOF
26339 if ac_fn_c_try_compile "$LINENO"; then :
26340  
26341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26342 $as_echo "yes" >&6; }
26343 can_add_to_cflags=yes
26344 #
26345 # OK, do we have a test program? If so, check
26346 # whether it fails with this option and -Werror,
26347 # and, if so, don't include it.
26348 #
26349 # We test arg 4 here because arg 3 is a program which
26350 # could contain quotes (breaking the comparison).
26351 #
26352 if test "x" != "x" ; then
26353 CFLAGS="$CFLAGS -Werror"
26354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
26355 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
26356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26357 /* end confdefs.h. */
26358  
26359 _ACEOF
26360 if ac_fn_c_try_compile "$LINENO"; then :
26361  
26362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26363 $as_echo "no" >&6; }
26364 #
26365 # Remove "force an error for a warning" options, if we
26366 # added them, by setting CFLAGS to the saved value plus
26367 # just the new option.
26368 #
26369  
26370 if ${WS_CFLAGS+:} false; then :
26371  
26372 case " $WS_CFLAGS " in #(
26373 *" $GCC_OPTION "*) :
26374 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
26375 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
26376 ac_status=$?
26377 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26378 test $ac_status = 0; } ;; #(
26379 *) :
26380  
26381 as_fn_append WS_CFLAGS " $GCC_OPTION"
26382 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
26383 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
26384 ac_status=$?
26385 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26386 test $ac_status = 0; }
26387 ;;
26388 esac
26389  
26390 else
26391  
26392 WS_CFLAGS=$GCC_OPTION
26393 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
26394 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
26395 ac_status=$?
26396 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26397 test $ac_status = 0; }
26398  
26399 fi
26400  
26401 if test "$CC" = "$CC_FOR_BUILD"; then
26402 #
26403 # We're building the build tools with the same compiler
26404 # with which we're building Wireshark, so add the flags
26405 # to the flags for that compiler as well.
26406 #
26407  
26408 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
26409  
26410 case " $WS_CFLAGS_FOR_BUILD " in #(
26411 *" $GCC_OPTION "*) :
26412 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
26413 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
26414 ac_status=$?
26415 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26416 test $ac_status = 0; } ;; #(
26417 *) :
26418  
26419 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
26420 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
26421 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
26422 ac_status=$?
26423 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26424 test $ac_status = 0; }
26425 ;;
26426 esac
26427  
26428 else
26429  
26430 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
26431 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
26432 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
26433 ac_status=$?
26434 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26435 test $ac_status = 0; }
26436  
26437 fi
26438  
26439 fi
26440  
26441 else
26442  
26443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26444 $as_echo "yes" >&6; }
26445  
26446 fi
26447 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26448 else
26449 #
26450 # Remove "force an error for a warning" options, if we
26451 # added them, by setting CFLAGS to the saved value plus
26452 # just the new option.
26453 #
26454  
26455 if ${WS_CFLAGS+:} false; then :
26456  
26457 case " $WS_CFLAGS " in #(
26458 *" $GCC_OPTION "*) :
26459 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
26460 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
26461 ac_status=$?
26462 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26463 test $ac_status = 0; } ;; #(
26464 *) :
26465  
26466 as_fn_append WS_CFLAGS " $GCC_OPTION"
26467 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
26468 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
26469 ac_status=$?
26470 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26471 test $ac_status = 0; }
26472 ;;
26473 esac
26474  
26475 else
26476  
26477 WS_CFLAGS=$GCC_OPTION
26478 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
26479 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
26480 ac_status=$?
26481 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26482 test $ac_status = 0; }
26483  
26484 fi
26485  
26486 if test "$CC" = "$CC_FOR_BUILD"; then
26487 #
26488 # We're building the build tools with the same compiler
26489 # with which we're building Wireshark, so add the flags
26490 # to the flags for that compiler as well.
26491 #
26492  
26493 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
26494  
26495 case " $WS_CFLAGS_FOR_BUILD " in #(
26496 *" $GCC_OPTION "*) :
26497 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
26498 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
26499 ac_status=$?
26500 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26501 test $ac_status = 0; } ;; #(
26502 *) :
26503  
26504 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
26505 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
26506 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
26507 ac_status=$?
26508 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26509 test $ac_status = 0; }
26510 ;;
26511 esac
26512  
26513 else
26514  
26515 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
26516 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
26517 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
26518 ac_status=$?
26519 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26520 test $ac_status = 0; }
26521  
26522 fi
26523  
26524 fi
26525 fi
26526  
26527 else
26528  
26529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26530 $as_echo "no" >&6; }
26531 can_add_to_cflags=no
26532  
26533 fi
26534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26535  
26536 CPPFLAGS="$ac_ws_CPPLAGS_saved"
26537 CFLAGS="$ac_ws_CFLAGS_saved"
26538 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
26539 LDFLAGS="$ac_ws_LDFLAGS_saved"
26540  
26541 fi
26542 #
26543 # Did we find a C++ compiler?
26544 #
26545 if test "x$CXX" != "x" ; then
26546 #
26547 # Yes. Is this option only for the C compiler?
26548 #
26549 if test "" != C ; then
26550 #
26551 # Not C-only; if this option can be added to the C++ compiler
26552 # options, add it.
26553 #
26554 # If the option begins with "-W", add
26555 # $ac_wireshark_unknown_warning_option_error, as per the above, and
26556 # also add $ac_wireshark_non_cxx_warning_option_error, because at
26557 # lease some versions of g++ whine about -Wmissing-prototypes, the
26558 # fact that at least one of those versions refuses to warn about
26559 # function declarations without an earlier declaration nonwithstanding;
26560 # perhaps there's a reason not to warn about that with C++ even though
26561 # warning about it can be a Good Idea with C, but it's not obvious to
26562 # me).
26563 #
26564 # If the option begins with "-f" or "-m", add -Werror to make sure
26565 # that we'll get an error if we get "argument unused during compilation"
26566 # warnings, as those will either cause a failure for files compiled
26567 # with -Werror or annoying noise for files compiled without it.
26568 # (Yeah, you, clang++.)
26569 #
26570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
26571 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
26572  
26573 ac_ws_CPPLAGS_saved="$CPPFLAGS"
26574 ac_ws_CFLAGS_saved="$CFLAGS"
26575 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
26576 ac_ws_LDFLAGS_saved="$LDFLAGS"
26577 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
26578 CFLAGS="$WS_CFLAGS $CFLAGS"
26579 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
26580 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
26581  
26582 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
26583 then
26584 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
26585 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
26586 then
26587 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
26588 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
26589 then
26590 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
26591 else
26592 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
26593 fi
26594 ac_ext=cpp
26595 ac_cpp='$CXXCPP $CPPFLAGS'
26596 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26597 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26598 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26599  
26600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26601 /* end confdefs.h. */
26602  
26603 int foo;
26604  
26605 _ACEOF
26606 if ac_fn_cxx_try_compile "$LINENO"; then :
26607  
26608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26609 $as_echo "yes" >&6; }
26610 can_add_to_cxxflags=yes
26611 #
26612 # OK, do we have a test program? If so, check
26613 # whether it fails with this option and -Werror,
26614 # and, if so, don't include it.
26615 #
26616 # We test arg 4 here because arg 3 is a program which
26617 # could contain quotes (breaking the comparison).
26618 #
26619 if test "x" != "x" ; then
26620 CXXFLAGS="$CXXFLAGS -Werror"
26621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
26622 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
26623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26624 /* end confdefs.h. */
26625  
26626 _ACEOF
26627 if ac_fn_cxx_try_compile "$LINENO"; then :
26628  
26629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26630 $as_echo "no" >&6; }
26631 #
26632 # Remove "force an error for a warning" options, if we
26633 # added them, by setting CXXFLAGS to the saved value plus
26634 # just the new option.
26635 #
26636  
26637 if ${WS_CXXFLAGS+:} false; then :
26638  
26639 case " $WS_CXXFLAGS " in #(
26640 *" $GCC_OPTION "*) :
26641 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
26642 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
26643 ac_status=$?
26644 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26645 test $ac_status = 0; } ;; #(
26646 *) :
26647  
26648 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
26649 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
26650 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
26651 ac_status=$?
26652 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26653 test $ac_status = 0; }
26654 ;;
26655 esac
26656  
26657 else
26658  
26659 WS_CXXFLAGS=$GCC_OPTION
26660 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
26661 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
26662 ac_status=$?
26663 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26664 test $ac_status = 0; }
26665  
26666 fi
26667  
26668  
26669 else
26670  
26671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26672 $as_echo "yes" >&6; }
26673  
26674 fi
26675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26676 else
26677 #
26678 # Remove "force an error for a warning" options, if we
26679 # added them, by setting CXXFLAGS to the saved value plus
26680 # just the new option.
26681 #
26682  
26683 if ${WS_CXXFLAGS+:} false; then :
26684  
26685 case " $WS_CXXFLAGS " in #(
26686 *" $GCC_OPTION "*) :
26687 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
26688 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
26689 ac_status=$?
26690 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26691 test $ac_status = 0; } ;; #(
26692 *) :
26693  
26694 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
26695 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
26696 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
26697 ac_status=$?
26698 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26699 test $ac_status = 0; }
26700 ;;
26701 esac
26702  
26703 else
26704  
26705 WS_CXXFLAGS=$GCC_OPTION
26706 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
26707 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
26708 ac_status=$?
26709 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26710 test $ac_status = 0; }
26711  
26712 fi
26713  
26714 fi
26715  
26716 else
26717  
26718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26719 $as_echo "no" >&6; }
26720 can_add_to_cxxflags=no
26721  
26722 fi
26723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26724  
26725 CPPFLAGS="$ac_ws_CPPLAGS_saved"
26726 CFLAGS="$ac_ws_CFLAGS_saved"
26727 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
26728 LDFLAGS="$ac_ws_LDFLAGS_saved"
26729  
26730 ac_ext=c
26731 ac_cpp='$CPP $CPPFLAGS'
26732 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26733 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26734 ac_compiler_gnu=$ac_cv_c_compiler_gnu
26735  
26736 fi
26737 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
26738 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
26739 then
26740 #
26741 # Confusingly, some C++ compilers like -Wmissing-prototypes but
26742 # don't like -Wmissing-declarations and others like
26743 # -Wmissing-declarations but don't like -Wmissing-prototypes,
26744 # the fact that the corresponding C compiler likes both. Don't
26745 # warn about them.
26746 #
26747 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
26748 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
26749 then
26750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
26751 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
26752 fi
26753 fi
26754 fi
26755 fi
26756  
26757 GCC_OPTION="-Wattributes"
26758 can_add_to_cflags=""
26759 can_add_to_cxxflags=""
26760 if test "x$ac_supports_gcc_flags" = "xyes" ; then
26761 if test "" != CXX ; then
26762 #
26763 # Not C++-only; if this can be added to the C compiler flags, add them.
26764 #
26765 # If the option begins with "-W", add
26766 # $ac_wireshark_unknown_warning_option_error to make sure that
26767 # we'll get an error if it's an unknown warning option; not all
26768 # compilers treat unknown warning options as errors (I'm looking at
26769 # you, clang).
26770 #
26771 # If the option begins with "-f" or "-m", add -Werror to make sure
26772 # that we'll get an error if we get "argument unused during compilation"
26773 # warnings, as those will either cause a failure for files compiled
26774 # with -Werror or annoying noise for files compiled without it.
26775 # (Yeah, you, clang.)
26776 #
26777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
26778 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
26779  
26780 ac_ws_CPPLAGS_saved="$CPPFLAGS"
26781 ac_ws_CFLAGS_saved="$CFLAGS"
26782 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
26783 ac_ws_LDFLAGS_saved="$LDFLAGS"
26784 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
26785 CFLAGS="$WS_CFLAGS $CFLAGS"
26786 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
26787 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
26788  
26789 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
26790 then
26791 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
26792 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
26793 then
26794 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
26795 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
26796 then
26797 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
26798 else
26799 CFLAGS="$CFLAGS $GCC_OPTION"
26800 fi
26801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26802 /* end confdefs.h. */
26803  
26804 int foo;
26805  
26806 _ACEOF
26807 if ac_fn_c_try_compile "$LINENO"; then :
26808  
26809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26810 $as_echo "yes" >&6; }
26811 can_add_to_cflags=yes
26812 #
26813 # OK, do we have a test program? If so, check
26814 # whether it fails with this option and -Werror,
26815 # and, if so, don't include it.
26816 #
26817 # We test arg 4 here because arg 3 is a program which
26818 # could contain quotes (breaking the comparison).
26819 #
26820 if test "x" != "x" ; then
26821 CFLAGS="$CFLAGS -Werror"
26822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
26823 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
26824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26825 /* end confdefs.h. */
26826  
26827 _ACEOF
26828 if ac_fn_c_try_compile "$LINENO"; then :
26829  
26830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26831 $as_echo "no" >&6; }
26832 #
26833 # Remove "force an error for a warning" options, if we
26834 # added them, by setting CFLAGS to the saved value plus
26835 # just the new option.
26836 #
26837  
26838 if ${WS_CFLAGS+:} false; then :
26839  
26840 case " $WS_CFLAGS " in #(
26841 *" $GCC_OPTION "*) :
26842 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
26843 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
26844 ac_status=$?
26845 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26846 test $ac_status = 0; } ;; #(
26847 *) :
26848  
26849 as_fn_append WS_CFLAGS " $GCC_OPTION"
26850 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
26851 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
26852 ac_status=$?
26853 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26854 test $ac_status = 0; }
26855 ;;
26856 esac
26857  
26858 else
26859  
26860 WS_CFLAGS=$GCC_OPTION
26861 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
26862 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
26863 ac_status=$?
26864 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26865 test $ac_status = 0; }
26866  
26867 fi
26868  
26869 if test "$CC" = "$CC_FOR_BUILD"; then
26870 #
26871 # We're building the build tools with the same compiler
26872 # with which we're building Wireshark, so add the flags
26873 # to the flags for that compiler as well.
26874 #
26875  
26876 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
26877  
26878 case " $WS_CFLAGS_FOR_BUILD " in #(
26879 *" $GCC_OPTION "*) :
26880 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
26881 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
26882 ac_status=$?
26883 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26884 test $ac_status = 0; } ;; #(
26885 *) :
26886  
26887 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
26888 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
26889 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
26890 ac_status=$?
26891 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26892 test $ac_status = 0; }
26893 ;;
26894 esac
26895  
26896 else
26897  
26898 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
26899 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
26900 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
26901 ac_status=$?
26902 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26903 test $ac_status = 0; }
26904  
26905 fi
26906  
26907 fi
26908  
26909 else
26910  
26911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26912 $as_echo "yes" >&6; }
26913  
26914 fi
26915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26916 else
26917 #
26918 # Remove "force an error for a warning" options, if we
26919 # added them, by setting CFLAGS to the saved value plus
26920 # just the new option.
26921 #
26922  
26923 if ${WS_CFLAGS+:} false; then :
26924  
26925 case " $WS_CFLAGS " in #(
26926 *" $GCC_OPTION "*) :
26927 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
26928 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
26929 ac_status=$?
26930 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26931 test $ac_status = 0; } ;; #(
26932 *) :
26933  
26934 as_fn_append WS_CFLAGS " $GCC_OPTION"
26935 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
26936 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
26937 ac_status=$?
26938 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26939 test $ac_status = 0; }
26940 ;;
26941 esac
26942  
26943 else
26944  
26945 WS_CFLAGS=$GCC_OPTION
26946 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
26947 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
26948 ac_status=$?
26949 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26950 test $ac_status = 0; }
26951  
26952 fi
26953  
26954 if test "$CC" = "$CC_FOR_BUILD"; then
26955 #
26956 # We're building the build tools with the same compiler
26957 # with which we're building Wireshark, so add the flags
26958 # to the flags for that compiler as well.
26959 #
26960  
26961 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
26962  
26963 case " $WS_CFLAGS_FOR_BUILD " in #(
26964 *" $GCC_OPTION "*) :
26965 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
26966 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
26967 ac_status=$?
26968 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26969 test $ac_status = 0; } ;; #(
26970 *) :
26971  
26972 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
26973 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
26974 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
26975 ac_status=$?
26976 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26977 test $ac_status = 0; }
26978 ;;
26979 esac
26980  
26981 else
26982  
26983 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
26984 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
26985 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
26986 ac_status=$?
26987 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
26988 test $ac_status = 0; }
26989  
26990 fi
26991  
26992 fi
26993 fi
26994  
26995 else
26996  
26997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26998 $as_echo "no" >&6; }
26999 can_add_to_cflags=no
27000  
27001 fi
27002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27003  
27004 CPPFLAGS="$ac_ws_CPPLAGS_saved"
27005 CFLAGS="$ac_ws_CFLAGS_saved"
27006 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
27007 LDFLAGS="$ac_ws_LDFLAGS_saved"
27008  
27009 fi
27010 #
27011 # Did we find a C++ compiler?
27012 #
27013 if test "x$CXX" != "x" ; then
27014 #
27015 # Yes. Is this option only for the C compiler?
27016 #
27017 if test "" != C ; then
27018 #
27019 # Not C-only; if this option can be added to the C++ compiler
27020 # options, add it.
27021 #
27022 # If the option begins with "-W", add
27023 # $ac_wireshark_unknown_warning_option_error, as per the above, and
27024 # also add $ac_wireshark_non_cxx_warning_option_error, because at
27025 # lease some versions of g++ whine about -Wmissing-prototypes, the
27026 # fact that at least one of those versions refuses to warn about
27027 # function declarations without an earlier declaration nonwithstanding;
27028 # perhaps there's a reason not to warn about that with C++ even though
27029 # warning about it can be a Good Idea with C, but it's not obvious to
27030 # me).
27031 #
27032 # If the option begins with "-f" or "-m", add -Werror to make sure
27033 # that we'll get an error if we get "argument unused during compilation"
27034 # warnings, as those will either cause a failure for files compiled
27035 # with -Werror or annoying noise for files compiled without it.
27036 # (Yeah, you, clang++.)
27037 #
27038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
27039 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
27040  
27041 ac_ws_CPPLAGS_saved="$CPPFLAGS"
27042 ac_ws_CFLAGS_saved="$CFLAGS"
27043 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
27044 ac_ws_LDFLAGS_saved="$LDFLAGS"
27045 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
27046 CFLAGS="$WS_CFLAGS $CFLAGS"
27047 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
27048 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
27049  
27050 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
27051 then
27052 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
27053 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
27054 then
27055 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
27056 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
27057 then
27058 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
27059 else
27060 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
27061 fi
27062 ac_ext=cpp
27063 ac_cpp='$CXXCPP $CPPFLAGS'
27064 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27065 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27066 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27067  
27068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27069 /* end confdefs.h. */
27070  
27071 int foo;
27072  
27073 _ACEOF
27074 if ac_fn_cxx_try_compile "$LINENO"; then :
27075  
27076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27077 $as_echo "yes" >&6; }
27078 can_add_to_cxxflags=yes
27079 #
27080 # OK, do we have a test program? If so, check
27081 # whether it fails with this option and -Werror,
27082 # and, if so, don't include it.
27083 #
27084 # We test arg 4 here because arg 3 is a program which
27085 # could contain quotes (breaking the comparison).
27086 #
27087 if test "x" != "x" ; then
27088 CXXFLAGS="$CXXFLAGS -Werror"
27089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
27090 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
27091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27092 /* end confdefs.h. */
27093  
27094 _ACEOF
27095 if ac_fn_cxx_try_compile "$LINENO"; then :
27096  
27097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27098 $as_echo "no" >&6; }
27099 #
27100 # Remove "force an error for a warning" options, if we
27101 # added them, by setting CXXFLAGS to the saved value plus
27102 # just the new option.
27103 #
27104  
27105 if ${WS_CXXFLAGS+:} false; then :
27106  
27107 case " $WS_CXXFLAGS " in #(
27108 *" $GCC_OPTION "*) :
27109 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
27110 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
27111 ac_status=$?
27112 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27113 test $ac_status = 0; } ;; #(
27114 *) :
27115  
27116 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
27117 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
27118 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
27119 ac_status=$?
27120 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27121 test $ac_status = 0; }
27122 ;;
27123 esac
27124  
27125 else
27126  
27127 WS_CXXFLAGS=$GCC_OPTION
27128 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
27129 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
27130 ac_status=$?
27131 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27132 test $ac_status = 0; }
27133  
27134 fi
27135  
27136  
27137 else
27138  
27139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27140 $as_echo "yes" >&6; }
27141  
27142 fi
27143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27144 else
27145 #
27146 # Remove "force an error for a warning" options, if we
27147 # added them, by setting CXXFLAGS to the saved value plus
27148 # just the new option.
27149 #
27150  
27151 if ${WS_CXXFLAGS+:} false; then :
27152  
27153 case " $WS_CXXFLAGS " in #(
27154 *" $GCC_OPTION "*) :
27155 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
27156 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
27157 ac_status=$?
27158 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27159 test $ac_status = 0; } ;; #(
27160 *) :
27161  
27162 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
27163 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
27164 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
27165 ac_status=$?
27166 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27167 test $ac_status = 0; }
27168 ;;
27169 esac
27170  
27171 else
27172  
27173 WS_CXXFLAGS=$GCC_OPTION
27174 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
27175 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
27176 ac_status=$?
27177 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27178 test $ac_status = 0; }
27179  
27180 fi
27181  
27182 fi
27183  
27184 else
27185  
27186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27187 $as_echo "no" >&6; }
27188 can_add_to_cxxflags=no
27189  
27190 fi
27191 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27192  
27193 CPPFLAGS="$ac_ws_CPPLAGS_saved"
27194 CFLAGS="$ac_ws_CFLAGS_saved"
27195 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
27196 LDFLAGS="$ac_ws_LDFLAGS_saved"
27197  
27198 ac_ext=c
27199 ac_cpp='$CPP $CPPFLAGS'
27200 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27201 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27202 ac_compiler_gnu=$ac_cv_c_compiler_gnu
27203  
27204 fi
27205 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
27206 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
27207 then
27208 #
27209 # Confusingly, some C++ compilers like -Wmissing-prototypes but
27210 # don't like -Wmissing-declarations and others like
27211 # -Wmissing-declarations but don't like -Wmissing-prototypes,
27212 # the fact that the corresponding C compiler likes both. Don't
27213 # warn about them.
27214 #
27215 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
27216 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
27217 then
27218 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
27219 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
27220 fi
27221 fi
27222 fi
27223 fi
27224  
27225 GCC_OPTION="-Wdiv-by-zero"
27226 can_add_to_cflags=""
27227 can_add_to_cxxflags=""
27228 if test "x$ac_supports_gcc_flags" = "xyes" ; then
27229 if test "" != CXX ; then
27230 #
27231 # Not C++-only; if this can be added to the C compiler flags, add them.
27232 #
27233 # If the option begins with "-W", add
27234 # $ac_wireshark_unknown_warning_option_error to make sure that
27235 # we'll get an error if it's an unknown warning option; not all
27236 # compilers treat unknown warning options as errors (I'm looking at
27237 # you, clang).
27238 #
27239 # If the option begins with "-f" or "-m", add -Werror to make sure
27240 # that we'll get an error if we get "argument unused during compilation"
27241 # warnings, as those will either cause a failure for files compiled
27242 # with -Werror or annoying noise for files compiled without it.
27243 # (Yeah, you, clang.)
27244 #
27245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
27246 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
27247  
27248 ac_ws_CPPLAGS_saved="$CPPFLAGS"
27249 ac_ws_CFLAGS_saved="$CFLAGS"
27250 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
27251 ac_ws_LDFLAGS_saved="$LDFLAGS"
27252 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
27253 CFLAGS="$WS_CFLAGS $CFLAGS"
27254 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
27255 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
27256  
27257 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
27258 then
27259 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
27260 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
27261 then
27262 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
27263 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
27264 then
27265 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
27266 else
27267 CFLAGS="$CFLAGS $GCC_OPTION"
27268 fi
27269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27270 /* end confdefs.h. */
27271  
27272 int foo;
27273  
27274 _ACEOF
27275 if ac_fn_c_try_compile "$LINENO"; then :
27276  
27277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27278 $as_echo "yes" >&6; }
27279 can_add_to_cflags=yes
27280 #
27281 # OK, do we have a test program? If so, check
27282 # whether it fails with this option and -Werror,
27283 # and, if so, don't include it.
27284 #
27285 # We test arg 4 here because arg 3 is a program which
27286 # could contain quotes (breaking the comparison).
27287 #
27288 if test "x" != "x" ; then
27289 CFLAGS="$CFLAGS -Werror"
27290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
27291 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
27292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27293 /* end confdefs.h. */
27294  
27295 _ACEOF
27296 if ac_fn_c_try_compile "$LINENO"; then :
27297  
27298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27299 $as_echo "no" >&6; }
27300 #
27301 # Remove "force an error for a warning" options, if we
27302 # added them, by setting CFLAGS to the saved value plus
27303 # just the new option.
27304 #
27305  
27306 if ${WS_CFLAGS+:} false; then :
27307  
27308 case " $WS_CFLAGS " in #(
27309 *" $GCC_OPTION "*) :
27310 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
27311 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
27312 ac_status=$?
27313 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27314 test $ac_status = 0; } ;; #(
27315 *) :
27316  
27317 as_fn_append WS_CFLAGS " $GCC_OPTION"
27318 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
27319 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
27320 ac_status=$?
27321 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27322 test $ac_status = 0; }
27323 ;;
27324 esac
27325  
27326 else
27327  
27328 WS_CFLAGS=$GCC_OPTION
27329 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
27330 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
27331 ac_status=$?
27332 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27333 test $ac_status = 0; }
27334  
27335 fi
27336  
27337 if test "$CC" = "$CC_FOR_BUILD"; then
27338 #
27339 # We're building the build tools with the same compiler
27340 # with which we're building Wireshark, so add the flags
27341 # to the flags for that compiler as well.
27342 #
27343  
27344 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
27345  
27346 case " $WS_CFLAGS_FOR_BUILD " in #(
27347 *" $GCC_OPTION "*) :
27348 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
27349 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
27350 ac_status=$?
27351 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27352 test $ac_status = 0; } ;; #(
27353 *) :
27354  
27355 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
27356 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
27357 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
27358 ac_status=$?
27359 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27360 test $ac_status = 0; }
27361 ;;
27362 esac
27363  
27364 else
27365  
27366 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
27367 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
27368 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
27369 ac_status=$?
27370 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27371 test $ac_status = 0; }
27372  
27373 fi
27374  
27375 fi
27376  
27377 else
27378  
27379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27380 $as_echo "yes" >&6; }
27381  
27382 fi
27383 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27384 else
27385 #
27386 # Remove "force an error for a warning" options, if we
27387 # added them, by setting CFLAGS to the saved value plus
27388 # just the new option.
27389 #
27390  
27391 if ${WS_CFLAGS+:} false; then :
27392  
27393 case " $WS_CFLAGS " in #(
27394 *" $GCC_OPTION "*) :
27395 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
27396 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
27397 ac_status=$?
27398 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27399 test $ac_status = 0; } ;; #(
27400 *) :
27401  
27402 as_fn_append WS_CFLAGS " $GCC_OPTION"
27403 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
27404 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
27405 ac_status=$?
27406 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27407 test $ac_status = 0; }
27408 ;;
27409 esac
27410  
27411 else
27412  
27413 WS_CFLAGS=$GCC_OPTION
27414 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
27415 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
27416 ac_status=$?
27417 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27418 test $ac_status = 0; }
27419  
27420 fi
27421  
27422 if test "$CC" = "$CC_FOR_BUILD"; then
27423 #
27424 # We're building the build tools with the same compiler
27425 # with which we're building Wireshark, so add the flags
27426 # to the flags for that compiler as well.
27427 #
27428  
27429 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
27430  
27431 case " $WS_CFLAGS_FOR_BUILD " in #(
27432 *" $GCC_OPTION "*) :
27433 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
27434 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
27435 ac_status=$?
27436 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27437 test $ac_status = 0; } ;; #(
27438 *) :
27439  
27440 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
27441 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
27442 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
27443 ac_status=$?
27444 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27445 test $ac_status = 0; }
27446 ;;
27447 esac
27448  
27449 else
27450  
27451 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
27452 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
27453 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
27454 ac_status=$?
27455 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27456 test $ac_status = 0; }
27457  
27458 fi
27459  
27460 fi
27461 fi
27462  
27463 else
27464  
27465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27466 $as_echo "no" >&6; }
27467 can_add_to_cflags=no
27468  
27469 fi
27470 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27471  
27472 CPPFLAGS="$ac_ws_CPPLAGS_saved"
27473 CFLAGS="$ac_ws_CFLAGS_saved"
27474 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
27475 LDFLAGS="$ac_ws_LDFLAGS_saved"
27476  
27477 fi
27478 #
27479 # Did we find a C++ compiler?
27480 #
27481 if test "x$CXX" != "x" ; then
27482 #
27483 # Yes. Is this option only for the C compiler?
27484 #
27485 if test "" != C ; then
27486 #
27487 # Not C-only; if this option can be added to the C++ compiler
27488 # options, add it.
27489 #
27490 # If the option begins with "-W", add
27491 # $ac_wireshark_unknown_warning_option_error, as per the above, and
27492 # also add $ac_wireshark_non_cxx_warning_option_error, because at
27493 # lease some versions of g++ whine about -Wmissing-prototypes, the
27494 # fact that at least one of those versions refuses to warn about
27495 # function declarations without an earlier declaration nonwithstanding;
27496 # perhaps there's a reason not to warn about that with C++ even though
27497 # warning about it can be a Good Idea with C, but it's not obvious to
27498 # me).
27499 #
27500 # If the option begins with "-f" or "-m", add -Werror to make sure
27501 # that we'll get an error if we get "argument unused during compilation"
27502 # warnings, as those will either cause a failure for files compiled
27503 # with -Werror or annoying noise for files compiled without it.
27504 # (Yeah, you, clang++.)
27505 #
27506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
27507 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
27508  
27509 ac_ws_CPPLAGS_saved="$CPPFLAGS"
27510 ac_ws_CFLAGS_saved="$CFLAGS"
27511 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
27512 ac_ws_LDFLAGS_saved="$LDFLAGS"
27513 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
27514 CFLAGS="$WS_CFLAGS $CFLAGS"
27515 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
27516 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
27517  
27518 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
27519 then
27520 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
27521 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
27522 then
27523 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
27524 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
27525 then
27526 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
27527 else
27528 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
27529 fi
27530 ac_ext=cpp
27531 ac_cpp='$CXXCPP $CPPFLAGS'
27532 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27533 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27534 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27535  
27536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27537 /* end confdefs.h. */
27538  
27539 int foo;
27540  
27541 _ACEOF
27542 if ac_fn_cxx_try_compile "$LINENO"; then :
27543  
27544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27545 $as_echo "yes" >&6; }
27546 can_add_to_cxxflags=yes
27547 #
27548 # OK, do we have a test program? If so, check
27549 # whether it fails with this option and -Werror,
27550 # and, if so, don't include it.
27551 #
27552 # We test arg 4 here because arg 3 is a program which
27553 # could contain quotes (breaking the comparison).
27554 #
27555 if test "x" != "x" ; then
27556 CXXFLAGS="$CXXFLAGS -Werror"
27557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
27558 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
27559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27560 /* end confdefs.h. */
27561  
27562 _ACEOF
27563 if ac_fn_cxx_try_compile "$LINENO"; then :
27564  
27565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27566 $as_echo "no" >&6; }
27567 #
27568 # Remove "force an error for a warning" options, if we
27569 # added them, by setting CXXFLAGS to the saved value plus
27570 # just the new option.
27571 #
27572  
27573 if ${WS_CXXFLAGS+:} false; then :
27574  
27575 case " $WS_CXXFLAGS " in #(
27576 *" $GCC_OPTION "*) :
27577 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
27578 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
27579 ac_status=$?
27580 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27581 test $ac_status = 0; } ;; #(
27582 *) :
27583  
27584 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
27585 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
27586 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
27587 ac_status=$?
27588 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27589 test $ac_status = 0; }
27590 ;;
27591 esac
27592  
27593 else
27594  
27595 WS_CXXFLAGS=$GCC_OPTION
27596 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
27597 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
27598 ac_status=$?
27599 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27600 test $ac_status = 0; }
27601  
27602 fi
27603  
27604  
27605 else
27606  
27607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27608 $as_echo "yes" >&6; }
27609  
27610 fi
27611 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27612 else
27613 #
27614 # Remove "force an error for a warning" options, if we
27615 # added them, by setting CXXFLAGS to the saved value plus
27616 # just the new option.
27617 #
27618  
27619 if ${WS_CXXFLAGS+:} false; then :
27620  
27621 case " $WS_CXXFLAGS " in #(
27622 *" $GCC_OPTION "*) :
27623 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
27624 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
27625 ac_status=$?
27626 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27627 test $ac_status = 0; } ;; #(
27628 *) :
27629  
27630 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
27631 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
27632 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
27633 ac_status=$?
27634 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27635 test $ac_status = 0; }
27636 ;;
27637 esac
27638  
27639 else
27640  
27641 WS_CXXFLAGS=$GCC_OPTION
27642 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
27643 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
27644 ac_status=$?
27645 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27646 test $ac_status = 0; }
27647  
27648 fi
27649  
27650 fi
27651  
27652 else
27653  
27654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27655 $as_echo "no" >&6; }
27656 can_add_to_cxxflags=no
27657  
27658 fi
27659 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27660  
27661 CPPFLAGS="$ac_ws_CPPLAGS_saved"
27662 CFLAGS="$ac_ws_CFLAGS_saved"
27663 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
27664 LDFLAGS="$ac_ws_LDFLAGS_saved"
27665  
27666 ac_ext=c
27667 ac_cpp='$CPP $CPPFLAGS'
27668 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
27669 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
27670 ac_compiler_gnu=$ac_cv_c_compiler_gnu
27671  
27672 fi
27673 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
27674 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
27675 then
27676 #
27677 # Confusingly, some C++ compilers like -Wmissing-prototypes but
27678 # don't like -Wmissing-declarations and others like
27679 # -Wmissing-declarations but don't like -Wmissing-prototypes,
27680 # the fact that the corresponding C compiler likes both. Don't
27681 # warn about them.
27682 #
27683 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
27684 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
27685 then
27686 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
27687 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
27688 fi
27689 fi
27690 fi
27691 fi
27692  
27693 GCC_OPTION="-Wignored-qualifiers"
27694 can_add_to_cflags=""
27695 can_add_to_cxxflags=""
27696 if test "x$ac_supports_gcc_flags" = "xyes" ; then
27697 if test "" != CXX ; then
27698 #
27699 # Not C++-only; if this can be added to the C compiler flags, add them.
27700 #
27701 # If the option begins with "-W", add
27702 # $ac_wireshark_unknown_warning_option_error to make sure that
27703 # we'll get an error if it's an unknown warning option; not all
27704 # compilers treat unknown warning options as errors (I'm looking at
27705 # you, clang).
27706 #
27707 # If the option begins with "-f" or "-m", add -Werror to make sure
27708 # that we'll get an error if we get "argument unused during compilation"
27709 # warnings, as those will either cause a failure for files compiled
27710 # with -Werror or annoying noise for files compiled without it.
27711 # (Yeah, you, clang.)
27712 #
27713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
27714 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
27715  
27716 ac_ws_CPPLAGS_saved="$CPPFLAGS"
27717 ac_ws_CFLAGS_saved="$CFLAGS"
27718 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
27719 ac_ws_LDFLAGS_saved="$LDFLAGS"
27720 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
27721 CFLAGS="$WS_CFLAGS $CFLAGS"
27722 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
27723 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
27724  
27725 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
27726 then
27727 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
27728 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
27729 then
27730 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
27731 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
27732 then
27733 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
27734 else
27735 CFLAGS="$CFLAGS $GCC_OPTION"
27736 fi
27737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27738 /* end confdefs.h. */
27739  
27740 int foo;
27741  
27742 _ACEOF
27743 if ac_fn_c_try_compile "$LINENO"; then :
27744  
27745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27746 $as_echo "yes" >&6; }
27747 can_add_to_cflags=yes
27748 #
27749 # OK, do we have a test program? If so, check
27750 # whether it fails with this option and -Werror,
27751 # and, if so, don't include it.
27752 #
27753 # We test arg 4 here because arg 3 is a program which
27754 # could contain quotes (breaking the comparison).
27755 #
27756 if test "x" != "x" ; then
27757 CFLAGS="$CFLAGS -Werror"
27758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
27759 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
27760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27761 /* end confdefs.h. */
27762  
27763 _ACEOF
27764 if ac_fn_c_try_compile "$LINENO"; then :
27765  
27766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27767 $as_echo "no" >&6; }
27768 #
27769 # Remove "force an error for a warning" options, if we
27770 # added them, by setting CFLAGS to the saved value plus
27771 # just the new option.
27772 #
27773  
27774 if ${WS_CFLAGS+:} false; then :
27775  
27776 case " $WS_CFLAGS " in #(
27777 *" $GCC_OPTION "*) :
27778 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
27779 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
27780 ac_status=$?
27781 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27782 test $ac_status = 0; } ;; #(
27783 *) :
27784  
27785 as_fn_append WS_CFLAGS " $GCC_OPTION"
27786 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
27787 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
27788 ac_status=$?
27789 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27790 test $ac_status = 0; }
27791 ;;
27792 esac
27793  
27794 else
27795  
27796 WS_CFLAGS=$GCC_OPTION
27797 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
27798 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
27799 ac_status=$?
27800 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27801 test $ac_status = 0; }
27802  
27803 fi
27804  
27805 if test "$CC" = "$CC_FOR_BUILD"; then
27806 #
27807 # We're building the build tools with the same compiler
27808 # with which we're building Wireshark, so add the flags
27809 # to the flags for that compiler as well.
27810 #
27811  
27812 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
27813  
27814 case " $WS_CFLAGS_FOR_BUILD " in #(
27815 *" $GCC_OPTION "*) :
27816 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
27817 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
27818 ac_status=$?
27819 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27820 test $ac_status = 0; } ;; #(
27821 *) :
27822  
27823 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
27824 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
27825 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
27826 ac_status=$?
27827 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27828 test $ac_status = 0; }
27829 ;;
27830 esac
27831  
27832 else
27833  
27834 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
27835 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
27836 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
27837 ac_status=$?
27838 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27839 test $ac_status = 0; }
27840  
27841 fi
27842  
27843 fi
27844  
27845 else
27846  
27847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27848 $as_echo "yes" >&6; }
27849  
27850 fi
27851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27852 else
27853 #
27854 # Remove "force an error for a warning" options, if we
27855 # added them, by setting CFLAGS to the saved value plus
27856 # just the new option.
27857 #
27858  
27859 if ${WS_CFLAGS+:} false; then :
27860  
27861 case " $WS_CFLAGS " in #(
27862 *" $GCC_OPTION "*) :
27863 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
27864 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
27865 ac_status=$?
27866 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27867 test $ac_status = 0; } ;; #(
27868 *) :
27869  
27870 as_fn_append WS_CFLAGS " $GCC_OPTION"
27871 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
27872 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
27873 ac_status=$?
27874 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27875 test $ac_status = 0; }
27876 ;;
27877 esac
27878  
27879 else
27880  
27881 WS_CFLAGS=$GCC_OPTION
27882 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
27883 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
27884 ac_status=$?
27885 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27886 test $ac_status = 0; }
27887  
27888 fi
27889  
27890 if test "$CC" = "$CC_FOR_BUILD"; then
27891 #
27892 # We're building the build tools with the same compiler
27893 # with which we're building Wireshark, so add the flags
27894 # to the flags for that compiler as well.
27895 #
27896  
27897 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
27898  
27899 case " $WS_CFLAGS_FOR_BUILD " in #(
27900 *" $GCC_OPTION "*) :
27901 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
27902 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
27903 ac_status=$?
27904 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27905 test $ac_status = 0; } ;; #(
27906 *) :
27907  
27908 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
27909 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
27910 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
27911 ac_status=$?
27912 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27913 test $ac_status = 0; }
27914 ;;
27915 esac
27916  
27917 else
27918  
27919 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
27920 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
27921 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
27922 ac_status=$?
27923 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
27924 test $ac_status = 0; }
27925  
27926 fi
27927  
27928 fi
27929 fi
27930  
27931 else
27932  
27933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27934 $as_echo "no" >&6; }
27935 can_add_to_cflags=no
27936  
27937 fi
27938 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27939  
27940 CPPFLAGS="$ac_ws_CPPLAGS_saved"
27941 CFLAGS="$ac_ws_CFLAGS_saved"
27942 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
27943 LDFLAGS="$ac_ws_LDFLAGS_saved"
27944  
27945 fi
27946 #
27947 # Did we find a C++ compiler?
27948 #
27949 if test "x$CXX" != "x" ; then
27950 #
27951 # Yes. Is this option only for the C compiler?
27952 #
27953 if test "" != C ; then
27954 #
27955 # Not C-only; if this option can be added to the C++ compiler
27956 # options, add it.
27957 #
27958 # If the option begins with "-W", add
27959 # $ac_wireshark_unknown_warning_option_error, as per the above, and
27960 # also add $ac_wireshark_non_cxx_warning_option_error, because at
27961 # lease some versions of g++ whine about -Wmissing-prototypes, the
27962 # fact that at least one of those versions refuses to warn about
27963 # function declarations without an earlier declaration nonwithstanding;
27964 # perhaps there's a reason not to warn about that with C++ even though
27965 # warning about it can be a Good Idea with C, but it's not obvious to
27966 # me).
27967 #
27968 # If the option begins with "-f" or "-m", add -Werror to make sure
27969 # that we'll get an error if we get "argument unused during compilation"
27970 # warnings, as those will either cause a failure for files compiled
27971 # with -Werror or annoying noise for files compiled without it.
27972 # (Yeah, you, clang++.)
27973 #
27974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
27975 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
27976  
27977 ac_ws_CPPLAGS_saved="$CPPFLAGS"
27978 ac_ws_CFLAGS_saved="$CFLAGS"
27979 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
27980 ac_ws_LDFLAGS_saved="$LDFLAGS"
27981 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
27982 CFLAGS="$WS_CFLAGS $CFLAGS"
27983 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
27984 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
27985  
27986 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
27987 then
27988 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
27989 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
27990 then
27991 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
27992 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
27993 then
27994 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
27995 else
27996 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
27997 fi
27998 ac_ext=cpp
27999 ac_cpp='$CXXCPP $CPPFLAGS'
28000 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28001 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28002 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
28003  
28004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28005 /* end confdefs.h. */
28006  
28007 int foo;
28008  
28009 _ACEOF
28010 if ac_fn_cxx_try_compile "$LINENO"; then :
28011  
28012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28013 $as_echo "yes" >&6; }
28014 can_add_to_cxxflags=yes
28015 #
28016 # OK, do we have a test program? If so, check
28017 # whether it fails with this option and -Werror,
28018 # and, if so, don't include it.
28019 #
28020 # We test arg 4 here because arg 3 is a program which
28021 # could contain quotes (breaking the comparison).
28022 #
28023 if test "x" != "x" ; then
28024 CXXFLAGS="$CXXFLAGS -Werror"
28025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
28026 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
28027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28028 /* end confdefs.h. */
28029  
28030 _ACEOF
28031 if ac_fn_cxx_try_compile "$LINENO"; then :
28032  
28033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28034 $as_echo "no" >&6; }
28035 #
28036 # Remove "force an error for a warning" options, if we
28037 # added them, by setting CXXFLAGS to the saved value plus
28038 # just the new option.
28039 #
28040  
28041 if ${WS_CXXFLAGS+:} false; then :
28042  
28043 case " $WS_CXXFLAGS " in #(
28044 *" $GCC_OPTION "*) :
28045 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
28046 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
28047 ac_status=$?
28048 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28049 test $ac_status = 0; } ;; #(
28050 *) :
28051  
28052 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
28053 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
28054 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
28055 ac_status=$?
28056 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28057 test $ac_status = 0; }
28058 ;;
28059 esac
28060  
28061 else
28062  
28063 WS_CXXFLAGS=$GCC_OPTION
28064 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
28065 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
28066 ac_status=$?
28067 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28068 test $ac_status = 0; }
28069  
28070 fi
28071  
28072  
28073 else
28074  
28075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28076 $as_echo "yes" >&6; }
28077  
28078 fi
28079 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28080 else
28081 #
28082 # Remove "force an error for a warning" options, if we
28083 # added them, by setting CXXFLAGS to the saved value plus
28084 # just the new option.
28085 #
28086  
28087 if ${WS_CXXFLAGS+:} false; then :
28088  
28089 case " $WS_CXXFLAGS " in #(
28090 *" $GCC_OPTION "*) :
28091 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
28092 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
28093 ac_status=$?
28094 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28095 test $ac_status = 0; } ;; #(
28096 *) :
28097  
28098 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
28099 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
28100 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
28101 ac_status=$?
28102 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28103 test $ac_status = 0; }
28104 ;;
28105 esac
28106  
28107 else
28108  
28109 WS_CXXFLAGS=$GCC_OPTION
28110 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
28111 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
28112 ac_status=$?
28113 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28114 test $ac_status = 0; }
28115  
28116 fi
28117  
28118 fi
28119  
28120 else
28121  
28122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28123 $as_echo "no" >&6; }
28124 can_add_to_cxxflags=no
28125  
28126 fi
28127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28128  
28129 CPPFLAGS="$ac_ws_CPPLAGS_saved"
28130 CFLAGS="$ac_ws_CFLAGS_saved"
28131 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
28132 LDFLAGS="$ac_ws_LDFLAGS_saved"
28133  
28134 ac_ext=c
28135 ac_cpp='$CPP $CPPFLAGS'
28136 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28137 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28138 ac_compiler_gnu=$ac_cv_c_compiler_gnu
28139  
28140 fi
28141 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
28142 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
28143 then
28144 #
28145 # Confusingly, some C++ compilers like -Wmissing-prototypes but
28146 # don't like -Wmissing-declarations and others like
28147 # -Wmissing-declarations but don't like -Wmissing-prototypes,
28148 # the fact that the corresponding C compiler likes both. Don't
28149 # warn about them.
28150 #
28151 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
28152 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
28153 then
28154 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
28155 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
28156 fi
28157 fi
28158 fi
28159 fi
28160  
28161 GCC_OPTION="-Wpragmas"
28162 can_add_to_cflags=""
28163 can_add_to_cxxflags=""
28164 if test "x$ac_supports_gcc_flags" = "xyes" ; then
28165 if test "" != CXX ; then
28166 #
28167 # Not C++-only; if this can be added to the C compiler flags, add them.
28168 #
28169 # If the option begins with "-W", add
28170 # $ac_wireshark_unknown_warning_option_error to make sure that
28171 # we'll get an error if it's an unknown warning option; not all
28172 # compilers treat unknown warning options as errors (I'm looking at
28173 # you, clang).
28174 #
28175 # If the option begins with "-f" or "-m", add -Werror to make sure
28176 # that we'll get an error if we get "argument unused during compilation"
28177 # warnings, as those will either cause a failure for files compiled
28178 # with -Werror or annoying noise for files compiled without it.
28179 # (Yeah, you, clang.)
28180 #
28181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
28182 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
28183  
28184 ac_ws_CPPLAGS_saved="$CPPFLAGS"
28185 ac_ws_CFLAGS_saved="$CFLAGS"
28186 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
28187 ac_ws_LDFLAGS_saved="$LDFLAGS"
28188 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
28189 CFLAGS="$WS_CFLAGS $CFLAGS"
28190 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
28191 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
28192  
28193 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
28194 then
28195 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
28196 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
28197 then
28198 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
28199 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
28200 then
28201 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
28202 else
28203 CFLAGS="$CFLAGS $GCC_OPTION"
28204 fi
28205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28206 /* end confdefs.h. */
28207  
28208 int foo;
28209  
28210 _ACEOF
28211 if ac_fn_c_try_compile "$LINENO"; then :
28212  
28213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28214 $as_echo "yes" >&6; }
28215 can_add_to_cflags=yes
28216 #
28217 # OK, do we have a test program? If so, check
28218 # whether it fails with this option and -Werror,
28219 # and, if so, don't include it.
28220 #
28221 # We test arg 4 here because arg 3 is a program which
28222 # could contain quotes (breaking the comparison).
28223 #
28224 if test "x" != "x" ; then
28225 CFLAGS="$CFLAGS -Werror"
28226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
28227 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
28228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28229 /* end confdefs.h. */
28230  
28231 _ACEOF
28232 if ac_fn_c_try_compile "$LINENO"; then :
28233  
28234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28235 $as_echo "no" >&6; }
28236 #
28237 # Remove "force an error for a warning" options, if we
28238 # added them, by setting CFLAGS to the saved value plus
28239 # just the new option.
28240 #
28241  
28242 if ${WS_CFLAGS+:} false; then :
28243  
28244 case " $WS_CFLAGS " in #(
28245 *" $GCC_OPTION "*) :
28246 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
28247 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
28248 ac_status=$?
28249 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28250 test $ac_status = 0; } ;; #(
28251 *) :
28252  
28253 as_fn_append WS_CFLAGS " $GCC_OPTION"
28254 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
28255 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
28256 ac_status=$?
28257 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28258 test $ac_status = 0; }
28259 ;;
28260 esac
28261  
28262 else
28263  
28264 WS_CFLAGS=$GCC_OPTION
28265 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
28266 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
28267 ac_status=$?
28268 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28269 test $ac_status = 0; }
28270  
28271 fi
28272  
28273 if test "$CC" = "$CC_FOR_BUILD"; then
28274 #
28275 # We're building the build tools with the same compiler
28276 # with which we're building Wireshark, so add the flags
28277 # to the flags for that compiler as well.
28278 #
28279  
28280 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
28281  
28282 case " $WS_CFLAGS_FOR_BUILD " in #(
28283 *" $GCC_OPTION "*) :
28284 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
28285 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
28286 ac_status=$?
28287 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28288 test $ac_status = 0; } ;; #(
28289 *) :
28290  
28291 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
28292 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
28293 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
28294 ac_status=$?
28295 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28296 test $ac_status = 0; }
28297 ;;
28298 esac
28299  
28300 else
28301  
28302 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
28303 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
28304 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
28305 ac_status=$?
28306 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28307 test $ac_status = 0; }
28308  
28309 fi
28310  
28311 fi
28312  
28313 else
28314  
28315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28316 $as_echo "yes" >&6; }
28317  
28318 fi
28319 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28320 else
28321 #
28322 # Remove "force an error for a warning" options, if we
28323 # added them, by setting CFLAGS to the saved value plus
28324 # just the new option.
28325 #
28326  
28327 if ${WS_CFLAGS+:} false; then :
28328  
28329 case " $WS_CFLAGS " in #(
28330 *" $GCC_OPTION "*) :
28331 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
28332 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
28333 ac_status=$?
28334 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28335 test $ac_status = 0; } ;; #(
28336 *) :
28337  
28338 as_fn_append WS_CFLAGS " $GCC_OPTION"
28339 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
28340 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
28341 ac_status=$?
28342 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28343 test $ac_status = 0; }
28344 ;;
28345 esac
28346  
28347 else
28348  
28349 WS_CFLAGS=$GCC_OPTION
28350 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
28351 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
28352 ac_status=$?
28353 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28354 test $ac_status = 0; }
28355  
28356 fi
28357  
28358 if test "$CC" = "$CC_FOR_BUILD"; then
28359 #
28360 # We're building the build tools with the same compiler
28361 # with which we're building Wireshark, so add the flags
28362 # to the flags for that compiler as well.
28363 #
28364  
28365 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
28366  
28367 case " $WS_CFLAGS_FOR_BUILD " in #(
28368 *" $GCC_OPTION "*) :
28369 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
28370 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
28371 ac_status=$?
28372 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28373 test $ac_status = 0; } ;; #(
28374 *) :
28375  
28376 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
28377 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
28378 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
28379 ac_status=$?
28380 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28381 test $ac_status = 0; }
28382 ;;
28383 esac
28384  
28385 else
28386  
28387 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
28388 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
28389 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
28390 ac_status=$?
28391 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28392 test $ac_status = 0; }
28393  
28394 fi
28395  
28396 fi
28397 fi
28398  
28399 else
28400  
28401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28402 $as_echo "no" >&6; }
28403 can_add_to_cflags=no
28404  
28405 fi
28406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28407  
28408 CPPFLAGS="$ac_ws_CPPLAGS_saved"
28409 CFLAGS="$ac_ws_CFLAGS_saved"
28410 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
28411 LDFLAGS="$ac_ws_LDFLAGS_saved"
28412  
28413 fi
28414 #
28415 # Did we find a C++ compiler?
28416 #
28417 if test "x$CXX" != "x" ; then
28418 #
28419 # Yes. Is this option only for the C compiler?
28420 #
28421 if test "" != C ; then
28422 #
28423 # Not C-only; if this option can be added to the C++ compiler
28424 # options, add it.
28425 #
28426 # If the option begins with "-W", add
28427 # $ac_wireshark_unknown_warning_option_error, as per the above, and
28428 # also add $ac_wireshark_non_cxx_warning_option_error, because at
28429 # lease some versions of g++ whine about -Wmissing-prototypes, the
28430 # fact that at least one of those versions refuses to warn about
28431 # function declarations without an earlier declaration nonwithstanding;
28432 # perhaps there's a reason not to warn about that with C++ even though
28433 # warning about it can be a Good Idea with C, but it's not obvious to
28434 # me).
28435 #
28436 # If the option begins with "-f" or "-m", add -Werror to make sure
28437 # that we'll get an error if we get "argument unused during compilation"
28438 # warnings, as those will either cause a failure for files compiled
28439 # with -Werror or annoying noise for files compiled without it.
28440 # (Yeah, you, clang++.)
28441 #
28442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
28443 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
28444  
28445 ac_ws_CPPLAGS_saved="$CPPFLAGS"
28446 ac_ws_CFLAGS_saved="$CFLAGS"
28447 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
28448 ac_ws_LDFLAGS_saved="$LDFLAGS"
28449 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
28450 CFLAGS="$WS_CFLAGS $CFLAGS"
28451 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
28452 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
28453  
28454 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
28455 then
28456 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
28457 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
28458 then
28459 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
28460 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
28461 then
28462 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
28463 else
28464 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
28465 fi
28466 ac_ext=cpp
28467 ac_cpp='$CXXCPP $CPPFLAGS'
28468 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28469 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28470 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
28471  
28472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28473 /* end confdefs.h. */
28474  
28475 int foo;
28476  
28477 _ACEOF
28478 if ac_fn_cxx_try_compile "$LINENO"; then :
28479  
28480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28481 $as_echo "yes" >&6; }
28482 can_add_to_cxxflags=yes
28483 #
28484 # OK, do we have a test program? If so, check
28485 # whether it fails with this option and -Werror,
28486 # and, if so, don't include it.
28487 #
28488 # We test arg 4 here because arg 3 is a program which
28489 # could contain quotes (breaking the comparison).
28490 #
28491 if test "x" != "x" ; then
28492 CXXFLAGS="$CXXFLAGS -Werror"
28493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
28494 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
28495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28496 /* end confdefs.h. */
28497  
28498 _ACEOF
28499 if ac_fn_cxx_try_compile "$LINENO"; then :
28500  
28501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28502 $as_echo "no" >&6; }
28503 #
28504 # Remove "force an error for a warning" options, if we
28505 # added them, by setting CXXFLAGS to the saved value plus
28506 # just the new option.
28507 #
28508  
28509 if ${WS_CXXFLAGS+:} false; then :
28510  
28511 case " $WS_CXXFLAGS " in #(
28512 *" $GCC_OPTION "*) :
28513 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
28514 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
28515 ac_status=$?
28516 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28517 test $ac_status = 0; } ;; #(
28518 *) :
28519  
28520 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
28521 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
28522 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
28523 ac_status=$?
28524 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28525 test $ac_status = 0; }
28526 ;;
28527 esac
28528  
28529 else
28530  
28531 WS_CXXFLAGS=$GCC_OPTION
28532 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
28533 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
28534 ac_status=$?
28535 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28536 test $ac_status = 0; }
28537  
28538 fi
28539  
28540  
28541 else
28542  
28543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28544 $as_echo "yes" >&6; }
28545  
28546 fi
28547 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28548 else
28549 #
28550 # Remove "force an error for a warning" options, if we
28551 # added them, by setting CXXFLAGS to the saved value plus
28552 # just the new option.
28553 #
28554  
28555 if ${WS_CXXFLAGS+:} false; then :
28556  
28557 case " $WS_CXXFLAGS " in #(
28558 *" $GCC_OPTION "*) :
28559 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
28560 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
28561 ac_status=$?
28562 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28563 test $ac_status = 0; } ;; #(
28564 *) :
28565  
28566 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
28567 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
28568 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
28569 ac_status=$?
28570 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28571 test $ac_status = 0; }
28572 ;;
28573 esac
28574  
28575 else
28576  
28577 WS_CXXFLAGS=$GCC_OPTION
28578 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
28579 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
28580 ac_status=$?
28581 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28582 test $ac_status = 0; }
28583  
28584 fi
28585  
28586 fi
28587  
28588 else
28589  
28590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28591 $as_echo "no" >&6; }
28592 can_add_to_cxxflags=no
28593  
28594 fi
28595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28596  
28597 CPPFLAGS="$ac_ws_CPPLAGS_saved"
28598 CFLAGS="$ac_ws_CFLAGS_saved"
28599 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
28600 LDFLAGS="$ac_ws_LDFLAGS_saved"
28601  
28602 ac_ext=c
28603 ac_cpp='$CPP $CPPFLAGS'
28604 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28605 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28606 ac_compiler_gnu=$ac_cv_c_compiler_gnu
28607  
28608 fi
28609 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
28610 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
28611 then
28612 #
28613 # Confusingly, some C++ compilers like -Wmissing-prototypes but
28614 # don't like -Wmissing-declarations and others like
28615 # -Wmissing-declarations but don't like -Wmissing-prototypes,
28616 # the fact that the corresponding C compiler likes both. Don't
28617 # warn about them.
28618 #
28619 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
28620 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
28621 then
28622 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
28623 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
28624 fi
28625 fi
28626 fi
28627 fi
28628  
28629 GCC_OPTION="-Wno-overlength-strings"
28630 can_add_to_cflags=""
28631 can_add_to_cxxflags=""
28632 if test "x$ac_supports_gcc_flags" = "xyes" ; then
28633 if test "" != CXX ; then
28634 #
28635 # Not C++-only; if this can be added to the C compiler flags, add them.
28636 #
28637 # If the option begins with "-W", add
28638 # $ac_wireshark_unknown_warning_option_error to make sure that
28639 # we'll get an error if it's an unknown warning option; not all
28640 # compilers treat unknown warning options as errors (I'm looking at
28641 # you, clang).
28642 #
28643 # If the option begins with "-f" or "-m", add -Werror to make sure
28644 # that we'll get an error if we get "argument unused during compilation"
28645 # warnings, as those will either cause a failure for files compiled
28646 # with -Werror or annoying noise for files compiled without it.
28647 # (Yeah, you, clang.)
28648 #
28649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
28650 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
28651  
28652 ac_ws_CPPLAGS_saved="$CPPFLAGS"
28653 ac_ws_CFLAGS_saved="$CFLAGS"
28654 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
28655 ac_ws_LDFLAGS_saved="$LDFLAGS"
28656 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
28657 CFLAGS="$WS_CFLAGS $CFLAGS"
28658 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
28659 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
28660  
28661 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
28662 then
28663 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
28664 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
28665 then
28666 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
28667 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
28668 then
28669 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
28670 else
28671 CFLAGS="$CFLAGS $GCC_OPTION"
28672 fi
28673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28674 /* end confdefs.h. */
28675  
28676 int foo;
28677  
28678 _ACEOF
28679 if ac_fn_c_try_compile "$LINENO"; then :
28680  
28681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28682 $as_echo "yes" >&6; }
28683 can_add_to_cflags=yes
28684 #
28685 # OK, do we have a test program? If so, check
28686 # whether it fails with this option and -Werror,
28687 # and, if so, don't include it.
28688 #
28689 # We test arg 4 here because arg 3 is a program which
28690 # could contain quotes (breaking the comparison).
28691 #
28692 if test "x" != "x" ; then
28693 CFLAGS="$CFLAGS -Werror"
28694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
28695 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
28696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28697 /* end confdefs.h. */
28698  
28699 _ACEOF
28700 if ac_fn_c_try_compile "$LINENO"; then :
28701  
28702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28703 $as_echo "no" >&6; }
28704 #
28705 # Remove "force an error for a warning" options, if we
28706 # added them, by setting CFLAGS to the saved value plus
28707 # just the new option.
28708 #
28709  
28710 if ${WS_CFLAGS+:} false; then :
28711  
28712 case " $WS_CFLAGS " in #(
28713 *" $GCC_OPTION "*) :
28714 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
28715 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
28716 ac_status=$?
28717 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28718 test $ac_status = 0; } ;; #(
28719 *) :
28720  
28721 as_fn_append WS_CFLAGS " $GCC_OPTION"
28722 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
28723 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
28724 ac_status=$?
28725 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28726 test $ac_status = 0; }
28727 ;;
28728 esac
28729  
28730 else
28731  
28732 WS_CFLAGS=$GCC_OPTION
28733 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
28734 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
28735 ac_status=$?
28736 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28737 test $ac_status = 0; }
28738  
28739 fi
28740  
28741 if test "$CC" = "$CC_FOR_BUILD"; then
28742 #
28743 # We're building the build tools with the same compiler
28744 # with which we're building Wireshark, so add the flags
28745 # to the flags for that compiler as well.
28746 #
28747  
28748 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
28749  
28750 case " $WS_CFLAGS_FOR_BUILD " in #(
28751 *" $GCC_OPTION "*) :
28752 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
28753 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
28754 ac_status=$?
28755 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28756 test $ac_status = 0; } ;; #(
28757 *) :
28758  
28759 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
28760 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
28761 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
28762 ac_status=$?
28763 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28764 test $ac_status = 0; }
28765 ;;
28766 esac
28767  
28768 else
28769  
28770 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
28771 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
28772 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
28773 ac_status=$?
28774 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28775 test $ac_status = 0; }
28776  
28777 fi
28778  
28779 fi
28780  
28781 else
28782  
28783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28784 $as_echo "yes" >&6; }
28785  
28786 fi
28787 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28788 else
28789 #
28790 # Remove "force an error for a warning" options, if we
28791 # added them, by setting CFLAGS to the saved value plus
28792 # just the new option.
28793 #
28794  
28795 if ${WS_CFLAGS+:} false; then :
28796  
28797 case " $WS_CFLAGS " in #(
28798 *" $GCC_OPTION "*) :
28799 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
28800 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
28801 ac_status=$?
28802 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28803 test $ac_status = 0; } ;; #(
28804 *) :
28805  
28806 as_fn_append WS_CFLAGS " $GCC_OPTION"
28807 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
28808 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
28809 ac_status=$?
28810 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28811 test $ac_status = 0; }
28812 ;;
28813 esac
28814  
28815 else
28816  
28817 WS_CFLAGS=$GCC_OPTION
28818 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
28819 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
28820 ac_status=$?
28821 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28822 test $ac_status = 0; }
28823  
28824 fi
28825  
28826 if test "$CC" = "$CC_FOR_BUILD"; then
28827 #
28828 # We're building the build tools with the same compiler
28829 # with which we're building Wireshark, so add the flags
28830 # to the flags for that compiler as well.
28831 #
28832  
28833 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
28834  
28835 case " $WS_CFLAGS_FOR_BUILD " in #(
28836 *" $GCC_OPTION "*) :
28837 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
28838 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
28839 ac_status=$?
28840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28841 test $ac_status = 0; } ;; #(
28842 *) :
28843  
28844 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
28845 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
28846 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
28847 ac_status=$?
28848 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28849 test $ac_status = 0; }
28850 ;;
28851 esac
28852  
28853 else
28854  
28855 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
28856 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
28857 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
28858 ac_status=$?
28859 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28860 test $ac_status = 0; }
28861  
28862 fi
28863  
28864 fi
28865 fi
28866  
28867 else
28868  
28869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28870 $as_echo "no" >&6; }
28871 can_add_to_cflags=no
28872  
28873 fi
28874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28875  
28876 CPPFLAGS="$ac_ws_CPPLAGS_saved"
28877 CFLAGS="$ac_ws_CFLAGS_saved"
28878 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
28879 LDFLAGS="$ac_ws_LDFLAGS_saved"
28880  
28881 fi
28882 #
28883 # Did we find a C++ compiler?
28884 #
28885 if test "x$CXX" != "x" ; then
28886 #
28887 # Yes. Is this option only for the C compiler?
28888 #
28889 if test "" != C ; then
28890 #
28891 # Not C-only; if this option can be added to the C++ compiler
28892 # options, add it.
28893 #
28894 # If the option begins with "-W", add
28895 # $ac_wireshark_unknown_warning_option_error, as per the above, and
28896 # also add $ac_wireshark_non_cxx_warning_option_error, because at
28897 # lease some versions of g++ whine about -Wmissing-prototypes, the
28898 # fact that at least one of those versions refuses to warn about
28899 # function declarations without an earlier declaration nonwithstanding;
28900 # perhaps there's a reason not to warn about that with C++ even though
28901 # warning about it can be a Good Idea with C, but it's not obvious to
28902 # me).
28903 #
28904 # If the option begins with "-f" or "-m", add -Werror to make sure
28905 # that we'll get an error if we get "argument unused during compilation"
28906 # warnings, as those will either cause a failure for files compiled
28907 # with -Werror or annoying noise for files compiled without it.
28908 # (Yeah, you, clang++.)
28909 #
28910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
28911 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
28912  
28913 ac_ws_CPPLAGS_saved="$CPPFLAGS"
28914 ac_ws_CFLAGS_saved="$CFLAGS"
28915 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
28916 ac_ws_LDFLAGS_saved="$LDFLAGS"
28917 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
28918 CFLAGS="$WS_CFLAGS $CFLAGS"
28919 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
28920 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
28921  
28922 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
28923 then
28924 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
28925 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
28926 then
28927 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
28928 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
28929 then
28930 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
28931 else
28932 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
28933 fi
28934 ac_ext=cpp
28935 ac_cpp='$CXXCPP $CPPFLAGS'
28936 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28937 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28938 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
28939  
28940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28941 /* end confdefs.h. */
28942  
28943 int foo;
28944  
28945 _ACEOF
28946 if ac_fn_cxx_try_compile "$LINENO"; then :
28947  
28948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28949 $as_echo "yes" >&6; }
28950 can_add_to_cxxflags=yes
28951 #
28952 # OK, do we have a test program? If so, check
28953 # whether it fails with this option and -Werror,
28954 # and, if so, don't include it.
28955 #
28956 # We test arg 4 here because arg 3 is a program which
28957 # could contain quotes (breaking the comparison).
28958 #
28959 if test "x" != "x" ; then
28960 CXXFLAGS="$CXXFLAGS -Werror"
28961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
28962 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
28963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28964 /* end confdefs.h. */
28965  
28966 _ACEOF
28967 if ac_fn_cxx_try_compile "$LINENO"; then :
28968  
28969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28970 $as_echo "no" >&6; }
28971 #
28972 # Remove "force an error for a warning" options, if we
28973 # added them, by setting CXXFLAGS to the saved value plus
28974 # just the new option.
28975 #
28976  
28977 if ${WS_CXXFLAGS+:} false; then :
28978  
28979 case " $WS_CXXFLAGS " in #(
28980 *" $GCC_OPTION "*) :
28981 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
28982 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
28983 ac_status=$?
28984 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28985 test $ac_status = 0; } ;; #(
28986 *) :
28987  
28988 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
28989 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
28990 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
28991 ac_status=$?
28992 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28993 test $ac_status = 0; }
28994 ;;
28995 esac
28996  
28997 else
28998  
28999 WS_CXXFLAGS=$GCC_OPTION
29000 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
29001 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
29002 ac_status=$?
29003 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29004 test $ac_status = 0; }
29005  
29006 fi
29007  
29008  
29009 else
29010  
29011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29012 $as_echo "yes" >&6; }
29013  
29014 fi
29015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29016 else
29017 #
29018 # Remove "force an error for a warning" options, if we
29019 # added them, by setting CXXFLAGS to the saved value plus
29020 # just the new option.
29021 #
29022  
29023 if ${WS_CXXFLAGS+:} false; then :
29024  
29025 case " $WS_CXXFLAGS " in #(
29026 *" $GCC_OPTION "*) :
29027 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
29028 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
29029 ac_status=$?
29030 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29031 test $ac_status = 0; } ;; #(
29032 *) :
29033  
29034 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
29035 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
29036 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
29037 ac_status=$?
29038 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29039 test $ac_status = 0; }
29040 ;;
29041 esac
29042  
29043 else
29044  
29045 WS_CXXFLAGS=$GCC_OPTION
29046 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
29047 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
29048 ac_status=$?
29049 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29050 test $ac_status = 0; }
29051  
29052 fi
29053  
29054 fi
29055  
29056 else
29057  
29058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29059 $as_echo "no" >&6; }
29060 can_add_to_cxxflags=no
29061  
29062 fi
29063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29064  
29065 CPPFLAGS="$ac_ws_CPPLAGS_saved"
29066 CFLAGS="$ac_ws_CFLAGS_saved"
29067 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
29068 LDFLAGS="$ac_ws_LDFLAGS_saved"
29069  
29070 ac_ext=c
29071 ac_cpp='$CPP $CPPFLAGS'
29072 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29073 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29074 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29075  
29076 fi
29077 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
29078 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
29079 then
29080 #
29081 # Confusingly, some C++ compilers like -Wmissing-prototypes but
29082 # don't like -Wmissing-declarations and others like
29083 # -Wmissing-declarations but don't like -Wmissing-prototypes,
29084 # the fact that the corresponding C compiler likes both. Don't
29085 # warn about them.
29086 #
29087 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
29088 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
29089 then
29090 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
29091 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
29092 fi
29093 fi
29094 fi
29095 fi
29096  
29097 GCC_OPTION="-Wno-long-long"
29098 can_add_to_cflags=""
29099 can_add_to_cxxflags=""
29100 if test "x$ac_supports_gcc_flags" = "xyes" ; then
29101 if test "" != CXX ; then
29102 #
29103 # Not C++-only; if this can be added to the C compiler flags, add them.
29104 #
29105 # If the option begins with "-W", add
29106 # $ac_wireshark_unknown_warning_option_error to make sure that
29107 # we'll get an error if it's an unknown warning option; not all
29108 # compilers treat unknown warning options as errors (I'm looking at
29109 # you, clang).
29110 #
29111 # If the option begins with "-f" or "-m", add -Werror to make sure
29112 # that we'll get an error if we get "argument unused during compilation"
29113 # warnings, as those will either cause a failure for files compiled
29114 # with -Werror or annoying noise for files compiled without it.
29115 # (Yeah, you, clang.)
29116 #
29117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
29118 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
29119  
29120 ac_ws_CPPLAGS_saved="$CPPFLAGS"
29121 ac_ws_CFLAGS_saved="$CFLAGS"
29122 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
29123 ac_ws_LDFLAGS_saved="$LDFLAGS"
29124 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
29125 CFLAGS="$WS_CFLAGS $CFLAGS"
29126 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
29127 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
29128  
29129 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
29130 then
29131 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
29132 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
29133 then
29134 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
29135 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
29136 then
29137 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
29138 else
29139 CFLAGS="$CFLAGS $GCC_OPTION"
29140 fi
29141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29142 /* end confdefs.h. */
29143  
29144 int foo;
29145  
29146 _ACEOF
29147 if ac_fn_c_try_compile "$LINENO"; then :
29148  
29149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29150 $as_echo "yes" >&6; }
29151 can_add_to_cflags=yes
29152 #
29153 # OK, do we have a test program? If so, check
29154 # whether it fails with this option and -Werror,
29155 # and, if so, don't include it.
29156 #
29157 # We test arg 4 here because arg 3 is a program which
29158 # could contain quotes (breaking the comparison).
29159 #
29160 if test "x" != "x" ; then
29161 CFLAGS="$CFLAGS -Werror"
29162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
29163 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
29164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29165 /* end confdefs.h. */
29166  
29167 _ACEOF
29168 if ac_fn_c_try_compile "$LINENO"; then :
29169  
29170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29171 $as_echo "no" >&6; }
29172 #
29173 # Remove "force an error for a warning" options, if we
29174 # added them, by setting CFLAGS to the saved value plus
29175 # just the new option.
29176 #
29177  
29178 if ${WS_CFLAGS+:} false; then :
29179  
29180 case " $WS_CFLAGS " in #(
29181 *" $GCC_OPTION "*) :
29182 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
29183 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
29184 ac_status=$?
29185 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29186 test $ac_status = 0; } ;; #(
29187 *) :
29188  
29189 as_fn_append WS_CFLAGS " $GCC_OPTION"
29190 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
29191 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
29192 ac_status=$?
29193 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29194 test $ac_status = 0; }
29195 ;;
29196 esac
29197  
29198 else
29199  
29200 WS_CFLAGS=$GCC_OPTION
29201 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
29202 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
29203 ac_status=$?
29204 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29205 test $ac_status = 0; }
29206  
29207 fi
29208  
29209 if test "$CC" = "$CC_FOR_BUILD"; then
29210 #
29211 # We're building the build tools with the same compiler
29212 # with which we're building Wireshark, so add the flags
29213 # to the flags for that compiler as well.
29214 #
29215  
29216 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
29217  
29218 case " $WS_CFLAGS_FOR_BUILD " in #(
29219 *" $GCC_OPTION "*) :
29220 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
29221 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
29222 ac_status=$?
29223 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29224 test $ac_status = 0; } ;; #(
29225 *) :
29226  
29227 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
29228 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
29229 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
29230 ac_status=$?
29231 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29232 test $ac_status = 0; }
29233 ;;
29234 esac
29235  
29236 else
29237  
29238 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
29239 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
29240 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
29241 ac_status=$?
29242 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29243 test $ac_status = 0; }
29244  
29245 fi
29246  
29247 fi
29248  
29249 else
29250  
29251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29252 $as_echo "yes" >&6; }
29253  
29254 fi
29255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29256 else
29257 #
29258 # Remove "force an error for a warning" options, if we
29259 # added them, by setting CFLAGS to the saved value plus
29260 # just the new option.
29261 #
29262  
29263 if ${WS_CFLAGS+:} false; then :
29264  
29265 case " $WS_CFLAGS " in #(
29266 *" $GCC_OPTION "*) :
29267 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
29268 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
29269 ac_status=$?
29270 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29271 test $ac_status = 0; } ;; #(
29272 *) :
29273  
29274 as_fn_append WS_CFLAGS " $GCC_OPTION"
29275 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
29276 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
29277 ac_status=$?
29278 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29279 test $ac_status = 0; }
29280 ;;
29281 esac
29282  
29283 else
29284  
29285 WS_CFLAGS=$GCC_OPTION
29286 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
29287 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
29288 ac_status=$?
29289 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29290 test $ac_status = 0; }
29291  
29292 fi
29293  
29294 if test "$CC" = "$CC_FOR_BUILD"; then
29295 #
29296 # We're building the build tools with the same compiler
29297 # with which we're building Wireshark, so add the flags
29298 # to the flags for that compiler as well.
29299 #
29300  
29301 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
29302  
29303 case " $WS_CFLAGS_FOR_BUILD " in #(
29304 *" $GCC_OPTION "*) :
29305 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
29306 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
29307 ac_status=$?
29308 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29309 test $ac_status = 0; } ;; #(
29310 *) :
29311  
29312 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
29313 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
29314 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
29315 ac_status=$?
29316 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29317 test $ac_status = 0; }
29318 ;;
29319 esac
29320  
29321 else
29322  
29323 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
29324 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
29325 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
29326 ac_status=$?
29327 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29328 test $ac_status = 0; }
29329  
29330 fi
29331  
29332 fi
29333 fi
29334  
29335 else
29336  
29337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29338 $as_echo "no" >&6; }
29339 can_add_to_cflags=no
29340  
29341 fi
29342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29343  
29344 CPPFLAGS="$ac_ws_CPPLAGS_saved"
29345 CFLAGS="$ac_ws_CFLAGS_saved"
29346 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
29347 LDFLAGS="$ac_ws_LDFLAGS_saved"
29348  
29349 fi
29350 #
29351 # Did we find a C++ compiler?
29352 #
29353 if test "x$CXX" != "x" ; then
29354 #
29355 # Yes. Is this option only for the C compiler?
29356 #
29357 if test "" != C ; then
29358 #
29359 # Not C-only; if this option can be added to the C++ compiler
29360 # options, add it.
29361 #
29362 # If the option begins with "-W", add
29363 # $ac_wireshark_unknown_warning_option_error, as per the above, and
29364 # also add $ac_wireshark_non_cxx_warning_option_error, because at
29365 # lease some versions of g++ whine about -Wmissing-prototypes, the
29366 # fact that at least one of those versions refuses to warn about
29367 # function declarations without an earlier declaration nonwithstanding;
29368 # perhaps there's a reason not to warn about that with C++ even though
29369 # warning about it can be a Good Idea with C, but it's not obvious to
29370 # me).
29371 #
29372 # If the option begins with "-f" or "-m", add -Werror to make sure
29373 # that we'll get an error if we get "argument unused during compilation"
29374 # warnings, as those will either cause a failure for files compiled
29375 # with -Werror or annoying noise for files compiled without it.
29376 # (Yeah, you, clang++.)
29377 #
29378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
29379 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
29380  
29381 ac_ws_CPPLAGS_saved="$CPPFLAGS"
29382 ac_ws_CFLAGS_saved="$CFLAGS"
29383 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
29384 ac_ws_LDFLAGS_saved="$LDFLAGS"
29385 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
29386 CFLAGS="$WS_CFLAGS $CFLAGS"
29387 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
29388 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
29389  
29390 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
29391 then
29392 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
29393 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
29394 then
29395 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
29396 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
29397 then
29398 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
29399 else
29400 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
29401 fi
29402 ac_ext=cpp
29403 ac_cpp='$CXXCPP $CPPFLAGS'
29404 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29405 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29406 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29407  
29408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29409 /* end confdefs.h. */
29410  
29411 int foo;
29412  
29413 _ACEOF
29414 if ac_fn_cxx_try_compile "$LINENO"; then :
29415  
29416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29417 $as_echo "yes" >&6; }
29418 can_add_to_cxxflags=yes
29419 #
29420 # OK, do we have a test program? If so, check
29421 # whether it fails with this option and -Werror,
29422 # and, if so, don't include it.
29423 #
29424 # We test arg 4 here because arg 3 is a program which
29425 # could contain quotes (breaking the comparison).
29426 #
29427 if test "x" != "x" ; then
29428 CXXFLAGS="$CXXFLAGS -Werror"
29429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
29430 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
29431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29432 /* end confdefs.h. */
29433  
29434 _ACEOF
29435 if ac_fn_cxx_try_compile "$LINENO"; then :
29436  
29437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29438 $as_echo "no" >&6; }
29439 #
29440 # Remove "force an error for a warning" options, if we
29441 # added them, by setting CXXFLAGS to the saved value plus
29442 # just the new option.
29443 #
29444  
29445 if ${WS_CXXFLAGS+:} false; then :
29446  
29447 case " $WS_CXXFLAGS " in #(
29448 *" $GCC_OPTION "*) :
29449 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
29450 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
29451 ac_status=$?
29452 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29453 test $ac_status = 0; } ;; #(
29454 *) :
29455  
29456 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
29457 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
29458 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
29459 ac_status=$?
29460 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29461 test $ac_status = 0; }
29462 ;;
29463 esac
29464  
29465 else
29466  
29467 WS_CXXFLAGS=$GCC_OPTION
29468 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
29469 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
29470 ac_status=$?
29471 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29472 test $ac_status = 0; }
29473  
29474 fi
29475  
29476  
29477 else
29478  
29479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29480 $as_echo "yes" >&6; }
29481  
29482 fi
29483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29484 else
29485 #
29486 # Remove "force an error for a warning" options, if we
29487 # added them, by setting CXXFLAGS to the saved value plus
29488 # just the new option.
29489 #
29490  
29491 if ${WS_CXXFLAGS+:} false; then :
29492  
29493 case " $WS_CXXFLAGS " in #(
29494 *" $GCC_OPTION "*) :
29495 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
29496 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
29497 ac_status=$?
29498 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29499 test $ac_status = 0; } ;; #(
29500 *) :
29501  
29502 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
29503 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
29504 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
29505 ac_status=$?
29506 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29507 test $ac_status = 0; }
29508 ;;
29509 esac
29510  
29511 else
29512  
29513 WS_CXXFLAGS=$GCC_OPTION
29514 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
29515 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
29516 ac_status=$?
29517 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29518 test $ac_status = 0; }
29519  
29520 fi
29521  
29522 fi
29523  
29524 else
29525  
29526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29527 $as_echo "no" >&6; }
29528 can_add_to_cxxflags=no
29529  
29530 fi
29531 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29532  
29533 CPPFLAGS="$ac_ws_CPPLAGS_saved"
29534 CFLAGS="$ac_ws_CFLAGS_saved"
29535 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
29536 LDFLAGS="$ac_ws_LDFLAGS_saved"
29537  
29538 ac_ext=c
29539 ac_cpp='$CPP $CPPFLAGS'
29540 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29541 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29542 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29543  
29544 fi
29545 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
29546 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
29547 then
29548 #
29549 # Confusingly, some C++ compilers like -Wmissing-prototypes but
29550 # don't like -Wmissing-declarations and others like
29551 # -Wmissing-declarations but don't like -Wmissing-prototypes,
29552 # the fact that the corresponding C compiler likes both. Don't
29553 # warn about them.
29554 #
29555 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
29556 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
29557 then
29558 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
29559 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
29560 fi
29561 fi
29562 fi
29563 fi
29564  
29565 GCC_OPTION="-Wheader-guard"
29566 can_add_to_cflags=""
29567 can_add_to_cxxflags=""
29568 if test "x$ac_supports_gcc_flags" = "xyes" ; then
29569 if test "" != CXX ; then
29570 #
29571 # Not C++-only; if this can be added to the C compiler flags, add them.
29572 #
29573 # If the option begins with "-W", add
29574 # $ac_wireshark_unknown_warning_option_error to make sure that
29575 # we'll get an error if it's an unknown warning option; not all
29576 # compilers treat unknown warning options as errors (I'm looking at
29577 # you, clang).
29578 #
29579 # If the option begins with "-f" or "-m", add -Werror to make sure
29580 # that we'll get an error if we get "argument unused during compilation"
29581 # warnings, as those will either cause a failure for files compiled
29582 # with -Werror or annoying noise for files compiled without it.
29583 # (Yeah, you, clang.)
29584 #
29585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
29586 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
29587  
29588 ac_ws_CPPLAGS_saved="$CPPFLAGS"
29589 ac_ws_CFLAGS_saved="$CFLAGS"
29590 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
29591 ac_ws_LDFLAGS_saved="$LDFLAGS"
29592 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
29593 CFLAGS="$WS_CFLAGS $CFLAGS"
29594 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
29595 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
29596  
29597 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
29598 then
29599 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
29600 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
29601 then
29602 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
29603 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
29604 then
29605 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
29606 else
29607 CFLAGS="$CFLAGS $GCC_OPTION"
29608 fi
29609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29610 /* end confdefs.h. */
29611  
29612 int foo;
29613  
29614 _ACEOF
29615 if ac_fn_c_try_compile "$LINENO"; then :
29616  
29617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29618 $as_echo "yes" >&6; }
29619 can_add_to_cflags=yes
29620 #
29621 # OK, do we have a test program? If so, check
29622 # whether it fails with this option and -Werror,
29623 # and, if so, don't include it.
29624 #
29625 # We test arg 4 here because arg 3 is a program which
29626 # could contain quotes (breaking the comparison).
29627 #
29628 if test "x" != "x" ; then
29629 CFLAGS="$CFLAGS -Werror"
29630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
29631 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
29632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29633 /* end confdefs.h. */
29634  
29635 _ACEOF
29636 if ac_fn_c_try_compile "$LINENO"; then :
29637  
29638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29639 $as_echo "no" >&6; }
29640 #
29641 # Remove "force an error for a warning" options, if we
29642 # added them, by setting CFLAGS to the saved value plus
29643 # just the new option.
29644 #
29645  
29646 if ${WS_CFLAGS+:} false; then :
29647  
29648 case " $WS_CFLAGS " in #(
29649 *" $GCC_OPTION "*) :
29650 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
29651 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
29652 ac_status=$?
29653 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29654 test $ac_status = 0; } ;; #(
29655 *) :
29656  
29657 as_fn_append WS_CFLAGS " $GCC_OPTION"
29658 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
29659 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
29660 ac_status=$?
29661 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29662 test $ac_status = 0; }
29663 ;;
29664 esac
29665  
29666 else
29667  
29668 WS_CFLAGS=$GCC_OPTION
29669 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
29670 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
29671 ac_status=$?
29672 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29673 test $ac_status = 0; }
29674  
29675 fi
29676  
29677 if test "$CC" = "$CC_FOR_BUILD"; then
29678 #
29679 # We're building the build tools with the same compiler
29680 # with which we're building Wireshark, so add the flags
29681 # to the flags for that compiler as well.
29682 #
29683  
29684 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
29685  
29686 case " $WS_CFLAGS_FOR_BUILD " in #(
29687 *" $GCC_OPTION "*) :
29688 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
29689 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
29690 ac_status=$?
29691 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29692 test $ac_status = 0; } ;; #(
29693 *) :
29694  
29695 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
29696 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
29697 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
29698 ac_status=$?
29699 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29700 test $ac_status = 0; }
29701 ;;
29702 esac
29703  
29704 else
29705  
29706 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
29707 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
29708 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
29709 ac_status=$?
29710 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29711 test $ac_status = 0; }
29712  
29713 fi
29714  
29715 fi
29716  
29717 else
29718  
29719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29720 $as_echo "yes" >&6; }
29721  
29722 fi
29723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29724 else
29725 #
29726 # Remove "force an error for a warning" options, if we
29727 # added them, by setting CFLAGS to the saved value plus
29728 # just the new option.
29729 #
29730  
29731 if ${WS_CFLAGS+:} false; then :
29732  
29733 case " $WS_CFLAGS " in #(
29734 *" $GCC_OPTION "*) :
29735 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
29736 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
29737 ac_status=$?
29738 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29739 test $ac_status = 0; } ;; #(
29740 *) :
29741  
29742 as_fn_append WS_CFLAGS " $GCC_OPTION"
29743 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
29744 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
29745 ac_status=$?
29746 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29747 test $ac_status = 0; }
29748 ;;
29749 esac
29750  
29751 else
29752  
29753 WS_CFLAGS=$GCC_OPTION
29754 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
29755 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
29756 ac_status=$?
29757 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29758 test $ac_status = 0; }
29759  
29760 fi
29761  
29762 if test "$CC" = "$CC_FOR_BUILD"; then
29763 #
29764 # We're building the build tools with the same compiler
29765 # with which we're building Wireshark, so add the flags
29766 # to the flags for that compiler as well.
29767 #
29768  
29769 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
29770  
29771 case " $WS_CFLAGS_FOR_BUILD " in #(
29772 *" $GCC_OPTION "*) :
29773 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
29774 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
29775 ac_status=$?
29776 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29777 test $ac_status = 0; } ;; #(
29778 *) :
29779  
29780 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
29781 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
29782 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
29783 ac_status=$?
29784 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29785 test $ac_status = 0; }
29786 ;;
29787 esac
29788  
29789 else
29790  
29791 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
29792 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
29793 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
29794 ac_status=$?
29795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29796 test $ac_status = 0; }
29797  
29798 fi
29799  
29800 fi
29801 fi
29802  
29803 else
29804  
29805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29806 $as_echo "no" >&6; }
29807 can_add_to_cflags=no
29808  
29809 fi
29810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29811  
29812 CPPFLAGS="$ac_ws_CPPLAGS_saved"
29813 CFLAGS="$ac_ws_CFLAGS_saved"
29814 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
29815 LDFLAGS="$ac_ws_LDFLAGS_saved"
29816  
29817 fi
29818 #
29819 # Did we find a C++ compiler?
29820 #
29821 if test "x$CXX" != "x" ; then
29822 #
29823 # Yes. Is this option only for the C compiler?
29824 #
29825 if test "" != C ; then
29826 #
29827 # Not C-only; if this option can be added to the C++ compiler
29828 # options, add it.
29829 #
29830 # If the option begins with "-W", add
29831 # $ac_wireshark_unknown_warning_option_error, as per the above, and
29832 # also add $ac_wireshark_non_cxx_warning_option_error, because at
29833 # lease some versions of g++ whine about -Wmissing-prototypes, the
29834 # fact that at least one of those versions refuses to warn about
29835 # function declarations without an earlier declaration nonwithstanding;
29836 # perhaps there's a reason not to warn about that with C++ even though
29837 # warning about it can be a Good Idea with C, but it's not obvious to
29838 # me).
29839 #
29840 # If the option begins with "-f" or "-m", add -Werror to make sure
29841 # that we'll get an error if we get "argument unused during compilation"
29842 # warnings, as those will either cause a failure for files compiled
29843 # with -Werror or annoying noise for files compiled without it.
29844 # (Yeah, you, clang++.)
29845 #
29846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
29847 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
29848  
29849 ac_ws_CPPLAGS_saved="$CPPFLAGS"
29850 ac_ws_CFLAGS_saved="$CFLAGS"
29851 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
29852 ac_ws_LDFLAGS_saved="$LDFLAGS"
29853 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
29854 CFLAGS="$WS_CFLAGS $CFLAGS"
29855 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
29856 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
29857  
29858 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
29859 then
29860 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
29861 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
29862 then
29863 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
29864 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
29865 then
29866 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
29867 else
29868 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
29869 fi
29870 ac_ext=cpp
29871 ac_cpp='$CXXCPP $CPPFLAGS'
29872 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29873 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29874 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29875  
29876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29877 /* end confdefs.h. */
29878  
29879 int foo;
29880  
29881 _ACEOF
29882 if ac_fn_cxx_try_compile "$LINENO"; then :
29883  
29884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29885 $as_echo "yes" >&6; }
29886 can_add_to_cxxflags=yes
29887 #
29888 # OK, do we have a test program? If so, check
29889 # whether it fails with this option and -Werror,
29890 # and, if so, don't include it.
29891 #
29892 # We test arg 4 here because arg 3 is a program which
29893 # could contain quotes (breaking the comparison).
29894 #
29895 if test "x" != "x" ; then
29896 CXXFLAGS="$CXXFLAGS -Werror"
29897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
29898 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
29899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29900 /* end confdefs.h. */
29901  
29902 _ACEOF
29903 if ac_fn_cxx_try_compile "$LINENO"; then :
29904  
29905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29906 $as_echo "no" >&6; }
29907 #
29908 # Remove "force an error for a warning" options, if we
29909 # added them, by setting CXXFLAGS to the saved value plus
29910 # just the new option.
29911 #
29912  
29913 if ${WS_CXXFLAGS+:} false; then :
29914  
29915 case " $WS_CXXFLAGS " in #(
29916 *" $GCC_OPTION "*) :
29917 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
29918 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
29919 ac_status=$?
29920 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29921 test $ac_status = 0; } ;; #(
29922 *) :
29923  
29924 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
29925 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
29926 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
29927 ac_status=$?
29928 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29929 test $ac_status = 0; }
29930 ;;
29931 esac
29932  
29933 else
29934  
29935 WS_CXXFLAGS=$GCC_OPTION
29936 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
29937 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
29938 ac_status=$?
29939 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29940 test $ac_status = 0; }
29941  
29942 fi
29943  
29944  
29945 else
29946  
29947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29948 $as_echo "yes" >&6; }
29949  
29950 fi
29951 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29952 else
29953 #
29954 # Remove "force an error for a warning" options, if we
29955 # added them, by setting CXXFLAGS to the saved value plus
29956 # just the new option.
29957 #
29958  
29959 if ${WS_CXXFLAGS+:} false; then :
29960  
29961 case " $WS_CXXFLAGS " in #(
29962 *" $GCC_OPTION "*) :
29963 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
29964 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
29965 ac_status=$?
29966 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29967 test $ac_status = 0; } ;; #(
29968 *) :
29969  
29970 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
29971 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
29972 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
29973 ac_status=$?
29974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29975 test $ac_status = 0; }
29976 ;;
29977 esac
29978  
29979 else
29980  
29981 WS_CXXFLAGS=$GCC_OPTION
29982 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
29983 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
29984 ac_status=$?
29985 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29986 test $ac_status = 0; }
29987  
29988 fi
29989  
29990 fi
29991  
29992 else
29993  
29994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29995 $as_echo "no" >&6; }
29996 can_add_to_cxxflags=no
29997  
29998 fi
29999 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30000  
30001 CPPFLAGS="$ac_ws_CPPLAGS_saved"
30002 CFLAGS="$ac_ws_CFLAGS_saved"
30003 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
30004 LDFLAGS="$ac_ws_LDFLAGS_saved"
30005  
30006 ac_ext=c
30007 ac_cpp='$CPP $CPPFLAGS'
30008 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30009 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30010 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30011  
30012 fi
30013 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
30014 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
30015 then
30016 #
30017 # Confusingly, some C++ compilers like -Wmissing-prototypes but
30018 # don't like -Wmissing-declarations and others like
30019 # -Wmissing-declarations but don't like -Wmissing-prototypes,
30020 # the fact that the corresponding C compiler likes both. Don't
30021 # warn about them.
30022 #
30023 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
30024 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
30025 then
30026 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
30027 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
30028 fi
30029 fi
30030 fi
30031 fi
30032  
30033  
30034 #
30035 # The following are C only, not C++
30036 #
30037 GCC_OPTION="-Wc++-compat"
30038 can_add_to_cflags=""
30039 can_add_to_cxxflags=""
30040 if test "x$ac_supports_gcc_flags" = "xyes" ; then
30041 if test "C" != CXX ; then
30042 #
30043 # Not C++-only; if this can be added to the C compiler flags, add them.
30044 #
30045 # If the option begins with "-W", add
30046 # $ac_wireshark_unknown_warning_option_error to make sure that
30047 # we'll get an error if it's an unknown warning option; not all
30048 # compilers treat unknown warning options as errors (I'm looking at
30049 # you, clang).
30050 #
30051 # If the option begins with "-f" or "-m", add -Werror to make sure
30052 # that we'll get an error if we get "argument unused during compilation"
30053 # warnings, as those will either cause a failure for files compiled
30054 # with -Werror or annoying noise for files compiled without it.
30055 # (Yeah, you, clang.)
30056 #
30057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
30058 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
30059  
30060 ac_ws_CPPLAGS_saved="$CPPFLAGS"
30061 ac_ws_CFLAGS_saved="$CFLAGS"
30062 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
30063 ac_ws_LDFLAGS_saved="$LDFLAGS"
30064 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
30065 CFLAGS="$WS_CFLAGS $CFLAGS"
30066 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
30067 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
30068  
30069 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
30070 then
30071 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
30072 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
30073 then
30074 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
30075 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
30076 then
30077 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
30078 else
30079 CFLAGS="$CFLAGS $GCC_OPTION"
30080 fi
30081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30082 /* end confdefs.h. */
30083  
30084 int foo;
30085  
30086 _ACEOF
30087 if ac_fn_c_try_compile "$LINENO"; then :
30088  
30089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30090 $as_echo "yes" >&6; }
30091 can_add_to_cflags=yes
30092 #
30093 # OK, do we have a test program? If so, check
30094 # whether it fails with this option and -Werror,
30095 # and, if so, don't include it.
30096 #
30097 # We test arg 4 here because arg 3 is a program which
30098 # could contain quotes (breaking the comparison).
30099 #
30100 if test "x" != "x" ; then
30101 CFLAGS="$CFLAGS -Werror"
30102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
30103 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
30104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30105 /* end confdefs.h. */
30106  
30107 _ACEOF
30108 if ac_fn_c_try_compile "$LINENO"; then :
30109  
30110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30111 $as_echo "no" >&6; }
30112 #
30113 # Remove "force an error for a warning" options, if we
30114 # added them, by setting CFLAGS to the saved value plus
30115 # just the new option.
30116 #
30117  
30118 if ${WS_CFLAGS+:} false; then :
30119  
30120 case " $WS_CFLAGS " in #(
30121 *" $GCC_OPTION "*) :
30122 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
30123 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
30124 ac_status=$?
30125 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30126 test $ac_status = 0; } ;; #(
30127 *) :
30128  
30129 as_fn_append WS_CFLAGS " $GCC_OPTION"
30130 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
30131 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
30132 ac_status=$?
30133 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30134 test $ac_status = 0; }
30135 ;;
30136 esac
30137  
30138 else
30139  
30140 WS_CFLAGS=$GCC_OPTION
30141 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
30142 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
30143 ac_status=$?
30144 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30145 test $ac_status = 0; }
30146  
30147 fi
30148  
30149 if test "$CC" = "$CC_FOR_BUILD"; then
30150 #
30151 # We're building the build tools with the same compiler
30152 # with which we're building Wireshark, so add the flags
30153 # to the flags for that compiler as well.
30154 #
30155  
30156 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
30157  
30158 case " $WS_CFLAGS_FOR_BUILD " in #(
30159 *" $GCC_OPTION "*) :
30160 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
30161 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
30162 ac_status=$?
30163 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30164 test $ac_status = 0; } ;; #(
30165 *) :
30166  
30167 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
30168 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
30169 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
30170 ac_status=$?
30171 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30172 test $ac_status = 0; }
30173 ;;
30174 esac
30175  
30176 else
30177  
30178 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
30179 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
30180 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
30181 ac_status=$?
30182 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30183 test $ac_status = 0; }
30184  
30185 fi
30186  
30187 fi
30188  
30189 else
30190  
30191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30192 $as_echo "yes" >&6; }
30193  
30194 fi
30195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30196 else
30197 #
30198 # Remove "force an error for a warning" options, if we
30199 # added them, by setting CFLAGS to the saved value plus
30200 # just the new option.
30201 #
30202  
30203 if ${WS_CFLAGS+:} false; then :
30204  
30205 case " $WS_CFLAGS " in #(
30206 *" $GCC_OPTION "*) :
30207 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
30208 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
30209 ac_status=$?
30210 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30211 test $ac_status = 0; } ;; #(
30212 *) :
30213  
30214 as_fn_append WS_CFLAGS " $GCC_OPTION"
30215 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
30216 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
30217 ac_status=$?
30218 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30219 test $ac_status = 0; }
30220 ;;
30221 esac
30222  
30223 else
30224  
30225 WS_CFLAGS=$GCC_OPTION
30226 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
30227 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
30228 ac_status=$?
30229 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30230 test $ac_status = 0; }
30231  
30232 fi
30233  
30234 if test "$CC" = "$CC_FOR_BUILD"; then
30235 #
30236 # We're building the build tools with the same compiler
30237 # with which we're building Wireshark, so add the flags
30238 # to the flags for that compiler as well.
30239 #
30240  
30241 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
30242  
30243 case " $WS_CFLAGS_FOR_BUILD " in #(
30244 *" $GCC_OPTION "*) :
30245 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
30246 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
30247 ac_status=$?
30248 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30249 test $ac_status = 0; } ;; #(
30250 *) :
30251  
30252 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
30253 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
30254 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
30255 ac_status=$?
30256 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30257 test $ac_status = 0; }
30258 ;;
30259 esac
30260  
30261 else
30262  
30263 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
30264 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
30265 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
30266 ac_status=$?
30267 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30268 test $ac_status = 0; }
30269  
30270 fi
30271  
30272 fi
30273 fi
30274  
30275 else
30276  
30277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30278 $as_echo "no" >&6; }
30279 can_add_to_cflags=no
30280  
30281 fi
30282 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30283  
30284 CPPFLAGS="$ac_ws_CPPLAGS_saved"
30285 CFLAGS="$ac_ws_CFLAGS_saved"
30286 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
30287 LDFLAGS="$ac_ws_LDFLAGS_saved"
30288  
30289 fi
30290 #
30291 # Did we find a C++ compiler?
30292 #
30293 if test "x$CXX" != "x" ; then
30294 #
30295 # Yes. Is this option only for the C compiler?
30296 #
30297 if test "C" != C ; then
30298 #
30299 # Not C-only; if this option can be added to the C++ compiler
30300 # options, add it.
30301 #
30302 # If the option begins with "-W", add
30303 # $ac_wireshark_unknown_warning_option_error, as per the above, and
30304 # also add $ac_wireshark_non_cxx_warning_option_error, because at
30305 # lease some versions of g++ whine about -Wmissing-prototypes, the
30306 # fact that at least one of those versions refuses to warn about
30307 # function declarations without an earlier declaration nonwithstanding;
30308 # perhaps there's a reason not to warn about that with C++ even though
30309 # warning about it can be a Good Idea with C, but it's not obvious to
30310 # me).
30311 #
30312 # If the option begins with "-f" or "-m", add -Werror to make sure
30313 # that we'll get an error if we get "argument unused during compilation"
30314 # warnings, as those will either cause a failure for files compiled
30315 # with -Werror or annoying noise for files compiled without it.
30316 # (Yeah, you, clang++.)
30317 #
30318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
30319 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
30320  
30321 ac_ws_CPPLAGS_saved="$CPPFLAGS"
30322 ac_ws_CFLAGS_saved="$CFLAGS"
30323 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
30324 ac_ws_LDFLAGS_saved="$LDFLAGS"
30325 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
30326 CFLAGS="$WS_CFLAGS $CFLAGS"
30327 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
30328 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
30329  
30330 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
30331 then
30332 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
30333 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
30334 then
30335 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
30336 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
30337 then
30338 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
30339 else
30340 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
30341 fi
30342 ac_ext=cpp
30343 ac_cpp='$CXXCPP $CPPFLAGS'
30344 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30345 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30346 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30347  
30348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30349 /* end confdefs.h. */
30350  
30351 int foo;
30352  
30353 _ACEOF
30354 if ac_fn_cxx_try_compile "$LINENO"; then :
30355  
30356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30357 $as_echo "yes" >&6; }
30358 can_add_to_cxxflags=yes
30359 #
30360 # OK, do we have a test program? If so, check
30361 # whether it fails with this option and -Werror,
30362 # and, if so, don't include it.
30363 #
30364 # We test arg 4 here because arg 3 is a program which
30365 # could contain quotes (breaking the comparison).
30366 #
30367 if test "x" != "x" ; then
30368 CXXFLAGS="$CXXFLAGS -Werror"
30369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
30370 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
30371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30372 /* end confdefs.h. */
30373  
30374 _ACEOF
30375 if ac_fn_cxx_try_compile "$LINENO"; then :
30376  
30377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30378 $as_echo "no" >&6; }
30379 #
30380 # Remove "force an error for a warning" options, if we
30381 # added them, by setting CXXFLAGS to the saved value plus
30382 # just the new option.
30383 #
30384  
30385 if ${WS_CXXFLAGS+:} false; then :
30386  
30387 case " $WS_CXXFLAGS " in #(
30388 *" $GCC_OPTION "*) :
30389 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
30390 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
30391 ac_status=$?
30392 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30393 test $ac_status = 0; } ;; #(
30394 *) :
30395  
30396 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
30397 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
30398 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
30399 ac_status=$?
30400 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30401 test $ac_status = 0; }
30402 ;;
30403 esac
30404  
30405 else
30406  
30407 WS_CXXFLAGS=$GCC_OPTION
30408 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
30409 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
30410 ac_status=$?
30411 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30412 test $ac_status = 0; }
30413  
30414 fi
30415  
30416  
30417 else
30418  
30419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30420 $as_echo "yes" >&6; }
30421  
30422 fi
30423 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30424 else
30425 #
30426 # Remove "force an error for a warning" options, if we
30427 # added them, by setting CXXFLAGS to the saved value plus
30428 # just the new option.
30429 #
30430  
30431 if ${WS_CXXFLAGS+:} false; then :
30432  
30433 case " $WS_CXXFLAGS " in #(
30434 *" $GCC_OPTION "*) :
30435 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
30436 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
30437 ac_status=$?
30438 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30439 test $ac_status = 0; } ;; #(
30440 *) :
30441  
30442 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
30443 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
30444 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
30445 ac_status=$?
30446 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30447 test $ac_status = 0; }
30448 ;;
30449 esac
30450  
30451 else
30452  
30453 WS_CXXFLAGS=$GCC_OPTION
30454 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
30455 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
30456 ac_status=$?
30457 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30458 test $ac_status = 0; }
30459  
30460 fi
30461  
30462 fi
30463  
30464 else
30465  
30466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30467 $as_echo "no" >&6; }
30468 can_add_to_cxxflags=no
30469  
30470 fi
30471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30472  
30473 CPPFLAGS="$ac_ws_CPPLAGS_saved"
30474 CFLAGS="$ac_ws_CFLAGS_saved"
30475 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
30476 LDFLAGS="$ac_ws_LDFLAGS_saved"
30477  
30478 ac_ext=c
30479 ac_cpp='$CPP $CPPFLAGS'
30480 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30481 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30482 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30483  
30484 fi
30485 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
30486 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
30487 then
30488 #
30489 # Confusingly, some C++ compilers like -Wmissing-prototypes but
30490 # don't like -Wmissing-declarations and others like
30491 # -Wmissing-declarations but don't like -Wmissing-prototypes,
30492 # the fact that the corresponding C compiler likes both. Don't
30493 # warn about them.
30494 #
30495 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
30496 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
30497 then
30498 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
30499 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
30500 fi
30501 fi
30502 fi
30503 fi
30504  
30505 GCC_OPTION="-Wdeclaration-after-statement"
30506 can_add_to_cflags=""
30507 can_add_to_cxxflags=""
30508 if test "x$ac_supports_gcc_flags" = "xyes" ; then
30509 if test "C" != CXX ; then
30510 #
30511 # Not C++-only; if this can be added to the C compiler flags, add them.
30512 #
30513 # If the option begins with "-W", add
30514 # $ac_wireshark_unknown_warning_option_error to make sure that
30515 # we'll get an error if it's an unknown warning option; not all
30516 # compilers treat unknown warning options as errors (I'm looking at
30517 # you, clang).
30518 #
30519 # If the option begins with "-f" or "-m", add -Werror to make sure
30520 # that we'll get an error if we get "argument unused during compilation"
30521 # warnings, as those will either cause a failure for files compiled
30522 # with -Werror or annoying noise for files compiled without it.
30523 # (Yeah, you, clang.)
30524 #
30525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
30526 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
30527  
30528 ac_ws_CPPLAGS_saved="$CPPFLAGS"
30529 ac_ws_CFLAGS_saved="$CFLAGS"
30530 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
30531 ac_ws_LDFLAGS_saved="$LDFLAGS"
30532 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
30533 CFLAGS="$WS_CFLAGS $CFLAGS"
30534 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
30535 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
30536  
30537 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
30538 then
30539 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
30540 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
30541 then
30542 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
30543 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
30544 then
30545 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
30546 else
30547 CFLAGS="$CFLAGS $GCC_OPTION"
30548 fi
30549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30550 /* end confdefs.h. */
30551  
30552 int foo;
30553  
30554 _ACEOF
30555 if ac_fn_c_try_compile "$LINENO"; then :
30556  
30557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30558 $as_echo "yes" >&6; }
30559 can_add_to_cflags=yes
30560 #
30561 # OK, do we have a test program? If so, check
30562 # whether it fails with this option and -Werror,
30563 # and, if so, don't include it.
30564 #
30565 # We test arg 4 here because arg 3 is a program which
30566 # could contain quotes (breaking the comparison).
30567 #
30568 if test "x" != "x" ; then
30569 CFLAGS="$CFLAGS -Werror"
30570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
30571 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
30572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30573 /* end confdefs.h. */
30574  
30575 _ACEOF
30576 if ac_fn_c_try_compile "$LINENO"; then :
30577  
30578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30579 $as_echo "no" >&6; }
30580 #
30581 # Remove "force an error for a warning" options, if we
30582 # added them, by setting CFLAGS to the saved value plus
30583 # just the new option.
30584 #
30585  
30586 if ${WS_CFLAGS+:} false; then :
30587  
30588 case " $WS_CFLAGS " in #(
30589 *" $GCC_OPTION "*) :
30590 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
30591 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
30592 ac_status=$?
30593 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30594 test $ac_status = 0; } ;; #(
30595 *) :
30596  
30597 as_fn_append WS_CFLAGS " $GCC_OPTION"
30598 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
30599 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
30600 ac_status=$?
30601 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30602 test $ac_status = 0; }
30603 ;;
30604 esac
30605  
30606 else
30607  
30608 WS_CFLAGS=$GCC_OPTION
30609 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
30610 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
30611 ac_status=$?
30612 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30613 test $ac_status = 0; }
30614  
30615 fi
30616  
30617 if test "$CC" = "$CC_FOR_BUILD"; then
30618 #
30619 # We're building the build tools with the same compiler
30620 # with which we're building Wireshark, so add the flags
30621 # to the flags for that compiler as well.
30622 #
30623  
30624 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
30625  
30626 case " $WS_CFLAGS_FOR_BUILD " in #(
30627 *" $GCC_OPTION "*) :
30628 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
30629 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
30630 ac_status=$?
30631 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30632 test $ac_status = 0; } ;; #(
30633 *) :
30634  
30635 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
30636 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
30637 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
30638 ac_status=$?
30639 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30640 test $ac_status = 0; }
30641 ;;
30642 esac
30643  
30644 else
30645  
30646 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
30647 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
30648 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
30649 ac_status=$?
30650 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30651 test $ac_status = 0; }
30652  
30653 fi
30654  
30655 fi
30656  
30657 else
30658  
30659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30660 $as_echo "yes" >&6; }
30661  
30662 fi
30663 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30664 else
30665 #
30666 # Remove "force an error for a warning" options, if we
30667 # added them, by setting CFLAGS to the saved value plus
30668 # just the new option.
30669 #
30670  
30671 if ${WS_CFLAGS+:} false; then :
30672  
30673 case " $WS_CFLAGS " in #(
30674 *" $GCC_OPTION "*) :
30675 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
30676 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
30677 ac_status=$?
30678 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30679 test $ac_status = 0; } ;; #(
30680 *) :
30681  
30682 as_fn_append WS_CFLAGS " $GCC_OPTION"
30683 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
30684 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
30685 ac_status=$?
30686 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30687 test $ac_status = 0; }
30688 ;;
30689 esac
30690  
30691 else
30692  
30693 WS_CFLAGS=$GCC_OPTION
30694 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
30695 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
30696 ac_status=$?
30697 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30698 test $ac_status = 0; }
30699  
30700 fi
30701  
30702 if test "$CC" = "$CC_FOR_BUILD"; then
30703 #
30704 # We're building the build tools with the same compiler
30705 # with which we're building Wireshark, so add the flags
30706 # to the flags for that compiler as well.
30707 #
30708  
30709 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
30710  
30711 case " $WS_CFLAGS_FOR_BUILD " in #(
30712 *" $GCC_OPTION "*) :
30713 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
30714 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
30715 ac_status=$?
30716 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30717 test $ac_status = 0; } ;; #(
30718 *) :
30719  
30720 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
30721 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
30722 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
30723 ac_status=$?
30724 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30725 test $ac_status = 0; }
30726 ;;
30727 esac
30728  
30729 else
30730  
30731 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
30732 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
30733 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
30734 ac_status=$?
30735 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30736 test $ac_status = 0; }
30737  
30738 fi
30739  
30740 fi
30741 fi
30742  
30743 else
30744  
30745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30746 $as_echo "no" >&6; }
30747 can_add_to_cflags=no
30748  
30749 fi
30750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30751  
30752 CPPFLAGS="$ac_ws_CPPLAGS_saved"
30753 CFLAGS="$ac_ws_CFLAGS_saved"
30754 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
30755 LDFLAGS="$ac_ws_LDFLAGS_saved"
30756  
30757 fi
30758 #
30759 # Did we find a C++ compiler?
30760 #
30761 if test "x$CXX" != "x" ; then
30762 #
30763 # Yes. Is this option only for the C compiler?
30764 #
30765 if test "C" != C ; then
30766 #
30767 # Not C-only; if this option can be added to the C++ compiler
30768 # options, add it.
30769 #
30770 # If the option begins with "-W", add
30771 # $ac_wireshark_unknown_warning_option_error, as per the above, and
30772 # also add $ac_wireshark_non_cxx_warning_option_error, because at
30773 # lease some versions of g++ whine about -Wmissing-prototypes, the
30774 # fact that at least one of those versions refuses to warn about
30775 # function declarations without an earlier declaration nonwithstanding;
30776 # perhaps there's a reason not to warn about that with C++ even though
30777 # warning about it can be a Good Idea with C, but it's not obvious to
30778 # me).
30779 #
30780 # If the option begins with "-f" or "-m", add -Werror to make sure
30781 # that we'll get an error if we get "argument unused during compilation"
30782 # warnings, as those will either cause a failure for files compiled
30783 # with -Werror or annoying noise for files compiled without it.
30784 # (Yeah, you, clang++.)
30785 #
30786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
30787 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
30788  
30789 ac_ws_CPPLAGS_saved="$CPPFLAGS"
30790 ac_ws_CFLAGS_saved="$CFLAGS"
30791 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
30792 ac_ws_LDFLAGS_saved="$LDFLAGS"
30793 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
30794 CFLAGS="$WS_CFLAGS $CFLAGS"
30795 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
30796 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
30797  
30798 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
30799 then
30800 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
30801 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
30802 then
30803 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
30804 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
30805 then
30806 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
30807 else
30808 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
30809 fi
30810 ac_ext=cpp
30811 ac_cpp='$CXXCPP $CPPFLAGS'
30812 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30813 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30814 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30815  
30816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30817 /* end confdefs.h. */
30818  
30819 int foo;
30820  
30821 _ACEOF
30822 if ac_fn_cxx_try_compile "$LINENO"; then :
30823  
30824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30825 $as_echo "yes" >&6; }
30826 can_add_to_cxxflags=yes
30827 #
30828 # OK, do we have a test program? If so, check
30829 # whether it fails with this option and -Werror,
30830 # and, if so, don't include it.
30831 #
30832 # We test arg 4 here because arg 3 is a program which
30833 # could contain quotes (breaking the comparison).
30834 #
30835 if test "x" != "x" ; then
30836 CXXFLAGS="$CXXFLAGS -Werror"
30837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
30838 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
30839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30840 /* end confdefs.h. */
30841  
30842 _ACEOF
30843 if ac_fn_cxx_try_compile "$LINENO"; then :
30844  
30845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30846 $as_echo "no" >&6; }
30847 #
30848 # Remove "force an error for a warning" options, if we
30849 # added them, by setting CXXFLAGS to the saved value plus
30850 # just the new option.
30851 #
30852  
30853 if ${WS_CXXFLAGS+:} false; then :
30854  
30855 case " $WS_CXXFLAGS " in #(
30856 *" $GCC_OPTION "*) :
30857 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
30858 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
30859 ac_status=$?
30860 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30861 test $ac_status = 0; } ;; #(
30862 *) :
30863  
30864 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
30865 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
30866 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
30867 ac_status=$?
30868 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30869 test $ac_status = 0; }
30870 ;;
30871 esac
30872  
30873 else
30874  
30875 WS_CXXFLAGS=$GCC_OPTION
30876 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
30877 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
30878 ac_status=$?
30879 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30880 test $ac_status = 0; }
30881  
30882 fi
30883  
30884  
30885 else
30886  
30887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30888 $as_echo "yes" >&6; }
30889  
30890 fi
30891 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30892 else
30893 #
30894 # Remove "force an error for a warning" options, if we
30895 # added them, by setting CXXFLAGS to the saved value plus
30896 # just the new option.
30897 #
30898  
30899 if ${WS_CXXFLAGS+:} false; then :
30900  
30901 case " $WS_CXXFLAGS " in #(
30902 *" $GCC_OPTION "*) :
30903 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
30904 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
30905 ac_status=$?
30906 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30907 test $ac_status = 0; } ;; #(
30908 *) :
30909  
30910 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
30911 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
30912 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
30913 ac_status=$?
30914 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30915 test $ac_status = 0; }
30916 ;;
30917 esac
30918  
30919 else
30920  
30921 WS_CXXFLAGS=$GCC_OPTION
30922 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
30923 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
30924 ac_status=$?
30925 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30926 test $ac_status = 0; }
30927  
30928 fi
30929  
30930 fi
30931  
30932 else
30933  
30934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30935 $as_echo "no" >&6; }
30936 can_add_to_cxxflags=no
30937  
30938 fi
30939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30940  
30941 CPPFLAGS="$ac_ws_CPPLAGS_saved"
30942 CFLAGS="$ac_ws_CFLAGS_saved"
30943 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
30944 LDFLAGS="$ac_ws_LDFLAGS_saved"
30945  
30946 ac_ext=c
30947 ac_cpp='$CPP $CPPFLAGS'
30948 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30949 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30950 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30951  
30952 fi
30953 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
30954 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
30955 then
30956 #
30957 # Confusingly, some C++ compilers like -Wmissing-prototypes but
30958 # don't like -Wmissing-declarations and others like
30959 # -Wmissing-declarations but don't like -Wmissing-prototypes,
30960 # the fact that the corresponding C compiler likes both. Don't
30961 # warn about them.
30962 #
30963 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
30964 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
30965 then
30966 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
30967 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
30968 fi
30969 fi
30970 fi
30971 fi
30972  
30973 GCC_OPTION="-Wunused-const-variable"
30974 can_add_to_cflags=""
30975 can_add_to_cxxflags=""
30976 if test "x$ac_supports_gcc_flags" = "xyes" ; then
30977 if test "C" != CXX ; then
30978 #
30979 # Not C++-only; if this can be added to the C compiler flags, add them.
30980 #
30981 # If the option begins with "-W", add
30982 # $ac_wireshark_unknown_warning_option_error to make sure that
30983 # we'll get an error if it's an unknown warning option; not all
30984 # compilers treat unknown warning options as errors (I'm looking at
30985 # you, clang).
30986 #
30987 # If the option begins with "-f" or "-m", add -Werror to make sure
30988 # that we'll get an error if we get "argument unused during compilation"
30989 # warnings, as those will either cause a failure for files compiled
30990 # with -Werror or annoying noise for files compiled without it.
30991 # (Yeah, you, clang.)
30992 #
30993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
30994 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
30995  
30996 ac_ws_CPPLAGS_saved="$CPPFLAGS"
30997 ac_ws_CFLAGS_saved="$CFLAGS"
30998 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
30999 ac_ws_LDFLAGS_saved="$LDFLAGS"
31000 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
31001 CFLAGS="$WS_CFLAGS $CFLAGS"
31002 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
31003 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
31004  
31005 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
31006 then
31007 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
31008 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
31009 then
31010 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
31011 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
31012 then
31013 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
31014 else
31015 CFLAGS="$CFLAGS $GCC_OPTION"
31016 fi
31017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31018 /* end confdefs.h. */
31019  
31020 int foo;
31021  
31022 _ACEOF
31023 if ac_fn_c_try_compile "$LINENO"; then :
31024  
31025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31026 $as_echo "yes" >&6; }
31027 can_add_to_cflags=yes
31028 #
31029 # OK, do we have a test program? If so, check
31030 # whether it fails with this option and -Werror,
31031 # and, if so, don't include it.
31032 #
31033 # We test arg 4 here because arg 3 is a program which
31034 # could contain quotes (breaking the comparison).
31035 #
31036 if test "x" != "x" ; then
31037 CFLAGS="$CFLAGS -Werror"
31038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
31039 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
31040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31041 /* end confdefs.h. */
31042  
31043 _ACEOF
31044 if ac_fn_c_try_compile "$LINENO"; then :
31045  
31046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31047 $as_echo "no" >&6; }
31048 #
31049 # Remove "force an error for a warning" options, if we
31050 # added them, by setting CFLAGS to the saved value plus
31051 # just the new option.
31052 #
31053  
31054 if ${WS_CFLAGS+:} false; then :
31055  
31056 case " $WS_CFLAGS " in #(
31057 *" $GCC_OPTION "*) :
31058 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
31059 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
31060 ac_status=$?
31061 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31062 test $ac_status = 0; } ;; #(
31063 *) :
31064  
31065 as_fn_append WS_CFLAGS " $GCC_OPTION"
31066 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
31067 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
31068 ac_status=$?
31069 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31070 test $ac_status = 0; }
31071 ;;
31072 esac
31073  
31074 else
31075  
31076 WS_CFLAGS=$GCC_OPTION
31077 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
31078 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
31079 ac_status=$?
31080 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31081 test $ac_status = 0; }
31082  
31083 fi
31084  
31085 if test "$CC" = "$CC_FOR_BUILD"; then
31086 #
31087 # We're building the build tools with the same compiler
31088 # with which we're building Wireshark, so add the flags
31089 # to the flags for that compiler as well.
31090 #
31091  
31092 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
31093  
31094 case " $WS_CFLAGS_FOR_BUILD " in #(
31095 *" $GCC_OPTION "*) :
31096 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
31097 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
31098 ac_status=$?
31099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31100 test $ac_status = 0; } ;; #(
31101 *) :
31102  
31103 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
31104 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
31105 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
31106 ac_status=$?
31107 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31108 test $ac_status = 0; }
31109 ;;
31110 esac
31111  
31112 else
31113  
31114 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
31115 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
31116 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
31117 ac_status=$?
31118 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31119 test $ac_status = 0; }
31120  
31121 fi
31122  
31123 fi
31124  
31125 else
31126  
31127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31128 $as_echo "yes" >&6; }
31129  
31130 fi
31131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31132 else
31133 #
31134 # Remove "force an error for a warning" options, if we
31135 # added them, by setting CFLAGS to the saved value plus
31136 # just the new option.
31137 #
31138  
31139 if ${WS_CFLAGS+:} false; then :
31140  
31141 case " $WS_CFLAGS " in #(
31142 *" $GCC_OPTION "*) :
31143 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
31144 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
31145 ac_status=$?
31146 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31147 test $ac_status = 0; } ;; #(
31148 *) :
31149  
31150 as_fn_append WS_CFLAGS " $GCC_OPTION"
31151 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
31152 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
31153 ac_status=$?
31154 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31155 test $ac_status = 0; }
31156 ;;
31157 esac
31158  
31159 else
31160  
31161 WS_CFLAGS=$GCC_OPTION
31162 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
31163 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
31164 ac_status=$?
31165 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31166 test $ac_status = 0; }
31167  
31168 fi
31169  
31170 if test "$CC" = "$CC_FOR_BUILD"; then
31171 #
31172 # We're building the build tools with the same compiler
31173 # with which we're building Wireshark, so add the flags
31174 # to the flags for that compiler as well.
31175 #
31176  
31177 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
31178  
31179 case " $WS_CFLAGS_FOR_BUILD " in #(
31180 *" $GCC_OPTION "*) :
31181 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
31182 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
31183 ac_status=$?
31184 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31185 test $ac_status = 0; } ;; #(
31186 *) :
31187  
31188 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
31189 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
31190 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
31191 ac_status=$?
31192 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31193 test $ac_status = 0; }
31194 ;;
31195 esac
31196  
31197 else
31198  
31199 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
31200 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
31201 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
31202 ac_status=$?
31203 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31204 test $ac_status = 0; }
31205  
31206 fi
31207  
31208 fi
31209 fi
31210  
31211 else
31212  
31213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31214 $as_echo "no" >&6; }
31215 can_add_to_cflags=no
31216  
31217 fi
31218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31219  
31220 CPPFLAGS="$ac_ws_CPPLAGS_saved"
31221 CFLAGS="$ac_ws_CFLAGS_saved"
31222 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
31223 LDFLAGS="$ac_ws_LDFLAGS_saved"
31224  
31225 fi
31226 #
31227 # Did we find a C++ compiler?
31228 #
31229 if test "x$CXX" != "x" ; then
31230 #
31231 # Yes. Is this option only for the C compiler?
31232 #
31233 if test "C" != C ; then
31234 #
31235 # Not C-only; if this option can be added to the C++ compiler
31236 # options, add it.
31237 #
31238 # If the option begins with "-W", add
31239 # $ac_wireshark_unknown_warning_option_error, as per the above, and
31240 # also add $ac_wireshark_non_cxx_warning_option_error, because at
31241 # lease some versions of g++ whine about -Wmissing-prototypes, the
31242 # fact that at least one of those versions refuses to warn about
31243 # function declarations without an earlier declaration nonwithstanding;
31244 # perhaps there's a reason not to warn about that with C++ even though
31245 # warning about it can be a Good Idea with C, but it's not obvious to
31246 # me).
31247 #
31248 # If the option begins with "-f" or "-m", add -Werror to make sure
31249 # that we'll get an error if we get "argument unused during compilation"
31250 # warnings, as those will either cause a failure for files compiled
31251 # with -Werror or annoying noise for files compiled without it.
31252 # (Yeah, you, clang++.)
31253 #
31254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
31255 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
31256  
31257 ac_ws_CPPLAGS_saved="$CPPFLAGS"
31258 ac_ws_CFLAGS_saved="$CFLAGS"
31259 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
31260 ac_ws_LDFLAGS_saved="$LDFLAGS"
31261 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
31262 CFLAGS="$WS_CFLAGS $CFLAGS"
31263 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
31264 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
31265  
31266 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
31267 then
31268 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
31269 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
31270 then
31271 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
31272 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
31273 then
31274 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
31275 else
31276 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
31277 fi
31278 ac_ext=cpp
31279 ac_cpp='$CXXCPP $CPPFLAGS'
31280 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31281 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31282 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31283  
31284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31285 /* end confdefs.h. */
31286  
31287 int foo;
31288  
31289 _ACEOF
31290 if ac_fn_cxx_try_compile "$LINENO"; then :
31291  
31292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31293 $as_echo "yes" >&6; }
31294 can_add_to_cxxflags=yes
31295 #
31296 # OK, do we have a test program? If so, check
31297 # whether it fails with this option and -Werror,
31298 # and, if so, don't include it.
31299 #
31300 # We test arg 4 here because arg 3 is a program which
31301 # could contain quotes (breaking the comparison).
31302 #
31303 if test "x" != "x" ; then
31304 CXXFLAGS="$CXXFLAGS -Werror"
31305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
31306 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
31307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31308 /* end confdefs.h. */
31309  
31310 _ACEOF
31311 if ac_fn_cxx_try_compile "$LINENO"; then :
31312  
31313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31314 $as_echo "no" >&6; }
31315 #
31316 # Remove "force an error for a warning" options, if we
31317 # added them, by setting CXXFLAGS to the saved value plus
31318 # just the new option.
31319 #
31320  
31321 if ${WS_CXXFLAGS+:} false; then :
31322  
31323 case " $WS_CXXFLAGS " in #(
31324 *" $GCC_OPTION "*) :
31325 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
31326 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
31327 ac_status=$?
31328 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31329 test $ac_status = 0; } ;; #(
31330 *) :
31331  
31332 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
31333 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
31334 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
31335 ac_status=$?
31336 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31337 test $ac_status = 0; }
31338 ;;
31339 esac
31340  
31341 else
31342  
31343 WS_CXXFLAGS=$GCC_OPTION
31344 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
31345 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
31346 ac_status=$?
31347 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31348 test $ac_status = 0; }
31349  
31350 fi
31351  
31352  
31353 else
31354  
31355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31356 $as_echo "yes" >&6; }
31357  
31358 fi
31359 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31360 else
31361 #
31362 # Remove "force an error for a warning" options, if we
31363 # added them, by setting CXXFLAGS to the saved value plus
31364 # just the new option.
31365 #
31366  
31367 if ${WS_CXXFLAGS+:} false; then :
31368  
31369 case " $WS_CXXFLAGS " in #(
31370 *" $GCC_OPTION "*) :
31371 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
31372 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
31373 ac_status=$?
31374 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31375 test $ac_status = 0; } ;; #(
31376 *) :
31377  
31378 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
31379 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
31380 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
31381 ac_status=$?
31382 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31383 test $ac_status = 0; }
31384 ;;
31385 esac
31386  
31387 else
31388  
31389 WS_CXXFLAGS=$GCC_OPTION
31390 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
31391 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
31392 ac_status=$?
31393 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31394 test $ac_status = 0; }
31395  
31396 fi
31397  
31398 fi
31399  
31400 else
31401  
31402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31403 $as_echo "no" >&6; }
31404 can_add_to_cxxflags=no
31405  
31406 fi
31407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31408  
31409 CPPFLAGS="$ac_ws_CPPLAGS_saved"
31410 CFLAGS="$ac_ws_CFLAGS_saved"
31411 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
31412 LDFLAGS="$ac_ws_LDFLAGS_saved"
31413  
31414 ac_ext=c
31415 ac_cpp='$CPP $CPPFLAGS'
31416 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31417 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31418 ac_compiler_gnu=$ac_cv_c_compiler_gnu
31419  
31420 fi
31421 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
31422 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
31423 then
31424 #
31425 # Confusingly, some C++ compilers like -Wmissing-prototypes but
31426 # don't like -Wmissing-declarations and others like
31427 # -Wmissing-declarations but don't like -Wmissing-prototypes,
31428 # the fact that the corresponding C compiler likes both. Don't
31429 # warn about them.
31430 #
31431 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
31432 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
31433 then
31434 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
31435 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
31436 fi
31437 fi
31438 fi
31439 fi
31440  
31441  
31442 #
31443 # XXX - OK for C++?
31444 #
31445 # Make sure -Wshadow doesn't complain about variables in function and
31446 # function pointer declarations shadowing other variables; if not, don't
31447 # turn it on, as some versions of GCC (including the one in at least
31448 # some Xcode versions that came with Mac OS X 10.5) complain about
31449 # that.
31450 #
31451 GCC_OPTION="-Wshadow"
31452 can_add_to_cflags=""
31453 can_add_to_cxxflags=""
31454 if test "x$ac_supports_gcc_flags" = "xyes" ; then
31455 if test "C" != CXX ; then
31456 #
31457 # Not C++-only; if this can be added to the C compiler flags, add them.
31458 #
31459 # If the option begins with "-W", add
31460 # $ac_wireshark_unknown_warning_option_error to make sure that
31461 # we'll get an error if it's an unknown warning option; not all
31462 # compilers treat unknown warning options as errors (I'm looking at
31463 # you, clang).
31464 #
31465 # If the option begins with "-f" or "-m", add -Werror to make sure
31466 # that we'll get an error if we get "argument unused during compilation"
31467 # warnings, as those will either cause a failure for files compiled
31468 # with -Werror or annoying noise for files compiled without it.
31469 # (Yeah, you, clang.)
31470 #
31471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
31472 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
31473  
31474 ac_ws_CPPLAGS_saved="$CPPFLAGS"
31475 ac_ws_CFLAGS_saved="$CFLAGS"
31476 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
31477 ac_ws_LDFLAGS_saved="$LDFLAGS"
31478 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
31479 CFLAGS="$WS_CFLAGS $CFLAGS"
31480 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
31481 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
31482  
31483 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
31484 then
31485 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
31486 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
31487 then
31488 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
31489 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
31490 then
31491 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
31492 else
31493 CFLAGS="$CFLAGS $GCC_OPTION"
31494 fi
31495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31496 /* end confdefs.h. */
31497  
31498 int foo;
31499  
31500 _ACEOF
31501 if ac_fn_c_try_compile "$LINENO"; then :
31502  
31503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31504 $as_echo "yes" >&6; }
31505 can_add_to_cflags=yes
31506 #
31507 # OK, do we have a test program? If so, check
31508 # whether it fails with this option and -Werror,
31509 # and, if so, don't include it.
31510 #
31511 # We test arg 4 here because arg 3 is a program which
31512 # could contain quotes (breaking the comparison).
31513 #
31514 if test "xwarns about variables in function declarations shadowing other variables" != "x" ; then
31515 CFLAGS="$CFLAGS -Werror"
31516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION warns about variables in function declarations shadowing other variables" >&5
31517 $as_echo_n "checking whether $GCC_OPTION warns about variables in function declarations shadowing other variables... " >&6; }
31518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31519 /* end confdefs.h. */
31520 extern int bar(int a);
31521 extern int foo(int);
31522  
31523 int
31524 foo(int a)
31525 {
31526 int (*fptr)(int a) = bar;
31527  
31528 return fptr(a) * 2;
31529 }
31530  
31531 _ACEOF
31532 if ac_fn_c_try_compile "$LINENO"; then :
31533  
31534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31535 $as_echo "no" >&6; }
31536 #
31537 # Remove "force an error for a warning" options, if we
31538 # added them, by setting CFLAGS to the saved value plus
31539 # just the new option.
31540 #
31541  
31542 if ${WS_CFLAGS+:} false; then :
31543  
31544 case " $WS_CFLAGS " in #(
31545 *" $GCC_OPTION "*) :
31546 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
31547 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
31548 ac_status=$?
31549 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31550 test $ac_status = 0; } ;; #(
31551 *) :
31552  
31553 as_fn_append WS_CFLAGS " $GCC_OPTION"
31554 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
31555 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
31556 ac_status=$?
31557 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31558 test $ac_status = 0; }
31559 ;;
31560 esac
31561  
31562 else
31563  
31564 WS_CFLAGS=$GCC_OPTION
31565 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
31566 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
31567 ac_status=$?
31568 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31569 test $ac_status = 0; }
31570  
31571 fi
31572  
31573 if test "$CC" = "$CC_FOR_BUILD"; then
31574 #
31575 # We're building the build tools with the same compiler
31576 # with which we're building Wireshark, so add the flags
31577 # to the flags for that compiler as well.
31578 #
31579  
31580 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
31581  
31582 case " $WS_CFLAGS_FOR_BUILD " in #(
31583 *" $GCC_OPTION "*) :
31584 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
31585 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
31586 ac_status=$?
31587 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31588 test $ac_status = 0; } ;; #(
31589 *) :
31590  
31591 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
31592 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
31593 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
31594 ac_status=$?
31595 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31596 test $ac_status = 0; }
31597 ;;
31598 esac
31599  
31600 else
31601  
31602 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
31603 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
31604 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
31605 ac_status=$?
31606 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31607 test $ac_status = 0; }
31608  
31609 fi
31610  
31611 fi
31612  
31613 else
31614  
31615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31616 $as_echo "yes" >&6; }
31617  
31618 fi
31619 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31620 else
31621 #
31622 # Remove "force an error for a warning" options, if we
31623 # added them, by setting CFLAGS to the saved value plus
31624 # just the new option.
31625 #
31626  
31627 if ${WS_CFLAGS+:} false; then :
31628  
31629 case " $WS_CFLAGS " in #(
31630 *" $GCC_OPTION "*) :
31631 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
31632 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
31633 ac_status=$?
31634 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31635 test $ac_status = 0; } ;; #(
31636 *) :
31637  
31638 as_fn_append WS_CFLAGS " $GCC_OPTION"
31639 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
31640 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
31641 ac_status=$?
31642 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31643 test $ac_status = 0; }
31644 ;;
31645 esac
31646  
31647 else
31648  
31649 WS_CFLAGS=$GCC_OPTION
31650 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
31651 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
31652 ac_status=$?
31653 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31654 test $ac_status = 0; }
31655  
31656 fi
31657  
31658 if test "$CC" = "$CC_FOR_BUILD"; then
31659 #
31660 # We're building the build tools with the same compiler
31661 # with which we're building Wireshark, so add the flags
31662 # to the flags for that compiler as well.
31663 #
31664  
31665 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
31666  
31667 case " $WS_CFLAGS_FOR_BUILD " in #(
31668 *" $GCC_OPTION "*) :
31669 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
31670 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
31671 ac_status=$?
31672 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31673 test $ac_status = 0; } ;; #(
31674 *) :
31675  
31676 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
31677 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
31678 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
31679 ac_status=$?
31680 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31681 test $ac_status = 0; }
31682 ;;
31683 esac
31684  
31685 else
31686  
31687 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
31688 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
31689 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
31690 ac_status=$?
31691 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31692 test $ac_status = 0; }
31693  
31694 fi
31695  
31696 fi
31697 fi
31698  
31699 else
31700  
31701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31702 $as_echo "no" >&6; }
31703 can_add_to_cflags=no
31704  
31705 fi
31706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31707  
31708 CPPFLAGS="$ac_ws_CPPLAGS_saved"
31709 CFLAGS="$ac_ws_CFLAGS_saved"
31710 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
31711 LDFLAGS="$ac_ws_LDFLAGS_saved"
31712  
31713 fi
31714 #
31715 # Did we find a C++ compiler?
31716 #
31717 if test "x$CXX" != "x" ; then
31718 #
31719 # Yes. Is this option only for the C compiler?
31720 #
31721 if test "C" != C ; then
31722 #
31723 # Not C-only; if this option can be added to the C++ compiler
31724 # options, add it.
31725 #
31726 # If the option begins with "-W", add
31727 # $ac_wireshark_unknown_warning_option_error, as per the above, and
31728 # also add $ac_wireshark_non_cxx_warning_option_error, because at
31729 # lease some versions of g++ whine about -Wmissing-prototypes, the
31730 # fact that at least one of those versions refuses to warn about
31731 # function declarations without an earlier declaration nonwithstanding;
31732 # perhaps there's a reason not to warn about that with C++ even though
31733 # warning about it can be a Good Idea with C, but it's not obvious to
31734 # me).
31735 #
31736 # If the option begins with "-f" or "-m", add -Werror to make sure
31737 # that we'll get an error if we get "argument unused during compilation"
31738 # warnings, as those will either cause a failure for files compiled
31739 # with -Werror or annoying noise for files compiled without it.
31740 # (Yeah, you, clang++.)
31741 #
31742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
31743 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
31744  
31745 ac_ws_CPPLAGS_saved="$CPPFLAGS"
31746 ac_ws_CFLAGS_saved="$CFLAGS"
31747 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
31748 ac_ws_LDFLAGS_saved="$LDFLAGS"
31749 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
31750 CFLAGS="$WS_CFLAGS $CFLAGS"
31751 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
31752 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
31753  
31754 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
31755 then
31756 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
31757 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
31758 then
31759 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
31760 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
31761 then
31762 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
31763 else
31764 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
31765 fi
31766 ac_ext=cpp
31767 ac_cpp='$CXXCPP $CPPFLAGS'
31768 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31769 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31770 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31771  
31772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31773 /* end confdefs.h. */
31774  
31775 int foo;
31776  
31777 _ACEOF
31778 if ac_fn_cxx_try_compile "$LINENO"; then :
31779  
31780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31781 $as_echo "yes" >&6; }
31782 can_add_to_cxxflags=yes
31783 #
31784 # OK, do we have a test program? If so, check
31785 # whether it fails with this option and -Werror,
31786 # and, if so, don't include it.
31787 #
31788 # We test arg 4 here because arg 3 is a program which
31789 # could contain quotes (breaking the comparison).
31790 #
31791 if test "xwarns about variables in function declarations shadowing other variables" != "x" ; then
31792 CXXFLAGS="$CXXFLAGS -Werror"
31793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION warns about variables in function declarations shadowing other variables" >&5
31794 $as_echo_n "checking whether $GCC_OPTION warns about variables in function declarations shadowing other variables... " >&6; }
31795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31796 /* end confdefs.h. */
31797 extern int bar(int a);
31798 extern int foo(int);
31799  
31800 int
31801 foo(int a)
31802 {
31803 int (*fptr)(int a) = bar;
31804  
31805 return fptr(a) * 2;
31806 }
31807  
31808 _ACEOF
31809 if ac_fn_cxx_try_compile "$LINENO"; then :
31810  
31811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31812 $as_echo "no" >&6; }
31813 #
31814 # Remove "force an error for a warning" options, if we
31815 # added them, by setting CXXFLAGS to the saved value plus
31816 # just the new option.
31817 #
31818  
31819 if ${WS_CXXFLAGS+:} false; then :
31820  
31821 case " $WS_CXXFLAGS " in #(
31822 *" $GCC_OPTION "*) :
31823 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
31824 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
31825 ac_status=$?
31826 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31827 test $ac_status = 0; } ;; #(
31828 *) :
31829  
31830 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
31831 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
31832 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
31833 ac_status=$?
31834 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31835 test $ac_status = 0; }
31836 ;;
31837 esac
31838  
31839 else
31840  
31841 WS_CXXFLAGS=$GCC_OPTION
31842 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
31843 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
31844 ac_status=$?
31845 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31846 test $ac_status = 0; }
31847  
31848 fi
31849  
31850  
31851 else
31852  
31853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31854 $as_echo "yes" >&6; }
31855  
31856 fi
31857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31858 else
31859 #
31860 # Remove "force an error for a warning" options, if we
31861 # added them, by setting CXXFLAGS to the saved value plus
31862 # just the new option.
31863 #
31864  
31865 if ${WS_CXXFLAGS+:} false; then :
31866  
31867 case " $WS_CXXFLAGS " in #(
31868 *" $GCC_OPTION "*) :
31869 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
31870 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
31871 ac_status=$?
31872 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31873 test $ac_status = 0; } ;; #(
31874 *) :
31875  
31876 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
31877 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
31878 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
31879 ac_status=$?
31880 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31881 test $ac_status = 0; }
31882 ;;
31883 esac
31884  
31885 else
31886  
31887 WS_CXXFLAGS=$GCC_OPTION
31888 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
31889 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
31890 ac_status=$?
31891 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31892 test $ac_status = 0; }
31893  
31894 fi
31895  
31896 fi
31897  
31898 else
31899  
31900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31901 $as_echo "no" >&6; }
31902 can_add_to_cxxflags=no
31903  
31904 fi
31905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31906  
31907 CPPFLAGS="$ac_ws_CPPLAGS_saved"
31908 CFLAGS="$ac_ws_CFLAGS_saved"
31909 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
31910 LDFLAGS="$ac_ws_LDFLAGS_saved"
31911  
31912 ac_ext=c
31913 ac_cpp='$CPP $CPPFLAGS'
31914 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31915 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31916 ac_compiler_gnu=$ac_cv_c_compiler_gnu
31917  
31918 fi
31919 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
31920 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
31921 then
31922 #
31923 # Confusingly, some C++ compilers like -Wmissing-prototypes but
31924 # don't like -Wmissing-declarations and others like
31925 # -Wmissing-declarations but don't like -Wmissing-prototypes,
31926 # the fact that the corresponding C compiler likes both. Don't
31927 # warn about them.
31928 #
31929 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
31930 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
31931 then
31932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
31933 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
31934 fi
31935 fi
31936 fi
31937 fi
31938  
31939  
31940 GCC_OPTION="-Wno-pointer-sign"
31941 can_add_to_cflags=""
31942 can_add_to_cxxflags=""
31943 if test "x$ac_supports_gcc_flags" = "xyes" ; then
31944 if test "C" != CXX ; then
31945 #
31946 # Not C++-only; if this can be added to the C compiler flags, add them.
31947 #
31948 # If the option begins with "-W", add
31949 # $ac_wireshark_unknown_warning_option_error to make sure that
31950 # we'll get an error if it's an unknown warning option; not all
31951 # compilers treat unknown warning options as errors (I'm looking at
31952 # you, clang).
31953 #
31954 # If the option begins with "-f" or "-m", add -Werror to make sure
31955 # that we'll get an error if we get "argument unused during compilation"
31956 # warnings, as those will either cause a failure for files compiled
31957 # with -Werror or annoying noise for files compiled without it.
31958 # (Yeah, you, clang.)
31959 #
31960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
31961 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
31962  
31963 ac_ws_CPPLAGS_saved="$CPPFLAGS"
31964 ac_ws_CFLAGS_saved="$CFLAGS"
31965 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
31966 ac_ws_LDFLAGS_saved="$LDFLAGS"
31967 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
31968 CFLAGS="$WS_CFLAGS $CFLAGS"
31969 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
31970 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
31971  
31972 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
31973 then
31974 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
31975 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
31976 then
31977 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
31978 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
31979 then
31980 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
31981 else
31982 CFLAGS="$CFLAGS $GCC_OPTION"
31983 fi
31984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31985 /* end confdefs.h. */
31986  
31987 int foo;
31988  
31989 _ACEOF
31990 if ac_fn_c_try_compile "$LINENO"; then :
31991  
31992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31993 $as_echo "yes" >&6; }
31994 can_add_to_cflags=yes
31995 #
31996 # OK, do we have a test program? If so, check
31997 # whether it fails with this option and -Werror,
31998 # and, if so, don't include it.
31999 #
32000 # We test arg 4 here because arg 3 is a program which
32001 # could contain quotes (breaking the comparison).
32002 #
32003 if test "x" != "x" ; then
32004 CFLAGS="$CFLAGS -Werror"
32005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
32006 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
32007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32008 /* end confdefs.h. */
32009  
32010 _ACEOF
32011 if ac_fn_c_try_compile "$LINENO"; then :
32012  
32013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32014 $as_echo "no" >&6; }
32015 #
32016 # Remove "force an error for a warning" options, if we
32017 # added them, by setting CFLAGS to the saved value plus
32018 # just the new option.
32019 #
32020  
32021 if ${WS_CFLAGS+:} false; then :
32022  
32023 case " $WS_CFLAGS " in #(
32024 *" $GCC_OPTION "*) :
32025 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
32026 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
32027 ac_status=$?
32028 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32029 test $ac_status = 0; } ;; #(
32030 *) :
32031  
32032 as_fn_append WS_CFLAGS " $GCC_OPTION"
32033 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
32034 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
32035 ac_status=$?
32036 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32037 test $ac_status = 0; }
32038 ;;
32039 esac
32040  
32041 else
32042  
32043 WS_CFLAGS=$GCC_OPTION
32044 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
32045 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
32046 ac_status=$?
32047 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32048 test $ac_status = 0; }
32049  
32050 fi
32051  
32052 if test "$CC" = "$CC_FOR_BUILD"; then
32053 #
32054 # We're building the build tools with the same compiler
32055 # with which we're building Wireshark, so add the flags
32056 # to the flags for that compiler as well.
32057 #
32058  
32059 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
32060  
32061 case " $WS_CFLAGS_FOR_BUILD " in #(
32062 *" $GCC_OPTION "*) :
32063 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
32064 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
32065 ac_status=$?
32066 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32067 test $ac_status = 0; } ;; #(
32068 *) :
32069  
32070 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
32071 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
32072 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
32073 ac_status=$?
32074 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32075 test $ac_status = 0; }
32076 ;;
32077 esac
32078  
32079 else
32080  
32081 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
32082 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
32083 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
32084 ac_status=$?
32085 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32086 test $ac_status = 0; }
32087  
32088 fi
32089  
32090 fi
32091  
32092 else
32093  
32094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32095 $as_echo "yes" >&6; }
32096  
32097 fi
32098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32099 else
32100 #
32101 # Remove "force an error for a warning" options, if we
32102 # added them, by setting CFLAGS to the saved value plus
32103 # just the new option.
32104 #
32105  
32106 if ${WS_CFLAGS+:} false; then :
32107  
32108 case " $WS_CFLAGS " in #(
32109 *" $GCC_OPTION "*) :
32110 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
32111 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
32112 ac_status=$?
32113 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32114 test $ac_status = 0; } ;; #(
32115 *) :
32116  
32117 as_fn_append WS_CFLAGS " $GCC_OPTION"
32118 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
32119 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
32120 ac_status=$?
32121 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32122 test $ac_status = 0; }
32123 ;;
32124 esac
32125  
32126 else
32127  
32128 WS_CFLAGS=$GCC_OPTION
32129 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
32130 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
32131 ac_status=$?
32132 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32133 test $ac_status = 0; }
32134  
32135 fi
32136  
32137 if test "$CC" = "$CC_FOR_BUILD"; then
32138 #
32139 # We're building the build tools with the same compiler
32140 # with which we're building Wireshark, so add the flags
32141 # to the flags for that compiler as well.
32142 #
32143  
32144 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
32145  
32146 case " $WS_CFLAGS_FOR_BUILD " in #(
32147 *" $GCC_OPTION "*) :
32148 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
32149 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
32150 ac_status=$?
32151 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32152 test $ac_status = 0; } ;; #(
32153 *) :
32154  
32155 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
32156 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
32157 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
32158 ac_status=$?
32159 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32160 test $ac_status = 0; }
32161 ;;
32162 esac
32163  
32164 else
32165  
32166 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
32167 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
32168 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
32169 ac_status=$?
32170 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32171 test $ac_status = 0; }
32172  
32173 fi
32174  
32175 fi
32176 fi
32177  
32178 else
32179  
32180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32181 $as_echo "no" >&6; }
32182 can_add_to_cflags=no
32183  
32184 fi
32185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32186  
32187 CPPFLAGS="$ac_ws_CPPLAGS_saved"
32188 CFLAGS="$ac_ws_CFLAGS_saved"
32189 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
32190 LDFLAGS="$ac_ws_LDFLAGS_saved"
32191  
32192 fi
32193 #
32194 # Did we find a C++ compiler?
32195 #
32196 if test "x$CXX" != "x" ; then
32197 #
32198 # Yes. Is this option only for the C compiler?
32199 #
32200 if test "C" != C ; then
32201 #
32202 # Not C-only; if this option can be added to the C++ compiler
32203 # options, add it.
32204 #
32205 # If the option begins with "-W", add
32206 # $ac_wireshark_unknown_warning_option_error, as per the above, and
32207 # also add $ac_wireshark_non_cxx_warning_option_error, because at
32208 # lease some versions of g++ whine about -Wmissing-prototypes, the
32209 # fact that at least one of those versions refuses to warn about
32210 # function declarations without an earlier declaration nonwithstanding;
32211 # perhaps there's a reason not to warn about that with C++ even though
32212 # warning about it can be a Good Idea with C, but it's not obvious to
32213 # me).
32214 #
32215 # If the option begins with "-f" or "-m", add -Werror to make sure
32216 # that we'll get an error if we get "argument unused during compilation"
32217 # warnings, as those will either cause a failure for files compiled
32218 # with -Werror or annoying noise for files compiled without it.
32219 # (Yeah, you, clang++.)
32220 #
32221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
32222 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
32223  
32224 ac_ws_CPPLAGS_saved="$CPPFLAGS"
32225 ac_ws_CFLAGS_saved="$CFLAGS"
32226 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
32227 ac_ws_LDFLAGS_saved="$LDFLAGS"
32228 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
32229 CFLAGS="$WS_CFLAGS $CFLAGS"
32230 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
32231 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
32232  
32233 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
32234 then
32235 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
32236 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
32237 then
32238 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
32239 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
32240 then
32241 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
32242 else
32243 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
32244 fi
32245 ac_ext=cpp
32246 ac_cpp='$CXXCPP $CPPFLAGS'
32247 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32248 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32249 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32250  
32251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32252 /* end confdefs.h. */
32253  
32254 int foo;
32255  
32256 _ACEOF
32257 if ac_fn_cxx_try_compile "$LINENO"; then :
32258  
32259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32260 $as_echo "yes" >&6; }
32261 can_add_to_cxxflags=yes
32262 #
32263 # OK, do we have a test program? If so, check
32264 # whether it fails with this option and -Werror,
32265 # and, if so, don't include it.
32266 #
32267 # We test arg 4 here because arg 3 is a program which
32268 # could contain quotes (breaking the comparison).
32269 #
32270 if test "x" != "x" ; then
32271 CXXFLAGS="$CXXFLAGS -Werror"
32272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
32273 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
32274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32275 /* end confdefs.h. */
32276  
32277 _ACEOF
32278 if ac_fn_cxx_try_compile "$LINENO"; then :
32279  
32280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32281 $as_echo "no" >&6; }
32282 #
32283 # Remove "force an error for a warning" options, if we
32284 # added them, by setting CXXFLAGS to the saved value plus
32285 # just the new option.
32286 #
32287  
32288 if ${WS_CXXFLAGS+:} false; then :
32289  
32290 case " $WS_CXXFLAGS " in #(
32291 *" $GCC_OPTION "*) :
32292 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
32293 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
32294 ac_status=$?
32295 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32296 test $ac_status = 0; } ;; #(
32297 *) :
32298  
32299 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
32300 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
32301 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
32302 ac_status=$?
32303 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32304 test $ac_status = 0; }
32305 ;;
32306 esac
32307  
32308 else
32309  
32310 WS_CXXFLAGS=$GCC_OPTION
32311 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
32312 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
32313 ac_status=$?
32314 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32315 test $ac_status = 0; }
32316  
32317 fi
32318  
32319  
32320 else
32321  
32322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32323 $as_echo "yes" >&6; }
32324  
32325 fi
32326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32327 else
32328 #
32329 # Remove "force an error for a warning" options, if we
32330 # added them, by setting CXXFLAGS to the saved value plus
32331 # just the new option.
32332 #
32333  
32334 if ${WS_CXXFLAGS+:} false; then :
32335  
32336 case " $WS_CXXFLAGS " in #(
32337 *" $GCC_OPTION "*) :
32338 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
32339 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
32340 ac_status=$?
32341 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32342 test $ac_status = 0; } ;; #(
32343 *) :
32344  
32345 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
32346 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
32347 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
32348 ac_status=$?
32349 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32350 test $ac_status = 0; }
32351 ;;
32352 esac
32353  
32354 else
32355  
32356 WS_CXXFLAGS=$GCC_OPTION
32357 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
32358 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
32359 ac_status=$?
32360 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32361 test $ac_status = 0; }
32362  
32363 fi
32364  
32365 fi
32366  
32367 else
32368  
32369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32370 $as_echo "no" >&6; }
32371 can_add_to_cxxflags=no
32372  
32373 fi
32374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32375  
32376 CPPFLAGS="$ac_ws_CPPLAGS_saved"
32377 CFLAGS="$ac_ws_CFLAGS_saved"
32378 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
32379 LDFLAGS="$ac_ws_LDFLAGS_saved"
32380  
32381 ac_ext=c
32382 ac_cpp='$CPP $CPPFLAGS'
32383 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32384 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32385 ac_compiler_gnu=$ac_cv_c_compiler_gnu
32386  
32387 fi
32388 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
32389 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
32390 then
32391 #
32392 # Confusingly, some C++ compilers like -Wmissing-prototypes but
32393 # don't like -Wmissing-declarations and others like
32394 # -Wmissing-declarations but don't like -Wmissing-prototypes,
32395 # the fact that the corresponding C compiler likes both. Don't
32396 # warn about them.
32397 #
32398 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
32399 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
32400 then
32401 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
32402 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
32403 fi
32404 fi
32405 fi
32406 fi
32407  
32408 GCC_OPTION="-Wold-style-definition"
32409 can_add_to_cflags=""
32410 can_add_to_cxxflags=""
32411 if test "x$ac_supports_gcc_flags" = "xyes" ; then
32412 if test "C" != CXX ; then
32413 #
32414 # Not C++-only; if this can be added to the C compiler flags, add them.
32415 #
32416 # If the option begins with "-W", add
32417 # $ac_wireshark_unknown_warning_option_error to make sure that
32418 # we'll get an error if it's an unknown warning option; not all
32419 # compilers treat unknown warning options as errors (I'm looking at
32420 # you, clang).
32421 #
32422 # If the option begins with "-f" or "-m", add -Werror to make sure
32423 # that we'll get an error if we get "argument unused during compilation"
32424 # warnings, as those will either cause a failure for files compiled
32425 # with -Werror or annoying noise for files compiled without it.
32426 # (Yeah, you, clang.)
32427 #
32428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
32429 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
32430  
32431 ac_ws_CPPLAGS_saved="$CPPFLAGS"
32432 ac_ws_CFLAGS_saved="$CFLAGS"
32433 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
32434 ac_ws_LDFLAGS_saved="$LDFLAGS"
32435 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
32436 CFLAGS="$WS_CFLAGS $CFLAGS"
32437 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
32438 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
32439  
32440 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
32441 then
32442 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
32443 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
32444 then
32445 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
32446 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
32447 then
32448 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
32449 else
32450 CFLAGS="$CFLAGS $GCC_OPTION"
32451 fi
32452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32453 /* end confdefs.h. */
32454  
32455 int foo;
32456  
32457 _ACEOF
32458 if ac_fn_c_try_compile "$LINENO"; then :
32459  
32460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32461 $as_echo "yes" >&6; }
32462 can_add_to_cflags=yes
32463 #
32464 # OK, do we have a test program? If so, check
32465 # whether it fails with this option and -Werror,
32466 # and, if so, don't include it.
32467 #
32468 # We test arg 4 here because arg 3 is a program which
32469 # could contain quotes (breaking the comparison).
32470 #
32471 if test "x" != "x" ; then
32472 CFLAGS="$CFLAGS -Werror"
32473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
32474 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
32475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32476 /* end confdefs.h. */
32477  
32478 _ACEOF
32479 if ac_fn_c_try_compile "$LINENO"; then :
32480  
32481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32482 $as_echo "no" >&6; }
32483 #
32484 # Remove "force an error for a warning" options, if we
32485 # added them, by setting CFLAGS to the saved value plus
32486 # just the new option.
32487 #
32488  
32489 if ${WS_CFLAGS+:} false; then :
32490  
32491 case " $WS_CFLAGS " in #(
32492 *" $GCC_OPTION "*) :
32493 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
32494 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
32495 ac_status=$?
32496 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32497 test $ac_status = 0; } ;; #(
32498 *) :
32499  
32500 as_fn_append WS_CFLAGS " $GCC_OPTION"
32501 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
32502 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
32503 ac_status=$?
32504 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32505 test $ac_status = 0; }
32506 ;;
32507 esac
32508  
32509 else
32510  
32511 WS_CFLAGS=$GCC_OPTION
32512 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
32513 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
32514 ac_status=$?
32515 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32516 test $ac_status = 0; }
32517  
32518 fi
32519  
32520 if test "$CC" = "$CC_FOR_BUILD"; then
32521 #
32522 # We're building the build tools with the same compiler
32523 # with which we're building Wireshark, so add the flags
32524 # to the flags for that compiler as well.
32525 #
32526  
32527 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
32528  
32529 case " $WS_CFLAGS_FOR_BUILD " in #(
32530 *" $GCC_OPTION "*) :
32531 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
32532 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
32533 ac_status=$?
32534 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32535 test $ac_status = 0; } ;; #(
32536 *) :
32537  
32538 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
32539 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
32540 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
32541 ac_status=$?
32542 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32543 test $ac_status = 0; }
32544 ;;
32545 esac
32546  
32547 else
32548  
32549 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
32550 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
32551 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
32552 ac_status=$?
32553 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32554 test $ac_status = 0; }
32555  
32556 fi
32557  
32558 fi
32559  
32560 else
32561  
32562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32563 $as_echo "yes" >&6; }
32564  
32565 fi
32566 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32567 else
32568 #
32569 # Remove "force an error for a warning" options, if we
32570 # added them, by setting CFLAGS to the saved value plus
32571 # just the new option.
32572 #
32573  
32574 if ${WS_CFLAGS+:} false; then :
32575  
32576 case " $WS_CFLAGS " in #(
32577 *" $GCC_OPTION "*) :
32578 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
32579 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
32580 ac_status=$?
32581 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32582 test $ac_status = 0; } ;; #(
32583 *) :
32584  
32585 as_fn_append WS_CFLAGS " $GCC_OPTION"
32586 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
32587 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
32588 ac_status=$?
32589 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32590 test $ac_status = 0; }
32591 ;;
32592 esac
32593  
32594 else
32595  
32596 WS_CFLAGS=$GCC_OPTION
32597 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
32598 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
32599 ac_status=$?
32600 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32601 test $ac_status = 0; }
32602  
32603 fi
32604  
32605 if test "$CC" = "$CC_FOR_BUILD"; then
32606 #
32607 # We're building the build tools with the same compiler
32608 # with which we're building Wireshark, so add the flags
32609 # to the flags for that compiler as well.
32610 #
32611  
32612 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
32613  
32614 case " $WS_CFLAGS_FOR_BUILD " in #(
32615 *" $GCC_OPTION "*) :
32616 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
32617 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
32618 ac_status=$?
32619 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32620 test $ac_status = 0; } ;; #(
32621 *) :
32622  
32623 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
32624 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
32625 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
32626 ac_status=$?
32627 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32628 test $ac_status = 0; }
32629 ;;
32630 esac
32631  
32632 else
32633  
32634 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
32635 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
32636 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
32637 ac_status=$?
32638 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32639 test $ac_status = 0; }
32640  
32641 fi
32642  
32643 fi
32644 fi
32645  
32646 else
32647  
32648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32649 $as_echo "no" >&6; }
32650 can_add_to_cflags=no
32651  
32652 fi
32653 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32654  
32655 CPPFLAGS="$ac_ws_CPPLAGS_saved"
32656 CFLAGS="$ac_ws_CFLAGS_saved"
32657 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
32658 LDFLAGS="$ac_ws_LDFLAGS_saved"
32659  
32660 fi
32661 #
32662 # Did we find a C++ compiler?
32663 #
32664 if test "x$CXX" != "x" ; then
32665 #
32666 # Yes. Is this option only for the C compiler?
32667 #
32668 if test "C" != C ; then
32669 #
32670 # Not C-only; if this option can be added to the C++ compiler
32671 # options, add it.
32672 #
32673 # If the option begins with "-W", add
32674 # $ac_wireshark_unknown_warning_option_error, as per the above, and
32675 # also add $ac_wireshark_non_cxx_warning_option_error, because at
32676 # lease some versions of g++ whine about -Wmissing-prototypes, the
32677 # fact that at least one of those versions refuses to warn about
32678 # function declarations without an earlier declaration nonwithstanding;
32679 # perhaps there's a reason not to warn about that with C++ even though
32680 # warning about it can be a Good Idea with C, but it's not obvious to
32681 # me).
32682 #
32683 # If the option begins with "-f" or "-m", add -Werror to make sure
32684 # that we'll get an error if we get "argument unused during compilation"
32685 # warnings, as those will either cause a failure for files compiled
32686 # with -Werror or annoying noise for files compiled without it.
32687 # (Yeah, you, clang++.)
32688 #
32689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
32690 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
32691  
32692 ac_ws_CPPLAGS_saved="$CPPFLAGS"
32693 ac_ws_CFLAGS_saved="$CFLAGS"
32694 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
32695 ac_ws_LDFLAGS_saved="$LDFLAGS"
32696 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
32697 CFLAGS="$WS_CFLAGS $CFLAGS"
32698 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
32699 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
32700  
32701 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
32702 then
32703 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
32704 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
32705 then
32706 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
32707 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
32708 then
32709 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
32710 else
32711 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
32712 fi
32713 ac_ext=cpp
32714 ac_cpp='$CXXCPP $CPPFLAGS'
32715 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32716 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32717 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32718  
32719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32720 /* end confdefs.h. */
32721  
32722 int foo;
32723  
32724 _ACEOF
32725 if ac_fn_cxx_try_compile "$LINENO"; then :
32726  
32727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32728 $as_echo "yes" >&6; }
32729 can_add_to_cxxflags=yes
32730 #
32731 # OK, do we have a test program? If so, check
32732 # whether it fails with this option and -Werror,
32733 # and, if so, don't include it.
32734 #
32735 # We test arg 4 here because arg 3 is a program which
32736 # could contain quotes (breaking the comparison).
32737 #
32738 if test "x" != "x" ; then
32739 CXXFLAGS="$CXXFLAGS -Werror"
32740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
32741 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
32742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32743 /* end confdefs.h. */
32744  
32745 _ACEOF
32746 if ac_fn_cxx_try_compile "$LINENO"; then :
32747  
32748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32749 $as_echo "no" >&6; }
32750 #
32751 # Remove "force an error for a warning" options, if we
32752 # added them, by setting CXXFLAGS to the saved value plus
32753 # just the new option.
32754 #
32755  
32756 if ${WS_CXXFLAGS+:} false; then :
32757  
32758 case " $WS_CXXFLAGS " in #(
32759 *" $GCC_OPTION "*) :
32760 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
32761 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
32762 ac_status=$?
32763 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32764 test $ac_status = 0; } ;; #(
32765 *) :
32766  
32767 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
32768 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
32769 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
32770 ac_status=$?
32771 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32772 test $ac_status = 0; }
32773 ;;
32774 esac
32775  
32776 else
32777  
32778 WS_CXXFLAGS=$GCC_OPTION
32779 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
32780 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
32781 ac_status=$?
32782 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32783 test $ac_status = 0; }
32784  
32785 fi
32786  
32787  
32788 else
32789  
32790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32791 $as_echo "yes" >&6; }
32792  
32793 fi
32794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32795 else
32796 #
32797 # Remove "force an error for a warning" options, if we
32798 # added them, by setting CXXFLAGS to the saved value plus
32799 # just the new option.
32800 #
32801  
32802 if ${WS_CXXFLAGS+:} false; then :
32803  
32804 case " $WS_CXXFLAGS " in #(
32805 *" $GCC_OPTION "*) :
32806 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
32807 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
32808 ac_status=$?
32809 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32810 test $ac_status = 0; } ;; #(
32811 *) :
32812  
32813 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
32814 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
32815 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
32816 ac_status=$?
32817 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32818 test $ac_status = 0; }
32819 ;;
32820 esac
32821  
32822 else
32823  
32824 WS_CXXFLAGS=$GCC_OPTION
32825 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
32826 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
32827 ac_status=$?
32828 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32829 test $ac_status = 0; }
32830  
32831 fi
32832  
32833 fi
32834  
32835 else
32836  
32837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32838 $as_echo "no" >&6; }
32839 can_add_to_cxxflags=no
32840  
32841 fi
32842 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32843  
32844 CPPFLAGS="$ac_ws_CPPLAGS_saved"
32845 CFLAGS="$ac_ws_CFLAGS_saved"
32846 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
32847 LDFLAGS="$ac_ws_LDFLAGS_saved"
32848  
32849 ac_ext=c
32850 ac_cpp='$CPP $CPPFLAGS'
32851 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32852 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32853 ac_compiler_gnu=$ac_cv_c_compiler_gnu
32854  
32855 fi
32856 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
32857 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
32858 then
32859 #
32860 # Confusingly, some C++ compilers like -Wmissing-prototypes but
32861 # don't like -Wmissing-declarations and others like
32862 # -Wmissing-declarations but don't like -Wmissing-prototypes,
32863 # the fact that the corresponding C compiler likes both. Don't
32864 # warn about them.
32865 #
32866 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
32867 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
32868 then
32869 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
32870 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
32871 fi
32872 fi
32873 fi
32874 fi
32875  
32876 GCC_OPTION="-Wstrict-prototypes"
32877 can_add_to_cflags=""
32878 can_add_to_cxxflags=""
32879 if test "x$ac_supports_gcc_flags" = "xyes" ; then
32880 if test "C" != CXX ; then
32881 #
32882 # Not C++-only; if this can be added to the C compiler flags, add them.
32883 #
32884 # If the option begins with "-W", add
32885 # $ac_wireshark_unknown_warning_option_error to make sure that
32886 # we'll get an error if it's an unknown warning option; not all
32887 # compilers treat unknown warning options as errors (I'm looking at
32888 # you, clang).
32889 #
32890 # If the option begins with "-f" or "-m", add -Werror to make sure
32891 # that we'll get an error if we get "argument unused during compilation"
32892 # warnings, as those will either cause a failure for files compiled
32893 # with -Werror or annoying noise for files compiled without it.
32894 # (Yeah, you, clang.)
32895 #
32896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
32897 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
32898  
32899 ac_ws_CPPLAGS_saved="$CPPFLAGS"
32900 ac_ws_CFLAGS_saved="$CFLAGS"
32901 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
32902 ac_ws_LDFLAGS_saved="$LDFLAGS"
32903 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
32904 CFLAGS="$WS_CFLAGS $CFLAGS"
32905 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
32906 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
32907  
32908 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
32909 then
32910 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
32911 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
32912 then
32913 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
32914 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
32915 then
32916 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
32917 else
32918 CFLAGS="$CFLAGS $GCC_OPTION"
32919 fi
32920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32921 /* end confdefs.h. */
32922  
32923 int foo;
32924  
32925 _ACEOF
32926 if ac_fn_c_try_compile "$LINENO"; then :
32927  
32928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32929 $as_echo "yes" >&6; }
32930 can_add_to_cflags=yes
32931 #
32932 # OK, do we have a test program? If so, check
32933 # whether it fails with this option and -Werror,
32934 # and, if so, don't include it.
32935 #
32936 # We test arg 4 here because arg 3 is a program which
32937 # could contain quotes (breaking the comparison).
32938 #
32939 if test "x" != "x" ; then
32940 CFLAGS="$CFLAGS -Werror"
32941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
32942 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
32943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32944 /* end confdefs.h. */
32945  
32946 _ACEOF
32947 if ac_fn_c_try_compile "$LINENO"; then :
32948  
32949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32950 $as_echo "no" >&6; }
32951 #
32952 # Remove "force an error for a warning" options, if we
32953 # added them, by setting CFLAGS to the saved value plus
32954 # just the new option.
32955 #
32956  
32957 if ${WS_CFLAGS+:} false; then :
32958  
32959 case " $WS_CFLAGS " in #(
32960 *" $GCC_OPTION "*) :
32961 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
32962 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
32963 ac_status=$?
32964 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32965 test $ac_status = 0; } ;; #(
32966 *) :
32967  
32968 as_fn_append WS_CFLAGS " $GCC_OPTION"
32969 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
32970 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
32971 ac_status=$?
32972 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32973 test $ac_status = 0; }
32974 ;;
32975 esac
32976  
32977 else
32978  
32979 WS_CFLAGS=$GCC_OPTION
32980 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
32981 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
32982 ac_status=$?
32983 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32984 test $ac_status = 0; }
32985  
32986 fi
32987  
32988 if test "$CC" = "$CC_FOR_BUILD"; then
32989 #
32990 # We're building the build tools with the same compiler
32991 # with which we're building Wireshark, so add the flags
32992 # to the flags for that compiler as well.
32993 #
32994  
32995 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
32996  
32997 case " $WS_CFLAGS_FOR_BUILD " in #(
32998 *" $GCC_OPTION "*) :
32999 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
33000 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
33001 ac_status=$?
33002 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33003 test $ac_status = 0; } ;; #(
33004 *) :
33005  
33006 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
33007 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
33008 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
33009 ac_status=$?
33010 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33011 test $ac_status = 0; }
33012 ;;
33013 esac
33014  
33015 else
33016  
33017 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
33018 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
33019 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
33020 ac_status=$?
33021 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33022 test $ac_status = 0; }
33023  
33024 fi
33025  
33026 fi
33027  
33028 else
33029  
33030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33031 $as_echo "yes" >&6; }
33032  
33033 fi
33034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33035 else
33036 #
33037 # Remove "force an error for a warning" options, if we
33038 # added them, by setting CFLAGS to the saved value plus
33039 # just the new option.
33040 #
33041  
33042 if ${WS_CFLAGS+:} false; then :
33043  
33044 case " $WS_CFLAGS " in #(
33045 *" $GCC_OPTION "*) :
33046 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
33047 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
33048 ac_status=$?
33049 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33050 test $ac_status = 0; } ;; #(
33051 *) :
33052  
33053 as_fn_append WS_CFLAGS " $GCC_OPTION"
33054 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
33055 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
33056 ac_status=$?
33057 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33058 test $ac_status = 0; }
33059 ;;
33060 esac
33061  
33062 else
33063  
33064 WS_CFLAGS=$GCC_OPTION
33065 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
33066 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
33067 ac_status=$?
33068 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33069 test $ac_status = 0; }
33070  
33071 fi
33072  
33073 if test "$CC" = "$CC_FOR_BUILD"; then
33074 #
33075 # We're building the build tools with the same compiler
33076 # with which we're building Wireshark, so add the flags
33077 # to the flags for that compiler as well.
33078 #
33079  
33080 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
33081  
33082 case " $WS_CFLAGS_FOR_BUILD " in #(
33083 *" $GCC_OPTION "*) :
33084 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
33085 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
33086 ac_status=$?
33087 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33088 test $ac_status = 0; } ;; #(
33089 *) :
33090  
33091 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
33092 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
33093 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
33094 ac_status=$?
33095 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33096 test $ac_status = 0; }
33097 ;;
33098 esac
33099  
33100 else
33101  
33102 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
33103 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
33104 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
33105 ac_status=$?
33106 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33107 test $ac_status = 0; }
33108  
33109 fi
33110  
33111 fi
33112 fi
33113  
33114 else
33115  
33116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33117 $as_echo "no" >&6; }
33118 can_add_to_cflags=no
33119  
33120 fi
33121 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33122  
33123 CPPFLAGS="$ac_ws_CPPLAGS_saved"
33124 CFLAGS="$ac_ws_CFLAGS_saved"
33125 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
33126 LDFLAGS="$ac_ws_LDFLAGS_saved"
33127  
33128 fi
33129 #
33130 # Did we find a C++ compiler?
33131 #
33132 if test "x$CXX" != "x" ; then
33133 #
33134 # Yes. Is this option only for the C compiler?
33135 #
33136 if test "C" != C ; then
33137 #
33138 # Not C-only; if this option can be added to the C++ compiler
33139 # options, add it.
33140 #
33141 # If the option begins with "-W", add
33142 # $ac_wireshark_unknown_warning_option_error, as per the above, and
33143 # also add $ac_wireshark_non_cxx_warning_option_error, because at
33144 # lease some versions of g++ whine about -Wmissing-prototypes, the
33145 # fact that at least one of those versions refuses to warn about
33146 # function declarations without an earlier declaration nonwithstanding;
33147 # perhaps there's a reason not to warn about that with C++ even though
33148 # warning about it can be a Good Idea with C, but it's not obvious to
33149 # me).
33150 #
33151 # If the option begins with "-f" or "-m", add -Werror to make sure
33152 # that we'll get an error if we get "argument unused during compilation"
33153 # warnings, as those will either cause a failure for files compiled
33154 # with -Werror or annoying noise for files compiled without it.
33155 # (Yeah, you, clang++.)
33156 #
33157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
33158 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
33159  
33160 ac_ws_CPPLAGS_saved="$CPPFLAGS"
33161 ac_ws_CFLAGS_saved="$CFLAGS"
33162 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
33163 ac_ws_LDFLAGS_saved="$LDFLAGS"
33164 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
33165 CFLAGS="$WS_CFLAGS $CFLAGS"
33166 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
33167 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
33168  
33169 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
33170 then
33171 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
33172 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
33173 then
33174 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
33175 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
33176 then
33177 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
33178 else
33179 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
33180 fi
33181 ac_ext=cpp
33182 ac_cpp='$CXXCPP $CPPFLAGS'
33183 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33184 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33185 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33186  
33187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33188 /* end confdefs.h. */
33189  
33190 int foo;
33191  
33192 _ACEOF
33193 if ac_fn_cxx_try_compile "$LINENO"; then :
33194  
33195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33196 $as_echo "yes" >&6; }
33197 can_add_to_cxxflags=yes
33198 #
33199 # OK, do we have a test program? If so, check
33200 # whether it fails with this option and -Werror,
33201 # and, if so, don't include it.
33202 #
33203 # We test arg 4 here because arg 3 is a program which
33204 # could contain quotes (breaking the comparison).
33205 #
33206 if test "x" != "x" ; then
33207 CXXFLAGS="$CXXFLAGS -Werror"
33208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
33209 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
33210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33211 /* end confdefs.h. */
33212  
33213 _ACEOF
33214 if ac_fn_cxx_try_compile "$LINENO"; then :
33215  
33216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33217 $as_echo "no" >&6; }
33218 #
33219 # Remove "force an error for a warning" options, if we
33220 # added them, by setting CXXFLAGS to the saved value plus
33221 # just the new option.
33222 #
33223  
33224 if ${WS_CXXFLAGS+:} false; then :
33225  
33226 case " $WS_CXXFLAGS " in #(
33227 *" $GCC_OPTION "*) :
33228 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
33229 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
33230 ac_status=$?
33231 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33232 test $ac_status = 0; } ;; #(
33233 *) :
33234  
33235 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
33236 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
33237 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
33238 ac_status=$?
33239 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33240 test $ac_status = 0; }
33241 ;;
33242 esac
33243  
33244 else
33245  
33246 WS_CXXFLAGS=$GCC_OPTION
33247 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
33248 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
33249 ac_status=$?
33250 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33251 test $ac_status = 0; }
33252  
33253 fi
33254  
33255  
33256 else
33257  
33258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33259 $as_echo "yes" >&6; }
33260  
33261 fi
33262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33263 else
33264 #
33265 # Remove "force an error for a warning" options, if we
33266 # added them, by setting CXXFLAGS to the saved value plus
33267 # just the new option.
33268 #
33269  
33270 if ${WS_CXXFLAGS+:} false; then :
33271  
33272 case " $WS_CXXFLAGS " in #(
33273 *" $GCC_OPTION "*) :
33274 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
33275 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
33276 ac_status=$?
33277 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33278 test $ac_status = 0; } ;; #(
33279 *) :
33280  
33281 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
33282 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
33283 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
33284 ac_status=$?
33285 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33286 test $ac_status = 0; }
33287 ;;
33288 esac
33289  
33290 else
33291  
33292 WS_CXXFLAGS=$GCC_OPTION
33293 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
33294 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
33295 ac_status=$?
33296 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33297 test $ac_status = 0; }
33298  
33299 fi
33300  
33301 fi
33302  
33303 else
33304  
33305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33306 $as_echo "no" >&6; }
33307 can_add_to_cxxflags=no
33308  
33309 fi
33310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33311  
33312 CPPFLAGS="$ac_ws_CPPLAGS_saved"
33313 CFLAGS="$ac_ws_CFLAGS_saved"
33314 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
33315 LDFLAGS="$ac_ws_LDFLAGS_saved"
33316  
33317 ac_ext=c
33318 ac_cpp='$CPP $CPPFLAGS'
33319 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33320 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33321 ac_compiler_gnu=$ac_cv_c_compiler_gnu
33322  
33323 fi
33324 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
33325 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
33326 then
33327 #
33328 # Confusingly, some C++ compilers like -Wmissing-prototypes but
33329 # don't like -Wmissing-declarations and others like
33330 # -Wmissing-declarations but don't like -Wmissing-prototypes,
33331 # the fact that the corresponding C compiler likes both. Don't
33332 # warn about them.
33333 #
33334 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
33335 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
33336 then
33337 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
33338 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
33339 fi
33340 fi
33341 fi
33342 fi
33343  
33344  
33345 # Unfortunately some versions of gcc generate logical-op warnings when strchr()
33346 # is given a constant string.
33347 # gcc versions 4.3.2 and 4.4.5 are known to have the problem.
33348 GCC_OPTION="-Wlogical-op"
33349 can_add_to_cflags=""
33350 can_add_to_cxxflags=""
33351 if test "x$ac_supports_gcc_flags" = "xyes" ; then
33352 if test "C" != CXX ; then
33353 #
33354 # Not C++-only; if this can be added to the C compiler flags, add them.
33355 #
33356 # If the option begins with "-W", add
33357 # $ac_wireshark_unknown_warning_option_error to make sure that
33358 # we'll get an error if it's an unknown warning option; not all
33359 # compilers treat unknown warning options as errors (I'm looking at
33360 # you, clang).
33361 #
33362 # If the option begins with "-f" or "-m", add -Werror to make sure
33363 # that we'll get an error if we get "argument unused during compilation"
33364 # warnings, as those will either cause a failure for files compiled
33365 # with -Werror or annoying noise for files compiled without it.
33366 # (Yeah, you, clang.)
33367 #
33368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
33369 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
33370  
33371 ac_ws_CPPLAGS_saved="$CPPFLAGS"
33372 ac_ws_CFLAGS_saved="$CFLAGS"
33373 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
33374 ac_ws_LDFLAGS_saved="$LDFLAGS"
33375 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
33376 CFLAGS="$WS_CFLAGS $CFLAGS"
33377 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
33378 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
33379  
33380 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
33381 then
33382 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
33383 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
33384 then
33385 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
33386 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
33387 then
33388 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
33389 else
33390 CFLAGS="$CFLAGS $GCC_OPTION"
33391 fi
33392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33393 /* end confdefs.h. */
33394  
33395 int foo;
33396  
33397 _ACEOF
33398 if ac_fn_c_try_compile "$LINENO"; then :
33399  
33400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33401 $as_echo "yes" >&6; }
33402 can_add_to_cflags=yes
33403 #
33404 # OK, do we have a test program? If so, check
33405 # whether it fails with this option and -Werror,
33406 # and, if so, don't include it.
33407 #
33408 # We test arg 4 here because arg 3 is a program which
33409 # could contain quotes (breaking the comparison).
33410 #
33411 if test "xgenerates warnings from strchr()" != "x" ; then
33412 CFLAGS="$CFLAGS -Werror"
33413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION generates warnings from strchr()" >&5
33414 $as_echo_n "checking whether $GCC_OPTION generates warnings from strchr()... " >&6; }
33415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33416 /* end confdefs.h. */
33417 #include <string.h>
33418  
33419 int foo(const char *, int);
33420 int bar(void);
33421  
33422 int
33423 foo(const char *sep, int c)
33424 {
33425 if (strchr (sep, c) != NULL)
33426 return 1;
33427 else
33428 return 0;
33429 }
33430  
33431 int
33432 bar(void)
33433 {
33434 return foo("<", 'a');
33435 }
33436  
33437 _ACEOF
33438 if ac_fn_c_try_compile "$LINENO"; then :
33439  
33440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33441 $as_echo "no" >&6; }
33442 #
33443 # Remove "force an error for a warning" options, if we
33444 # added them, by setting CFLAGS to the saved value plus
33445 # just the new option.
33446 #
33447  
33448 if ${WS_CFLAGS+:} false; then :
33449  
33450 case " $WS_CFLAGS " in #(
33451 *" $GCC_OPTION "*) :
33452 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
33453 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
33454 ac_status=$?
33455 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33456 test $ac_status = 0; } ;; #(
33457 *) :
33458  
33459 as_fn_append WS_CFLAGS " $GCC_OPTION"
33460 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
33461 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
33462 ac_status=$?
33463 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33464 test $ac_status = 0; }
33465 ;;
33466 esac
33467  
33468 else
33469  
33470 WS_CFLAGS=$GCC_OPTION
33471 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
33472 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
33473 ac_status=$?
33474 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33475 test $ac_status = 0; }
33476  
33477 fi
33478  
33479 if test "$CC" = "$CC_FOR_BUILD"; then
33480 #
33481 # We're building the build tools with the same compiler
33482 # with which we're building Wireshark, so add the flags
33483 # to the flags for that compiler as well.
33484 #
33485  
33486 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
33487  
33488 case " $WS_CFLAGS_FOR_BUILD " in #(
33489 *" $GCC_OPTION "*) :
33490 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
33491 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
33492 ac_status=$?
33493 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33494 test $ac_status = 0; } ;; #(
33495 *) :
33496  
33497 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
33498 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
33499 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
33500 ac_status=$?
33501 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33502 test $ac_status = 0; }
33503 ;;
33504 esac
33505  
33506 else
33507  
33508 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
33509 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
33510 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
33511 ac_status=$?
33512 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33513 test $ac_status = 0; }
33514  
33515 fi
33516  
33517 fi
33518  
33519 else
33520  
33521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33522 $as_echo "yes" >&6; }
33523  
33524 fi
33525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33526 else
33527 #
33528 # Remove "force an error for a warning" options, if we
33529 # added them, by setting CFLAGS to the saved value plus
33530 # just the new option.
33531 #
33532  
33533 if ${WS_CFLAGS+:} false; then :
33534  
33535 case " $WS_CFLAGS " in #(
33536 *" $GCC_OPTION "*) :
33537 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
33538 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
33539 ac_status=$?
33540 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33541 test $ac_status = 0; } ;; #(
33542 *) :
33543  
33544 as_fn_append WS_CFLAGS " $GCC_OPTION"
33545 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
33546 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
33547 ac_status=$?
33548 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33549 test $ac_status = 0; }
33550 ;;
33551 esac
33552  
33553 else
33554  
33555 WS_CFLAGS=$GCC_OPTION
33556 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
33557 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
33558 ac_status=$?
33559 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33560 test $ac_status = 0; }
33561  
33562 fi
33563  
33564 if test "$CC" = "$CC_FOR_BUILD"; then
33565 #
33566 # We're building the build tools with the same compiler
33567 # with which we're building Wireshark, so add the flags
33568 # to the flags for that compiler as well.
33569 #
33570  
33571 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
33572  
33573 case " $WS_CFLAGS_FOR_BUILD " in #(
33574 *" $GCC_OPTION "*) :
33575 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
33576 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
33577 ac_status=$?
33578 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33579 test $ac_status = 0; } ;; #(
33580 *) :
33581  
33582 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
33583 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
33584 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
33585 ac_status=$?
33586 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33587 test $ac_status = 0; }
33588 ;;
33589 esac
33590  
33591 else
33592  
33593 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
33594 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
33595 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
33596 ac_status=$?
33597 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33598 test $ac_status = 0; }
33599  
33600 fi
33601  
33602 fi
33603 fi
33604  
33605 else
33606  
33607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33608 $as_echo "no" >&6; }
33609 can_add_to_cflags=no
33610  
33611 fi
33612 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33613  
33614 CPPFLAGS="$ac_ws_CPPLAGS_saved"
33615 CFLAGS="$ac_ws_CFLAGS_saved"
33616 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
33617 LDFLAGS="$ac_ws_LDFLAGS_saved"
33618  
33619 fi
33620 #
33621 # Did we find a C++ compiler?
33622 #
33623 if test "x$CXX" != "x" ; then
33624 #
33625 # Yes. Is this option only for the C compiler?
33626 #
33627 if test "C" != C ; then
33628 #
33629 # Not C-only; if this option can be added to the C++ compiler
33630 # options, add it.
33631 #
33632 # If the option begins with "-W", add
33633 # $ac_wireshark_unknown_warning_option_error, as per the above, and
33634 # also add $ac_wireshark_non_cxx_warning_option_error, because at
33635 # lease some versions of g++ whine about -Wmissing-prototypes, the
33636 # fact that at least one of those versions refuses to warn about
33637 # function declarations without an earlier declaration nonwithstanding;
33638 # perhaps there's a reason not to warn about that with C++ even though
33639 # warning about it can be a Good Idea with C, but it's not obvious to
33640 # me).
33641 #
33642 # If the option begins with "-f" or "-m", add -Werror to make sure
33643 # that we'll get an error if we get "argument unused during compilation"
33644 # warnings, as those will either cause a failure for files compiled
33645 # with -Werror or annoying noise for files compiled without it.
33646 # (Yeah, you, clang++.)
33647 #
33648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
33649 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
33650  
33651 ac_ws_CPPLAGS_saved="$CPPFLAGS"
33652 ac_ws_CFLAGS_saved="$CFLAGS"
33653 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
33654 ac_ws_LDFLAGS_saved="$LDFLAGS"
33655 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
33656 CFLAGS="$WS_CFLAGS $CFLAGS"
33657 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
33658 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
33659  
33660 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
33661 then
33662 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
33663 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
33664 then
33665 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
33666 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
33667 then
33668 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
33669 else
33670 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
33671 fi
33672 ac_ext=cpp
33673 ac_cpp='$CXXCPP $CPPFLAGS'
33674 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33675 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33676 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33677  
33678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33679 /* end confdefs.h. */
33680  
33681 int foo;
33682  
33683 _ACEOF
33684 if ac_fn_cxx_try_compile "$LINENO"; then :
33685  
33686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33687 $as_echo "yes" >&6; }
33688 can_add_to_cxxflags=yes
33689 #
33690 # OK, do we have a test program? If so, check
33691 # whether it fails with this option and -Werror,
33692 # and, if so, don't include it.
33693 #
33694 # We test arg 4 here because arg 3 is a program which
33695 # could contain quotes (breaking the comparison).
33696 #
33697 if test "xgenerates warnings from strchr()" != "x" ; then
33698 CXXFLAGS="$CXXFLAGS -Werror"
33699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION generates warnings from strchr()" >&5
33700 $as_echo_n "checking whether $GCC_OPTION generates warnings from strchr()... " >&6; }
33701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33702 /* end confdefs.h. */
33703 #include <string.h>
33704  
33705 int foo(const char *, int);
33706 int bar(void);
33707  
33708 int
33709 foo(const char *sep, int c)
33710 {
33711 if (strchr (sep, c) != NULL)
33712 return 1;
33713 else
33714 return 0;
33715 }
33716  
33717 int
33718 bar(void)
33719 {
33720 return foo("<", 'a');
33721 }
33722  
33723 _ACEOF
33724 if ac_fn_cxx_try_compile "$LINENO"; then :
33725  
33726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33727 $as_echo "no" >&6; }
33728 #
33729 # Remove "force an error for a warning" options, if we
33730 # added them, by setting CXXFLAGS to the saved value plus
33731 # just the new option.
33732 #
33733  
33734 if ${WS_CXXFLAGS+:} false; then :
33735  
33736 case " $WS_CXXFLAGS " in #(
33737 *" $GCC_OPTION "*) :
33738 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
33739 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
33740 ac_status=$?
33741 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33742 test $ac_status = 0; } ;; #(
33743 *) :
33744  
33745 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
33746 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
33747 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
33748 ac_status=$?
33749 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33750 test $ac_status = 0; }
33751 ;;
33752 esac
33753  
33754 else
33755  
33756 WS_CXXFLAGS=$GCC_OPTION
33757 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
33758 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
33759 ac_status=$?
33760 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33761 test $ac_status = 0; }
33762  
33763 fi
33764  
33765  
33766 else
33767  
33768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33769 $as_echo "yes" >&6; }
33770  
33771 fi
33772 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33773 else
33774 #
33775 # Remove "force an error for a warning" options, if we
33776 # added them, by setting CXXFLAGS to the saved value plus
33777 # just the new option.
33778 #
33779  
33780 if ${WS_CXXFLAGS+:} false; then :
33781  
33782 case " $WS_CXXFLAGS " in #(
33783 *" $GCC_OPTION "*) :
33784 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
33785 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
33786 ac_status=$?
33787 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33788 test $ac_status = 0; } ;; #(
33789 *) :
33790  
33791 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
33792 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
33793 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
33794 ac_status=$?
33795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33796 test $ac_status = 0; }
33797 ;;
33798 esac
33799  
33800 else
33801  
33802 WS_CXXFLAGS=$GCC_OPTION
33803 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
33804 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
33805 ac_status=$?
33806 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33807 test $ac_status = 0; }
33808  
33809 fi
33810  
33811 fi
33812  
33813 else
33814  
33815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33816 $as_echo "no" >&6; }
33817 can_add_to_cxxflags=no
33818  
33819 fi
33820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33821  
33822 CPPFLAGS="$ac_ws_CPPLAGS_saved"
33823 CFLAGS="$ac_ws_CFLAGS_saved"
33824 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
33825 LDFLAGS="$ac_ws_LDFLAGS_saved"
33826  
33827 ac_ext=c
33828 ac_cpp='$CPP $CPPFLAGS'
33829 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33830 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33831 ac_compiler_gnu=$ac_cv_c_compiler_gnu
33832  
33833 fi
33834 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
33835 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
33836 then
33837 #
33838 # Confusingly, some C++ compilers like -Wmissing-prototypes but
33839 # don't like -Wmissing-declarations and others like
33840 # -Wmissing-declarations but don't like -Wmissing-prototypes,
33841 # the fact that the corresponding C compiler likes both. Don't
33842 # warn about them.
33843 #
33844 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
33845 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
33846 then
33847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
33848 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
33849 fi
33850 fi
33851 fi
33852 fi
33853  
33854  
33855 GCC_OPTION="-Wjump-misses-init"
33856 can_add_to_cflags=""
33857 can_add_to_cxxflags=""
33858 if test "x$ac_supports_gcc_flags" = "xyes" ; then
33859 if test "C" != CXX ; then
33860 #
33861 # Not C++-only; if this can be added to the C compiler flags, add them.
33862 #
33863 # If the option begins with "-W", add
33864 # $ac_wireshark_unknown_warning_option_error to make sure that
33865 # we'll get an error if it's an unknown warning option; not all
33866 # compilers treat unknown warning options as errors (I'm looking at
33867 # you, clang).
33868 #
33869 # If the option begins with "-f" or "-m", add -Werror to make sure
33870 # that we'll get an error if we get "argument unused during compilation"
33871 # warnings, as those will either cause a failure for files compiled
33872 # with -Werror or annoying noise for files compiled without it.
33873 # (Yeah, you, clang.)
33874 #
33875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
33876 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
33877  
33878 ac_ws_CPPLAGS_saved="$CPPFLAGS"
33879 ac_ws_CFLAGS_saved="$CFLAGS"
33880 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
33881 ac_ws_LDFLAGS_saved="$LDFLAGS"
33882 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
33883 CFLAGS="$WS_CFLAGS $CFLAGS"
33884 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
33885 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
33886  
33887 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
33888 then
33889 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
33890 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
33891 then
33892 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
33893 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
33894 then
33895 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
33896 else
33897 CFLAGS="$CFLAGS $GCC_OPTION"
33898 fi
33899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33900 /* end confdefs.h. */
33901  
33902 int foo;
33903  
33904 _ACEOF
33905 if ac_fn_c_try_compile "$LINENO"; then :
33906  
33907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33908 $as_echo "yes" >&6; }
33909 can_add_to_cflags=yes
33910 #
33911 # OK, do we have a test program? If so, check
33912 # whether it fails with this option and -Werror,
33913 # and, if so, don't include it.
33914 #
33915 # We test arg 4 here because arg 3 is a program which
33916 # could contain quotes (breaking the comparison).
33917 #
33918 if test "x" != "x" ; then
33919 CFLAGS="$CFLAGS -Werror"
33920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
33921 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
33922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33923 /* end confdefs.h. */
33924  
33925 _ACEOF
33926 if ac_fn_c_try_compile "$LINENO"; then :
33927  
33928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33929 $as_echo "no" >&6; }
33930 #
33931 # Remove "force an error for a warning" options, if we
33932 # added them, by setting CFLAGS to the saved value plus
33933 # just the new option.
33934 #
33935  
33936 if ${WS_CFLAGS+:} false; then :
33937  
33938 case " $WS_CFLAGS " in #(
33939 *" $GCC_OPTION "*) :
33940 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
33941 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
33942 ac_status=$?
33943 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33944 test $ac_status = 0; } ;; #(
33945 *) :
33946  
33947 as_fn_append WS_CFLAGS " $GCC_OPTION"
33948 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
33949 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
33950 ac_status=$?
33951 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33952 test $ac_status = 0; }
33953 ;;
33954 esac
33955  
33956 else
33957  
33958 WS_CFLAGS=$GCC_OPTION
33959 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
33960 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
33961 ac_status=$?
33962 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33963 test $ac_status = 0; }
33964  
33965 fi
33966  
33967 if test "$CC" = "$CC_FOR_BUILD"; then
33968 #
33969 # We're building the build tools with the same compiler
33970 # with which we're building Wireshark, so add the flags
33971 # to the flags for that compiler as well.
33972 #
33973  
33974 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
33975  
33976 case " $WS_CFLAGS_FOR_BUILD " in #(
33977 *" $GCC_OPTION "*) :
33978 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
33979 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
33980 ac_status=$?
33981 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33982 test $ac_status = 0; } ;; #(
33983 *) :
33984  
33985 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
33986 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
33987 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
33988 ac_status=$?
33989 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33990 test $ac_status = 0; }
33991 ;;
33992 esac
33993  
33994 else
33995  
33996 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
33997 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
33998 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
33999 ac_status=$?
34000 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34001 test $ac_status = 0; }
34002  
34003 fi
34004  
34005 fi
34006  
34007 else
34008  
34009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34010 $as_echo "yes" >&6; }
34011  
34012 fi
34013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34014 else
34015 #
34016 # Remove "force an error for a warning" options, if we
34017 # added them, by setting CFLAGS to the saved value plus
34018 # just the new option.
34019 #
34020  
34021 if ${WS_CFLAGS+:} false; then :
34022  
34023 case " $WS_CFLAGS " in #(
34024 *" $GCC_OPTION "*) :
34025 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
34026 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
34027 ac_status=$?
34028 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34029 test $ac_status = 0; } ;; #(
34030 *) :
34031  
34032 as_fn_append WS_CFLAGS " $GCC_OPTION"
34033 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
34034 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
34035 ac_status=$?
34036 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34037 test $ac_status = 0; }
34038 ;;
34039 esac
34040  
34041 else
34042  
34043 WS_CFLAGS=$GCC_OPTION
34044 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
34045 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
34046 ac_status=$?
34047 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34048 test $ac_status = 0; }
34049  
34050 fi
34051  
34052 if test "$CC" = "$CC_FOR_BUILD"; then
34053 #
34054 # We're building the build tools with the same compiler
34055 # with which we're building Wireshark, so add the flags
34056 # to the flags for that compiler as well.
34057 #
34058  
34059 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
34060  
34061 case " $WS_CFLAGS_FOR_BUILD " in #(
34062 *" $GCC_OPTION "*) :
34063 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
34064 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
34065 ac_status=$?
34066 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34067 test $ac_status = 0; } ;; #(
34068 *) :
34069  
34070 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
34071 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
34072 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
34073 ac_status=$?
34074 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34075 test $ac_status = 0; }
34076 ;;
34077 esac
34078  
34079 else
34080  
34081 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
34082 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
34083 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
34084 ac_status=$?
34085 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34086 test $ac_status = 0; }
34087  
34088 fi
34089  
34090 fi
34091 fi
34092  
34093 else
34094  
34095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34096 $as_echo "no" >&6; }
34097 can_add_to_cflags=no
34098  
34099 fi
34100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34101  
34102 CPPFLAGS="$ac_ws_CPPLAGS_saved"
34103 CFLAGS="$ac_ws_CFLAGS_saved"
34104 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
34105 LDFLAGS="$ac_ws_LDFLAGS_saved"
34106  
34107 fi
34108 #
34109 # Did we find a C++ compiler?
34110 #
34111 if test "x$CXX" != "x" ; then
34112 #
34113 # Yes. Is this option only for the C compiler?
34114 #
34115 if test "C" != C ; then
34116 #
34117 # Not C-only; if this option can be added to the C++ compiler
34118 # options, add it.
34119 #
34120 # If the option begins with "-W", add
34121 # $ac_wireshark_unknown_warning_option_error, as per the above, and
34122 # also add $ac_wireshark_non_cxx_warning_option_error, because at
34123 # lease some versions of g++ whine about -Wmissing-prototypes, the
34124 # fact that at least one of those versions refuses to warn about
34125 # function declarations without an earlier declaration nonwithstanding;
34126 # perhaps there's a reason not to warn about that with C++ even though
34127 # warning about it can be a Good Idea with C, but it's not obvious to
34128 # me).
34129 #
34130 # If the option begins with "-f" or "-m", add -Werror to make sure
34131 # that we'll get an error if we get "argument unused during compilation"
34132 # warnings, as those will either cause a failure for files compiled
34133 # with -Werror or annoying noise for files compiled without it.
34134 # (Yeah, you, clang++.)
34135 #
34136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
34137 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
34138  
34139 ac_ws_CPPLAGS_saved="$CPPFLAGS"
34140 ac_ws_CFLAGS_saved="$CFLAGS"
34141 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
34142 ac_ws_LDFLAGS_saved="$LDFLAGS"
34143 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
34144 CFLAGS="$WS_CFLAGS $CFLAGS"
34145 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
34146 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
34147  
34148 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
34149 then
34150 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
34151 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
34152 then
34153 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
34154 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
34155 then
34156 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
34157 else
34158 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
34159 fi
34160 ac_ext=cpp
34161 ac_cpp='$CXXCPP $CPPFLAGS'
34162 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34163 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34164 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34165  
34166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34167 /* end confdefs.h. */
34168  
34169 int foo;
34170  
34171 _ACEOF
34172 if ac_fn_cxx_try_compile "$LINENO"; then :
34173  
34174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34175 $as_echo "yes" >&6; }
34176 can_add_to_cxxflags=yes
34177 #
34178 # OK, do we have a test program? If so, check
34179 # whether it fails with this option and -Werror,
34180 # and, if so, don't include it.
34181 #
34182 # We test arg 4 here because arg 3 is a program which
34183 # could contain quotes (breaking the comparison).
34184 #
34185 if test "x" != "x" ; then
34186 CXXFLAGS="$CXXFLAGS -Werror"
34187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
34188 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
34189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34190 /* end confdefs.h. */
34191  
34192 _ACEOF
34193 if ac_fn_cxx_try_compile "$LINENO"; then :
34194  
34195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34196 $as_echo "no" >&6; }
34197 #
34198 # Remove "force an error for a warning" options, if we
34199 # added them, by setting CXXFLAGS to the saved value plus
34200 # just the new option.
34201 #
34202  
34203 if ${WS_CXXFLAGS+:} false; then :
34204  
34205 case " $WS_CXXFLAGS " in #(
34206 *" $GCC_OPTION "*) :
34207 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
34208 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
34209 ac_status=$?
34210 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34211 test $ac_status = 0; } ;; #(
34212 *) :
34213  
34214 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
34215 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
34216 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
34217 ac_status=$?
34218 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34219 test $ac_status = 0; }
34220 ;;
34221 esac
34222  
34223 else
34224  
34225 WS_CXXFLAGS=$GCC_OPTION
34226 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
34227 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
34228 ac_status=$?
34229 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34230 test $ac_status = 0; }
34231  
34232 fi
34233  
34234  
34235 else
34236  
34237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34238 $as_echo "yes" >&6; }
34239  
34240 fi
34241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34242 else
34243 #
34244 # Remove "force an error for a warning" options, if we
34245 # added them, by setting CXXFLAGS to the saved value plus
34246 # just the new option.
34247 #
34248  
34249 if ${WS_CXXFLAGS+:} false; then :
34250  
34251 case " $WS_CXXFLAGS " in #(
34252 *" $GCC_OPTION "*) :
34253 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
34254 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
34255 ac_status=$?
34256 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34257 test $ac_status = 0; } ;; #(
34258 *) :
34259  
34260 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
34261 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
34262 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
34263 ac_status=$?
34264 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34265 test $ac_status = 0; }
34266 ;;
34267 esac
34268  
34269 else
34270  
34271 WS_CXXFLAGS=$GCC_OPTION
34272 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
34273 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
34274 ac_status=$?
34275 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34276 test $ac_status = 0; }
34277  
34278 fi
34279  
34280 fi
34281  
34282 else
34283  
34284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34285 $as_echo "no" >&6; }
34286 can_add_to_cxxflags=no
34287  
34288 fi
34289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34290  
34291 CPPFLAGS="$ac_ws_CPPLAGS_saved"
34292 CFLAGS="$ac_ws_CFLAGS_saved"
34293 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
34294 LDFLAGS="$ac_ws_LDFLAGS_saved"
34295  
34296 ac_ext=c
34297 ac_cpp='$CPP $CPPFLAGS'
34298 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34299 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34300 ac_compiler_gnu=$ac_cv_c_compiler_gnu
34301  
34302 fi
34303 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
34304 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
34305 then
34306 #
34307 # Confusingly, some C++ compilers like -Wmissing-prototypes but
34308 # don't like -Wmissing-declarations and others like
34309 # -Wmissing-declarations but don't like -Wmissing-prototypes,
34310 # the fact that the corresponding C compiler likes both. Don't
34311 # warn about them.
34312 #
34313 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
34314 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
34315 then
34316 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
34317 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
34318 fi
34319 fi
34320 fi
34321 fi
34322  
34323 # The Qt headers generate a ton of shortening errors on 64-bit systems
34324 # so only enable this for C for now.
34325 GCC_OPTION="-Wshorten-64-to-32"
34326 can_add_to_cflags=""
34327 can_add_to_cxxflags=""
34328 if test "x$ac_supports_gcc_flags" = "xyes" ; then
34329 if test "C" != CXX ; then
34330 #
34331 # Not C++-only; if this can be added to the C compiler flags, add them.
34332 #
34333 # If the option begins with "-W", add
34334 # $ac_wireshark_unknown_warning_option_error to make sure that
34335 # we'll get an error if it's an unknown warning option; not all
34336 # compilers treat unknown warning options as errors (I'm looking at
34337 # you, clang).
34338 #
34339 # If the option begins with "-f" or "-m", add -Werror to make sure
34340 # that we'll get an error if we get "argument unused during compilation"
34341 # warnings, as those will either cause a failure for files compiled
34342 # with -Werror or annoying noise for files compiled without it.
34343 # (Yeah, you, clang.)
34344 #
34345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
34346 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
34347  
34348 ac_ws_CPPLAGS_saved="$CPPFLAGS"
34349 ac_ws_CFLAGS_saved="$CFLAGS"
34350 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
34351 ac_ws_LDFLAGS_saved="$LDFLAGS"
34352 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
34353 CFLAGS="$WS_CFLAGS $CFLAGS"
34354 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
34355 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
34356  
34357 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
34358 then
34359 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
34360 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
34361 then
34362 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
34363 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
34364 then
34365 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
34366 else
34367 CFLAGS="$CFLAGS $GCC_OPTION"
34368 fi
34369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34370 /* end confdefs.h. */
34371  
34372 int foo;
34373  
34374 _ACEOF
34375 if ac_fn_c_try_compile "$LINENO"; then :
34376  
34377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34378 $as_echo "yes" >&6; }
34379 can_add_to_cflags=yes
34380 #
34381 # OK, do we have a test program? If so, check
34382 # whether it fails with this option and -Werror,
34383 # and, if so, don't include it.
34384 #
34385 # We test arg 4 here because arg 3 is a program which
34386 # could contain quotes (breaking the comparison).
34387 #
34388 if test "x" != "x" ; then
34389 CFLAGS="$CFLAGS -Werror"
34390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
34391 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
34392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34393 /* end confdefs.h. */
34394  
34395 _ACEOF
34396 if ac_fn_c_try_compile "$LINENO"; then :
34397  
34398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34399 $as_echo "no" >&6; }
34400 #
34401 # Remove "force an error for a warning" options, if we
34402 # added them, by setting CFLAGS to the saved value plus
34403 # just the new option.
34404 #
34405  
34406 if ${WS_CFLAGS+:} false; then :
34407  
34408 case " $WS_CFLAGS " in #(
34409 *" $GCC_OPTION "*) :
34410 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
34411 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
34412 ac_status=$?
34413 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34414 test $ac_status = 0; } ;; #(
34415 *) :
34416  
34417 as_fn_append WS_CFLAGS " $GCC_OPTION"
34418 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
34419 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
34420 ac_status=$?
34421 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34422 test $ac_status = 0; }
34423 ;;
34424 esac
34425  
34426 else
34427  
34428 WS_CFLAGS=$GCC_OPTION
34429 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
34430 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
34431 ac_status=$?
34432 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34433 test $ac_status = 0; }
34434  
34435 fi
34436  
34437 if test "$CC" = "$CC_FOR_BUILD"; then
34438 #
34439 # We're building the build tools with the same compiler
34440 # with which we're building Wireshark, so add the flags
34441 # to the flags for that compiler as well.
34442 #
34443  
34444 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
34445  
34446 case " $WS_CFLAGS_FOR_BUILD " in #(
34447 *" $GCC_OPTION "*) :
34448 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
34449 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
34450 ac_status=$?
34451 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34452 test $ac_status = 0; } ;; #(
34453 *) :
34454  
34455 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
34456 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
34457 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
34458 ac_status=$?
34459 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34460 test $ac_status = 0; }
34461 ;;
34462 esac
34463  
34464 else
34465  
34466 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
34467 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
34468 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
34469 ac_status=$?
34470 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34471 test $ac_status = 0; }
34472  
34473 fi
34474  
34475 fi
34476  
34477 else
34478  
34479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34480 $as_echo "yes" >&6; }
34481  
34482 fi
34483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34484 else
34485 #
34486 # Remove "force an error for a warning" options, if we
34487 # added them, by setting CFLAGS to the saved value plus
34488 # just the new option.
34489 #
34490  
34491 if ${WS_CFLAGS+:} false; then :
34492  
34493 case " $WS_CFLAGS " in #(
34494 *" $GCC_OPTION "*) :
34495 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
34496 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
34497 ac_status=$?
34498 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34499 test $ac_status = 0; } ;; #(
34500 *) :
34501  
34502 as_fn_append WS_CFLAGS " $GCC_OPTION"
34503 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
34504 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
34505 ac_status=$?
34506 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34507 test $ac_status = 0; }
34508 ;;
34509 esac
34510  
34511 else
34512  
34513 WS_CFLAGS=$GCC_OPTION
34514 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
34515 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
34516 ac_status=$?
34517 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34518 test $ac_status = 0; }
34519  
34520 fi
34521  
34522 if test "$CC" = "$CC_FOR_BUILD"; then
34523 #
34524 # We're building the build tools with the same compiler
34525 # with which we're building Wireshark, so add the flags
34526 # to the flags for that compiler as well.
34527 #
34528  
34529 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
34530  
34531 case " $WS_CFLAGS_FOR_BUILD " in #(
34532 *" $GCC_OPTION "*) :
34533 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
34534 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
34535 ac_status=$?
34536 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34537 test $ac_status = 0; } ;; #(
34538 *) :
34539  
34540 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
34541 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
34542 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
34543 ac_status=$?
34544 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34545 test $ac_status = 0; }
34546 ;;
34547 esac
34548  
34549 else
34550  
34551 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
34552 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
34553 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
34554 ac_status=$?
34555 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34556 test $ac_status = 0; }
34557  
34558 fi
34559  
34560 fi
34561 fi
34562  
34563 else
34564  
34565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34566 $as_echo "no" >&6; }
34567 can_add_to_cflags=no
34568  
34569 fi
34570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34571  
34572 CPPFLAGS="$ac_ws_CPPLAGS_saved"
34573 CFLAGS="$ac_ws_CFLAGS_saved"
34574 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
34575 LDFLAGS="$ac_ws_LDFLAGS_saved"
34576  
34577 fi
34578 #
34579 # Did we find a C++ compiler?
34580 #
34581 if test "x$CXX" != "x" ; then
34582 #
34583 # Yes. Is this option only for the C compiler?
34584 #
34585 if test "C" != C ; then
34586 #
34587 # Not C-only; if this option can be added to the C++ compiler
34588 # options, add it.
34589 #
34590 # If the option begins with "-W", add
34591 # $ac_wireshark_unknown_warning_option_error, as per the above, and
34592 # also add $ac_wireshark_non_cxx_warning_option_error, because at
34593 # lease some versions of g++ whine about -Wmissing-prototypes, the
34594 # fact that at least one of those versions refuses to warn about
34595 # function declarations without an earlier declaration nonwithstanding;
34596 # perhaps there's a reason not to warn about that with C++ even though
34597 # warning about it can be a Good Idea with C, but it's not obvious to
34598 # me).
34599 #
34600 # If the option begins with "-f" or "-m", add -Werror to make sure
34601 # that we'll get an error if we get "argument unused during compilation"
34602 # warnings, as those will either cause a failure for files compiled
34603 # with -Werror or annoying noise for files compiled without it.
34604 # (Yeah, you, clang++.)
34605 #
34606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
34607 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
34608  
34609 ac_ws_CPPLAGS_saved="$CPPFLAGS"
34610 ac_ws_CFLAGS_saved="$CFLAGS"
34611 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
34612 ac_ws_LDFLAGS_saved="$LDFLAGS"
34613 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
34614 CFLAGS="$WS_CFLAGS $CFLAGS"
34615 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
34616 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
34617  
34618 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
34619 then
34620 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
34621 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
34622 then
34623 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
34624 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
34625 then
34626 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
34627 else
34628 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
34629 fi
34630 ac_ext=cpp
34631 ac_cpp='$CXXCPP $CPPFLAGS'
34632 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34633 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34634 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34635  
34636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34637 /* end confdefs.h. */
34638  
34639 int foo;
34640  
34641 _ACEOF
34642 if ac_fn_cxx_try_compile "$LINENO"; then :
34643  
34644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34645 $as_echo "yes" >&6; }
34646 can_add_to_cxxflags=yes
34647 #
34648 # OK, do we have a test program? If so, check
34649 # whether it fails with this option and -Werror,
34650 # and, if so, don't include it.
34651 #
34652 # We test arg 4 here because arg 3 is a program which
34653 # could contain quotes (breaking the comparison).
34654 #
34655 if test "x" != "x" ; then
34656 CXXFLAGS="$CXXFLAGS -Werror"
34657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
34658 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
34659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34660 /* end confdefs.h. */
34661  
34662 _ACEOF
34663 if ac_fn_cxx_try_compile "$LINENO"; then :
34664  
34665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34666 $as_echo "no" >&6; }
34667 #
34668 # Remove "force an error for a warning" options, if we
34669 # added them, by setting CXXFLAGS to the saved value plus
34670 # just the new option.
34671 #
34672  
34673 if ${WS_CXXFLAGS+:} false; then :
34674  
34675 case " $WS_CXXFLAGS " in #(
34676 *" $GCC_OPTION "*) :
34677 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
34678 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
34679 ac_status=$?
34680 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34681 test $ac_status = 0; } ;; #(
34682 *) :
34683  
34684 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
34685 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
34686 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
34687 ac_status=$?
34688 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34689 test $ac_status = 0; }
34690 ;;
34691 esac
34692  
34693 else
34694  
34695 WS_CXXFLAGS=$GCC_OPTION
34696 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
34697 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
34698 ac_status=$?
34699 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34700 test $ac_status = 0; }
34701  
34702 fi
34703  
34704  
34705 else
34706  
34707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34708 $as_echo "yes" >&6; }
34709  
34710 fi
34711 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34712 else
34713 #
34714 # Remove "force an error for a warning" options, if we
34715 # added them, by setting CXXFLAGS to the saved value plus
34716 # just the new option.
34717 #
34718  
34719 if ${WS_CXXFLAGS+:} false; then :
34720  
34721 case " $WS_CXXFLAGS " in #(
34722 *" $GCC_OPTION "*) :
34723 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
34724 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
34725 ac_status=$?
34726 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34727 test $ac_status = 0; } ;; #(
34728 *) :
34729  
34730 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
34731 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
34732 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
34733 ac_status=$?
34734 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34735 test $ac_status = 0; }
34736 ;;
34737 esac
34738  
34739 else
34740  
34741 WS_CXXFLAGS=$GCC_OPTION
34742 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
34743 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
34744 ac_status=$?
34745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34746 test $ac_status = 0; }
34747  
34748 fi
34749  
34750 fi
34751  
34752 else
34753  
34754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34755 $as_echo "no" >&6; }
34756 can_add_to_cxxflags=no
34757  
34758 fi
34759 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34760  
34761 CPPFLAGS="$ac_ws_CPPLAGS_saved"
34762 CFLAGS="$ac_ws_CFLAGS_saved"
34763 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
34764 LDFLAGS="$ac_ws_LDFLAGS_saved"
34765  
34766 ac_ext=c
34767 ac_cpp='$CPP $CPPFLAGS'
34768 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34769 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34770 ac_compiler_gnu=$ac_cv_c_compiler_gnu
34771  
34772 fi
34773 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
34774 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
34775 then
34776 #
34777 # Confusingly, some C++ compilers like -Wmissing-prototypes but
34778 # don't like -Wmissing-declarations and others like
34779 # -Wmissing-declarations but don't like -Wmissing-prototypes,
34780 # the fact that the corresponding C compiler likes both. Don't
34781 # warn about them.
34782 #
34783 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
34784 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
34785 then
34786 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
34787 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
34788 fi
34789 fi
34790 fi
34791 fi
34792  
34793  
34794 # Clang only. Avoid "argument unused during compilation" warnings
34795 # (for example, when getting the -gsplit-dwarf option or
34796 # when combining -fwrapv with -fno-strict-overflow)
34797 if test x"$ax_cv_c_compiler_vendor" = xclang; then
34798 GCC_OPTION="-Qunused-arguments"
34799 can_add_to_cflags=""
34800 can_add_to_cxxflags=""
34801 if test "x$ac_supports_gcc_flags" = "xyes" ; then
34802 if test "C" != CXX ; then
34803 #
34804 # Not C++-only; if this can be added to the C compiler flags, add them.
34805 #
34806 # If the option begins with "-W", add
34807 # $ac_wireshark_unknown_warning_option_error to make sure that
34808 # we'll get an error if it's an unknown warning option; not all
34809 # compilers treat unknown warning options as errors (I'm looking at
34810 # you, clang).
34811 #
34812 # If the option begins with "-f" or "-m", add -Werror to make sure
34813 # that we'll get an error if we get "argument unused during compilation"
34814 # warnings, as those will either cause a failure for files compiled
34815 # with -Werror or annoying noise for files compiled without it.
34816 # (Yeah, you, clang.)
34817 #
34818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
34819 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
34820  
34821 ac_ws_CPPLAGS_saved="$CPPFLAGS"
34822 ac_ws_CFLAGS_saved="$CFLAGS"
34823 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
34824 ac_ws_LDFLAGS_saved="$LDFLAGS"
34825 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
34826 CFLAGS="$WS_CFLAGS $CFLAGS"
34827 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
34828 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
34829  
34830 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
34831 then
34832 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
34833 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
34834 then
34835 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
34836 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
34837 then
34838 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
34839 else
34840 CFLAGS="$CFLAGS $GCC_OPTION"
34841 fi
34842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34843 /* end confdefs.h. */
34844  
34845 int foo;
34846  
34847 _ACEOF
34848 if ac_fn_c_try_compile "$LINENO"; then :
34849  
34850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34851 $as_echo "yes" >&6; }
34852 can_add_to_cflags=yes
34853 #
34854 # OK, do we have a test program? If so, check
34855 # whether it fails with this option and -Werror,
34856 # and, if so, don't include it.
34857 #
34858 # We test arg 4 here because arg 3 is a program which
34859 # could contain quotes (breaking the comparison).
34860 #
34861 if test "x" != "x" ; then
34862 CFLAGS="$CFLAGS -Werror"
34863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
34864 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
34865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34866 /* end confdefs.h. */
34867  
34868 _ACEOF
34869 if ac_fn_c_try_compile "$LINENO"; then :
34870  
34871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34872 $as_echo "no" >&6; }
34873 #
34874 # Remove "force an error for a warning" options, if we
34875 # added them, by setting CFLAGS to the saved value plus
34876 # just the new option.
34877 #
34878  
34879 if ${WS_CFLAGS+:} false; then :
34880  
34881 case " $WS_CFLAGS " in #(
34882 *" $GCC_OPTION "*) :
34883 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
34884 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
34885 ac_status=$?
34886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34887 test $ac_status = 0; } ;; #(
34888 *) :
34889  
34890 as_fn_append WS_CFLAGS " $GCC_OPTION"
34891 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
34892 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
34893 ac_status=$?
34894 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34895 test $ac_status = 0; }
34896 ;;
34897 esac
34898  
34899 else
34900  
34901 WS_CFLAGS=$GCC_OPTION
34902 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
34903 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
34904 ac_status=$?
34905 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34906 test $ac_status = 0; }
34907  
34908 fi
34909  
34910 if test "$CC" = "$CC_FOR_BUILD"; then
34911 #
34912 # We're building the build tools with the same compiler
34913 # with which we're building Wireshark, so add the flags
34914 # to the flags for that compiler as well.
34915 #
34916  
34917 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
34918  
34919 case " $WS_CFLAGS_FOR_BUILD " in #(
34920 *" $GCC_OPTION "*) :
34921 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
34922 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
34923 ac_status=$?
34924 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34925 test $ac_status = 0; } ;; #(
34926 *) :
34927  
34928 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
34929 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
34930 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
34931 ac_status=$?
34932 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34933 test $ac_status = 0; }
34934 ;;
34935 esac
34936  
34937 else
34938  
34939 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
34940 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
34941 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
34942 ac_status=$?
34943 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34944 test $ac_status = 0; }
34945  
34946 fi
34947  
34948 fi
34949  
34950 else
34951  
34952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34953 $as_echo "yes" >&6; }
34954  
34955 fi
34956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34957 else
34958 #
34959 # Remove "force an error for a warning" options, if we
34960 # added them, by setting CFLAGS to the saved value plus
34961 # just the new option.
34962 #
34963  
34964 if ${WS_CFLAGS+:} false; then :
34965  
34966 case " $WS_CFLAGS " in #(
34967 *" $GCC_OPTION "*) :
34968 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
34969 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
34970 ac_status=$?
34971 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34972 test $ac_status = 0; } ;; #(
34973 *) :
34974  
34975 as_fn_append WS_CFLAGS " $GCC_OPTION"
34976 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
34977 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
34978 ac_status=$?
34979 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34980 test $ac_status = 0; }
34981 ;;
34982 esac
34983  
34984 else
34985  
34986 WS_CFLAGS=$GCC_OPTION
34987 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
34988 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
34989 ac_status=$?
34990 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34991 test $ac_status = 0; }
34992  
34993 fi
34994  
34995 if test "$CC" = "$CC_FOR_BUILD"; then
34996 #
34997 # We're building the build tools with the same compiler
34998 # with which we're building Wireshark, so add the flags
34999 # to the flags for that compiler as well.
35000 #
35001  
35002 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
35003  
35004 case " $WS_CFLAGS_FOR_BUILD " in #(
35005 *" $GCC_OPTION "*) :
35006 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
35007 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
35008 ac_status=$?
35009 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35010 test $ac_status = 0; } ;; #(
35011 *) :
35012  
35013 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
35014 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
35015 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
35016 ac_status=$?
35017 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35018 test $ac_status = 0; }
35019 ;;
35020 esac
35021  
35022 else
35023  
35024 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
35025 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
35026 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
35027 ac_status=$?
35028 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35029 test $ac_status = 0; }
35030  
35031 fi
35032  
35033 fi
35034 fi
35035  
35036 else
35037  
35038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35039 $as_echo "no" >&6; }
35040 can_add_to_cflags=no
35041  
35042 fi
35043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35044  
35045 CPPFLAGS="$ac_ws_CPPLAGS_saved"
35046 CFLAGS="$ac_ws_CFLAGS_saved"
35047 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
35048 LDFLAGS="$ac_ws_LDFLAGS_saved"
35049  
35050 fi
35051 #
35052 # Did we find a C++ compiler?
35053 #
35054 if test "x$CXX" != "x" ; then
35055 #
35056 # Yes. Is this option only for the C compiler?
35057 #
35058 if test "C" != C ; then
35059 #
35060 # Not C-only; if this option can be added to the C++ compiler
35061 # options, add it.
35062 #
35063 # If the option begins with "-W", add
35064 # $ac_wireshark_unknown_warning_option_error, as per the above, and
35065 # also add $ac_wireshark_non_cxx_warning_option_error, because at
35066 # lease some versions of g++ whine about -Wmissing-prototypes, the
35067 # fact that at least one of those versions refuses to warn about
35068 # function declarations without an earlier declaration nonwithstanding;
35069 # perhaps there's a reason not to warn about that with C++ even though
35070 # warning about it can be a Good Idea with C, but it's not obvious to
35071 # me).
35072 #
35073 # If the option begins with "-f" or "-m", add -Werror to make sure
35074 # that we'll get an error if we get "argument unused during compilation"
35075 # warnings, as those will either cause a failure for files compiled
35076 # with -Werror or annoying noise for files compiled without it.
35077 # (Yeah, you, clang++.)
35078 #
35079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
35080 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
35081  
35082 ac_ws_CPPLAGS_saved="$CPPFLAGS"
35083 ac_ws_CFLAGS_saved="$CFLAGS"
35084 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
35085 ac_ws_LDFLAGS_saved="$LDFLAGS"
35086 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
35087 CFLAGS="$WS_CFLAGS $CFLAGS"
35088 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
35089 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
35090  
35091 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
35092 then
35093 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
35094 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
35095 then
35096 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
35097 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
35098 then
35099 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
35100 else
35101 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
35102 fi
35103 ac_ext=cpp
35104 ac_cpp='$CXXCPP $CPPFLAGS'
35105 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35106 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35107 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35108  
35109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35110 /* end confdefs.h. */
35111  
35112 int foo;
35113  
35114 _ACEOF
35115 if ac_fn_cxx_try_compile "$LINENO"; then :
35116  
35117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35118 $as_echo "yes" >&6; }
35119 can_add_to_cxxflags=yes
35120 #
35121 # OK, do we have a test program? If so, check
35122 # whether it fails with this option and -Werror,
35123 # and, if so, don't include it.
35124 #
35125 # We test arg 4 here because arg 3 is a program which
35126 # could contain quotes (breaking the comparison).
35127 #
35128 if test "x" != "x" ; then
35129 CXXFLAGS="$CXXFLAGS -Werror"
35130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
35131 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
35132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35133 /* end confdefs.h. */
35134  
35135 _ACEOF
35136 if ac_fn_cxx_try_compile "$LINENO"; then :
35137  
35138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35139 $as_echo "no" >&6; }
35140 #
35141 # Remove "force an error for a warning" options, if we
35142 # added them, by setting CXXFLAGS to the saved value plus
35143 # just the new option.
35144 #
35145  
35146 if ${WS_CXXFLAGS+:} false; then :
35147  
35148 case " $WS_CXXFLAGS " in #(
35149 *" $GCC_OPTION "*) :
35150 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
35151 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
35152 ac_status=$?
35153 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35154 test $ac_status = 0; } ;; #(
35155 *) :
35156  
35157 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
35158 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
35159 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
35160 ac_status=$?
35161 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35162 test $ac_status = 0; }
35163 ;;
35164 esac
35165  
35166 else
35167  
35168 WS_CXXFLAGS=$GCC_OPTION
35169 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
35170 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
35171 ac_status=$?
35172 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35173 test $ac_status = 0; }
35174  
35175 fi
35176  
35177  
35178 else
35179  
35180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35181 $as_echo "yes" >&6; }
35182  
35183 fi
35184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35185 else
35186 #
35187 # Remove "force an error for a warning" options, if we
35188 # added them, by setting CXXFLAGS to the saved value plus
35189 # just the new option.
35190 #
35191  
35192 if ${WS_CXXFLAGS+:} false; then :
35193  
35194 case " $WS_CXXFLAGS " in #(
35195 *" $GCC_OPTION "*) :
35196 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
35197 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
35198 ac_status=$?
35199 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35200 test $ac_status = 0; } ;; #(
35201 *) :
35202  
35203 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
35204 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
35205 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
35206 ac_status=$?
35207 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35208 test $ac_status = 0; }
35209 ;;
35210 esac
35211  
35212 else
35213  
35214 WS_CXXFLAGS=$GCC_OPTION
35215 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
35216 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
35217 ac_status=$?
35218 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35219 test $ac_status = 0; }
35220  
35221 fi
35222  
35223 fi
35224  
35225 else
35226  
35227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35228 $as_echo "no" >&6; }
35229 can_add_to_cxxflags=no
35230  
35231 fi
35232 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35233  
35234 CPPFLAGS="$ac_ws_CPPLAGS_saved"
35235 CFLAGS="$ac_ws_CFLAGS_saved"
35236 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
35237 LDFLAGS="$ac_ws_LDFLAGS_saved"
35238  
35239 ac_ext=c
35240 ac_cpp='$CPP $CPPFLAGS'
35241 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35242 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35243 ac_compiler_gnu=$ac_cv_c_compiler_gnu
35244  
35245 fi
35246 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
35247 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
35248 then
35249 #
35250 # Confusingly, some C++ compilers like -Wmissing-prototypes but
35251 # don't like -Wmissing-declarations and others like
35252 # -Wmissing-declarations but don't like -Wmissing-prototypes,
35253 # the fact that the corresponding C compiler likes both. Don't
35254 # warn about them.
35255 #
35256 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
35257 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
35258 then
35259 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
35260 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
35261 fi
35262 fi
35263 fi
35264 fi
35265  
35266 fi
35267 if test x"$ax_cv_cxx_compiler_vendor" = xclang; then
35268 GCC_OPTION="-Qunused-arguments"
35269 can_add_to_cflags=""
35270 can_add_to_cxxflags=""
35271 if test "x$ac_supports_gcc_flags" = "xyes" ; then
35272 if test "CXX" != CXX ; then
35273 #
35274 # Not C++-only; if this can be added to the C compiler flags, add them.
35275 #
35276 # If the option begins with "-W", add
35277 # $ac_wireshark_unknown_warning_option_error to make sure that
35278 # we'll get an error if it's an unknown warning option; not all
35279 # compilers treat unknown warning options as errors (I'm looking at
35280 # you, clang).
35281 #
35282 # If the option begins with "-f" or "-m", add -Werror to make sure
35283 # that we'll get an error if we get "argument unused during compilation"
35284 # warnings, as those will either cause a failure for files compiled
35285 # with -Werror or annoying noise for files compiled without it.
35286 # (Yeah, you, clang.)
35287 #
35288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
35289 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
35290  
35291 ac_ws_CPPLAGS_saved="$CPPFLAGS"
35292 ac_ws_CFLAGS_saved="$CFLAGS"
35293 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
35294 ac_ws_LDFLAGS_saved="$LDFLAGS"
35295 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
35296 CFLAGS="$WS_CFLAGS $CFLAGS"
35297 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
35298 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
35299  
35300 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
35301 then
35302 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
35303 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
35304 then
35305 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
35306 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
35307 then
35308 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
35309 else
35310 CFLAGS="$CFLAGS $GCC_OPTION"
35311 fi
35312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35313 /* end confdefs.h. */
35314  
35315 int foo;
35316  
35317 _ACEOF
35318 if ac_fn_c_try_compile "$LINENO"; then :
35319  
35320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35321 $as_echo "yes" >&6; }
35322 can_add_to_cflags=yes
35323 #
35324 # OK, do we have a test program? If so, check
35325 # whether it fails with this option and -Werror,
35326 # and, if so, don't include it.
35327 #
35328 # We test arg 4 here because arg 3 is a program which
35329 # could contain quotes (breaking the comparison).
35330 #
35331 if test "x" != "x" ; then
35332 CFLAGS="$CFLAGS -Werror"
35333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
35334 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
35335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35336 /* end confdefs.h. */
35337  
35338 _ACEOF
35339 if ac_fn_c_try_compile "$LINENO"; then :
35340  
35341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35342 $as_echo "no" >&6; }
35343 #
35344 # Remove "force an error for a warning" options, if we
35345 # added them, by setting CFLAGS to the saved value plus
35346 # just the new option.
35347 #
35348  
35349 if ${WS_CFLAGS+:} false; then :
35350  
35351 case " $WS_CFLAGS " in #(
35352 *" $GCC_OPTION "*) :
35353 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
35354 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
35355 ac_status=$?
35356 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35357 test $ac_status = 0; } ;; #(
35358 *) :
35359  
35360 as_fn_append WS_CFLAGS " $GCC_OPTION"
35361 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
35362 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
35363 ac_status=$?
35364 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35365 test $ac_status = 0; }
35366 ;;
35367 esac
35368  
35369 else
35370  
35371 WS_CFLAGS=$GCC_OPTION
35372 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
35373 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
35374 ac_status=$?
35375 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35376 test $ac_status = 0; }
35377  
35378 fi
35379  
35380 if test "$CC" = "$CC_FOR_BUILD"; then
35381 #
35382 # We're building the build tools with the same compiler
35383 # with which we're building Wireshark, so add the flags
35384 # to the flags for that compiler as well.
35385 #
35386  
35387 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
35388  
35389 case " $WS_CFLAGS_FOR_BUILD " in #(
35390 *" $GCC_OPTION "*) :
35391 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
35392 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
35393 ac_status=$?
35394 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35395 test $ac_status = 0; } ;; #(
35396 *) :
35397  
35398 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
35399 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
35400 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
35401 ac_status=$?
35402 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35403 test $ac_status = 0; }
35404 ;;
35405 esac
35406  
35407 else
35408  
35409 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
35410 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
35411 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
35412 ac_status=$?
35413 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35414 test $ac_status = 0; }
35415  
35416 fi
35417  
35418 fi
35419  
35420 else
35421  
35422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35423 $as_echo "yes" >&6; }
35424  
35425 fi
35426 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35427 else
35428 #
35429 # Remove "force an error for a warning" options, if we
35430 # added them, by setting CFLAGS to the saved value plus
35431 # just the new option.
35432 #
35433  
35434 if ${WS_CFLAGS+:} false; then :
35435  
35436 case " $WS_CFLAGS " in #(
35437 *" $GCC_OPTION "*) :
35438 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
35439 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
35440 ac_status=$?
35441 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35442 test $ac_status = 0; } ;; #(
35443 *) :
35444  
35445 as_fn_append WS_CFLAGS " $GCC_OPTION"
35446 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
35447 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
35448 ac_status=$?
35449 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35450 test $ac_status = 0; }
35451 ;;
35452 esac
35453  
35454 else
35455  
35456 WS_CFLAGS=$GCC_OPTION
35457 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
35458 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
35459 ac_status=$?
35460 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35461 test $ac_status = 0; }
35462  
35463 fi
35464  
35465 if test "$CC" = "$CC_FOR_BUILD"; then
35466 #
35467 # We're building the build tools with the same compiler
35468 # with which we're building Wireshark, so add the flags
35469 # to the flags for that compiler as well.
35470 #
35471  
35472 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
35473  
35474 case " $WS_CFLAGS_FOR_BUILD " in #(
35475 *" $GCC_OPTION "*) :
35476 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
35477 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
35478 ac_status=$?
35479 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35480 test $ac_status = 0; } ;; #(
35481 *) :
35482  
35483 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
35484 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
35485 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
35486 ac_status=$?
35487 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35488 test $ac_status = 0; }
35489 ;;
35490 esac
35491  
35492 else
35493  
35494 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
35495 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
35496 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
35497 ac_status=$?
35498 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35499 test $ac_status = 0; }
35500  
35501 fi
35502  
35503 fi
35504 fi
35505  
35506 else
35507  
35508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35509 $as_echo "no" >&6; }
35510 can_add_to_cflags=no
35511  
35512 fi
35513 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35514  
35515 CPPFLAGS="$ac_ws_CPPLAGS_saved"
35516 CFLAGS="$ac_ws_CFLAGS_saved"
35517 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
35518 LDFLAGS="$ac_ws_LDFLAGS_saved"
35519  
35520 fi
35521 #
35522 # Did we find a C++ compiler?
35523 #
35524 if test "x$CXX" != "x" ; then
35525 #
35526 # Yes. Is this option only for the C compiler?
35527 #
35528 if test "CXX" != C ; then
35529 #
35530 # Not C-only; if this option can be added to the C++ compiler
35531 # options, add it.
35532 #
35533 # If the option begins with "-W", add
35534 # $ac_wireshark_unknown_warning_option_error, as per the above, and
35535 # also add $ac_wireshark_non_cxx_warning_option_error, because at
35536 # lease some versions of g++ whine about -Wmissing-prototypes, the
35537 # fact that at least one of those versions refuses to warn about
35538 # function declarations without an earlier declaration nonwithstanding;
35539 # perhaps there's a reason not to warn about that with C++ even though
35540 # warning about it can be a Good Idea with C, but it's not obvious to
35541 # me).
35542 #
35543 # If the option begins with "-f" or "-m", add -Werror to make sure
35544 # that we'll get an error if we get "argument unused during compilation"
35545 # warnings, as those will either cause a failure for files compiled
35546 # with -Werror or annoying noise for files compiled without it.
35547 # (Yeah, you, clang++.)
35548 #
35549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
35550 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
35551  
35552 ac_ws_CPPLAGS_saved="$CPPFLAGS"
35553 ac_ws_CFLAGS_saved="$CFLAGS"
35554 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
35555 ac_ws_LDFLAGS_saved="$LDFLAGS"
35556 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
35557 CFLAGS="$WS_CFLAGS $CFLAGS"
35558 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
35559 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
35560  
35561 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
35562 then
35563 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
35564 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
35565 then
35566 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
35567 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
35568 then
35569 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
35570 else
35571 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
35572 fi
35573 ac_ext=cpp
35574 ac_cpp='$CXXCPP $CPPFLAGS'
35575 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35576 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35577 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35578  
35579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35580 /* end confdefs.h. */
35581  
35582 int foo;
35583  
35584 _ACEOF
35585 if ac_fn_cxx_try_compile "$LINENO"; then :
35586  
35587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35588 $as_echo "yes" >&6; }
35589 can_add_to_cxxflags=yes
35590 #
35591 # OK, do we have a test program? If so, check
35592 # whether it fails with this option and -Werror,
35593 # and, if so, don't include it.
35594 #
35595 # We test arg 4 here because arg 3 is a program which
35596 # could contain quotes (breaking the comparison).
35597 #
35598 if test "x" != "x" ; then
35599 CXXFLAGS="$CXXFLAGS -Werror"
35600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
35601 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
35602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35603 /* end confdefs.h. */
35604  
35605 _ACEOF
35606 if ac_fn_cxx_try_compile "$LINENO"; then :
35607  
35608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35609 $as_echo "no" >&6; }
35610 #
35611 # Remove "force an error for a warning" options, if we
35612 # added them, by setting CXXFLAGS to the saved value plus
35613 # just the new option.
35614 #
35615  
35616 if ${WS_CXXFLAGS+:} false; then :
35617  
35618 case " $WS_CXXFLAGS " in #(
35619 *" $GCC_OPTION "*) :
35620 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
35621 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
35622 ac_status=$?
35623 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35624 test $ac_status = 0; } ;; #(
35625 *) :
35626  
35627 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
35628 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
35629 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
35630 ac_status=$?
35631 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35632 test $ac_status = 0; }
35633 ;;
35634 esac
35635  
35636 else
35637  
35638 WS_CXXFLAGS=$GCC_OPTION
35639 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
35640 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
35641 ac_status=$?
35642 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35643 test $ac_status = 0; }
35644  
35645 fi
35646  
35647  
35648 else
35649  
35650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35651 $as_echo "yes" >&6; }
35652  
35653 fi
35654 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35655 else
35656 #
35657 # Remove "force an error for a warning" options, if we
35658 # added them, by setting CXXFLAGS to the saved value plus
35659 # just the new option.
35660 #
35661  
35662 if ${WS_CXXFLAGS+:} false; then :
35663  
35664 case " $WS_CXXFLAGS " in #(
35665 *" $GCC_OPTION "*) :
35666 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
35667 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
35668 ac_status=$?
35669 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35670 test $ac_status = 0; } ;; #(
35671 *) :
35672  
35673 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
35674 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
35675 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
35676 ac_status=$?
35677 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35678 test $ac_status = 0; }
35679 ;;
35680 esac
35681  
35682 else
35683  
35684 WS_CXXFLAGS=$GCC_OPTION
35685 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
35686 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
35687 ac_status=$?
35688 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35689 test $ac_status = 0; }
35690  
35691 fi
35692  
35693 fi
35694  
35695 else
35696  
35697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35698 $as_echo "no" >&6; }
35699 can_add_to_cxxflags=no
35700  
35701 fi
35702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35703  
35704 CPPFLAGS="$ac_ws_CPPLAGS_saved"
35705 CFLAGS="$ac_ws_CFLAGS_saved"
35706 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
35707 LDFLAGS="$ac_ws_LDFLAGS_saved"
35708  
35709 ac_ext=c
35710 ac_cpp='$CPP $CPPFLAGS'
35711 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35712 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35713 ac_compiler_gnu=$ac_cv_c_compiler_gnu
35714  
35715 fi
35716 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
35717 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
35718 then
35719 #
35720 # Confusingly, some C++ compilers like -Wmissing-prototypes but
35721 # don't like -Wmissing-declarations and others like
35722 # -Wmissing-declarations but don't like -Wmissing-prototypes,
35723 # the fact that the corresponding C compiler likes both. Don't
35724 # warn about them.
35725 #
35726 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
35727 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
35728 then
35729 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
35730 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
35731 fi
35732 fi
35733 fi
35734 fi
35735  
35736 fi
35737  
35738 #
35739 # Use the faster pre gcc 4.5 floating point precision if available.
35740 #
35741 GCC_OPTION="-fexcess-precision=fast"
35742 can_add_to_cflags=""
35743 can_add_to_cxxflags=""
35744 if test "x$ac_supports_gcc_flags" = "xyes" ; then
35745 if test "" != CXX ; then
35746 #
35747 # Not C++-only; if this can be added to the C compiler flags, add them.
35748 #
35749 # If the option begins with "-W", add
35750 # $ac_wireshark_unknown_warning_option_error to make sure that
35751 # we'll get an error if it's an unknown warning option; not all
35752 # compilers treat unknown warning options as errors (I'm looking at
35753 # you, clang).
35754 #
35755 # If the option begins with "-f" or "-m", add -Werror to make sure
35756 # that we'll get an error if we get "argument unused during compilation"
35757 # warnings, as those will either cause a failure for files compiled
35758 # with -Werror or annoying noise for files compiled without it.
35759 # (Yeah, you, clang.)
35760 #
35761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
35762 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
35763  
35764 ac_ws_CPPLAGS_saved="$CPPFLAGS"
35765 ac_ws_CFLAGS_saved="$CFLAGS"
35766 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
35767 ac_ws_LDFLAGS_saved="$LDFLAGS"
35768 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
35769 CFLAGS="$WS_CFLAGS $CFLAGS"
35770 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
35771 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
35772  
35773 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
35774 then
35775 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
35776 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
35777 then
35778 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
35779 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
35780 then
35781 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
35782 else
35783 CFLAGS="$CFLAGS $GCC_OPTION"
35784 fi
35785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35786 /* end confdefs.h. */
35787  
35788 int foo;
35789  
35790 _ACEOF
35791 if ac_fn_c_try_compile "$LINENO"; then :
35792  
35793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35794 $as_echo "yes" >&6; }
35795 can_add_to_cflags=yes
35796 #
35797 # OK, do we have a test program? If so, check
35798 # whether it fails with this option and -Werror,
35799 # and, if so, don't include it.
35800 #
35801 # We test arg 4 here because arg 3 is a program which
35802 # could contain quotes (breaking the comparison).
35803 #
35804 if test "x" != "x" ; then
35805 CFLAGS="$CFLAGS -Werror"
35806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
35807 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
35808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35809 /* end confdefs.h. */
35810  
35811 _ACEOF
35812 if ac_fn_c_try_compile "$LINENO"; then :
35813  
35814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35815 $as_echo "no" >&6; }
35816 #
35817 # Remove "force an error for a warning" options, if we
35818 # added them, by setting CFLAGS to the saved value plus
35819 # just the new option.
35820 #
35821  
35822 if ${WS_CFLAGS+:} false; then :
35823  
35824 case " $WS_CFLAGS " in #(
35825 *" $GCC_OPTION "*) :
35826 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
35827 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
35828 ac_status=$?
35829 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35830 test $ac_status = 0; } ;; #(
35831 *) :
35832  
35833 as_fn_append WS_CFLAGS " $GCC_OPTION"
35834 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
35835 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
35836 ac_status=$?
35837 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35838 test $ac_status = 0; }
35839 ;;
35840 esac
35841  
35842 else
35843  
35844 WS_CFLAGS=$GCC_OPTION
35845 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
35846 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
35847 ac_status=$?
35848 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35849 test $ac_status = 0; }
35850  
35851 fi
35852  
35853 if test "$CC" = "$CC_FOR_BUILD"; then
35854 #
35855 # We're building the build tools with the same compiler
35856 # with which we're building Wireshark, so add the flags
35857 # to the flags for that compiler as well.
35858 #
35859  
35860 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
35861  
35862 case " $WS_CFLAGS_FOR_BUILD " in #(
35863 *" $GCC_OPTION "*) :
35864 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
35865 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
35866 ac_status=$?
35867 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35868 test $ac_status = 0; } ;; #(
35869 *) :
35870  
35871 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
35872 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
35873 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
35874 ac_status=$?
35875 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35876 test $ac_status = 0; }
35877 ;;
35878 esac
35879  
35880 else
35881  
35882 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
35883 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
35884 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
35885 ac_status=$?
35886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35887 test $ac_status = 0; }
35888  
35889 fi
35890  
35891 fi
35892  
35893 else
35894  
35895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35896 $as_echo "yes" >&6; }
35897  
35898 fi
35899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35900 else
35901 #
35902 # Remove "force an error for a warning" options, if we
35903 # added them, by setting CFLAGS to the saved value plus
35904 # just the new option.
35905 #
35906  
35907 if ${WS_CFLAGS+:} false; then :
35908  
35909 case " $WS_CFLAGS " in #(
35910 *" $GCC_OPTION "*) :
35911 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
35912 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
35913 ac_status=$?
35914 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35915 test $ac_status = 0; } ;; #(
35916 *) :
35917  
35918 as_fn_append WS_CFLAGS " $GCC_OPTION"
35919 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
35920 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
35921 ac_status=$?
35922 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35923 test $ac_status = 0; }
35924 ;;
35925 esac
35926  
35927 else
35928  
35929 WS_CFLAGS=$GCC_OPTION
35930 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
35931 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
35932 ac_status=$?
35933 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35934 test $ac_status = 0; }
35935  
35936 fi
35937  
35938 if test "$CC" = "$CC_FOR_BUILD"; then
35939 #
35940 # We're building the build tools with the same compiler
35941 # with which we're building Wireshark, so add the flags
35942 # to the flags for that compiler as well.
35943 #
35944  
35945 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
35946  
35947 case " $WS_CFLAGS_FOR_BUILD " in #(
35948 *" $GCC_OPTION "*) :
35949 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
35950 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
35951 ac_status=$?
35952 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35953 test $ac_status = 0; } ;; #(
35954 *) :
35955  
35956 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
35957 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
35958 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
35959 ac_status=$?
35960 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35961 test $ac_status = 0; }
35962 ;;
35963 esac
35964  
35965 else
35966  
35967 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
35968 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
35969 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
35970 ac_status=$?
35971 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35972 test $ac_status = 0; }
35973  
35974 fi
35975  
35976 fi
35977 fi
35978  
35979 else
35980  
35981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35982 $as_echo "no" >&6; }
35983 can_add_to_cflags=no
35984  
35985 fi
35986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35987  
35988 CPPFLAGS="$ac_ws_CPPLAGS_saved"
35989 CFLAGS="$ac_ws_CFLAGS_saved"
35990 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
35991 LDFLAGS="$ac_ws_LDFLAGS_saved"
35992  
35993 fi
35994 #
35995 # Did we find a C++ compiler?
35996 #
35997 if test "x$CXX" != "x" ; then
35998 #
35999 # Yes. Is this option only for the C compiler?
36000 #
36001 if test "" != C ; then
36002 #
36003 # Not C-only; if this option can be added to the C++ compiler
36004 # options, add it.
36005 #
36006 # If the option begins with "-W", add
36007 # $ac_wireshark_unknown_warning_option_error, as per the above, and
36008 # also add $ac_wireshark_non_cxx_warning_option_error, because at
36009 # lease some versions of g++ whine about -Wmissing-prototypes, the
36010 # fact that at least one of those versions refuses to warn about
36011 # function declarations without an earlier declaration nonwithstanding;
36012 # perhaps there's a reason not to warn about that with C++ even though
36013 # warning about it can be a Good Idea with C, but it's not obvious to
36014 # me).
36015 #
36016 # If the option begins with "-f" or "-m", add -Werror to make sure
36017 # that we'll get an error if we get "argument unused during compilation"
36018 # warnings, as those will either cause a failure for files compiled
36019 # with -Werror or annoying noise for files compiled without it.
36020 # (Yeah, you, clang++.)
36021 #
36022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
36023 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
36024  
36025 ac_ws_CPPLAGS_saved="$CPPFLAGS"
36026 ac_ws_CFLAGS_saved="$CFLAGS"
36027 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
36028 ac_ws_LDFLAGS_saved="$LDFLAGS"
36029 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
36030 CFLAGS="$WS_CFLAGS $CFLAGS"
36031 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
36032 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
36033  
36034 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
36035 then
36036 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
36037 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
36038 then
36039 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
36040 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
36041 then
36042 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
36043 else
36044 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
36045 fi
36046 ac_ext=cpp
36047 ac_cpp='$CXXCPP $CPPFLAGS'
36048 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36049 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36050 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36051  
36052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36053 /* end confdefs.h. */
36054  
36055 int foo;
36056  
36057 _ACEOF
36058 if ac_fn_cxx_try_compile "$LINENO"; then :
36059  
36060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36061 $as_echo "yes" >&6; }
36062 can_add_to_cxxflags=yes
36063 #
36064 # OK, do we have a test program? If so, check
36065 # whether it fails with this option and -Werror,
36066 # and, if so, don't include it.
36067 #
36068 # We test arg 4 here because arg 3 is a program which
36069 # could contain quotes (breaking the comparison).
36070 #
36071 if test "x" != "x" ; then
36072 CXXFLAGS="$CXXFLAGS -Werror"
36073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
36074 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
36075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36076 /* end confdefs.h. */
36077  
36078 _ACEOF
36079 if ac_fn_cxx_try_compile "$LINENO"; then :
36080  
36081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36082 $as_echo "no" >&6; }
36083 #
36084 # Remove "force an error for a warning" options, if we
36085 # added them, by setting CXXFLAGS to the saved value plus
36086 # just the new option.
36087 #
36088  
36089 if ${WS_CXXFLAGS+:} false; then :
36090  
36091 case " $WS_CXXFLAGS " in #(
36092 *" $GCC_OPTION "*) :
36093 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
36094 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
36095 ac_status=$?
36096 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36097 test $ac_status = 0; } ;; #(
36098 *) :
36099  
36100 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
36101 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
36102 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
36103 ac_status=$?
36104 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36105 test $ac_status = 0; }
36106 ;;
36107 esac
36108  
36109 else
36110  
36111 WS_CXXFLAGS=$GCC_OPTION
36112 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
36113 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
36114 ac_status=$?
36115 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36116 test $ac_status = 0; }
36117  
36118 fi
36119  
36120  
36121 else
36122  
36123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36124 $as_echo "yes" >&6; }
36125  
36126 fi
36127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36128 else
36129 #
36130 # Remove "force an error for a warning" options, if we
36131 # added them, by setting CXXFLAGS to the saved value plus
36132 # just the new option.
36133 #
36134  
36135 if ${WS_CXXFLAGS+:} false; then :
36136  
36137 case " $WS_CXXFLAGS " in #(
36138 *" $GCC_OPTION "*) :
36139 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
36140 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
36141 ac_status=$?
36142 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36143 test $ac_status = 0; } ;; #(
36144 *) :
36145  
36146 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
36147 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
36148 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
36149 ac_status=$?
36150 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36151 test $ac_status = 0; }
36152 ;;
36153 esac
36154  
36155 else
36156  
36157 WS_CXXFLAGS=$GCC_OPTION
36158 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
36159 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
36160 ac_status=$?
36161 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36162 test $ac_status = 0; }
36163  
36164 fi
36165  
36166 fi
36167  
36168 else
36169  
36170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36171 $as_echo "no" >&6; }
36172 can_add_to_cxxflags=no
36173  
36174 fi
36175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36176  
36177 CPPFLAGS="$ac_ws_CPPLAGS_saved"
36178 CFLAGS="$ac_ws_CFLAGS_saved"
36179 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
36180 LDFLAGS="$ac_ws_LDFLAGS_saved"
36181  
36182 ac_ext=c
36183 ac_cpp='$CPP $CPPFLAGS'
36184 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36185 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36186 ac_compiler_gnu=$ac_cv_c_compiler_gnu
36187  
36188 fi
36189 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
36190 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
36191 then
36192 #
36193 # Confusingly, some C++ compilers like -Wmissing-prototypes but
36194 # don't like -Wmissing-declarations and others like
36195 # -Wmissing-declarations but don't like -Wmissing-prototypes,
36196 # the fact that the corresponding C compiler likes both. Don't
36197 # warn about them.
36198 #
36199 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
36200 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
36201 then
36202 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
36203 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
36204 fi
36205 fi
36206 fi
36207 fi
36208  
36209  
36210 #
36211 # Try to have the compiler default to hiding symbols, so that only
36212 # symbols explicitly exported with WS_DLL_PUBLIC will be visible
36213 # outside (shared) libraries; that way, more UN*X builds will catch
36214 # failures to export symbols, rather than having that fail only on
36215 # Windows.
36216 #
36217 # GCC and GCC-compatible compilers
36218 #
36219 GCC_OPTION="-fvisibility=hidden"
36220 can_add_to_cflags=""
36221 can_add_to_cxxflags=""
36222 if test "x$ac_supports_gcc_flags" = "xyes" ; then
36223 if test "" != CXX ; then
36224 #
36225 # Not C++-only; if this can be added to the C compiler flags, add them.
36226 #
36227 # If the option begins with "-W", add
36228 # $ac_wireshark_unknown_warning_option_error to make sure that
36229 # we'll get an error if it's an unknown warning option; not all
36230 # compilers treat unknown warning options as errors (I'm looking at
36231 # you, clang).
36232 #
36233 # If the option begins with "-f" or "-m", add -Werror to make sure
36234 # that we'll get an error if we get "argument unused during compilation"
36235 # warnings, as those will either cause a failure for files compiled
36236 # with -Werror or annoying noise for files compiled without it.
36237 # (Yeah, you, clang.)
36238 #
36239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
36240 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
36241  
36242 ac_ws_CPPLAGS_saved="$CPPFLAGS"
36243 ac_ws_CFLAGS_saved="$CFLAGS"
36244 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
36245 ac_ws_LDFLAGS_saved="$LDFLAGS"
36246 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
36247 CFLAGS="$WS_CFLAGS $CFLAGS"
36248 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
36249 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
36250  
36251 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
36252 then
36253 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
36254 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
36255 then
36256 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
36257 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
36258 then
36259 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
36260 else
36261 CFLAGS="$CFLAGS $GCC_OPTION"
36262 fi
36263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36264 /* end confdefs.h. */
36265  
36266 int foo;
36267  
36268 _ACEOF
36269 if ac_fn_c_try_compile "$LINENO"; then :
36270  
36271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36272 $as_echo "yes" >&6; }
36273 can_add_to_cflags=yes
36274 #
36275 # OK, do we have a test program? If so, check
36276 # whether it fails with this option and -Werror,
36277 # and, if so, don't include it.
36278 #
36279 # We test arg 4 here because arg 3 is a program which
36280 # could contain quotes (breaking the comparison).
36281 #
36282 if test "x" != "x" ; then
36283 CFLAGS="$CFLAGS -Werror"
36284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
36285 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
36286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36287 /* end confdefs.h. */
36288  
36289 _ACEOF
36290 if ac_fn_c_try_compile "$LINENO"; then :
36291  
36292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36293 $as_echo "no" >&6; }
36294 #
36295 # Remove "force an error for a warning" options, if we
36296 # added them, by setting CFLAGS to the saved value plus
36297 # just the new option.
36298 #
36299  
36300 if ${WS_CFLAGS+:} false; then :
36301  
36302 case " $WS_CFLAGS " in #(
36303 *" $GCC_OPTION "*) :
36304 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
36305 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
36306 ac_status=$?
36307 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36308 test $ac_status = 0; } ;; #(
36309 *) :
36310  
36311 as_fn_append WS_CFLAGS " $GCC_OPTION"
36312 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
36313 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
36314 ac_status=$?
36315 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36316 test $ac_status = 0; }
36317 ;;
36318 esac
36319  
36320 else
36321  
36322 WS_CFLAGS=$GCC_OPTION
36323 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
36324 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
36325 ac_status=$?
36326 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36327 test $ac_status = 0; }
36328  
36329 fi
36330  
36331 if test "$CC" = "$CC_FOR_BUILD"; then
36332 #
36333 # We're building the build tools with the same compiler
36334 # with which we're building Wireshark, so add the flags
36335 # to the flags for that compiler as well.
36336 #
36337  
36338 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
36339  
36340 case " $WS_CFLAGS_FOR_BUILD " in #(
36341 *" $GCC_OPTION "*) :
36342 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
36343 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
36344 ac_status=$?
36345 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36346 test $ac_status = 0; } ;; #(
36347 *) :
36348  
36349 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
36350 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
36351 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
36352 ac_status=$?
36353 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36354 test $ac_status = 0; }
36355 ;;
36356 esac
36357  
36358 else
36359  
36360 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
36361 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
36362 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
36363 ac_status=$?
36364 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36365 test $ac_status = 0; }
36366  
36367 fi
36368  
36369 fi
36370  
36371 else
36372  
36373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36374 $as_echo "yes" >&6; }
36375  
36376 fi
36377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36378 else
36379 #
36380 # Remove "force an error for a warning" options, if we
36381 # added them, by setting CFLAGS to the saved value plus
36382 # just the new option.
36383 #
36384  
36385 if ${WS_CFLAGS+:} false; then :
36386  
36387 case " $WS_CFLAGS " in #(
36388 *" $GCC_OPTION "*) :
36389 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
36390 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
36391 ac_status=$?
36392 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36393 test $ac_status = 0; } ;; #(
36394 *) :
36395  
36396 as_fn_append WS_CFLAGS " $GCC_OPTION"
36397 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
36398 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
36399 ac_status=$?
36400 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36401 test $ac_status = 0; }
36402 ;;
36403 esac
36404  
36405 else
36406  
36407 WS_CFLAGS=$GCC_OPTION
36408 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
36409 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
36410 ac_status=$?
36411 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36412 test $ac_status = 0; }
36413  
36414 fi
36415  
36416 if test "$CC" = "$CC_FOR_BUILD"; then
36417 #
36418 # We're building the build tools with the same compiler
36419 # with which we're building Wireshark, so add the flags
36420 # to the flags for that compiler as well.
36421 #
36422  
36423 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
36424  
36425 case " $WS_CFLAGS_FOR_BUILD " in #(
36426 *" $GCC_OPTION "*) :
36427 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
36428 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
36429 ac_status=$?
36430 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36431 test $ac_status = 0; } ;; #(
36432 *) :
36433  
36434 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
36435 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
36436 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
36437 ac_status=$?
36438 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36439 test $ac_status = 0; }
36440 ;;
36441 esac
36442  
36443 else
36444  
36445 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
36446 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
36447 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
36448 ac_status=$?
36449 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36450 test $ac_status = 0; }
36451  
36452 fi
36453  
36454 fi
36455 fi
36456  
36457 else
36458  
36459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36460 $as_echo "no" >&6; }
36461 can_add_to_cflags=no
36462  
36463 fi
36464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36465  
36466 CPPFLAGS="$ac_ws_CPPLAGS_saved"
36467 CFLAGS="$ac_ws_CFLAGS_saved"
36468 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
36469 LDFLAGS="$ac_ws_LDFLAGS_saved"
36470  
36471 fi
36472 #
36473 # Did we find a C++ compiler?
36474 #
36475 if test "x$CXX" != "x" ; then
36476 #
36477 # Yes. Is this option only for the C compiler?
36478 #
36479 if test "" != C ; then
36480 #
36481 # Not C-only; if this option can be added to the C++ compiler
36482 # options, add it.
36483 #
36484 # If the option begins with "-W", add
36485 # $ac_wireshark_unknown_warning_option_error, as per the above, and
36486 # also add $ac_wireshark_non_cxx_warning_option_error, because at
36487 # lease some versions of g++ whine about -Wmissing-prototypes, the
36488 # fact that at least one of those versions refuses to warn about
36489 # function declarations without an earlier declaration nonwithstanding;
36490 # perhaps there's a reason not to warn about that with C++ even though
36491 # warning about it can be a Good Idea with C, but it's not obvious to
36492 # me).
36493 #
36494 # If the option begins with "-f" or "-m", add -Werror to make sure
36495 # that we'll get an error if we get "argument unused during compilation"
36496 # warnings, as those will either cause a failure for files compiled
36497 # with -Werror or annoying noise for files compiled without it.
36498 # (Yeah, you, clang++.)
36499 #
36500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
36501 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
36502  
36503 ac_ws_CPPLAGS_saved="$CPPFLAGS"
36504 ac_ws_CFLAGS_saved="$CFLAGS"
36505 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
36506 ac_ws_LDFLAGS_saved="$LDFLAGS"
36507 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
36508 CFLAGS="$WS_CFLAGS $CFLAGS"
36509 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
36510 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
36511  
36512 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
36513 then
36514 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
36515 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
36516 then
36517 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
36518 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
36519 then
36520 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
36521 else
36522 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
36523 fi
36524 ac_ext=cpp
36525 ac_cpp='$CXXCPP $CPPFLAGS'
36526 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36527 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36528 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36529  
36530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36531 /* end confdefs.h. */
36532  
36533 int foo;
36534  
36535 _ACEOF
36536 if ac_fn_cxx_try_compile "$LINENO"; then :
36537  
36538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36539 $as_echo "yes" >&6; }
36540 can_add_to_cxxflags=yes
36541 #
36542 # OK, do we have a test program? If so, check
36543 # whether it fails with this option and -Werror,
36544 # and, if so, don't include it.
36545 #
36546 # We test arg 4 here because arg 3 is a program which
36547 # could contain quotes (breaking the comparison).
36548 #
36549 if test "x" != "x" ; then
36550 CXXFLAGS="$CXXFLAGS -Werror"
36551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
36552 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
36553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36554 /* end confdefs.h. */
36555  
36556 _ACEOF
36557 if ac_fn_cxx_try_compile "$LINENO"; then :
36558  
36559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36560 $as_echo "no" >&6; }
36561 #
36562 # Remove "force an error for a warning" options, if we
36563 # added them, by setting CXXFLAGS to the saved value plus
36564 # just the new option.
36565 #
36566  
36567 if ${WS_CXXFLAGS+:} false; then :
36568  
36569 case " $WS_CXXFLAGS " in #(
36570 *" $GCC_OPTION "*) :
36571 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
36572 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
36573 ac_status=$?
36574 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36575 test $ac_status = 0; } ;; #(
36576 *) :
36577  
36578 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
36579 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
36580 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
36581 ac_status=$?
36582 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36583 test $ac_status = 0; }
36584 ;;
36585 esac
36586  
36587 else
36588  
36589 WS_CXXFLAGS=$GCC_OPTION
36590 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
36591 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
36592 ac_status=$?
36593 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36594 test $ac_status = 0; }
36595  
36596 fi
36597  
36598  
36599 else
36600  
36601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36602 $as_echo "yes" >&6; }
36603  
36604 fi
36605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36606 else
36607 #
36608 # Remove "force an error for a warning" options, if we
36609 # added them, by setting CXXFLAGS to the saved value plus
36610 # just the new option.
36611 #
36612  
36613 if ${WS_CXXFLAGS+:} false; then :
36614  
36615 case " $WS_CXXFLAGS " in #(
36616 *" $GCC_OPTION "*) :
36617 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
36618 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
36619 ac_status=$?
36620 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36621 test $ac_status = 0; } ;; #(
36622 *) :
36623  
36624 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
36625 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
36626 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
36627 ac_status=$?
36628 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36629 test $ac_status = 0; }
36630 ;;
36631 esac
36632  
36633 else
36634  
36635 WS_CXXFLAGS=$GCC_OPTION
36636 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
36637 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
36638 ac_status=$?
36639 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36640 test $ac_status = 0; }
36641  
36642 fi
36643  
36644 fi
36645  
36646 else
36647  
36648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36649 $as_echo "no" >&6; }
36650 can_add_to_cxxflags=no
36651  
36652 fi
36653 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36654  
36655 CPPFLAGS="$ac_ws_CPPLAGS_saved"
36656 CFLAGS="$ac_ws_CFLAGS_saved"
36657 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
36658 LDFLAGS="$ac_ws_LDFLAGS_saved"
36659  
36660 ac_ext=c
36661 ac_cpp='$CPP $CPPFLAGS'
36662 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36663 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36664 ac_compiler_gnu=$ac_cv_c_compiler_gnu
36665  
36666 fi
36667 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
36668 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
36669 then
36670 #
36671 # Confusingly, some C++ compilers like -Wmissing-prototypes but
36672 # don't like -Wmissing-declarations and others like
36673 # -Wmissing-declarations but don't like -Wmissing-prototypes,
36674 # the fact that the corresponding C compiler likes both. Don't
36675 # warn about them.
36676 #
36677 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
36678 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
36679 then
36680 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
36681 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
36682 fi
36683 fi
36684 fi
36685 fi
36686  
36687 if test "x$can_add_to_cflags" = "xno"
36688 then
36689 #
36690 # Sun^WOracle C.
36691 #
36692 GCC_OPTION="-xldscope=hidden"
36693 can_add_to_cflags=""
36694 can_add_to_cxxflags=""
36695 if test "x$ac_supports_gcc_flags" = "xyes" ; then
36696 if test "" != CXX ; then
36697 #
36698 # Not C++-only; if this can be added to the C compiler flags, add them.
36699 #
36700 # If the option begins with "-W", add
36701 # $ac_wireshark_unknown_warning_option_error to make sure that
36702 # we'll get an error if it's an unknown warning option; not all
36703 # compilers treat unknown warning options as errors (I'm looking at
36704 # you, clang).
36705 #
36706 # If the option begins with "-f" or "-m", add -Werror to make sure
36707 # that we'll get an error if we get "argument unused during compilation"
36708 # warnings, as those will either cause a failure for files compiled
36709 # with -Werror or annoying noise for files compiled without it.
36710 # (Yeah, you, clang.)
36711 #
36712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
36713 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
36714  
36715 ac_ws_CPPLAGS_saved="$CPPFLAGS"
36716 ac_ws_CFLAGS_saved="$CFLAGS"
36717 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
36718 ac_ws_LDFLAGS_saved="$LDFLAGS"
36719 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
36720 CFLAGS="$WS_CFLAGS $CFLAGS"
36721 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
36722 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
36723  
36724 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
36725 then
36726 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
36727 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
36728 then
36729 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
36730 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
36731 then
36732 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
36733 else
36734 CFLAGS="$CFLAGS $GCC_OPTION"
36735 fi
36736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36737 /* end confdefs.h. */
36738  
36739 int foo;
36740  
36741 _ACEOF
36742 if ac_fn_c_try_compile "$LINENO"; then :
36743  
36744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36745 $as_echo "yes" >&6; }
36746 can_add_to_cflags=yes
36747 #
36748 # OK, do we have a test program? If so, check
36749 # whether it fails with this option and -Werror,
36750 # and, if so, don't include it.
36751 #
36752 # We test arg 4 here because arg 3 is a program which
36753 # could contain quotes (breaking the comparison).
36754 #
36755 if test "x" != "x" ; then
36756 CFLAGS="$CFLAGS -Werror"
36757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
36758 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
36759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36760 /* end confdefs.h. */
36761  
36762 _ACEOF
36763 if ac_fn_c_try_compile "$LINENO"; then :
36764  
36765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36766 $as_echo "no" >&6; }
36767 #
36768 # Remove "force an error for a warning" options, if we
36769 # added them, by setting CFLAGS to the saved value plus
36770 # just the new option.
36771 #
36772  
36773 if ${WS_CFLAGS+:} false; then :
36774  
36775 case " $WS_CFLAGS " in #(
36776 *" $GCC_OPTION "*) :
36777 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
36778 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
36779 ac_status=$?
36780 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36781 test $ac_status = 0; } ;; #(
36782 *) :
36783  
36784 as_fn_append WS_CFLAGS " $GCC_OPTION"
36785 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
36786 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
36787 ac_status=$?
36788 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36789 test $ac_status = 0; }
36790 ;;
36791 esac
36792  
36793 else
36794  
36795 WS_CFLAGS=$GCC_OPTION
36796 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
36797 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
36798 ac_status=$?
36799 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36800 test $ac_status = 0; }
36801  
36802 fi
36803  
36804 if test "$CC" = "$CC_FOR_BUILD"; then
36805 #
36806 # We're building the build tools with the same compiler
36807 # with which we're building Wireshark, so add the flags
36808 # to the flags for that compiler as well.
36809 #
36810  
36811 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
36812  
36813 case " $WS_CFLAGS_FOR_BUILD " in #(
36814 *" $GCC_OPTION "*) :
36815 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
36816 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
36817 ac_status=$?
36818 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36819 test $ac_status = 0; } ;; #(
36820 *) :
36821  
36822 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
36823 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
36824 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
36825 ac_status=$?
36826 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36827 test $ac_status = 0; }
36828 ;;
36829 esac
36830  
36831 else
36832  
36833 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
36834 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
36835 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
36836 ac_status=$?
36837 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36838 test $ac_status = 0; }
36839  
36840 fi
36841  
36842 fi
36843  
36844 else
36845  
36846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36847 $as_echo "yes" >&6; }
36848  
36849 fi
36850 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36851 else
36852 #
36853 # Remove "force an error for a warning" options, if we
36854 # added them, by setting CFLAGS to the saved value plus
36855 # just the new option.
36856 #
36857  
36858 if ${WS_CFLAGS+:} false; then :
36859  
36860 case " $WS_CFLAGS " in #(
36861 *" $GCC_OPTION "*) :
36862 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
36863 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
36864 ac_status=$?
36865 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36866 test $ac_status = 0; } ;; #(
36867 *) :
36868  
36869 as_fn_append WS_CFLAGS " $GCC_OPTION"
36870 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
36871 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
36872 ac_status=$?
36873 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36874 test $ac_status = 0; }
36875 ;;
36876 esac
36877  
36878 else
36879  
36880 WS_CFLAGS=$GCC_OPTION
36881 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
36882 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
36883 ac_status=$?
36884 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36885 test $ac_status = 0; }
36886  
36887 fi
36888  
36889 if test "$CC" = "$CC_FOR_BUILD"; then
36890 #
36891 # We're building the build tools with the same compiler
36892 # with which we're building Wireshark, so add the flags
36893 # to the flags for that compiler as well.
36894 #
36895  
36896 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
36897  
36898 case " $WS_CFLAGS_FOR_BUILD " in #(
36899 *" $GCC_OPTION "*) :
36900 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
36901 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
36902 ac_status=$?
36903 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36904 test $ac_status = 0; } ;; #(
36905 *) :
36906  
36907 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
36908 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
36909 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
36910 ac_status=$?
36911 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36912 test $ac_status = 0; }
36913 ;;
36914 esac
36915  
36916 else
36917  
36918 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
36919 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
36920 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
36921 ac_status=$?
36922 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36923 test $ac_status = 0; }
36924  
36925 fi
36926  
36927 fi
36928 fi
36929  
36930 else
36931  
36932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36933 $as_echo "no" >&6; }
36934 can_add_to_cflags=no
36935  
36936 fi
36937 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36938  
36939 CPPFLAGS="$ac_ws_CPPLAGS_saved"
36940 CFLAGS="$ac_ws_CFLAGS_saved"
36941 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
36942 LDFLAGS="$ac_ws_LDFLAGS_saved"
36943  
36944 fi
36945 #
36946 # Did we find a C++ compiler?
36947 #
36948 if test "x$CXX" != "x" ; then
36949 #
36950 # Yes. Is this option only for the C compiler?
36951 #
36952 if test "" != C ; then
36953 #
36954 # Not C-only; if this option can be added to the C++ compiler
36955 # options, add it.
36956 #
36957 # If the option begins with "-W", add
36958 # $ac_wireshark_unknown_warning_option_error, as per the above, and
36959 # also add $ac_wireshark_non_cxx_warning_option_error, because at
36960 # lease some versions of g++ whine about -Wmissing-prototypes, the
36961 # fact that at least one of those versions refuses to warn about
36962 # function declarations without an earlier declaration nonwithstanding;
36963 # perhaps there's a reason not to warn about that with C++ even though
36964 # warning about it can be a Good Idea with C, but it's not obvious to
36965 # me).
36966 #
36967 # If the option begins with "-f" or "-m", add -Werror to make sure
36968 # that we'll get an error if we get "argument unused during compilation"
36969 # warnings, as those will either cause a failure for files compiled
36970 # with -Werror or annoying noise for files compiled without it.
36971 # (Yeah, you, clang++.)
36972 #
36973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
36974 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
36975  
36976 ac_ws_CPPLAGS_saved="$CPPFLAGS"
36977 ac_ws_CFLAGS_saved="$CFLAGS"
36978 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
36979 ac_ws_LDFLAGS_saved="$LDFLAGS"
36980 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
36981 CFLAGS="$WS_CFLAGS $CFLAGS"
36982 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
36983 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
36984  
36985 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
36986 then
36987 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
36988 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
36989 then
36990 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
36991 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
36992 then
36993 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
36994 else
36995 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
36996 fi
36997 ac_ext=cpp
36998 ac_cpp='$CXXCPP $CPPFLAGS'
36999 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
37000 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
37001 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
37002  
37003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37004 /* end confdefs.h. */
37005  
37006 int foo;
37007  
37008 _ACEOF
37009 if ac_fn_cxx_try_compile "$LINENO"; then :
37010  
37011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37012 $as_echo "yes" >&6; }
37013 can_add_to_cxxflags=yes
37014 #
37015 # OK, do we have a test program? If so, check
37016 # whether it fails with this option and -Werror,
37017 # and, if so, don't include it.
37018 #
37019 # We test arg 4 here because arg 3 is a program which
37020 # could contain quotes (breaking the comparison).
37021 #
37022 if test "x" != "x" ; then
37023 CXXFLAGS="$CXXFLAGS -Werror"
37024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
37025 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
37026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37027 /* end confdefs.h. */
37028  
37029 _ACEOF
37030 if ac_fn_cxx_try_compile "$LINENO"; then :
37031  
37032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37033 $as_echo "no" >&6; }
37034 #
37035 # Remove "force an error for a warning" options, if we
37036 # added them, by setting CXXFLAGS to the saved value plus
37037 # just the new option.
37038 #
37039  
37040 if ${WS_CXXFLAGS+:} false; then :
37041  
37042 case " $WS_CXXFLAGS " in #(
37043 *" $GCC_OPTION "*) :
37044 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
37045 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
37046 ac_status=$?
37047 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37048 test $ac_status = 0; } ;; #(
37049 *) :
37050  
37051 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
37052 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
37053 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
37054 ac_status=$?
37055 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37056 test $ac_status = 0; }
37057 ;;
37058 esac
37059  
37060 else
37061  
37062 WS_CXXFLAGS=$GCC_OPTION
37063 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
37064 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
37065 ac_status=$?
37066 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37067 test $ac_status = 0; }
37068  
37069 fi
37070  
37071  
37072 else
37073  
37074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37075 $as_echo "yes" >&6; }
37076  
37077 fi
37078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37079 else
37080 #
37081 # Remove "force an error for a warning" options, if we
37082 # added them, by setting CXXFLAGS to the saved value plus
37083 # just the new option.
37084 #
37085  
37086 if ${WS_CXXFLAGS+:} false; then :
37087  
37088 case " $WS_CXXFLAGS " in #(
37089 *" $GCC_OPTION "*) :
37090 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
37091 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
37092 ac_status=$?
37093 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37094 test $ac_status = 0; } ;; #(
37095 *) :
37096  
37097 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
37098 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
37099 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
37100 ac_status=$?
37101 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37102 test $ac_status = 0; }
37103 ;;
37104 esac
37105  
37106 else
37107  
37108 WS_CXXFLAGS=$GCC_OPTION
37109 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
37110 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
37111 ac_status=$?
37112 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37113 test $ac_status = 0; }
37114  
37115 fi
37116  
37117 fi
37118  
37119 else
37120  
37121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37122 $as_echo "no" >&6; }
37123 can_add_to_cxxflags=no
37124  
37125 fi
37126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37127  
37128 CPPFLAGS="$ac_ws_CPPLAGS_saved"
37129 CFLAGS="$ac_ws_CFLAGS_saved"
37130 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
37131 LDFLAGS="$ac_ws_LDFLAGS_saved"
37132  
37133 ac_ext=c
37134 ac_cpp='$CPP $CPPFLAGS'
37135 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
37136 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
37137 ac_compiler_gnu=$ac_cv_c_compiler_gnu
37138  
37139 fi
37140 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
37141 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
37142 then
37143 #
37144 # Confusingly, some C++ compilers like -Wmissing-prototypes but
37145 # don't like -Wmissing-declarations and others like
37146 # -Wmissing-declarations but don't like -Wmissing-prototypes,
37147 # the fact that the corresponding C compiler likes both. Don't
37148 # warn about them.
37149 #
37150 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
37151 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
37152 then
37153 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
37154 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
37155 fi
37156 fi
37157 fi
37158 fi
37159  
37160 if test "x$can_add_to_cflags" = "xno"
37161 then
37162 # TODO add other ways of hiding symbols
37163 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiler will export all symbols from shared libraries" >&5
37164 $as_echo "$as_me: WARNING: Compiler will export all symbols from shared libraries" >&2;}
37165 fi
37166 fi
37167  
37168 #Clang only
37169 GCC_OPTION="-Wc99-extensions"
37170 can_add_to_cflags=""
37171 can_add_to_cxxflags=""
37172 if test "x$ac_supports_gcc_flags" = "xyes" ; then
37173 if test "C" != CXX ; then
37174 #
37175 # Not C++-only; if this can be added to the C compiler flags, add them.
37176 #
37177 # If the option begins with "-W", add
37178 # $ac_wireshark_unknown_warning_option_error to make sure that
37179 # we'll get an error if it's an unknown warning option; not all
37180 # compilers treat unknown warning options as errors (I'm looking at
37181 # you, clang).
37182 #
37183 # If the option begins with "-f" or "-m", add -Werror to make sure
37184 # that we'll get an error if we get "argument unused during compilation"
37185 # warnings, as those will either cause a failure for files compiled
37186 # with -Werror or annoying noise for files compiled without it.
37187 # (Yeah, you, clang.)
37188 #
37189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
37190 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
37191  
37192 ac_ws_CPPLAGS_saved="$CPPFLAGS"
37193 ac_ws_CFLAGS_saved="$CFLAGS"
37194 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
37195 ac_ws_LDFLAGS_saved="$LDFLAGS"
37196 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
37197 CFLAGS="$WS_CFLAGS $CFLAGS"
37198 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
37199 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
37200  
37201 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
37202 then
37203 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
37204 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
37205 then
37206 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
37207 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
37208 then
37209 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
37210 else
37211 CFLAGS="$CFLAGS $GCC_OPTION"
37212 fi
37213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37214 /* end confdefs.h. */
37215  
37216 int foo;
37217  
37218 _ACEOF
37219 if ac_fn_c_try_compile "$LINENO"; then :
37220  
37221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37222 $as_echo "yes" >&6; }
37223 can_add_to_cflags=yes
37224 #
37225 # OK, do we have a test program? If so, check
37226 # whether it fails with this option and -Werror,
37227 # and, if so, don't include it.
37228 #
37229 # We test arg 4 here because arg 3 is a program which
37230 # could contain quotes (breaking the comparison).
37231 #
37232 if test "x" != "x" ; then
37233 CFLAGS="$CFLAGS -Werror"
37234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
37235 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
37236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37237 /* end confdefs.h. */
37238  
37239 _ACEOF
37240 if ac_fn_c_try_compile "$LINENO"; then :
37241  
37242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37243 $as_echo "no" >&6; }
37244 #
37245 # Remove "force an error for a warning" options, if we
37246 # added them, by setting CFLAGS to the saved value plus
37247 # just the new option.
37248 #
37249  
37250 if ${WS_CFLAGS+:} false; then :
37251  
37252 case " $WS_CFLAGS " in #(
37253 *" $GCC_OPTION "*) :
37254 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
37255 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
37256 ac_status=$?
37257 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37258 test $ac_status = 0; } ;; #(
37259 *) :
37260  
37261 as_fn_append WS_CFLAGS " $GCC_OPTION"
37262 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
37263 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
37264 ac_status=$?
37265 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37266 test $ac_status = 0; }
37267 ;;
37268 esac
37269  
37270 else
37271  
37272 WS_CFLAGS=$GCC_OPTION
37273 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
37274 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
37275 ac_status=$?
37276 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37277 test $ac_status = 0; }
37278  
37279 fi
37280  
37281 if test "$CC" = "$CC_FOR_BUILD"; then
37282 #
37283 # We're building the build tools with the same compiler
37284 # with which we're building Wireshark, so add the flags
37285 # to the flags for that compiler as well.
37286 #
37287  
37288 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
37289  
37290 case " $WS_CFLAGS_FOR_BUILD " in #(
37291 *" $GCC_OPTION "*) :
37292 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
37293 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
37294 ac_status=$?
37295 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37296 test $ac_status = 0; } ;; #(
37297 *) :
37298  
37299 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
37300 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
37301 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
37302 ac_status=$?
37303 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37304 test $ac_status = 0; }
37305 ;;
37306 esac
37307  
37308 else
37309  
37310 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
37311 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
37312 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
37313 ac_status=$?
37314 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37315 test $ac_status = 0; }
37316  
37317 fi
37318  
37319 fi
37320  
37321 else
37322  
37323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37324 $as_echo "yes" >&6; }
37325  
37326 fi
37327 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37328 else
37329 #
37330 # Remove "force an error for a warning" options, if we
37331 # added them, by setting CFLAGS to the saved value plus
37332 # just the new option.
37333 #
37334  
37335 if ${WS_CFLAGS+:} false; then :
37336  
37337 case " $WS_CFLAGS " in #(
37338 *" $GCC_OPTION "*) :
37339 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
37340 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
37341 ac_status=$?
37342 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37343 test $ac_status = 0; } ;; #(
37344 *) :
37345  
37346 as_fn_append WS_CFLAGS " $GCC_OPTION"
37347 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
37348 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
37349 ac_status=$?
37350 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37351 test $ac_status = 0; }
37352 ;;
37353 esac
37354  
37355 else
37356  
37357 WS_CFLAGS=$GCC_OPTION
37358 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
37359 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
37360 ac_status=$?
37361 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37362 test $ac_status = 0; }
37363  
37364 fi
37365  
37366 if test "$CC" = "$CC_FOR_BUILD"; then
37367 #
37368 # We're building the build tools with the same compiler
37369 # with which we're building Wireshark, so add the flags
37370 # to the flags for that compiler as well.
37371 #
37372  
37373 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
37374  
37375 case " $WS_CFLAGS_FOR_BUILD " in #(
37376 *" $GCC_OPTION "*) :
37377 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
37378 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
37379 ac_status=$?
37380 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37381 test $ac_status = 0; } ;; #(
37382 *) :
37383  
37384 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
37385 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
37386 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
37387 ac_status=$?
37388 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37389 test $ac_status = 0; }
37390 ;;
37391 esac
37392  
37393 else
37394  
37395 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
37396 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
37397 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
37398 ac_status=$?
37399 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37400 test $ac_status = 0; }
37401  
37402 fi
37403  
37404 fi
37405 fi
37406  
37407 else
37408  
37409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37410 $as_echo "no" >&6; }
37411 can_add_to_cflags=no
37412  
37413 fi
37414 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37415  
37416 CPPFLAGS="$ac_ws_CPPLAGS_saved"
37417 CFLAGS="$ac_ws_CFLAGS_saved"
37418 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
37419 LDFLAGS="$ac_ws_LDFLAGS_saved"
37420  
37421 fi
37422 #
37423 # Did we find a C++ compiler?
37424 #
37425 if test "x$CXX" != "x" ; then
37426 #
37427 # Yes. Is this option only for the C compiler?
37428 #
37429 if test "C" != C ; then
37430 #
37431 # Not C-only; if this option can be added to the C++ compiler
37432 # options, add it.
37433 #
37434 # If the option begins with "-W", add
37435 # $ac_wireshark_unknown_warning_option_error, as per the above, and
37436 # also add $ac_wireshark_non_cxx_warning_option_error, because at
37437 # lease some versions of g++ whine about -Wmissing-prototypes, the
37438 # fact that at least one of those versions refuses to warn about
37439 # function declarations without an earlier declaration nonwithstanding;
37440 # perhaps there's a reason not to warn about that with C++ even though
37441 # warning about it can be a Good Idea with C, but it's not obvious to
37442 # me).
37443 #
37444 # If the option begins with "-f" or "-m", add -Werror to make sure
37445 # that we'll get an error if we get "argument unused during compilation"
37446 # warnings, as those will either cause a failure for files compiled
37447 # with -Werror or annoying noise for files compiled without it.
37448 # (Yeah, you, clang++.)
37449 #
37450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
37451 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
37452  
37453 ac_ws_CPPLAGS_saved="$CPPFLAGS"
37454 ac_ws_CFLAGS_saved="$CFLAGS"
37455 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
37456 ac_ws_LDFLAGS_saved="$LDFLAGS"
37457 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
37458 CFLAGS="$WS_CFLAGS $CFLAGS"
37459 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
37460 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
37461  
37462 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
37463 then
37464 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
37465 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
37466 then
37467 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
37468 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
37469 then
37470 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
37471 else
37472 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
37473 fi
37474 ac_ext=cpp
37475 ac_cpp='$CXXCPP $CPPFLAGS'
37476 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
37477 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
37478 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
37479  
37480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37481 /* end confdefs.h. */
37482  
37483 int foo;
37484  
37485 _ACEOF
37486 if ac_fn_cxx_try_compile "$LINENO"; then :
37487  
37488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37489 $as_echo "yes" >&6; }
37490 can_add_to_cxxflags=yes
37491 #
37492 # OK, do we have a test program? If so, check
37493 # whether it fails with this option and -Werror,
37494 # and, if so, don't include it.
37495 #
37496 # We test arg 4 here because arg 3 is a program which
37497 # could contain quotes (breaking the comparison).
37498 #
37499 if test "x" != "x" ; then
37500 CXXFLAGS="$CXXFLAGS -Werror"
37501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
37502 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
37503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37504 /* end confdefs.h. */
37505  
37506 _ACEOF
37507 if ac_fn_cxx_try_compile "$LINENO"; then :
37508  
37509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37510 $as_echo "no" >&6; }
37511 #
37512 # Remove "force an error for a warning" options, if we
37513 # added them, by setting CXXFLAGS to the saved value plus
37514 # just the new option.
37515 #
37516  
37517 if ${WS_CXXFLAGS+:} false; then :
37518  
37519 case " $WS_CXXFLAGS " in #(
37520 *" $GCC_OPTION "*) :
37521 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
37522 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
37523 ac_status=$?
37524 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37525 test $ac_status = 0; } ;; #(
37526 *) :
37527  
37528 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
37529 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
37530 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
37531 ac_status=$?
37532 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37533 test $ac_status = 0; }
37534 ;;
37535 esac
37536  
37537 else
37538  
37539 WS_CXXFLAGS=$GCC_OPTION
37540 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
37541 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
37542 ac_status=$?
37543 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37544 test $ac_status = 0; }
37545  
37546 fi
37547  
37548  
37549 else
37550  
37551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37552 $as_echo "yes" >&6; }
37553  
37554 fi
37555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37556 else
37557 #
37558 # Remove "force an error for a warning" options, if we
37559 # added them, by setting CXXFLAGS to the saved value plus
37560 # just the new option.
37561 #
37562  
37563 if ${WS_CXXFLAGS+:} false; then :
37564  
37565 case " $WS_CXXFLAGS " in #(
37566 *" $GCC_OPTION "*) :
37567 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
37568 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
37569 ac_status=$?
37570 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37571 test $ac_status = 0; } ;; #(
37572 *) :
37573  
37574 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
37575 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
37576 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
37577 ac_status=$?
37578 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37579 test $ac_status = 0; }
37580 ;;
37581 esac
37582  
37583 else
37584  
37585 WS_CXXFLAGS=$GCC_OPTION
37586 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
37587 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
37588 ac_status=$?
37589 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37590 test $ac_status = 0; }
37591  
37592 fi
37593  
37594 fi
37595  
37596 else
37597  
37598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37599 $as_echo "no" >&6; }
37600 can_add_to_cxxflags=no
37601  
37602 fi
37603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37604  
37605 CPPFLAGS="$ac_ws_CPPLAGS_saved"
37606 CFLAGS="$ac_ws_CFLAGS_saved"
37607 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
37608 LDFLAGS="$ac_ws_LDFLAGS_saved"
37609  
37610 ac_ext=c
37611 ac_cpp='$CPP $CPPFLAGS'
37612 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
37613 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
37614 ac_compiler_gnu=$ac_cv_c_compiler_gnu
37615  
37616 fi
37617 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
37618 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
37619 then
37620 #
37621 # Confusingly, some C++ compilers like -Wmissing-prototypes but
37622 # don't like -Wmissing-declarations and others like
37623 # -Wmissing-declarations but don't like -Wmissing-prototypes,
37624 # the fact that the corresponding C compiler likes both. Don't
37625 # warn about them.
37626 #
37627 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
37628 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
37629 then
37630 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
37631 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
37632 fi
37633 fi
37634 fi
37635 fi
37636  
37637  
37638 #
37639 # Try to add some additional checks to CFLAGS.
37640 # These are not enabled by default, because the warnings they produce
37641 # are very hard or impossible to eliminate.
37642 #
37643 # Check whether --enable-extra-compiler-warnings was given.
37644 if test "${enable_extra_compiler_warnings+set}" = set; then :
37645 enableval=$enable_extra_compiler_warnings;
37646 wireshark_extra_flags=$enableval
37647 if test $enableval != no
37648 then
37649 #
37650 # The following are for C and C++
37651 #
37652 GCC_OPTION="-Wpedantic"
37653 can_add_to_cflags=""
37654 can_add_to_cxxflags=""
37655 if test "x$ac_supports_gcc_flags" = "xyes" ; then
37656 if test "" != CXX ; then
37657 #
37658 # Not C++-only; if this can be added to the C compiler flags, add them.
37659 #
37660 # If the option begins with "-W", add
37661 # $ac_wireshark_unknown_warning_option_error to make sure that
37662 # we'll get an error if it's an unknown warning option; not all
37663 # compilers treat unknown warning options as errors (I'm looking at
37664 # you, clang).
37665 #
37666 # If the option begins with "-f" or "-m", add -Werror to make sure
37667 # that we'll get an error if we get "argument unused during compilation"
37668 # warnings, as those will either cause a failure for files compiled
37669 # with -Werror or annoying noise for files compiled without it.
37670 # (Yeah, you, clang.)
37671 #
37672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
37673 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
37674  
37675 ac_ws_CPPLAGS_saved="$CPPFLAGS"
37676 ac_ws_CFLAGS_saved="$CFLAGS"
37677 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
37678 ac_ws_LDFLAGS_saved="$LDFLAGS"
37679 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
37680 CFLAGS="$WS_CFLAGS $CFLAGS"
37681 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
37682 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
37683  
37684 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
37685 then
37686 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
37687 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
37688 then
37689 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
37690 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
37691 then
37692 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
37693 else
37694 CFLAGS="$CFLAGS $GCC_OPTION"
37695 fi
37696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37697 /* end confdefs.h. */
37698  
37699 int foo;
37700  
37701 _ACEOF
37702 if ac_fn_c_try_compile "$LINENO"; then :
37703  
37704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37705 $as_echo "yes" >&6; }
37706 can_add_to_cflags=yes
37707 #
37708 # OK, do we have a test program? If so, check
37709 # whether it fails with this option and -Werror,
37710 # and, if so, don't include it.
37711 #
37712 # We test arg 4 here because arg 3 is a program which
37713 # could contain quotes (breaking the comparison).
37714 #
37715 if test "x" != "x" ; then
37716 CFLAGS="$CFLAGS -Werror"
37717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
37718 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
37719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37720 /* end confdefs.h. */
37721  
37722 _ACEOF
37723 if ac_fn_c_try_compile "$LINENO"; then :
37724  
37725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37726 $as_echo "no" >&6; }
37727 #
37728 # Remove "force an error for a warning" options, if we
37729 # added them, by setting CFLAGS to the saved value plus
37730 # just the new option.
37731 #
37732  
37733 if ${WS_CFLAGS+:} false; then :
37734  
37735 case " $WS_CFLAGS " in #(
37736 *" $GCC_OPTION "*) :
37737 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
37738 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
37739 ac_status=$?
37740 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37741 test $ac_status = 0; } ;; #(
37742 *) :
37743  
37744 as_fn_append WS_CFLAGS " $GCC_OPTION"
37745 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
37746 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
37747 ac_status=$?
37748 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37749 test $ac_status = 0; }
37750 ;;
37751 esac
37752  
37753 else
37754  
37755 WS_CFLAGS=$GCC_OPTION
37756 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
37757 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
37758 ac_status=$?
37759 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37760 test $ac_status = 0; }
37761  
37762 fi
37763  
37764 if test "$CC" = "$CC_FOR_BUILD"; then
37765 #
37766 # We're building the build tools with the same compiler
37767 # with which we're building Wireshark, so add the flags
37768 # to the flags for that compiler as well.
37769 #
37770  
37771 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
37772  
37773 case " $WS_CFLAGS_FOR_BUILD " in #(
37774 *" $GCC_OPTION "*) :
37775 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
37776 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
37777 ac_status=$?
37778 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37779 test $ac_status = 0; } ;; #(
37780 *) :
37781  
37782 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
37783 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
37784 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
37785 ac_status=$?
37786 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37787 test $ac_status = 0; }
37788 ;;
37789 esac
37790  
37791 else
37792  
37793 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
37794 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
37795 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
37796 ac_status=$?
37797 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37798 test $ac_status = 0; }
37799  
37800 fi
37801  
37802 fi
37803  
37804 else
37805  
37806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37807 $as_echo "yes" >&6; }
37808  
37809 fi
37810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37811 else
37812 #
37813 # Remove "force an error for a warning" options, if we
37814 # added them, by setting CFLAGS to the saved value plus
37815 # just the new option.
37816 #
37817  
37818 if ${WS_CFLAGS+:} false; then :
37819  
37820 case " $WS_CFLAGS " in #(
37821 *" $GCC_OPTION "*) :
37822 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
37823 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
37824 ac_status=$?
37825 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37826 test $ac_status = 0; } ;; #(
37827 *) :
37828  
37829 as_fn_append WS_CFLAGS " $GCC_OPTION"
37830 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
37831 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
37832 ac_status=$?
37833 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37834 test $ac_status = 0; }
37835 ;;
37836 esac
37837  
37838 else
37839  
37840 WS_CFLAGS=$GCC_OPTION
37841 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
37842 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
37843 ac_status=$?
37844 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37845 test $ac_status = 0; }
37846  
37847 fi
37848  
37849 if test "$CC" = "$CC_FOR_BUILD"; then
37850 #
37851 # We're building the build tools with the same compiler
37852 # with which we're building Wireshark, so add the flags
37853 # to the flags for that compiler as well.
37854 #
37855  
37856 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
37857  
37858 case " $WS_CFLAGS_FOR_BUILD " in #(
37859 *" $GCC_OPTION "*) :
37860 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
37861 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
37862 ac_status=$?
37863 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37864 test $ac_status = 0; } ;; #(
37865 *) :
37866  
37867 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
37868 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
37869 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
37870 ac_status=$?
37871 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37872 test $ac_status = 0; }
37873 ;;
37874 esac
37875  
37876 else
37877  
37878 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
37879 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
37880 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
37881 ac_status=$?
37882 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37883 test $ac_status = 0; }
37884  
37885 fi
37886  
37887 fi
37888 fi
37889  
37890 else
37891  
37892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37893 $as_echo "no" >&6; }
37894 can_add_to_cflags=no
37895  
37896 fi
37897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37898  
37899 CPPFLAGS="$ac_ws_CPPLAGS_saved"
37900 CFLAGS="$ac_ws_CFLAGS_saved"
37901 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
37902 LDFLAGS="$ac_ws_LDFLAGS_saved"
37903  
37904 fi
37905 #
37906 # Did we find a C++ compiler?
37907 #
37908 if test "x$CXX" != "x" ; then
37909 #
37910 # Yes. Is this option only for the C compiler?
37911 #
37912 if test "" != C ; then
37913 #
37914 # Not C-only; if this option can be added to the C++ compiler
37915 # options, add it.
37916 #
37917 # If the option begins with "-W", add
37918 # $ac_wireshark_unknown_warning_option_error, as per the above, and
37919 # also add $ac_wireshark_non_cxx_warning_option_error, because at
37920 # lease some versions of g++ whine about -Wmissing-prototypes, the
37921 # fact that at least one of those versions refuses to warn about
37922 # function declarations without an earlier declaration nonwithstanding;
37923 # perhaps there's a reason not to warn about that with C++ even though
37924 # warning about it can be a Good Idea with C, but it's not obvious to
37925 # me).
37926 #
37927 # If the option begins with "-f" or "-m", add -Werror to make sure
37928 # that we'll get an error if we get "argument unused during compilation"
37929 # warnings, as those will either cause a failure for files compiled
37930 # with -Werror or annoying noise for files compiled without it.
37931 # (Yeah, you, clang++.)
37932 #
37933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
37934 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
37935  
37936 ac_ws_CPPLAGS_saved="$CPPFLAGS"
37937 ac_ws_CFLAGS_saved="$CFLAGS"
37938 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
37939 ac_ws_LDFLAGS_saved="$LDFLAGS"
37940 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
37941 CFLAGS="$WS_CFLAGS $CFLAGS"
37942 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
37943 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
37944  
37945 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
37946 then
37947 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
37948 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
37949 then
37950 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
37951 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
37952 then
37953 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
37954 else
37955 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
37956 fi
37957 ac_ext=cpp
37958 ac_cpp='$CXXCPP $CPPFLAGS'
37959 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
37960 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
37961 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
37962  
37963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37964 /* end confdefs.h. */
37965  
37966 int foo;
37967  
37968 _ACEOF
37969 if ac_fn_cxx_try_compile "$LINENO"; then :
37970  
37971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37972 $as_echo "yes" >&6; }
37973 can_add_to_cxxflags=yes
37974 #
37975 # OK, do we have a test program? If so, check
37976 # whether it fails with this option and -Werror,
37977 # and, if so, don't include it.
37978 #
37979 # We test arg 4 here because arg 3 is a program which
37980 # could contain quotes (breaking the comparison).
37981 #
37982 if test "x" != "x" ; then
37983 CXXFLAGS="$CXXFLAGS -Werror"
37984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
37985 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
37986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37987 /* end confdefs.h. */
37988  
37989 _ACEOF
37990 if ac_fn_cxx_try_compile "$LINENO"; then :
37991  
37992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37993 $as_echo "no" >&6; }
37994 #
37995 # Remove "force an error for a warning" options, if we
37996 # added them, by setting CXXFLAGS to the saved value plus
37997 # just the new option.
37998 #
37999  
38000 if ${WS_CXXFLAGS+:} false; then :
38001  
38002 case " $WS_CXXFLAGS " in #(
38003 *" $GCC_OPTION "*) :
38004 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
38005 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
38006 ac_status=$?
38007 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38008 test $ac_status = 0; } ;; #(
38009 *) :
38010  
38011 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
38012 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
38013 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
38014 ac_status=$?
38015 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38016 test $ac_status = 0; }
38017 ;;
38018 esac
38019  
38020 else
38021  
38022 WS_CXXFLAGS=$GCC_OPTION
38023 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
38024 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
38025 ac_status=$?
38026 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38027 test $ac_status = 0; }
38028  
38029 fi
38030  
38031  
38032 else
38033  
38034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38035 $as_echo "yes" >&6; }
38036  
38037 fi
38038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38039 else
38040 #
38041 # Remove "force an error for a warning" options, if we
38042 # added them, by setting CXXFLAGS to the saved value plus
38043 # just the new option.
38044 #
38045  
38046 if ${WS_CXXFLAGS+:} false; then :
38047  
38048 case " $WS_CXXFLAGS " in #(
38049 *" $GCC_OPTION "*) :
38050 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
38051 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
38052 ac_status=$?
38053 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38054 test $ac_status = 0; } ;; #(
38055 *) :
38056  
38057 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
38058 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
38059 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
38060 ac_status=$?
38061 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38062 test $ac_status = 0; }
38063 ;;
38064 esac
38065  
38066 else
38067  
38068 WS_CXXFLAGS=$GCC_OPTION
38069 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
38070 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
38071 ac_status=$?
38072 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38073 test $ac_status = 0; }
38074  
38075 fi
38076  
38077 fi
38078  
38079 else
38080  
38081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38082 $as_echo "no" >&6; }
38083 can_add_to_cxxflags=no
38084  
38085 fi
38086 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38087  
38088 CPPFLAGS="$ac_ws_CPPLAGS_saved"
38089 CFLAGS="$ac_ws_CFLAGS_saved"
38090 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
38091 LDFLAGS="$ac_ws_LDFLAGS_saved"
38092  
38093 ac_ext=c
38094 ac_cpp='$CPP $CPPFLAGS'
38095 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
38096 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
38097 ac_compiler_gnu=$ac_cv_c_compiler_gnu
38098  
38099 fi
38100 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
38101 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
38102 then
38103 #
38104 # Confusingly, some C++ compilers like -Wmissing-prototypes but
38105 # don't like -Wmissing-declarations and others like
38106 # -Wmissing-declarations but don't like -Wmissing-prototypes,
38107 # the fact that the corresponding C compiler likes both. Don't
38108 # warn about them.
38109 #
38110 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
38111 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
38112 then
38113 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
38114 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
38115 fi
38116 fi
38117 fi
38118 fi
38119  
38120 #
38121 # As we use variadic macros, we don't want warnings
38122 # about them, even with -Wpedantic.
38123 #
38124 GCC_OPTION="-Wno-variadic-macros"
38125 can_add_to_cflags=""
38126 can_add_to_cxxflags=""
38127 if test "x$ac_supports_gcc_flags" = "xyes" ; then
38128 if test "" != CXX ; then
38129 #
38130 # Not C++-only; if this can be added to the C compiler flags, add them.
38131 #
38132 # If the option begins with "-W", add
38133 # $ac_wireshark_unknown_warning_option_error to make sure that
38134 # we'll get an error if it's an unknown warning option; not all
38135 # compilers treat unknown warning options as errors (I'm looking at
38136 # you, clang).
38137 #
38138 # If the option begins with "-f" or "-m", add -Werror to make sure
38139 # that we'll get an error if we get "argument unused during compilation"
38140 # warnings, as those will either cause a failure for files compiled
38141 # with -Werror or annoying noise for files compiled without it.
38142 # (Yeah, you, clang.)
38143 #
38144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
38145 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
38146  
38147 ac_ws_CPPLAGS_saved="$CPPFLAGS"
38148 ac_ws_CFLAGS_saved="$CFLAGS"
38149 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
38150 ac_ws_LDFLAGS_saved="$LDFLAGS"
38151 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
38152 CFLAGS="$WS_CFLAGS $CFLAGS"
38153 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
38154 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
38155  
38156 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
38157 then
38158 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
38159 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
38160 then
38161 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
38162 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
38163 then
38164 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
38165 else
38166 CFLAGS="$CFLAGS $GCC_OPTION"
38167 fi
38168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38169 /* end confdefs.h. */
38170  
38171 int foo;
38172  
38173 _ACEOF
38174 if ac_fn_c_try_compile "$LINENO"; then :
38175  
38176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38177 $as_echo "yes" >&6; }
38178 can_add_to_cflags=yes
38179 #
38180 # OK, do we have a test program? If so, check
38181 # whether it fails with this option and -Werror,
38182 # and, if so, don't include it.
38183 #
38184 # We test arg 4 here because arg 3 is a program which
38185 # could contain quotes (breaking the comparison).
38186 #
38187 if test "x" != "x" ; then
38188 CFLAGS="$CFLAGS -Werror"
38189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
38190 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
38191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38192 /* end confdefs.h. */
38193  
38194 _ACEOF
38195 if ac_fn_c_try_compile "$LINENO"; then :
38196  
38197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38198 $as_echo "no" >&6; }
38199 #
38200 # Remove "force an error for a warning" options, if we
38201 # added them, by setting CFLAGS to the saved value plus
38202 # just the new option.
38203 #
38204  
38205 if ${WS_CFLAGS+:} false; then :
38206  
38207 case " $WS_CFLAGS " in #(
38208 *" $GCC_OPTION "*) :
38209 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
38210 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
38211 ac_status=$?
38212 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38213 test $ac_status = 0; } ;; #(
38214 *) :
38215  
38216 as_fn_append WS_CFLAGS " $GCC_OPTION"
38217 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
38218 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
38219 ac_status=$?
38220 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38221 test $ac_status = 0; }
38222 ;;
38223 esac
38224  
38225 else
38226  
38227 WS_CFLAGS=$GCC_OPTION
38228 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
38229 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
38230 ac_status=$?
38231 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38232 test $ac_status = 0; }
38233  
38234 fi
38235  
38236 if test "$CC" = "$CC_FOR_BUILD"; then
38237 #
38238 # We're building the build tools with the same compiler
38239 # with which we're building Wireshark, so add the flags
38240 # to the flags for that compiler as well.
38241 #
38242  
38243 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
38244  
38245 case " $WS_CFLAGS_FOR_BUILD " in #(
38246 *" $GCC_OPTION "*) :
38247 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
38248 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
38249 ac_status=$?
38250 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38251 test $ac_status = 0; } ;; #(
38252 *) :
38253  
38254 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
38255 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
38256 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
38257 ac_status=$?
38258 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38259 test $ac_status = 0; }
38260 ;;
38261 esac
38262  
38263 else
38264  
38265 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
38266 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
38267 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
38268 ac_status=$?
38269 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38270 test $ac_status = 0; }
38271  
38272 fi
38273  
38274 fi
38275  
38276 else
38277  
38278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38279 $as_echo "yes" >&6; }
38280  
38281 fi
38282 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38283 else
38284 #
38285 # Remove "force an error for a warning" options, if we
38286 # added them, by setting CFLAGS to the saved value plus
38287 # just the new option.
38288 #
38289  
38290 if ${WS_CFLAGS+:} false; then :
38291  
38292 case " $WS_CFLAGS " in #(
38293 *" $GCC_OPTION "*) :
38294 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
38295 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
38296 ac_status=$?
38297 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38298 test $ac_status = 0; } ;; #(
38299 *) :
38300  
38301 as_fn_append WS_CFLAGS " $GCC_OPTION"
38302 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
38303 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
38304 ac_status=$?
38305 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38306 test $ac_status = 0; }
38307 ;;
38308 esac
38309  
38310 else
38311  
38312 WS_CFLAGS=$GCC_OPTION
38313 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
38314 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
38315 ac_status=$?
38316 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38317 test $ac_status = 0; }
38318  
38319 fi
38320  
38321 if test "$CC" = "$CC_FOR_BUILD"; then
38322 #
38323 # We're building the build tools with the same compiler
38324 # with which we're building Wireshark, so add the flags
38325 # to the flags for that compiler as well.
38326 #
38327  
38328 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
38329  
38330 case " $WS_CFLAGS_FOR_BUILD " in #(
38331 *" $GCC_OPTION "*) :
38332 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
38333 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
38334 ac_status=$?
38335 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38336 test $ac_status = 0; } ;; #(
38337 *) :
38338  
38339 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
38340 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
38341 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
38342 ac_status=$?
38343 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38344 test $ac_status = 0; }
38345 ;;
38346 esac
38347  
38348 else
38349  
38350 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
38351 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
38352 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
38353 ac_status=$?
38354 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38355 test $ac_status = 0; }
38356  
38357 fi
38358  
38359 fi
38360 fi
38361  
38362 else
38363  
38364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38365 $as_echo "no" >&6; }
38366 can_add_to_cflags=no
38367  
38368 fi
38369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38370  
38371 CPPFLAGS="$ac_ws_CPPLAGS_saved"
38372 CFLAGS="$ac_ws_CFLAGS_saved"
38373 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
38374 LDFLAGS="$ac_ws_LDFLAGS_saved"
38375  
38376 fi
38377 #
38378 # Did we find a C++ compiler?
38379 #
38380 if test "x$CXX" != "x" ; then
38381 #
38382 # Yes. Is this option only for the C compiler?
38383 #
38384 if test "" != C ; then
38385 #
38386 # Not C-only; if this option can be added to the C++ compiler
38387 # options, add it.
38388 #
38389 # If the option begins with "-W", add
38390 # $ac_wireshark_unknown_warning_option_error, as per the above, and
38391 # also add $ac_wireshark_non_cxx_warning_option_error, because at
38392 # lease some versions of g++ whine about -Wmissing-prototypes, the
38393 # fact that at least one of those versions refuses to warn about
38394 # function declarations without an earlier declaration nonwithstanding;
38395 # perhaps there's a reason not to warn about that with C++ even though
38396 # warning about it can be a Good Idea with C, but it's not obvious to
38397 # me).
38398 #
38399 # If the option begins with "-f" or "-m", add -Werror to make sure
38400 # that we'll get an error if we get "argument unused during compilation"
38401 # warnings, as those will either cause a failure for files compiled
38402 # with -Werror or annoying noise for files compiled without it.
38403 # (Yeah, you, clang++.)
38404 #
38405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
38406 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
38407  
38408 ac_ws_CPPLAGS_saved="$CPPFLAGS"
38409 ac_ws_CFLAGS_saved="$CFLAGS"
38410 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
38411 ac_ws_LDFLAGS_saved="$LDFLAGS"
38412 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
38413 CFLAGS="$WS_CFLAGS $CFLAGS"
38414 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
38415 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
38416  
38417 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
38418 then
38419 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
38420 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
38421 then
38422 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
38423 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
38424 then
38425 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
38426 else
38427 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
38428 fi
38429 ac_ext=cpp
38430 ac_cpp='$CXXCPP $CPPFLAGS'
38431 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
38432 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
38433 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
38434  
38435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38436 /* end confdefs.h. */
38437  
38438 int foo;
38439  
38440 _ACEOF
38441 if ac_fn_cxx_try_compile "$LINENO"; then :
38442  
38443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38444 $as_echo "yes" >&6; }
38445 can_add_to_cxxflags=yes
38446 #
38447 # OK, do we have a test program? If so, check
38448 # whether it fails with this option and -Werror,
38449 # and, if so, don't include it.
38450 #
38451 # We test arg 4 here because arg 3 is a program which
38452 # could contain quotes (breaking the comparison).
38453 #
38454 if test "x" != "x" ; then
38455 CXXFLAGS="$CXXFLAGS -Werror"
38456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
38457 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
38458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38459 /* end confdefs.h. */
38460  
38461 _ACEOF
38462 if ac_fn_cxx_try_compile "$LINENO"; then :
38463  
38464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38465 $as_echo "no" >&6; }
38466 #
38467 # Remove "force an error for a warning" options, if we
38468 # added them, by setting CXXFLAGS to the saved value plus
38469 # just the new option.
38470 #
38471  
38472 if ${WS_CXXFLAGS+:} false; then :
38473  
38474 case " $WS_CXXFLAGS " in #(
38475 *" $GCC_OPTION "*) :
38476 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
38477 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
38478 ac_status=$?
38479 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38480 test $ac_status = 0; } ;; #(
38481 *) :
38482  
38483 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
38484 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
38485 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
38486 ac_status=$?
38487 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38488 test $ac_status = 0; }
38489 ;;
38490 esac
38491  
38492 else
38493  
38494 WS_CXXFLAGS=$GCC_OPTION
38495 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
38496 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
38497 ac_status=$?
38498 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38499 test $ac_status = 0; }
38500  
38501 fi
38502  
38503  
38504 else
38505  
38506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38507 $as_echo "yes" >&6; }
38508  
38509 fi
38510 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38511 else
38512 #
38513 # Remove "force an error for a warning" options, if we
38514 # added them, by setting CXXFLAGS to the saved value plus
38515 # just the new option.
38516 #
38517  
38518 if ${WS_CXXFLAGS+:} false; then :
38519  
38520 case " $WS_CXXFLAGS " in #(
38521 *" $GCC_OPTION "*) :
38522 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
38523 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
38524 ac_status=$?
38525 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38526 test $ac_status = 0; } ;; #(
38527 *) :
38528  
38529 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
38530 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
38531 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
38532 ac_status=$?
38533 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38534 test $ac_status = 0; }
38535 ;;
38536 esac
38537  
38538 else
38539  
38540 WS_CXXFLAGS=$GCC_OPTION
38541 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
38542 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
38543 ac_status=$?
38544 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38545 test $ac_status = 0; }
38546  
38547 fi
38548  
38549 fi
38550  
38551 else
38552  
38553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38554 $as_echo "no" >&6; }
38555 can_add_to_cxxflags=no
38556  
38557 fi
38558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38559  
38560 CPPFLAGS="$ac_ws_CPPLAGS_saved"
38561 CFLAGS="$ac_ws_CFLAGS_saved"
38562 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
38563 LDFLAGS="$ac_ws_LDFLAGS_saved"
38564  
38565 ac_ext=c
38566 ac_cpp='$CPP $CPPFLAGS'
38567 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
38568 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
38569 ac_compiler_gnu=$ac_cv_c_compiler_gnu
38570  
38571 fi
38572 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
38573 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
38574 then
38575 #
38576 # Confusingly, some C++ compilers like -Wmissing-prototypes but
38577 # don't like -Wmissing-declarations and others like
38578 # -Wmissing-declarations but don't like -Wmissing-prototypes,
38579 # the fact that the corresponding C compiler likes both. Don't
38580 # warn about them.
38581 #
38582 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
38583 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
38584 then
38585 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
38586 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
38587 fi
38588 fi
38589 fi
38590 fi
38591  
38592 #
38593 # Various code blocks this one.
38594 #
38595 GCC_OPTION="-Woverflow"
38596 can_add_to_cflags=""
38597 can_add_to_cxxflags=""
38598 if test "x$ac_supports_gcc_flags" = "xyes" ; then
38599 if test "" != CXX ; then
38600 #
38601 # Not C++-only; if this can be added to the C compiler flags, add them.
38602 #
38603 # If the option begins with "-W", add
38604 # $ac_wireshark_unknown_warning_option_error to make sure that
38605 # we'll get an error if it's an unknown warning option; not all
38606 # compilers treat unknown warning options as errors (I'm looking at
38607 # you, clang).
38608 #
38609 # If the option begins with "-f" or "-m", add -Werror to make sure
38610 # that we'll get an error if we get "argument unused during compilation"
38611 # warnings, as those will either cause a failure for files compiled
38612 # with -Werror or annoying noise for files compiled without it.
38613 # (Yeah, you, clang.)
38614 #
38615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
38616 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
38617  
38618 ac_ws_CPPLAGS_saved="$CPPFLAGS"
38619 ac_ws_CFLAGS_saved="$CFLAGS"
38620 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
38621 ac_ws_LDFLAGS_saved="$LDFLAGS"
38622 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
38623 CFLAGS="$WS_CFLAGS $CFLAGS"
38624 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
38625 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
38626  
38627 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
38628 then
38629 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
38630 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
38631 then
38632 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
38633 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
38634 then
38635 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
38636 else
38637 CFLAGS="$CFLAGS $GCC_OPTION"
38638 fi
38639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38640 /* end confdefs.h. */
38641  
38642 int foo;
38643  
38644 _ACEOF
38645 if ac_fn_c_try_compile "$LINENO"; then :
38646  
38647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38648 $as_echo "yes" >&6; }
38649 can_add_to_cflags=yes
38650 #
38651 # OK, do we have a test program? If so, check
38652 # whether it fails with this option and -Werror,
38653 # and, if so, don't include it.
38654 #
38655 # We test arg 4 here because arg 3 is a program which
38656 # could contain quotes (breaking the comparison).
38657 #
38658 if test "x" != "x" ; then
38659 CFLAGS="$CFLAGS -Werror"
38660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
38661 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
38662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38663 /* end confdefs.h. */
38664  
38665 _ACEOF
38666 if ac_fn_c_try_compile "$LINENO"; then :
38667  
38668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38669 $as_echo "no" >&6; }
38670 #
38671 # Remove "force an error for a warning" options, if we
38672 # added them, by setting CFLAGS to the saved value plus
38673 # just the new option.
38674 #
38675  
38676 if ${WS_CFLAGS+:} false; then :
38677  
38678 case " $WS_CFLAGS " in #(
38679 *" $GCC_OPTION "*) :
38680 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
38681 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
38682 ac_status=$?
38683 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38684 test $ac_status = 0; } ;; #(
38685 *) :
38686  
38687 as_fn_append WS_CFLAGS " $GCC_OPTION"
38688 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
38689 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
38690 ac_status=$?
38691 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38692 test $ac_status = 0; }
38693 ;;
38694 esac
38695  
38696 else
38697  
38698 WS_CFLAGS=$GCC_OPTION
38699 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
38700 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
38701 ac_status=$?
38702 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38703 test $ac_status = 0; }
38704  
38705 fi
38706  
38707 if test "$CC" = "$CC_FOR_BUILD"; then
38708 #
38709 # We're building the build tools with the same compiler
38710 # with which we're building Wireshark, so add the flags
38711 # to the flags for that compiler as well.
38712 #
38713  
38714 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
38715  
38716 case " $WS_CFLAGS_FOR_BUILD " in #(
38717 *" $GCC_OPTION "*) :
38718 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
38719 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
38720 ac_status=$?
38721 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38722 test $ac_status = 0; } ;; #(
38723 *) :
38724  
38725 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
38726 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
38727 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
38728 ac_status=$?
38729 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38730 test $ac_status = 0; }
38731 ;;
38732 esac
38733  
38734 else
38735  
38736 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
38737 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
38738 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
38739 ac_status=$?
38740 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38741 test $ac_status = 0; }
38742  
38743 fi
38744  
38745 fi
38746  
38747 else
38748  
38749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38750 $as_echo "yes" >&6; }
38751  
38752 fi
38753 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38754 else
38755 #
38756 # Remove "force an error for a warning" options, if we
38757 # added them, by setting CFLAGS to the saved value plus
38758 # just the new option.
38759 #
38760  
38761 if ${WS_CFLAGS+:} false; then :
38762  
38763 case " $WS_CFLAGS " in #(
38764 *" $GCC_OPTION "*) :
38765 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
38766 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
38767 ac_status=$?
38768 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38769 test $ac_status = 0; } ;; #(
38770 *) :
38771  
38772 as_fn_append WS_CFLAGS " $GCC_OPTION"
38773 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
38774 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
38775 ac_status=$?
38776 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38777 test $ac_status = 0; }
38778 ;;
38779 esac
38780  
38781 else
38782  
38783 WS_CFLAGS=$GCC_OPTION
38784 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
38785 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
38786 ac_status=$?
38787 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38788 test $ac_status = 0; }
38789  
38790 fi
38791  
38792 if test "$CC" = "$CC_FOR_BUILD"; then
38793 #
38794 # We're building the build tools with the same compiler
38795 # with which we're building Wireshark, so add the flags
38796 # to the flags for that compiler as well.
38797 #
38798  
38799 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
38800  
38801 case " $WS_CFLAGS_FOR_BUILD " in #(
38802 *" $GCC_OPTION "*) :
38803 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
38804 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
38805 ac_status=$?
38806 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38807 test $ac_status = 0; } ;; #(
38808 *) :
38809  
38810 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
38811 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
38812 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
38813 ac_status=$?
38814 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38815 test $ac_status = 0; }
38816 ;;
38817 esac
38818  
38819 else
38820  
38821 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
38822 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
38823 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
38824 ac_status=$?
38825 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38826 test $ac_status = 0; }
38827  
38828 fi
38829  
38830 fi
38831 fi
38832  
38833 else
38834  
38835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38836 $as_echo "no" >&6; }
38837 can_add_to_cflags=no
38838  
38839 fi
38840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38841  
38842 CPPFLAGS="$ac_ws_CPPLAGS_saved"
38843 CFLAGS="$ac_ws_CFLAGS_saved"
38844 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
38845 LDFLAGS="$ac_ws_LDFLAGS_saved"
38846  
38847 fi
38848 #
38849 # Did we find a C++ compiler?
38850 #
38851 if test "x$CXX" != "x" ; then
38852 #
38853 # Yes. Is this option only for the C compiler?
38854 #
38855 if test "" != C ; then
38856 #
38857 # Not C-only; if this option can be added to the C++ compiler
38858 # options, add it.
38859 #
38860 # If the option begins with "-W", add
38861 # $ac_wireshark_unknown_warning_option_error, as per the above, and
38862 # also add $ac_wireshark_non_cxx_warning_option_error, because at
38863 # lease some versions of g++ whine about -Wmissing-prototypes, the
38864 # fact that at least one of those versions refuses to warn about
38865 # function declarations without an earlier declaration nonwithstanding;
38866 # perhaps there's a reason not to warn about that with C++ even though
38867 # warning about it can be a Good Idea with C, but it's not obvious to
38868 # me).
38869 #
38870 # If the option begins with "-f" or "-m", add -Werror to make sure
38871 # that we'll get an error if we get "argument unused during compilation"
38872 # warnings, as those will either cause a failure for files compiled
38873 # with -Werror or annoying noise for files compiled without it.
38874 # (Yeah, you, clang++.)
38875 #
38876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
38877 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
38878  
38879 ac_ws_CPPLAGS_saved="$CPPFLAGS"
38880 ac_ws_CFLAGS_saved="$CFLAGS"
38881 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
38882 ac_ws_LDFLAGS_saved="$LDFLAGS"
38883 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
38884 CFLAGS="$WS_CFLAGS $CFLAGS"
38885 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
38886 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
38887  
38888 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
38889 then
38890 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
38891 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
38892 then
38893 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
38894 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
38895 then
38896 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
38897 else
38898 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
38899 fi
38900 ac_ext=cpp
38901 ac_cpp='$CXXCPP $CPPFLAGS'
38902 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
38903 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
38904 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
38905  
38906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38907 /* end confdefs.h. */
38908  
38909 int foo;
38910  
38911 _ACEOF
38912 if ac_fn_cxx_try_compile "$LINENO"; then :
38913  
38914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38915 $as_echo "yes" >&6; }
38916 can_add_to_cxxflags=yes
38917 #
38918 # OK, do we have a test program? If so, check
38919 # whether it fails with this option and -Werror,
38920 # and, if so, don't include it.
38921 #
38922 # We test arg 4 here because arg 3 is a program which
38923 # could contain quotes (breaking the comparison).
38924 #
38925 if test "x" != "x" ; then
38926 CXXFLAGS="$CXXFLAGS -Werror"
38927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
38928 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
38929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38930 /* end confdefs.h. */
38931  
38932 _ACEOF
38933 if ac_fn_cxx_try_compile "$LINENO"; then :
38934  
38935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38936 $as_echo "no" >&6; }
38937 #
38938 # Remove "force an error for a warning" options, if we
38939 # added them, by setting CXXFLAGS to the saved value plus
38940 # just the new option.
38941 #
38942  
38943 if ${WS_CXXFLAGS+:} false; then :
38944  
38945 case " $WS_CXXFLAGS " in #(
38946 *" $GCC_OPTION "*) :
38947 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
38948 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
38949 ac_status=$?
38950 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38951 test $ac_status = 0; } ;; #(
38952 *) :
38953  
38954 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
38955 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
38956 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
38957 ac_status=$?
38958 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38959 test $ac_status = 0; }
38960 ;;
38961 esac
38962  
38963 else
38964  
38965 WS_CXXFLAGS=$GCC_OPTION
38966 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
38967 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
38968 ac_status=$?
38969 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38970 test $ac_status = 0; }
38971  
38972 fi
38973  
38974  
38975 else
38976  
38977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38978 $as_echo "yes" >&6; }
38979  
38980 fi
38981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38982 else
38983 #
38984 # Remove "force an error for a warning" options, if we
38985 # added them, by setting CXXFLAGS to the saved value plus
38986 # just the new option.
38987 #
38988  
38989 if ${WS_CXXFLAGS+:} false; then :
38990  
38991 case " $WS_CXXFLAGS " in #(
38992 *" $GCC_OPTION "*) :
38993 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
38994 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
38995 ac_status=$?
38996 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
38997 test $ac_status = 0; } ;; #(
38998 *) :
38999  
39000 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
39001 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
39002 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
39003 ac_status=$?
39004 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39005 test $ac_status = 0; }
39006 ;;
39007 esac
39008  
39009 else
39010  
39011 WS_CXXFLAGS=$GCC_OPTION
39012 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
39013 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
39014 ac_status=$?
39015 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39016 test $ac_status = 0; }
39017  
39018 fi
39019  
39020 fi
39021  
39022 else
39023  
39024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39025 $as_echo "no" >&6; }
39026 can_add_to_cxxflags=no
39027  
39028 fi
39029 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39030  
39031 CPPFLAGS="$ac_ws_CPPLAGS_saved"
39032 CFLAGS="$ac_ws_CFLAGS_saved"
39033 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
39034 LDFLAGS="$ac_ws_LDFLAGS_saved"
39035  
39036 ac_ext=c
39037 ac_cpp='$CPP $CPPFLAGS'
39038 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
39039 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
39040 ac_compiler_gnu=$ac_cv_c_compiler_gnu
39041  
39042 fi
39043 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
39044 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
39045 then
39046 #
39047 # Confusingly, some C++ compilers like -Wmissing-prototypes but
39048 # don't like -Wmissing-declarations and others like
39049 # -Wmissing-declarations but don't like -Wmissing-prototypes,
39050 # the fact that the corresponding C compiler likes both. Don't
39051 # warn about them.
39052 #
39053 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
39054 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
39055 then
39056 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
39057 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
39058 fi
39059 fi
39060 fi
39061 fi
39062  
39063 GCC_OPTION="-fstrict-overflow -Wstrict-overflow=4"
39064 can_add_to_cflags=""
39065 can_add_to_cxxflags=""
39066 if test "x$ac_supports_gcc_flags" = "xyes" ; then
39067 if test "" != CXX ; then
39068 #
39069 # Not C++-only; if this can be added to the C compiler flags, add them.
39070 #
39071 # If the option begins with "-W", add
39072 # $ac_wireshark_unknown_warning_option_error to make sure that
39073 # we'll get an error if it's an unknown warning option; not all
39074 # compilers treat unknown warning options as errors (I'm looking at
39075 # you, clang).
39076 #
39077 # If the option begins with "-f" or "-m", add -Werror to make sure
39078 # that we'll get an error if we get "argument unused during compilation"
39079 # warnings, as those will either cause a failure for files compiled
39080 # with -Werror or annoying noise for files compiled without it.
39081 # (Yeah, you, clang.)
39082 #
39083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
39084 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
39085  
39086 ac_ws_CPPLAGS_saved="$CPPFLAGS"
39087 ac_ws_CFLAGS_saved="$CFLAGS"
39088 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
39089 ac_ws_LDFLAGS_saved="$LDFLAGS"
39090 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
39091 CFLAGS="$WS_CFLAGS $CFLAGS"
39092 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
39093 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
39094  
39095 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
39096 then
39097 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
39098 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
39099 then
39100 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
39101 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
39102 then
39103 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
39104 else
39105 CFLAGS="$CFLAGS $GCC_OPTION"
39106 fi
39107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39108 /* end confdefs.h. */
39109  
39110 int foo;
39111  
39112 _ACEOF
39113 if ac_fn_c_try_compile "$LINENO"; then :
39114  
39115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39116 $as_echo "yes" >&6; }
39117 can_add_to_cflags=yes
39118 #
39119 # OK, do we have a test program? If so, check
39120 # whether it fails with this option and -Werror,
39121 # and, if so, don't include it.
39122 #
39123 # We test arg 4 here because arg 3 is a program which
39124 # could contain quotes (breaking the comparison).
39125 #
39126 if test "x" != "x" ; then
39127 CFLAGS="$CFLAGS -Werror"
39128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
39129 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
39130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39131 /* end confdefs.h. */
39132  
39133 _ACEOF
39134 if ac_fn_c_try_compile "$LINENO"; then :
39135  
39136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39137 $as_echo "no" >&6; }
39138 #
39139 # Remove "force an error for a warning" options, if we
39140 # added them, by setting CFLAGS to the saved value plus
39141 # just the new option.
39142 #
39143  
39144 if ${WS_CFLAGS+:} false; then :
39145  
39146 case " $WS_CFLAGS " in #(
39147 *" $GCC_OPTION "*) :
39148 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
39149 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
39150 ac_status=$?
39151 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39152 test $ac_status = 0; } ;; #(
39153 *) :
39154  
39155 as_fn_append WS_CFLAGS " $GCC_OPTION"
39156 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
39157 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
39158 ac_status=$?
39159 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39160 test $ac_status = 0; }
39161 ;;
39162 esac
39163  
39164 else
39165  
39166 WS_CFLAGS=$GCC_OPTION
39167 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
39168 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
39169 ac_status=$?
39170 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39171 test $ac_status = 0; }
39172  
39173 fi
39174  
39175 if test "$CC" = "$CC_FOR_BUILD"; then
39176 #
39177 # We're building the build tools with the same compiler
39178 # with which we're building Wireshark, so add the flags
39179 # to the flags for that compiler as well.
39180 #
39181  
39182 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
39183  
39184 case " $WS_CFLAGS_FOR_BUILD " in #(
39185 *" $GCC_OPTION "*) :
39186 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
39187 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
39188 ac_status=$?
39189 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39190 test $ac_status = 0; } ;; #(
39191 *) :
39192  
39193 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
39194 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
39195 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
39196 ac_status=$?
39197 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39198 test $ac_status = 0; }
39199 ;;
39200 esac
39201  
39202 else
39203  
39204 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
39205 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
39206 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
39207 ac_status=$?
39208 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39209 test $ac_status = 0; }
39210  
39211 fi
39212  
39213 fi
39214  
39215 else
39216  
39217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39218 $as_echo "yes" >&6; }
39219  
39220 fi
39221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39222 else
39223 #
39224 # Remove "force an error for a warning" options, if we
39225 # added them, by setting CFLAGS to the saved value plus
39226 # just the new option.
39227 #
39228  
39229 if ${WS_CFLAGS+:} false; then :
39230  
39231 case " $WS_CFLAGS " in #(
39232 *" $GCC_OPTION "*) :
39233 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
39234 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
39235 ac_status=$?
39236 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39237 test $ac_status = 0; } ;; #(
39238 *) :
39239  
39240 as_fn_append WS_CFLAGS " $GCC_OPTION"
39241 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
39242 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
39243 ac_status=$?
39244 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39245 test $ac_status = 0; }
39246 ;;
39247 esac
39248  
39249 else
39250  
39251 WS_CFLAGS=$GCC_OPTION
39252 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
39253 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
39254 ac_status=$?
39255 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39256 test $ac_status = 0; }
39257  
39258 fi
39259  
39260 if test "$CC" = "$CC_FOR_BUILD"; then
39261 #
39262 # We're building the build tools with the same compiler
39263 # with which we're building Wireshark, so add the flags
39264 # to the flags for that compiler as well.
39265 #
39266  
39267 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
39268  
39269 case " $WS_CFLAGS_FOR_BUILD " in #(
39270 *" $GCC_OPTION "*) :
39271 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
39272 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
39273 ac_status=$?
39274 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39275 test $ac_status = 0; } ;; #(
39276 *) :
39277  
39278 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
39279 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
39280 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
39281 ac_status=$?
39282 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39283 test $ac_status = 0; }
39284 ;;
39285 esac
39286  
39287 else
39288  
39289 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
39290 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
39291 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
39292 ac_status=$?
39293 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39294 test $ac_status = 0; }
39295  
39296 fi
39297  
39298 fi
39299 fi
39300  
39301 else
39302  
39303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39304 $as_echo "no" >&6; }
39305 can_add_to_cflags=no
39306  
39307 fi
39308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39309  
39310 CPPFLAGS="$ac_ws_CPPLAGS_saved"
39311 CFLAGS="$ac_ws_CFLAGS_saved"
39312 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
39313 LDFLAGS="$ac_ws_LDFLAGS_saved"
39314  
39315 fi
39316 #
39317 # Did we find a C++ compiler?
39318 #
39319 if test "x$CXX" != "x" ; then
39320 #
39321 # Yes. Is this option only for the C compiler?
39322 #
39323 if test "" != C ; then
39324 #
39325 # Not C-only; if this option can be added to the C++ compiler
39326 # options, add it.
39327 #
39328 # If the option begins with "-W", add
39329 # $ac_wireshark_unknown_warning_option_error, as per the above, and
39330 # also add $ac_wireshark_non_cxx_warning_option_error, because at
39331 # lease some versions of g++ whine about -Wmissing-prototypes, the
39332 # fact that at least one of those versions refuses to warn about
39333 # function declarations without an earlier declaration nonwithstanding;
39334 # perhaps there's a reason not to warn about that with C++ even though
39335 # warning about it can be a Good Idea with C, but it's not obvious to
39336 # me).
39337 #
39338 # If the option begins with "-f" or "-m", add -Werror to make sure
39339 # that we'll get an error if we get "argument unused during compilation"
39340 # warnings, as those will either cause a failure for files compiled
39341 # with -Werror or annoying noise for files compiled without it.
39342 # (Yeah, you, clang++.)
39343 #
39344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
39345 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
39346  
39347 ac_ws_CPPLAGS_saved="$CPPFLAGS"
39348 ac_ws_CFLAGS_saved="$CFLAGS"
39349 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
39350 ac_ws_LDFLAGS_saved="$LDFLAGS"
39351 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
39352 CFLAGS="$WS_CFLAGS $CFLAGS"
39353 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
39354 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
39355  
39356 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
39357 then
39358 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
39359 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
39360 then
39361 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
39362 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
39363 then
39364 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
39365 else
39366 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
39367 fi
39368 ac_ext=cpp
39369 ac_cpp='$CXXCPP $CPPFLAGS'
39370 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
39371 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
39372 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
39373  
39374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39375 /* end confdefs.h. */
39376  
39377 int foo;
39378  
39379 _ACEOF
39380 if ac_fn_cxx_try_compile "$LINENO"; then :
39381  
39382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39383 $as_echo "yes" >&6; }
39384 can_add_to_cxxflags=yes
39385 #
39386 # OK, do we have a test program? If so, check
39387 # whether it fails with this option and -Werror,
39388 # and, if so, don't include it.
39389 #
39390 # We test arg 4 here because arg 3 is a program which
39391 # could contain quotes (breaking the comparison).
39392 #
39393 if test "x" != "x" ; then
39394 CXXFLAGS="$CXXFLAGS -Werror"
39395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
39396 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
39397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39398 /* end confdefs.h. */
39399  
39400 _ACEOF
39401 if ac_fn_cxx_try_compile "$LINENO"; then :
39402  
39403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39404 $as_echo "no" >&6; }
39405 #
39406 # Remove "force an error for a warning" options, if we
39407 # added them, by setting CXXFLAGS to the saved value plus
39408 # just the new option.
39409 #
39410  
39411 if ${WS_CXXFLAGS+:} false; then :
39412  
39413 case " $WS_CXXFLAGS " in #(
39414 *" $GCC_OPTION "*) :
39415 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
39416 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
39417 ac_status=$?
39418 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39419 test $ac_status = 0; } ;; #(
39420 *) :
39421  
39422 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
39423 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
39424 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
39425 ac_status=$?
39426 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39427 test $ac_status = 0; }
39428 ;;
39429 esac
39430  
39431 else
39432  
39433 WS_CXXFLAGS=$GCC_OPTION
39434 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
39435 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
39436 ac_status=$?
39437 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39438 test $ac_status = 0; }
39439  
39440 fi
39441  
39442  
39443 else
39444  
39445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39446 $as_echo "yes" >&6; }
39447  
39448 fi
39449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39450 else
39451 #
39452 # Remove "force an error for a warning" options, if we
39453 # added them, by setting CXXFLAGS to the saved value plus
39454 # just the new option.
39455 #
39456  
39457 if ${WS_CXXFLAGS+:} false; then :
39458  
39459 case " $WS_CXXFLAGS " in #(
39460 *" $GCC_OPTION "*) :
39461 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
39462 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
39463 ac_status=$?
39464 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39465 test $ac_status = 0; } ;; #(
39466 *) :
39467  
39468 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
39469 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
39470 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
39471 ac_status=$?
39472 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39473 test $ac_status = 0; }
39474 ;;
39475 esac
39476  
39477 else
39478  
39479 WS_CXXFLAGS=$GCC_OPTION
39480 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
39481 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
39482 ac_status=$?
39483 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39484 test $ac_status = 0; }
39485  
39486 fi
39487  
39488 fi
39489  
39490 else
39491  
39492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39493 $as_echo "no" >&6; }
39494 can_add_to_cxxflags=no
39495  
39496 fi
39497 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39498  
39499 CPPFLAGS="$ac_ws_CPPLAGS_saved"
39500 CFLAGS="$ac_ws_CFLAGS_saved"
39501 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
39502 LDFLAGS="$ac_ws_LDFLAGS_saved"
39503  
39504 ac_ext=c
39505 ac_cpp='$CPP $CPPFLAGS'
39506 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
39507 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
39508 ac_compiler_gnu=$ac_cv_c_compiler_gnu
39509  
39510 fi
39511 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
39512 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
39513 then
39514 #
39515 # Confusingly, some C++ compilers like -Wmissing-prototypes but
39516 # don't like -Wmissing-declarations and others like
39517 # -Wmissing-declarations but don't like -Wmissing-prototypes,
39518 # the fact that the corresponding C compiler likes both. Don't
39519 # warn about them.
39520 #
39521 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
39522 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
39523 then
39524 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
39525 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
39526 fi
39527 fi
39528 fi
39529 fi
39530  
39531 #
39532 # Due to various places where APIs we don't control
39533 # require us to cast away constness, we can probably
39534 # never enable this one with -Werror.
39535 #
39536 GCC_OPTION="-Wcast-qual"
39537 can_add_to_cflags=""
39538 can_add_to_cxxflags=""
39539 if test "x$ac_supports_gcc_flags" = "xyes" ; then
39540 if test "" != CXX ; then
39541 #
39542 # Not C++-only; if this can be added to the C compiler flags, add them.
39543 #
39544 # If the option begins with "-W", add
39545 # $ac_wireshark_unknown_warning_option_error to make sure that
39546 # we'll get an error if it's an unknown warning option; not all
39547 # compilers treat unknown warning options as errors (I'm looking at
39548 # you, clang).
39549 #
39550 # If the option begins with "-f" or "-m", add -Werror to make sure
39551 # that we'll get an error if we get "argument unused during compilation"
39552 # warnings, as those will either cause a failure for files compiled
39553 # with -Werror or annoying noise for files compiled without it.
39554 # (Yeah, you, clang.)
39555 #
39556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
39557 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
39558  
39559 ac_ws_CPPLAGS_saved="$CPPFLAGS"
39560 ac_ws_CFLAGS_saved="$CFLAGS"
39561 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
39562 ac_ws_LDFLAGS_saved="$LDFLAGS"
39563 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
39564 CFLAGS="$WS_CFLAGS $CFLAGS"
39565 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
39566 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
39567  
39568 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
39569 then
39570 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
39571 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
39572 then
39573 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
39574 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
39575 then
39576 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
39577 else
39578 CFLAGS="$CFLAGS $GCC_OPTION"
39579 fi
39580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39581 /* end confdefs.h. */
39582  
39583 int foo;
39584  
39585 _ACEOF
39586 if ac_fn_c_try_compile "$LINENO"; then :
39587  
39588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39589 $as_echo "yes" >&6; }
39590 can_add_to_cflags=yes
39591 #
39592 # OK, do we have a test program? If so, check
39593 # whether it fails with this option and -Werror,
39594 # and, if so, don't include it.
39595 #
39596 # We test arg 4 here because arg 3 is a program which
39597 # could contain quotes (breaking the comparison).
39598 #
39599 if test "x" != "x" ; then
39600 CFLAGS="$CFLAGS -Werror"
39601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
39602 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
39603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39604 /* end confdefs.h. */
39605  
39606 _ACEOF
39607 if ac_fn_c_try_compile "$LINENO"; then :
39608  
39609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39610 $as_echo "no" >&6; }
39611 #
39612 # Remove "force an error for a warning" options, if we
39613 # added them, by setting CFLAGS to the saved value plus
39614 # just the new option.
39615 #
39616  
39617 if ${WS_CFLAGS+:} false; then :
39618  
39619 case " $WS_CFLAGS " in #(
39620 *" $GCC_OPTION "*) :
39621 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
39622 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
39623 ac_status=$?
39624 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39625 test $ac_status = 0; } ;; #(
39626 *) :
39627  
39628 as_fn_append WS_CFLAGS " $GCC_OPTION"
39629 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
39630 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
39631 ac_status=$?
39632 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39633 test $ac_status = 0; }
39634 ;;
39635 esac
39636  
39637 else
39638  
39639 WS_CFLAGS=$GCC_OPTION
39640 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
39641 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
39642 ac_status=$?
39643 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39644 test $ac_status = 0; }
39645  
39646 fi
39647  
39648 if test "$CC" = "$CC_FOR_BUILD"; then
39649 #
39650 # We're building the build tools with the same compiler
39651 # with which we're building Wireshark, so add the flags
39652 # to the flags for that compiler as well.
39653 #
39654  
39655 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
39656  
39657 case " $WS_CFLAGS_FOR_BUILD " in #(
39658 *" $GCC_OPTION "*) :
39659 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
39660 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
39661 ac_status=$?
39662 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39663 test $ac_status = 0; } ;; #(
39664 *) :
39665  
39666 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
39667 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
39668 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
39669 ac_status=$?
39670 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39671 test $ac_status = 0; }
39672 ;;
39673 esac
39674  
39675 else
39676  
39677 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
39678 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
39679 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
39680 ac_status=$?
39681 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39682 test $ac_status = 0; }
39683  
39684 fi
39685  
39686 fi
39687  
39688 else
39689  
39690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39691 $as_echo "yes" >&6; }
39692  
39693 fi
39694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39695 else
39696 #
39697 # Remove "force an error for a warning" options, if we
39698 # added them, by setting CFLAGS to the saved value plus
39699 # just the new option.
39700 #
39701  
39702 if ${WS_CFLAGS+:} false; then :
39703  
39704 case " $WS_CFLAGS " in #(
39705 *" $GCC_OPTION "*) :
39706 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
39707 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
39708 ac_status=$?
39709 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39710 test $ac_status = 0; } ;; #(
39711 *) :
39712  
39713 as_fn_append WS_CFLAGS " $GCC_OPTION"
39714 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
39715 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
39716 ac_status=$?
39717 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39718 test $ac_status = 0; }
39719 ;;
39720 esac
39721  
39722 else
39723  
39724 WS_CFLAGS=$GCC_OPTION
39725 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
39726 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
39727 ac_status=$?
39728 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39729 test $ac_status = 0; }
39730  
39731 fi
39732  
39733 if test "$CC" = "$CC_FOR_BUILD"; then
39734 #
39735 # We're building the build tools with the same compiler
39736 # with which we're building Wireshark, so add the flags
39737 # to the flags for that compiler as well.
39738 #
39739  
39740 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
39741  
39742 case " $WS_CFLAGS_FOR_BUILD " in #(
39743 *" $GCC_OPTION "*) :
39744 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
39745 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
39746 ac_status=$?
39747 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39748 test $ac_status = 0; } ;; #(
39749 *) :
39750  
39751 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
39752 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
39753 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
39754 ac_status=$?
39755 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39756 test $ac_status = 0; }
39757 ;;
39758 esac
39759  
39760 else
39761  
39762 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
39763 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
39764 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
39765 ac_status=$?
39766 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39767 test $ac_status = 0; }
39768  
39769 fi
39770  
39771 fi
39772 fi
39773  
39774 else
39775  
39776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39777 $as_echo "no" >&6; }
39778 can_add_to_cflags=no
39779  
39780 fi
39781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39782  
39783 CPPFLAGS="$ac_ws_CPPLAGS_saved"
39784 CFLAGS="$ac_ws_CFLAGS_saved"
39785 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
39786 LDFLAGS="$ac_ws_LDFLAGS_saved"
39787  
39788 fi
39789 #
39790 # Did we find a C++ compiler?
39791 #
39792 if test "x$CXX" != "x" ; then
39793 #
39794 # Yes. Is this option only for the C compiler?
39795 #
39796 if test "" != C ; then
39797 #
39798 # Not C-only; if this option can be added to the C++ compiler
39799 # options, add it.
39800 #
39801 # If the option begins with "-W", add
39802 # $ac_wireshark_unknown_warning_option_error, as per the above, and
39803 # also add $ac_wireshark_non_cxx_warning_option_error, because at
39804 # lease some versions of g++ whine about -Wmissing-prototypes, the
39805 # fact that at least one of those versions refuses to warn about
39806 # function declarations without an earlier declaration nonwithstanding;
39807 # perhaps there's a reason not to warn about that with C++ even though
39808 # warning about it can be a Good Idea with C, but it's not obvious to
39809 # me).
39810 #
39811 # If the option begins with "-f" or "-m", add -Werror to make sure
39812 # that we'll get an error if we get "argument unused during compilation"
39813 # warnings, as those will either cause a failure for files compiled
39814 # with -Werror or annoying noise for files compiled without it.
39815 # (Yeah, you, clang++.)
39816 #
39817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
39818 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
39819  
39820 ac_ws_CPPLAGS_saved="$CPPFLAGS"
39821 ac_ws_CFLAGS_saved="$CFLAGS"
39822 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
39823 ac_ws_LDFLAGS_saved="$LDFLAGS"
39824 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
39825 CFLAGS="$WS_CFLAGS $CFLAGS"
39826 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
39827 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
39828  
39829 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
39830 then
39831 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
39832 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
39833 then
39834 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
39835 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
39836 then
39837 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
39838 else
39839 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
39840 fi
39841 ac_ext=cpp
39842 ac_cpp='$CXXCPP $CPPFLAGS'
39843 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
39844 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
39845 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
39846  
39847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39848 /* end confdefs.h. */
39849  
39850 int foo;
39851  
39852 _ACEOF
39853 if ac_fn_cxx_try_compile "$LINENO"; then :
39854  
39855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39856 $as_echo "yes" >&6; }
39857 can_add_to_cxxflags=yes
39858 #
39859 # OK, do we have a test program? If so, check
39860 # whether it fails with this option and -Werror,
39861 # and, if so, don't include it.
39862 #
39863 # We test arg 4 here because arg 3 is a program which
39864 # could contain quotes (breaking the comparison).
39865 #
39866 if test "x" != "x" ; then
39867 CXXFLAGS="$CXXFLAGS -Werror"
39868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
39869 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
39870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39871 /* end confdefs.h. */
39872  
39873 _ACEOF
39874 if ac_fn_cxx_try_compile "$LINENO"; then :
39875  
39876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39877 $as_echo "no" >&6; }
39878 #
39879 # Remove "force an error for a warning" options, if we
39880 # added them, by setting CXXFLAGS to the saved value plus
39881 # just the new option.
39882 #
39883  
39884 if ${WS_CXXFLAGS+:} false; then :
39885  
39886 case " $WS_CXXFLAGS " in #(
39887 *" $GCC_OPTION "*) :
39888 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
39889 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
39890 ac_status=$?
39891 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39892 test $ac_status = 0; } ;; #(
39893 *) :
39894  
39895 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
39896 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
39897 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
39898 ac_status=$?
39899 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39900 test $ac_status = 0; }
39901 ;;
39902 esac
39903  
39904 else
39905  
39906 WS_CXXFLAGS=$GCC_OPTION
39907 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
39908 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
39909 ac_status=$?
39910 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39911 test $ac_status = 0; }
39912  
39913 fi
39914  
39915  
39916 else
39917  
39918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
39919 $as_echo "yes" >&6; }
39920  
39921 fi
39922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39923 else
39924 #
39925 # Remove "force an error for a warning" options, if we
39926 # added them, by setting CXXFLAGS to the saved value plus
39927 # just the new option.
39928 #
39929  
39930 if ${WS_CXXFLAGS+:} false; then :
39931  
39932 case " $WS_CXXFLAGS " in #(
39933 *" $GCC_OPTION "*) :
39934 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
39935 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
39936 ac_status=$?
39937 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39938 test $ac_status = 0; } ;; #(
39939 *) :
39940  
39941 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
39942 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
39943 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
39944 ac_status=$?
39945 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39946 test $ac_status = 0; }
39947 ;;
39948 esac
39949  
39950 else
39951  
39952 WS_CXXFLAGS=$GCC_OPTION
39953 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
39954 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
39955 ac_status=$?
39956 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39957 test $ac_status = 0; }
39958  
39959 fi
39960  
39961 fi
39962  
39963 else
39964  
39965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39966 $as_echo "no" >&6; }
39967 can_add_to_cxxflags=no
39968  
39969 fi
39970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39971  
39972 CPPFLAGS="$ac_ws_CPPLAGS_saved"
39973 CFLAGS="$ac_ws_CFLAGS_saved"
39974 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
39975 LDFLAGS="$ac_ws_LDFLAGS_saved"
39976  
39977 ac_ext=c
39978 ac_cpp='$CPP $CPPFLAGS'
39979 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
39980 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
39981 ac_compiler_gnu=$ac_cv_c_compiler_gnu
39982  
39983 fi
39984 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
39985 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
39986 then
39987 #
39988 # Confusingly, some C++ compilers like -Wmissing-prototypes but
39989 # don't like -Wmissing-declarations and others like
39990 # -Wmissing-declarations but don't like -Wmissing-prototypes,
39991 # the fact that the corresponding C compiler likes both. Don't
39992 # warn about them.
39993 #
39994 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
39995 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
39996 then
39997 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
39998 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
39999 fi
40000 fi
40001 fi
40002 fi
40003  
40004 #
40005 # Some generated ASN.1 dissectors block this one;
40006 # multiple function declarations for the same
40007 # function are being generated.
40008 #
40009 GCC_OPTION="-Wredundant-decls"
40010 can_add_to_cflags=""
40011 can_add_to_cxxflags=""
40012 if test "x$ac_supports_gcc_flags" = "xyes" ; then
40013 if test "" != CXX ; then
40014 #
40015 # Not C++-only; if this can be added to the C compiler flags, add them.
40016 #
40017 # If the option begins with "-W", add
40018 # $ac_wireshark_unknown_warning_option_error to make sure that
40019 # we'll get an error if it's an unknown warning option; not all
40020 # compilers treat unknown warning options as errors (I'm looking at
40021 # you, clang).
40022 #
40023 # If the option begins with "-f" or "-m", add -Werror to make sure
40024 # that we'll get an error if we get "argument unused during compilation"
40025 # warnings, as those will either cause a failure for files compiled
40026 # with -Werror or annoying noise for files compiled without it.
40027 # (Yeah, you, clang.)
40028 #
40029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
40030 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
40031  
40032 ac_ws_CPPLAGS_saved="$CPPFLAGS"
40033 ac_ws_CFLAGS_saved="$CFLAGS"
40034 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
40035 ac_ws_LDFLAGS_saved="$LDFLAGS"
40036 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
40037 CFLAGS="$WS_CFLAGS $CFLAGS"
40038 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
40039 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
40040  
40041 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
40042 then
40043 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
40044 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
40045 then
40046 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
40047 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
40048 then
40049 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
40050 else
40051 CFLAGS="$CFLAGS $GCC_OPTION"
40052 fi
40053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40054 /* end confdefs.h. */
40055  
40056 int foo;
40057  
40058 _ACEOF
40059 if ac_fn_c_try_compile "$LINENO"; then :
40060  
40061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40062 $as_echo "yes" >&6; }
40063 can_add_to_cflags=yes
40064 #
40065 # OK, do we have a test program? If so, check
40066 # whether it fails with this option and -Werror,
40067 # and, if so, don't include it.
40068 #
40069 # We test arg 4 here because arg 3 is a program which
40070 # could contain quotes (breaking the comparison).
40071 #
40072 if test "x" != "x" ; then
40073 CFLAGS="$CFLAGS -Werror"
40074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
40075 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
40076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40077 /* end confdefs.h. */
40078  
40079 _ACEOF
40080 if ac_fn_c_try_compile "$LINENO"; then :
40081  
40082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40083 $as_echo "no" >&6; }
40084 #
40085 # Remove "force an error for a warning" options, if we
40086 # added them, by setting CFLAGS to the saved value plus
40087 # just the new option.
40088 #
40089  
40090 if ${WS_CFLAGS+:} false; then :
40091  
40092 case " $WS_CFLAGS " in #(
40093 *" $GCC_OPTION "*) :
40094 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
40095 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
40096 ac_status=$?
40097 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40098 test $ac_status = 0; } ;; #(
40099 *) :
40100  
40101 as_fn_append WS_CFLAGS " $GCC_OPTION"
40102 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
40103 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
40104 ac_status=$?
40105 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40106 test $ac_status = 0; }
40107 ;;
40108 esac
40109  
40110 else
40111  
40112 WS_CFLAGS=$GCC_OPTION
40113 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
40114 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
40115 ac_status=$?
40116 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40117 test $ac_status = 0; }
40118  
40119 fi
40120  
40121 if test "$CC" = "$CC_FOR_BUILD"; then
40122 #
40123 # We're building the build tools with the same compiler
40124 # with which we're building Wireshark, so add the flags
40125 # to the flags for that compiler as well.
40126 #
40127  
40128 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
40129  
40130 case " $WS_CFLAGS_FOR_BUILD " in #(
40131 *" $GCC_OPTION "*) :
40132 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
40133 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
40134 ac_status=$?
40135 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40136 test $ac_status = 0; } ;; #(
40137 *) :
40138  
40139 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
40140 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
40141 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
40142 ac_status=$?
40143 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40144 test $ac_status = 0; }
40145 ;;
40146 esac
40147  
40148 else
40149  
40150 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
40151 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
40152 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
40153 ac_status=$?
40154 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40155 test $ac_status = 0; }
40156  
40157 fi
40158  
40159 fi
40160  
40161 else
40162  
40163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40164 $as_echo "yes" >&6; }
40165  
40166 fi
40167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40168 else
40169 #
40170 # Remove "force an error for a warning" options, if we
40171 # added them, by setting CFLAGS to the saved value plus
40172 # just the new option.
40173 #
40174  
40175 if ${WS_CFLAGS+:} false; then :
40176  
40177 case " $WS_CFLAGS " in #(
40178 *" $GCC_OPTION "*) :
40179 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
40180 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
40181 ac_status=$?
40182 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40183 test $ac_status = 0; } ;; #(
40184 *) :
40185  
40186 as_fn_append WS_CFLAGS " $GCC_OPTION"
40187 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
40188 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
40189 ac_status=$?
40190 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40191 test $ac_status = 0; }
40192 ;;
40193 esac
40194  
40195 else
40196  
40197 WS_CFLAGS=$GCC_OPTION
40198 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
40199 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
40200 ac_status=$?
40201 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40202 test $ac_status = 0; }
40203  
40204 fi
40205  
40206 if test "$CC" = "$CC_FOR_BUILD"; then
40207 #
40208 # We're building the build tools with the same compiler
40209 # with which we're building Wireshark, so add the flags
40210 # to the flags for that compiler as well.
40211 #
40212  
40213 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
40214  
40215 case " $WS_CFLAGS_FOR_BUILD " in #(
40216 *" $GCC_OPTION "*) :
40217 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
40218 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
40219 ac_status=$?
40220 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40221 test $ac_status = 0; } ;; #(
40222 *) :
40223  
40224 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
40225 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
40226 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
40227 ac_status=$?
40228 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40229 test $ac_status = 0; }
40230 ;;
40231 esac
40232  
40233 else
40234  
40235 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
40236 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
40237 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
40238 ac_status=$?
40239 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40240 test $ac_status = 0; }
40241  
40242 fi
40243  
40244 fi
40245 fi
40246  
40247 else
40248  
40249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40250 $as_echo "no" >&6; }
40251 can_add_to_cflags=no
40252  
40253 fi
40254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40255  
40256 CPPFLAGS="$ac_ws_CPPLAGS_saved"
40257 CFLAGS="$ac_ws_CFLAGS_saved"
40258 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
40259 LDFLAGS="$ac_ws_LDFLAGS_saved"
40260  
40261 fi
40262 #
40263 # Did we find a C++ compiler?
40264 #
40265 if test "x$CXX" != "x" ; then
40266 #
40267 # Yes. Is this option only for the C compiler?
40268 #
40269 if test "" != C ; then
40270 #
40271 # Not C-only; if this option can be added to the C++ compiler
40272 # options, add it.
40273 #
40274 # If the option begins with "-W", add
40275 # $ac_wireshark_unknown_warning_option_error, as per the above, and
40276 # also add $ac_wireshark_non_cxx_warning_option_error, because at
40277 # lease some versions of g++ whine about -Wmissing-prototypes, the
40278 # fact that at least one of those versions refuses to warn about
40279 # function declarations without an earlier declaration nonwithstanding;
40280 # perhaps there's a reason not to warn about that with C++ even though
40281 # warning about it can be a Good Idea with C, but it's not obvious to
40282 # me).
40283 #
40284 # If the option begins with "-f" or "-m", add -Werror to make sure
40285 # that we'll get an error if we get "argument unused during compilation"
40286 # warnings, as those will either cause a failure for files compiled
40287 # with -Werror or annoying noise for files compiled without it.
40288 # (Yeah, you, clang++.)
40289 #
40290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
40291 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
40292  
40293 ac_ws_CPPLAGS_saved="$CPPFLAGS"
40294 ac_ws_CFLAGS_saved="$CFLAGS"
40295 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
40296 ac_ws_LDFLAGS_saved="$LDFLAGS"
40297 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
40298 CFLAGS="$WS_CFLAGS $CFLAGS"
40299 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
40300 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
40301  
40302 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
40303 then
40304 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
40305 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
40306 then
40307 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
40308 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
40309 then
40310 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
40311 else
40312 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
40313 fi
40314 ac_ext=cpp
40315 ac_cpp='$CXXCPP $CPPFLAGS'
40316 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40317 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40318 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40319  
40320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40321 /* end confdefs.h. */
40322  
40323 int foo;
40324  
40325 _ACEOF
40326 if ac_fn_cxx_try_compile "$LINENO"; then :
40327  
40328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40329 $as_echo "yes" >&6; }
40330 can_add_to_cxxflags=yes
40331 #
40332 # OK, do we have a test program? If so, check
40333 # whether it fails with this option and -Werror,
40334 # and, if so, don't include it.
40335 #
40336 # We test arg 4 here because arg 3 is a program which
40337 # could contain quotes (breaking the comparison).
40338 #
40339 if test "x" != "x" ; then
40340 CXXFLAGS="$CXXFLAGS -Werror"
40341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
40342 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
40343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40344 /* end confdefs.h. */
40345  
40346 _ACEOF
40347 if ac_fn_cxx_try_compile "$LINENO"; then :
40348  
40349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40350 $as_echo "no" >&6; }
40351 #
40352 # Remove "force an error for a warning" options, if we
40353 # added them, by setting CXXFLAGS to the saved value plus
40354 # just the new option.
40355 #
40356  
40357 if ${WS_CXXFLAGS+:} false; then :
40358  
40359 case " $WS_CXXFLAGS " in #(
40360 *" $GCC_OPTION "*) :
40361 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
40362 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
40363 ac_status=$?
40364 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40365 test $ac_status = 0; } ;; #(
40366 *) :
40367  
40368 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
40369 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
40370 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
40371 ac_status=$?
40372 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40373 test $ac_status = 0; }
40374 ;;
40375 esac
40376  
40377 else
40378  
40379 WS_CXXFLAGS=$GCC_OPTION
40380 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
40381 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
40382 ac_status=$?
40383 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40384 test $ac_status = 0; }
40385  
40386 fi
40387  
40388  
40389 else
40390  
40391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40392 $as_echo "yes" >&6; }
40393  
40394 fi
40395 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40396 else
40397 #
40398 # Remove "force an error for a warning" options, if we
40399 # added them, by setting CXXFLAGS to the saved value plus
40400 # just the new option.
40401 #
40402  
40403 if ${WS_CXXFLAGS+:} false; then :
40404  
40405 case " $WS_CXXFLAGS " in #(
40406 *" $GCC_OPTION "*) :
40407 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
40408 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
40409 ac_status=$?
40410 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40411 test $ac_status = 0; } ;; #(
40412 *) :
40413  
40414 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
40415 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
40416 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
40417 ac_status=$?
40418 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40419 test $ac_status = 0; }
40420 ;;
40421 esac
40422  
40423 else
40424  
40425 WS_CXXFLAGS=$GCC_OPTION
40426 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
40427 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
40428 ac_status=$?
40429 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40430 test $ac_status = 0; }
40431  
40432 fi
40433  
40434 fi
40435  
40436 else
40437  
40438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40439 $as_echo "no" >&6; }
40440 can_add_to_cxxflags=no
40441  
40442 fi
40443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40444  
40445 CPPFLAGS="$ac_ws_CPPLAGS_saved"
40446 CFLAGS="$ac_ws_CFLAGS_saved"
40447 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
40448 LDFLAGS="$ac_ws_LDFLAGS_saved"
40449  
40450 ac_ext=c
40451 ac_cpp='$CPP $CPPFLAGS'
40452 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40453 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40454 ac_compiler_gnu=$ac_cv_c_compiler_gnu
40455  
40456 fi
40457 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
40458 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
40459 then
40460 #
40461 # Confusingly, some C++ compilers like -Wmissing-prototypes but
40462 # don't like -Wmissing-declarations and others like
40463 # -Wmissing-declarations but don't like -Wmissing-prototypes,
40464 # the fact that the corresponding C compiler likes both. Don't
40465 # warn about them.
40466 #
40467 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
40468 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
40469 then
40470 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
40471 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
40472 fi
40473 fi
40474 fi
40475 fi
40476  
40477 #
40478 # Some loops are safe, but it's hard to convince the
40479 # compiler of that.
40480 #
40481 GCC_OPTION="-Wunsafe-loop-optimizations"
40482 can_add_to_cflags=""
40483 can_add_to_cxxflags=""
40484 if test "x$ac_supports_gcc_flags" = "xyes" ; then
40485 if test "" != CXX ; then
40486 #
40487 # Not C++-only; if this can be added to the C compiler flags, add them.
40488 #
40489 # If the option begins with "-W", add
40490 # $ac_wireshark_unknown_warning_option_error to make sure that
40491 # we'll get an error if it's an unknown warning option; not all
40492 # compilers treat unknown warning options as errors (I'm looking at
40493 # you, clang).
40494 #
40495 # If the option begins with "-f" or "-m", add -Werror to make sure
40496 # that we'll get an error if we get "argument unused during compilation"
40497 # warnings, as those will either cause a failure for files compiled
40498 # with -Werror or annoying noise for files compiled without it.
40499 # (Yeah, you, clang.)
40500 #
40501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
40502 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
40503  
40504 ac_ws_CPPLAGS_saved="$CPPFLAGS"
40505 ac_ws_CFLAGS_saved="$CFLAGS"
40506 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
40507 ac_ws_LDFLAGS_saved="$LDFLAGS"
40508 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
40509 CFLAGS="$WS_CFLAGS $CFLAGS"
40510 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
40511 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
40512  
40513 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
40514 then
40515 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
40516 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
40517 then
40518 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
40519 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
40520 then
40521 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
40522 else
40523 CFLAGS="$CFLAGS $GCC_OPTION"
40524 fi
40525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40526 /* end confdefs.h. */
40527  
40528 int foo;
40529  
40530 _ACEOF
40531 if ac_fn_c_try_compile "$LINENO"; then :
40532  
40533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40534 $as_echo "yes" >&6; }
40535 can_add_to_cflags=yes
40536 #
40537 # OK, do we have a test program? If so, check
40538 # whether it fails with this option and -Werror,
40539 # and, if so, don't include it.
40540 #
40541 # We test arg 4 here because arg 3 is a program which
40542 # could contain quotes (breaking the comparison).
40543 #
40544 if test "x" != "x" ; then
40545 CFLAGS="$CFLAGS -Werror"
40546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
40547 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
40548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40549 /* end confdefs.h. */
40550  
40551 _ACEOF
40552 if ac_fn_c_try_compile "$LINENO"; then :
40553  
40554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40555 $as_echo "no" >&6; }
40556 #
40557 # Remove "force an error for a warning" options, if we
40558 # added them, by setting CFLAGS to the saved value plus
40559 # just the new option.
40560 #
40561  
40562 if ${WS_CFLAGS+:} false; then :
40563  
40564 case " $WS_CFLAGS " in #(
40565 *" $GCC_OPTION "*) :
40566 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
40567 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
40568 ac_status=$?
40569 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40570 test $ac_status = 0; } ;; #(
40571 *) :
40572  
40573 as_fn_append WS_CFLAGS " $GCC_OPTION"
40574 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
40575 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
40576 ac_status=$?
40577 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40578 test $ac_status = 0; }
40579 ;;
40580 esac
40581  
40582 else
40583  
40584 WS_CFLAGS=$GCC_OPTION
40585 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
40586 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
40587 ac_status=$?
40588 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40589 test $ac_status = 0; }
40590  
40591 fi
40592  
40593 if test "$CC" = "$CC_FOR_BUILD"; then
40594 #
40595 # We're building the build tools with the same compiler
40596 # with which we're building Wireshark, so add the flags
40597 # to the flags for that compiler as well.
40598 #
40599  
40600 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
40601  
40602 case " $WS_CFLAGS_FOR_BUILD " in #(
40603 *" $GCC_OPTION "*) :
40604 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
40605 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
40606 ac_status=$?
40607 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40608 test $ac_status = 0; } ;; #(
40609 *) :
40610  
40611 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
40612 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
40613 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
40614 ac_status=$?
40615 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40616 test $ac_status = 0; }
40617 ;;
40618 esac
40619  
40620 else
40621  
40622 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
40623 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
40624 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
40625 ac_status=$?
40626 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40627 test $ac_status = 0; }
40628  
40629 fi
40630  
40631 fi
40632  
40633 else
40634  
40635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40636 $as_echo "yes" >&6; }
40637  
40638 fi
40639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40640 else
40641 #
40642 # Remove "force an error for a warning" options, if we
40643 # added them, by setting CFLAGS to the saved value plus
40644 # just the new option.
40645 #
40646  
40647 if ${WS_CFLAGS+:} false; then :
40648  
40649 case " $WS_CFLAGS " in #(
40650 *" $GCC_OPTION "*) :
40651 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
40652 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
40653 ac_status=$?
40654 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40655 test $ac_status = 0; } ;; #(
40656 *) :
40657  
40658 as_fn_append WS_CFLAGS " $GCC_OPTION"
40659 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
40660 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
40661 ac_status=$?
40662 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40663 test $ac_status = 0; }
40664 ;;
40665 esac
40666  
40667 else
40668  
40669 WS_CFLAGS=$GCC_OPTION
40670 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
40671 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
40672 ac_status=$?
40673 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40674 test $ac_status = 0; }
40675  
40676 fi
40677  
40678 if test "$CC" = "$CC_FOR_BUILD"; then
40679 #
40680 # We're building the build tools with the same compiler
40681 # with which we're building Wireshark, so add the flags
40682 # to the flags for that compiler as well.
40683 #
40684  
40685 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
40686  
40687 case " $WS_CFLAGS_FOR_BUILD " in #(
40688 *" $GCC_OPTION "*) :
40689 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
40690 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
40691 ac_status=$?
40692 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40693 test $ac_status = 0; } ;; #(
40694 *) :
40695  
40696 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
40697 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
40698 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
40699 ac_status=$?
40700 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40701 test $ac_status = 0; }
40702 ;;
40703 esac
40704  
40705 else
40706  
40707 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
40708 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
40709 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
40710 ac_status=$?
40711 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40712 test $ac_status = 0; }
40713  
40714 fi
40715  
40716 fi
40717 fi
40718  
40719 else
40720  
40721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40722 $as_echo "no" >&6; }
40723 can_add_to_cflags=no
40724  
40725 fi
40726 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40727  
40728 CPPFLAGS="$ac_ws_CPPLAGS_saved"
40729 CFLAGS="$ac_ws_CFLAGS_saved"
40730 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
40731 LDFLAGS="$ac_ws_LDFLAGS_saved"
40732  
40733 fi
40734 #
40735 # Did we find a C++ compiler?
40736 #
40737 if test "x$CXX" != "x" ; then
40738 #
40739 # Yes. Is this option only for the C compiler?
40740 #
40741 if test "" != C ; then
40742 #
40743 # Not C-only; if this option can be added to the C++ compiler
40744 # options, add it.
40745 #
40746 # If the option begins with "-W", add
40747 # $ac_wireshark_unknown_warning_option_error, as per the above, and
40748 # also add $ac_wireshark_non_cxx_warning_option_error, because at
40749 # lease some versions of g++ whine about -Wmissing-prototypes, the
40750 # fact that at least one of those versions refuses to warn about
40751 # function declarations without an earlier declaration nonwithstanding;
40752 # perhaps there's a reason not to warn about that with C++ even though
40753 # warning about it can be a Good Idea with C, but it's not obvious to
40754 # me).
40755 #
40756 # If the option begins with "-f" or "-m", add -Werror to make sure
40757 # that we'll get an error if we get "argument unused during compilation"
40758 # warnings, as those will either cause a failure for files compiled
40759 # with -Werror or annoying noise for files compiled without it.
40760 # (Yeah, you, clang++.)
40761 #
40762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
40763 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
40764  
40765 ac_ws_CPPLAGS_saved="$CPPFLAGS"
40766 ac_ws_CFLAGS_saved="$CFLAGS"
40767 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
40768 ac_ws_LDFLAGS_saved="$LDFLAGS"
40769 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
40770 CFLAGS="$WS_CFLAGS $CFLAGS"
40771 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
40772 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
40773  
40774 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
40775 then
40776 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
40777 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
40778 then
40779 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
40780 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
40781 then
40782 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
40783 else
40784 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
40785 fi
40786 ac_ext=cpp
40787 ac_cpp='$CXXCPP $CPPFLAGS'
40788 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40789 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40790 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40791  
40792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40793 /* end confdefs.h. */
40794  
40795 int foo;
40796  
40797 _ACEOF
40798 if ac_fn_cxx_try_compile "$LINENO"; then :
40799  
40800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40801 $as_echo "yes" >&6; }
40802 can_add_to_cxxflags=yes
40803 #
40804 # OK, do we have a test program? If so, check
40805 # whether it fails with this option and -Werror,
40806 # and, if so, don't include it.
40807 #
40808 # We test arg 4 here because arg 3 is a program which
40809 # could contain quotes (breaking the comparison).
40810 #
40811 if test "x" != "x" ; then
40812 CXXFLAGS="$CXXFLAGS -Werror"
40813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
40814 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
40815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40816 /* end confdefs.h. */
40817  
40818 _ACEOF
40819 if ac_fn_cxx_try_compile "$LINENO"; then :
40820  
40821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40822 $as_echo "no" >&6; }
40823 #
40824 # Remove "force an error for a warning" options, if we
40825 # added them, by setting CXXFLAGS to the saved value plus
40826 # just the new option.
40827 #
40828  
40829 if ${WS_CXXFLAGS+:} false; then :
40830  
40831 case " $WS_CXXFLAGS " in #(
40832 *" $GCC_OPTION "*) :
40833 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
40834 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
40835 ac_status=$?
40836 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40837 test $ac_status = 0; } ;; #(
40838 *) :
40839  
40840 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
40841 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
40842 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
40843 ac_status=$?
40844 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40845 test $ac_status = 0; }
40846 ;;
40847 esac
40848  
40849 else
40850  
40851 WS_CXXFLAGS=$GCC_OPTION
40852 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
40853 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
40854 ac_status=$?
40855 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40856 test $ac_status = 0; }
40857  
40858 fi
40859  
40860  
40861 else
40862  
40863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40864 $as_echo "yes" >&6; }
40865  
40866 fi
40867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40868 else
40869 #
40870 # Remove "force an error for a warning" options, if we
40871 # added them, by setting CXXFLAGS to the saved value plus
40872 # just the new option.
40873 #
40874  
40875 if ${WS_CXXFLAGS+:} false; then :
40876  
40877 case " $WS_CXXFLAGS " in #(
40878 *" $GCC_OPTION "*) :
40879 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
40880 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
40881 ac_status=$?
40882 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40883 test $ac_status = 0; } ;; #(
40884 *) :
40885  
40886 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
40887 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
40888 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
40889 ac_status=$?
40890 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40891 test $ac_status = 0; }
40892 ;;
40893 esac
40894  
40895 else
40896  
40897 WS_CXXFLAGS=$GCC_OPTION
40898 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
40899 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
40900 ac_status=$?
40901 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40902 test $ac_status = 0; }
40903  
40904 fi
40905  
40906 fi
40907  
40908 else
40909  
40910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40911 $as_echo "no" >&6; }
40912 can_add_to_cxxflags=no
40913  
40914 fi
40915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40916  
40917 CPPFLAGS="$ac_ws_CPPLAGS_saved"
40918 CFLAGS="$ac_ws_CFLAGS_saved"
40919 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
40920 LDFLAGS="$ac_ws_LDFLAGS_saved"
40921  
40922 ac_ext=c
40923 ac_cpp='$CPP $CPPFLAGS'
40924 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40925 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40926 ac_compiler_gnu=$ac_cv_c_compiler_gnu
40927  
40928 fi
40929 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
40930 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
40931 then
40932 #
40933 # Confusingly, some C++ compilers like -Wmissing-prototypes but
40934 # don't like -Wmissing-declarations and others like
40935 # -Wmissing-declarations but don't like -Wmissing-prototypes,
40936 # the fact that the corresponding C compiler likes both. Don't
40937 # warn about them.
40938 #
40939 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
40940 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
40941 then
40942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
40943 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
40944 fi
40945 fi
40946 fi
40947 fi
40948  
40949 #
40950 # All the registration functions block these for now.
40951 #
40952 GCC_OPTION="-Wmissing-prototypes"
40953 can_add_to_cflags=""
40954 can_add_to_cxxflags=""
40955 if test "x$ac_supports_gcc_flags" = "xyes" ; then
40956 if test "" != CXX ; then
40957 #
40958 # Not C++-only; if this can be added to the C compiler flags, add them.
40959 #
40960 # If the option begins with "-W", add
40961 # $ac_wireshark_unknown_warning_option_error to make sure that
40962 # we'll get an error if it's an unknown warning option; not all
40963 # compilers treat unknown warning options as errors (I'm looking at
40964 # you, clang).
40965 #
40966 # If the option begins with "-f" or "-m", add -Werror to make sure
40967 # that we'll get an error if we get "argument unused during compilation"
40968 # warnings, as those will either cause a failure for files compiled
40969 # with -Werror or annoying noise for files compiled without it.
40970 # (Yeah, you, clang.)
40971 #
40972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
40973 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
40974  
40975 ac_ws_CPPLAGS_saved="$CPPFLAGS"
40976 ac_ws_CFLAGS_saved="$CFLAGS"
40977 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
40978 ac_ws_LDFLAGS_saved="$LDFLAGS"
40979 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
40980 CFLAGS="$WS_CFLAGS $CFLAGS"
40981 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
40982 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
40983  
40984 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
40985 then
40986 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
40987 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
40988 then
40989 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
40990 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
40991 then
40992 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
40993 else
40994 CFLAGS="$CFLAGS $GCC_OPTION"
40995 fi
40996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40997 /* end confdefs.h. */
40998  
40999 int foo;
41000  
41001 _ACEOF
41002 if ac_fn_c_try_compile "$LINENO"; then :
41003  
41004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41005 $as_echo "yes" >&6; }
41006 can_add_to_cflags=yes
41007 #
41008 # OK, do we have a test program? If so, check
41009 # whether it fails with this option and -Werror,
41010 # and, if so, don't include it.
41011 #
41012 # We test arg 4 here because arg 3 is a program which
41013 # could contain quotes (breaking the comparison).
41014 #
41015 if test "x" != "x" ; then
41016 CFLAGS="$CFLAGS -Werror"
41017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
41018 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
41019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41020 /* end confdefs.h. */
41021  
41022 _ACEOF
41023 if ac_fn_c_try_compile "$LINENO"; then :
41024  
41025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41026 $as_echo "no" >&6; }
41027 #
41028 # Remove "force an error for a warning" options, if we
41029 # added them, by setting CFLAGS to the saved value plus
41030 # just the new option.
41031 #
41032  
41033 if ${WS_CFLAGS+:} false; then :
41034  
41035 case " $WS_CFLAGS " in #(
41036 *" $GCC_OPTION "*) :
41037 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
41038 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
41039 ac_status=$?
41040 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41041 test $ac_status = 0; } ;; #(
41042 *) :
41043  
41044 as_fn_append WS_CFLAGS " $GCC_OPTION"
41045 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
41046 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
41047 ac_status=$?
41048 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41049 test $ac_status = 0; }
41050 ;;
41051 esac
41052  
41053 else
41054  
41055 WS_CFLAGS=$GCC_OPTION
41056 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
41057 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
41058 ac_status=$?
41059 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41060 test $ac_status = 0; }
41061  
41062 fi
41063  
41064 if test "$CC" = "$CC_FOR_BUILD"; then
41065 #
41066 # We're building the build tools with the same compiler
41067 # with which we're building Wireshark, so add the flags
41068 # to the flags for that compiler as well.
41069 #
41070  
41071 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
41072  
41073 case " $WS_CFLAGS_FOR_BUILD " in #(
41074 *" $GCC_OPTION "*) :
41075 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
41076 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
41077 ac_status=$?
41078 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41079 test $ac_status = 0; } ;; #(
41080 *) :
41081  
41082 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
41083 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
41084 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
41085 ac_status=$?
41086 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41087 test $ac_status = 0; }
41088 ;;
41089 esac
41090  
41091 else
41092  
41093 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
41094 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
41095 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
41096 ac_status=$?
41097 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41098 test $ac_status = 0; }
41099  
41100 fi
41101  
41102 fi
41103  
41104 else
41105  
41106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41107 $as_echo "yes" >&6; }
41108  
41109 fi
41110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41111 else
41112 #
41113 # Remove "force an error for a warning" options, if we
41114 # added them, by setting CFLAGS to the saved value plus
41115 # just the new option.
41116 #
41117  
41118 if ${WS_CFLAGS+:} false; then :
41119  
41120 case " $WS_CFLAGS " in #(
41121 *" $GCC_OPTION "*) :
41122 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
41123 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
41124 ac_status=$?
41125 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41126 test $ac_status = 0; } ;; #(
41127 *) :
41128  
41129 as_fn_append WS_CFLAGS " $GCC_OPTION"
41130 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
41131 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
41132 ac_status=$?
41133 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41134 test $ac_status = 0; }
41135 ;;
41136 esac
41137  
41138 else
41139  
41140 WS_CFLAGS=$GCC_OPTION
41141 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
41142 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
41143 ac_status=$?
41144 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41145 test $ac_status = 0; }
41146  
41147 fi
41148  
41149 if test "$CC" = "$CC_FOR_BUILD"; then
41150 #
41151 # We're building the build tools with the same compiler
41152 # with which we're building Wireshark, so add the flags
41153 # to the flags for that compiler as well.
41154 #
41155  
41156 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
41157  
41158 case " $WS_CFLAGS_FOR_BUILD " in #(
41159 *" $GCC_OPTION "*) :
41160 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
41161 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
41162 ac_status=$?
41163 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41164 test $ac_status = 0; } ;; #(
41165 *) :
41166  
41167 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
41168 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
41169 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
41170 ac_status=$?
41171 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41172 test $ac_status = 0; }
41173 ;;
41174 esac
41175  
41176 else
41177  
41178 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
41179 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
41180 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
41181 ac_status=$?
41182 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41183 test $ac_status = 0; }
41184  
41185 fi
41186  
41187 fi
41188 fi
41189  
41190 else
41191  
41192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41193 $as_echo "no" >&6; }
41194 can_add_to_cflags=no
41195  
41196 fi
41197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41198  
41199 CPPFLAGS="$ac_ws_CPPLAGS_saved"
41200 CFLAGS="$ac_ws_CFLAGS_saved"
41201 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
41202 LDFLAGS="$ac_ws_LDFLAGS_saved"
41203  
41204 fi
41205 #
41206 # Did we find a C++ compiler?
41207 #
41208 if test "x$CXX" != "x" ; then
41209 #
41210 # Yes. Is this option only for the C compiler?
41211 #
41212 if test "" != C ; then
41213 #
41214 # Not C-only; if this option can be added to the C++ compiler
41215 # options, add it.
41216 #
41217 # If the option begins with "-W", add
41218 # $ac_wireshark_unknown_warning_option_error, as per the above, and
41219 # also add $ac_wireshark_non_cxx_warning_option_error, because at
41220 # lease some versions of g++ whine about -Wmissing-prototypes, the
41221 # fact that at least one of those versions refuses to warn about
41222 # function declarations without an earlier declaration nonwithstanding;
41223 # perhaps there's a reason not to warn about that with C++ even though
41224 # warning about it can be a Good Idea with C, but it's not obvious to
41225 # me).
41226 #
41227 # If the option begins with "-f" or "-m", add -Werror to make sure
41228 # that we'll get an error if we get "argument unused during compilation"
41229 # warnings, as those will either cause a failure for files compiled
41230 # with -Werror or annoying noise for files compiled without it.
41231 # (Yeah, you, clang++.)
41232 #
41233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
41234 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
41235  
41236 ac_ws_CPPLAGS_saved="$CPPFLAGS"
41237 ac_ws_CFLAGS_saved="$CFLAGS"
41238 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
41239 ac_ws_LDFLAGS_saved="$LDFLAGS"
41240 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
41241 CFLAGS="$WS_CFLAGS $CFLAGS"
41242 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
41243 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
41244  
41245 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
41246 then
41247 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
41248 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
41249 then
41250 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
41251 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
41252 then
41253 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
41254 else
41255 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
41256 fi
41257 ac_ext=cpp
41258 ac_cpp='$CXXCPP $CPPFLAGS'
41259 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41260 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41261 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41262  
41263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41264 /* end confdefs.h. */
41265  
41266 int foo;
41267  
41268 _ACEOF
41269 if ac_fn_cxx_try_compile "$LINENO"; then :
41270  
41271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41272 $as_echo "yes" >&6; }
41273 can_add_to_cxxflags=yes
41274 #
41275 # OK, do we have a test program? If so, check
41276 # whether it fails with this option and -Werror,
41277 # and, if so, don't include it.
41278 #
41279 # We test arg 4 here because arg 3 is a program which
41280 # could contain quotes (breaking the comparison).
41281 #
41282 if test "x" != "x" ; then
41283 CXXFLAGS="$CXXFLAGS -Werror"
41284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
41285 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
41286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41287 /* end confdefs.h. */
41288  
41289 _ACEOF
41290 if ac_fn_cxx_try_compile "$LINENO"; then :
41291  
41292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41293 $as_echo "no" >&6; }
41294 #
41295 # Remove "force an error for a warning" options, if we
41296 # added them, by setting CXXFLAGS to the saved value plus
41297 # just the new option.
41298 #
41299  
41300 if ${WS_CXXFLAGS+:} false; then :
41301  
41302 case " $WS_CXXFLAGS " in #(
41303 *" $GCC_OPTION "*) :
41304 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
41305 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
41306 ac_status=$?
41307 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41308 test $ac_status = 0; } ;; #(
41309 *) :
41310  
41311 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
41312 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
41313 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
41314 ac_status=$?
41315 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41316 test $ac_status = 0; }
41317 ;;
41318 esac
41319  
41320 else
41321  
41322 WS_CXXFLAGS=$GCC_OPTION
41323 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
41324 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
41325 ac_status=$?
41326 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41327 test $ac_status = 0; }
41328  
41329 fi
41330  
41331  
41332 else
41333  
41334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41335 $as_echo "yes" >&6; }
41336  
41337 fi
41338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41339 else
41340 #
41341 # Remove "force an error for a warning" options, if we
41342 # added them, by setting CXXFLAGS to the saved value plus
41343 # just the new option.
41344 #
41345  
41346 if ${WS_CXXFLAGS+:} false; then :
41347  
41348 case " $WS_CXXFLAGS " in #(
41349 *" $GCC_OPTION "*) :
41350 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
41351 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
41352 ac_status=$?
41353 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41354 test $ac_status = 0; } ;; #(
41355 *) :
41356  
41357 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
41358 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
41359 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
41360 ac_status=$?
41361 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41362 test $ac_status = 0; }
41363 ;;
41364 esac
41365  
41366 else
41367  
41368 WS_CXXFLAGS=$GCC_OPTION
41369 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
41370 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
41371 ac_status=$?
41372 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41373 test $ac_status = 0; }
41374  
41375 fi
41376  
41377 fi
41378  
41379 else
41380  
41381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41382 $as_echo "no" >&6; }
41383 can_add_to_cxxflags=no
41384  
41385 fi
41386 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41387  
41388 CPPFLAGS="$ac_ws_CPPLAGS_saved"
41389 CFLAGS="$ac_ws_CFLAGS_saved"
41390 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
41391 LDFLAGS="$ac_ws_LDFLAGS_saved"
41392  
41393 ac_ext=c
41394 ac_cpp='$CPP $CPPFLAGS'
41395 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41396 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41397 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41398  
41399 fi
41400 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
41401 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
41402 then
41403 #
41404 # Confusingly, some C++ compilers like -Wmissing-prototypes but
41405 # don't like -Wmissing-declarations and others like
41406 # -Wmissing-declarations but don't like -Wmissing-prototypes,
41407 # the fact that the corresponding C compiler likes both. Don't
41408 # warn about them.
41409 #
41410 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
41411 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
41412 then
41413 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
41414 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
41415 fi
41416 fi
41417 fi
41418 fi
41419  
41420 GCC_OPTION="-Wmissing-declarations"
41421 can_add_to_cflags=""
41422 can_add_to_cxxflags=""
41423 if test "x$ac_supports_gcc_flags" = "xyes" ; then
41424 if test "" != CXX ; then
41425 #
41426 # Not C++-only; if this can be added to the C compiler flags, add them.
41427 #
41428 # If the option begins with "-W", add
41429 # $ac_wireshark_unknown_warning_option_error to make sure that
41430 # we'll get an error if it's an unknown warning option; not all
41431 # compilers treat unknown warning options as errors (I'm looking at
41432 # you, clang).
41433 #
41434 # If the option begins with "-f" or "-m", add -Werror to make sure
41435 # that we'll get an error if we get "argument unused during compilation"
41436 # warnings, as those will either cause a failure for files compiled
41437 # with -Werror or annoying noise for files compiled without it.
41438 # (Yeah, you, clang.)
41439 #
41440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
41441 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
41442  
41443 ac_ws_CPPLAGS_saved="$CPPFLAGS"
41444 ac_ws_CFLAGS_saved="$CFLAGS"
41445 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
41446 ac_ws_LDFLAGS_saved="$LDFLAGS"
41447 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
41448 CFLAGS="$WS_CFLAGS $CFLAGS"
41449 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
41450 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
41451  
41452 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
41453 then
41454 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
41455 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
41456 then
41457 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
41458 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
41459 then
41460 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
41461 else
41462 CFLAGS="$CFLAGS $GCC_OPTION"
41463 fi
41464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41465 /* end confdefs.h. */
41466  
41467 int foo;
41468  
41469 _ACEOF
41470 if ac_fn_c_try_compile "$LINENO"; then :
41471  
41472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41473 $as_echo "yes" >&6; }
41474 can_add_to_cflags=yes
41475 #
41476 # OK, do we have a test program? If so, check
41477 # whether it fails with this option and -Werror,
41478 # and, if so, don't include it.
41479 #
41480 # We test arg 4 here because arg 3 is a program which
41481 # could contain quotes (breaking the comparison).
41482 #
41483 if test "x" != "x" ; then
41484 CFLAGS="$CFLAGS -Werror"
41485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
41486 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
41487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41488 /* end confdefs.h. */
41489  
41490 _ACEOF
41491 if ac_fn_c_try_compile "$LINENO"; then :
41492  
41493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41494 $as_echo "no" >&6; }
41495 #
41496 # Remove "force an error for a warning" options, if we
41497 # added them, by setting CFLAGS to the saved value plus
41498 # just the new option.
41499 #
41500  
41501 if ${WS_CFLAGS+:} false; then :
41502  
41503 case " $WS_CFLAGS " in #(
41504 *" $GCC_OPTION "*) :
41505 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
41506 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
41507 ac_status=$?
41508 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41509 test $ac_status = 0; } ;; #(
41510 *) :
41511  
41512 as_fn_append WS_CFLAGS " $GCC_OPTION"
41513 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
41514 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
41515 ac_status=$?
41516 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41517 test $ac_status = 0; }
41518 ;;
41519 esac
41520  
41521 else
41522  
41523 WS_CFLAGS=$GCC_OPTION
41524 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
41525 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
41526 ac_status=$?
41527 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41528 test $ac_status = 0; }
41529  
41530 fi
41531  
41532 if test "$CC" = "$CC_FOR_BUILD"; then
41533 #
41534 # We're building the build tools with the same compiler
41535 # with which we're building Wireshark, so add the flags
41536 # to the flags for that compiler as well.
41537 #
41538  
41539 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
41540  
41541 case " $WS_CFLAGS_FOR_BUILD " in #(
41542 *" $GCC_OPTION "*) :
41543 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
41544 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
41545 ac_status=$?
41546 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41547 test $ac_status = 0; } ;; #(
41548 *) :
41549  
41550 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
41551 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
41552 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
41553 ac_status=$?
41554 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41555 test $ac_status = 0; }
41556 ;;
41557 esac
41558  
41559 else
41560  
41561 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
41562 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
41563 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
41564 ac_status=$?
41565 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41566 test $ac_status = 0; }
41567  
41568 fi
41569  
41570 fi
41571  
41572 else
41573  
41574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41575 $as_echo "yes" >&6; }
41576  
41577 fi
41578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41579 else
41580 #
41581 # Remove "force an error for a warning" options, if we
41582 # added them, by setting CFLAGS to the saved value plus
41583 # just the new option.
41584 #
41585  
41586 if ${WS_CFLAGS+:} false; then :
41587  
41588 case " $WS_CFLAGS " in #(
41589 *" $GCC_OPTION "*) :
41590 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
41591 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
41592 ac_status=$?
41593 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41594 test $ac_status = 0; } ;; #(
41595 *) :
41596  
41597 as_fn_append WS_CFLAGS " $GCC_OPTION"
41598 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
41599 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
41600 ac_status=$?
41601 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41602 test $ac_status = 0; }
41603 ;;
41604 esac
41605  
41606 else
41607  
41608 WS_CFLAGS=$GCC_OPTION
41609 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
41610 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
41611 ac_status=$?
41612 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41613 test $ac_status = 0; }
41614  
41615 fi
41616  
41617 if test "$CC" = "$CC_FOR_BUILD"; then
41618 #
41619 # We're building the build tools with the same compiler
41620 # with which we're building Wireshark, so add the flags
41621 # to the flags for that compiler as well.
41622 #
41623  
41624 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
41625  
41626 case " $WS_CFLAGS_FOR_BUILD " in #(
41627 *" $GCC_OPTION "*) :
41628 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
41629 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
41630 ac_status=$?
41631 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41632 test $ac_status = 0; } ;; #(
41633 *) :
41634  
41635 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
41636 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
41637 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
41638 ac_status=$?
41639 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41640 test $ac_status = 0; }
41641 ;;
41642 esac
41643  
41644 else
41645  
41646 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
41647 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
41648 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
41649 ac_status=$?
41650 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41651 test $ac_status = 0; }
41652  
41653 fi
41654  
41655 fi
41656 fi
41657  
41658 else
41659  
41660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41661 $as_echo "no" >&6; }
41662 can_add_to_cflags=no
41663  
41664 fi
41665 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41666  
41667 CPPFLAGS="$ac_ws_CPPLAGS_saved"
41668 CFLAGS="$ac_ws_CFLAGS_saved"
41669 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
41670 LDFLAGS="$ac_ws_LDFLAGS_saved"
41671  
41672 fi
41673 #
41674 # Did we find a C++ compiler?
41675 #
41676 if test "x$CXX" != "x" ; then
41677 #
41678 # Yes. Is this option only for the C compiler?
41679 #
41680 if test "" != C ; then
41681 #
41682 # Not C-only; if this option can be added to the C++ compiler
41683 # options, add it.
41684 #
41685 # If the option begins with "-W", add
41686 # $ac_wireshark_unknown_warning_option_error, as per the above, and
41687 # also add $ac_wireshark_non_cxx_warning_option_error, because at
41688 # lease some versions of g++ whine about -Wmissing-prototypes, the
41689 # fact that at least one of those versions refuses to warn about
41690 # function declarations without an earlier declaration nonwithstanding;
41691 # perhaps there's a reason not to warn about that with C++ even though
41692 # warning about it can be a Good Idea with C, but it's not obvious to
41693 # me).
41694 #
41695 # If the option begins with "-f" or "-m", add -Werror to make sure
41696 # that we'll get an error if we get "argument unused during compilation"
41697 # warnings, as those will either cause a failure for files compiled
41698 # with -Werror or annoying noise for files compiled without it.
41699 # (Yeah, you, clang++.)
41700 #
41701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
41702 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
41703  
41704 ac_ws_CPPLAGS_saved="$CPPFLAGS"
41705 ac_ws_CFLAGS_saved="$CFLAGS"
41706 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
41707 ac_ws_LDFLAGS_saved="$LDFLAGS"
41708 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
41709 CFLAGS="$WS_CFLAGS $CFLAGS"
41710 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
41711 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
41712  
41713 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
41714 then
41715 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
41716 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
41717 then
41718 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
41719 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
41720 then
41721 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
41722 else
41723 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
41724 fi
41725 ac_ext=cpp
41726 ac_cpp='$CXXCPP $CPPFLAGS'
41727 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41728 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41729 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41730  
41731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41732 /* end confdefs.h. */
41733  
41734 int foo;
41735  
41736 _ACEOF
41737 if ac_fn_cxx_try_compile "$LINENO"; then :
41738  
41739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41740 $as_echo "yes" >&6; }
41741 can_add_to_cxxflags=yes
41742 #
41743 # OK, do we have a test program? If so, check
41744 # whether it fails with this option and -Werror,
41745 # and, if so, don't include it.
41746 #
41747 # We test arg 4 here because arg 3 is a program which
41748 # could contain quotes (breaking the comparison).
41749 #
41750 if test "x" != "x" ; then
41751 CXXFLAGS="$CXXFLAGS -Werror"
41752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
41753 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
41754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41755 /* end confdefs.h. */
41756  
41757 _ACEOF
41758 if ac_fn_cxx_try_compile "$LINENO"; then :
41759  
41760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41761 $as_echo "no" >&6; }
41762 #
41763 # Remove "force an error for a warning" options, if we
41764 # added them, by setting CXXFLAGS to the saved value plus
41765 # just the new option.
41766 #
41767  
41768 if ${WS_CXXFLAGS+:} false; then :
41769  
41770 case " $WS_CXXFLAGS " in #(
41771 *" $GCC_OPTION "*) :
41772 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
41773 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
41774 ac_status=$?
41775 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41776 test $ac_status = 0; } ;; #(
41777 *) :
41778  
41779 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
41780 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
41781 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
41782 ac_status=$?
41783 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41784 test $ac_status = 0; }
41785 ;;
41786 esac
41787  
41788 else
41789  
41790 WS_CXXFLAGS=$GCC_OPTION
41791 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
41792 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
41793 ac_status=$?
41794 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41795 test $ac_status = 0; }
41796  
41797 fi
41798  
41799  
41800 else
41801  
41802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41803 $as_echo "yes" >&6; }
41804  
41805 fi
41806 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41807 else
41808 #
41809 # Remove "force an error for a warning" options, if we
41810 # added them, by setting CXXFLAGS to the saved value plus
41811 # just the new option.
41812 #
41813  
41814 if ${WS_CXXFLAGS+:} false; then :
41815  
41816 case " $WS_CXXFLAGS " in #(
41817 *" $GCC_OPTION "*) :
41818 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
41819 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
41820 ac_status=$?
41821 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41822 test $ac_status = 0; } ;; #(
41823 *) :
41824  
41825 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
41826 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
41827 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
41828 ac_status=$?
41829 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41830 test $ac_status = 0; }
41831 ;;
41832 esac
41833  
41834 else
41835  
41836 WS_CXXFLAGS=$GCC_OPTION
41837 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
41838 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
41839 ac_status=$?
41840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41841 test $ac_status = 0; }
41842  
41843 fi
41844  
41845 fi
41846  
41847 else
41848  
41849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41850 $as_echo "no" >&6; }
41851 can_add_to_cxxflags=no
41852  
41853 fi
41854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41855  
41856 CPPFLAGS="$ac_ws_CPPLAGS_saved"
41857 CFLAGS="$ac_ws_CFLAGS_saved"
41858 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
41859 LDFLAGS="$ac_ws_LDFLAGS_saved"
41860  
41861 ac_ext=c
41862 ac_cpp='$CPP $CPPFLAGS'
41863 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41864 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41865 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41866  
41867 fi
41868 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
41869 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
41870 then
41871 #
41872 # Confusingly, some C++ compilers like -Wmissing-prototypes but
41873 # don't like -Wmissing-declarations and others like
41874 # -Wmissing-declarations but don't like -Wmissing-prototypes,
41875 # the fact that the corresponding C compiler likes both. Don't
41876 # warn about them.
41877 #
41878 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
41879 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
41880 then
41881 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
41882 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
41883 fi
41884 fi
41885 fi
41886 fi
41887  
41888 #
41889 # A bunch of "that might not work on SPARC" code blocks
41890 # this one for now.
41891 #
41892 GCC_OPTION="-Wcast-align"
41893 can_add_to_cflags=""
41894 can_add_to_cxxflags=""
41895 if test "x$ac_supports_gcc_flags" = "xyes" ; then
41896 if test "" != CXX ; then
41897 #
41898 # Not C++-only; if this can be added to the C compiler flags, add them.
41899 #
41900 # If the option begins with "-W", add
41901 # $ac_wireshark_unknown_warning_option_error to make sure that
41902 # we'll get an error if it's an unknown warning option; not all
41903 # compilers treat unknown warning options as errors (I'm looking at
41904 # you, clang).
41905 #
41906 # If the option begins with "-f" or "-m", add -Werror to make sure
41907 # that we'll get an error if we get "argument unused during compilation"
41908 # warnings, as those will either cause a failure for files compiled
41909 # with -Werror or annoying noise for files compiled without it.
41910 # (Yeah, you, clang.)
41911 #
41912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
41913 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
41914  
41915 ac_ws_CPPLAGS_saved="$CPPFLAGS"
41916 ac_ws_CFLAGS_saved="$CFLAGS"
41917 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
41918 ac_ws_LDFLAGS_saved="$LDFLAGS"
41919 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
41920 CFLAGS="$WS_CFLAGS $CFLAGS"
41921 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
41922 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
41923  
41924 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
41925 then
41926 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
41927 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
41928 then
41929 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
41930 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
41931 then
41932 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
41933 else
41934 CFLAGS="$CFLAGS $GCC_OPTION"
41935 fi
41936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41937 /* end confdefs.h. */
41938  
41939 int foo;
41940  
41941 _ACEOF
41942 if ac_fn_c_try_compile "$LINENO"; then :
41943  
41944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41945 $as_echo "yes" >&6; }
41946 can_add_to_cflags=yes
41947 #
41948 # OK, do we have a test program? If so, check
41949 # whether it fails with this option and -Werror,
41950 # and, if so, don't include it.
41951 #
41952 # We test arg 4 here because arg 3 is a program which
41953 # could contain quotes (breaking the comparison).
41954 #
41955 if test "x" != "x" ; then
41956 CFLAGS="$CFLAGS -Werror"
41957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
41958 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
41959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41960 /* end confdefs.h. */
41961  
41962 _ACEOF
41963 if ac_fn_c_try_compile "$LINENO"; then :
41964  
41965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41966 $as_echo "no" >&6; }
41967 #
41968 # Remove "force an error for a warning" options, if we
41969 # added them, by setting CFLAGS to the saved value plus
41970 # just the new option.
41971 #
41972  
41973 if ${WS_CFLAGS+:} false; then :
41974  
41975 case " $WS_CFLAGS " in #(
41976 *" $GCC_OPTION "*) :
41977 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
41978 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
41979 ac_status=$?
41980 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41981 test $ac_status = 0; } ;; #(
41982 *) :
41983  
41984 as_fn_append WS_CFLAGS " $GCC_OPTION"
41985 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
41986 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
41987 ac_status=$?
41988 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
41989 test $ac_status = 0; }
41990 ;;
41991 esac
41992  
41993 else
41994  
41995 WS_CFLAGS=$GCC_OPTION
41996 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
41997 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
41998 ac_status=$?
41999 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42000 test $ac_status = 0; }
42001  
42002 fi
42003  
42004 if test "$CC" = "$CC_FOR_BUILD"; then
42005 #
42006 # We're building the build tools with the same compiler
42007 # with which we're building Wireshark, so add the flags
42008 # to the flags for that compiler as well.
42009 #
42010  
42011 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
42012  
42013 case " $WS_CFLAGS_FOR_BUILD " in #(
42014 *" $GCC_OPTION "*) :
42015 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
42016 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
42017 ac_status=$?
42018 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42019 test $ac_status = 0; } ;; #(
42020 *) :
42021  
42022 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
42023 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
42024 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
42025 ac_status=$?
42026 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42027 test $ac_status = 0; }
42028 ;;
42029 esac
42030  
42031 else
42032  
42033 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
42034 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
42035 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
42036 ac_status=$?
42037 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42038 test $ac_status = 0; }
42039  
42040 fi
42041  
42042 fi
42043  
42044 else
42045  
42046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42047 $as_echo "yes" >&6; }
42048  
42049 fi
42050 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42051 else
42052 #
42053 # Remove "force an error for a warning" options, if we
42054 # added them, by setting CFLAGS to the saved value plus
42055 # just the new option.
42056 #
42057  
42058 if ${WS_CFLAGS+:} false; then :
42059  
42060 case " $WS_CFLAGS " in #(
42061 *" $GCC_OPTION "*) :
42062 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
42063 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
42064 ac_status=$?
42065 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42066 test $ac_status = 0; } ;; #(
42067 *) :
42068  
42069 as_fn_append WS_CFLAGS " $GCC_OPTION"
42070 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
42071 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
42072 ac_status=$?
42073 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42074 test $ac_status = 0; }
42075 ;;
42076 esac
42077  
42078 else
42079  
42080 WS_CFLAGS=$GCC_OPTION
42081 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
42082 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
42083 ac_status=$?
42084 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42085 test $ac_status = 0; }
42086  
42087 fi
42088  
42089 if test "$CC" = "$CC_FOR_BUILD"; then
42090 #
42091 # We're building the build tools with the same compiler
42092 # with which we're building Wireshark, so add the flags
42093 # to the flags for that compiler as well.
42094 #
42095  
42096 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
42097  
42098 case " $WS_CFLAGS_FOR_BUILD " in #(
42099 *" $GCC_OPTION "*) :
42100 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
42101 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
42102 ac_status=$?
42103 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42104 test $ac_status = 0; } ;; #(
42105 *) :
42106  
42107 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
42108 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
42109 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
42110 ac_status=$?
42111 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42112 test $ac_status = 0; }
42113 ;;
42114 esac
42115  
42116 else
42117  
42118 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
42119 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
42120 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
42121 ac_status=$?
42122 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42123 test $ac_status = 0; }
42124  
42125 fi
42126  
42127 fi
42128 fi
42129  
42130 else
42131  
42132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42133 $as_echo "no" >&6; }
42134 can_add_to_cflags=no
42135  
42136 fi
42137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42138  
42139 CPPFLAGS="$ac_ws_CPPLAGS_saved"
42140 CFLAGS="$ac_ws_CFLAGS_saved"
42141 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
42142 LDFLAGS="$ac_ws_LDFLAGS_saved"
42143  
42144 fi
42145 #
42146 # Did we find a C++ compiler?
42147 #
42148 if test "x$CXX" != "x" ; then
42149 #
42150 # Yes. Is this option only for the C compiler?
42151 #
42152 if test "" != C ; then
42153 #
42154 # Not C-only; if this option can be added to the C++ compiler
42155 # options, add it.
42156 #
42157 # If the option begins with "-W", add
42158 # $ac_wireshark_unknown_warning_option_error, as per the above, and
42159 # also add $ac_wireshark_non_cxx_warning_option_error, because at
42160 # lease some versions of g++ whine about -Wmissing-prototypes, the
42161 # fact that at least one of those versions refuses to warn about
42162 # function declarations without an earlier declaration nonwithstanding;
42163 # perhaps there's a reason not to warn about that with C++ even though
42164 # warning about it can be a Good Idea with C, but it's not obvious to
42165 # me).
42166 #
42167 # If the option begins with "-f" or "-m", add -Werror to make sure
42168 # that we'll get an error if we get "argument unused during compilation"
42169 # warnings, as those will either cause a failure for files compiled
42170 # with -Werror or annoying noise for files compiled without it.
42171 # (Yeah, you, clang++.)
42172 #
42173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
42174 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
42175  
42176 ac_ws_CPPLAGS_saved="$CPPFLAGS"
42177 ac_ws_CFLAGS_saved="$CFLAGS"
42178 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
42179 ac_ws_LDFLAGS_saved="$LDFLAGS"
42180 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
42181 CFLAGS="$WS_CFLAGS $CFLAGS"
42182 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
42183 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
42184  
42185 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
42186 then
42187 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
42188 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
42189 then
42190 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
42191 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
42192 then
42193 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
42194 else
42195 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
42196 fi
42197 ac_ext=cpp
42198 ac_cpp='$CXXCPP $CPPFLAGS'
42199 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42200 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42201 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42202  
42203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42204 /* end confdefs.h. */
42205  
42206 int foo;
42207  
42208 _ACEOF
42209 if ac_fn_cxx_try_compile "$LINENO"; then :
42210  
42211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42212 $as_echo "yes" >&6; }
42213 can_add_to_cxxflags=yes
42214 #
42215 # OK, do we have a test program? If so, check
42216 # whether it fails with this option and -Werror,
42217 # and, if so, don't include it.
42218 #
42219 # We test arg 4 here because arg 3 is a program which
42220 # could contain quotes (breaking the comparison).
42221 #
42222 if test "x" != "x" ; then
42223 CXXFLAGS="$CXXFLAGS -Werror"
42224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
42225 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
42226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42227 /* end confdefs.h. */
42228  
42229 _ACEOF
42230 if ac_fn_cxx_try_compile "$LINENO"; then :
42231  
42232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42233 $as_echo "no" >&6; }
42234 #
42235 # Remove "force an error for a warning" options, if we
42236 # added them, by setting CXXFLAGS to the saved value plus
42237 # just the new option.
42238 #
42239  
42240 if ${WS_CXXFLAGS+:} false; then :
42241  
42242 case " $WS_CXXFLAGS " in #(
42243 *" $GCC_OPTION "*) :
42244 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
42245 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
42246 ac_status=$?
42247 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42248 test $ac_status = 0; } ;; #(
42249 *) :
42250  
42251 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
42252 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
42253 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
42254 ac_status=$?
42255 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42256 test $ac_status = 0; }
42257 ;;
42258 esac
42259  
42260 else
42261  
42262 WS_CXXFLAGS=$GCC_OPTION
42263 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
42264 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
42265 ac_status=$?
42266 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42267 test $ac_status = 0; }
42268  
42269 fi
42270  
42271  
42272 else
42273  
42274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42275 $as_echo "yes" >&6; }
42276  
42277 fi
42278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42279 else
42280 #
42281 # Remove "force an error for a warning" options, if we
42282 # added them, by setting CXXFLAGS to the saved value plus
42283 # just the new option.
42284 #
42285  
42286 if ${WS_CXXFLAGS+:} false; then :
42287  
42288 case " $WS_CXXFLAGS " in #(
42289 *" $GCC_OPTION "*) :
42290 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
42291 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
42292 ac_status=$?
42293 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42294 test $ac_status = 0; } ;; #(
42295 *) :
42296  
42297 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
42298 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
42299 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
42300 ac_status=$?
42301 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42302 test $ac_status = 0; }
42303 ;;
42304 esac
42305  
42306 else
42307  
42308 WS_CXXFLAGS=$GCC_OPTION
42309 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
42310 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
42311 ac_status=$?
42312 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42313 test $ac_status = 0; }
42314  
42315 fi
42316  
42317 fi
42318  
42319 else
42320  
42321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42322 $as_echo "no" >&6; }
42323 can_add_to_cxxflags=no
42324  
42325 fi
42326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42327  
42328 CPPFLAGS="$ac_ws_CPPLAGS_saved"
42329 CFLAGS="$ac_ws_CFLAGS_saved"
42330 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
42331 LDFLAGS="$ac_ws_LDFLAGS_saved"
42332  
42333 ac_ext=c
42334 ac_cpp='$CPP $CPPFLAGS'
42335 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42336 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42337 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42338  
42339 fi
42340 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
42341 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
42342 then
42343 #
42344 # Confusingly, some C++ compilers like -Wmissing-prototypes but
42345 # don't like -Wmissing-declarations and others like
42346 # -Wmissing-declarations but don't like -Wmissing-prototypes,
42347 # the fact that the corresponding C compiler likes both. Don't
42348 # warn about them.
42349 #
42350 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
42351 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
42352 then
42353 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
42354 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
42355 fi
42356 fi
42357 fi
42358 fi
42359  
42360 #
42361 # Works only with Clang
42362 #
42363 GCC_OPTION="-Wunreachable-code"
42364 can_add_to_cflags=""
42365 can_add_to_cxxflags=""
42366 if test "x$ac_supports_gcc_flags" = "xyes" ; then
42367 if test "" != CXX ; then
42368 #
42369 # Not C++-only; if this can be added to the C compiler flags, add them.
42370 #
42371 # If the option begins with "-W", add
42372 # $ac_wireshark_unknown_warning_option_error to make sure that
42373 # we'll get an error if it's an unknown warning option; not all
42374 # compilers treat unknown warning options as errors (I'm looking at
42375 # you, clang).
42376 #
42377 # If the option begins with "-f" or "-m", add -Werror to make sure
42378 # that we'll get an error if we get "argument unused during compilation"
42379 # warnings, as those will either cause a failure for files compiled
42380 # with -Werror or annoying noise for files compiled without it.
42381 # (Yeah, you, clang.)
42382 #
42383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
42384 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
42385  
42386 ac_ws_CPPLAGS_saved="$CPPFLAGS"
42387 ac_ws_CFLAGS_saved="$CFLAGS"
42388 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
42389 ac_ws_LDFLAGS_saved="$LDFLAGS"
42390 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
42391 CFLAGS="$WS_CFLAGS $CFLAGS"
42392 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
42393 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
42394  
42395 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
42396 then
42397 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
42398 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
42399 then
42400 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
42401 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
42402 then
42403 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
42404 else
42405 CFLAGS="$CFLAGS $GCC_OPTION"
42406 fi
42407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42408 /* end confdefs.h. */
42409  
42410 int foo;
42411  
42412 _ACEOF
42413 if ac_fn_c_try_compile "$LINENO"; then :
42414  
42415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42416 $as_echo "yes" >&6; }
42417 can_add_to_cflags=yes
42418 #
42419 # OK, do we have a test program? If so, check
42420 # whether it fails with this option and -Werror,
42421 # and, if so, don't include it.
42422 #
42423 # We test arg 4 here because arg 3 is a program which
42424 # could contain quotes (breaking the comparison).
42425 #
42426 if test "x" != "x" ; then
42427 CFLAGS="$CFLAGS -Werror"
42428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
42429 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
42430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42431 /* end confdefs.h. */
42432  
42433 _ACEOF
42434 if ac_fn_c_try_compile "$LINENO"; then :
42435  
42436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42437 $as_echo "no" >&6; }
42438 #
42439 # Remove "force an error for a warning" options, if we
42440 # added them, by setting CFLAGS to the saved value plus
42441 # just the new option.
42442 #
42443  
42444 if ${WS_CFLAGS+:} false; then :
42445  
42446 case " $WS_CFLAGS " in #(
42447 *" $GCC_OPTION "*) :
42448 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
42449 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
42450 ac_status=$?
42451 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42452 test $ac_status = 0; } ;; #(
42453 *) :
42454  
42455 as_fn_append WS_CFLAGS " $GCC_OPTION"
42456 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
42457 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
42458 ac_status=$?
42459 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42460 test $ac_status = 0; }
42461 ;;
42462 esac
42463  
42464 else
42465  
42466 WS_CFLAGS=$GCC_OPTION
42467 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
42468 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
42469 ac_status=$?
42470 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42471 test $ac_status = 0; }
42472  
42473 fi
42474  
42475 if test "$CC" = "$CC_FOR_BUILD"; then
42476 #
42477 # We're building the build tools with the same compiler
42478 # with which we're building Wireshark, so add the flags
42479 # to the flags for that compiler as well.
42480 #
42481  
42482 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
42483  
42484 case " $WS_CFLAGS_FOR_BUILD " in #(
42485 *" $GCC_OPTION "*) :
42486 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
42487 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
42488 ac_status=$?
42489 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42490 test $ac_status = 0; } ;; #(
42491 *) :
42492  
42493 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
42494 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
42495 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
42496 ac_status=$?
42497 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42498 test $ac_status = 0; }
42499 ;;
42500 esac
42501  
42502 else
42503  
42504 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
42505 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
42506 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
42507 ac_status=$?
42508 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42509 test $ac_status = 0; }
42510  
42511 fi
42512  
42513 fi
42514  
42515 else
42516  
42517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42518 $as_echo "yes" >&6; }
42519  
42520 fi
42521 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42522 else
42523 #
42524 # Remove "force an error for a warning" options, if we
42525 # added them, by setting CFLAGS to the saved value plus
42526 # just the new option.
42527 #
42528  
42529 if ${WS_CFLAGS+:} false; then :
42530  
42531 case " $WS_CFLAGS " in #(
42532 *" $GCC_OPTION "*) :
42533 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
42534 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
42535 ac_status=$?
42536 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42537 test $ac_status = 0; } ;; #(
42538 *) :
42539  
42540 as_fn_append WS_CFLAGS " $GCC_OPTION"
42541 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
42542 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
42543 ac_status=$?
42544 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42545 test $ac_status = 0; }
42546 ;;
42547 esac
42548  
42549 else
42550  
42551 WS_CFLAGS=$GCC_OPTION
42552 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
42553 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
42554 ac_status=$?
42555 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42556 test $ac_status = 0; }
42557  
42558 fi
42559  
42560 if test "$CC" = "$CC_FOR_BUILD"; then
42561 #
42562 # We're building the build tools with the same compiler
42563 # with which we're building Wireshark, so add the flags
42564 # to the flags for that compiler as well.
42565 #
42566  
42567 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
42568  
42569 case " $WS_CFLAGS_FOR_BUILD " in #(
42570 *" $GCC_OPTION "*) :
42571 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
42572 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
42573 ac_status=$?
42574 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42575 test $ac_status = 0; } ;; #(
42576 *) :
42577  
42578 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
42579 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
42580 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
42581 ac_status=$?
42582 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42583 test $ac_status = 0; }
42584 ;;
42585 esac
42586  
42587 else
42588  
42589 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
42590 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
42591 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
42592 ac_status=$?
42593 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42594 test $ac_status = 0; }
42595  
42596 fi
42597  
42598 fi
42599 fi
42600  
42601 else
42602  
42603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42604 $as_echo "no" >&6; }
42605 can_add_to_cflags=no
42606  
42607 fi
42608 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42609  
42610 CPPFLAGS="$ac_ws_CPPLAGS_saved"
42611 CFLAGS="$ac_ws_CFLAGS_saved"
42612 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
42613 LDFLAGS="$ac_ws_LDFLAGS_saved"
42614  
42615 fi
42616 #
42617 # Did we find a C++ compiler?
42618 #
42619 if test "x$CXX" != "x" ; then
42620 #
42621 # Yes. Is this option only for the C compiler?
42622 #
42623 if test "" != C ; then
42624 #
42625 # Not C-only; if this option can be added to the C++ compiler
42626 # options, add it.
42627 #
42628 # If the option begins with "-W", add
42629 # $ac_wireshark_unknown_warning_option_error, as per the above, and
42630 # also add $ac_wireshark_non_cxx_warning_option_error, because at
42631 # lease some versions of g++ whine about -Wmissing-prototypes, the
42632 # fact that at least one of those versions refuses to warn about
42633 # function declarations without an earlier declaration nonwithstanding;
42634 # perhaps there's a reason not to warn about that with C++ even though
42635 # warning about it can be a Good Idea with C, but it's not obvious to
42636 # me).
42637 #
42638 # If the option begins with "-f" or "-m", add -Werror to make sure
42639 # that we'll get an error if we get "argument unused during compilation"
42640 # warnings, as those will either cause a failure for files compiled
42641 # with -Werror or annoying noise for files compiled without it.
42642 # (Yeah, you, clang++.)
42643 #
42644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
42645 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
42646  
42647 ac_ws_CPPLAGS_saved="$CPPFLAGS"
42648 ac_ws_CFLAGS_saved="$CFLAGS"
42649 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
42650 ac_ws_LDFLAGS_saved="$LDFLAGS"
42651 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
42652 CFLAGS="$WS_CFLAGS $CFLAGS"
42653 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
42654 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
42655  
42656 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
42657 then
42658 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
42659 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
42660 then
42661 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
42662 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
42663 then
42664 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
42665 else
42666 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
42667 fi
42668 ac_ext=cpp
42669 ac_cpp='$CXXCPP $CPPFLAGS'
42670 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42671 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42672 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42673  
42674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42675 /* end confdefs.h. */
42676  
42677 int foo;
42678  
42679 _ACEOF
42680 if ac_fn_cxx_try_compile "$LINENO"; then :
42681  
42682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42683 $as_echo "yes" >&6; }
42684 can_add_to_cxxflags=yes
42685 #
42686 # OK, do we have a test program? If so, check
42687 # whether it fails with this option and -Werror,
42688 # and, if so, don't include it.
42689 #
42690 # We test arg 4 here because arg 3 is a program which
42691 # could contain quotes (breaking the comparison).
42692 #
42693 if test "x" != "x" ; then
42694 CXXFLAGS="$CXXFLAGS -Werror"
42695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
42696 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
42697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42698 /* end confdefs.h. */
42699  
42700 _ACEOF
42701 if ac_fn_cxx_try_compile "$LINENO"; then :
42702  
42703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42704 $as_echo "no" >&6; }
42705 #
42706 # Remove "force an error for a warning" options, if we
42707 # added them, by setting CXXFLAGS to the saved value plus
42708 # just the new option.
42709 #
42710  
42711 if ${WS_CXXFLAGS+:} false; then :
42712  
42713 case " $WS_CXXFLAGS " in #(
42714 *" $GCC_OPTION "*) :
42715 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
42716 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
42717 ac_status=$?
42718 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42719 test $ac_status = 0; } ;; #(
42720 *) :
42721  
42722 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
42723 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
42724 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
42725 ac_status=$?
42726 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42727 test $ac_status = 0; }
42728 ;;
42729 esac
42730  
42731 else
42732  
42733 WS_CXXFLAGS=$GCC_OPTION
42734 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
42735 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
42736 ac_status=$?
42737 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42738 test $ac_status = 0; }
42739  
42740 fi
42741  
42742  
42743 else
42744  
42745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42746 $as_echo "yes" >&6; }
42747  
42748 fi
42749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42750 else
42751 #
42752 # Remove "force an error for a warning" options, if we
42753 # added them, by setting CXXFLAGS to the saved value plus
42754 # just the new option.
42755 #
42756  
42757 if ${WS_CXXFLAGS+:} false; then :
42758  
42759 case " $WS_CXXFLAGS " in #(
42760 *" $GCC_OPTION "*) :
42761 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
42762 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
42763 ac_status=$?
42764 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42765 test $ac_status = 0; } ;; #(
42766 *) :
42767  
42768 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
42769 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
42770 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
42771 ac_status=$?
42772 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42773 test $ac_status = 0; }
42774 ;;
42775 esac
42776  
42777 else
42778  
42779 WS_CXXFLAGS=$GCC_OPTION
42780 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
42781 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
42782 ac_status=$?
42783 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42784 test $ac_status = 0; }
42785  
42786 fi
42787  
42788 fi
42789  
42790 else
42791  
42792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42793 $as_echo "no" >&6; }
42794 can_add_to_cxxflags=no
42795  
42796 fi
42797 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42798  
42799 CPPFLAGS="$ac_ws_CPPLAGS_saved"
42800 CFLAGS="$ac_ws_CFLAGS_saved"
42801 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
42802 LDFLAGS="$ac_ws_LDFLAGS_saved"
42803  
42804 ac_ext=c
42805 ac_cpp='$CPP $CPPFLAGS'
42806 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42807 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42808 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42809  
42810 fi
42811 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
42812 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
42813 then
42814 #
42815 # Confusingly, some C++ compilers like -Wmissing-prototypes but
42816 # don't like -Wmissing-declarations and others like
42817 # -Wmissing-declarations but don't like -Wmissing-prototypes,
42818 # the fact that the corresponding C compiler likes both. Don't
42819 # warn about them.
42820 #
42821 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
42822 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
42823 then
42824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
42825 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
42826 fi
42827 fi
42828 fi
42829 fi
42830  
42831 #
42832 # Works only with Clang but generates a lot of warnings
42833 # (about glib library not using Doxygen)
42834 #
42835 GCC_OPTION="-Wdocumentation"
42836 can_add_to_cflags=""
42837 can_add_to_cxxflags=""
42838 if test "x$ac_supports_gcc_flags" = "xyes" ; then
42839 if test "" != CXX ; then
42840 #
42841 # Not C++-only; if this can be added to the C compiler flags, add them.
42842 #
42843 # If the option begins with "-W", add
42844 # $ac_wireshark_unknown_warning_option_error to make sure that
42845 # we'll get an error if it's an unknown warning option; not all
42846 # compilers treat unknown warning options as errors (I'm looking at
42847 # you, clang).
42848 #
42849 # If the option begins with "-f" or "-m", add -Werror to make sure
42850 # that we'll get an error if we get "argument unused during compilation"
42851 # warnings, as those will either cause a failure for files compiled
42852 # with -Werror or annoying noise for files compiled without it.
42853 # (Yeah, you, clang.)
42854 #
42855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
42856 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
42857  
42858 ac_ws_CPPLAGS_saved="$CPPFLAGS"
42859 ac_ws_CFLAGS_saved="$CFLAGS"
42860 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
42861 ac_ws_LDFLAGS_saved="$LDFLAGS"
42862 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
42863 CFLAGS="$WS_CFLAGS $CFLAGS"
42864 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
42865 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
42866  
42867 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
42868 then
42869 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
42870 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
42871 then
42872 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
42873 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
42874 then
42875 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
42876 else
42877 CFLAGS="$CFLAGS $GCC_OPTION"
42878 fi
42879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42880 /* end confdefs.h. */
42881  
42882 int foo;
42883  
42884 _ACEOF
42885 if ac_fn_c_try_compile "$LINENO"; then :
42886  
42887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42888 $as_echo "yes" >&6; }
42889 can_add_to_cflags=yes
42890 #
42891 # OK, do we have a test program? If so, check
42892 # whether it fails with this option and -Werror,
42893 # and, if so, don't include it.
42894 #
42895 # We test arg 4 here because arg 3 is a program which
42896 # could contain quotes (breaking the comparison).
42897 #
42898 if test "x" != "x" ; then
42899 CFLAGS="$CFLAGS -Werror"
42900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
42901 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
42902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42903 /* end confdefs.h. */
42904  
42905 _ACEOF
42906 if ac_fn_c_try_compile "$LINENO"; then :
42907  
42908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42909 $as_echo "no" >&6; }
42910 #
42911 # Remove "force an error for a warning" options, if we
42912 # added them, by setting CFLAGS to the saved value plus
42913 # just the new option.
42914 #
42915  
42916 if ${WS_CFLAGS+:} false; then :
42917  
42918 case " $WS_CFLAGS " in #(
42919 *" $GCC_OPTION "*) :
42920 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
42921 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
42922 ac_status=$?
42923 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42924 test $ac_status = 0; } ;; #(
42925 *) :
42926  
42927 as_fn_append WS_CFLAGS " $GCC_OPTION"
42928 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
42929 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
42930 ac_status=$?
42931 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42932 test $ac_status = 0; }
42933 ;;
42934 esac
42935  
42936 else
42937  
42938 WS_CFLAGS=$GCC_OPTION
42939 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
42940 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
42941 ac_status=$?
42942 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42943 test $ac_status = 0; }
42944  
42945 fi
42946  
42947 if test "$CC" = "$CC_FOR_BUILD"; then
42948 #
42949 # We're building the build tools with the same compiler
42950 # with which we're building Wireshark, so add the flags
42951 # to the flags for that compiler as well.
42952 #
42953  
42954 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
42955  
42956 case " $WS_CFLAGS_FOR_BUILD " in #(
42957 *" $GCC_OPTION "*) :
42958 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
42959 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
42960 ac_status=$?
42961 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42962 test $ac_status = 0; } ;; #(
42963 *) :
42964  
42965 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
42966 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
42967 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
42968 ac_status=$?
42969 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42970 test $ac_status = 0; }
42971 ;;
42972 esac
42973  
42974 else
42975  
42976 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
42977 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
42978 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
42979 ac_status=$?
42980 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42981 test $ac_status = 0; }
42982  
42983 fi
42984  
42985 fi
42986  
42987 else
42988  
42989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42990 $as_echo "yes" >&6; }
42991  
42992 fi
42993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42994 else
42995 #
42996 # Remove "force an error for a warning" options, if we
42997 # added them, by setting CFLAGS to the saved value plus
42998 # just the new option.
42999 #
43000  
43001 if ${WS_CFLAGS+:} false; then :
43002  
43003 case " $WS_CFLAGS " in #(
43004 *" $GCC_OPTION "*) :
43005 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
43006 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
43007 ac_status=$?
43008 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43009 test $ac_status = 0; } ;; #(
43010 *) :
43011  
43012 as_fn_append WS_CFLAGS " $GCC_OPTION"
43013 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
43014 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
43015 ac_status=$?
43016 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43017 test $ac_status = 0; }
43018 ;;
43019 esac
43020  
43021 else
43022  
43023 WS_CFLAGS=$GCC_OPTION
43024 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
43025 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
43026 ac_status=$?
43027 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43028 test $ac_status = 0; }
43029  
43030 fi
43031  
43032 if test "$CC" = "$CC_FOR_BUILD"; then
43033 #
43034 # We're building the build tools with the same compiler
43035 # with which we're building Wireshark, so add the flags
43036 # to the flags for that compiler as well.
43037 #
43038  
43039 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
43040  
43041 case " $WS_CFLAGS_FOR_BUILD " in #(
43042 *" $GCC_OPTION "*) :
43043 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
43044 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
43045 ac_status=$?
43046 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43047 test $ac_status = 0; } ;; #(
43048 *) :
43049  
43050 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
43051 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
43052 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
43053 ac_status=$?
43054 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43055 test $ac_status = 0; }
43056 ;;
43057 esac
43058  
43059 else
43060  
43061 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
43062 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
43063 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
43064 ac_status=$?
43065 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43066 test $ac_status = 0; }
43067  
43068 fi
43069  
43070 fi
43071 fi
43072  
43073 else
43074  
43075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43076 $as_echo "no" >&6; }
43077 can_add_to_cflags=no
43078  
43079 fi
43080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43081  
43082 CPPFLAGS="$ac_ws_CPPLAGS_saved"
43083 CFLAGS="$ac_ws_CFLAGS_saved"
43084 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
43085 LDFLAGS="$ac_ws_LDFLAGS_saved"
43086  
43087 fi
43088 #
43089 # Did we find a C++ compiler?
43090 #
43091 if test "x$CXX" != "x" ; then
43092 #
43093 # Yes. Is this option only for the C compiler?
43094 #
43095 if test "" != C ; then
43096 #
43097 # Not C-only; if this option can be added to the C++ compiler
43098 # options, add it.
43099 #
43100 # If the option begins with "-W", add
43101 # $ac_wireshark_unknown_warning_option_error, as per the above, and
43102 # also add $ac_wireshark_non_cxx_warning_option_error, because at
43103 # lease some versions of g++ whine about -Wmissing-prototypes, the
43104 # fact that at least one of those versions refuses to warn about
43105 # function declarations without an earlier declaration nonwithstanding;
43106 # perhaps there's a reason not to warn about that with C++ even though
43107 # warning about it can be a Good Idea with C, but it's not obvious to
43108 # me).
43109 #
43110 # If the option begins with "-f" or "-m", add -Werror to make sure
43111 # that we'll get an error if we get "argument unused during compilation"
43112 # warnings, as those will either cause a failure for files compiled
43113 # with -Werror or annoying noise for files compiled without it.
43114 # (Yeah, you, clang++.)
43115 #
43116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
43117 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
43118  
43119 ac_ws_CPPLAGS_saved="$CPPFLAGS"
43120 ac_ws_CFLAGS_saved="$CFLAGS"
43121 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
43122 ac_ws_LDFLAGS_saved="$LDFLAGS"
43123 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
43124 CFLAGS="$WS_CFLAGS $CFLAGS"
43125 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
43126 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
43127  
43128 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
43129 then
43130 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
43131 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
43132 then
43133 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
43134 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
43135 then
43136 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
43137 else
43138 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
43139 fi
43140 ac_ext=cpp
43141 ac_cpp='$CXXCPP $CPPFLAGS'
43142 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43143 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43144 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43145  
43146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43147 /* end confdefs.h. */
43148  
43149 int foo;
43150  
43151 _ACEOF
43152 if ac_fn_cxx_try_compile "$LINENO"; then :
43153  
43154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43155 $as_echo "yes" >&6; }
43156 can_add_to_cxxflags=yes
43157 #
43158 # OK, do we have a test program? If so, check
43159 # whether it fails with this option and -Werror,
43160 # and, if so, don't include it.
43161 #
43162 # We test arg 4 here because arg 3 is a program which
43163 # could contain quotes (breaking the comparison).
43164 #
43165 if test "x" != "x" ; then
43166 CXXFLAGS="$CXXFLAGS -Werror"
43167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
43168 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
43169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43170 /* end confdefs.h. */
43171  
43172 _ACEOF
43173 if ac_fn_cxx_try_compile "$LINENO"; then :
43174  
43175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43176 $as_echo "no" >&6; }
43177 #
43178 # Remove "force an error for a warning" options, if we
43179 # added them, by setting CXXFLAGS to the saved value plus
43180 # just the new option.
43181 #
43182  
43183 if ${WS_CXXFLAGS+:} false; then :
43184  
43185 case " $WS_CXXFLAGS " in #(
43186 *" $GCC_OPTION "*) :
43187 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
43188 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
43189 ac_status=$?
43190 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43191 test $ac_status = 0; } ;; #(
43192 *) :
43193  
43194 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
43195 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
43196 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
43197 ac_status=$?
43198 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43199 test $ac_status = 0; }
43200 ;;
43201 esac
43202  
43203 else
43204  
43205 WS_CXXFLAGS=$GCC_OPTION
43206 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
43207 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
43208 ac_status=$?
43209 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43210 test $ac_status = 0; }
43211  
43212 fi
43213  
43214  
43215 else
43216  
43217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43218 $as_echo "yes" >&6; }
43219  
43220 fi
43221 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43222 else
43223 #
43224 # Remove "force an error for a warning" options, if we
43225 # added them, by setting CXXFLAGS to the saved value plus
43226 # just the new option.
43227 #
43228  
43229 if ${WS_CXXFLAGS+:} false; then :
43230  
43231 case " $WS_CXXFLAGS " in #(
43232 *" $GCC_OPTION "*) :
43233 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
43234 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
43235 ac_status=$?
43236 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43237 test $ac_status = 0; } ;; #(
43238 *) :
43239  
43240 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
43241 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
43242 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
43243 ac_status=$?
43244 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43245 test $ac_status = 0; }
43246 ;;
43247 esac
43248  
43249 else
43250  
43251 WS_CXXFLAGS=$GCC_OPTION
43252 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
43253 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
43254 ac_status=$?
43255 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43256 test $ac_status = 0; }
43257  
43258 fi
43259  
43260 fi
43261  
43262 else
43263  
43264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43265 $as_echo "no" >&6; }
43266 can_add_to_cxxflags=no
43267  
43268 fi
43269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43270  
43271 CPPFLAGS="$ac_ws_CPPLAGS_saved"
43272 CFLAGS="$ac_ws_CFLAGS_saved"
43273 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
43274 LDFLAGS="$ac_ws_LDFLAGS_saved"
43275  
43276 ac_ext=c
43277 ac_cpp='$CPP $CPPFLAGS'
43278 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43279 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43280 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43281  
43282 fi
43283 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
43284 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
43285 then
43286 #
43287 # Confusingly, some C++ compilers like -Wmissing-prototypes but
43288 # don't like -Wmissing-declarations and others like
43289 # -Wmissing-declarations but don't like -Wmissing-prototypes,
43290 # the fact that the corresponding C compiler likes both. Don't
43291 # warn about them.
43292 #
43293 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
43294 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
43295 then
43296 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
43297 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
43298 fi
43299 fi
43300 fi
43301 fi
43302  
43303  
43304 #
43305 # The following are C only, not C++
43306 #
43307 # Due to various places where APIs we don't control
43308 # require us to cast away constness, we can probably
43309 # never enable this one with -Werror.
43310 #
43311 GCC_OPTION="-Wbad-function-cast"
43312 can_add_to_cflags=""
43313 can_add_to_cxxflags=""
43314 if test "x$ac_supports_gcc_flags" = "xyes" ; then
43315 if test "C" != CXX ; then
43316 #
43317 # Not C++-only; if this can be added to the C compiler flags, add them.
43318 #
43319 # If the option begins with "-W", add
43320 # $ac_wireshark_unknown_warning_option_error to make sure that
43321 # we'll get an error if it's an unknown warning option; not all
43322 # compilers treat unknown warning options as errors (I'm looking at
43323 # you, clang).
43324 #
43325 # If the option begins with "-f" or "-m", add -Werror to make sure
43326 # that we'll get an error if we get "argument unused during compilation"
43327 # warnings, as those will either cause a failure for files compiled
43328 # with -Werror or annoying noise for files compiled without it.
43329 # (Yeah, you, clang.)
43330 #
43331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
43332 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
43333  
43334 ac_ws_CPPLAGS_saved="$CPPFLAGS"
43335 ac_ws_CFLAGS_saved="$CFLAGS"
43336 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
43337 ac_ws_LDFLAGS_saved="$LDFLAGS"
43338 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
43339 CFLAGS="$WS_CFLAGS $CFLAGS"
43340 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
43341 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
43342  
43343 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
43344 then
43345 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
43346 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
43347 then
43348 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
43349 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
43350 then
43351 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
43352 else
43353 CFLAGS="$CFLAGS $GCC_OPTION"
43354 fi
43355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43356 /* end confdefs.h. */
43357  
43358 int foo;
43359  
43360 _ACEOF
43361 if ac_fn_c_try_compile "$LINENO"; then :
43362  
43363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43364 $as_echo "yes" >&6; }
43365 can_add_to_cflags=yes
43366 #
43367 # OK, do we have a test program? If so, check
43368 # whether it fails with this option and -Werror,
43369 # and, if so, don't include it.
43370 #
43371 # We test arg 4 here because arg 3 is a program which
43372 # could contain quotes (breaking the comparison).
43373 #
43374 if test "x" != "x" ; then
43375 CFLAGS="$CFLAGS -Werror"
43376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
43377 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
43378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43379 /* end confdefs.h. */
43380  
43381 _ACEOF
43382 if ac_fn_c_try_compile "$LINENO"; then :
43383  
43384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43385 $as_echo "no" >&6; }
43386 #
43387 # Remove "force an error for a warning" options, if we
43388 # added them, by setting CFLAGS to the saved value plus
43389 # just the new option.
43390 #
43391  
43392 if ${WS_CFLAGS+:} false; then :
43393  
43394 case " $WS_CFLAGS " in #(
43395 *" $GCC_OPTION "*) :
43396 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
43397 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
43398 ac_status=$?
43399 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43400 test $ac_status = 0; } ;; #(
43401 *) :
43402  
43403 as_fn_append WS_CFLAGS " $GCC_OPTION"
43404 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
43405 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
43406 ac_status=$?
43407 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43408 test $ac_status = 0; }
43409 ;;
43410 esac
43411  
43412 else
43413  
43414 WS_CFLAGS=$GCC_OPTION
43415 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
43416 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
43417 ac_status=$?
43418 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43419 test $ac_status = 0; }
43420  
43421 fi
43422  
43423 if test "$CC" = "$CC_FOR_BUILD"; then
43424 #
43425 # We're building the build tools with the same compiler
43426 # with which we're building Wireshark, so add the flags
43427 # to the flags for that compiler as well.
43428 #
43429  
43430 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
43431  
43432 case " $WS_CFLAGS_FOR_BUILD " in #(
43433 *" $GCC_OPTION "*) :
43434 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
43435 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
43436 ac_status=$?
43437 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43438 test $ac_status = 0; } ;; #(
43439 *) :
43440  
43441 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
43442 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
43443 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
43444 ac_status=$?
43445 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43446 test $ac_status = 0; }
43447 ;;
43448 esac
43449  
43450 else
43451  
43452 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
43453 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
43454 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
43455 ac_status=$?
43456 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43457 test $ac_status = 0; }
43458  
43459 fi
43460  
43461 fi
43462  
43463 else
43464  
43465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43466 $as_echo "yes" >&6; }
43467  
43468 fi
43469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43470 else
43471 #
43472 # Remove "force an error for a warning" options, if we
43473 # added them, by setting CFLAGS to the saved value plus
43474 # just the new option.
43475 #
43476  
43477 if ${WS_CFLAGS+:} false; then :
43478  
43479 case " $WS_CFLAGS " in #(
43480 *" $GCC_OPTION "*) :
43481 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
43482 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
43483 ac_status=$?
43484 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43485 test $ac_status = 0; } ;; #(
43486 *) :
43487  
43488 as_fn_append WS_CFLAGS " $GCC_OPTION"
43489 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
43490 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
43491 ac_status=$?
43492 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43493 test $ac_status = 0; }
43494 ;;
43495 esac
43496  
43497 else
43498  
43499 WS_CFLAGS=$GCC_OPTION
43500 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
43501 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
43502 ac_status=$?
43503 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43504 test $ac_status = 0; }
43505  
43506 fi
43507  
43508 if test "$CC" = "$CC_FOR_BUILD"; then
43509 #
43510 # We're building the build tools with the same compiler
43511 # with which we're building Wireshark, so add the flags
43512 # to the flags for that compiler as well.
43513 #
43514  
43515 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
43516  
43517 case " $WS_CFLAGS_FOR_BUILD " in #(
43518 *" $GCC_OPTION "*) :
43519 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
43520 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
43521 ac_status=$?
43522 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43523 test $ac_status = 0; } ;; #(
43524 *) :
43525  
43526 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
43527 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
43528 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
43529 ac_status=$?
43530 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43531 test $ac_status = 0; }
43532 ;;
43533 esac
43534  
43535 else
43536  
43537 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
43538 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
43539 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
43540 ac_status=$?
43541 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43542 test $ac_status = 0; }
43543  
43544 fi
43545  
43546 fi
43547 fi
43548  
43549 else
43550  
43551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43552 $as_echo "no" >&6; }
43553 can_add_to_cflags=no
43554  
43555 fi
43556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43557  
43558 CPPFLAGS="$ac_ws_CPPLAGS_saved"
43559 CFLAGS="$ac_ws_CFLAGS_saved"
43560 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
43561 LDFLAGS="$ac_ws_LDFLAGS_saved"
43562  
43563 fi
43564 #
43565 # Did we find a C++ compiler?
43566 #
43567 if test "x$CXX" != "x" ; then
43568 #
43569 # Yes. Is this option only for the C compiler?
43570 #
43571 if test "C" != C ; then
43572 #
43573 # Not C-only; if this option can be added to the C++ compiler
43574 # options, add it.
43575 #
43576 # If the option begins with "-W", add
43577 # $ac_wireshark_unknown_warning_option_error, as per the above, and
43578 # also add $ac_wireshark_non_cxx_warning_option_error, because at
43579 # lease some versions of g++ whine about -Wmissing-prototypes, the
43580 # fact that at least one of those versions refuses to warn about
43581 # function declarations without an earlier declaration nonwithstanding;
43582 # perhaps there's a reason not to warn about that with C++ even though
43583 # warning about it can be a Good Idea with C, but it's not obvious to
43584 # me).
43585 #
43586 # If the option begins with "-f" or "-m", add -Werror to make sure
43587 # that we'll get an error if we get "argument unused during compilation"
43588 # warnings, as those will either cause a failure for files compiled
43589 # with -Werror or annoying noise for files compiled without it.
43590 # (Yeah, you, clang++.)
43591 #
43592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
43593 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
43594  
43595 ac_ws_CPPLAGS_saved="$CPPFLAGS"
43596 ac_ws_CFLAGS_saved="$CFLAGS"
43597 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
43598 ac_ws_LDFLAGS_saved="$LDFLAGS"
43599 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
43600 CFLAGS="$WS_CFLAGS $CFLAGS"
43601 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
43602 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
43603  
43604 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
43605 then
43606 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
43607 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
43608 then
43609 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
43610 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
43611 then
43612 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
43613 else
43614 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
43615 fi
43616 ac_ext=cpp
43617 ac_cpp='$CXXCPP $CPPFLAGS'
43618 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43619 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43620 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43621  
43622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43623 /* end confdefs.h. */
43624  
43625 int foo;
43626  
43627 _ACEOF
43628 if ac_fn_cxx_try_compile "$LINENO"; then :
43629  
43630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43631 $as_echo "yes" >&6; }
43632 can_add_to_cxxflags=yes
43633 #
43634 # OK, do we have a test program? If so, check
43635 # whether it fails with this option and -Werror,
43636 # and, if so, don't include it.
43637 #
43638 # We test arg 4 here because arg 3 is a program which
43639 # could contain quotes (breaking the comparison).
43640 #
43641 if test "x" != "x" ; then
43642 CXXFLAGS="$CXXFLAGS -Werror"
43643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
43644 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
43645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43646 /* end confdefs.h. */
43647  
43648 _ACEOF
43649 if ac_fn_cxx_try_compile "$LINENO"; then :
43650  
43651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43652 $as_echo "no" >&6; }
43653 #
43654 # Remove "force an error for a warning" options, if we
43655 # added them, by setting CXXFLAGS to the saved value plus
43656 # just the new option.
43657 #
43658  
43659 if ${WS_CXXFLAGS+:} false; then :
43660  
43661 case " $WS_CXXFLAGS " in #(
43662 *" $GCC_OPTION "*) :
43663 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
43664 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
43665 ac_status=$?
43666 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43667 test $ac_status = 0; } ;; #(
43668 *) :
43669  
43670 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
43671 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
43672 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
43673 ac_status=$?
43674 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43675 test $ac_status = 0; }
43676 ;;
43677 esac
43678  
43679 else
43680  
43681 WS_CXXFLAGS=$GCC_OPTION
43682 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
43683 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
43684 ac_status=$?
43685 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43686 test $ac_status = 0; }
43687  
43688 fi
43689  
43690  
43691 else
43692  
43693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43694 $as_echo "yes" >&6; }
43695  
43696 fi
43697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43698 else
43699 #
43700 # Remove "force an error for a warning" options, if we
43701 # added them, by setting CXXFLAGS to the saved value plus
43702 # just the new option.
43703 #
43704  
43705 if ${WS_CXXFLAGS+:} false; then :
43706  
43707 case " $WS_CXXFLAGS " in #(
43708 *" $GCC_OPTION "*) :
43709 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
43710 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
43711 ac_status=$?
43712 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43713 test $ac_status = 0; } ;; #(
43714 *) :
43715  
43716 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
43717 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
43718 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
43719 ac_status=$?
43720 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43721 test $ac_status = 0; }
43722 ;;
43723 esac
43724  
43725 else
43726  
43727 WS_CXXFLAGS=$GCC_OPTION
43728 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
43729 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
43730 ac_status=$?
43731 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43732 test $ac_status = 0; }
43733  
43734 fi
43735  
43736 fi
43737  
43738 else
43739  
43740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43741 $as_echo "no" >&6; }
43742 can_add_to_cxxflags=no
43743  
43744 fi
43745 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43746  
43747 CPPFLAGS="$ac_ws_CPPLAGS_saved"
43748 CFLAGS="$ac_ws_CFLAGS_saved"
43749 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
43750 LDFLAGS="$ac_ws_LDFLAGS_saved"
43751  
43752 ac_ext=c
43753 ac_cpp='$CPP $CPPFLAGS'
43754 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43755 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43756 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43757  
43758 fi
43759 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
43760 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
43761 then
43762 #
43763 # Confusingly, some C++ compilers like -Wmissing-prototypes but
43764 # don't like -Wmissing-declarations and others like
43765 # -Wmissing-declarations but don't like -Wmissing-prototypes,
43766 # the fact that the corresponding C compiler likes both. Don't
43767 # warn about them.
43768 #
43769 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
43770 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
43771 then
43772 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
43773 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
43774 fi
43775 fi
43776 fi
43777 fi
43778  
43779 fi
43780  
43781 fi
43782  
43783  
43784 # Try to add ASAN address analyze.
43785 # Only needed for analyse
43786 #
43787 # Check whether --enable-asan was given.
43788 if test "${enable_asan+set}" = set; then :
43789 enableval=$enable_asan;
43790 #
43791 # With Clang >= 3.5 Leak detection is enable by default
43792 # and no yet all leak is fixed...
43793 # use ASAN_OPTIONS=detect_leaks=0 to disable detect_leaks
43794 #
43795 # XXX shouldn't this also be added to LDFLAGS?
43796 GCC_OPTION="-fsanitize=address"
43797 can_add_to_cflags=""
43798 can_add_to_cxxflags=""
43799 if test "x$ac_supports_gcc_flags" = "xyes" ; then
43800 if test "" != CXX ; then
43801 #
43802 # Not C++-only; if this can be added to the C compiler flags, add them.
43803 #
43804 # If the option begins with "-W", add
43805 # $ac_wireshark_unknown_warning_option_error to make sure that
43806 # we'll get an error if it's an unknown warning option; not all
43807 # compilers treat unknown warning options as errors (I'm looking at
43808 # you, clang).
43809 #
43810 # If the option begins with "-f" or "-m", add -Werror to make sure
43811 # that we'll get an error if we get "argument unused during compilation"
43812 # warnings, as those will either cause a failure for files compiled
43813 # with -Werror or annoying noise for files compiled without it.
43814 # (Yeah, you, clang.)
43815 #
43816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
43817 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
43818  
43819 ac_ws_CPPLAGS_saved="$CPPFLAGS"
43820 ac_ws_CFLAGS_saved="$CFLAGS"
43821 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
43822 ac_ws_LDFLAGS_saved="$LDFLAGS"
43823 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
43824 CFLAGS="$WS_CFLAGS $CFLAGS"
43825 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
43826 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
43827  
43828 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
43829 then
43830 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
43831 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
43832 then
43833 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
43834 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
43835 then
43836 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
43837 else
43838 CFLAGS="$CFLAGS $GCC_OPTION"
43839 fi
43840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43841 /* end confdefs.h. */
43842  
43843 int foo;
43844  
43845 _ACEOF
43846 if ac_fn_c_try_compile "$LINENO"; then :
43847  
43848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43849 $as_echo "yes" >&6; }
43850 can_add_to_cflags=yes
43851 #
43852 # OK, do we have a test program? If so, check
43853 # whether it fails with this option and -Werror,
43854 # and, if so, don't include it.
43855 #
43856 # We test arg 4 here because arg 3 is a program which
43857 # could contain quotes (breaking the comparison).
43858 #
43859 if test "x" != "x" ; then
43860 CFLAGS="$CFLAGS -Werror"
43861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
43862 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
43863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43864 /* end confdefs.h. */
43865  
43866 _ACEOF
43867 if ac_fn_c_try_compile "$LINENO"; then :
43868  
43869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43870 $as_echo "no" >&6; }
43871 #
43872 # Remove "force an error for a warning" options, if we
43873 # added them, by setting CFLAGS to the saved value plus
43874 # just the new option.
43875 #
43876  
43877 if ${WS_CFLAGS+:} false; then :
43878  
43879 case " $WS_CFLAGS " in #(
43880 *" $GCC_OPTION "*) :
43881 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
43882 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
43883 ac_status=$?
43884 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43885 test $ac_status = 0; } ;; #(
43886 *) :
43887  
43888 as_fn_append WS_CFLAGS " $GCC_OPTION"
43889 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
43890 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
43891 ac_status=$?
43892 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43893 test $ac_status = 0; }
43894 ;;
43895 esac
43896  
43897 else
43898  
43899 WS_CFLAGS=$GCC_OPTION
43900 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
43901 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
43902 ac_status=$?
43903 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43904 test $ac_status = 0; }
43905  
43906 fi
43907  
43908 if test "$CC" = "$CC_FOR_BUILD"; then
43909 #
43910 # We're building the build tools with the same compiler
43911 # with which we're building Wireshark, so add the flags
43912 # to the flags for that compiler as well.
43913 #
43914  
43915 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
43916  
43917 case " $WS_CFLAGS_FOR_BUILD " in #(
43918 *" $GCC_OPTION "*) :
43919 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
43920 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
43921 ac_status=$?
43922 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43923 test $ac_status = 0; } ;; #(
43924 *) :
43925  
43926 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
43927 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
43928 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
43929 ac_status=$?
43930 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43931 test $ac_status = 0; }
43932 ;;
43933 esac
43934  
43935 else
43936  
43937 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
43938 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
43939 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
43940 ac_status=$?
43941 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43942 test $ac_status = 0; }
43943  
43944 fi
43945  
43946 fi
43947  
43948 else
43949  
43950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43951 $as_echo "yes" >&6; }
43952  
43953 fi
43954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43955 else
43956 #
43957 # Remove "force an error for a warning" options, if we
43958 # added them, by setting CFLAGS to the saved value plus
43959 # just the new option.
43960 #
43961  
43962 if ${WS_CFLAGS+:} false; then :
43963  
43964 case " $WS_CFLAGS " in #(
43965 *" $GCC_OPTION "*) :
43966 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
43967 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
43968 ac_status=$?
43969 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43970 test $ac_status = 0; } ;; #(
43971 *) :
43972  
43973 as_fn_append WS_CFLAGS " $GCC_OPTION"
43974 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
43975 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
43976 ac_status=$?
43977 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43978 test $ac_status = 0; }
43979 ;;
43980 esac
43981  
43982 else
43983  
43984 WS_CFLAGS=$GCC_OPTION
43985 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
43986 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
43987 ac_status=$?
43988 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43989 test $ac_status = 0; }
43990  
43991 fi
43992  
43993 if test "$CC" = "$CC_FOR_BUILD"; then
43994 #
43995 # We're building the build tools with the same compiler
43996 # with which we're building Wireshark, so add the flags
43997 # to the flags for that compiler as well.
43998 #
43999  
44000 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
44001  
44002 case " $WS_CFLAGS_FOR_BUILD " in #(
44003 *" $GCC_OPTION "*) :
44004 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
44005 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
44006 ac_status=$?
44007 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44008 test $ac_status = 0; } ;; #(
44009 *) :
44010  
44011 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
44012 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
44013 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
44014 ac_status=$?
44015 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44016 test $ac_status = 0; }
44017 ;;
44018 esac
44019  
44020 else
44021  
44022 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
44023 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
44024 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
44025 ac_status=$?
44026 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44027 test $ac_status = 0; }
44028  
44029 fi
44030  
44031 fi
44032 fi
44033  
44034 else
44035  
44036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44037 $as_echo "no" >&6; }
44038 can_add_to_cflags=no
44039  
44040 fi
44041 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44042  
44043 CPPFLAGS="$ac_ws_CPPLAGS_saved"
44044 CFLAGS="$ac_ws_CFLAGS_saved"
44045 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
44046 LDFLAGS="$ac_ws_LDFLAGS_saved"
44047  
44048 fi
44049 #
44050 # Did we find a C++ compiler?
44051 #
44052 if test "x$CXX" != "x" ; then
44053 #
44054 # Yes. Is this option only for the C compiler?
44055 #
44056 if test "" != C ; then
44057 #
44058 # Not C-only; if this option can be added to the C++ compiler
44059 # options, add it.
44060 #
44061 # If the option begins with "-W", add
44062 # $ac_wireshark_unknown_warning_option_error, as per the above, and
44063 # also add $ac_wireshark_non_cxx_warning_option_error, because at
44064 # lease some versions of g++ whine about -Wmissing-prototypes, the
44065 # fact that at least one of those versions refuses to warn about
44066 # function declarations without an earlier declaration nonwithstanding;
44067 # perhaps there's a reason not to warn about that with C++ even though
44068 # warning about it can be a Good Idea with C, but it's not obvious to
44069 # me).
44070 #
44071 # If the option begins with "-f" or "-m", add -Werror to make sure
44072 # that we'll get an error if we get "argument unused during compilation"
44073 # warnings, as those will either cause a failure for files compiled
44074 # with -Werror or annoying noise for files compiled without it.
44075 # (Yeah, you, clang++.)
44076 #
44077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
44078 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
44079  
44080 ac_ws_CPPLAGS_saved="$CPPFLAGS"
44081 ac_ws_CFLAGS_saved="$CFLAGS"
44082 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
44083 ac_ws_LDFLAGS_saved="$LDFLAGS"
44084 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
44085 CFLAGS="$WS_CFLAGS $CFLAGS"
44086 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
44087 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
44088  
44089 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
44090 then
44091 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
44092 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
44093 then
44094 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
44095 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
44096 then
44097 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
44098 else
44099 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
44100 fi
44101 ac_ext=cpp
44102 ac_cpp='$CXXCPP $CPPFLAGS'
44103 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44104 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44105 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44106  
44107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44108 /* end confdefs.h. */
44109  
44110 int foo;
44111  
44112 _ACEOF
44113 if ac_fn_cxx_try_compile "$LINENO"; then :
44114  
44115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44116 $as_echo "yes" >&6; }
44117 can_add_to_cxxflags=yes
44118 #
44119 # OK, do we have a test program? If so, check
44120 # whether it fails with this option and -Werror,
44121 # and, if so, don't include it.
44122 #
44123 # We test arg 4 here because arg 3 is a program which
44124 # could contain quotes (breaking the comparison).
44125 #
44126 if test "x" != "x" ; then
44127 CXXFLAGS="$CXXFLAGS -Werror"
44128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
44129 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
44130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44131 /* end confdefs.h. */
44132  
44133 _ACEOF
44134 if ac_fn_cxx_try_compile "$LINENO"; then :
44135  
44136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44137 $as_echo "no" >&6; }
44138 #
44139 # Remove "force an error for a warning" options, if we
44140 # added them, by setting CXXFLAGS to the saved value plus
44141 # just the new option.
44142 #
44143  
44144 if ${WS_CXXFLAGS+:} false; then :
44145  
44146 case " $WS_CXXFLAGS " in #(
44147 *" $GCC_OPTION "*) :
44148 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
44149 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
44150 ac_status=$?
44151 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44152 test $ac_status = 0; } ;; #(
44153 *) :
44154  
44155 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
44156 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
44157 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
44158 ac_status=$?
44159 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44160 test $ac_status = 0; }
44161 ;;
44162 esac
44163  
44164 else
44165  
44166 WS_CXXFLAGS=$GCC_OPTION
44167 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
44168 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
44169 ac_status=$?
44170 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44171 test $ac_status = 0; }
44172  
44173 fi
44174  
44175  
44176 else
44177  
44178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44179 $as_echo "yes" >&6; }
44180  
44181 fi
44182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44183 else
44184 #
44185 # Remove "force an error for a warning" options, if we
44186 # added them, by setting CXXFLAGS to the saved value plus
44187 # just the new option.
44188 #
44189  
44190 if ${WS_CXXFLAGS+:} false; then :
44191  
44192 case " $WS_CXXFLAGS " in #(
44193 *" $GCC_OPTION "*) :
44194 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
44195 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
44196 ac_status=$?
44197 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44198 test $ac_status = 0; } ;; #(
44199 *) :
44200  
44201 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
44202 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
44203 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
44204 ac_status=$?
44205 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44206 test $ac_status = 0; }
44207 ;;
44208 esac
44209  
44210 else
44211  
44212 WS_CXXFLAGS=$GCC_OPTION
44213 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
44214 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
44215 ac_status=$?
44216 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44217 test $ac_status = 0; }
44218  
44219 fi
44220  
44221 fi
44222  
44223 else
44224  
44225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44226 $as_echo "no" >&6; }
44227 can_add_to_cxxflags=no
44228  
44229 fi
44230 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44231  
44232 CPPFLAGS="$ac_ws_CPPLAGS_saved"
44233 CFLAGS="$ac_ws_CFLAGS_saved"
44234 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
44235 LDFLAGS="$ac_ws_LDFLAGS_saved"
44236  
44237 ac_ext=c
44238 ac_cpp='$CPP $CPPFLAGS'
44239 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44240 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44241 ac_compiler_gnu=$ac_cv_c_compiler_gnu
44242  
44243 fi
44244 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
44245 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
44246 then
44247 #
44248 # Confusingly, some C++ compilers like -Wmissing-prototypes but
44249 # don't like -Wmissing-declarations and others like
44250 # -Wmissing-declarations but don't like -Wmissing-prototypes,
44251 # the fact that the corresponding C compiler likes both. Don't
44252 # warn about them.
44253 #
44254 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
44255 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
44256 then
44257 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
44258 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
44259 fi
44260 fi
44261 fi
44262 fi
44263  
44264  
44265  
44266 fi
44267  
44268  
44269 # Add check hf conflict..
44270 #
44271 # Check whether --enable-checkhf-conflict was given.
44272 if test "${enable_checkhf_conflict+set}" = set; then :
44273 enableval=$enable_checkhf_conflict;
44274  
44275 $as_echo "#define ENABLE_CHECK_FILTER 1" >>confdefs.h
44276  
44277  
44278 fi
44279  
44280  
44281 LD_OPTION="-Wl,--as-needed"
44282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $LD_OPTION to LDFLAGS" >&5
44283 $as_echo_n "checking whether we can add $LD_OPTION to LDFLAGS... " >&6; }
44284  
44285 ac_ws_CPPLAGS_saved="$CPPFLAGS"
44286 ac_ws_CFLAGS_saved="$CFLAGS"
44287 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
44288 ac_ws_LDFLAGS_saved="$LDFLAGS"
44289 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
44290 CFLAGS="$WS_CFLAGS $CFLAGS"
44291 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
44292 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
44293  
44294 LDFLAGS="$LDFLAGS $LD_OPTION"
44295 can_add_to_ldflags=""
44296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44297 /* end confdefs.h. */
44298  
44299 main() { return; }
44300  
44301 _ACEOF
44302 if ac_fn_c_try_link "$LINENO"; then :
44303  
44304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44305 $as_echo "yes" >&6; }
44306  
44307 if ${WS_LDFLAGS+:} false; then :
44308  
44309 case " $WS_LDFLAGS " in #(
44310 *" $LD_OPTION "*) :
44311 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS already contains \$LD_OPTION"; } >&5
44312 (: WS_LDFLAGS already contains $LD_OPTION) 2>&5
44313 ac_status=$?
44314 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44315 test $ac_status = 0; } ;; #(
44316 *) :
44317  
44318 as_fn_append WS_LDFLAGS " $LD_OPTION"
44319 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
44320 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
44321 ac_status=$?
44322 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44323 test $ac_status = 0; }
44324 ;;
44325 esac
44326  
44327 else
44328  
44329 WS_LDFLAGS=$LD_OPTION
44330 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
44331 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
44332 ac_status=$?
44333 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44334 test $ac_status = 0; }
44335  
44336 fi
44337  
44338 can_add_to_ldflags=yes
44339  
44340 else
44341  
44342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44343 $as_echo "no" >&6; }
44344 can_add_to_ldflags=no
44345  
44346 fi
44347 rm -f core conftest.err conftest.$ac_objext \
44348 conftest$ac_exeext conftest.$ac_ext
44349  
44350 CPPFLAGS="$ac_ws_CPPLAGS_saved"
44351 CFLAGS="$ac_ws_CFLAGS_saved"
44352 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
44353 LDFLAGS="$ac_ws_LDFLAGS_saved"
44354  
44355  
44356 ###AC_WIRESHARK_LDFLAGS_CHECK([-Wl,-M])
44357 ###AC_WIRESHARK_LDFLAGS_CHECK([-Wl,--cref])
44358 # AC_WIRESHARK_LDFLAGS_CHECK([-flto])
44359 # AC_WIRESHARK_LDFLAGS_CHECK([-fwhopr])
44360 # AC_WIRESHARK_LDFLAGS_CHECK([-fwhole-program])
44361  
44362 #
44363 # Put -fPIE in PIE_CFLAGS and -pie in PIE_LDFLAGS if we can use them,
44364 # so that we can build dumpcap PIE - it may run with elevated
44365 # privileges, and using PIE means the OS can run it at random locations
44366 # in the address space to make attacks more difficult.
44367 #
44368  
44369 WS_CFLAGS_saved="$WS_CFLAGS"
44370 WS_LDFLAGS_saved="$WS_LDFLAGS"
44371 GCC_OPTION="-fPIE"
44372 can_add_to_cflags=""
44373 can_add_to_cxxflags=""
44374 if test "x$ac_supports_gcc_flags" = "xyes" ; then
44375 if test "C" != CXX ; then
44376 #
44377 # Not C++-only; if this can be added to the C compiler flags, add them.
44378 #
44379 # If the option begins with "-W", add
44380 # $ac_wireshark_unknown_warning_option_error to make sure that
44381 # we'll get an error if it's an unknown warning option; not all
44382 # compilers treat unknown warning options as errors (I'm looking at
44383 # you, clang).
44384 #
44385 # If the option begins with "-f" or "-m", add -Werror to make sure
44386 # that we'll get an error if we get "argument unused during compilation"
44387 # warnings, as those will either cause a failure for files compiled
44388 # with -Werror or annoying noise for files compiled without it.
44389 # (Yeah, you, clang.)
44390 #
44391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
44392 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
44393  
44394 ac_ws_CPPLAGS_saved="$CPPFLAGS"
44395 ac_ws_CFLAGS_saved="$CFLAGS"
44396 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
44397 ac_ws_LDFLAGS_saved="$LDFLAGS"
44398 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
44399 CFLAGS="$WS_CFLAGS $CFLAGS"
44400 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
44401 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
44402  
44403 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
44404 then
44405 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
44406 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
44407 then
44408 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
44409 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
44410 then
44411 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
44412 else
44413 CFLAGS="$CFLAGS $GCC_OPTION"
44414 fi
44415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44416 /* end confdefs.h. */
44417  
44418 int foo;
44419  
44420 _ACEOF
44421 if ac_fn_c_try_compile "$LINENO"; then :
44422  
44423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44424 $as_echo "yes" >&6; }
44425 can_add_to_cflags=yes
44426 #
44427 # OK, do we have a test program? If so, check
44428 # whether it fails with this option and -Werror,
44429 # and, if so, don't include it.
44430 #
44431 # We test arg 4 here because arg 3 is a program which
44432 # could contain quotes (breaking the comparison).
44433 #
44434 if test "x" != "x" ; then
44435 CFLAGS="$CFLAGS -Werror"
44436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
44437 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
44438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44439 /* end confdefs.h. */
44440  
44441 _ACEOF
44442 if ac_fn_c_try_compile "$LINENO"; then :
44443  
44444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44445 $as_echo "no" >&6; }
44446 #
44447 # Remove "force an error for a warning" options, if we
44448 # added them, by setting CFLAGS to the saved value plus
44449 # just the new option.
44450 #
44451  
44452 if ${WS_CFLAGS+:} false; then :
44453  
44454 case " $WS_CFLAGS " in #(
44455 *" $GCC_OPTION "*) :
44456 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
44457 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
44458 ac_status=$?
44459 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44460 test $ac_status = 0; } ;; #(
44461 *) :
44462  
44463 as_fn_append WS_CFLAGS " $GCC_OPTION"
44464 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
44465 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
44466 ac_status=$?
44467 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44468 test $ac_status = 0; }
44469 ;;
44470 esac
44471  
44472 else
44473  
44474 WS_CFLAGS=$GCC_OPTION
44475 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
44476 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
44477 ac_status=$?
44478 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44479 test $ac_status = 0; }
44480  
44481 fi
44482  
44483 if test "$CC" = "$CC_FOR_BUILD"; then
44484 #
44485 # We're building the build tools with the same compiler
44486 # with which we're building Wireshark, so add the flags
44487 # to the flags for that compiler as well.
44488 #
44489  
44490 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
44491  
44492 case " $WS_CFLAGS_FOR_BUILD " in #(
44493 *" $GCC_OPTION "*) :
44494 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
44495 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
44496 ac_status=$?
44497 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44498 test $ac_status = 0; } ;; #(
44499 *) :
44500  
44501 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
44502 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
44503 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
44504 ac_status=$?
44505 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44506 test $ac_status = 0; }
44507 ;;
44508 esac
44509  
44510 else
44511  
44512 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
44513 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
44514 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
44515 ac_status=$?
44516 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44517 test $ac_status = 0; }
44518  
44519 fi
44520  
44521 fi
44522  
44523 else
44524  
44525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44526 $as_echo "yes" >&6; }
44527  
44528 fi
44529 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44530 else
44531 #
44532 # Remove "force an error for a warning" options, if we
44533 # added them, by setting CFLAGS to the saved value plus
44534 # just the new option.
44535 #
44536  
44537 if ${WS_CFLAGS+:} false; then :
44538  
44539 case " $WS_CFLAGS " in #(
44540 *" $GCC_OPTION "*) :
44541 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
44542 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
44543 ac_status=$?
44544 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44545 test $ac_status = 0; } ;; #(
44546 *) :
44547  
44548 as_fn_append WS_CFLAGS " $GCC_OPTION"
44549 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
44550 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
44551 ac_status=$?
44552 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44553 test $ac_status = 0; }
44554 ;;
44555 esac
44556  
44557 else
44558  
44559 WS_CFLAGS=$GCC_OPTION
44560 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
44561 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
44562 ac_status=$?
44563 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44564 test $ac_status = 0; }
44565  
44566 fi
44567  
44568 if test "$CC" = "$CC_FOR_BUILD"; then
44569 #
44570 # We're building the build tools with the same compiler
44571 # with which we're building Wireshark, so add the flags
44572 # to the flags for that compiler as well.
44573 #
44574  
44575 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
44576  
44577 case " $WS_CFLAGS_FOR_BUILD " in #(
44578 *" $GCC_OPTION "*) :
44579 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
44580 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
44581 ac_status=$?
44582 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44583 test $ac_status = 0; } ;; #(
44584 *) :
44585  
44586 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
44587 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
44588 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
44589 ac_status=$?
44590 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44591 test $ac_status = 0; }
44592 ;;
44593 esac
44594  
44595 else
44596  
44597 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
44598 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
44599 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
44600 ac_status=$?
44601 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44602 test $ac_status = 0; }
44603  
44604 fi
44605  
44606 fi
44607 fi
44608  
44609 else
44610  
44611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44612 $as_echo "no" >&6; }
44613 can_add_to_cflags=no
44614  
44615 fi
44616 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44617  
44618 CPPFLAGS="$ac_ws_CPPLAGS_saved"
44619 CFLAGS="$ac_ws_CFLAGS_saved"
44620 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
44621 LDFLAGS="$ac_ws_LDFLAGS_saved"
44622  
44623 fi
44624 #
44625 # Did we find a C++ compiler?
44626 #
44627 if test "x$CXX" != "x" ; then
44628 #
44629 # Yes. Is this option only for the C compiler?
44630 #
44631 if test "C" != C ; then
44632 #
44633 # Not C-only; if this option can be added to the C++ compiler
44634 # options, add it.
44635 #
44636 # If the option begins with "-W", add
44637 # $ac_wireshark_unknown_warning_option_error, as per the above, and
44638 # also add $ac_wireshark_non_cxx_warning_option_error, because at
44639 # lease some versions of g++ whine about -Wmissing-prototypes, the
44640 # fact that at least one of those versions refuses to warn about
44641 # function declarations without an earlier declaration nonwithstanding;
44642 # perhaps there's a reason not to warn about that with C++ even though
44643 # warning about it can be a Good Idea with C, but it's not obvious to
44644 # me).
44645 #
44646 # If the option begins with "-f" or "-m", add -Werror to make sure
44647 # that we'll get an error if we get "argument unused during compilation"
44648 # warnings, as those will either cause a failure for files compiled
44649 # with -Werror or annoying noise for files compiled without it.
44650 # (Yeah, you, clang++.)
44651 #
44652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
44653 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
44654  
44655 ac_ws_CPPLAGS_saved="$CPPFLAGS"
44656 ac_ws_CFLAGS_saved="$CFLAGS"
44657 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
44658 ac_ws_LDFLAGS_saved="$LDFLAGS"
44659 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
44660 CFLAGS="$WS_CFLAGS $CFLAGS"
44661 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
44662 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
44663  
44664 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
44665 then
44666 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
44667 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
44668 then
44669 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
44670 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
44671 then
44672 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
44673 else
44674 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
44675 fi
44676 ac_ext=cpp
44677 ac_cpp='$CXXCPP $CPPFLAGS'
44678 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44679 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44680 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44681  
44682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44683 /* end confdefs.h. */
44684  
44685 int foo;
44686  
44687 _ACEOF
44688 if ac_fn_cxx_try_compile "$LINENO"; then :
44689  
44690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44691 $as_echo "yes" >&6; }
44692 can_add_to_cxxflags=yes
44693 #
44694 # OK, do we have a test program? If so, check
44695 # whether it fails with this option and -Werror,
44696 # and, if so, don't include it.
44697 #
44698 # We test arg 4 here because arg 3 is a program which
44699 # could contain quotes (breaking the comparison).
44700 #
44701 if test "x" != "x" ; then
44702 CXXFLAGS="$CXXFLAGS -Werror"
44703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
44704 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
44705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44706 /* end confdefs.h. */
44707  
44708 _ACEOF
44709 if ac_fn_cxx_try_compile "$LINENO"; then :
44710  
44711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44712 $as_echo "no" >&6; }
44713 #
44714 # Remove "force an error for a warning" options, if we
44715 # added them, by setting CXXFLAGS to the saved value plus
44716 # just the new option.
44717 #
44718  
44719 if ${WS_CXXFLAGS+:} false; then :
44720  
44721 case " $WS_CXXFLAGS " in #(
44722 *" $GCC_OPTION "*) :
44723 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
44724 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
44725 ac_status=$?
44726 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44727 test $ac_status = 0; } ;; #(
44728 *) :
44729  
44730 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
44731 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
44732 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
44733 ac_status=$?
44734 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44735 test $ac_status = 0; }
44736 ;;
44737 esac
44738  
44739 else
44740  
44741 WS_CXXFLAGS=$GCC_OPTION
44742 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
44743 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
44744 ac_status=$?
44745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44746 test $ac_status = 0; }
44747  
44748 fi
44749  
44750  
44751 else
44752  
44753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44754 $as_echo "yes" >&6; }
44755  
44756 fi
44757 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44758 else
44759 #
44760 # Remove "force an error for a warning" options, if we
44761 # added them, by setting CXXFLAGS to the saved value plus
44762 # just the new option.
44763 #
44764  
44765 if ${WS_CXXFLAGS+:} false; then :
44766  
44767 case " $WS_CXXFLAGS " in #(
44768 *" $GCC_OPTION "*) :
44769 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
44770 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
44771 ac_status=$?
44772 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44773 test $ac_status = 0; } ;; #(
44774 *) :
44775  
44776 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
44777 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
44778 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
44779 ac_status=$?
44780 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44781 test $ac_status = 0; }
44782 ;;
44783 esac
44784  
44785 else
44786  
44787 WS_CXXFLAGS=$GCC_OPTION
44788 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
44789 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
44790 ac_status=$?
44791 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44792 test $ac_status = 0; }
44793  
44794 fi
44795  
44796 fi
44797  
44798 else
44799  
44800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44801 $as_echo "no" >&6; }
44802 can_add_to_cxxflags=no
44803  
44804 fi
44805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44806  
44807 CPPFLAGS="$ac_ws_CPPLAGS_saved"
44808 CFLAGS="$ac_ws_CFLAGS_saved"
44809 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
44810 LDFLAGS="$ac_ws_LDFLAGS_saved"
44811  
44812 ac_ext=c
44813 ac_cpp='$CPP $CPPFLAGS'
44814 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44815 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44816 ac_compiler_gnu=$ac_cv_c_compiler_gnu
44817  
44818 fi
44819 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
44820 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
44821 then
44822 #
44823 # Confusingly, some C++ compilers like -Wmissing-prototypes but
44824 # don't like -Wmissing-declarations and others like
44825 # -Wmissing-declarations but don't like -Wmissing-prototypes,
44826 # the fact that the corresponding C compiler likes both. Don't
44827 # warn about them.
44828 #
44829 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
44830 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
44831 then
44832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
44833 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
44834 fi
44835 fi
44836 fi
44837 fi
44838  
44839 if test "x$can_add_to_cflags" = "xyes"
44840 then
44841 LD_OPTION="-fPIE -pie"
44842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $LD_OPTION to LDFLAGS" >&5
44843 $as_echo_n "checking whether we can add $LD_OPTION to LDFLAGS... " >&6; }
44844  
44845 ac_ws_CPPLAGS_saved="$CPPFLAGS"
44846 ac_ws_CFLAGS_saved="$CFLAGS"
44847 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
44848 ac_ws_LDFLAGS_saved="$LDFLAGS"
44849 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
44850 CFLAGS="$WS_CFLAGS $CFLAGS"
44851 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
44852 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
44853  
44854 LDFLAGS="$LDFLAGS $LD_OPTION"
44855 can_add_to_ldflags=""
44856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44857 /* end confdefs.h. */
44858  
44859 main() { return; }
44860  
44861 _ACEOF
44862 if ac_fn_c_try_link "$LINENO"; then :
44863  
44864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44865 $as_echo "yes" >&6; }
44866  
44867 if ${WS_LDFLAGS+:} false; then :
44868  
44869 case " $WS_LDFLAGS " in #(
44870 *" $LD_OPTION "*) :
44871 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS already contains \$LD_OPTION"; } >&5
44872 (: WS_LDFLAGS already contains $LD_OPTION) 2>&5
44873 ac_status=$?
44874 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44875 test $ac_status = 0; } ;; #(
44876 *) :
44877  
44878 as_fn_append WS_LDFLAGS " $LD_OPTION"
44879 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
44880 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
44881 ac_status=$?
44882 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44883 test $ac_status = 0; }
44884 ;;
44885 esac
44886  
44887 else
44888  
44889 WS_LDFLAGS=$LD_OPTION
44890 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
44891 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
44892 ac_status=$?
44893 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44894 test $ac_status = 0; }
44895  
44896 fi
44897  
44898 can_add_to_ldflags=yes
44899  
44900 else
44901  
44902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44903 $as_echo "no" >&6; }
44904 can_add_to_ldflags=no
44905  
44906 fi
44907 rm -f core conftest.err conftest.$ac_objext \
44908 conftest$ac_exeext conftest.$ac_ext
44909  
44910 CPPFLAGS="$ac_ws_CPPLAGS_saved"
44911 CFLAGS="$ac_ws_CFLAGS_saved"
44912 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
44913 LDFLAGS="$ac_ws_LDFLAGS_saved"
44914  
44915  
44916 if test "x$can_add_to_ldflags" = "xyes"
44917 then
44918 # We can use PIE
44919 PIE_CFLAGS="-fPIE"
44920 PIE_LDFLAGS="-pie"
44921 fi
44922 fi
44923 WS_CFLAGS="$WS_CFLAGS_saved"
44924 WS_LDFLAGS="$WS_LDFLAGS_saved"
44925  
44926  
44927  
44928 WS_CFLAGS_saved="$WS_CFLAGS"
44929 GCC_OPTION="-msse4.2"
44930 can_add_to_cflags=""
44931 can_add_to_cxxflags=""
44932 if test "x$ac_supports_gcc_flags" = "xyes" ; then
44933 if test "C" != CXX ; then
44934 #
44935 # Not C++-only; if this can be added to the C compiler flags, add them.
44936 #
44937 # If the option begins with "-W", add
44938 # $ac_wireshark_unknown_warning_option_error to make sure that
44939 # we'll get an error if it's an unknown warning option; not all
44940 # compilers treat unknown warning options as errors (I'm looking at
44941 # you, clang).
44942 #
44943 # If the option begins with "-f" or "-m", add -Werror to make sure
44944 # that we'll get an error if we get "argument unused during compilation"
44945 # warnings, as those will either cause a failure for files compiled
44946 # with -Werror or annoying noise for files compiled without it.
44947 # (Yeah, you, clang.)
44948 #
44949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
44950 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
44951  
44952 ac_ws_CPPLAGS_saved="$CPPFLAGS"
44953 ac_ws_CFLAGS_saved="$CFLAGS"
44954 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
44955 ac_ws_LDFLAGS_saved="$LDFLAGS"
44956 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
44957 CFLAGS="$WS_CFLAGS $CFLAGS"
44958 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
44959 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
44960  
44961 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
44962 then
44963 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
44964 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
44965 then
44966 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
44967 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
44968 then
44969 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
44970 else
44971 CFLAGS="$CFLAGS $GCC_OPTION"
44972 fi
44973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44974 /* end confdefs.h. */
44975  
44976 int foo;
44977  
44978 _ACEOF
44979 if ac_fn_c_try_compile "$LINENO"; then :
44980  
44981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44982 $as_echo "yes" >&6; }
44983 can_add_to_cflags=yes
44984 #
44985 # OK, do we have a test program? If so, check
44986 # whether it fails with this option and -Werror,
44987 # and, if so, don't include it.
44988 #
44989 # We test arg 4 here because arg 3 is a program which
44990 # could contain quotes (breaking the comparison).
44991 #
44992 if test "x" != "x" ; then
44993 CFLAGS="$CFLAGS -Werror"
44994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
44995 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
44996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44997 /* end confdefs.h. */
44998  
44999 _ACEOF
45000 if ac_fn_c_try_compile "$LINENO"; then :
45001  
45002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45003 $as_echo "no" >&6; }
45004 #
45005 # Remove "force an error for a warning" options, if we
45006 # added them, by setting CFLAGS to the saved value plus
45007 # just the new option.
45008 #
45009  
45010 if ${WS_CFLAGS+:} false; then :
45011  
45012 case " $WS_CFLAGS " in #(
45013 *" $GCC_OPTION "*) :
45014 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
45015 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
45016 ac_status=$?
45017 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45018 test $ac_status = 0; } ;; #(
45019 *) :
45020  
45021 as_fn_append WS_CFLAGS " $GCC_OPTION"
45022 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
45023 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
45024 ac_status=$?
45025 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45026 test $ac_status = 0; }
45027 ;;
45028 esac
45029  
45030 else
45031  
45032 WS_CFLAGS=$GCC_OPTION
45033 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
45034 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
45035 ac_status=$?
45036 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45037 test $ac_status = 0; }
45038  
45039 fi
45040  
45041 if test "$CC" = "$CC_FOR_BUILD"; then
45042 #
45043 # We're building the build tools with the same compiler
45044 # with which we're building Wireshark, so add the flags
45045 # to the flags for that compiler as well.
45046 #
45047  
45048 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
45049  
45050 case " $WS_CFLAGS_FOR_BUILD " in #(
45051 *" $GCC_OPTION "*) :
45052 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
45053 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
45054 ac_status=$?
45055 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45056 test $ac_status = 0; } ;; #(
45057 *) :
45058  
45059 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
45060 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
45061 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
45062 ac_status=$?
45063 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45064 test $ac_status = 0; }
45065 ;;
45066 esac
45067  
45068 else
45069  
45070 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
45071 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
45072 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
45073 ac_status=$?
45074 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45075 test $ac_status = 0; }
45076  
45077 fi
45078  
45079 fi
45080  
45081 else
45082  
45083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45084 $as_echo "yes" >&6; }
45085  
45086 fi
45087 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45088 else
45089 #
45090 # Remove "force an error for a warning" options, if we
45091 # added them, by setting CFLAGS to the saved value plus
45092 # just the new option.
45093 #
45094  
45095 if ${WS_CFLAGS+:} false; then :
45096  
45097 case " $WS_CFLAGS " in #(
45098 *" $GCC_OPTION "*) :
45099 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
45100 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
45101 ac_status=$?
45102 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45103 test $ac_status = 0; } ;; #(
45104 *) :
45105  
45106 as_fn_append WS_CFLAGS " $GCC_OPTION"
45107 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
45108 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
45109 ac_status=$?
45110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45111 test $ac_status = 0; }
45112 ;;
45113 esac
45114  
45115 else
45116  
45117 WS_CFLAGS=$GCC_OPTION
45118 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
45119 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
45120 ac_status=$?
45121 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45122 test $ac_status = 0; }
45123  
45124 fi
45125  
45126 if test "$CC" = "$CC_FOR_BUILD"; then
45127 #
45128 # We're building the build tools with the same compiler
45129 # with which we're building Wireshark, so add the flags
45130 # to the flags for that compiler as well.
45131 #
45132  
45133 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
45134  
45135 case " $WS_CFLAGS_FOR_BUILD " in #(
45136 *" $GCC_OPTION "*) :
45137 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
45138 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
45139 ac_status=$?
45140 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45141 test $ac_status = 0; } ;; #(
45142 *) :
45143  
45144 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
45145 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
45146 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
45147 ac_status=$?
45148 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45149 test $ac_status = 0; }
45150 ;;
45151 esac
45152  
45153 else
45154  
45155 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
45156 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
45157 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
45158 ac_status=$?
45159 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45160 test $ac_status = 0; }
45161  
45162 fi
45163  
45164 fi
45165 fi
45166  
45167 else
45168  
45169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45170 $as_echo "no" >&6; }
45171 can_add_to_cflags=no
45172  
45173 fi
45174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45175  
45176 CPPFLAGS="$ac_ws_CPPLAGS_saved"
45177 CFLAGS="$ac_ws_CFLAGS_saved"
45178 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
45179 LDFLAGS="$ac_ws_LDFLAGS_saved"
45180  
45181 fi
45182 #
45183 # Did we find a C++ compiler?
45184 #
45185 if test "x$CXX" != "x" ; then
45186 #
45187 # Yes. Is this option only for the C compiler?
45188 #
45189 if test "C" != C ; then
45190 #
45191 # Not C-only; if this option can be added to the C++ compiler
45192 # options, add it.
45193 #
45194 # If the option begins with "-W", add
45195 # $ac_wireshark_unknown_warning_option_error, as per the above, and
45196 # also add $ac_wireshark_non_cxx_warning_option_error, because at
45197 # lease some versions of g++ whine about -Wmissing-prototypes, the
45198 # fact that at least one of those versions refuses to warn about
45199 # function declarations without an earlier declaration nonwithstanding;
45200 # perhaps there's a reason not to warn about that with C++ even though
45201 # warning about it can be a Good Idea with C, but it's not obvious to
45202 # me).
45203 #
45204 # If the option begins with "-f" or "-m", add -Werror to make sure
45205 # that we'll get an error if we get "argument unused during compilation"
45206 # warnings, as those will either cause a failure for files compiled
45207 # with -Werror or annoying noise for files compiled without it.
45208 # (Yeah, you, clang++.)
45209 #
45210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
45211 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
45212  
45213 ac_ws_CPPLAGS_saved="$CPPFLAGS"
45214 ac_ws_CFLAGS_saved="$CFLAGS"
45215 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
45216 ac_ws_LDFLAGS_saved="$LDFLAGS"
45217 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
45218 CFLAGS="$WS_CFLAGS $CFLAGS"
45219 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
45220 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
45221  
45222 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
45223 then
45224 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
45225 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
45226 then
45227 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
45228 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
45229 then
45230 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
45231 else
45232 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
45233 fi
45234 ac_ext=cpp
45235 ac_cpp='$CXXCPP $CPPFLAGS'
45236 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45237 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45238 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45239  
45240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45241 /* end confdefs.h. */
45242  
45243 int foo;
45244  
45245 _ACEOF
45246 if ac_fn_cxx_try_compile "$LINENO"; then :
45247  
45248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45249 $as_echo "yes" >&6; }
45250 can_add_to_cxxflags=yes
45251 #
45252 # OK, do we have a test program? If so, check
45253 # whether it fails with this option and -Werror,
45254 # and, if so, don't include it.
45255 #
45256 # We test arg 4 here because arg 3 is a program which
45257 # could contain quotes (breaking the comparison).
45258 #
45259 if test "x" != "x" ; then
45260 CXXFLAGS="$CXXFLAGS -Werror"
45261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
45262 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
45263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45264 /* end confdefs.h. */
45265  
45266 _ACEOF
45267 if ac_fn_cxx_try_compile "$LINENO"; then :
45268  
45269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45270 $as_echo "no" >&6; }
45271 #
45272 # Remove "force an error for a warning" options, if we
45273 # added them, by setting CXXFLAGS to the saved value plus
45274 # just the new option.
45275 #
45276  
45277 if ${WS_CXXFLAGS+:} false; then :
45278  
45279 case " $WS_CXXFLAGS " in #(
45280 *" $GCC_OPTION "*) :
45281 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
45282 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
45283 ac_status=$?
45284 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45285 test $ac_status = 0; } ;; #(
45286 *) :
45287  
45288 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
45289 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
45290 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
45291 ac_status=$?
45292 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45293 test $ac_status = 0; }
45294 ;;
45295 esac
45296  
45297 else
45298  
45299 WS_CXXFLAGS=$GCC_OPTION
45300 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
45301 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
45302 ac_status=$?
45303 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45304 test $ac_status = 0; }
45305  
45306 fi
45307  
45308  
45309 else
45310  
45311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45312 $as_echo "yes" >&6; }
45313  
45314 fi
45315 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45316 else
45317 #
45318 # Remove "force an error for a warning" options, if we
45319 # added them, by setting CXXFLAGS to the saved value plus
45320 # just the new option.
45321 #
45322  
45323 if ${WS_CXXFLAGS+:} false; then :
45324  
45325 case " $WS_CXXFLAGS " in #(
45326 *" $GCC_OPTION "*) :
45327 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
45328 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
45329 ac_status=$?
45330 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45331 test $ac_status = 0; } ;; #(
45332 *) :
45333  
45334 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
45335 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
45336 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
45337 ac_status=$?
45338 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45339 test $ac_status = 0; }
45340 ;;
45341 esac
45342  
45343 else
45344  
45345 WS_CXXFLAGS=$GCC_OPTION
45346 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
45347 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
45348 ac_status=$?
45349 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45350 test $ac_status = 0; }
45351  
45352 fi
45353  
45354 fi
45355  
45356 else
45357  
45358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45359 $as_echo "no" >&6; }
45360 can_add_to_cxxflags=no
45361  
45362 fi
45363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45364  
45365 CPPFLAGS="$ac_ws_CPPLAGS_saved"
45366 CFLAGS="$ac_ws_CFLAGS_saved"
45367 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
45368 LDFLAGS="$ac_ws_LDFLAGS_saved"
45369  
45370 ac_ext=c
45371 ac_cpp='$CPP $CPPFLAGS'
45372 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45373 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45374 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45375  
45376 fi
45377 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
45378 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
45379 then
45380 #
45381 # Confusingly, some C++ compilers like -Wmissing-prototypes but
45382 # don't like -Wmissing-declarations and others like
45383 # -Wmissing-declarations but don't like -Wmissing-prototypes,
45384 # the fact that the corresponding C compiler likes both. Don't
45385 # warn about them.
45386 #
45387 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
45388 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
45389 then
45390 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
45391 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
45392 fi
45393 fi
45394 fi
45395 fi
45396  
45397 if test "x$can_add_to_cflags" = "xyes"
45398 then
45399 #
45400 # The compiler supports -msse4.2; use that to enable SSE 4.2.
45401 #
45402 # We only want to apply -msse4.2 to
45403 # wsutil/ws_mempbrk_sse42.c, as the SSE4.2 code there
45404 # is run only if the hardware supports it, but other
45405 # code would do no such checks.
45406 #
45407 ac_sse4_2_flag=-msse4.2
45408 else
45409 #
45410 # Try -xarch=sse4_2; that's the flag for Sun's compiler.
45411 #
45412 GCC_OPTION="-xarch=sse4_2"
45413 can_add_to_cflags=""
45414 can_add_to_cxxflags=""
45415 if test "x$ac_supports_gcc_flags" = "xyes" ; then
45416 if test "C" != CXX ; then
45417 #
45418 # Not C++-only; if this can be added to the C compiler flags, add them.
45419 #
45420 # If the option begins with "-W", add
45421 # $ac_wireshark_unknown_warning_option_error to make sure that
45422 # we'll get an error if it's an unknown warning option; not all
45423 # compilers treat unknown warning options as errors (I'm looking at
45424 # you, clang).
45425 #
45426 # If the option begins with "-f" or "-m", add -Werror to make sure
45427 # that we'll get an error if we get "argument unused during compilation"
45428 # warnings, as those will either cause a failure for files compiled
45429 # with -Werror or annoying noise for files compiled without it.
45430 # (Yeah, you, clang.)
45431 #
45432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CFLAGS" >&5
45433 $as_echo_n "checking whether we can add $GCC_OPTION to CFLAGS... " >&6; }
45434  
45435 ac_ws_CPPLAGS_saved="$CPPFLAGS"
45436 ac_ws_CFLAGS_saved="$CFLAGS"
45437 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
45438 ac_ws_LDFLAGS_saved="$LDFLAGS"
45439 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
45440 CFLAGS="$WS_CFLAGS $CFLAGS"
45441 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
45442 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
45443  
45444 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
45445 then
45446 CFLAGS="$CFLAGS $ac_wireshark_unknown_warning_option_error $GCC_OPTION"
45447 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
45448 then
45449 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
45450 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
45451 then
45452 CFLAGS="$CFLAGS -Werror $GCC_OPTION"
45453 else
45454 CFLAGS="$CFLAGS $GCC_OPTION"
45455 fi
45456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45457 /* end confdefs.h. */
45458  
45459 int foo;
45460  
45461 _ACEOF
45462 if ac_fn_c_try_compile "$LINENO"; then :
45463  
45464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45465 $as_echo "yes" >&6; }
45466 can_add_to_cflags=yes
45467 #
45468 # OK, do we have a test program? If so, check
45469 # whether it fails with this option and -Werror,
45470 # and, if so, don't include it.
45471 #
45472 # We test arg 4 here because arg 3 is a program which
45473 # could contain quotes (breaking the comparison).
45474 #
45475 if test "x" != "x" ; then
45476 CFLAGS="$CFLAGS -Werror"
45477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
45478 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
45479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45480 /* end confdefs.h. */
45481  
45482 _ACEOF
45483 if ac_fn_c_try_compile "$LINENO"; then :
45484  
45485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45486 $as_echo "no" >&6; }
45487 #
45488 # Remove "force an error for a warning" options, if we
45489 # added them, by setting CFLAGS to the saved value plus
45490 # just the new option.
45491 #
45492  
45493 if ${WS_CFLAGS+:} false; then :
45494  
45495 case " $WS_CFLAGS " in #(
45496 *" $GCC_OPTION "*) :
45497 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
45498 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
45499 ac_status=$?
45500 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45501 test $ac_status = 0; } ;; #(
45502 *) :
45503  
45504 as_fn_append WS_CFLAGS " $GCC_OPTION"
45505 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
45506 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
45507 ac_status=$?
45508 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45509 test $ac_status = 0; }
45510 ;;
45511 esac
45512  
45513 else
45514  
45515 WS_CFLAGS=$GCC_OPTION
45516 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
45517 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
45518 ac_status=$?
45519 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45520 test $ac_status = 0; }
45521  
45522 fi
45523  
45524 if test "$CC" = "$CC_FOR_BUILD"; then
45525 #
45526 # We're building the build tools with the same compiler
45527 # with which we're building Wireshark, so add the flags
45528 # to the flags for that compiler as well.
45529 #
45530  
45531 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
45532  
45533 case " $WS_CFLAGS_FOR_BUILD " in #(
45534 *" $GCC_OPTION "*) :
45535 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
45536 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
45537 ac_status=$?
45538 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45539 test $ac_status = 0; } ;; #(
45540 *) :
45541  
45542 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
45543 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
45544 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
45545 ac_status=$?
45546 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45547 test $ac_status = 0; }
45548 ;;
45549 esac
45550  
45551 else
45552  
45553 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
45554 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
45555 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
45556 ac_status=$?
45557 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45558 test $ac_status = 0; }
45559  
45560 fi
45561  
45562 fi
45563  
45564 else
45565  
45566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45567 $as_echo "yes" >&6; }
45568  
45569 fi
45570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45571 else
45572 #
45573 # Remove "force an error for a warning" options, if we
45574 # added them, by setting CFLAGS to the saved value plus
45575 # just the new option.
45576 #
45577  
45578 if ${WS_CFLAGS+:} false; then :
45579  
45580 case " $WS_CFLAGS " in #(
45581 *" $GCC_OPTION "*) :
45582 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS already contains \$GCC_OPTION"; } >&5
45583 (: WS_CFLAGS already contains $GCC_OPTION) 2>&5
45584 ac_status=$?
45585 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45586 test $ac_status = 0; } ;; #(
45587 *) :
45588  
45589 as_fn_append WS_CFLAGS " $GCC_OPTION"
45590 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
45591 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
45592 ac_status=$?
45593 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45594 test $ac_status = 0; }
45595 ;;
45596 esac
45597  
45598 else
45599  
45600 WS_CFLAGS=$GCC_OPTION
45601 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS=\"\$WS_CFLAGS\""; } >&5
45602 (: WS_CFLAGS="$WS_CFLAGS") 2>&5
45603 ac_status=$?
45604 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45605 test $ac_status = 0; }
45606  
45607 fi
45608  
45609 if test "$CC" = "$CC_FOR_BUILD"; then
45610 #
45611 # We're building the build tools with the same compiler
45612 # with which we're building Wireshark, so add the flags
45613 # to the flags for that compiler as well.
45614 #
45615  
45616 if ${WS_CFLAGS_FOR_BUILD+:} false; then :
45617  
45618 case " $WS_CFLAGS_FOR_BUILD " in #(
45619 *" $GCC_OPTION "*) :
45620 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD already contains \$GCC_OPTION"; } >&5
45621 (: WS_CFLAGS_FOR_BUILD already contains $GCC_OPTION) 2>&5
45622 ac_status=$?
45623 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45624 test $ac_status = 0; } ;; #(
45625 *) :
45626  
45627 as_fn_append WS_CFLAGS_FOR_BUILD " $GCC_OPTION"
45628 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
45629 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
45630 ac_status=$?
45631 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45632 test $ac_status = 0; }
45633 ;;
45634 esac
45635  
45636 else
45637  
45638 WS_CFLAGS_FOR_BUILD=$GCC_OPTION
45639 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CFLAGS_FOR_BUILD=\"\$WS_CFLAGS_FOR_BUILD\""; } >&5
45640 (: WS_CFLAGS_FOR_BUILD="$WS_CFLAGS_FOR_BUILD") 2>&5
45641 ac_status=$?
45642 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45643 test $ac_status = 0; }
45644  
45645 fi
45646  
45647 fi
45648 fi
45649  
45650 else
45651  
45652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45653 $as_echo "no" >&6; }
45654 can_add_to_cflags=no
45655  
45656 fi
45657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45658  
45659 CPPFLAGS="$ac_ws_CPPLAGS_saved"
45660 CFLAGS="$ac_ws_CFLAGS_saved"
45661 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
45662 LDFLAGS="$ac_ws_LDFLAGS_saved"
45663  
45664 fi
45665 #
45666 # Did we find a C++ compiler?
45667 #
45668 if test "x$CXX" != "x" ; then
45669 #
45670 # Yes. Is this option only for the C compiler?
45671 #
45672 if test "C" != C ; then
45673 #
45674 # Not C-only; if this option can be added to the C++ compiler
45675 # options, add it.
45676 #
45677 # If the option begins with "-W", add
45678 # $ac_wireshark_unknown_warning_option_error, as per the above, and
45679 # also add $ac_wireshark_non_cxx_warning_option_error, because at
45680 # lease some versions of g++ whine about -Wmissing-prototypes, the
45681 # fact that at least one of those versions refuses to warn about
45682 # function declarations without an earlier declaration nonwithstanding;
45683 # perhaps there's a reason not to warn about that with C++ even though
45684 # warning about it can be a Good Idea with C, but it's not obvious to
45685 # me).
45686 #
45687 # If the option begins with "-f" or "-m", add -Werror to make sure
45688 # that we'll get an error if we get "argument unused during compilation"
45689 # warnings, as those will either cause a failure for files compiled
45690 # with -Werror or annoying noise for files compiled without it.
45691 # (Yeah, you, clang++.)
45692 #
45693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can add $GCC_OPTION to CXXFLAGS" >&5
45694 $as_echo_n "checking whether we can add $GCC_OPTION to CXXFLAGS... " >&6; }
45695  
45696 ac_ws_CPPLAGS_saved="$CPPFLAGS"
45697 ac_ws_CFLAGS_saved="$CFLAGS"
45698 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
45699 ac_ws_LDFLAGS_saved="$LDFLAGS"
45700 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
45701 CFLAGS="$WS_CFLAGS $CFLAGS"
45702 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
45703 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
45704  
45705 if expr "x$GCC_OPTION" : "x-W.*" >/dev/null
45706 then
45707 CXXFLAGS="$CXXFLAGS $ac_wireshark_unknown_warning_option_error $ac_wireshark_non_cxx_warning_option_error $GCC_OPTION"
45708 elif expr "x$GCC_OPTION" : "x-f.*" >/dev/null
45709 then
45710 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
45711 elif expr "x$GCC_OPTION" : "x-m.*" >/dev/null
45712 then
45713 CXXFLAGS="$CXXFLAGS -Werror $GCC_OPTION"
45714 else
45715 CXXFLAGS="$CXXFLAGS $GCC_OPTION"
45716 fi
45717 ac_ext=cpp
45718 ac_cpp='$CXXCPP $CPPFLAGS'
45719 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45720 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45721 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45722  
45723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45724 /* end confdefs.h. */
45725  
45726 int foo;
45727  
45728 _ACEOF
45729 if ac_fn_cxx_try_compile "$LINENO"; then :
45730  
45731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45732 $as_echo "yes" >&6; }
45733 can_add_to_cxxflags=yes
45734 #
45735 # OK, do we have a test program? If so, check
45736 # whether it fails with this option and -Werror,
45737 # and, if so, don't include it.
45738 #
45739 # We test arg 4 here because arg 3 is a program which
45740 # could contain quotes (breaking the comparison).
45741 #
45742 if test "x" != "x" ; then
45743 CXXFLAGS="$CXXFLAGS -Werror"
45744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $GCC_OPTION " >&5
45745 $as_echo_n "checking whether $GCC_OPTION ... " >&6; }
45746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45747 /* end confdefs.h. */
45748  
45749 _ACEOF
45750 if ac_fn_cxx_try_compile "$LINENO"; then :
45751  
45752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45753 $as_echo "no" >&6; }
45754 #
45755 # Remove "force an error for a warning" options, if we
45756 # added them, by setting CXXFLAGS to the saved value plus
45757 # just the new option.
45758 #
45759  
45760 if ${WS_CXXFLAGS+:} false; then :
45761  
45762 case " $WS_CXXFLAGS " in #(
45763 *" $GCC_OPTION "*) :
45764 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
45765 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
45766 ac_status=$?
45767 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45768 test $ac_status = 0; } ;; #(
45769 *) :
45770  
45771 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
45772 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
45773 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
45774 ac_status=$?
45775 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45776 test $ac_status = 0; }
45777 ;;
45778 esac
45779  
45780 else
45781  
45782 WS_CXXFLAGS=$GCC_OPTION
45783 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
45784 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
45785 ac_status=$?
45786 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45787 test $ac_status = 0; }
45788  
45789 fi
45790  
45791  
45792 else
45793  
45794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45795 $as_echo "yes" >&6; }
45796  
45797 fi
45798 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45799 else
45800 #
45801 # Remove "force an error for a warning" options, if we
45802 # added them, by setting CXXFLAGS to the saved value plus
45803 # just the new option.
45804 #
45805  
45806 if ${WS_CXXFLAGS+:} false; then :
45807  
45808 case " $WS_CXXFLAGS " in #(
45809 *" $GCC_OPTION "*) :
45810 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS already contains \$GCC_OPTION"; } >&5
45811 (: WS_CXXFLAGS already contains $GCC_OPTION) 2>&5
45812 ac_status=$?
45813 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45814 test $ac_status = 0; } ;; #(
45815 *) :
45816  
45817 as_fn_append WS_CXXFLAGS " $GCC_OPTION"
45818 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
45819 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
45820 ac_status=$?
45821 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45822 test $ac_status = 0; }
45823 ;;
45824 esac
45825  
45826 else
45827  
45828 WS_CXXFLAGS=$GCC_OPTION
45829 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CXXFLAGS=\"\$WS_CXXFLAGS\""; } >&5
45830 (: WS_CXXFLAGS="$WS_CXXFLAGS") 2>&5
45831 ac_status=$?
45832 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45833 test $ac_status = 0; }
45834  
45835 fi
45836  
45837 fi
45838  
45839 else
45840  
45841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45842 $as_echo "no" >&6; }
45843 can_add_to_cxxflags=no
45844  
45845 fi
45846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45847  
45848 CPPFLAGS="$ac_ws_CPPLAGS_saved"
45849 CFLAGS="$ac_ws_CFLAGS_saved"
45850 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
45851 LDFLAGS="$ac_ws_LDFLAGS_saved"
45852  
45853 ac_ext=c
45854 ac_cpp='$CPP $CPPFLAGS'
45855 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45856 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45857 ac_compiler_gnu=$ac_cv_c_compiler_gnu
45858  
45859 fi
45860 if test "(" "$can_add_to_cflags" = "yes" -a "$can_add_to_cxxflags" = "no" ")" \
45861 -o "(" "$can_add_to_cflags" = "no" -a "$can_add_to_cxxflags" = "yes" ")"
45862 then
45863 #
45864 # Confusingly, some C++ compilers like -Wmissing-prototypes but
45865 # don't like -Wmissing-declarations and others like
45866 # -Wmissing-declarations but don't like -Wmissing-prototypes,
45867 # the fact that the corresponding C compiler likes both. Don't
45868 # warn about them.
45869 #
45870 if test "(" x$GCC_OPTION != x-Wmissing-prototypes ")" \
45871 -a "(" x$GCC_OPTION != x-Wmissing-declarations ")"
45872 then
45873 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $CC and $CXX appear to be a mismatched pair" >&5
45874 $as_echo "$as_me: WARNING: $CC and $CXX appear to be a mismatched pair" >&2;}
45875 fi
45876 fi
45877 fi
45878 fi
45879  
45880 if test "x$can_add_to_cflags" = "xyes"
45881 then
45882 #
45883 # The compiler supports -xarch=sse4_2; use that to
45884 # enable SSE 4.2.
45885 ac_sse4_2_flag=-xarch=sse4_2
45886 fi
45887 fi
45888 WS_CFLAGS="$WS_CFLAGS_saved"
45889  
45890 if test "x$ac_sse4_2_flag" != x; then
45891 #
45892 # OK, we have a compiler flag to enable SSE 4.2.
45893 #
45894 # Make sure we have the necessary headers for the SSE4.2 intrinsics
45895 # and that we can use them.
45896 #
45897 # First, check whether we have emmintrin.h and can use it
45898 # *without* the SSE 4.2 flag.
45899 #
45900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether there is emmintrin.h header and we can use it" >&5
45901 $as_echo_n "checking whether there is emmintrin.h header and we can use it... " >&6; }
45902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45903 /* end confdefs.h. */
45904 #include <emmintrin.h>
45905 int
45906 main ()
45907 {
45908 return 0;
45909 ;
45910 return 0;
45911 }
45912 _ACEOF
45913 if ac_fn_c_try_compile "$LINENO"; then :
45914  
45915 emmintrin_h_works=yes
45916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45917 $as_echo "yes" >&6; }
45918  
45919 else
45920  
45921 emmintrin_h_works=no
45922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45923 $as_echo "no" >&6; }
45924  
45925  
45926 fi
45927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45928  
45929 #
45930 # OK, if that works, see whether we have nmmintrin.h and
45931 # can use it *with* the SSE 4.2 flag.
45932 #
45933 if test "x$emmintrin_h_works" = "xyes"; then
45934 #
45935 # Add the SSE4.2 flags to the beginning of CFLAGS,
45936 # in case the user explicitly specified -mno-sse4.2
45937 # (or in case Gentoo's build tools did so); if they
45938 # did so, we only want this to work if we can use
45939 # the #pragma to override that for ws_mempbrk_sse42.c,
45940 # and putting it at the beginning means that the
45941 # CFLAGS setting in the environment will come later
45942 # and override it.
45943 #
45944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether there is nmmintrin.h header and we can use it" >&5
45945 $as_echo_n "checking whether there is nmmintrin.h header and we can use it... " >&6; }
45946 saved_CFLAGS="$CFLAGS"
45947 CFLAGS="$ac_sse4_2_flag $WS_CFLAGS $CFLAGS"
45948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45949 /* end confdefs.h. */
45950 #include <nmmintrin.h>
45951 int
45952 main ()
45953 {
45954 return 0;
45955 ;
45956 return 0;
45957 }
45958 _ACEOF
45959 if ac_fn_c_try_compile "$LINENO"; then :
45960  
45961 have_sse42=yes
45962  
45963 $as_echo "#define HAVE_SSE4_2 1" >>confdefs.h
45964  
45965 CFLAGS_SSE42="$ac_sse4_2_flag"
45966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45967 $as_echo "yes" >&6; }
45968  
45969 else
45970  
45971 have_sse42=no
45972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45973 $as_echo "no" >&6; }
45974  
45975  
45976 fi
45977 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45978 CFLAGS="$saved_CFLAGS"
45979 else
45980 have_sse42=no
45981 fi
45982 else
45983 have_sse42=no
45984 fi
45985 if test "x$have_sse42" = "xyes"; then
45986 SSE42_SUPPORTED_TRUE=
45987 SSE42_SUPPORTED_FALSE='#'
45988 else
45989 SSE42_SUPPORTED_TRUE='#'
45990 SSE42_SUPPORTED_FALSE=
45991 fi
45992  
45993  
45994  
45995 #
45996 # If we're running GCC or clang define _U_ to be "__attribute__((unused))"
45997 # so we can use _U_ to flag unused function parameters and not get warnings
45998 # about them. Otherwise, define _U_ to be an empty string so that _U_ used
45999 # to flag an unused function parameters will compile with other compilers.
46000 #
46001 # XXX - similar hints for other compilers?
46002 #
46003 if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
46004  
46005 $as_echo "#define _U_ __attribute__((unused))" >>confdefs.h
46006  
46007  
46008 $as_echo "#define WS_NORETURN __attribute((noreturn))" >>confdefs.h
46009  
46010 else
46011  
46012 $as_echo "#define _U_ /**/" >>confdefs.h
46013  
46014  
46015 $as_echo "#define WS_NORETURN /**/" >>confdefs.h
46016  
46017 fi
46018  
46019 # If we're running GCC or CLang, use FORTIFY_SOURCE=2
46020 # (only if the GCC 'optimization level' > 0).
46021 #
46022 # See: http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html
46023 # See: http://sourceware.org/bugzilla/show_bug.cgi?id=13979
46024 #
46025 # Note: FORTIFY_SOURCE is only effective for gcc optimization level > 0 (-O1, etc)
46026  
46027 if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
46028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -D_FORTIFY_SOURCE=2 can be used (without generating a warning)" >&5
46029 $as_echo_n "checking whether -D_FORTIFY_SOURCE=2 can be used (without generating a warning)... " >&6; }
46030  
46031 ac_ws_CPPLAGS_saved="$CPPFLAGS"
46032 ac_ws_CFLAGS_saved="$CFLAGS"
46033 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
46034 ac_ws_LDFLAGS_saved="$LDFLAGS"
46035 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
46036 CFLAGS="$WS_CFLAGS $CFLAGS"
46037 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
46038 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
46039  
46040 CFLAGS="$CFLAGS -Werror"
46041 CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"
46042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46043 /* end confdefs.h. */
46044  
46045  
46046 #include <stdio.h>
46047 int foo;
46048  
46049 _ACEOF
46050 if ac_fn_c_try_compile "$LINENO"; then :
46051  
46052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46053 $as_echo "yes" >&6; }
46054  
46055 if ${WS_CPPFLAGS+:} false; then :
46056  
46057 case " $WS_CPPFLAGS " in #(
46058 *" -D_FORTIFY_SOURCE=2 "*) :
46059 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CPPFLAGS already contains -D_FORTIFY_SOURCE=2"; } >&5
46060 (: WS_CPPFLAGS already contains -D_FORTIFY_SOURCE=2) 2>&5
46061 ac_status=$?
46062 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46063 test $ac_status = 0; } ;; #(
46064 *) :
46065  
46066 as_fn_append WS_CPPFLAGS " -D_FORTIFY_SOURCE=2"
46067 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CPPFLAGS=\"\$WS_CPPFLAGS\""; } >&5
46068 (: WS_CPPFLAGS="$WS_CPPFLAGS") 2>&5
46069 ac_status=$?
46070 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46071 test $ac_status = 0; }
46072 ;;
46073 esac
46074  
46075 else
46076  
46077 WS_CPPFLAGS=-D_FORTIFY_SOURCE=2
46078 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_CPPFLAGS=\"\$WS_CPPFLAGS\""; } >&5
46079 (: WS_CPPFLAGS="$WS_CPPFLAGS") 2>&5
46080 ac_status=$?
46081 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46082 test $ac_status = 0; }
46083  
46084 fi
46085  
46086  
46087 else
46088  
46089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46090 $as_echo "no" >&6; }
46091  
46092 fi
46093 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46094  
46095 CPPFLAGS="$ac_ws_CPPLAGS_saved"
46096 CFLAGS="$ac_ws_CFLAGS_saved"
46097 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
46098 LDFLAGS="$ac_ws_LDFLAGS_saved"
46099  
46100 fi
46101  
46102  
46103 #
46104 # If the compiler supports GCC-style flags, enable a barrier "stop on
46105 # warning".
46106 # This barrier is set for a very large part of the code. However, it is
46107 # typically not set for "generated" code (flex, ans2wrs, idl2wrs, ...)
46108 #
46109 warnings_as_errors_default="no"
46110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we should treat compiler warnings as errors" >&5
46111 $as_echo_n "checking whether we should treat compiler warnings as errors... " >&6; }
46112 # Check whether --enable-warnings-as-errors was given.
46113 if test "${enable_warnings_as_errors+set}" = set; then :
46114 enableval=$enable_warnings_as_errors;
46115 if test "x$ac_supports_gcc_flags" = "xyes" -a "x$enableval" = "xyes"; then
46116 with_warnings_as_errors="yes"
46117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46118 $as_echo "yes" >&6; }
46119 else
46120 with_warnings_as_errors="no"
46121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46122 $as_echo "no" >&6; }
46123 fi
46124  
46125 else
46126  
46127 if test "x$ac_supports_gcc_flags" = "xyes" -a "x$wireshark_extra_flags" = "x" -a "x$warnings_as_errors_default" = "xyes"; then
46128 with_warnings_as_errors="yes"
46129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46130 $as_echo "yes" >&6; }
46131 else
46132 with_warnings_as_errors="no"
46133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46134 $as_echo "no" >&6; }
46135 fi
46136  
46137 fi
46138  
46139  
46140 if test "x$with_warnings_as_errors" = "xyes"; then :
46141 WERROR="-Werror"
46142 else
46143 WERROR=""
46144 fi
46145  
46146 if test "x$with_warnings_as_errors" = "xyes"; then
46147 HAVE_WARNINGS_AS_ERRORS_TRUE=
46148 HAVE_WARNINGS_AS_ERRORS_FALSE='#'
46149 else
46150 HAVE_WARNINGS_AS_ERRORS_TRUE='#'
46151 HAVE_WARNINGS_AS_ERRORS_FALSE=
46152 fi
46153  
46154  
46155 #
46156 # Add any platform-specific compiler flags needed.
46157 #
46158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for platform-specific compiler flags" >&5
46159 $as_echo_n "checking for platform-specific compiler flags... " >&6; }
46160 if test "x$GCC" = "xyes" ; then
46161 #
46162 # GCC - do any platform-specific tweaking necessary.
46163 #
46164 case "$host_os" in
46165 solaris*)
46166 # the X11 headers don't automatically include prototype info
46167 # and a lot don't include the return type
46168 WS_CPPFLAGS="$WS_CPPFLAGS -DFUNCPROTO=15"
46169 WS_CFLAGS="$WS_CFLAGS -Wno-return-type"
46170 WS_CXXFLAGS="$WS_CXXFLAGS -Wno-return-type"
46171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: GCC on Solaris - added -Wno-return-type -DFUNCPROTO=15" >&5
46172 $as_echo "GCC on Solaris - added -Wno-return-type -DFUNCPROTO=15" >&6; }
46173 ;;
46174 *)
46175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
46176 $as_echo "none needed" >&6; }
46177 ;;
46178 esac
46179 else
46180 #
46181 # Not GCC - assume it's the vendor's compiler.
46182 #
46183 case "$host_os" in
46184 hpux*)
46185 #
46186 # AC_PROG_CC_STDC should already have added whatever
46187 # flags are necessary for ISO C - C99 if available,
46188 # otherwise C89 - with extensions.
46189 #
46190 # Add +O2, for optimization, as suggested by Jost Martin.
46191 # XXX - works with "-g"?
46192 #
46193 # +O2 is supported both by the C and C++ compiler.
46194 #
46195 WS_CFLAGS="+O2 $WS_CFLAGS"
46196 if test "$CC" = "$CC_FOR_BUILD"; then
46197 #
46198 # We're building the build tools with the same
46199 # compiler as the one with which we're building
46200 # Wireshark, so add the flags to the flags for
46201 # that compiler as well.
46202 #
46203 CFLAGS_FOR_BUILD="-Ae +O2 $CFLAGS"
46204 fi
46205 WS_CXXFLAGS="+O2 $WS_CXXFLAGS"
46206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: HP C/C++ compiler - added +O2" >&5
46207 $as_echo "HP C/C++ compiler - added +O2" >&6; }
46208 ;;
46209 solaris*)
46210 #
46211 # Crank up the warning level.
46212 #
46213 WS_CFLAGS="$WS_CFLAGS -v"
46214 WS_CXXFLAGS="$WS_CXXFLAGS +w2"
46215 ;;
46216 *)
46217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
46218 $as_echo "none needed" >&6; }
46219 ;;
46220 esac
46221 fi
46222  
46223 #
46224 # Add any platform-specific linker flags needed.
46225 #
46226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for platform-specific linker flags" >&5
46227 $as_echo_n "checking for platform-specific linker flags... " >&6; }
46228 case "$host_os" in
46229 darwin*)
46230 #
46231 # Add -Wl,-single_module to the LDFLAGS used with shared
46232 # libraries, to fix some error that show up in some cases;
46233 # some Apple documentation recommends it for most shared
46234 # libraries.
46235 #
46236 LDFLAGS_SHAREDLIB="-Wl,-single_module"
46237 #
46238 # Add -Wl,-headerpad_max_install_names to the LDFLAGS, as
46239 # code-signing issues is running out of padding space.
46240 #
46241 # Add -Wl,-search_paths_first to make sure that if we search
46242 # directories A and B, in that order, for a given library, a
46243 # non-shared version in directory A, rather than a shared
46244 # version in directory B, is chosen (so we can use
46245 # --with-pcap=/usr/local to force all programs to be linked
46246 # with a static version installed in /usr/local/lib rather than
46247 # the system version in /usr/lib).
46248 #
46249 WS_LDFLAGS="-Wl,-headerpad_max_install_names -Wl,-search_paths_first $WS_LDFLAGS"
46250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Apple linker - added -Wl,-single_module to shared library linker flags and -Wl,-headerpad_max_install_names -Wl,-search_paths_first and -Wl,-headerpad_max_install_names to all linker flags" >&5
46251 $as_echo "Apple linker - added -Wl,-single_module to shared library linker flags and -Wl,-headerpad_max_install_names -Wl,-search_paths_first and -Wl,-headerpad_max_install_names to all linker flags" >&6; }
46252 ;;
46253 cygwin*)
46254 #
46255 # Shared libraries in cygwin/Win32 must never contain
46256 # undefined symbols.
46257 #
46258 WS_LDFLAGS="$WS_LDFLAGS -no-undefined"
46259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: CygWin GNU ld - added -no-undefined" >&5
46260 $as_echo "CygWin GNU ld - added -no-undefined" >&6; }
46261 ;;
46262 *)
46263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
46264 $as_echo "none needed" >&6; }
46265 ;;
46266 esac
46267  
46268  
46269 #
46270 # On "Darwin", which we assume to mean "OS X" rather than "iOS" or
46271 # "just Darwin" (as we don't currently support iOS, and as I don't
46272 # think you can build and run "just Darwin" as an OS for PCs), we
46273 # arrange to build some programs with Application Services so they
46274 # can launch Web browsers and Finder windows, arrange to build some
46275 # programs with System Configuration so they can get "friendly names"
46276 # and other information about interfaces, and build any programs that
46277 # use either of those frameworks or that report version information
46278 # with Core Foundation as the frameworks in question use it and as we
46279 # get version information from plists and thus need Core Foundation
46280 # to process those plists.
46281 #
46282 have_os_x_frameworks=no
46283 case "$host_os" in
46284 darwin*)
46285 have_os_x_frameworks=yes
46286  
46287 $as_echo "#define HAVE_OS_X_FRAMEWORKS 1" >>confdefs.h
46288  
46289 APPLICATIONSERVICES_FRAMEWORKS="-framework ApplicationServices"
46290 SYSTEMCONFIGURATION_FRAMEWORKS="-framework SystemConfiguration"
46291 COREFOUNDATION_FRAMEWORKS="-framework CoreFoundation"
46292  
46293 #
46294 # OK, so we have the OS X frameworks; do they include
46295 # CFPropertyListCreateWithStream, or do we have
46296 # to fall back on CFPropertyListCreateFromStream?
46297 # (They only differ in the error return, which we
46298 # don't care about. And, no, we shouldn't just
46299 # use CFPropertyListCreateFromStream, because it's
46300 # deprecated in newer releases.)
46301 #
46302 ac_save_LIBS="$LIBS"
46303 LIBS="$LIBS $COREFOUNDATION_FRAMEWORKS"
46304 for ac_func in CFPropertyListCreateWithStream
46305 do :
46306 ac_fn_c_check_func "$LINENO" "CFPropertyListCreateWithStream" "ac_cv_func_CFPropertyListCreateWithStream"
46307 if test "x$ac_cv_func_CFPropertyListCreateWithStream" = xyes; then :
46308 cat >>confdefs.h <<_ACEOF
46309 #define HAVE_CFPROPERTYLISTCREATEWITHSTREAM 1
46310 _ACEOF
46311  
46312 fi
46313 done
46314  
46315 LIBS="$ac_save_LIBS"
46316 ;;
46317 esac
46318  
46319  
46320  
46321 if test "x$have_os_x_frameworks" = "xyes"; then
46322 HAVE_OS_X_FRAMEWORKS_TRUE=
46323 HAVE_OS_X_FRAMEWORKS_FALSE='#'
46324 else
46325 HAVE_OS_X_FRAMEWORKS_TRUE='#'
46326 HAVE_OS_X_FRAMEWORKS_FALSE=
46327 fi
46328  
46329  
46330 #
46331 # If we're running Solaris, and LD_LIBRARY_PATH is defined, add it as a
46332 # link directory.
46333 #
46334 case "$host_os" in
46335 solaris*)
46336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LD_LIBRARY_PATH" >&5
46337 $as_echo_n "checking for LD_LIBRARY_PATH... " >&6; }
46338 if test x$LD_LIBRARY_PATH != x ; then
46339 LIBS="$LIBS -R$LD_LIBRARY_PATH"
46340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes -- added LD_LIBRARY_PATH to run-time linker path" >&5
46341 $as_echo "yes -- added LD_LIBRARY_PATH to run-time linker path" >&6; }
46342 else
46343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no -- this may be a problem in a few seconds" >&5
46344 $as_echo "no -- this may be a problem in a few seconds" >&6; }
46345 fi
46346 ;;
46347 esac
46348  
46349 # Enable/disable wireshark
46350 # Check whether --enable-wireshark was given.
46351 if test "${enable_wireshark+set}" = set; then :
46352 enableval=$enable_wireshark; enable_wireshark=$enableval
46353 else
46354 enable_wireshark=yes
46355 fi
46356  
46357 if test x$enable_wireshark = xyes; then
46358 BUILDING_WIRESHARK_TRUE=
46359 BUILDING_WIRESHARK_FALSE='#'
46360 else
46361 BUILDING_WIRESHARK_TRUE='#'
46362 BUILDING_WIRESHARK_FALSE=
46363 fi
46364  
46365  
46366 # Check whether --enable-packet-editor was given.
46367 if test "${enable_packet_editor+set}" = set; then :
46368 enableval=$enable_packet_editor; enable_packet_editor=$enableval
46369 else
46370 enable_packet_editor=yes
46371 fi
46372  
46373 if test x$enable_packet_editor = xyes; then
46374  
46375 $as_echo "#define WANT_PACKET_EDITOR 1" >>confdefs.h
46376  
46377 fi
46378  
46379 # Check whether --enable-profile-build was given.
46380 if test "${enable_profile_build+set}" = set; then :
46381 enableval=$enable_profile_build; enable_profile_build=$enableval
46382 else
46383 enable_profile_build=no
46384 fi
46385  
46386 if test x$enable_profile_build = xyes; then
46387 USE_PROFILE_BUILD_TRUE=
46388 USE_PROFILE_BUILD_FALSE='#'
46389 else
46390 USE_PROFILE_BUILD_TRUE='#'
46391 USE_PROFILE_BUILD_FALSE=
46392 fi
46393  
46394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if profile builds must be generated" >&5
46395 $as_echo_n "checking if profile builds must be generated... " >&6; }
46396 if test "x$enable_profile_build" = "xyes" ; then
46397 if test "x$GCC" = "xyes" -o "x$CLANG" = "xyes" ; then
46398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46399 $as_echo "yes" >&6; }
46400 WS_CFLAGS="-pg $WS_CFLAGS"
46401 WS_CXXFLAGS="-pg $WS_CXXFLAGS"
46402 else
46403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46404 $as_echo "no" >&6; }
46405 echo "Building profile binaries currently only supported for GCC and clang."
46406 fi
46407 else
46408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46409 $as_echo "no" >&6; }
46410 fi
46411  
46412 GLIB_MIN_VERSION=2.16.0
46413  
46414 # GLib checks; we require GLib $GLIB_MIN_VERSION or later, and require gmodule
46415 # support, as we need that for dynamically loading plugins.
46416 #
46417 # Release dates for GLib versions:
46418 # 2.14.0: 03 Aug 2007
46419 # 2.16.0: 10 Mar 2008
46420 # 2.18.0: 02 Sep 2008
46421 # 2.20.0: 13 Mar 2009
46422 # 2.22.0: 22 Sep 2009
46423 # 2.24.0: 28 Mar 2010
46424 # 2.26.0: 27 Sep 2010
46425 # 2.28.0: 08 Feb 2011
46426 # 2.30.0: 27 Sep 2011
46427 # 2.32.0: 24 Mar 2012
46428 # 2.34.0: 24 Sep 2012
46429 # 2.36.0: 25 Mar 2013
46430 # 2.38.0: 23 Sep 2013
46431 # 2.40.0: 24 Mar 2014
46432 # 2.42.0: 22 Sep 2014
46433 # 2.44.0: 23 Mar 2014
46434 # 2.46.0: 25 Sep 2015
46435  
46436  
46437  
46438 pkg_failed=no
46439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5
46440 $as_echo_n "checking for GLIB... " >&6; }
46441  
46442 if test -n "$GLIB_CFLAGS"; then
46443 pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS"
46444 elif test -n "$PKG_CONFIG"; then
46445 if test -n "$PKG_CONFIG" && \
46446 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_MIN_VERSION gthread-2.0 >= \$GLIB_MIN_VERSION gmodule-2.0 >= \$GLIB_MIN_VERSION\""; } >&5
46447 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION") 2>&5
46448 ac_status=$?
46449 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46450 test $ac_status = 0; }; then
46451 pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION" 2>/dev/null`
46452 test "x$?" != "x0" && pkg_failed=yes
46453 else
46454 pkg_failed=yes
46455 fi
46456 else
46457 pkg_failed=untried
46458 fi
46459 if test -n "$GLIB_LIBS"; then
46460 pkg_cv_GLIB_LIBS="$GLIB_LIBS"
46461 elif test -n "$PKG_CONFIG"; then
46462 if test -n "$PKG_CONFIG" && \
46463 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_MIN_VERSION gthread-2.0 >= \$GLIB_MIN_VERSION gmodule-2.0 >= \$GLIB_MIN_VERSION\""; } >&5
46464 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION") 2>&5
46465 ac_status=$?
46466 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46467 test $ac_status = 0; }; then
46468 pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION" 2>/dev/null`
46469 test "x$?" != "x0" && pkg_failed=yes
46470 else
46471 pkg_failed=yes
46472 fi
46473 else
46474 pkg_failed=untried
46475 fi
46476  
46477  
46478  
46479 if test $pkg_failed = yes; then
46480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46481 $as_echo "no" >&6; }
46482  
46483 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
46484 _pkg_short_errors_supported=yes
46485 else
46486 _pkg_short_errors_supported=no
46487 fi
46488 if test $_pkg_short_errors_supported = yes; then
46489 GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION" 2>&1`
46490 else
46491 GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION" 2>&1`
46492 fi
46493 # Put the nasty error message in config.log where it belongs
46494 echo "$GLIB_PKG_ERRORS" >&5
46495  
46496 as_fn_error $? "GLib $GLIB_MIN_VERSION or later not found." "$LINENO" 5
46497 elif test $pkg_failed = untried; then
46498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46499 $as_echo "no" >&6; }
46500 as_fn_error $? "GLib $GLIB_MIN_VERSION or later not found." "$LINENO" 5
46501 else
46502 GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS
46503 GLIB_LIBS=$pkg_cv_GLIB_LIBS
46504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46505 $as_echo "yes" >&6; }
46506 GLIB_VERSION=`$PKG_CONFIG --modversion glib-2.0`
46507 fi
46508  
46509 if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
46510 GLIB_CFLAGS=`echo " $GLIB_CFLAGS" \
46511 | sed -e 's/ *-I *\// -isystem\//g' -e 's/^ *//'`
46512 fi
46513  
46514  
46515  
46516 # Error out if a glib header other than a "top level" header
46517 # (glib.h, glib-object.h, gio.h) or certain other headers( e.g.,gmodule.h)
46518 # is used.
46519  
46520 if ${GLIB_CONFIG+:} false; then :
46521  
46522 case " $GLIB_CONFIG " in #(
46523 *" -DG_DISABLE_SINGLE_INCLUDES "*) :
46524 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GLIB_CONFIG already contains -DG_DISABLE_SINGLE_INCLUDES"; } >&5
46525 (: GLIB_CONFIG already contains -DG_DISABLE_SINGLE_INCLUDES) 2>&5
46526 ac_status=$?
46527 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46528 test $ac_status = 0; } ;; #(
46529 *) :
46530  
46531 as_fn_append GLIB_CONFIG " -DG_DISABLE_SINGLE_INCLUDES"
46532 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GLIB_CONFIG=\"\$GLIB_CONFIG\""; } >&5
46533 (: GLIB_CONFIG="$GLIB_CONFIG") 2>&5
46534 ac_status=$?
46535 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46536 test $ac_status = 0; }
46537 ;;
46538 esac
46539  
46540 else
46541  
46542 GLIB_CONFIG=-DG_DISABLE_SINGLE_INCLUDES
46543 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GLIB_CONFIG=\"\$GLIB_CONFIG\""; } >&5
46544 (: GLIB_CONFIG="$GLIB_CONFIG") 2>&5
46545 ac_status=$?
46546 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46547 test $ac_status = 0; }
46548  
46549 fi
46550  
46551  
46552 # Error out on the usage of deprecated glib functions
46553  
46554 if ${GLIB_CONFIG+:} false; then :
46555  
46556 case " $GLIB_CONFIG " in #(
46557 *" -DG_DISABLE_DEPRECATED "*) :
46558 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GLIB_CONFIG already contains -DG_DISABLE_DEPRECATED"; } >&5
46559 (: GLIB_CONFIG already contains -DG_DISABLE_DEPRECATED) 2>&5
46560 ac_status=$?
46561 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46562 test $ac_status = 0; } ;; #(
46563 *) :
46564  
46565 as_fn_append GLIB_CONFIG " -DG_DISABLE_DEPRECATED"
46566 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GLIB_CONFIG=\"\$GLIB_CONFIG\""; } >&5
46567 (: GLIB_CONFIG="$GLIB_CONFIG") 2>&5
46568 ac_status=$?
46569 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46570 test $ac_status = 0; }
46571 ;;
46572 esac
46573  
46574 else
46575  
46576 GLIB_CONFIG=-DG_DISABLE_DEPRECATED
46577 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GLIB_CONFIG=\"\$GLIB_CONFIG\""; } >&5
46578 (: GLIB_CONFIG="$GLIB_CONFIG") 2>&5
46579 ac_status=$?
46580 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46581 test $ac_status = 0; }
46582  
46583 fi
46584  
46585  
46586 GLIB_CFLAGS="$GLIB_CONFIG $GLIB_CFLAGS"
46587  
46588  
46589  
46590 GTK2_MIN_VERSION=2.12.0
46591  
46592 GTK3_MIN_VERSION=3.0.0
46593  
46594 QT_MIN_VERSION=4.7.0
46595  
46596 # GTK+ and Qt checks; we require GTK+ $GTK2_MIN_VERSION or later or
46597 # GTK3_MIN_VERSION or later or Qt $QT_MIN_VERSION or later.
46598 #
46599 # We only do those if we're going to be building Wireshark;
46600 # otherwise, we don't have any GUI to build, so we don't use
46601 # GTK+ or Qt.
46602 #
46603 # We don't add $GTK_LIBS or $Qt_LIBS to LIBS, because we don't want to
46604 # force all programs to be built with GTK+ or Qt.
46605 #
46606 # Release dates for GTK+ versions:
46607 # https://en.wikipedia.org/wiki/GTK+#Releases
46608 # 2.12.0: 14 Sep 2007
46609 # 2.14.0: 04 Sep 2008
46610 # 2.16.0: 13 Mar 2009
46611 # 2.18.0: 23 Sep 2009
46612 # 2.20.0: 23 Mar 2010
46613 # 2.22.0: 23 Sep 2010
46614 # 2.24.0: 30 Jan 2011
46615 # 3.0.0: 10 Feb 2011
46616 # 3.2.0: 25 Sep 2011
46617 # 3.4.0: 26 Mar 2012
46618 # 3.6.0: 24 Sep 2012
46619 # 3.8.0: 25 Mar 2013
46620 # 3.10.0: 23 Sep 2013
46621 # 3.12.0: 25 Mar 2014
46622 # 3.14.0: 30 Sep 2014
46623 # 3.16.0: 22 Mar 2015
46624 # 3.18.0 22 Sep 2015
46625 #
46626 # Release dates for Qt versions:
46627 # https://en.wikipedia.org/wiki/List_of_Qt_releases
46628 # 4.6.0: 01 Dec 2009
46629 # 4.7.0: 21 Sep 2010
46630 # 4.8.0: 15 Dec 2011
46631 # 5.0.0: 19 Dec 2012
46632 # 5.1.0: 03 Jul 2013
46633 # 5.2.0: 12 Dec 2013
46634 # 5.3.0: 20 May 2014
46635 # 5.4.0: 10 Dec 2015
46636 # 5.5.0: 01 Jul 2015
46637  
46638 have_qt=no
46639 have_gtk=no
46640 if test "x$enable_wireshark" = "xyes"; then
46641 if test "x$with_qt" != "xno"; then
46642 #
46643 # Qt was specified; make sure we have a C++ compiler.
46644 #
46645 if test -z "$CXX"; then
46646 as_fn_error $? "Need a working C++ compiler to build Wireshark with Qt" "$LINENO" 5
46647 fi
46648  
46649 #
46650 # Now make sure we have Qt and, if so, add the flags
46651 # for it to CFLAGS and CXXFLAGS.
46652 #
46653  
46654  
46655 qt_version_to_check=""$with_qt""
46656  
46657 #
46658 # Check for the Core module; if we don't have that,
46659 # we don't have Qt. If we *do* have it, we know what
46660 # version it is, so only check for that version of
46661 # other modules.
46662 #
46663  
46664 #
46665 # Prior to Qt 5, modules were named QtXXX.
46666 # In Qt 5, they're named Qt5XXX.
46667 # This will need to change to handle future major Qt releases.
46668 #
46669 case "$qt_version_to_check" in
46670  
46671 yes|unspecified)
46672 #
46673 # Check for all versions of Qt we support.
46674 # Try the Qt 5 version first.
46675 #
46676 versions="5 4"
46677 ;;
46678  
46679 4)
46680 #
46681 # Check for Qt 4.
46682 #
46683 versions="4"
46684 ;;
46685  
46686 5)
46687 #
46688 # Check for Qt 5.
46689 #
46690 versions="5"
46691 ;;
46692  
46693 *)
46694 as_fn_error $? "Qt version $qt_version_to_check is not a known Qt version" "$LINENO" 5
46695 ;;
46696 esac
46697  
46698 for version in $versions
46699 do
46700  
46701 case "$version" in
46702  
46703 4)
46704 #
46705 # Check for Qt 4.
46706 #
46707 modprefix="Qt"
46708 #
46709 # Version of the module we're checking for.
46710 # Default to 4.0.0.
46711 #
46712 min_qt_version=$QT_MIN_VERSION
46713 ;;
46714  
46715 5)
46716 #
46717 # Check for Qt 5.
46718 #
46719 modprefix="Qt5"
46720 #
46721 # Version of the module we're checking for.
46722 # Default to 5.0.0.
46723 #
46724 min_qt_version=5.0.0
46725 ;;
46726  
46727 *)
46728 as_fn_error $? "Qt version $version is not a known Qt version" "$LINENO" 5
46729 ;;
46730 esac
46731  
46732 pkg_config_module="${modprefix}Core"
46733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pkg_config_module - version >= $min_qt_version" >&5
46734 $as_echo_n "checking for $pkg_config_module - version >= $min_qt_version... " >&6; }
46735 if $PKG_CONFIG --atleast-version $min_qt_version $pkg_config_module; then
46736 mod_version=`$PKG_CONFIG --modversion $pkg_config_module`
46737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (version $mod_version)" >&5
46738 $as_echo "yes (version $mod_version)" >&6; }
46739 mod_cflags=`$PKG_CONFIG --cflags $pkg_config_module`
46740  
46741 if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
46742 mod_cflags=`echo " $mod_cflags" \
46743 | sed -e 's/ *-I *\// -isystem\//g' -e 's/^ *//'`
46744 fi
46745  
46746 Qt_CFLAGS="$Qt_CFLAGS $mod_cflags"
46747 Qt_LIBS="$Qt_LIBS `$PKG_CONFIG --libs $pkg_config_module`"
46748 # Run Action-If-Found
46749 foundit=yes
46750 else
46751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46752 $as_echo "no" >&6; }
46753 # Run Action-If-Not-Found
46754 foundit=no
46755 fi
46756  
46757 if test "x$foundit" = "xyes"; then
46758 break
46759 fi
46760 done
46761  
46762 if test "x$foundit" = "xyes"; then
46763 # Remember which version of Qt we found
46764 qt_version=$version
46765 # Run Action-If-Found
46766  
46767 qt_version_to_check=$qt_version
46768 QT_VERSION=$mod_version
46769 QT_VERSION_MAJOR=`echo "$QT_VERSION" | cut -f1 -d.`
46770 QT_VERSION_MINOR=`echo "$QT_VERSION" | cut -f2 -d.`
46771 QT_VERSION_MICRO=`echo "$QT_VERSION" | cut -f3 -d.`
46772  
46773 # Qt 5.7 and later requires C++11
46774 if test $QT_VERSION_MAJOR -eq 5 -a $QT_VERSION_MINOR -ge 7; then :
46775 if test "$HAVE_CXX11" -eq 0; then :
46776 as_fn_error $? "Qt 5.7 and later requires C++11" "$LINENO" 5
46777 fi
46778 fi
46779  
46780  
46781 else
46782 # Run Action-If-Not-Found
46783 no_qt=yes
46784 fi
46785  
46786  
46787 if test x"$no_qt" = x ; then
46788 #
46789 # We need the Gui module as well.
46790 #
46791  
46792 #
46793 # Prior to Qt 5, modules were named QtXXX.
46794 # In Qt 5, they're named Qt5XXX.
46795 # This will need to change to handle future major Qt releases.
46796 #
46797 case "$qt_version_to_check" in
46798  
46799 yes|unspecified)
46800 #
46801 # Check for all versions of Qt we support.
46802 # Try the Qt 5 version first.
46803 #
46804 versions="5 4"
46805 ;;
46806  
46807 4)
46808 #
46809 # Check for Qt 4.
46810 #
46811 versions="4"
46812 ;;
46813  
46814 5)
46815 #
46816 # Check for Qt 5.
46817 #
46818 versions="5"
46819 ;;
46820  
46821 *)
46822 as_fn_error $? "Qt version $qt_version_to_check is not a known Qt version" "$LINENO" 5
46823 ;;
46824 esac
46825  
46826 for version in $versions
46827 do
46828  
46829 case "$version" in
46830  
46831 4)
46832 #
46833 # Check for Qt 4.
46834 #
46835 modprefix="Qt"
46836 #
46837 # Version of the module we're checking for.
46838 # Default to 4.0.0.
46839 #
46840 min_qt_version=$QT_MIN_VERSION
46841 ;;
46842  
46843 5)
46844 #
46845 # Check for Qt 5.
46846 #
46847 modprefix="Qt5"
46848 #
46849 # Version of the module we're checking for.
46850 # Default to 5.0.0.
46851 #
46852 min_qt_version=5.0.0
46853 ;;
46854  
46855 *)
46856 as_fn_error $? "Qt version $version is not a known Qt version" "$LINENO" 5
46857 ;;
46858 esac
46859  
46860 pkg_config_module="${modprefix}Gui"
46861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pkg_config_module - version >= $min_qt_version" >&5
46862 $as_echo_n "checking for $pkg_config_module - version >= $min_qt_version... " >&6; }
46863 if $PKG_CONFIG --atleast-version $min_qt_version $pkg_config_module; then
46864 mod_version=`$PKG_CONFIG --modversion $pkg_config_module`
46865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (version $mod_version)" >&5
46866 $as_echo "yes (version $mod_version)" >&6; }
46867 mod_cflags=`$PKG_CONFIG --cflags $pkg_config_module`
46868  
46869 if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
46870 mod_cflags=`echo " $mod_cflags" \
46871 | sed -e 's/ *-I *\// -isystem\//g' -e 's/^ *//'`
46872 fi
46873  
46874 Qt_CFLAGS="$Qt_CFLAGS $mod_cflags"
46875 Qt_LIBS="$Qt_LIBS `$PKG_CONFIG --libs $pkg_config_module`"
46876 # Run Action-If-Found
46877 foundit=yes
46878 else
46879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46880 $as_echo "no" >&6; }
46881 # Run Action-If-Not-Found
46882 foundit=no
46883 fi
46884  
46885 if test "x$foundit" = "xyes"; then
46886 break
46887 fi
46888 done
46889  
46890 if test "x$foundit" = "xyes"; then
46891 # Remember which version of Qt we found
46892 qt_version=$version
46893 # Run Action-If-Found
46894 :
46895 else
46896 # Run Action-If-Not-Found
46897 no_qt=yes
46898 fi
46899  
46900 fi
46901  
46902 if test x"$no_qt" = x ; then
46903 #
46904 # Qt 5.0 appears to move the widgets out of Qt GUI
46905 # to Qt Widgets; look for the Widgets module, but
46906 # don't fail if we don't have it.
46907 #
46908  
46909 #
46910 # Prior to Qt 5, modules were named QtXXX.
46911 # In Qt 5, they're named Qt5XXX.
46912 # This will need to change to handle future major Qt releases.
46913 #
46914 case "$qt_version_to_check" in
46915  
46916 yes|unspecified)
46917 #
46918 # Check for all versions of Qt we support.
46919 # Try the Qt 5 version first.
46920 #
46921 versions="5 4"
46922 ;;
46923  
46924 4)
46925 #
46926 # Check for Qt 4.
46927 #
46928 versions="4"
46929 ;;
46930  
46931 5)
46932 #
46933 # Check for Qt 5.
46934 #
46935 versions="5"
46936 ;;
46937  
46938 *)
46939 as_fn_error $? "Qt version $qt_version_to_check is not a known Qt version" "$LINENO" 5
46940 ;;
46941 esac
46942  
46943 for version in $versions
46944 do
46945  
46946 case "$version" in
46947  
46948 4)
46949 #
46950 # Check for Qt 4.
46951 #
46952 modprefix="Qt"
46953 #
46954 # Version of the module we're checking for.
46955 # Default to 4.0.0.
46956 #
46957 min_qt_version=$QT_MIN_VERSION
46958 ;;
46959  
46960 5)
46961 #
46962 # Check for Qt 5.
46963 #
46964 modprefix="Qt5"
46965 #
46966 # Version of the module we're checking for.
46967 # Default to 5.0.0.
46968 #
46969 min_qt_version=5.0.0
46970 ;;
46971  
46972 *)
46973 as_fn_error $? "Qt version $version is not a known Qt version" "$LINENO" 5
46974 ;;
46975 esac
46976  
46977 pkg_config_module="${modprefix}Widgets"
46978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pkg_config_module - version >= $min_qt_version" >&5
46979 $as_echo_n "checking for $pkg_config_module - version >= $min_qt_version... " >&6; }
46980 if $PKG_CONFIG --atleast-version $min_qt_version $pkg_config_module; then
46981 mod_version=`$PKG_CONFIG --modversion $pkg_config_module`
46982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (version $mod_version)" >&5
46983 $as_echo "yes (version $mod_version)" >&6; }
46984 mod_cflags=`$PKG_CONFIG --cflags $pkg_config_module`
46985  
46986 if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
46987 mod_cflags=`echo " $mod_cflags" \
46988 | sed -e 's/ *-I *\// -isystem\//g' -e 's/^ *//'`
46989 fi
46990  
46991 Qt_CFLAGS="$Qt_CFLAGS $mod_cflags"
46992 Qt_LIBS="$Qt_LIBS `$PKG_CONFIG --libs $pkg_config_module`"
46993 # Run Action-If-Found
46994 foundit=yes
46995 else
46996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46997 $as_echo "no" >&6; }
46998 # Run Action-If-Not-Found
46999 foundit=no
47000 fi
47001  
47002 if test "x$foundit" = "xyes"; then
47003 break
47004 fi
47005 done
47006  
47007 if test "x$foundit" = "xyes"; then
47008 # Remember which version of Qt we found
47009 qt_version=$version
47010 # Run Action-If-Found
47011 :
47012 else
47013 # Run Action-If-Not-Found
47014 :
47015 fi
47016  
47017  
47018 #
47019 # Qt 5.0 also appears to move the printing support into
47020 # the Qt PrintSupport module.
47021 #
47022  
47023 #
47024 # Prior to Qt 5, modules were named QtXXX.
47025 # In Qt 5, they're named Qt5XXX.
47026 # This will need to change to handle future major Qt releases.
47027 #
47028 case "$qt_version_to_check" in
47029  
47030 yes|unspecified)
47031 #
47032 # Check for all versions of Qt we support.
47033 # Try the Qt 5 version first.
47034 #
47035 versions="5 4"
47036 ;;
47037  
47038 4)
47039 #
47040 # Check for Qt 4.
47041 #
47042 versions="4"
47043 ;;
47044  
47045 5)
47046 #
47047 # Check for Qt 5.
47048 #
47049 versions="5"
47050 ;;
47051  
47052 *)
47053 as_fn_error $? "Qt version $qt_version_to_check is not a known Qt version" "$LINENO" 5
47054 ;;
47055 esac
47056  
47057 for version in $versions
47058 do
47059  
47060 case "$version" in
47061  
47062 4)
47063 #
47064 # Check for Qt 4.
47065 #
47066 modprefix="Qt"
47067 #
47068 # Version of the module we're checking for.
47069 # Default to 4.0.0.
47070 #
47071 min_qt_version=$QT_MIN_VERSION
47072 ;;
47073  
47074 5)
47075 #
47076 # Check for Qt 5.
47077 #
47078 modprefix="Qt5"
47079 #
47080 # Version of the module we're checking for.
47081 # Default to 5.0.0.
47082 #
47083 min_qt_version=5.0.0
47084 ;;
47085  
47086 *)
47087 as_fn_error $? "Qt version $version is not a known Qt version" "$LINENO" 5
47088 ;;
47089 esac
47090  
47091 pkg_config_module="${modprefix}PrintSupport"
47092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pkg_config_module - version >= $min_qt_version" >&5
47093 $as_echo_n "checking for $pkg_config_module - version >= $min_qt_version... " >&6; }
47094 if $PKG_CONFIG --atleast-version $min_qt_version $pkg_config_module; then
47095 mod_version=`$PKG_CONFIG --modversion $pkg_config_module`
47096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (version $mod_version)" >&5
47097 $as_echo "yes (version $mod_version)" >&6; }
47098 mod_cflags=`$PKG_CONFIG --cflags $pkg_config_module`
47099  
47100 if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
47101 mod_cflags=`echo " $mod_cflags" \
47102 | sed -e 's/ *-I *\// -isystem\//g' -e 's/^ *//'`
47103 fi
47104  
47105 Qt_CFLAGS="$Qt_CFLAGS $mod_cflags"
47106 Qt_LIBS="$Qt_LIBS `$PKG_CONFIG --libs $pkg_config_module`"
47107 # Run Action-If-Found
47108 foundit=yes
47109 else
47110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47111 $as_echo "no" >&6; }
47112 # Run Action-If-Not-Found
47113 foundit=no
47114 fi
47115  
47116 if test "x$foundit" = "xyes"; then
47117 break
47118 fi
47119 done
47120  
47121 if test "x$foundit" = "xyes"; then
47122 # Remember which version of Qt we found
47123 qt_version=$version
47124 # Run Action-If-Found
47125 :
47126 else
47127 # Run Action-If-Not-Found
47128 :
47129 fi
47130  
47131  
47132 #
47133 # Qt 5.0 added multimedia in the Qt
47134 # Multimedia module.
47135 #
47136 have_qt_multimedia_lib=no
47137  
47138 #
47139 # Prior to Qt 5, modules were named QtXXX.
47140 # In Qt 5, they're named Qt5XXX.
47141 # This will need to change to handle future major Qt releases.
47142 #
47143 case "$qt_version_to_check" in
47144  
47145 yes|unspecified)
47146 #
47147 # Check for all versions of Qt we support.
47148 # Try the Qt 5 version first.
47149 #
47150 versions="5 4"
47151 ;;
47152  
47153 4)
47154 #
47155 # Check for Qt 4.
47156 #
47157 versions="4"
47158 ;;
47159  
47160 5)
47161 #
47162 # Check for Qt 5.
47163 #
47164 versions="5"
47165 ;;
47166  
47167 *)
47168 as_fn_error $? "Qt version $qt_version_to_check is not a known Qt version" "$LINENO" 5
47169 ;;
47170 esac
47171  
47172 for version in $versions
47173 do
47174  
47175 case "$version" in
47176  
47177 4)
47178 #
47179 # Check for Qt 4.
47180 #
47181 modprefix="Qt"
47182 #
47183 # Version of the module we're checking for.
47184 # Default to 4.0.0.
47185 #
47186 min_qt_version=$QT_MIN_VERSION
47187 ;;
47188  
47189 5)
47190 #
47191 # Check for Qt 5.
47192 #
47193 modprefix="Qt5"
47194 #
47195 # Version of the module we're checking for.
47196 # Default to 5.0.0.
47197 #
47198 min_qt_version=5.0.0
47199 ;;
47200  
47201 *)
47202 as_fn_error $? "Qt version $version is not a known Qt version" "$LINENO" 5
47203 ;;
47204 esac
47205  
47206 pkg_config_module="${modprefix}Multimedia"
47207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pkg_config_module - version >= $min_qt_version" >&5
47208 $as_echo_n "checking for $pkg_config_module - version >= $min_qt_version... " >&6; }
47209 if $PKG_CONFIG --atleast-version $min_qt_version $pkg_config_module; then
47210 mod_version=`$PKG_CONFIG --modversion $pkg_config_module`
47211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (version $mod_version)" >&5
47212 $as_echo "yes (version $mod_version)" >&6; }
47213 mod_cflags=`$PKG_CONFIG --cflags $pkg_config_module`
47214  
47215 if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
47216 mod_cflags=`echo " $mod_cflags" \
47217 | sed -e 's/ *-I *\// -isystem\//g' -e 's/^ *//'`
47218 fi
47219  
47220 Qt_CFLAGS="$Qt_CFLAGS $mod_cflags"
47221 Qt_LIBS="$Qt_LIBS `$PKG_CONFIG --libs $pkg_config_module`"
47222 # Run Action-If-Found
47223 foundit=yes
47224 else
47225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47226 $as_echo "no" >&6; }
47227 # Run Action-If-Not-Found
47228 foundit=no
47229 fi
47230  
47231 if test "x$foundit" = "xyes"; then
47232 break
47233 fi
47234 done
47235  
47236 if test "x$foundit" = "xyes"; then
47237 # Remember which version of Qt we found
47238 qt_version=$version
47239 # Run Action-If-Found
47240 have_qt_multimedia_lib=yes
47241  
47242 $as_echo "#define QT_MULTIMEDIA_LIB 1" >>confdefs.h
47243  
47244 else
47245 # Run Action-If-Not-Found
47246 :
47247 fi
47248  
47249  
47250 #
47251 # While we're at it, look for QtMacExtras. (Presumably
47252 # if we're not building for OS X, it won't be present.)
47253 #
47254 # XXX - is there anything in QtX11Extras or QtWinExtras
47255 # that we should be using?
47256 #
47257  
47258 #
47259 # Prior to Qt 5, modules were named QtXXX.
47260 # In Qt 5, they're named Qt5XXX.
47261 # This will need to change to handle future major Qt releases.
47262 #
47263 case "$qt_version_to_check" in
47264  
47265 yes|unspecified)
47266 #
47267 # Check for all versions of Qt we support.
47268 # Try the Qt 5 version first.
47269 #
47270 versions="5 4"
47271 ;;
47272  
47273 4)
47274 #
47275 # Check for Qt 4.
47276 #
47277 versions="4"
47278 ;;
47279  
47280 5)
47281 #
47282 # Check for Qt 5.
47283 #
47284 versions="5"
47285 ;;
47286  
47287 *)
47288 as_fn_error $? "Qt version $qt_version_to_check is not a known Qt version" "$LINENO" 5
47289 ;;
47290 esac
47291  
47292 for version in $versions
47293 do
47294  
47295 case "$version" in
47296  
47297 4)
47298 #
47299 # Check for Qt 4.
47300 #
47301 modprefix="Qt"
47302 #
47303 # Version of the module we're checking for.
47304 # Default to 4.0.0.
47305 #
47306 min_qt_version=$QT_MIN_VERSION
47307 ;;
47308  
47309 5)
47310 #
47311 # Check for Qt 5.
47312 #
47313 modprefix="Qt5"
47314 #
47315 # Version of the module we're checking for.
47316 # Default to 5.0.0.
47317 #
47318 min_qt_version=5.0.0
47319 ;;
47320  
47321 *)
47322 as_fn_error $? "Qt version $version is not a known Qt version" "$LINENO" 5
47323 ;;
47324 esac
47325  
47326 pkg_config_module="${modprefix}MacExtras"
47327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pkg_config_module - version >= $min_qt_version" >&5
47328 $as_echo_n "checking for $pkg_config_module - version >= $min_qt_version... " >&6; }
47329 if $PKG_CONFIG --atleast-version $min_qt_version $pkg_config_module; then
47330 mod_version=`$PKG_CONFIG --modversion $pkg_config_module`
47331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (version $mod_version)" >&5
47332 $as_echo "yes (version $mod_version)" >&6; }
47333 mod_cflags=`$PKG_CONFIG --cflags $pkg_config_module`
47334  
47335 if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
47336 mod_cflags=`echo " $mod_cflags" \
47337 | sed -e 's/ *-I *\// -isystem\//g' -e 's/^ *//'`
47338 fi
47339  
47340 Qt_CFLAGS="$Qt_CFLAGS $mod_cflags"
47341 Qt_LIBS="$Qt_LIBS `$PKG_CONFIG --libs $pkg_config_module`"
47342 # Run Action-If-Found
47343 foundit=yes
47344 else
47345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47346 $as_echo "no" >&6; }
47347 # Run Action-If-Not-Found
47348 foundit=no
47349 fi
47350  
47351 if test "x$foundit" = "xyes"; then
47352 break
47353 fi
47354 done
47355  
47356 if test "x$foundit" = "xyes"; then
47357 # Remember which version of Qt we found
47358 qt_version=$version
47359 # Run Action-If-Found
47360  
47361 $as_echo "#define QT_MACEXTRAS_LIB 1" >>confdefs.h
47362  
47363 else
47364 # Run Action-If-Not-Found
47365 :
47366 fi
47367  
47368  
47369  
47370 ac_ext=cpp
47371 ac_cpp='$CXXCPP $CPPFLAGS'
47372 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47373 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47374 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47375  
47376  
47377 ac_ws_CPPLAGS_saved="$CPPFLAGS"
47378 ac_ws_CFLAGS_saved="$CFLAGS"
47379 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
47380 ac_ws_LDFLAGS_saved="$LDFLAGS"
47381 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
47382 CFLAGS="$WS_CFLAGS $CFLAGS"
47383 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
47384 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
47385  
47386 CPPFLAGS="$CPPFLAGS $Qt_CFLAGS"
47387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Qt works without -fPIC" >&5
47388 $as_echo_n "checking whether Qt works without -fPIC... " >&6; }
47389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47390 /* end confdefs.h. */
47391 #include <QtCore>
47392 _ACEOF
47393 if ac_fn_cxx_try_cpp "$LINENO"; then :
47394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47395 $as_echo "yes" >&6; }
47396 else
47397  
47398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47399 $as_echo "no" >&6; }
47400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Qt works with -fPIC" >&5
47401 $as_echo_n "checking whether Qt works with -fPIC... " >&6; }
47402 CPPFLAGS="$CPPFLAGS -fPIC"
47403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47404 /* end confdefs.h. */
47405 #include <QtCore>
47406 _ACEOF
47407 if ac_fn_cxx_try_cpp "$LINENO"; then :
47408  
47409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47410 $as_echo "yes" >&6; }
47411 Qt_CFLAGS="$Qt_CFLAGS -fPIC"
47412  
47413 else
47414  
47415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47416 $as_echo "no" >&6; }
47417 as_fn_error $? "Couldn't compile Qt without -fPIC nor with -fPIC" "$LINENO" 5
47418  
47419 fi
47420 rm -f conftest.err conftest.i conftest.$ac_ext
47421  
47422 fi
47423 rm -f conftest.err conftest.i conftest.$ac_ext
47424  
47425 CPPFLAGS="$ac_ws_CPPLAGS_saved"
47426 CFLAGS="$ac_ws_CFLAGS_saved"
47427 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
47428 LDFLAGS="$ac_ws_LDFLAGS_saved"
47429  
47430 ac_ext=c
47431 ac_cpp='$CPP $CPPFLAGS'
47432 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47433 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47434 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47435  
47436  
47437  
47438 # Run Action-If-Found
47439  
47440  
47441  
47442 have_qt=yes
47443 GUI_CONFIGURE_FLAGS="$GUI_CONFIGURE_FLAGS --with-qt"
47444  
47445 #
47446 # We're building with Qt, so we need the Qt build
47447 # tools in order to build the Wireshark GUI.
47448 # We've found a particular major version of Qt,
47449 # and we want that version's build tools; for
47450 # example, the Qt 4 version of uic produces files
47451 # that include Qt headers with paths that work
47452 # with Qt 4 but not Qt 5, so we can't use the
47453 # Qt 4 version of uic if we're building with Qt 5.
47454  
47455 #
47456 # At least in some versions of Debian/Ubuntu, and perhaps
47457 # other OSes, the Qt build tools are just links to a
47458 # program called "qtchooser", and even if you want to
47459 # build with Qt 5, running the tool might give you the
47460 # Qt 4 version of the tool unless you run the tool with
47461 # a -qt=5 argument.
47462 #
47463 # So we look for qtchooser and, if we find it, use the
47464 # -qt={version} argument, otherwise we look for particular
47465 # tool versions using tool name suffixes.
47466 #
47467 # Extract the first word of "qtchooser", so it can be a program name with args.
47468 set dummy qtchooser; ac_word=$2
47469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47470 $as_echo_n "checking for $ac_word... " >&6; }
47471 if ${ac_cv_path_QTCHOOSER+:} false; then :
47472 $as_echo_n "(cached) " >&6
47473 else
47474 case $QTCHOOSER in
47475 [\\/]* | ?:[\\/]*)
47476 ac_cv_path_QTCHOOSER="$QTCHOOSER" # Let the user override the test with a path.
47477 ;;
47478 *)
47479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47480 for as_dir in $PATH
47481 do
47482 IFS=$as_save_IFS
47483 test -z "$as_dir" && as_dir=.
47484 for ac_exec_ext in '' $ac_executable_extensions; do
47485 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47486 ac_cv_path_QTCHOOSER="$as_dir/$ac_word$ac_exec_ext"
47487 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47488 break 2
47489 fi
47490 done
47491 done
47492 IFS=$as_save_IFS
47493  
47494 ;;
47495 esac
47496 fi
47497 QTCHOOSER=$ac_cv_path_QTCHOOSER
47498 if test -n "$QTCHOOSER"; then
47499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $QTCHOOSER" >&5
47500 $as_echo "$QTCHOOSER" >&6; }
47501 else
47502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47503 $as_echo "no" >&6; }
47504 fi
47505  
47506  
47507 if test ! -z "$QTCHOOSER"; then
47508 #
47509 # We found qtchooser; we assume that means that
47510 # the tool is linked to qtchooser, so that we
47511 # can run it with the -qt={version} flag to get
47512 # the appropriate version of the tool.
47513 #
47514 # Extract the first word of "uic", so it can be a program name with args.
47515 set dummy uic; ac_word=$2
47516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47517 $as_echo_n "checking for $ac_word... " >&6; }
47518 if ${ac_cv_path_UIC+:} false; then :
47519 $as_echo_n "(cached) " >&6
47520 else
47521 case $UIC in
47522 [\\/]* | ?:[\\/]*)
47523 ac_cv_path_UIC="$UIC" # Let the user override the test with a path.
47524 ;;
47525 *)
47526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47527 for as_dir in $PATH
47528 do
47529 IFS=$as_save_IFS
47530 test -z "$as_dir" && as_dir=.
47531 for ac_exec_ext in '' $ac_executable_extensions; do
47532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47533 ac_cv_path_UIC="$as_dir/$ac_word$ac_exec_ext"
47534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47535 break 2
47536 fi
47537 done
47538 done
47539 IFS=$as_save_IFS
47540  
47541 ;;
47542 esac
47543 fi
47544 UIC=$ac_cv_path_UIC
47545 if test -n "$UIC"; then
47546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UIC" >&5
47547 $as_echo "$UIC" >&6; }
47548 else
47549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47550 $as_echo "no" >&6; }
47551 fi
47552  
47553  
47554 if test "x$UIC" = x; then
47555 #
47556 # We can't build Qt Wireshark without that
47557 # tool..
47558 #
47559 as_fn_error $? "I couldn't find uic; make sure it's installed and in your path" "$LINENO" 5
47560 fi
47561  
47562 #
47563 # Add the -qt={version} argument to it.
47564 #
47565 UIC="$UIC -qt=$qt_version"
47566 else
47567 #
47568 # Annoyingly, on some Linux distros (e.g. Debian)
47569 # the Qt 5 tools have no suffix and the Qt 4 tools
47570 # have suffix -qt4. On other distros (e.g. openSUSE)
47571 # the Qt 5 tools have suffix -qt5 and the Qt 4 tools
47572 # have no suffix.
47573 #
47574 # So we check for the tool first with the -qtN suffix
47575 # and then with no suffix.
47576 #
47577 for ac_prog in uic-qt$qt_version uic
47578 do
47579 # Extract the first word of "$ac_prog", so it can be a program name with args.
47580 set dummy $ac_prog; ac_word=$2
47581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47582 $as_echo_n "checking for $ac_word... " >&6; }
47583 if ${ac_cv_path_UIC+:} false; then :
47584 $as_echo_n "(cached) " >&6
47585 else
47586 case $UIC in
47587 [\\/]* | ?:[\\/]*)
47588 ac_cv_path_UIC="$UIC" # Let the user override the test with a path.
47589 ;;
47590 *)
47591 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47592 for as_dir in $PATH
47593 do
47594 IFS=$as_save_IFS
47595 test -z "$as_dir" && as_dir=.
47596 for ac_exec_ext in '' $ac_executable_extensions; do
47597 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47598 ac_cv_path_UIC="$as_dir/$ac_word$ac_exec_ext"
47599 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47600 break 2
47601 fi
47602 done
47603 done
47604 IFS=$as_save_IFS
47605  
47606 ;;
47607 esac
47608 fi
47609 UIC=$ac_cv_path_UIC
47610 if test -n "$UIC"; then
47611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UIC" >&5
47612 $as_echo "$UIC" >&6; }
47613 else
47614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47615 $as_echo "no" >&6; }
47616 fi
47617  
47618  
47619 test -n "$UIC" && break
47620 done
47621  
47622 if test "x$UIC" = x; then
47623 #
47624 # We can't build Qt Wireshark without that
47625 # tool..
47626 #
47627 as_fn_error $? "I couldn't find uic-qt$qt_version or uic; make sure it's installed and in your path" "$LINENO" 5
47628 fi
47629 fi
47630  
47631  
47632  
47633 #
47634 # At least in some versions of Debian/Ubuntu, and perhaps
47635 # other OSes, the Qt build tools are just links to a
47636 # program called "qtchooser", and even if you want to
47637 # build with Qt 5, running the tool might give you the
47638 # Qt 4 version of the tool unless you run the tool with
47639 # a -qt=5 argument.
47640 #
47641 # So we look for qtchooser and, if we find it, use the
47642 # -qt={version} argument, otherwise we look for particular
47643 # tool versions using tool name suffixes.
47644 #
47645 # Extract the first word of "qtchooser", so it can be a program name with args.
47646 set dummy qtchooser; ac_word=$2
47647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47648 $as_echo_n "checking for $ac_word... " >&6; }
47649 if ${ac_cv_path_QTCHOOSER+:} false; then :
47650 $as_echo_n "(cached) " >&6
47651 else
47652 case $QTCHOOSER in
47653 [\\/]* | ?:[\\/]*)
47654 ac_cv_path_QTCHOOSER="$QTCHOOSER" # Let the user override the test with a path.
47655 ;;
47656 *)
47657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47658 for as_dir in $PATH
47659 do
47660 IFS=$as_save_IFS
47661 test -z "$as_dir" && as_dir=.
47662 for ac_exec_ext in '' $ac_executable_extensions; do
47663 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47664 ac_cv_path_QTCHOOSER="$as_dir/$ac_word$ac_exec_ext"
47665 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47666 break 2
47667 fi
47668 done
47669 done
47670 IFS=$as_save_IFS
47671  
47672 ;;
47673 esac
47674 fi
47675 QTCHOOSER=$ac_cv_path_QTCHOOSER
47676 if test -n "$QTCHOOSER"; then
47677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $QTCHOOSER" >&5
47678 $as_echo "$QTCHOOSER" >&6; }
47679 else
47680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47681 $as_echo "no" >&6; }
47682 fi
47683  
47684  
47685 if test ! -z "$QTCHOOSER"; then
47686 #
47687 # We found qtchooser; we assume that means that
47688 # the tool is linked to qtchooser, so that we
47689 # can run it with the -qt={version} flag to get
47690 # the appropriate version of the tool.
47691 #
47692 # Extract the first word of "moc", so it can be a program name with args.
47693 set dummy moc; ac_word=$2
47694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47695 $as_echo_n "checking for $ac_word... " >&6; }
47696 if ${ac_cv_path_MOC+:} false; then :
47697 $as_echo_n "(cached) " >&6
47698 else
47699 case $MOC in
47700 [\\/]* | ?:[\\/]*)
47701 ac_cv_path_MOC="$MOC" # Let the user override the test with a path.
47702 ;;
47703 *)
47704 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47705 for as_dir in $PATH
47706 do
47707 IFS=$as_save_IFS
47708 test -z "$as_dir" && as_dir=.
47709 for ac_exec_ext in '' $ac_executable_extensions; do
47710 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47711 ac_cv_path_MOC="$as_dir/$ac_word$ac_exec_ext"
47712 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47713 break 2
47714 fi
47715 done
47716 done
47717 IFS=$as_save_IFS
47718  
47719 ;;
47720 esac
47721 fi
47722 MOC=$ac_cv_path_MOC
47723 if test -n "$MOC"; then
47724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOC" >&5
47725 $as_echo "$MOC" >&6; }
47726 else
47727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47728 $as_echo "no" >&6; }
47729 fi
47730  
47731  
47732 if test "x$MOC" = x; then
47733 #
47734 # We can't build Qt Wireshark without that
47735 # tool..
47736 #
47737 as_fn_error $? "I couldn't find moc; make sure it's installed and in your path" "$LINENO" 5
47738 fi
47739  
47740 #
47741 # Add the -qt={version} argument to it.
47742 #
47743 MOC="$MOC -qt=$qt_version"
47744 else
47745 #
47746 # Annoyingly, on some Linux distros (e.g. Debian)
47747 # the Qt 5 tools have no suffix and the Qt 4 tools
47748 # have suffix -qt4. On other distros (e.g. openSUSE)
47749 # the Qt 5 tools have suffix -qt5 and the Qt 4 tools
47750 # have no suffix.
47751 #
47752 # So we check for the tool first with the -qtN suffix
47753 # and then with no suffix.
47754 #
47755 for ac_prog in moc-qt$qt_version moc
47756 do
47757 # Extract the first word of "$ac_prog", so it can be a program name with args.
47758 set dummy $ac_prog; ac_word=$2
47759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47760 $as_echo_n "checking for $ac_word... " >&6; }
47761 if ${ac_cv_path_MOC+:} false; then :
47762 $as_echo_n "(cached) " >&6
47763 else
47764 case $MOC in
47765 [\\/]* | ?:[\\/]*)
47766 ac_cv_path_MOC="$MOC" # Let the user override the test with a path.
47767 ;;
47768 *)
47769 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47770 for as_dir in $PATH
47771 do
47772 IFS=$as_save_IFS
47773 test -z "$as_dir" && as_dir=.
47774 for ac_exec_ext in '' $ac_executable_extensions; do
47775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47776 ac_cv_path_MOC="$as_dir/$ac_word$ac_exec_ext"
47777 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47778 break 2
47779 fi
47780 done
47781 done
47782 IFS=$as_save_IFS
47783  
47784 ;;
47785 esac
47786 fi
47787 MOC=$ac_cv_path_MOC
47788 if test -n "$MOC"; then
47789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOC" >&5
47790 $as_echo "$MOC" >&6; }
47791 else
47792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47793 $as_echo "no" >&6; }
47794 fi
47795  
47796  
47797 test -n "$MOC" && break
47798 done
47799  
47800 if test "x$MOC" = x; then
47801 #
47802 # We can't build Qt Wireshark without that
47803 # tool..
47804 #
47805 as_fn_error $? "I couldn't find moc-qt$qt_version or moc; make sure it's installed and in your path" "$LINENO" 5
47806 fi
47807 fi
47808  
47809  
47810  
47811 #
47812 # At least in some versions of Debian/Ubuntu, and perhaps
47813 # other OSes, the Qt build tools are just links to a
47814 # program called "qtchooser", and even if you want to
47815 # build with Qt 5, running the tool might give you the
47816 # Qt 4 version of the tool unless you run the tool with
47817 # a -qt=5 argument.
47818 #
47819 # So we look for qtchooser and, if we find it, use the
47820 # -qt={version} argument, otherwise we look for particular
47821 # tool versions using tool name suffixes.
47822 #
47823 # Extract the first word of "qtchooser", so it can be a program name with args.
47824 set dummy qtchooser; ac_word=$2
47825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47826 $as_echo_n "checking for $ac_word... " >&6; }
47827 if ${ac_cv_path_QTCHOOSER+:} false; then :
47828 $as_echo_n "(cached) " >&6
47829 else
47830 case $QTCHOOSER in
47831 [\\/]* | ?:[\\/]*)
47832 ac_cv_path_QTCHOOSER="$QTCHOOSER" # Let the user override the test with a path.
47833 ;;
47834 *)
47835 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47836 for as_dir in $PATH
47837 do
47838 IFS=$as_save_IFS
47839 test -z "$as_dir" && as_dir=.
47840 for ac_exec_ext in '' $ac_executable_extensions; do
47841 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47842 ac_cv_path_QTCHOOSER="$as_dir/$ac_word$ac_exec_ext"
47843 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47844 break 2
47845 fi
47846 done
47847 done
47848 IFS=$as_save_IFS
47849  
47850 ;;
47851 esac
47852 fi
47853 QTCHOOSER=$ac_cv_path_QTCHOOSER
47854 if test -n "$QTCHOOSER"; then
47855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $QTCHOOSER" >&5
47856 $as_echo "$QTCHOOSER" >&6; }
47857 else
47858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47859 $as_echo "no" >&6; }
47860 fi
47861  
47862  
47863 if test ! -z "$QTCHOOSER"; then
47864 #
47865 # We found qtchooser; we assume that means that
47866 # the tool is linked to qtchooser, so that we
47867 # can run it with the -qt={version} flag to get
47868 # the appropriate version of the tool.
47869 #
47870 # Extract the first word of "rcc", so it can be a program name with args.
47871 set dummy rcc; ac_word=$2
47872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47873 $as_echo_n "checking for $ac_word... " >&6; }
47874 if ${ac_cv_path_RCC+:} false; then :
47875 $as_echo_n "(cached) " >&6
47876 else
47877 case $RCC in
47878 [\\/]* | ?:[\\/]*)
47879 ac_cv_path_RCC="$RCC" # Let the user override the test with a path.
47880 ;;
47881 *)
47882 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47883 for as_dir in $PATH
47884 do
47885 IFS=$as_save_IFS
47886 test -z "$as_dir" && as_dir=.
47887 for ac_exec_ext in '' $ac_executable_extensions; do
47888 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47889 ac_cv_path_RCC="$as_dir/$ac_word$ac_exec_ext"
47890 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47891 break 2
47892 fi
47893 done
47894 done
47895 IFS=$as_save_IFS
47896  
47897 ;;
47898 esac
47899 fi
47900 RCC=$ac_cv_path_RCC
47901 if test -n "$RCC"; then
47902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RCC" >&5
47903 $as_echo "$RCC" >&6; }
47904 else
47905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47906 $as_echo "no" >&6; }
47907 fi
47908  
47909  
47910 if test "x$RCC" = x; then
47911 #
47912 # We can't build Qt Wireshark without that
47913 # tool..
47914 #
47915 as_fn_error $? "I couldn't find rcc; make sure it's installed and in your path" "$LINENO" 5
47916 fi
47917  
47918 #
47919 # Add the -qt={version} argument to it.
47920 #
47921 RCC="$RCC -qt=$qt_version"
47922 else
47923 #
47924 # Annoyingly, on some Linux distros (e.g. Debian)
47925 # the Qt 5 tools have no suffix and the Qt 4 tools
47926 # have suffix -qt4. On other distros (e.g. openSUSE)
47927 # the Qt 5 tools have suffix -qt5 and the Qt 4 tools
47928 # have no suffix.
47929 #
47930 # So we check for the tool first with the -qtN suffix
47931 # and then with no suffix.
47932 #
47933 for ac_prog in rcc-qt$qt_version rcc
47934 do
47935 # Extract the first word of "$ac_prog", so it can be a program name with args.
47936 set dummy $ac_prog; ac_word=$2
47937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47938 $as_echo_n "checking for $ac_word... " >&6; }
47939 if ${ac_cv_path_RCC+:} false; then :
47940 $as_echo_n "(cached) " >&6
47941 else
47942 case $RCC in
47943 [\\/]* | ?:[\\/]*)
47944 ac_cv_path_RCC="$RCC" # Let the user override the test with a path.
47945 ;;
47946 *)
47947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47948 for as_dir in $PATH
47949 do
47950 IFS=$as_save_IFS
47951 test -z "$as_dir" && as_dir=.
47952 for ac_exec_ext in '' $ac_executable_extensions; do
47953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47954 ac_cv_path_RCC="$as_dir/$ac_word$ac_exec_ext"
47955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47956 break 2
47957 fi
47958 done
47959 done
47960 IFS=$as_save_IFS
47961  
47962 ;;
47963 esac
47964 fi
47965 RCC=$ac_cv_path_RCC
47966 if test -n "$RCC"; then
47967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RCC" >&5
47968 $as_echo "$RCC" >&6; }
47969 else
47970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47971 $as_echo "no" >&6; }
47972 fi
47973  
47974  
47975 test -n "$RCC" && break
47976 done
47977  
47978 if test "x$RCC" = x; then
47979 #
47980 # We can't build Qt Wireshark without that
47981 # tool..
47982 #
47983 as_fn_error $? "I couldn't find rcc-qt$qt_version or rcc; make sure it's installed and in your path" "$LINENO" 5
47984 fi
47985 fi
47986  
47987  
47988  
47989  
47990 #
47991 # At least in some versions of Debian/Ubuntu, and perhaps
47992 # other OSes, the Qt build tools are just links to a
47993 # program called "qtchooser", and even if you want to
47994 # build with Qt 5, running the tool might give you the
47995 # Qt 4 version of the tool unless you run the tool with
47996 # a -qt=5 argument.
47997 #
47998 # So we look for qtchooser and, if we find it, use the
47999 # -qt={version} argument, otherwise we look for particular
48000 # tool versions using tool name suffixes.
48001 #
48002 # Extract the first word of "qtchooser", so it can be a program name with args.
48003 set dummy qtchooser; ac_word=$2
48004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48005 $as_echo_n "checking for $ac_word... " >&6; }
48006 if ${ac_cv_path_QTCHOOSER+:} false; then :
48007 $as_echo_n "(cached) " >&6
48008 else
48009 case $QTCHOOSER in
48010 [\\/]* | ?:[\\/]*)
48011 ac_cv_path_QTCHOOSER="$QTCHOOSER" # Let the user override the test with a path.
48012 ;;
48013 *)
48014 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48015 for as_dir in $PATH
48016 do
48017 IFS=$as_save_IFS
48018 test -z "$as_dir" && as_dir=.
48019 for ac_exec_ext in '' $ac_executable_extensions; do
48020 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48021 ac_cv_path_QTCHOOSER="$as_dir/$ac_word$ac_exec_ext"
48022 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48023 break 2
48024 fi
48025 done
48026 done
48027 IFS=$as_save_IFS
48028  
48029 ;;
48030 esac
48031 fi
48032 QTCHOOSER=$ac_cv_path_QTCHOOSER
48033 if test -n "$QTCHOOSER"; then
48034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $QTCHOOSER" >&5
48035 $as_echo "$QTCHOOSER" >&6; }
48036 else
48037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48038 $as_echo "no" >&6; }
48039 fi
48040  
48041  
48042 if test ! -z "$QTCHOOSER"; then
48043 #
48044 # We found qtchooser; we assume that means that
48045 # the tool is linked to qtchooser, so that we
48046 # can run it with the -qt={version} flag to get
48047 # the appropriate version of the tool.
48048 #
48049 # Extract the first word of "lrelease", so it can be a program name with args.
48050 set dummy lrelease; ac_word=$2
48051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48052 $as_echo_n "checking for $ac_word... " >&6; }
48053 if ${ac_cv_path_LRELEASE+:} false; then :
48054 $as_echo_n "(cached) " >&6
48055 else
48056 case $LRELEASE in
48057 [\\/]* | ?:[\\/]*)
48058 ac_cv_path_LRELEASE="$LRELEASE" # Let the user override the test with a path.
48059 ;;
48060 *)
48061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48062 for as_dir in $PATH
48063 do
48064 IFS=$as_save_IFS
48065 test -z "$as_dir" && as_dir=.
48066 for ac_exec_ext in '' $ac_executable_extensions; do
48067 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48068 ac_cv_path_LRELEASE="$as_dir/$ac_word$ac_exec_ext"
48069 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48070 break 2
48071 fi
48072 done
48073 done
48074 IFS=$as_save_IFS
48075  
48076 ;;
48077 esac
48078 fi
48079 LRELEASE=$ac_cv_path_LRELEASE
48080 if test -n "$LRELEASE"; then
48081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LRELEASE" >&5
48082 $as_echo "$LRELEASE" >&6; }
48083 else
48084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48085 $as_echo "no" >&6; }
48086 fi
48087  
48088  
48089 if test "x$LRELEASE" = x; then
48090 #
48091 # We can't build Qt Wireshark without that
48092 # tool..
48093 #
48094 as_fn_error $? "I couldn't find lrelease; make sure it's installed and in your path" "$LINENO" 5
48095 fi
48096  
48097 #
48098 # Add the -qt={version} argument to it.
48099 #
48100 LRELEASE="$LRELEASE -qt=$qt_version"
48101 else
48102 #
48103 # Annoyingly, on some Linux distros (e.g. Debian)
48104 # the Qt 5 tools have no suffix and the Qt 4 tools
48105 # have suffix -qt4. On other distros (e.g. openSUSE)
48106 # the Qt 5 tools have suffix -qt5 and the Qt 4 tools
48107 # have no suffix.
48108 #
48109 # So we check for the tool first with the -qtN suffix
48110 # and then with no suffix.
48111 #
48112 for ac_prog in lrelease-qt$qt_version lrelease
48113 do
48114 # Extract the first word of "$ac_prog", so it can be a program name with args.
48115 set dummy $ac_prog; ac_word=$2
48116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48117 $as_echo_n "checking for $ac_word... " >&6; }
48118 if ${ac_cv_path_LRELEASE+:} false; then :
48119 $as_echo_n "(cached) " >&6
48120 else
48121 case $LRELEASE in
48122 [\\/]* | ?:[\\/]*)
48123 ac_cv_path_LRELEASE="$LRELEASE" # Let the user override the test with a path.
48124 ;;
48125 *)
48126 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48127 for as_dir in $PATH
48128 do
48129 IFS=$as_save_IFS
48130 test -z "$as_dir" && as_dir=.
48131 for ac_exec_ext in '' $ac_executable_extensions; do
48132 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48133 ac_cv_path_LRELEASE="$as_dir/$ac_word$ac_exec_ext"
48134 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48135 break 2
48136 fi
48137 done
48138 done
48139 IFS=$as_save_IFS
48140  
48141 ;;
48142 esac
48143 fi
48144 LRELEASE=$ac_cv_path_LRELEASE
48145 if test -n "$LRELEASE"; then
48146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LRELEASE" >&5
48147 $as_echo "$LRELEASE" >&6; }
48148 else
48149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48150 $as_echo "no" >&6; }
48151 fi
48152  
48153  
48154 test -n "$LRELEASE" && break
48155 done
48156  
48157 if test "x$LRELEASE" = x; then
48158 #
48159 # We can't build Qt Wireshark without that
48160 # tool..
48161 #
48162 as_fn_error $? "I couldn't find lrelease-qt$qt_version or lrelease; make sure it's installed and in your path" "$LINENO" 5
48163 fi
48164 fi
48165  
48166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lrelease -version works" >&5
48167 $as_echo_n "checking whether lrelease -version works... " >&6; }
48168 lrelease_version=`$LRELEASE -version 2>&5`
48169 if test $? -ne 0; then :
48170  
48171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48172 $as_echo "no" >&6; }
48173 as_fn_error $? "$LRELEASE -version returned non-zero exit status" "$LINENO" 5
48174  
48175 fi
48176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok, $lrelease_version" >&5
48177 $as_echo "ok, $lrelease_version" >&6; }
48178  
48179  
48180  
48181 #
48182 # On Darwin, find where the Qt frameworks are
48183 # located, and add that to the rpath, just in
48184 # case this is Qt 5.5 or later and the frameworks
48185 # have an install name that begins with @rpath
48186 # and aren't installed in a frameworks directory
48187 # that's searched by default.
48188 #
48189 case "$host_os" in
48190 darwin*)
48191 if test $qt_version -le 4
48192 then
48193 Qt_LDFLAGS="-Wl,-rpath,"`$PKG_CONFIG --libs QtCore | sed -e 's/-F//' -e 's/ -framework.*//'`
48194 else
48195 Qt_LDFLAGS="-Wl,-rpath,"`$PKG_CONFIG --libs Qt${qt_version}Core | sed -e 's/-F//' -e 's/ -framework.*//'`
48196 fi
48197 ;;
48198 esac
48199  
48200  
48201 if test -z "${MOC_OPTIONS+1}"
48202 then
48203 # Squelch moc verbose "nothing to do" output
48204 if test $QT_VERSION_MAJOR -eq 5
48205 then
48206 MOC_OPTIONS="-nn"
48207 elif test $QT_VERSION_MAJOR -eq 4 -a $QT_VERSION_MINOR -ge 8
48208 then
48209 MOC_OPTIONS="-nn"
48210 fi
48211 fi
48212  
48213  
48214 else
48215 # Run Action-If-Not-Found
48216  
48217 case "$with_qt" in
48218  
48219 unspecified)
48220 #
48221 # They didn't explicitly ask for Qt,
48222 # so just don't build with it.
48223 #
48224 ;;
48225  
48226 yes)
48227 as_fn_error $? "Qt is not available" "$LINENO" 5
48228 ;;
48229  
48230 4)
48231 as_fn_error $? "Qt 4 is not available" "$LINENO" 5
48232 ;;
48233  
48234 5)
48235 as_fn_error $? "Qt 5 is not available" "$LINENO" 5
48236 ;;
48237 esac
48238  
48239 fi
48240  
48241  
48242 fi
48243  
48244 for want_gtk_version in $with_gtk; do
48245 case $want_gtk_version in #(
48246 3) :
48247  
48248  
48249 pkg_failed=no
48250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
48251 $as_echo_n "checking for GTK... " >&6; }
48252  
48253 if test -n "$GTK_CFLAGS"; then
48254 pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
48255 elif test -n "$PKG_CONFIG"; then
48256 if test -n "$PKG_CONFIG" && \
48257 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= \$GTK3_MIN_VERSION glib-2.0 >= \$GLIB_MIN_VERSION gthread-2.0 >= \$GLIB_MIN_VERSION gmodule-2.0 >= \$GLIB_MIN_VERSION\""; } >&5
48258 ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= $GTK3_MIN_VERSION glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION") 2>&5
48259 ac_status=$?
48260 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48261 test $ac_status = 0; }; then
48262 pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0 >= $GTK3_MIN_VERSION glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION" 2>/dev/null`
48263 test "x$?" != "x0" && pkg_failed=yes
48264 else
48265 pkg_failed=yes
48266 fi
48267 else
48268 pkg_failed=untried
48269 fi
48270 if test -n "$GTK_LIBS"; then
48271 pkg_cv_GTK_LIBS="$GTK_LIBS"
48272 elif test -n "$PKG_CONFIG"; then
48273 if test -n "$PKG_CONFIG" && \
48274 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= \$GTK3_MIN_VERSION glib-2.0 >= \$GLIB_MIN_VERSION gthread-2.0 >= \$GLIB_MIN_VERSION gmodule-2.0 >= \$GLIB_MIN_VERSION\""; } >&5
48275 ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= $GTK3_MIN_VERSION glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION") 2>&5
48276 ac_status=$?
48277 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48278 test $ac_status = 0; }; then
48279 pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-3.0 >= $GTK3_MIN_VERSION glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION" 2>/dev/null`
48280 test "x$?" != "x0" && pkg_failed=yes
48281 else
48282 pkg_failed=yes
48283 fi
48284 else
48285 pkg_failed=untried
48286 fi
48287  
48288  
48289  
48290 if test $pkg_failed = yes; then
48291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48292 $as_echo "no" >&6; }
48293  
48294 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48295 _pkg_short_errors_supported=yes
48296 else
48297 _pkg_short_errors_supported=no
48298 fi
48299 if test $_pkg_short_errors_supported = yes; then
48300 GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-3.0 >= $GTK3_MIN_VERSION glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION" 2>&1`
48301 else
48302 GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-3.0 >= $GTK3_MIN_VERSION glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION" 2>&1`
48303 fi
48304 # Put the nasty error message in config.log where it belongs
48305 echo "$GTK_PKG_ERRORS" >&5
48306  
48307  
48308 :
48309  
48310 elif test $pkg_failed = untried; then
48311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48312 $as_echo "no" >&6; }
48313  
48314 :
48315  
48316 else
48317 GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
48318 GTK_LIBS=$pkg_cv_GTK_LIBS
48319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48320 $as_echo "yes" >&6; }
48321  
48322 have_gtk=yes
48323 GTK_VERSION=`$PKG_CONFIG --modversion gtk+-3.0`
48324 GUI_CONFIGURE_FLAGS="$GUI_CONFIGURE_FLAGS --with-gtk=3"
48325  
48326 fi
48327  
48328 if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
48329 GTK_CFLAGS=`echo " $GTK_CFLAGS" \
48330 | sed -e 's/ *-I *\// -isystem\//g' -e 's/^ *//'`
48331 fi
48332  
48333 ;; #(
48334 2) :
48335  
48336  
48337 pkg_failed=no
48338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
48339 $as_echo_n "checking for GTK... " >&6; }
48340  
48341 if test -n "$GTK_CFLAGS"; then
48342 pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
48343 elif test -n "$PKG_CONFIG"; then
48344 if test -n "$PKG_CONFIG" && \
48345 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= \$GTK2_MIN_VERSION glib-2.0 >= \$GLIB_MIN_VERSION gthread-2.0 >= \$GLIB_MIN_VERSION gmodule-2.0 >= \$GLIB_MIN_VERSION\""; } >&5
48346 ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= $GTK2_MIN_VERSION glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION") 2>&5
48347 ac_status=$?
48348 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48349 test $ac_status = 0; }; then
48350 pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= $GTK2_MIN_VERSION glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION" 2>/dev/null`
48351 test "x$?" != "x0" && pkg_failed=yes
48352 else
48353 pkg_failed=yes
48354 fi
48355 else
48356 pkg_failed=untried
48357 fi
48358 if test -n "$GTK_LIBS"; then
48359 pkg_cv_GTK_LIBS="$GTK_LIBS"
48360 elif test -n "$PKG_CONFIG"; then
48361 if test -n "$PKG_CONFIG" && \
48362 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= \$GTK2_MIN_VERSION glib-2.0 >= \$GLIB_MIN_VERSION gthread-2.0 >= \$GLIB_MIN_VERSION gmodule-2.0 >= \$GLIB_MIN_VERSION\""; } >&5
48363 ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= $GTK2_MIN_VERSION glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION") 2>&5
48364 ac_status=$?
48365 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48366 test $ac_status = 0; }; then
48367 pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= $GTK2_MIN_VERSION glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION" 2>/dev/null`
48368 test "x$?" != "x0" && pkg_failed=yes
48369 else
48370 pkg_failed=yes
48371 fi
48372 else
48373 pkg_failed=untried
48374 fi
48375  
48376  
48377  
48378 if test $pkg_failed = yes; then
48379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48380 $as_echo "no" >&6; }
48381  
48382 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48383 _pkg_short_errors_supported=yes
48384 else
48385 _pkg_short_errors_supported=no
48386 fi
48387 if test $_pkg_short_errors_supported = yes; then
48388 GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-2.0 >= $GTK2_MIN_VERSION glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION" 2>&1`
48389 else
48390 GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-2.0 >= $GTK2_MIN_VERSION glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION" 2>&1`
48391 fi
48392 # Put the nasty error message in config.log where it belongs
48393 echo "$GTK_PKG_ERRORS" >&5
48394  
48395  
48396 :
48397  
48398 elif test $pkg_failed = untried; then
48399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48400 $as_echo "no" >&6; }
48401  
48402 :
48403  
48404 else
48405 GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
48406 GTK_LIBS=$pkg_cv_GTK_LIBS
48407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48408 $as_echo "yes" >&6; }
48409  
48410 have_gtk=yes
48411 GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
48412 GUI_CONFIGURE_FLAGS="$GUI_CONFIGURE_FLAGS --with-gtk=2"
48413  
48414 fi
48415  
48416 if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
48417 GTK_CFLAGS=`echo " $GTK_CFLAGS" \
48418 | sed -e 's/ *-I *\// -isystem\//g' -e 's/^ *//'`
48419 fi
48420  
48421 ;; #(
48422 fail3) :
48423 as_fn_error $? "GTK+ 3 was requested but is not available" "$LINENO" 5 ;; #(
48424 fail2) :
48425 as_fn_error $? "GTK+ 2 was requested but is not available" "$LINENO" 5 ;; #(
48426 fail) :
48427 as_fn_error $? "GTK+ was requested but is not available" "$LINENO" 5 ;; #(
48428 *) :
48429 ;;
48430 esac
48431  
48432 if test "x$have_gtk" = xyes; then :
48433 break
48434 fi
48435 done
48436  
48437 if test "$have_gtk" = "yes" ; then
48438 # If we have GTK then add flags for it.
48439 #
48440 # GLib flags first
48441 #
48442 GTK_CONFIG="$GLIB_CONFIG"
48443  
48444 gtk_major_version=`echo $GTK_VERSION | cut -d. -f1`
48445 gtk_minor_version=`echo $GTK_VERSION | cut -d. -f2`
48446  
48447  
48448 if ${GTK_CONFIG+:} false; then :
48449  
48450 case " $GTK_CONFIG " in #(
48451 *" -DGDK_DISABLE_DEPRECATED "*) :
48452 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GTK_CONFIG already contains -DGDK_DISABLE_DEPRECATED"; } >&5
48453 (: GTK_CONFIG already contains -DGDK_DISABLE_DEPRECATED) 2>&5
48454 ac_status=$?
48455 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48456 test $ac_status = 0; } ;; #(
48457 *) :
48458  
48459 as_fn_append GTK_CONFIG " -DGDK_DISABLE_DEPRECATED"
48460 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GTK_CONFIG=\"\$GTK_CONFIG\""; } >&5
48461 (: GTK_CONFIG="$GTK_CONFIG") 2>&5
48462 ac_status=$?
48463 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48464 test $ac_status = 0; }
48465 ;;
48466 esac
48467  
48468 else
48469  
48470 GTK_CONFIG=-DGDK_DISABLE_DEPRECATED
48471 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GTK_CONFIG=\"\$GTK_CONFIG\""; } >&5
48472 (: GTK_CONFIG="$GTK_CONFIG") 2>&5
48473 ac_status=$?
48474 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48475 test $ac_status = 0; }
48476  
48477 fi
48478  
48479 if test \( $gtk_major_version -eq 3 -a $gtk_minor_version -ge 10 \) ; then
48480 ## Allow use of deprecated & disable deprecated warnings if Gtk >= 3.10;
48481 ## The deprecations in Gtk 3.10 will not be fixed ...
48482  
48483 if ${GTK_CONFIG+:} false; then :
48484  
48485 case " $GTK_CONFIG " in #(
48486 *" -DGDK_DISABLE_DEPRECATION_WARNINGS "*) :
48487 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GTK_CONFIG already contains -DGDK_DISABLE_DEPRECATION_WARNINGS"; } >&5
48488 (: GTK_CONFIG already contains -DGDK_DISABLE_DEPRECATION_WARNINGS) 2>&5
48489 ac_status=$?
48490 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48491 test $ac_status = 0; } ;; #(
48492 *) :
48493  
48494 as_fn_append GTK_CONFIG " -DGDK_DISABLE_DEPRECATION_WARNINGS"
48495 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GTK_CONFIG=\"\$GTK_CONFIG\""; } >&5
48496 (: GTK_CONFIG="$GTK_CONFIG") 2>&5
48497 ac_status=$?
48498 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48499 test $ac_status = 0; }
48500 ;;
48501 esac
48502  
48503 else
48504  
48505 GTK_CONFIG=-DGDK_DISABLE_DEPRECATION_WARNINGS
48506 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GTK_CONFIG=\"\$GTK_CONFIG\""; } >&5
48507 (: GTK_CONFIG="$GTK_CONFIG") 2>&5
48508 ac_status=$?
48509 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48510 test $ac_status = 0; }
48511  
48512 fi
48513  
48514 else
48515  
48516 if ${GTK_CONFIG+:} false; then :
48517  
48518 case " $GTK_CONFIG " in #(
48519 *" -DGTK_DISABLE_DEPRECATED "*) :
48520 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GTK_CONFIG already contains -DGTK_DISABLE_DEPRECATED"; } >&5
48521 (: GTK_CONFIG already contains -DGTK_DISABLE_DEPRECATED) 2>&5
48522 ac_status=$?
48523 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48524 test $ac_status = 0; } ;; #(
48525 *) :
48526  
48527 as_fn_append GTK_CONFIG " -DGTK_DISABLE_DEPRECATED"
48528 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GTK_CONFIG=\"\$GTK_CONFIG\""; } >&5
48529 (: GTK_CONFIG="$GTK_CONFIG") 2>&5
48530 ac_status=$?
48531 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48532 test $ac_status = 0; }
48533 ;;
48534 esac
48535  
48536 else
48537  
48538 GTK_CONFIG=-DGTK_DISABLE_DEPRECATED
48539 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GTK_CONFIG=\"\$GTK_CONFIG\""; } >&5
48540 (: GTK_CONFIG="$GTK_CONFIG") 2>&5
48541 ac_status=$?
48542 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48543 test $ac_status = 0; }
48544  
48545 fi
48546  
48547 fi
48548  
48549 if ${GTK_CONFIG+:} false; then :
48550  
48551 case " $GTK_CONFIG " in #(
48552 *" -DGTK_DISABLE_SINGLE_INCLUDES "*) :
48553 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GTK_CONFIG already contains -DGTK_DISABLE_SINGLE_INCLUDES"; } >&5
48554 (: GTK_CONFIG already contains -DGTK_DISABLE_SINGLE_INCLUDES) 2>&5
48555 ac_status=$?
48556 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48557 test $ac_status = 0; } ;; #(
48558 *) :
48559  
48560 as_fn_append GTK_CONFIG " -DGTK_DISABLE_SINGLE_INCLUDES"
48561 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GTK_CONFIG=\"\$GTK_CONFIG\""; } >&5
48562 (: GTK_CONFIG="$GTK_CONFIG") 2>&5
48563 ac_status=$?
48564 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48565 test $ac_status = 0; }
48566 ;;
48567 esac
48568  
48569 else
48570  
48571 GTK_CONFIG=-DGTK_DISABLE_SINGLE_INCLUDES
48572 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GTK_CONFIG=\"\$GTK_CONFIG\""; } >&5
48573 (: GTK_CONFIG="$GTK_CONFIG") 2>&5
48574 ac_status=$?
48575 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48576 test $ac_status = 0; }
48577  
48578 fi
48579  
48580 if test ! \( $gtk_major_version -eq 2 -a $gtk_minor_version -lt 20 \) ; then
48581 # Enable GSEAL when building with GTK > 2.20
48582 # (Versions prior to 2.22 lacked some necessary accessors.)
48583  
48584 if ${GTK_CONFIG+:} false; then :
48585  
48586 case " $GTK_CONFIG " in #(
48587 *" -DGSEAL_ENABLE "*) :
48588 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GTK_CONFIG already contains -DGSEAL_ENABLE"; } >&5
48589 (: GTK_CONFIG already contains -DGSEAL_ENABLE) 2>&5
48590 ac_status=$?
48591 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48592 test $ac_status = 0; } ;; #(
48593 *) :
48594  
48595 as_fn_append GTK_CONFIG " -DGSEAL_ENABLE"
48596 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GTK_CONFIG=\"\$GTK_CONFIG\""; } >&5
48597 (: GTK_CONFIG="$GTK_CONFIG") 2>&5
48598 ac_status=$?
48599 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48600 test $ac_status = 0; }
48601 ;;
48602 esac
48603  
48604 else
48605  
48606 GTK_CONFIG=-DGSEAL_ENABLE
48607 { { $as_echo "$as_me:${as_lineno-$LINENO}: : GTK_CONFIG=\"\$GTK_CONFIG\""; } >&5
48608 (: GTK_CONFIG="$GTK_CONFIG") 2>&5
48609 ac_status=$?
48610 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48611 test $ac_status = 0; }
48612  
48613 fi
48614  
48615 fi
48616  
48617 GTK_CFLAGS="$GTK_CONFIG $GTK_CFLAGS"
48618 fi
48619 fi
48620  
48621  
48622  
48623  
48624  
48625 # Check for GTK GUI support for GResource pixbufs
48626 have_gresource_pixbuf=no
48627 if test "x$have_gtk" = "xyes"; then
48628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GDK-Pixbuf can load data using GResource" >&5
48629 $as_echo_n "checking whether GDK-Pixbuf can load data using GResource... " >&6; }
48630 if test -n "$PKG_CONFIG" && \
48631 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.32 gdk-pixbuf-2.0 >= 2.26\""; } >&5
48632 ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.32 gdk-pixbuf-2.0 >= 2.26") 2>&5
48633 ac_status=$?
48634 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48635 test $ac_status = 0; }; then
48636  
48637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48638 $as_echo "yes" >&6; }
48639  
48640 $as_echo "#define HAVE_GDK_GRESOURCE 1" >>confdefs.h
48641  
48642 have_gresource_pixbuf=yes
48643  
48644 else
48645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48646 $as_echo "no" >&6; }
48647 fi
48648 fi
48649 if test "x$have_gresource_pixbuf" = "xyes"; then
48650 HAVE_GRESOURCE_PIXBUF_TRUE=
48651 HAVE_GRESOURCE_PIXBUF_FALSE='#'
48652 else
48653 HAVE_GRESOURCE_PIXBUF_TRUE='#'
48654 HAVE_GRESOURCE_PIXBUF_FALSE=
48655 fi
48656  
48657  
48658 if test "$have_gtk" = "yes" -a "$have_qt" = "yes" ; then
48659 # We have both GTK and Qt and thus will be building both wireshark
48660 # and wireshark-gtk.
48661  
48662 wireshark_bin="wireshark\$(EXEEXT) wireshark-gtk\$(EXEEXT)"
48663 wireshark_man="wireshark.1"
48664 wireshark_SUBDIRS="codecs ui/qt ui/gtk"
48665 elif test "$have_gtk" = "no" -a "$have_qt" = "yes" ; then
48666 # We don't have GTK+ but we have Qt.
48667  
48668 wireshark_bin="wireshark\$(EXEEXT)"
48669 wireshark_man="wireshark.1"
48670 wireshark_SUBDIRS="codecs ui/qt"
48671 elif test "$have_gtk" = "yes" -a "$have_qt" = "no" ; then
48672 # We have GTK+ but not Qt.
48673  
48674 wireshark_bin="wireshark-gtk\$(EXEEXT)"
48675 wireshark_man="wireshark.1"
48676 wireshark_SUBDIRS="codecs ui/gtk"
48677 OSX_APP_FLAGS="$OSX_APP_FLAGS -gtk"
48678 OSX_DMG_FLAGS="-gtk"
48679 elif test "$have_gtk" = "no" -a "$have_qt" = "no" ; then
48680 # We have neither GTK+ nor Qt.
48681 #
48682 # If they didn't explicitly say "--disable-wireshark",
48683 # fail (so that, unless they explicitly indicated that
48684 # they don't want Wireshark, we stop so they know they
48685 # won't be getting Wireshark unless they fix the GTK+/Qt
48686 # problem).
48687 #
48688 if test "x$enable_wireshark" = "xyes"; then
48689 if test "$with_qt" != "no" -a "$with_gtk" != "no" ; then
48690 as_fn_error $? "Neither Qt nor GTK+ are available, so Wireshark can't be compiled" "$LINENO" 5
48691 elif test "$with_qt" != "no" -a "$with_gtk" = "no" ; then
48692 as_fn_error $? "Qt is not available and GTK+ was not requested, so Wireshark can't be compiled" "$LINENO" 5
48693 elif test "$with_qt" = "no" -a "$with_gtk" != "no" ; then
48694 as_fn_error $? "Qt was not requested and GTK+ is not available, so Wireshark can't be compiled" "$LINENO" 5
48695 elif test "$with_qt" = "no" -a "$with_gtk" = "no" ; then
48696 as_fn_error $? "Neither Qt nor GTK+ were requested, so Wireshark can't be compiled" "$LINENO" 5
48697 fi
48698 fi
48699 wireshark_bin=""
48700 wireshark_man=""
48701 wireshark_SUBDIRS=""
48702 fi
48703  
48704 #
48705 # Check whether GLib modules are supported, to determine whether we
48706 # can support plugins.
48707 #
48708  
48709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GLib supports loadable modules" >&5
48710 $as_echo_n "checking whether GLib supports loadable modules... " >&6; }
48711 if ${ac_cv_glib_supports_modules+:} false; then :
48712 $as_echo_n "(cached) " >&6
48713 else
48714  
48715 ac_save_CFLAGS="$CFLAGS"
48716 ac_save_LIBS="$LIBS"
48717 CFLAGS="$WS_CFLAGS $GLIB_CFLAGS $CFLAGS"
48718 LIBS="$LIBS $GLIB_LIBS"
48719 if test "$cross_compiling" = yes; then :
48720 echo $ac_n "cross compiling; assumed OK... $ac_c"
48721 ac_cv_glib_supports_modules=yes
48722 else
48723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48724 /* end confdefs.h. */
48725  
48726 #include <glib.h>
48727 #include <gmodule.h>
48728 #include <stdio.h>
48729 #include <stdlib.h>
48730  
48731 int
48732 main ()
48733 {
48734 if (g_module_supported())
48735 return 0; /* success */
48736 else
48737 return 1; /* failure */
48738 }
48739  
48740 _ACEOF
48741 if ac_fn_c_try_run "$LINENO"; then :
48742 ac_cv_glib_supports_modules=yes
48743 else
48744 ac_cv_glib_supports_modules=no
48745 fi
48746 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48747 conftest.$ac_objext conftest.beam conftest.$ac_ext
48748 fi
48749  
48750 CFLAGS="$ac_save_CFLAGS"
48751 LIBS="$ac_save_LIBS"
48752  
48753 fi
48754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_glib_supports_modules" >&5
48755 $as_echo "$ac_cv_glib_supports_modules" >&6; }
48756 if test "$ac_cv_glib_supports_modules" = yes ; then
48757 have_plugins=yes
48758 plugins_dir="plugins"
48759 else
48760 have_plugins=no
48761 plugins_dir=""
48762 fi
48763  
48764  
48765 #
48766 # If we have <dlfcn.h>, check whether we have dladdr.
48767 #
48768 if test "$ac_cv_header_dlfcn_h" = "yes"
48769 then
48770 #
48771 # Use GLib compiler flags and linker flags; GLib's gmodule
48772 # stuff uses the dl APIs if available, so it might know
48773 # what flags are needed.
48774 #
48775 ac_save_CFLAGS="$CFLAGS"
48776 ac_save_LIBS="$LIBS"
48777 CFLAGS="$WS_CFLAGS $GLIB_CFLAGS $CFLAGS"
48778 LIBS="$LIBS $GLIB_LIBS"
48779 for ac_func in dladdr
48780 do :
48781 ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr"
48782 if test "x$ac_cv_func_dladdr" = xyes; then :
48783 cat >>confdefs.h <<_ACEOF
48784 #define HAVE_DLADDR 1
48785 _ACEOF
48786  
48787 fi
48788 done
48789  
48790 if test x$ac_cv_func_dladdr = xno
48791 then
48792 #
48793 # OK, try it with -ldl, in case you need that to get
48794 # dladdr(). For some reason, on Linux, that's not
48795 # part of the GLib flags; perhaps GLib itself is
48796 # linked with libdl, so that you can link with
48797 # Glib and it'll pull libdl in itself.
48798 #
48799 LIBS="$LIBS -ldl"
48800 for ac_func in dladdr
48801 do :
48802 ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr"
48803 if test "x$ac_cv_func_dladdr" = xyes; then :
48804 cat >>confdefs.h <<_ACEOF
48805 #define HAVE_DLADDR 1
48806 _ACEOF
48807  
48808 fi
48809 done
48810  
48811 fi
48812 CFLAGS="$ac_save_CFLAGS"
48813 LIBS="$ac_save_LIBS"
48814 fi
48815  
48816 #
48817 # Check whether GLib's printf supports thousands grouping. (This might
48818 # be different from the system's printf since GLib can optionally use
48819 # its own printf implementation.)
48820 #
48821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GLib supports POSIX/XSI thousands grouping" >&5
48822 $as_echo_n "checking whether GLib supports POSIX/XSI thousands grouping... " >&6; }
48823 if ${ac_cv_glib_supports_printf_grouping+:} false; then :
48824 $as_echo_n "(cached) " >&6
48825 else
48826  
48827 ac_save_CFLAGS="$CFLAGS"
48828 ac_save_LIBS="$LIBS"
48829 CFLAGS="$WS_CFLAGS $GLIB_CFLAGS $CFLAGS"
48830 LIBS="$LIBS $GLIB_LIBS"
48831 if test "$cross_compiling" = yes; then :
48832 echo $ac_n "cross compiling; playing it safe... $ac_c"
48833 ac_cv_glib_supports_printf_grouping=no
48834 else
48835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48836 /* end confdefs.h. */
48837  
48838 #include <glib.h>
48839 #include <locale.h>
48840 #include <stdio.h>
48841 #include <string.h>
48842  
48843 int
48844 main ()
48845 {
48846 gchar *str;
48847 setlocale(LC_ALL, "en_US.UTF-8");
48848 str = g_strdup_printf("%'u", 123456);
48849 return (strcmp (str, "123,456") != 0);
48850 }
48851  
48852 _ACEOF
48853 if ac_fn_c_try_run "$LINENO"; then :
48854 ac_cv_glib_supports_printf_grouping=yes
48855 else
48856 ac_cv_glib_supports_printf_grouping=no
48857 fi
48858 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48859 conftest.$ac_objext conftest.beam conftest.$ac_ext
48860 fi
48861  
48862 CFLAGS="$ac_save_CFLAGS"
48863 LIBS="$ac_save_LIBS"
48864  
48865 fi
48866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_glib_supports_printf_grouping" >&5
48867 $as_echo "$ac_cv_glib_supports_printf_grouping" >&6; }
48868 if test "$ac_cv_glib_supports_printf_grouping" = yes ; then
48869  
48870 $as_echo "#define HAVE_GLIB_PRINTF_GROUPING 1" >>confdefs.h
48871  
48872 fi
48873  
48874 if test "x$have_gtk" = "xyes"
48875 then
48876 #
48877 # We have GTK+; do we want the OS X integration functions and,
48878 # if so, do we have them and, if so, which versions do we have,
48879 # the old Carbon-based ones or the new Cocoa-based ones?
48880 #
48881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use OS X integration functions" >&5
48882 $as_echo_n "checking whether to use OS X integration functions... " >&6; }
48883  
48884  
48885 # Check whether --with-osx-integration was given.
48886 if test "${with_osx_integration+set}" = set; then :
48887 withval=$with_osx_integration;
48888 if test $withval = no
48889 then
48890 want_osx_integration=no
48891 else
48892 want_osx_integration=yes
48893 fi
48894  
48895 else
48896  
48897 want_osx_integration=yes
48898  
48899 fi
48900  
48901 if test "x$want_osx_integration" = "xno"; then
48902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48903 $as_echo "no" >&6; }
48904 else
48905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48906 $as_echo "yes" >&6; }
48907  
48908 ac_ws_CPPLAGS_saved="$CPPFLAGS"
48909 ac_ws_CFLAGS_saved="$CFLAGS"
48910 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
48911 ac_ws_LDFLAGS_saved="$LDFLAGS"
48912 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
48913 CFLAGS="$WS_CFLAGS $CFLAGS"
48914 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
48915 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
48916  
48917 ac_save_LIBS="$LIBS"
48918 CFLAGS="$CFLAGS $GTK_CFLAGS"
48919 LIBS="$GTK_LIBS $LIBS"
48920  
48921 #
48922 # Check for the new integration functions in a -lgtkmacintegration
48923 # library.
48924 #
48925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtkosx_application_set_menu_bar in -lgtkmacintegration" >&5
48926 $as_echo_n "checking for gtkosx_application_set_menu_bar in -lgtkmacintegration... " >&6; }
48927 if ${ac_cv_lib_gtkmacintegration_gtkosx_application_set_menu_bar+:} false; then :
48928 $as_echo_n "(cached) " >&6
48929 else
48930 ac_check_lib_save_LIBS=$LIBS
48931 LIBS="-lgtkmacintegration $LIBS"
48932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48933 /* end confdefs.h. */
48934  
48935 /* Override any GCC internal prototype to avoid an error.
48936 Use char because int might match the return type of a GCC
48937 builtin and then its argument prototype would still apply. */
48938 #ifdef __cplusplus
48939 extern "C"
48940 #endif
48941 char gtkosx_application_set_menu_bar ();
48942 int
48943 main ()
48944 {
48945 return gtkosx_application_set_menu_bar ();
48946 ;
48947 return 0;
48948 }
48949 _ACEOF
48950 if ac_fn_c_try_link "$LINENO"; then :
48951 ac_cv_lib_gtkmacintegration_gtkosx_application_set_menu_bar=yes
48952 else
48953 ac_cv_lib_gtkmacintegration_gtkosx_application_set_menu_bar=no
48954 fi
48955 rm -f core conftest.err conftest.$ac_objext \
48956 conftest$ac_exeext conftest.$ac_ext
48957 LIBS=$ac_check_lib_save_LIBS
48958 fi
48959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gtkmacintegration_gtkosx_application_set_menu_bar" >&5
48960 $as_echo "$ac_cv_lib_gtkmacintegration_gtkosx_application_set_menu_bar" >&6; }
48961 if test "x$ac_cv_lib_gtkmacintegration_gtkosx_application_set_menu_bar" = xyes; then :
48962  
48963  
48964 $as_echo "#define HAVE_GTKOSXAPPLICATION 1" >>confdefs.h
48965  
48966 have_ige_mac=yes
48967 # We don't want gtk stuff in LIBS (which is reset below) so
48968 # manually set GTK_LIBS (which is more appropriate)
48969 GTK_LIBS="$GTK_LIBS -lgtkmacintegration"
48970  
48971 fi
48972  
48973  
48974 if test x$have_ige_mac = x
48975 then
48976 #
48977 # Not found - check for the old integration functions in
48978 # the Gtk framework.
48979 #
48980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk_mac_menu_set_menu_bar in -lGtk" >&5
48981 $as_echo_n "checking for gtk_mac_menu_set_menu_bar in -lGtk... " >&6; }
48982 if ${ac_cv_lib_Gtk_gtk_mac_menu_set_menu_bar+:} false; then :
48983 $as_echo_n "(cached) " >&6
48984 else
48985 ac_check_lib_save_LIBS=$LIBS
48986 LIBS="-lGtk $LIBS"
48987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48988 /* end confdefs.h. */
48989  
48990 /* Override any GCC internal prototype to avoid an error.
48991 Use char because int might match the return type of a GCC
48992 builtin and then its argument prototype would still apply. */
48993 #ifdef __cplusplus
48994 extern "C"
48995 #endif
48996 char gtk_mac_menu_set_menu_bar ();
48997 int
48998 main ()
48999 {
49000 return gtk_mac_menu_set_menu_bar ();
49001 ;
49002 return 0;
49003 }
49004 _ACEOF
49005 if ac_fn_c_try_link "$LINENO"; then :
49006 ac_cv_lib_Gtk_gtk_mac_menu_set_menu_bar=yes
49007 else
49008 ac_cv_lib_Gtk_gtk_mac_menu_set_menu_bar=no
49009 fi
49010 rm -f core conftest.err conftest.$ac_objext \
49011 conftest$ac_exeext conftest.$ac_ext
49012 LIBS=$ac_check_lib_save_LIBS
49013 fi
49014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Gtk_gtk_mac_menu_set_menu_bar" >&5
49015 $as_echo "$ac_cv_lib_Gtk_gtk_mac_menu_set_menu_bar" >&6; }
49016 if test "x$ac_cv_lib_Gtk_gtk_mac_menu_set_menu_bar" = xyes; then :
49017  
49018  
49019 $as_echo "#define HAVE_IGE_MAC_INTEGRATION 1" >>confdefs.h
49020  
49021 have_ige_mac=yes
49022 # We don't want gtk stuff in LIBS (which is reset below) so
49023 # manually set GTK_LIBS (which is more appropriate)
49024 GTK_LIBS="$GTK_LIBS -lGtk"
49025  
49026 fi
49027  
49028 fi
49029  
49030 if test x$have_ige_mac = x
49031 then
49032 #
49033 # Not found - check for the old integration functions in
49034 # a -lgtkmacintegration library.
49035 #
49036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk_mac_menu_set_menu_bar in -lgtkmacintegration" >&5
49037 $as_echo_n "checking for gtk_mac_menu_set_menu_bar in -lgtkmacintegration... " >&6; }
49038 if ${ac_cv_lib_gtkmacintegration_gtk_mac_menu_set_menu_bar+:} false; then :
49039 $as_echo_n "(cached) " >&6
49040 else
49041 ac_check_lib_save_LIBS=$LIBS
49042 LIBS="-lgtkmacintegration $LIBS"
49043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49044 /* end confdefs.h. */
49045  
49046 /* Override any GCC internal prototype to avoid an error.
49047 Use char because int might match the return type of a GCC
49048 builtin and then its argument prototype would still apply. */
49049 #ifdef __cplusplus
49050 extern "C"
49051 #endif
49052 char gtk_mac_menu_set_menu_bar ();
49053 int
49054 main ()
49055 {
49056 return gtk_mac_menu_set_menu_bar ();
49057 ;
49058 return 0;
49059 }
49060 _ACEOF
49061 if ac_fn_c_try_link "$LINENO"; then :
49062 ac_cv_lib_gtkmacintegration_gtk_mac_menu_set_menu_bar=yes
49063 else
49064 ac_cv_lib_gtkmacintegration_gtk_mac_menu_set_menu_bar=no
49065 fi
49066 rm -f core conftest.err conftest.$ac_objext \
49067 conftest$ac_exeext conftest.$ac_ext
49068 LIBS=$ac_check_lib_save_LIBS
49069 fi
49070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gtkmacintegration_gtk_mac_menu_set_menu_bar" >&5
49071 $as_echo "$ac_cv_lib_gtkmacintegration_gtk_mac_menu_set_menu_bar" >&6; }
49072 if test "x$ac_cv_lib_gtkmacintegration_gtk_mac_menu_set_menu_bar" = xyes; then :
49073  
49074  
49075 $as_echo "#define HAVE_IGE_MAC_INTEGRATION 1" >>confdefs.h
49076  
49077 have_ige_mac=yes
49078 # We don't want gtk stuff in LIBS (which is reset below) so
49079 # manually set GTK_LIBS (which is more appropriate)
49080 GTK_LIBS="$GTK_LIBS -lgtkmacintegration"
49081  
49082 fi
49083  
49084 fi
49085 LIBS="$ac_save_LIBS"
49086  
49087 CPPFLAGS="$ac_ws_CPPLAGS_saved"
49088 CFLAGS="$ac_ws_CFLAGS_saved"
49089 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
49090 LDFLAGS="$ac_ws_LDFLAGS_saved"
49091  
49092  
49093 fi
49094 fi
49095  
49096  
49097  
49098  
49099 if test "$have_qt" = "yes"; then
49100 HAVE_Qt_TRUE=
49101 HAVE_Qt_FALSE='#'
49102 else
49103 HAVE_Qt_TRUE='#'
49104 HAVE_Qt_FALSE=
49105 fi
49106  
49107 if test "$have_gtk" = "yes"; then
49108 HAVE_GTK_TRUE=
49109 HAVE_GTK_FALSE='#'
49110 else
49111 HAVE_GTK_TRUE='#'
49112 HAVE_GTK_FALSE=
49113 fi
49114  
49115  
49116  
49117  
49118 # Enable/disable tshark
49119 # Check whether --enable-tshark was given.
49120 if test "${enable_tshark+set}" = set; then :
49121 enableval=$enable_tshark; tshark=$enableval
49122 else
49123 enable_tshark=yes
49124 fi
49125  
49126  
49127 if test "x$enable_tshark" = "xyes" ; then
49128 tshark_bin="tshark\$(EXEEXT)"
49129 tshark_man="tshark.1"
49130 wiresharkfilter_man="wireshark-filter.4"
49131 else
49132 tshark_bin=""
49133 tshark_man=""
49134 fi
49135  
49136  
49137  
49138 # Enable/disable editcap
49139  
49140 # Check whether --enable-editcap was given.
49141 if test "${enable_editcap+set}" = set; then :
49142 enableval=$enable_editcap; enable_editcap=$enableval
49143 else
49144 enable_editcap=yes
49145 fi
49146  
49147  
49148 if test "x$enable_editcap" = "xyes" ; then
49149 editcap_bin="editcap\$(EXEEXT)"
49150 editcap_man="editcap.1"
49151 else
49152 editcap_bin=""
49153 editcap_man=""
49154 fi
49155  
49156  
49157  
49158  
49159 # Enabling/disabling of dumpcap is done later (after we know if we have PCAP
49160 # or not)
49161  
49162 # Enable/disable capinfos
49163  
49164 # Check whether --enable-capinfos was given.
49165 if test "${enable_capinfos+set}" = set; then :
49166 enableval=$enable_capinfos; enable_capinfos=$enableval
49167 else
49168 enable_capinfos=yes
49169 fi
49170  
49171  
49172 if test "x$enable_capinfos" = "xyes" ; then
49173 capinfos_bin="capinfos\$(EXEEXT)"
49174 capinfos_man="capinfos.1"
49175 else
49176 capinfos_bin=""
49177 capinfos_man=""
49178 fi
49179  
49180  
49181  
49182 # Enable/disable captype
49183  
49184 # Check whether --enable-captype was given.
49185 if test "${enable_captype+set}" = set; then :
49186 enableval=$enable_captype; enable_captype=$enableval
49187 else
49188 enable_captype=yes
49189 fi
49190  
49191  
49192 if test "x$enable_captype" = "xyes" ; then
49193 captype_bin="captype\$(EXEEXT)"
49194 captype_man="captype.1"
49195 else
49196 captype_bin=""
49197 captype_man=""
49198 fi
49199  
49200  
49201  
49202 # Enable/disable mergecap
49203  
49204 # Check whether --enable-mergecap was given.
49205 if test "${enable_mergecap+set}" = set; then :
49206 enableval=$enable_mergecap; enable_mergecap=$enableval
49207 else
49208 enable_mergecap=yes
49209 fi
49210  
49211  
49212 if test "x$enable_mergecap" = "xyes" ; then
49213 mergecap_bin="mergecap\$(EXEEXT)"
49214 mergecap_man="mergecap.1"
49215 else
49216 mergecap_bin=""
49217 mergecap_man=""
49218 fi
49219  
49220  
49221  
49222 # Enable/disable reordercap
49223  
49224 # Check whether --enable-reordercap was given.
49225 if test "${enable_reordercap+set}" = set; then :
49226 enableval=$enable_reordercap; enable_reordercap=$enableval
49227 else
49228 enable_reordercap=yes
49229 fi
49230  
49231  
49232 if test "x$enable_reordercap" = "xyes" ; then
49233 reordercap_bin="reordercap\$(EXEEXT)"
49234 reordercap_man="reordercap.1"
49235 else
49236 reordercap_bin=""
49237 reordercap_man=""
49238 fi
49239  
49240  
49241  
49242 # Enable/disable text2pcap
49243  
49244 # Check whether --enable-text2pcap was given.
49245 if test "${enable_text2pcap+set}" = set; then :
49246 enableval=$enable_text2pcap; text2pcap=$enableval
49247 else
49248 enable_text2pcap=yes
49249 fi
49250  
49251  
49252 if test "x$enable_text2pcap" = "xyes" ; then
49253 text2pcap_bin="text2pcap\$(EXEEXT)"
49254 text2pcap_man="text2pcap.1"
49255 else
49256 text2pcap_bin=""
49257 text2pcap_man=""
49258 fi
49259  
49260  
49261  
49262 # Enable/disable dftest
49263  
49264 # Check whether --enable-dftest was given.
49265 if test "${enable_dftest+set}" = set; then :
49266 enableval=$enable_dftest; enable_dftest=$enableval
49267 else
49268 enable_dftest=yes
49269 fi
49270  
49271  
49272 if test "x$enable_dftest" = "xyes" ; then
49273 dftest_bin="dftest\$(EXEEXT)"
49274 dftest_man="dftest.1"
49275 else
49276 dftest_bin=""
49277 dftest_man=""
49278 fi
49279  
49280  
49281  
49282 # Enable/disable randpkt
49283  
49284 # Check whether --enable-randpkt was given.
49285 if test "${enable_randpkt+set}" = set; then :
49286 enableval=$enable_randpkt; enable_randpkt=$enableval
49287 else
49288 enable_randpkt=yes
49289 fi
49290  
49291  
49292 if test "x$enable_randpkt" = "xyes" ; then
49293 randpkt_bin="randpkt\$(EXEEXT)"
49294 randpkt_man="randpkt.1"
49295 else
49296 randpkt_bin=""
49297 randpkt_man=""
49298 fi
49299  
49300  
49301  
49302  
49303  
49304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use libpcap for packet capture" >&5
49305 $as_echo_n "checking whether to use libpcap for packet capture... " >&6; }
49306  
49307  
49308 # Check whether --with-pcap was given.
49309 if test "${with_pcap+set}" = set; then :
49310 withval=$with_pcap;
49311 if test $withval = no
49312 then
49313 want_pcap=no
49314 elif test $withval = yes
49315 then
49316 want_pcap=yes
49317 else
49318 want_pcap=yes
49319 pcap_dir=$withval
49320 fi
49321  
49322 else
49323  
49324 want_pcap=yes
49325 pcap_dir=
49326  
49327 fi
49328  
49329 if test "x$want_pcap" = "xno" ; then
49330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49331 $as_echo "no" >&6; }
49332 else
49333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49334 $as_echo "yes" >&6; }
49335  
49336  
49337 ac_ws_CPPLAGS_saved="$CPPFLAGS"
49338 ac_ws_CFLAGS_saved="$CFLAGS"
49339 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
49340 ac_ws_LDFLAGS_saved="$LDFLAGS"
49341 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
49342 CFLAGS="$WS_CFLAGS $CFLAGS"
49343 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
49344 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
49345  
49346  
49347 if test -z "$pcap_dir"
49348 then
49349 # Pcap header checks
49350 # XXX need to set a var AC_CHECK_HEADER(pcap.h,,)
49351  
49352 #
49353 # The user didn't specify a directory in which libpcap resides.
49354 # First, look for a pcap-config script.
49355 #
49356 if test -n "$ac_tool_prefix"; then
49357 # Extract the first word of "${ac_tool_prefix}pcap-config", so it can be a program name with args.
49358 set dummy ${ac_tool_prefix}pcap-config; ac_word=$2
49359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49360 $as_echo_n "checking for $ac_word... " >&6; }
49361 if ${ac_cv_path_PCAP_CONFIG+:} false; then :
49362 $as_echo_n "(cached) " >&6
49363 else
49364 case $PCAP_CONFIG in
49365 [\\/]* | ?:[\\/]*)
49366 ac_cv_path_PCAP_CONFIG="$PCAP_CONFIG" # Let the user override the test with a path.
49367 ;;
49368 *)
49369 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49370 for as_dir in $PATH
49371 do
49372 IFS=$as_save_IFS
49373 test -z "$as_dir" && as_dir=.
49374 for ac_exec_ext in '' $ac_executable_extensions; do
49375 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49376 ac_cv_path_PCAP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
49377 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49378 break 2
49379 fi
49380 done
49381 done
49382 IFS=$as_save_IFS
49383  
49384 ;;
49385 esac
49386 fi
49387 PCAP_CONFIG=$ac_cv_path_PCAP_CONFIG
49388 if test -n "$PCAP_CONFIG"; then
49389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PCAP_CONFIG" >&5
49390 $as_echo "$PCAP_CONFIG" >&6; }
49391 else
49392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49393 $as_echo "no" >&6; }
49394 fi
49395  
49396  
49397 fi
49398 if test -z "$ac_cv_path_PCAP_CONFIG"; then
49399 ac_pt_PCAP_CONFIG=$PCAP_CONFIG
49400 # Extract the first word of "pcap-config", so it can be a program name with args.
49401 set dummy pcap-config; ac_word=$2
49402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49403 $as_echo_n "checking for $ac_word... " >&6; }
49404 if ${ac_cv_path_ac_pt_PCAP_CONFIG+:} false; then :
49405 $as_echo_n "(cached) " >&6
49406 else
49407 case $ac_pt_PCAP_CONFIG in
49408 [\\/]* | ?:[\\/]*)
49409 ac_cv_path_ac_pt_PCAP_CONFIG="$ac_pt_PCAP_CONFIG" # Let the user override the test with a path.
49410 ;;
49411 *)
49412 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49413 for as_dir in $PATH
49414 do
49415 IFS=$as_save_IFS
49416 test -z "$as_dir" && as_dir=.
49417 for ac_exec_ext in '' $ac_executable_extensions; do
49418 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49419 ac_cv_path_ac_pt_PCAP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
49420 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49421 break 2
49422 fi
49423 done
49424 done
49425 IFS=$as_save_IFS
49426  
49427 ;;
49428 esac
49429 fi
49430 ac_pt_PCAP_CONFIG=$ac_cv_path_ac_pt_PCAP_CONFIG
49431 if test -n "$ac_pt_PCAP_CONFIG"; then
49432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PCAP_CONFIG" >&5
49433 $as_echo "$ac_pt_PCAP_CONFIG" >&6; }
49434 else
49435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49436 $as_echo "no" >&6; }
49437 fi
49438  
49439 if test "x$ac_pt_PCAP_CONFIG" = x; then
49440 PCAP_CONFIG=""
49441 else
49442 case $cross_compiling:$ac_tool_warned in
49443 yes:)
49444 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
49445 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
49446 ac_tool_warned=yes ;;
49447 esac
49448 PCAP_CONFIG=$ac_pt_PCAP_CONFIG
49449 fi
49450 else
49451 PCAP_CONFIG="$ac_cv_path_PCAP_CONFIG"
49452 fi
49453  
49454  
49455 if test -n "$PCAP_CONFIG" ; then
49456 #
49457 # Found it.
49458 #
49459 # Now check whether it's the libpcap 1.0 version, which
49460 # put a space after "-L" - on some platforms, that doesn't
49461 # work.
49462 #
49463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken pcap-config" >&5
49464 $as_echo_n "checking for broken pcap-config... " >&6; }
49465 case "`\"$PCAP_CONFIG\" --libs`" in
49466  
49467 "-L "*)
49468 #
49469 # Space after -L. Pretend pcap-config doesn't exist.
49470 #
49471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49472 $as_echo "yes" >&6; }
49473 PCAP_CONFIG=""
49474 ;;
49475  
49476 *)
49477 #
49478 # No space after -L.
49479 #
49480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49481 $as_echo "no" >&6; }
49482 ;;
49483 esac
49484 fi
49485 if test -n "$PCAP_CONFIG" ; then
49486 #
49487 # Found it, and it's usable; use it to get the include flags
49488 # for libpcap.
49489 #
49490 CPPFLAGS="$CPPFLAGS `\"$PCAP_CONFIG\" --cflags`"
49491 else
49492 #
49493 # Didn't find it; we have to look for libpcap ourselves.
49494 # We assume that the current library search path will work,
49495 # but we may have to look for the header in a "pcap"
49496 # subdirectory of "/usr/include" or "/usr/local/include",
49497 # as some systems apparently put "pcap.h" in a "pcap"
49498 # subdirectory, and we also check "$prefix/include" - and
49499 # "$prefix/include/pcap", in case $prefix is set to
49500 # "/usr/include" or "/usr/local/include".
49501 #
49502 # XXX - should we just add "$prefix/include" to the include
49503 # search path and "$prefix/lib" to the library search path?
49504 #
49505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extraneous pcap header directories" >&5
49506 $as_echo_n "checking for extraneous pcap header directories... " >&6; }
49507 found_pcap_dir=""
49508 pcap_dir_list="/usr/local/include/pcap /usr/include/pcap $prefix/include/pcap $prefix/include"
49509 for pcap_dir in $pcap_dir_list
49510 do
49511 if test -d $pcap_dir ; then
49512 if test x$pcap_dir != x/usr/include -a x$pcap_dir != x/usr/local/include ; then
49513 CPPFLAGS="$CPPFLAGS -I$pcap_dir"
49514 fi
49515 found_pcap_dir=" $found_pcap_dir -I$pcap_dir"
49516 break
49517 fi
49518 done
49519  
49520 if test "$found_pcap_dir" != "" ; then
49521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found --$found_pcap_dir added to CFLAGS" >&5
49522 $as_echo "found --$found_pcap_dir added to CFLAGS" >&6; }
49523 else
49524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49525 $as_echo "not found" >&6; }
49526 fi
49527 fi
49528 else
49529 #
49530 # The user specified a directory in which libpcap resides,
49531 # so add the "include" subdirectory of that directory to
49532 # the include file search path and the "lib" subdirectory
49533 # of that directory to the library search path.
49534 #
49535 # XXX - if there's also a libpcap in a directory that's
49536 # already in CPPFLAGS or LDFLAGS, this won't make us find
49537 # the version in the specified directory, as the compiler
49538 # and/or linker will search that other directory before it
49539 # searches the specified directory.
49540 #
49541 CPPFLAGS="$CPPFLAGS -I$pcap_dir/include"
49542  
49543 if ${LDFLAGS+:} false; then :
49544  
49545 case " $LDFLAGS " in #(
49546 *" -L$pcap_dir/lib "*) :
49547 { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS already contains -L\$pcap_dir/lib"; } >&5
49548 (: LDFLAGS already contains -L$pcap_dir/lib) 2>&5
49549 ac_status=$?
49550 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49551 test $ac_status = 0; } ;; #(
49552 *) :
49553  
49554 as_fn_append LDFLAGS " -L$pcap_dir/lib"
49555 { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5
49556 (: LDFLAGS="$LDFLAGS") 2>&5
49557 ac_status=$?
49558 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49559 test $ac_status = 0; }
49560 ;;
49561 esac
49562  
49563 else
49564  
49565 LDFLAGS=-L$pcap_dir/lib
49566 { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5
49567 (: LDFLAGS="$LDFLAGS") 2>&5
49568 ac_status=$?
49569 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49570 test $ac_status = 0; }
49571  
49572 fi
49573  
49574 case "$host_os" in
49575 solaris*)
49576  
49577 if ${LDFLAGS+:} false; then :
49578  
49579 case " $LDFLAGS " in #(
49580 *" -R$pcap_dir/lib "*) :
49581 { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS already contains -R\$pcap_dir/lib"; } >&5
49582 (: LDFLAGS already contains -R$pcap_dir/lib) 2>&5
49583 ac_status=$?
49584 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49585 test $ac_status = 0; } ;; #(
49586 *) :
49587  
49588 as_fn_append LDFLAGS " -R$pcap_dir/lib"
49589 { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5
49590 (: LDFLAGS="$LDFLAGS") 2>&5
49591 ac_status=$?
49592 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49593 test $ac_status = 0; }
49594 ;;
49595 esac
49596  
49597 else
49598  
49599 LDFLAGS=-R$pcap_dir/lib
49600 { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5
49601 (: LDFLAGS="$LDFLAGS") 2>&5
49602 ac_status=$?
49603 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49604 test $ac_status = 0; }
49605  
49606 fi
49607  
49608 ;;
49609 esac
49610  
49611 fi
49612  
49613 # Pcap header check
49614 ac_fn_c_check_header_mongrel "$LINENO" "pcap.h" "ac_cv_header_pcap_h" "$ac_includes_default"
49615 if test "x$ac_cv_header_pcap_h" = xyes; then :
49616  
49617 else
49618 as_fn_error $? "Header file pcap.h not found; if you installed libpcap
49619 from source, did you also do \"make install-incl\", and if you installed a
49620 binary package of libpcap, is there also a developer's package of libpcap,
49621 and did you also install that package?" "$LINENO" 5
49622 fi
49623  
49624  
49625  
49626 if test -n "$PCAP_CONFIG" ; then
49627 #
49628 # We have pcap-config; we assume that means we have libpcap
49629 # installed and that pcap-config will tell us whatever
49630 # libraries libpcap needs.
49631 #
49632 if test x$enable_static = xyes; then
49633 PCAP_LIBS="`\"$PCAP_CONFIG\" --libs --static`"
49634 else
49635 PCAP_LIBS="`\"$PCAP_CONFIG\" --libs`"
49636 fi
49637  
49638 $as_echo "#define HAVE_LIBPCAP 1" >>confdefs.h
49639  
49640 else
49641 #
49642 # Check to see if we find "pcap_open_live" in "-lpcap".
49643 # Also check for various additional libraries that libpcap might
49644 # require.
49645 #
49646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_open_live in -lpcap" >&5
49647 $as_echo_n "checking for pcap_open_live in -lpcap... " >&6; }
49648 if ${ac_cv_lib_pcap_pcap_open_live+:} false; then :
49649 $as_echo_n "(cached) " >&6
49650 else
49651 ac_check_lib_save_LIBS=$LIBS
49652 LIBS="-lpcap $LIBS"
49653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49654 /* end confdefs.h. */
49655  
49656 /* Override any GCC internal prototype to avoid an error.
49657 Use char because int might match the return type of a GCC
49658 builtin and then its argument prototype would still apply. */
49659 #ifdef __cplusplus
49660 extern "C"
49661 #endif
49662 char pcap_open_live ();
49663 int
49664 main ()
49665 {
49666 return pcap_open_live ();
49667 ;
49668 return 0;
49669 }
49670 _ACEOF
49671 if ac_fn_c_try_link "$LINENO"; then :
49672 ac_cv_lib_pcap_pcap_open_live=yes
49673 else
49674 ac_cv_lib_pcap_pcap_open_live=no
49675 fi
49676 rm -f core conftest.err conftest.$ac_objext \
49677 conftest$ac_exeext conftest.$ac_ext
49678 LIBS=$ac_check_lib_save_LIBS
49679 fi
49680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_pcap_open_live" >&5
49681 $as_echo "$ac_cv_lib_pcap_pcap_open_live" >&6; }
49682 if test "x$ac_cv_lib_pcap_pcap_open_live" = xyes; then :
49683  
49684 PCAP_LIBS=-lpcap
49685  
49686 $as_echo "#define HAVE_LIBPCAP 1" >>confdefs.h
49687  
49688  
49689 else
49690  
49691 ac_wireshark_extras_found=no
49692 ac_save_LIBS="$LIBS"
49693 for extras in "-lcfg -lodm" "-lpfring"
49694 do
49695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_open_live in -lpcap with $extras" >&5
49696 $as_echo_n "checking for pcap_open_live in -lpcap with $extras... " >&6; }
49697 LIBS="-lpcap $extras $ac_save_LIBS"
49698 #
49699 # XXX - can't we use AC_CHECK_LIB here?
49700 #
49701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49702 /* end confdefs.h. */
49703  
49704 # include <pcap.h>
49705  
49706 int
49707 main ()
49708 {
49709  
49710 pcap_open_live(NULL, 0, 0, 0, NULL);
49711  
49712 ;
49713 return 0;
49714 }
49715 _ACEOF
49716 if ac_fn_c_try_link "$LINENO"; then :
49717  
49718 ac_wireshark_extras_found=yes
49719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49720 $as_echo "yes" >&6; }
49721 PCAP_LIBS="-lpcap $extras"
49722  
49723 $as_echo "#define HAVE_LIBPCAP 1" >>confdefs.h
49724  
49725  
49726 else
49727  
49728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49729 $as_echo "no" >&6; }
49730  
49731 fi
49732 rm -f core conftest.err conftest.$ac_objext \
49733 conftest$ac_exeext conftest.$ac_ext
49734 if test x$ac_wireshark_extras_found = xyes
49735 then
49736 break
49737 fi
49738 done
49739 if test x$ac_wireshark_extras_found = xno
49740 then
49741 as_fn_error $? "Can't link with library libpcap." "$LINENO" 5
49742 fi
49743 LIBS=$ac_save_LIBS
49744  
49745 fi
49746  
49747 fi
49748  
49749  
49750 #
49751 # Check whether various variables and functions are defined by
49752 # libpcap.
49753 #
49754 ac_save_LIBS="$LIBS"
49755 LIBS="$PCAP_LIBS $LIBS"
49756 for ac_func in pcap_open_dead pcap_freecode
49757 do :
49758 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
49759 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
49760 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
49761 cat >>confdefs.h <<_ACEOF
49762 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
49763 _ACEOF
49764  
49765 fi
49766 done
49767  
49768 #
49769 # pcap_breakloop may be present in the library but not declared
49770 # in the pcap.h header file. If it's not declared in the header
49771 # file, attempts to use it will get warnings, and, if we're
49772 # building with warnings treated as errors, that warning will
49773 # cause compilation to fail.
49774 #
49775 # We are therefore first testing whether the function is present
49776 # and then, if we're compiling with warnings as errors, testing
49777 # whether it is usable. It is usable if it compiles without
49778 # a -Wimplicit warning (the "compile with warnings as errors"
49779 # option requires GCC). If it is not usable, we fail and tell
49780 # the user that the pcap.h header needs to be updated.
49781 #
49782 # Ceteris paribus, this should only happen with Mac OS X 10.3[.x] which
49783 # can have an up-to-date pcap library without the corresponding pcap
49784 # header.
49785 #
49786 # However, it might also happen on some others OSes with some erroneous
49787 # system manipulations where multiple versions of libpcap might co-exist
49788 # e.g. hand made symbolic link from libpcap.so -> libpcap.so.0.8 but
49789 # having the pcap header version 0.7.
49790 #
49791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pcap_breakloop is present" >&5
49792 $as_echo_n "checking whether pcap_breakloop is present... " >&6; }
49793 ac_CFLAGS_saved="$CFLAGS"
49794  
49795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49796 /* end confdefs.h. */
49797  
49798  
49799 # include <pcap.h>
49800 int main(void)
49801 {
49802 pcap_t *pct = NULL;
49803 pcap_breakloop(pct);
49804 return 0;
49805 }
49806  
49807  
49808 _ACEOF
49809 if ac_fn_c_try_link "$LINENO"; then :
49810  
49811 ws_breakloop_compiled=yes
49812  
49813 else
49814  
49815 ws_breakloop_compiled=no
49816  
49817 fi
49818 rm -f core conftest.err conftest.$ac_objext \
49819 conftest$ac_exeext conftest.$ac_ext
49820  
49821 if test "x$ws_breakloop_compiled" = "xyes"; then
49822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49823 $as_echo "yes" >&6; }
49824  
49825 $as_echo "#define HAVE_PCAP_BREAKLOOP 1" >>confdefs.h
49826  
49827 if test "x$with_warnings_as_errors" = "xyes"; then
49828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pcap_breakloop is usable" >&5
49829 $as_echo_n "checking whether pcap_breakloop is usable... " >&6; }
49830 CFLAGS="$CFLAGS -Werror -Wimplicit"
49831  
49832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49833 /* end confdefs.h. */
49834  
49835  
49836 # include <pcap.h>
49837 int main(void)
49838 {
49839 pcap_t *pct = NULL;
49840 pcap_breakloop(pct);
49841 return 0;
49842 }
49843  
49844  
49845 _ACEOF
49846 if ac_fn_c_try_link "$LINENO"; then :
49847  
49848 ws_breakloop_compiled=yes
49849  
49850 else
49851  
49852 ws_breakloop_compiled=no
49853  
49854 fi
49855 rm -f core conftest.err conftest.$ac_objext \
49856 conftest$ac_exeext conftest.$ac_ext
49857  
49858 if test "x$ws_breakloop_compiled" = "xyes"; then
49859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49860 $as_echo "yes" >&6; }
49861 else
49862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49863 $as_echo "no" >&6; }
49864 as_fn_error $? "Your pcap library is more recent than your pcap header.
49865 As you are building with compiler warnings treated as errors, Wireshark
49866 won't be able to use functions not declared in that header.
49867 If you wish to build with compiler warnings treated as errors, You should
49868 install a newer version of the header file." "$LINENO" 5
49869 fi
49870 CFLAGS="$ac_CFLAGS_saved"
49871 fi
49872 else
49873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49874 $as_echo "no" >&6; }
49875 fi
49876  
49877 #
49878 # Later versions of Mac OS X 10.3[.x] ship a pcap.h that
49879 # doesn't define pcap_if_t but ship an 0.8[.x] libpcap,
49880 # so the library has "pcap_findalldevs()", but pcap.h
49881 # doesn't define "pcap_if_t" so you can't actually *use*
49882 # "pcap_findalldevs()".
49883 #
49884 # That even appears to be true of systems shipped with
49885 # 10.3.4, so it doesn't appear only to be a case of
49886 # Software Update not updating header files.
49887 #
49888 # (You can work around this by installing the 0.8 header
49889 # files.)
49890 #
49891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pcap_findalldevs is present and usable" >&5
49892 $as_echo_n "checking whether pcap_findalldevs is present and usable... " >&6; }
49893 if ${ac_cv_func_pcap_findalldevs+:} false; then :
49894 $as_echo_n "(cached) " >&6
49895 else
49896  
49897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49898 /* end confdefs.h. */
49899  
49900  
49901 #include <pcap.h>
49902 main()
49903 {
49904 pcap_if_t *devpointer;
49905 char errbuf[1];
49906  
49907 pcap_findalldevs(&devpointer, errbuf);
49908 }
49909  
49910  
49911 _ACEOF
49912 if ac_fn_c_try_link "$LINENO"; then :
49913  
49914 ac_cv_func_pcap_findalldevs=yes
49915  
49916 else
49917  
49918 ac_cv_func_pcap_findalldevs=no
49919  
49920 fi
49921 rm -f core conftest.err conftest.$ac_objext \
49922 conftest$ac_exeext conftest.$ac_ext
49923  
49924 fi
49925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_pcap_findalldevs" >&5
49926 $as_echo "$ac_cv_func_pcap_findalldevs" >&6; }
49927 #
49928 # Don't check for other new routines that showed up after
49929 # "pcap_findalldevs()" if we don't have a usable
49930 # "pcap_findalldevs()", so we don't end up using them if the
49931 # "pcap.h" is crufty and old and doesn't declare them.
49932 #
49933 if test $ac_cv_func_pcap_findalldevs = "yes" ; then
49934  
49935 $as_echo "#define HAVE_PCAP_FINDALLDEVS 1" >>confdefs.h
49936  
49937 for ac_func in pcap_datalink_val_to_name pcap_datalink_name_to_val
49938 do :
49939 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
49940 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
49941 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
49942 cat >>confdefs.h <<_ACEOF
49943 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
49944 _ACEOF
49945  
49946 fi
49947 done
49948  
49949 for ac_func in pcap_datalink_val_to_description
49950 do :
49951 ac_fn_c_check_func "$LINENO" "pcap_datalink_val_to_description" "ac_cv_func_pcap_datalink_val_to_description"
49952 if test "x$ac_cv_func_pcap_datalink_val_to_description" = xyes; then :
49953 cat >>confdefs.h <<_ACEOF
49954 #define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1
49955 _ACEOF
49956  
49957 fi
49958 done
49959  
49960 for ac_func in pcap_list_datalinks pcap_set_datalink pcap_lib_version
49961 do :
49962 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
49963 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
49964 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
49965 cat >>confdefs.h <<_ACEOF
49966 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
49967 _ACEOF
49968  
49969 fi
49970 done
49971  
49972 for ac_func in pcap_get_selectable_fd pcap_free_datalinks
49973 do :
49974 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
49975 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
49976 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
49977 cat >>confdefs.h <<_ACEOF
49978 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
49979 _ACEOF
49980  
49981 fi
49982 done
49983  
49984 ac_fn_c_check_func "$LINENO" "pcap_create" "ac_cv_func_pcap_create"
49985 if test "x$ac_cv_func_pcap_create" = xyes; then :
49986  
49987  
49988 $as_echo "#define HAVE_PCAP_CREATE 1" >>confdefs.h
49989  
49990  
49991 $as_echo "#define CAN_SET_CAPTURE_BUFFER_SIZE 1" >>confdefs.h
49992  
49993  
49994 fi
49995  
49996 for ac_func in bpf_image pcap_set_tstamp_precision
49997 do :
49998 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
49999 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
50000 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
50001 cat >>confdefs.h <<_ACEOF
50002 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
50003 _ACEOF
50004  
50005 fi
50006 done
50007  
50008 fi
50009  
50010  
50011 CPPFLAGS="$ac_ws_CPPLAGS_saved"
50012 CFLAGS="$ac_ws_CFLAGS_saved"
50013 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
50014 LDFLAGS="$ac_ws_LDFLAGS_saved"
50015  
50016 LIBS="$ac_save_LIBS"
50017  
50018 fi
50019  
50020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build dumpcap" >&5
50021 $as_echo_n "checking whether to build dumpcap... " >&6; }
50022  
50023 # Check whether --enable-dumpcap was given.
50024 if test "${enable_dumpcap+set}" = set; then :
50025 enableval=$enable_dumpcap; enable_dumpcap=$enableval
50026 else
50027 enable_dumpcap=yes
50028 fi
50029  
50030  
50031 if test "x$enable_dumpcap" = "xyes" ; then
50032 if test "x$want_pcap" = "xno" ; then
50033 enable_dumpcap=no
50034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pcap not available - disabling dumpcap" >&5
50035 $as_echo "pcap not available - disabling dumpcap" >&6; }
50036 else
50037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50038 $as_echo "yes" >&6; }
50039 fi
50040 else
50041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50042 $as_echo "no" >&6; }
50043 fi
50044  
50045 if test "x$enable_dumpcap" = "xyes" ; then
50046 dumpcap_bin="dumpcap\$(EXEEXT)"
50047 dumpcap_man="dumpcap.1"
50048 else
50049 dumpcap_bin=""
50050 dumpcap_man=""
50051 fi
50052  
50053  
50054  
50055 # Enable/disable rawshark
50056  
50057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build rawshark" >&5
50058 $as_echo_n "checking whether to build rawshark... " >&6; }
50059  
50060 # Check whether --enable-rawshark was given.
50061 if test "${enable_rawshark+set}" = set; then :
50062 enableval=$enable_rawshark; rawshark=$enableval
50063 else
50064 enable_rawshark=yes
50065 fi
50066  
50067  
50068 if test "x$enable_rawshark" = "xyes" ; then
50069 if test "x$want_pcap" = "xno" ; then
50070 enable_rawshark=no
50071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pcap not available - disabling rawshark" >&5
50072 $as_echo "pcap not available - disabling rawshark" >&6; }
50073 else
50074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50075 $as_echo "yes" >&6; }
50076 fi
50077 else
50078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50079 $as_echo "no" >&6; }
50080 fi
50081  
50082 if test "x$enable_rawshark" = "xyes" ; then
50083 rawshark_bin="rawshark\$(EXEEXT)"
50084 rawshark_man="rawshark.1"
50085 else
50086 rawshark_bin=""
50087 rawshark_man=""
50088 fi
50089  
50090  
50091  
50092 # Enable/disable echld
50093 # Check whether --enable-echld was given.
50094 if test "${enable_echld+set}" = set; then :
50095 enableval=$enable_echld; have_echld=$enableval
50096 else
50097 have_echld=no
50098 fi
50099  
50100  
50101 if test "x$have_echld" = "xyes"; then
50102 HAVE_ECHLD_TRUE=
50103 HAVE_ECHLD_FALSE='#'
50104 else
50105 HAVE_ECHLD_TRUE='#'
50106 HAVE_ECHLD_FALSE=
50107 fi
50108  
50109 if test "x$have_echld" = "xyes"
50110 then
50111  
50112 $as_echo "#define HAVE_ECHLD 1" >>confdefs.h
50113  
50114 echld_test_bin="echld_test\$(EXEEXT)"
50115 echld_dir="echld"
50116 else
50117 have_echld="no"
50118 echld_test_bin=""
50119 echld_dir=""
50120 fi
50121  
50122  
50123  
50124 # Enable/disable tfshark
50125 # Check whether --enable-tfshark was given.
50126 if test "${enable_tfshark+set}" = set; then :
50127 enableval=$enable_tfshark; tfshark=$enableval
50128 else
50129 enable_tfshark=no
50130 fi
50131  
50132  
50133 if test "x$enable_tfshark" = "xyes" ; then
50134 tfshark_bin="tfshark\$(EXEEXT)"
50135 tfshark_man="tfshark.1"
50136 wiresharkfilter_man="wireshark-filter.4"
50137 else
50138 tfshark_bin=""
50139 tfshark_man=""
50140 fi
50141  
50142  
50143  
50144  
50145 # Check whether --enable-pcap-ng-default was given.
50146 if test "${enable_pcap_ng_default+set}" = set; then :
50147 enableval=$enable_pcap_ng_default; enable_pcap_ng_default=$enableval
50148 else
50149 enable_pcap_ng_default=yes
50150 fi
50151  
50152 if test x$enable_pcap_ng_default = xyes; then
50153  
50154 $as_echo "#define PCAP_NG_DEFAULT 1" >>confdefs.h
50155  
50156 fi
50157  
50158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use libpcap remote capturing feature" >&5
50159 $as_echo_n "checking whether to use libpcap remote capturing feature... " >&6; }
50160  
50161  
50162 # Check whether --with-pcap-remote was given.
50163 if test "${with_pcap_remote+set}" = set; then :
50164 withval=$with_pcap_remote;
50165 if test $withval = no
50166 then
50167 want_pcap_remote=no
50168 else
50169 want_pcap_remote=yes
50170 fi
50171  
50172 else
50173  
50174 want_pcap_remote=no
50175  
50176 fi
50177  
50178 if test "x$want_pcap_remote" = "xno" -o "x$want_pcap" = "xno" ; then
50179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50180 $as_echo "no" >&6; }
50181 else
50182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50183 $as_echo "yes" >&6; }
50184  
50185 ac_save_LIBS="$LIBS"
50186 LIBS="$PCAP_LIBS $LIBS"
50187  
50188 $as_echo "#define HAVE_REMOTE 1" >>confdefs.h
50189  
50190 for ac_func in pcap_open
50191 do :
50192 ac_fn_c_check_func "$LINENO" "pcap_open" "ac_cv_func_pcap_open"
50193 if test "x$ac_cv_func_pcap_open" = xyes; then :
50194 cat >>confdefs.h <<_ACEOF
50195 #define HAVE_PCAP_OPEN 1
50196 _ACEOF
50197  
50198 fi
50199 done
50200  
50201 if test $ac_cv_func_pcap_open = "yes" ; then
50202  
50203 $as_echo "#define HAVE_PCAP_REMOTE 1" >>confdefs.h
50204  
50205 fi
50206 for ac_func in pcap_setsampling
50207 do :
50208 ac_fn_c_check_func "$LINENO" "pcap_setsampling" "ac_cv_func_pcap_setsampling"
50209 if test "x$ac_cv_func_pcap_setsampling" = xyes; then :
50210 cat >>confdefs.h <<_ACEOF
50211 #define HAVE_PCAP_SETSAMPLING 1
50212 _ACEOF
50213  
50214 fi
50215 done
50216  
50217 LIBS="$ac_save_LIBS"
50218  
50219 fi
50220  
50221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use zlib for gzip compression and decompression" >&5
50222 $as_echo_n "checking whether to use zlib for gzip compression and decompression... " >&6; }
50223  
50224  
50225 # Check whether --with-zlib was given.
50226 if test "${with_zlib+set}" = set; then :
50227 withval=$with_zlib;
50228 if test "x$withval" = "xno"
50229 then
50230 want_zlib=no
50231 elif test "x$withval" = "xyes"
50232 then
50233 want_zlib=yes
50234 else
50235 want_zlib=yes
50236 zlib_dir="$withval"
50237 fi
50238  
50239 else
50240  
50241 #
50242 # Use zlib if it's present, otherwise don't.
50243 #
50244 want_zlib=ifavailable
50245 zlib_dir=
50246  
50247 fi
50248  
50249 if test "x$want_zlib" = "xno" ; then
50250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50251 $as_echo "no" >&6; }
50252 else
50253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50254 $as_echo "yes" >&6; }
50255  
50256  
50257 ac_ws_CPPLAGS_saved="$CPPFLAGS"
50258 ac_ws_CFLAGS_saved="$CFLAGS"
50259 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
50260 ac_ws_LDFLAGS_saved="$LDFLAGS"
50261 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
50262 CFLAGS="$WS_CFLAGS $CFLAGS"
50263 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
50264 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
50265  
50266  
50267 if test "x$zlib_dir" != "x"
50268 then
50269 #
50270 # The user specified a directory in which zlib resides,
50271 # so add the "include" subdirectory of that directory to
50272 # the include file search path and the "lib" subdirectory
50273 # of that directory to the library search path.
50274 #
50275 # XXX - if there's also a zlib in a directory that's
50276 # already in CPPFLAGS or LDFLAGS, this won't make us find
50277 # the version in the specified directory, as the compiler
50278 # and/or linker will search that other directory before it
50279 # searches the specified directory.
50280 #
50281 CPPFLAGS="$CPPFLAGS -I$zlib_dir/include"
50282  
50283 if ${LDFLAGS+:} false; then :
50284  
50285 case " $LDFLAGS " in #(
50286 *" -L$zlib_dir/lib "*) :
50287 { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS already contains -L\$zlib_dir/lib"; } >&5
50288 (: LDFLAGS already contains -L$zlib_dir/lib) 2>&5
50289 ac_status=$?
50290 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50291 test $ac_status = 0; } ;; #(
50292 *) :
50293  
50294 as_fn_append LDFLAGS " -L$zlib_dir/lib"
50295 { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5
50296 (: LDFLAGS="$LDFLAGS") 2>&5
50297 ac_status=$?
50298 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50299 test $ac_status = 0; }
50300 ;;
50301 esac
50302  
50303 else
50304  
50305 LDFLAGS=-L$zlib_dir/lib
50306 { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5
50307 (: LDFLAGS="$LDFLAGS") 2>&5
50308 ac_status=$?
50309 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50310 test $ac_status = 0; }
50311  
50312 fi
50313  
50314 case "$host_os" in
50315 solaris*)
50316  
50317 if ${LDFLAGS+:} false; then :
50318  
50319 case " $LDFLAGS " in #(
50320 *" -R$zlib_dir/lib "*) :
50321 { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS already contains -R\$zlib_dir/lib"; } >&5
50322 (: LDFLAGS already contains -R$zlib_dir/lib) 2>&5
50323 ac_status=$?
50324 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50325 test $ac_status = 0; } ;; #(
50326 *) :
50327  
50328 as_fn_append LDFLAGS " -R$zlib_dir/lib"
50329 { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5
50330 (: LDFLAGS="$LDFLAGS") 2>&5
50331 ac_status=$?
50332 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50333 test $ac_status = 0; }
50334 ;;
50335 esac
50336  
50337 else
50338  
50339 LDFLAGS=-R$zlib_dir/lib
50340 { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS\""; } >&5
50341 (: LDFLAGS="$LDFLAGS") 2>&5
50342 ac_status=$?
50343 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50344 test $ac_status = 0; }
50345  
50346 fi
50347  
50348 ;;
50349 esac
50350  
50351 fi
50352  
50353 #
50354 # Make sure we have "zlib.h". If we don't, it means we probably
50355 # don't have zlib, so don't use it.
50356 #
50357 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
50358 if test "x$ac_cv_header_zlib_h" = xyes; then :
50359  
50360 else
50361  
50362 if test "x$zlib_dir" != "x"
50363 then
50364 #
50365 # The user used "--with-zlib=" to specify a directory
50366 # containing zlib, but we didn't find the header file
50367 # there; that either means they didn't specify the
50368 # right directory or are confused about whether zlib
50369 # is, in fact, installed. Report the error and give up.
50370 #
50371 as_fn_error $? "zlib header not found in directory specified in --with-zlib" "$LINENO" 5
50372 else
50373 if test "x$want_zlib" = "xyes"
50374 then
50375 #
50376 # The user tried to force us to use the library, but we
50377 # couldn't find the header file; report an error.
50378 #
50379 as_fn_error $? "Header file zlib.h not found." "$LINENO" 5
50380 else
50381 #
50382 # We couldn't find the header file; don't use the
50383 # library, as it's probably not present.
50384 #
50385 want_zlib=no
50386 fi
50387 fi
50388  
50389 fi
50390  
50391  
50392  
50393 if test "x$want_zlib" != "xno"
50394 then
50395 #
50396 # Well, we at least have the zlib header file.
50397 # We link with zlib to support uncompression of
50398 # gzipped network traffic, e.g. in an HTTP request
50399 # or response body.
50400 #
50401 if test "x$zlib_dir" != "x"
50402 then
50403 WS_CPPFLAGS="$WS_CPPFLAGS -I$zlib_dir/include"
50404  
50405 if ${WS_LDFLAGS+:} false; then :
50406  
50407 case " $WS_LDFLAGS " in #(
50408 *" -L$zlib_dir/lib "*) :
50409 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS already contains -L\$zlib_dir/lib"; } >&5
50410 (: WS_LDFLAGS already contains -L$zlib_dir/lib) 2>&5
50411 ac_status=$?
50412 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50413 test $ac_status = 0; } ;; #(
50414 *) :
50415  
50416 as_fn_append WS_LDFLAGS " -L$zlib_dir/lib"
50417 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
50418 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
50419 ac_status=$?
50420 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50421 test $ac_status = 0; }
50422 ;;
50423 esac
50424  
50425 else
50426  
50427 WS_LDFLAGS=-L$zlib_dir/lib
50428 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
50429 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
50430 ac_status=$?
50431 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50432 test $ac_status = 0; }
50433  
50434 fi
50435  
50436 case "$host_os" in
50437 solaris*)
50438  
50439 if ${WS_LDFLAGS+:} false; then :
50440  
50441 case " $WS_LDFLAGS " in #(
50442 *" -R$zlib_dir/lib "*) :
50443 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS already contains -R\$zlib_dir/lib"; } >&5
50444 (: WS_LDFLAGS already contains -R$zlib_dir/lib) 2>&5
50445 ac_status=$?
50446 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50447 test $ac_status = 0; } ;; #(
50448 *) :
50449  
50450 as_fn_append WS_LDFLAGS " -R$zlib_dir/lib"
50451 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
50452 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
50453 ac_status=$?
50454 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50455 test $ac_status = 0; }
50456 ;;
50457 esac
50458  
50459 else
50460  
50461 WS_LDFLAGS=-R$zlib_dir/lib
50462 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
50463 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
50464 ac_status=$?
50465 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50466 test $ac_status = 0; }
50467  
50468 fi
50469  
50470 ;;
50471 esac
50472  
50473 fi
50474 LIBS="-lz $LIBS"
50475  
50476 $as_echo "#define HAVE_ZLIB 1" >>confdefs.h
50477  
50478 #
50479 # Check for "inflatePrime()" in zlib, which we need
50480 # in order to read compressed capture files.
50481 #
50482 for ac_func in inflatePrime
50483 do :
50484 ac_fn_c_check_func "$LINENO" "inflatePrime" "ac_cv_func_inflatePrime"
50485 if test "x$ac_cv_func_inflatePrime" = xyes; then :
50486 cat >>confdefs.h <<_ACEOF
50487 #define HAVE_INFLATEPRIME 1
50488 _ACEOF
50489  
50490 fi
50491 done
50492  
50493  
50494 if test "x$ac_cv_func_inflatePrime" = "xyes" ; then
50495 #
50496 # Now check for "inflatePrime()" in zlib when
50497 # linking with the linker flags for GTK+
50498 # applications; people often grab XFree86 source
50499 # and build and install it on their systems,
50500 # and they appear sometimes to misconfigure
50501 # XFree86 so that, even on systems with zlib,
50502 # it assumes there is no zlib, so the XFree86
50503 # build process builds and installs its
50504 # own zlib in the X11 library directory.
50505 #
50506 # The zlib in at least some versions of XFree86
50507 # is an older version that may lack "inflatePrime()",
50508 # and that's the zlib with which Wireshark gets
50509 # linked, so the build of Wireshark fails.
50510 #
50511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflatePrime missing when linking with X11" >&5
50512 $as_echo_n "checking for inflatePrime missing when linking with X11... " >&6; }
50513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50514 /* end confdefs.h. */
50515  
50516 /* Override any GCC internal prototype to avoid an error.
50517 Use char because int might match the return type of a GCC
50518 builtin and then its argument prototype would still apply. */
50519 #ifdef __cplusplus
50520 extern "C"
50521 #endif
50522 char inflatePrime ();
50523 int
50524 main ()
50525 {
50526 return inflatePrime ();
50527 ;
50528 return 0;
50529 }
50530 _ACEOF
50531 if ac_fn_c_try_link "$LINENO"; then :
50532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50533 $as_echo "no" >&6; }
50534 else
50535  
50536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50537 $as_echo "yes" >&6; }
50538 as_fn_error $? "old zlib found when linking with X11 - get rid of old zlib." "$LINENO" 5
50539  
50540 fi
50541 rm -f core conftest.err conftest.$ac_objext \
50542 conftest$ac_exeext conftest.$ac_ext
50543 fi
50544 fi
50545  
50546  
50547 CPPFLAGS="$ac_ws_CPPLAGS_saved"
50548 CFLAGS="$ac_ws_CFLAGS_saved"
50549 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
50550 LDFLAGS="$ac_ws_LDFLAGS_saved"
50551  
50552  
50553 if test "x$want_zlib" = "xno" ; then
50554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: zlib not found - disabling gzip compression and decompression" >&5
50555 $as_echo "zlib not found - disabling gzip compression and decompression" >&6; }
50556 else
50557 if test "x$ac_cv_func_inflatePrime" = "xno" ; then
50558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: inflatePrime not found in zlib - disabling gzipped capture file support" >&5
50559 $as_echo "inflatePrime not found in zlib - disabling gzipped capture file support" >&6; }
50560 fi
50561 fi
50562 fi
50563  
50564  
50565 # Check whether --with-lua was given.
50566 if test "${with_lua+set}" = set; then :
50567 withval=$with_lua;
50568 if test $withval = no
50569 then
50570 want_lua=no
50571 elif test $withval = yes
50572 then
50573 want_lua=yes
50574 else
50575 want_lua=yes
50576 want_lua_dir=$withval
50577 fi
50578  
50579 else
50580  
50581 # By default use Lua if we can find it
50582 want_lua=ifavailable
50583 lua_dir=
50584  
50585 fi
50586  
50587 if test "x$want_lua" != "xno" ; then
50588  
50589  
50590  
50591 ac_ws_CPPLAGS_saved="$CPPFLAGS"
50592 ac_ws_CFLAGS_saved="$CFLAGS"
50593 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
50594 ac_ws_LDFLAGS_saved="$LDFLAGS"
50595 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
50596 CFLAGS="$WS_CFLAGS $CFLAGS"
50597 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
50598 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
50599  
50600  
50601 if test "x$want_lua_dir" = "x"
50602 then
50603 # The user didn't tell us where to find Lua. Let's go look for it.
50604  
50605 # First, try the standard (pkg-config) way.
50606 # Unfortunately Lua's pkg-config file isn't standardly named.
50607 # Some distributions allow installation of multiple versions of
50608 # Lua at the same time. On such systems each version has its
50609 # own package name.
50610 #
50611 # We use a for loop instead of giving all the package names to
50612 # PKG_CHECK_MODULES because doing the latter doesn't appear to
50613 # work reliably (some package names are not searched for).
50614 for pkg in "lua < 5.3" lua5.2 lua-5.2 lua52 lua5.1 lua-5.1 lua51 lua5.0 lua-5.0 lua50
50615 do
50616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if you have $pkg" >&5
50617 $as_echo_n "checking if you have $pkg... " >&6; }
50618 if test -n "$PKG_CONFIG" && \
50619 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg\""; } >&5
50620 ($PKG_CONFIG --exists --print-errors "$pkg") 2>&5
50621 ac_status=$?
50622 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50623 test $ac_status = 0; }; then
50624  
50625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50626 $as_echo "yes" >&6; }
50627 have_lua=yes
50628  
50629 else
50630  
50631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50632 $as_echo "no" >&6; }
50633  
50634 fi
50635  
50636 if test "x$have_lua" = "xyes"
50637 then
50638  
50639  
50640 pkg_failed=no
50641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
50642 $as_echo_n "checking for LUA... " >&6; }
50643  
50644 if test -n "$LUA_CFLAGS"; then
50645 pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
50646 elif test -n "$PKG_CONFIG"; then
50647 if test -n "$PKG_CONFIG" && \
50648 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg\""; } >&5
50649 ($PKG_CONFIG --exists --print-errors "$pkg") 2>&5
50650 ac_status=$?
50651 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50652 test $ac_status = 0; }; then
50653 pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "$pkg" 2>/dev/null`
50654 test "x$?" != "x0" && pkg_failed=yes
50655 else
50656 pkg_failed=yes
50657 fi
50658 else
50659 pkg_failed=untried
50660 fi
50661 if test -n "$LUA_LIBS"; then
50662 pkg_cv_LUA_LIBS="$LUA_LIBS"
50663 elif test -n "$PKG_CONFIG"; then
50664 if test -n "$PKG_CONFIG" && \
50665 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg\""; } >&5
50666 ($PKG_CONFIG --exists --print-errors "$pkg") 2>&5
50667 ac_status=$?
50668 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
50669 test $ac_status = 0; }; then
50670 pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "$pkg" 2>/dev/null`
50671 test "x$?" != "x0" && pkg_failed=yes
50672 else
50673 pkg_failed=yes
50674 fi
50675 else
50676 pkg_failed=untried
50677 fi
50678  
50679  
50680  
50681 if test $pkg_failed = yes; then
50682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50683 $as_echo "no" >&6; }
50684  
50685 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
50686 _pkg_short_errors_supported=yes
50687 else
50688 _pkg_short_errors_supported=no
50689 fi
50690 if test $_pkg_short_errors_supported = yes; then
50691 LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$pkg" 2>&1`
50692 else
50693 LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$pkg" 2>&1`
50694 fi
50695 # Put the nasty error message in config.log where it belongs
50696 echo "$LUA_PKG_ERRORS" >&5
50697  
50698 as_fn_error $? "Package requirements ($pkg) were not met:
50699  
50700 $LUA_PKG_ERRORS
50701  
50702 Consider adjusting the PKG_CONFIG_PATH environment variable if you
50703 installed software in a non-standard prefix.
50704  
50705 Alternatively, you may set the environment variables LUA_CFLAGS
50706 and LUA_LIBS to avoid the need to call pkg-config.
50707 See the pkg-config man page for more details." "$LINENO" 5
50708 elif test $pkg_failed = untried; then
50709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50710 $as_echo "no" >&6; }
50711 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50712 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50713 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
50714 is in your PATH or set the PKG_CONFIG environment variable to the full
50715 path to pkg-config.
50716  
50717 Alternatively, you may set the environment variables LUA_CFLAGS
50718 and LUA_LIBS to avoid the need to call pkg-config.
50719 See the pkg-config man page for more details.
50720  
50721 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
50722 See \`config.log' for more details" "$LINENO" 5; }
50723 else
50724 LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
50725 LUA_LIBS=$pkg_cv_LUA_LIBS
50726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50727 $as_echo "yes" >&6; }
50728  
50729 fi
50730  
50731 if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
50732 LUA_CFLAGS=`echo " $LUA_CFLAGS" \
50733 | sed -e 's/ *-I *\// -isystem\//g' -e 's/^ *//'`
50734 fi
50735  
50736  
50737 CPPFLAGS="$LUA_CFLAGS $CPPFLAGS"
50738 for ac_header in lua.h lualib.h lauxlib.h
50739 do :
50740 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
50741 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
50742 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
50743 cat >>confdefs.h <<_ACEOF
50744 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
50745 _ACEOF
50746  
50747 fi
50748  
50749 done
50750  
50751 break
50752 fi
50753 done
50754 fi
50755  
50756 if test "x$have_lua" != "xyes"
50757 then
50758 # We don't have pkg-config or the user specified the path to
50759 # Lua (in $want_lua_dir).
50760 # Let's look for the header file.
50761  
50762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the location of lua.h" >&5
50763 $as_echo_n "checking for the location of lua.h... " >&6; }
50764 if test "x$want_lua_dir" = "x"
50765 then
50766 # The user didn't tell us where to look so we'll look in some
50767 # standard locations.
50768 want_lua_dir="/usr/local /usr $prefix"
50769 fi
50770 for dir in $want_lua_dir
50771 do
50772 if test -r "$dir/include/lua.h"
50773 then
50774 header_dir="$dir/include"
50775 lua_dir=$dir
50776 break
50777 fi
50778  
50779 for ver in 5.2 52 5.1 51 5.0 50
50780 do
50781 if test -r "$dir/include/lua$ver/lua.h"
50782 then
50783 header_dir="$dir/include/lua$ver"
50784 lua_dir=$dir
50785 break
50786 fi
50787 done
50788 done
50789  
50790 if test "x$header_dir" = "x"
50791 then
50792 have_lua=no
50793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
50794 $as_echo "not found" >&6; }
50795 else
50796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $header_dir" >&5
50797 $as_echo "$header_dir" >&6; }
50798  
50799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the Lua version" >&5
50800 $as_echo_n "checking the Lua version... " >&6; }
50801 lua_ver=`$AWK '/LUA_VERSION_NUM/ { print \$NF; }' \$header_dir/lua.h | sed 's/0/./'`
50802  
50803 if test "x$lua_ver" = "x5.3"
50804 then
50805 # Wireshark doesn't compile with Lua 5.3 today
50806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lua_ver - disabling Lua support" >&5
50807 $as_echo "$lua_ver - disabling Lua support" >&6; }
50808 have_lua=no
50809 else
50810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lua_ver" >&5
50811 $as_echo "$lua_ver" >&6; }
50812  
50813 CPPFLAGS="$CPPFLAGS -I$header_dir"
50814 for ac_header in lua.h lualib.h lauxlib.h
50815 do :
50816 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
50817 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
50818 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
50819 cat >>confdefs.h <<_ACEOF
50820 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
50821 _ACEOF
50822  
50823 else
50824  
50825 have_lua=no
50826  
50827 fi
50828  
50829 done
50830  
50831 fi
50832  
50833 if test "x$have_lua" = "x"
50834 then
50835 # Set LUA_CFLAGS
50836 LUA_CFLAGS="-I$header_dir"
50837  
50838 # We have the header files and they work. Now let's check if we
50839 # have the library and it works.
50840 #
50841 # XXX - if there's also a liblua in a directory that's
50842 # already in CPPFLAGS or LDFLAGS, this won't make us find
50843 # the version in the specified directory, as the compiler
50844 # and/or linker will search that other directory before it
50845 # searches the specified directory.
50846 #
50847 # XXX - lib64?
50848 LDFLAGS="-L$lua_dir/lib $LDFLAGS"
50849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing luaL_openlibs" >&5
50850 $as_echo_n "checking for library containing luaL_openlibs... " >&6; }
50851 if ${ac_cv_search_luaL_openlibs+:} false; then :
50852 $as_echo_n "(cached) " >&6
50853 else
50854 ac_func_search_save_LIBS=$LIBS
50855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50856 /* end confdefs.h. */
50857  
50858 /* Override any GCC internal prototype to avoid an error.
50859 Use char because int might match the return type of a GCC
50860 builtin and then its argument prototype would still apply. */
50861 #ifdef __cplusplus
50862 extern "C"
50863 #endif
50864 char luaL_openlibs ();
50865 int
50866 main ()
50867 {
50868 return luaL_openlibs ();
50869 ;
50870 return 0;
50871 }
50872 _ACEOF
50873 for ac_lib in '' lua-${lua_ver} lua${lua_ver} lua; do
50874 if test -z "$ac_lib"; then
50875 ac_res="none required"
50876 else
50877 ac_res=-l$ac_lib
50878 LIBS="-l$ac_lib -lm $ac_func_search_save_LIBS"
50879 fi
50880 if ac_fn_c_try_link "$LINENO"; then :
50881 ac_cv_search_luaL_openlibs=$ac_res
50882 fi
50883 rm -f core conftest.err conftest.$ac_objext \
50884 conftest$ac_exeext
50885 if ${ac_cv_search_luaL_openlibs+:} false; then :
50886 break
50887 fi
50888 done
50889 if ${ac_cv_search_luaL_openlibs+:} false; then :
50890  
50891 else
50892 ac_cv_search_luaL_openlibs=no
50893 fi
50894 rm conftest.$ac_ext
50895 LIBS=$ac_func_search_save_LIBS
50896 fi
50897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_luaL_openlibs" >&5
50898 $as_echo "$ac_cv_search_luaL_openlibs" >&6; }
50899 ac_res=$ac_cv_search_luaL_openlibs
50900 if test "$ac_res" != no; then :
50901 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
50902  
50903 LUA_LIBS="-L$lua_dir/lib $ac_cv_search_luaL_openlibs -lm"
50904 have_lua=yes
50905  
50906 else
50907  
50908 have_lua=no
50909  
50910 fi
50911  
50912 fi
50913 fi
50914 fi
50915  
50916  
50917 CPPFLAGS="$ac_ws_CPPLAGS_saved"
50918 CFLAGS="$ac_ws_CFLAGS_saved"
50919 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
50920 LDFLAGS="$ac_ws_LDFLAGS_saved"
50921  
50922  
50923  
50924 if test "x$want_lua" = "xyes" -a "x$have_lua" = "xno"
50925 then
50926 as_fn_error $? "Lua support was requested, but is not available" "$LINENO" 5
50927 fi
50928 fi
50929 if test "x$have_lua" = "xyes"
50930 then
50931  
50932 $as_echo "#define HAVE_LUA 1" >>confdefs.h
50933  
50934 fi
50935 if test x$have_lua = xyes; then
50936 HAVE_LIBLUA_TRUE=
50937 HAVE_LIBLUA_FALSE='#'
50938 else
50939 HAVE_LIBLUA_TRUE='#'
50940 HAVE_LIBLUA_FALSE=
50941 fi
50942  
50943  
50944  
50945  
50946  
50947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use libportaudio for the GTK+ RTP player" >&5
50948 $as_echo_n "checking whether to use libportaudio for the GTK+ RTP player... " >&6; }
50949  
50950  
50951 # Check whether --with-portaudio was given.
50952 if test "${with_portaudio+set}" = set; then :
50953 withval=$with_portaudio;
50954 if test $withval = no
50955 then
50956 want_portaudio=no
50957 elif test $withval = yes
50958 then
50959 want_portaudio=yes
50960 else
50961 want_portaudio=yes
50962 portaudio_dir=$withval
50963 fi
50964  
50965 else
50966  
50967 #
50968 # Use libportaudio by default
50969 #
50970 want_portaudio=ifavailable
50971 portaudio_dir=
50972  
50973 fi
50974  
50975 if test "x$want_portaudio" = "xno" ; then
50976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50977 $as_echo "no" >&6; }
50978 else
50979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50980 $as_echo "yes" >&6; }
50981  
50982  
50983  
50984 ac_ws_CPPLAGS_saved="$CPPFLAGS"
50985 ac_ws_CFLAGS_saved="$CFLAGS"
50986 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
50987 ac_ws_LDFLAGS_saved="$LDFLAGS"
50988 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
50989 CFLAGS="$WS_CFLAGS $CFLAGS"
50990 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
50991 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
50992  
50993 wireshark_save_LIBS="$LIBS"
50994  
50995 if test "x$portaudio_dir" != "x"
50996 then
50997 #
50998 # The user specified a directory in which libportaudio
50999 # resides, so add the "include" subdirectory of that directory to
51000 # the include file search path and the "lib" subdirectory
51001 # of that directory to the library search path.
51002 #
51003 # XXX - if there's also a libportaudio in a directory that's
51004 # already in CPPFLAGS or LDFLAGS, this won't make us find
51005 # the version in the specified directory, as the compiler
51006 # and/or linker will search that other directory before it
51007 # searches the specified directory.
51008 #
51009 CPPFLAGS="$CPPFLAGS -I$portaudio_dir/include"
51010 LDFLAGS="$LDFLAGS -L$portaudio_dir/lib"
51011 fi
51012 LIBS="-lportaudio $LIBS"
51013  
51014 #
51015 # Make sure we have "portaudio.h". If we don't, it means we probably
51016 # don't have libportaudio, so don't use it.
51017 #
51018 for ac_header in portaudio.h
51019 do :
51020 ac_fn_c_check_header_mongrel "$LINENO" "portaudio.h" "ac_cv_header_portaudio_h" "$ac_includes_default"
51021 if test "x$ac_cv_header_portaudio_h" = xyes; then :
51022 cat >>confdefs.h <<_ACEOF
51023 #define HAVE_PORTAUDIO_H 1
51024 _ACEOF
51025  
51026 else
51027  
51028 if test "x$portaudio_dir" != "x"
51029 then
51030 #
51031 # The user used "--with-portaudio=" to specify a directory
51032 # containing libportaudio, but we didn't find the header file
51033 # there; that either means they didn't specify the
51034 # right directory or are confused about whether libportaudio
51035 # is, in fact, installed. Report the error and give up.
51036 #
51037 as_fn_error $? "libportaudio header not found in directory specified in --with-portaudio" "$LINENO" 5
51038 else
51039 if test "x$want_portaudio" = "xyes"
51040 then
51041 #
51042 # The user tried to force us to use the library, but we
51043 # couldn't find the header file; report an error.
51044 #
51045 as_fn_error $? "Header file portaudio.h not found." "$LINENO" 5
51046 else
51047 #
51048 # We couldn't find the header file; don't use the
51049 # library, as it's probably not present.
51050 #
51051 want_portaudio=no
51052 fi
51053 fi
51054  
51055 fi
51056  
51057 done
51058  
51059  
51060 #
51061 # Check whether we have the right version of portaudio
51062 #
51063 if test "x$want_portaudio" != "xno"
51064 then
51065 ac_fn_c_check_type "$LINENO" "PortAudioStream" "ac_cv_type_PortAudioStream" "#include <portaudio.h>
51066 "
51067 if test "x$ac_cv_type_PortAudioStream" = xyes; then :
51068  
51069 $as_echo "#define PORTAUDIO_API_1 1" >>confdefs.h
51070  
51071 fi
51072  
51073 fi
51074  
51075 if test "x$want_portaudio" != "xno"
51076 then
51077 #
51078 # Well, we at least have the portaudio header file.
51079 #
51080 # let's check if the libs are there
51081 #
51082 PORTAUDIO_LIBS=""
51083 PORTAUDIO_INCLUDES=""
51084  
51085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Pa_Initialize in -lportaudio" >&5
51086 $as_echo_n "checking for Pa_Initialize in -lportaudio... " >&6; }
51087 if ${ac_cv_lib_portaudio_Pa_Initialize+:} false; then :
51088 $as_echo_n "(cached) " >&6
51089 else
51090 ac_check_lib_save_LIBS=$LIBS
51091 LIBS="-lportaudio $LIBS"
51092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51093 /* end confdefs.h. */
51094  
51095 /* Override any GCC internal prototype to avoid an error.
51096 Use char because int might match the return type of a GCC
51097 builtin and then its argument prototype would still apply. */
51098 #ifdef __cplusplus
51099 extern "C"
51100 #endif
51101 char Pa_Initialize ();
51102 int
51103 main ()
51104 {
51105 return Pa_Initialize ();
51106 ;
51107 return 0;
51108 }
51109 _ACEOF
51110 if ac_fn_c_try_link "$LINENO"; then :
51111 ac_cv_lib_portaudio_Pa_Initialize=yes
51112 else
51113 ac_cv_lib_portaudio_Pa_Initialize=no
51114 fi
51115 rm -f core conftest.err conftest.$ac_objext \
51116 conftest$ac_exeext conftest.$ac_ext
51117 LIBS=$ac_check_lib_save_LIBS
51118 fi
51119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_portaudio_Pa_Initialize" >&5
51120 $as_echo "$ac_cv_lib_portaudio_Pa_Initialize" >&6; }
51121 if test "x$ac_cv_lib_portaudio_Pa_Initialize" = xyes; then :
51122  
51123 if test "x$portaudio_dir" != "x"
51124 then
51125 #
51126 # Put the "-I" and "-L" flags for portaudio
51127 # into PORTAUDIO_INCLUDES and PORTAUDIO_LIBS,
51128 # respectively.
51129 #
51130 PORTAUDIO_LIBS="-L$portaudio_dir/lib -lportaudio"
51131 PORTAUDIO_INCLUDES="-I$portaudio_dir/include"
51132 else
51133 PORTAUDIO_LIBS="-lportaudio"
51134 fi
51135  
51136 $as_echo "#define HAVE_LIBPORTAUDIO 1" >>confdefs.h
51137  
51138 want_portaudio=yes
51139  
51140 else
51141  
51142 # User requested --with-portaudio but it isn't available
51143 if test "x$want_portaudio" = "xyes"
51144 then
51145 as_fn_error $? "Linking with libportaudio failed." "$LINENO" 5
51146 fi
51147 want_portaudio=no
51148  
51149 fi
51150  
51151  
51152  
51153  
51154 fi
51155  
51156 LIBS="$wireshark_save_LIBS"
51157  
51158 CPPFLAGS="$ac_ws_CPPLAGS_saved"
51159 CFLAGS="$ac_ws_CFLAGS_saved"
51160 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
51161 LDFLAGS="$ac_ws_LDFLAGS_saved"
51162  
51163  
51164 if test "x$want_portaudio" = "xno" ; then
51165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libportaudio not found - disabling support for the GTK+ RTP player" >&5
51166 $as_echo "libportaudio not found - disabling support for the GTK+ RTP player" >&6; }
51167 fi
51168 fi
51169 if test x$want_portaudio = xyes; then
51170 HAVE_LIBPORTAUDIO_TRUE=
51171 HAVE_LIBPORTAUDIO_FALSE='#'
51172 else
51173 HAVE_LIBPORTAUDIO_TRUE='#'
51174 HAVE_LIBPORTAUDIO_FALSE=
51175 fi
51176  
51177  
51178  
51179 # Extract the first word of "setcap", so it can be a program name with args.
51180 set dummy setcap; ac_word=$2
51181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51182 $as_echo_n "checking for $ac_word... " >&6; }
51183 if ${ac_cv_path_SETCAP+:} false; then :
51184 $as_echo_n "(cached) " >&6
51185 else
51186 case $SETCAP in
51187 [\\/]* | ?:[\\/]*)
51188 ac_cv_path_SETCAP="$SETCAP" # Let the user override the test with a path.
51189 ;;
51190 *)
51191 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51192 for as_dir in $PATH
51193 do
51194 IFS=$as_save_IFS
51195 test -z "$as_dir" && as_dir=.
51196 for ac_exec_ext in '' $ac_executable_extensions; do
51197 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51198 ac_cv_path_SETCAP="$as_dir/$ac_word$ac_exec_ext"
51199 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51200 break 2
51201 fi
51202 done
51203 done
51204 IFS=$as_save_IFS
51205  
51206 ;;
51207 esac
51208 fi
51209 SETCAP=$ac_cv_path_SETCAP
51210 if test -n "$SETCAP"; then
51211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETCAP" >&5
51212 $as_echo "$SETCAP" >&6; }
51213 else
51214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51215 $as_echo "no" >&6; }
51216 fi
51217  
51218  
51219 # Check whether --enable-setcap-install was given.
51220 if test "${enable_setcap_install+set}" = set; then :
51221 enableval=$enable_setcap_install; enable_setcap_install=$enableval
51222 else
51223 enable_setcap_install=no
51224 fi
51225  
51226  
51227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install dumpcap with cap_net_admin and cap_net_raw capabilities" >&5
51228 $as_echo_n "checking whether to install dumpcap with cap_net_admin and cap_net_raw capabilities... " >&6; }
51229 if test "x$enable_setcap_install" = "xno" ; then
51230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51231 $as_echo "no" >&6; }
51232 else
51233 if test "x$SETCAP" = "x" ; then
51234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: setcap not found" >&5
51235 $as_echo "setcap not found" >&6; }
51236 as_fn_error $? "Setcap install was requested, but setcap was not found" "$LINENO" 5
51237 elif test "x$enable_dumpcap" = "xno" ; then
51238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: dumpcap disabled" >&5
51239 $as_echo "dumpcap disabled" >&6; }
51240 as_fn_error $? "Setcap install works only with dumpcap, but dumpcap is disabled" "$LINENO" 5
51241 else
51242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51243 $as_echo "yes" >&6; }
51244 fi
51245 fi
51246  
51247 if test x$enable_setcap_install = xyes; then
51248 SETCAP_INSTALL_TRUE=
51249 SETCAP_INSTALL_FALSE='#'
51250 else
51251 SETCAP_INSTALL_TRUE='#'
51252 SETCAP_INSTALL_FALSE=
51253 fi
51254  
51255  
51256 # Check whether --enable-setuid-install was given.
51257 if test "${enable_setuid_install+set}" = set; then :
51258 enableval=$enable_setuid_install; enable_setuid_install=$enableval
51259 else
51260 enable_setuid_install=no
51261 fi
51262  
51263  
51264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install dumpcap setuid" >&5
51265 $as_echo_n "checking whether to install dumpcap setuid... " >&6; }
51266 if test "x$enable_setuid_install" = "xno" ; then
51267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51268 $as_echo "no" >&6; }
51269 else
51270 if test "x$enable_setcap_install" = "xyes" ; then
51271 enable_setuid_install=no
51272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: setcap and setuid both selected" >&5
51273 $as_echo "setcap and setuid both selected" >&6; }
51274 as_fn_error $? "You must choose one of setcap install and setuid install" "$LINENO" 5
51275 elif test "x$enable_dumpcap" = "xno" ; then
51276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: dumpcap disabled" >&5
51277 $as_echo "dumpcap disabled" >&6; }
51278 as_fn_error $? "Setuid install works only with dumpcap, but dumpcap is disabled" "$LINENO" 5
51279 else
51280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51281 $as_echo "yes" >&6; }
51282 fi
51283 fi
51284  
51285 if test x$enable_setuid_install = xyes; then
51286 SETUID_INSTALL_TRUE=
51287 SETUID_INSTALL_FALSE='#'
51288 else
51289 SETUID_INSTALL_TRUE='#'
51290 SETUID_INSTALL_FALSE=
51291 fi
51292  
51293 for ac_func in setresuid setresgid
51294 do :
51295 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
51296 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
51297 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
51298 cat >>confdefs.h <<_ACEOF
51299 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
51300 _ACEOF
51301  
51302 fi
51303 done
51304  
51305  
51306 DUMPCAP_GROUP=''
51307  
51308 # Check whether --with-dumpcap-group was given.
51309 if test "${with_dumpcap_group+set}" = set; then :
51310 withval=$with_dumpcap_group;
51311 if test "x$withval" = "xyes"; then
51312 as_fn_error $? "No dumpcap group specified." "$LINENO" 5
51313 elif test "x$withval" != "xno"; then
51314 if test "x$enable_dumpcap" = "xno" ; then
51315 as_fn_error $? "dumpcap group install works only with dumpcap but dumpcap is disabled" "$LINENO" 5
51316 fi
51317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
51318 $as_echo "$withval" >&6; }
51319 DUMPCAP_GROUP="$withval"
51320 fi
51321  
51322 fi
51323  
51324  
51325 if test x$DUMPCAP_GROUP != x; then
51326 HAVE_DUMPCAP_GROUP_TRUE=
51327 HAVE_DUMPCAP_GROUP_FALSE='#'
51328 else
51329 HAVE_DUMPCAP_GROUP_TRUE='#'
51330 HAVE_DUMPCAP_GROUP_FALSE=
51331 fi
51332  
51333  
51334 LIBCAP_LIBS=''
51335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use the libcap capabilities library" >&5
51336 $as_echo_n "checking whether to use the libcap capabilities library... " >&6; }
51337  
51338  
51339 # Check whether --with-libcap was given.
51340 if test "${with_libcap+set}" = set; then :
51341 withval=$with_libcap;
51342 if test "x$withval" = "xno"; then
51343 want_libcap=no
51344 elif test "x$withval" = "xyes"; then
51345 want_libcap=yes
51346 elif test -d "$withval"; then
51347 want_libcap=yes
51348  
51349 if ${WS_LDFLAGS+:} false; then :
51350  
51351 case " $WS_LDFLAGS " in #(
51352 *" -L${withval}/lib "*) :
51353 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS already contains -L\${withval}/lib"; } >&5
51354 (: WS_LDFLAGS already contains -L${withval}/lib) 2>&5
51355 ac_status=$?
51356 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51357 test $ac_status = 0; } ;; #(
51358 *) :
51359  
51360 as_fn_append WS_LDFLAGS " -L${withval}/lib"
51361 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
51362 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
51363 ac_status=$?
51364 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51365 test $ac_status = 0; }
51366 ;;
51367 esac
51368  
51369 else
51370  
51371 WS_LDFLAGS=-L${withval}/lib
51372 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
51373 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
51374 ac_status=$?
51375 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51376 test $ac_status = 0; }
51377  
51378 fi
51379  
51380 case "$host_os" in
51381 solaris*)
51382  
51383 if ${WS_LDFLAGS+:} false; then :
51384  
51385 case " $WS_LDFLAGS " in #(
51386 *" -R${withval}/lib "*) :
51387 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS already contains -R\${withval}/lib"; } >&5
51388 (: WS_LDFLAGS already contains -R${withval}/lib) 2>&5
51389 ac_status=$?
51390 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51391 test $ac_status = 0; } ;; #(
51392 *) :
51393  
51394 as_fn_append WS_LDFLAGS " -R${withval}/lib"
51395 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
51396 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
51397 ac_status=$?
51398 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51399 test $ac_status = 0; }
51400 ;;
51401 esac
51402  
51403 else
51404  
51405 WS_LDFLAGS=-R${withval}/lib
51406 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
51407 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
51408 ac_status=$?
51409 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51410 test $ac_status = 0; }
51411  
51412 fi
51413  
51414 ;;
51415 esac
51416  
51417 fi
51418  
51419 fi
51420  
51421 if test "x$with_libcap" = "xno" ; then
51422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51423 $as_echo "no" >&6; }
51424 else
51425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51426 $as_echo "yes" >&6; }
51427  
51428 want_libcap=defaultyes
51429  
51430 if test "x$want_libcap" = "xdefaultyes"; then
51431 want_libcap=yes
51432 fi
51433  
51434 if test "x$want_libcap" = "xyes"; then
51435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_set_flag in -lcap" >&5
51436 $as_echo_n "checking for cap_set_flag in -lcap... " >&6; }
51437 if ${ac_cv_lib_cap_cap_set_flag+:} false; then :
51438 $as_echo_n "(cached) " >&6
51439 else
51440 ac_check_lib_save_LIBS=$LIBS
51441 LIBS="-lcap $LIBS"
51442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51443 /* end confdefs.h. */
51444  
51445 /* Override any GCC internal prototype to avoid an error.
51446 Use char because int might match the return type of a GCC
51447 builtin and then its argument prototype would still apply. */
51448 #ifdef __cplusplus
51449 extern "C"
51450 #endif
51451 char cap_set_flag ();
51452 int
51453 main ()
51454 {
51455 return cap_set_flag ();
51456 ;
51457 return 0;
51458 }
51459 _ACEOF
51460 if ac_fn_c_try_link "$LINENO"; then :
51461 ac_cv_lib_cap_cap_set_flag=yes
51462 else
51463 ac_cv_lib_cap_cap_set_flag=no
51464 fi
51465 rm -f core conftest.err conftest.$ac_objext \
51466 conftest$ac_exeext conftest.$ac_ext
51467 LIBS=$ac_check_lib_save_LIBS
51468 fi
51469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cap_cap_set_flag" >&5
51470 $as_echo "$ac_cv_lib_cap_cap_set_flag" >&6; }
51471 if test "x$ac_cv_lib_cap_cap_set_flag" = xyes; then :
51472  
51473 LIBCAP_LIBS=-lcap
51474  
51475 $as_echo "#define HAVE_LIBCAP 1" >>confdefs.h
51476  
51477 have_good_libcap=yes
51478  
51479 fi
51480  
51481 else
51482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not required" >&5
51483 $as_echo "not required" >&6; }
51484 fi
51485  
51486 fi
51487  
51488  
51489 for ac_header in fcntl.h getopt.h grp.h inttypes.h netdb.h pwd.h unistd.h
51490 do :
51491 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51492 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
51493 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51494 cat >>confdefs.h <<_ACEOF
51495 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51496 _ACEOF
51497  
51498 fi
51499  
51500 done
51501  
51502 for ac_header in sys/ioctl.h sys/param.h sys/socket.h sys/sockio.h sys/stat.h sys/time.h sys/types.h sys/utsname.h sys/wait.h
51503 do :
51504 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51505 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
51506 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51507 cat >>confdefs.h <<_ACEOF
51508 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51509 _ACEOF
51510  
51511 fi
51512  
51513 done
51514  
51515 for ac_header in netinet/in.h
51516 do :
51517 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
51518 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
51519 cat >>confdefs.h <<_ACEOF
51520 #define HAVE_NETINET_IN_H 1
51521 _ACEOF
51522  
51523 fi
51524  
51525 done
51526  
51527 for ac_header in arpa/inet.h arpa/nameser.h
51528 do :
51529 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51530 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
51531 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51532 cat >>confdefs.h <<_ACEOF
51533 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51534 _ACEOF
51535  
51536 fi
51537  
51538 done
51539  
51540 for ac_header in ifaddrs.h
51541 do :
51542 ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default"
51543 if test "x$ac_cv_header_ifaddrs_h" = xyes; then :
51544 cat >>confdefs.h <<_ACEOF
51545 #define HAVE_IFADDRS_H 1
51546 _ACEOF
51547  
51548 fi
51549  
51550 done
51551  
51552  
51553 #
51554 # On Linux, check for some additional headers, which we need as a
51555 # workaround for a bonding driver bug and for libpcap's current lack
51556 # of its own workaround for that bug.
51557 #
51558 case "$host_os" in
51559 linux*)
51560 for ac_header in linux/sockios.h linux/if_bonding.h
51561 do :
51562 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51563 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <sys/socket.h>
51564 "
51565 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51566 cat >>confdefs.h <<_ACEOF
51567 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51568 _ACEOF
51569  
51570 fi
51571  
51572 done
51573  
51574 ;;
51575 esac
51576  
51577 SSL_LIBS=''
51578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use SSL library" >&5
51579 $as_echo_n "checking whether to use SSL library... " >&6; }
51580  
51581  
51582 # Check whether --with-ssl was given.
51583 if test "${with_ssl+set}" = set; then :
51584 withval=$with_ssl;
51585 if test "x$withval" = "xno"; then
51586 want_ssl=no
51587 elif test "x$withval" = "xyes"; then
51588 want_ssl=yes
51589 elif test -d "$withval"; then
51590 want_ssl=yes
51591  
51592 if ${WS_LDFLAGS+:} false; then :
51593  
51594 case " $WS_LDFLAGS " in #(
51595 *" -L${withval}/lib "*) :
51596 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS already contains -L\${withval}/lib"; } >&5
51597 (: WS_LDFLAGS already contains -L${withval}/lib) 2>&5
51598 ac_status=$?
51599 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51600 test $ac_status = 0; } ;; #(
51601 *) :
51602  
51603 as_fn_append WS_LDFLAGS " -L${withval}/lib"
51604 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
51605 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
51606 ac_status=$?
51607 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51608 test $ac_status = 0; }
51609 ;;
51610 esac
51611  
51612 else
51613  
51614 WS_LDFLAGS=-L${withval}/lib
51615 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
51616 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
51617 ac_status=$?
51618 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51619 test $ac_status = 0; }
51620  
51621 fi
51622  
51623 case "$host_os" in
51624 solaris*)
51625  
51626 if ${WS_LDFLAGS+:} false; then :
51627  
51628 case " $WS_LDFLAGS " in #(
51629 *" -R${withval}/lib "*) :
51630 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS already contains -R\${withval}/lib"; } >&5
51631 (: WS_LDFLAGS already contains -R${withval}/lib) 2>&5
51632 ac_status=$?
51633 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51634 test $ac_status = 0; } ;; #(
51635 *) :
51636  
51637 as_fn_append WS_LDFLAGS " -R${withval}/lib"
51638 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
51639 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
51640 ac_status=$?
51641 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51642 test $ac_status = 0; }
51643 ;;
51644 esac
51645  
51646 else
51647  
51648 WS_LDFLAGS=-R${withval}/lib
51649 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
51650 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
51651 ac_status=$?
51652 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51653 test $ac_status = 0; }
51654  
51655 fi
51656  
51657 ;;
51658 esac
51659  
51660 fi
51661  
51662 else
51663  
51664 want_ssl=no
51665  
51666 fi
51667  
51668 if test "x$want_ssl" = "xyes"; then
51669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51670 $as_echo "yes" >&6; }
51671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_md5 in -lcrypto" >&5
51672 $as_echo_n "checking for EVP_md5 in -lcrypto... " >&6; }
51673 if ${ac_cv_lib_crypto_EVP_md5+:} false; then :
51674 $as_echo_n "(cached) " >&6
51675 else
51676 ac_check_lib_save_LIBS=$LIBS
51677 LIBS="-lcrypto $LIBS"
51678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51679 /* end confdefs.h. */
51680  
51681 /* Override any GCC internal prototype to avoid an error.
51682 Use char because int might match the return type of a GCC
51683 builtin and then its argument prototype would still apply. */
51684 #ifdef __cplusplus
51685 extern "C"
51686 #endif
51687 char EVP_md5 ();
51688 int
51689 main ()
51690 {
51691 return EVP_md5 ();
51692 ;
51693 return 0;
51694 }
51695 _ACEOF
51696 if ac_fn_c_try_link "$LINENO"; then :
51697 ac_cv_lib_crypto_EVP_md5=yes
51698 else
51699 ac_cv_lib_crypto_EVP_md5=no
51700 fi
51701 rm -f core conftest.err conftest.$ac_objext \
51702 conftest$ac_exeext conftest.$ac_ext
51703 LIBS=$ac_check_lib_save_LIBS
51704 fi
51705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_md5" >&5
51706 $as_echo "$ac_cv_lib_crypto_EVP_md5" >&6; }
51707 if test "x$ac_cv_lib_crypto_EVP_md5" = xyes; then :
51708  
51709 SSL_LIBS=-lcrypto
51710  
51711 else
51712  
51713 as_fn_error $? "SSL crypto library was requested, but is not available" "$LINENO" 5
51714  
51715 fi
51716  
51717 else
51718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51719 $as_echo "no" >&6; }
51720 fi
51721  
51722  
51723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use Kerberos library" >&5
51724 $as_echo_n "checking whether to use Kerberos library... " >&6; }
51725  
51726  
51727 # Check whether --with-krb5 was given.
51728 if test "${with_krb5+set}" = set; then :
51729 withval=$with_krb5;
51730 if test $withval = no
51731 then
51732 want_krb5=no
51733 elif test $withval = yes
51734 then
51735 want_krb5=yes
51736 else
51737 want_krb5=yes
51738 krb5_dir=$withval
51739 fi
51740  
51741 else
51742  
51743 #
51744 # Use Kerberos library if available, otherwise don't.
51745 #
51746 want_krb5=ifavailable
51747 krb5_dir=
51748  
51749 fi
51750  
51751 if test "x$want_krb5" = "xno" ; then
51752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51753 $as_echo "no" >&6; }
51754 else
51755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51756 $as_echo "yes" >&6; }
51757  
51758  
51759 ac_ws_CPPLAGS_saved="$CPPFLAGS"
51760 ac_ws_CFLAGS_saved="$CFLAGS"
51761 ac_ws_CXXFLAGS_saved="$CXXFLAGS"
51762 ac_ws_LDFLAGS_saved="$LDFLAGS"
51763 CPPFLAGS="$WS_CPPFLAGS $CPPFLAGS"
51764 CFLAGS="$WS_CFLAGS $CFLAGS"
51765 CXXFLAGS="$WS_CXXFLAGS $CXXFLAGS"
51766 LDFLAGS="$WS_LDFLAGS $LDFLAGS"
51767  
51768 wireshark_save_LIBS="$LIBS"
51769  
51770 if test "x$krb5_dir" != "x"
51771 then
51772 #
51773 # The user specified a directory in which kerberos resides,
51774 # so add the "include" subdirectory of that directory to
51775 # the include file search path and the "lib" subdirectory
51776 # of that directory to the library search path.
51777 #
51778 # XXX - if there's also a kerberos in a directory that's
51779 # already in CPPFLAGS or LDFLAGS, this won't make us find
51780 # the version in the specified directory, as the compiler
51781 # and/or linker will search that other directory before it
51782 # searches the specified directory.
51783 #
51784 KRB5_CFLAGS="-I$krb5_dir/include"
51785 ac_heimdal_version=`grep heimdal $krb5_dir/include/krb5.h | head -n 1 | sed 's/^.*heimdal.*$/HEIMDAL/'`
51786 # MIT Kerberos moved krb5.h to krb5/krb5.h starting with release 1.5
51787 ac_mit_version_olddir=`grep 'Massachusetts' $krb5_dir/include/krb5.h | head -n 1 | sed 's/^.*Massachusetts.*$/MIT/'`
51788 ac_mit_version_newdir=`grep 'Massachusetts' $krb5_dir/include/krb5/krb5.h | head -n 1 | sed 's/^.*Massachusetts.*$/MIT/'`
51789 ac_krb5_version="$ac_heimdal_version$ac_mit_version_olddir$ac_mit_version_newdir"
51790 if test "x$ac_krb5_version" = "xHEIMDAL"
51791 then
51792 KRB5_LIBS="-L$krb5_dir/lib -lkrb5 -lasn1 $SSL_LIBS -lroken -lcrypt"
51793 else
51794 KRB5_LIBS="-L$krb5_dir/lib -lkrb5 -lk5crypto -lcom_err"
51795 fi
51796 if test "x$ac_krb5_version" = "xMIT"
51797 then
51798  
51799 $as_echo "#define HAVE_MIT_KERBEROS 1" >>confdefs.h
51800  
51801 fi
51802 else
51803 if test -n "$ac_tool_prefix"; then
51804 # Extract the first word of "${ac_tool_prefix}krb5-config", so it can be a program name with args.
51805 set dummy ${ac_tool_prefix}krb5-config; ac_word=$2
51806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51807 $as_echo_n "checking for $ac_word... " >&6; }
51808 if ${ac_cv_path_KRB5_CONFIG+:} false; then :
51809 $as_echo_n "(cached) " >&6
51810 else
51811 case $KRB5_CONFIG in
51812 [\\/]* | ?:[\\/]*)
51813 ac_cv_path_KRB5_CONFIG="$KRB5_CONFIG" # Let the user override the test with a path.
51814 ;;
51815 *)
51816 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51817 for as_dir in $PATH
51818 do
51819 IFS=$as_save_IFS
51820 test -z "$as_dir" && as_dir=.
51821 for ac_exec_ext in '' $ac_executable_extensions; do
51822 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51823 ac_cv_path_KRB5_CONFIG="$as_dir/$ac_word$ac_exec_ext"
51824 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51825 break 2
51826 fi
51827 done
51828 done
51829 IFS=$as_save_IFS
51830  
51831 ;;
51832 esac
51833 fi
51834 KRB5_CONFIG=$ac_cv_path_KRB5_CONFIG
51835 if test -n "$KRB5_CONFIG"; then
51836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KRB5_CONFIG" >&5
51837 $as_echo "$KRB5_CONFIG" >&6; }
51838 else
51839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51840 $as_echo "no" >&6; }
51841 fi
51842  
51843  
51844 fi
51845 if test -z "$ac_cv_path_KRB5_CONFIG"; then
51846 ac_pt_KRB5_CONFIG=$KRB5_CONFIG
51847 # Extract the first word of "krb5-config", so it can be a program name with args.
51848 set dummy krb5-config; ac_word=$2
51849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51850 $as_echo_n "checking for $ac_word... " >&6; }
51851 if ${ac_cv_path_ac_pt_KRB5_CONFIG+:} false; then :
51852 $as_echo_n "(cached) " >&6
51853 else
51854 case $ac_pt_KRB5_CONFIG in
51855 [\\/]* | ?:[\\/]*)
51856 ac_cv_path_ac_pt_KRB5_CONFIG="$ac_pt_KRB5_CONFIG" # Let the user override the test with a path.
51857 ;;
51858 *)
51859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51860 for as_dir in $PATH
51861 do
51862 IFS=$as_save_IFS
51863 test -z "$as_dir" && as_dir=.
51864 for ac_exec_ext in '' $ac_executable_extensions; do
51865 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51866 ac_cv_path_ac_pt_KRB5_CONFIG="$as_dir/$ac_word$ac_exec_ext"
51867 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51868 break 2
51869 fi
51870 done
51871 done
51872 IFS=$as_save_IFS
51873  
51874 ;;
51875 esac
51876 fi
51877 ac_pt_KRB5_CONFIG=$ac_cv_path_ac_pt_KRB5_CONFIG
51878 if test -n "$ac_pt_KRB5_CONFIG"; then
51879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_KRB5_CONFIG" >&5
51880 $as_echo "$ac_pt_KRB5_CONFIG" >&6; }
51881 else
51882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51883 $as_echo "no" >&6; }
51884 fi
51885  
51886 if test "x$ac_pt_KRB5_CONFIG" = x; then
51887 KRB5_CONFIG=""
51888 else
51889 case $cross_compiling:$ac_tool_warned in
51890 yes:)
51891 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
51892 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
51893 ac_tool_warned=yes ;;
51894 esac
51895 KRB5_CONFIG=$ac_pt_KRB5_CONFIG
51896 fi
51897 else
51898 KRB5_CONFIG="$ac_cv_path_KRB5_CONFIG"
51899 fi
51900  
51901 if test -x "$KRB5_CONFIG"
51902 then
51903 KRB5_CFLAGS=`"$KRB5_CONFIG" --cflags`
51904 KRB5_LIBS=`"$KRB5_CONFIG" --libs`
51905 #
51906 # If -lcrypto is in KRB5_FLAGS, we require it to build
51907 # with Heimdal/MIT. We don't want to built with it by
51908 # default, due to annoying license incompatibilities
51909 # between the OpenSSL license and the GPL, so:
51910 #
51911 # if SSL_LIBS is set to a non-empty string, we
51912 # remove -lcrypto from KRB5_LIBS and replace
51913 # it with SSL_LIBS;
51914 #
51915 # if SSL_LIBS is not set to a non-empty string
51916 # we fail with an appropriate error message.
51917 #
51918 case "$KRB5_LIBS" in
51919 *-lcrypto*)
51920 if test ! -z "$SSL_LIBS"
51921 then
51922 KRB5_LIBS=`echo $KRB5_LIBS | sed 's/-lcrypto//'`
51923 KRB5_LIBS="$KRB5_LIBS $SSL_LIBS"
51924 else
51925 as_fn_error $? "Kerberos library requires -lcrypto, so you must specify --with-ssl" "$LINENO" 5
51926 fi
51927 ;;
51928 esac
51929 ac_krb5_version=`"$KRB5_CONFIG" --version | head -n 1 | sed -e 's/^.*heimdal.*$/HEIMDAL/' -e 's/^Kerberos .*$/MIT/' -e 's/^Solaris Kerberos .*$/MIT/'`
51930 fi
51931 fi
51932  
51933 CPPFLAGS="$CPPFLAGS $KRB5_CFLAGS"
51934  
51935 #
51936 # Make sure we have "krb5.h". If we don't, it means we probably
51937 # don't have kerberos, so don't use it.
51938 #
51939 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
51940 if test "x$ac_cv_header_krb5_h" = xyes; then :
51941  
51942 else
51943  
51944 if test "x$krb5_dir" != "x"
51945 then
51946 #
51947 # The user used "--with-krb5=" to specify a directory
51948 # containing kerberos, but we didn't find the header file
51949 # there; that either means they didn't specify the
51950 # right directory or are confused about whether kerberos
51951 # is, in fact, installed. Report the error and give up.
51952 #
51953 as_fn_error $? "kerberos header not found in directory specified in --with-krb5" "$LINENO" 5
51954 else
51955 if test "x$want_krb5" = "xyes"
51956 then
51957 #
51958 # The user tried to force us to use the library, but we
51959 # couldn't find the header file; report an error.
51960 #
51961 as_fn_error $? "Header file krb5.h not found." "$LINENO" 5
51962 else
51963 #
51964 # We couldn't find the header file; don't use the
51965 # library, as it's probably not present.
51966 #
51967 KRB5_CFLAGS=""
51968 KRB5_LIBS=""
51969 want_krb5=no
51970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: No Heimdal or MIT header found - disabling dissection for some kerberos data in packet decoding" >&5
51971 $as_echo "No Heimdal or MIT header found - disabling dissection for some kerberos data in packet decoding" >&6; }
51972 fi
51973 fi
51974  
51975 fi
51976  
51977  
51978  
51979 if test "x$want_krb5" != "xno"
51980 then
51981 #
51982 # Well, we at least have the krb5 header file.
51983 # Check whether this is Heimdal or MIT.
51984 #
51985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the Kerberos library is Heimdal or MIT" >&5
51986 $as_echo_n "checking whether the Kerberos library is Heimdal or MIT... " >&6; }
51987 if test "x$ac_krb5_version" = "xHEIMDAL" -o "x$ac_krb5_version" = "xMIT"
51988 then
51989 #
51990 # Yes.
51991 # Check whether we have krb5_kt_resolve - and whether
51992 # we need to link with -lresolv when linking with
51993 # the Kerberos library.
51994 #
51995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_krb5_version" >&5
51996 $as_echo "$ac_krb5_version" >&6; }
51997 found_krb5_kt_resolve=no
51998 for extras in "" "-lresolv"
51999 do
52000 LIBS="$KRB5_LIBS $extras $wireshark_save_LIBS"
52001 if test -z "$extras"
52002 then
52003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_krb5_version includes krb5_kt_resolve" >&5
52004 $as_echo_n "checking whether $ac_krb5_version includes krb5_kt_resolve... " >&6; }
52005 else
52006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_krb5_version includes krb5_kt_resolve (linking with $extras)" >&5
52007 $as_echo_n "checking whether $ac_krb5_version includes krb5_kt_resolve (linking with $extras)... " >&6; }
52008 fi
52009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52010 /* end confdefs.h. */
52011  
52012  
52013 int
52014 main ()
52015 {
52016  
52017 krb5_kt_resolve();
52018  
52019 ;
52020 return 0;
52021 }
52022 _ACEOF
52023 if ac_fn_c_try_link "$LINENO"; then :
52024  
52025 #
52026 # We found "krb5_kt_resolve()".
52027 #
52028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52029 $as_echo "yes" >&6; }
52030 if test -n "$extras"; then
52031 KRB5_LIBS="$KRB5_LIBS $extras"
52032 fi
52033  
52034 $as_echo "#define HAVE_KERBEROS 1" >>confdefs.h
52035  
52036 if test "x$ac_krb5_version" = "xHEIMDAL"
52037 then
52038  
52039 $as_echo "#define HAVE_HEIMDAL_KERBEROS 1" >>confdefs.h
52040  
52041 elif test "x$ac_krb5_version" = "xMIT"
52042 then
52043  
52044 $as_echo "#define HAVE_MIT_KERBEROS 1" >>confdefs.h
52045  
52046 fi
52047 found_krb5_kt_resolve=yes
52048 break
52049  
52050 else
52051  
52052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52053 $as_echo "no" >&6; }
52054  
52055 fi
52056 rm -f core conftest.err conftest.$ac_objext \
52057 conftest$ac_exeext conftest.$ac_ext
52058 done
52059 if test "$found_krb5_kt_resolve" = no
52060 then
52061 #
52062 # We didn't find "krb5_kt_resolve()" in the
52063 # Kerberos library, even when we tried linking
52064 # with -lresolv; we can't link with kerberos.
52065 #
52066 if test "x$want_krb5" = "xyes"
52067 then
52068 #
52069 # The user tried to force us to use the library,
52070 # but we can't do so; report an error.
52071 #
52072 as_fn_error $? "Usable $ac_krb5_version not found" "$LINENO" 5
52073 else
52074 #
52075 # Don't use
52076 #
52077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Usable $ac_krb5_version not found - disabling dissection for some kerberos data in packet decoding" >&5
52078 $as_echo "Usable $ac_krb5_version not found - disabling dissection for some kerberos data in packet decoding" >&6; }
52079 KRB5_CFLAGS=""
52080 KRB5_LIBS=""
52081 want_krb5=no
52082 fi
52083 else
52084 #
52085 # We can link with Kerberos; see whether krb5.h
52086 # defines KEYTYPE_ARCFOUR_56 (where "defines" means
52087 # "as a #define or as an enum member).
52088 #
52089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether krb5.h defines KEYTYPE_ARCFOUR_56" >&5
52090 $as_echo_n "checking whether krb5.h defines KEYTYPE_ARCFOUR_56... " >&6; }
52091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52092 /* end confdefs.h. */
52093  
52094  
52095 #include <krb5.h>
52096 #include <stdio.h>
52097  
52098 main()
52099 {
52100 printf("%u\n", KEYTYPE_ARCFOUR_56);
52101 }
52102  
52103  
52104 _ACEOF
52105 if ac_fn_c_try_compile "$LINENO"; then :
52106  
52107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52108 $as_echo "yes" >&6; }
52109  
52110 $as_echo "#define HAVE_KEYTYPE_ARCFOUR_56 1" >>confdefs.h
52111  
52112  
52113 else
52114  
52115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52116 $as_echo "no" >&6; }
52117  
52118 fi
52119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52120 fi
52121 else
52122 #
52123 # It's not Heimdal or MIT.
52124 #
52125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52126 $as_echo "no" >&6; }
52127 if test "x$want_krb5" = "xyes"
52128 then
52129 #
52130 # The user tried to force us to use the library,
52131 # but we can't do so; report an error.
52132 #
52133 as_fn_error $? "Kerberos not found" "$LINENO" 5
52134 else
52135 #
52136 # Don't use.
52137 #
52138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Kerberos not found - disabling dissection for some kerberos data in packet decoding" >&5
52139 $as_echo "Kerberos not found - disabling dissection for some kerberos data in packet decoding" >&6; }
52140 KRB5_CFLAGS=""
52141 KRB5_LIBS=""
52142 want_krb5=no
52143 fi
52144 fi
52145 else
52146 #
52147 # The user asked us not to use Kerberos, or they didn't
52148 # say whether they wanted us to use it but we found
52149 # that we couldn't.
52150 #
52151 KRB5_CFLAGS=""
52152 KRB5_LIBS=""
52153 want_krb5=no
52154 fi
52155  
52156  
52157  
52158 LIBS="$wireshark_save_LIBS"
52159  
52160 CPPFLAGS="$ac_ws_CPPLAGS_saved"
52161 CFLAGS="$ac_ws_CFLAGS_saved"
52162 CXXFLAGS="$ac_ws_CXXFLAGS_saved"
52163 LDFLAGS="$ac_ws_LDFLAGS_saved"
52164  
52165  
52166 fi
52167  
52168  
52169 C_ARES_LIBS=''
52170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use the c-ares library if available" >&5
52171 $as_echo_n "checking whether to use the c-ares library if available... " >&6; }
52172  
52173  
52174 # Check whether --with-c-ares was given.
52175 if test "${with_c_ares+set}" = set; then :
52176 withval=$with_c_ares;
52177 if test "x$withval" = "xno"; then
52178 want_c_ares=no
52179 elif test "x$withval" = "xyes"; then
52180 want_c_ares=yes
52181 elif test -d "$withval"; then
52182 want_c_ares=yes
52183  
52184 if ${WS_LDFLAGS+:} false; then :
52185  
52186 case " $WS_LDFLAGS " in #(
52187 *" -L${withval}/lib "*) :
52188 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS already contains -L\${withval}/lib"; } >&5
52189 (: WS_LDFLAGS already contains -L${withval}/lib) 2>&5
52190 ac_status=$?
52191 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52192 test $ac_status = 0; } ;; #(
52193 *) :
52194  
52195 as_fn_append WS_LDFLAGS " -L${withval}/lib"
52196 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
52197 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
52198 ac_status=$?
52199 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52200 test $ac_status = 0; }
52201 ;;
52202 esac
52203  
52204 else
52205  
52206 WS_LDFLAGS=-L${withval}/lib
52207 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
52208 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
52209 ac_status=$?
52210 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52211 test $ac_status = 0; }
52212  
52213 fi
52214  
52215 case "$host_os" in
52216 solaris*)
52217  
52218 if ${WS_LDFLAGS+:} false; then :
52219  
52220 case " $WS_LDFLAGS " in #(
52221 *" -R${withval}/lib "*) :
52222 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS already contains -R\${withval}/lib"; } >&5
52223 (: WS_LDFLAGS already contains -R${withval}/lib) 2>&5
52224 ac_status=$?
52225 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52226 test $ac_status = 0; } ;; #(
52227 *) :
52228  
52229 as_fn_append WS_LDFLAGS " -R${withval}/lib"
52230 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
52231 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
52232 ac_status=$?
52233 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52234 test $ac_status = 0; }
52235 ;;
52236 esac
52237  
52238 else
52239  
52240 WS_LDFLAGS=-R${withval}/lib
52241 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
52242 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
52243 ac_status=$?
52244 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52245 test $ac_status = 0; }
52246  
52247 fi
52248  
52249 ;;
52250 esac
52251  
52252 fi
52253  
52254 fi
52255  
52256 if test "x$want_c_ares" = "xno" ; then
52257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52258 $as_echo "no" >&6; }
52259 else
52260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52261 $as_echo "yes" >&6; }
52262  
52263 want_c_ares=defaultyes
52264  
52265 if test "x$want_c_ares" = "xdefaultyes"; then
52266 want_c_ares=yes
52267 fi
52268  
52269 if test "x$want_c_ares" = "xyes"; then
52270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ares_init in -lcares" >&5
52271 $as_echo_n "checking for ares_init in -lcares... " >&6; }
52272 if ${ac_cv_lib_cares_ares_init+:} false; then :
52273 $as_echo_n "(cached) " >&6
52274 else
52275 ac_check_lib_save_LIBS=$LIBS
52276 LIBS="-lcares $LIBS"
52277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52278 /* end confdefs.h. */
52279  
52280 /* Override any GCC internal prototype to avoid an error.
52281 Use char because int might match the return type of a GCC
52282 builtin and then its argument prototype would still apply. */
52283 #ifdef __cplusplus
52284 extern "C"
52285 #endif
52286 char ares_init ();
52287 int
52288 main ()
52289 {
52290 return ares_init ();
52291 ;
52292 return 0;
52293 }
52294 _ACEOF
52295 if ac_fn_c_try_link "$LINENO"; then :
52296 ac_cv_lib_cares_ares_init=yes
52297 else
52298 ac_cv_lib_cares_ares_init=no
52299 fi
52300 rm -f core conftest.err conftest.$ac_objext \
52301 conftest$ac_exeext conftest.$ac_ext
52302 LIBS=$ac_check_lib_save_LIBS
52303 fi
52304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cares_ares_init" >&5
52305 $as_echo "$ac_cv_lib_cares_ares_init" >&6; }
52306 if test "x$ac_cv_lib_cares_ares_init" = xyes; then :
52307  
52308 C_ARES_LIBS=-lcares
52309  
52310 $as_echo "#define HAVE_C_ARES 1" >>confdefs.h
52311  
52312 have_good_c_ares=yes
52313  
52314 fi
52315  
52316 else
52317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not required" >&5
52318 $as_echo "not required" >&6; }
52319 fi
52320  
52321 fi
52322  
52323  
52324 GEOIP_LIBS=''
52325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use the GeoIP IP address mapping library if available" >&5
52326 $as_echo_n "checking whether to use the GeoIP IP address mapping library if available... " >&6; }
52327  
52328  
52329 # Check whether --with-geoip was given.
52330 if test "${with_geoip+set}" = set; then :
52331 withval=$with_geoip;
52332 if test "x$withval" = "xno"; then
52333 want_geoip=no
52334 elif test "x$withval" = "xyes"; then
52335 want_geoip=yes
52336 elif test -d "$withval"; then
52337 want_geoip=yes
52338  
52339 if ${WS_LDFLAGS+:} false; then :
52340  
52341 case " $WS_LDFLAGS " in #(
52342 *" -L${withval}/lib "*) :
52343 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS already contains -L\${withval}/lib"; } >&5
52344 (: WS_LDFLAGS already contains -L${withval}/lib) 2>&5
52345 ac_status=$?
52346 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52347 test $ac_status = 0; } ;; #(
52348 *) :
52349  
52350 as_fn_append WS_LDFLAGS " -L${withval}/lib"
52351 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
52352 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
52353 ac_status=$?
52354 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52355 test $ac_status = 0; }
52356 ;;
52357 esac
52358  
52359 else
52360  
52361 WS_LDFLAGS=-L${withval}/lib
52362 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
52363 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
52364 ac_status=$?
52365 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52366 test $ac_status = 0; }
52367  
52368 fi
52369  
52370 case "$host_os" in
52371 solaris*)
52372  
52373 if ${WS_LDFLAGS+:} false; then :
52374  
52375 case " $WS_LDFLAGS " in #(
52376 *" -R${withval}/lib "*) :
52377 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS already contains -R\${withval}/lib"; } >&5
52378 (: WS_LDFLAGS already contains -R${withval}/lib) 2>&5
52379 ac_status=$?
52380 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52381 test $ac_status = 0; } ;; #(
52382 *) :
52383  
52384 as_fn_append WS_LDFLAGS " -R${withval}/lib"
52385 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
52386 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
52387 ac_status=$?
52388 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52389 test $ac_status = 0; }
52390 ;;
52391 esac
52392  
52393 else
52394  
52395 WS_LDFLAGS=-R${withval}/lib
52396 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
52397 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
52398 ac_status=$?
52399 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52400 test $ac_status = 0; }
52401  
52402 fi
52403  
52404 ;;
52405 esac
52406  
52407 fi
52408  
52409 fi
52410  
52411 if test "x$want_geoip" = "xno"; then
52412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52413 $as_echo "no" >&6; }
52414 else
52415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52416 $as_echo "yes" >&6; }
52417  
52418 want_geoip=defaultyes
52419  
52420 if test "x$want_geoip" = "xdefaultyes"; then
52421 want_geoip=yes
52422 fi
52423  
52424 if test "x$want_geoip" = "xyes"; then
52425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GeoIP_new in -lGeoIP" >&5
52426 $as_echo_n "checking for GeoIP_new in -lGeoIP... " >&6; }
52427 if ${ac_cv_lib_GeoIP_GeoIP_new+:} false; then :
52428 $as_echo_n "(cached) " >&6
52429 else
52430 ac_check_lib_save_LIBS=$LIBS
52431 LIBS="-lGeoIP $LIBS"
52432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52433 /* end confdefs.h. */
52434  
52435 /* Override any GCC internal prototype to avoid an error.
52436 Use char because int might match the return type of a GCC
52437 builtin and then its argument prototype would still apply. */
52438 #ifdef __cplusplus
52439 extern "C"
52440 #endif
52441 char GeoIP_new ();
52442 int
52443 main ()
52444 {
52445 return GeoIP_new ();
52446 ;
52447 return 0;
52448 }
52449 _ACEOF
52450 if ac_fn_c_try_link "$LINENO"; then :
52451 ac_cv_lib_GeoIP_GeoIP_new=yes
52452 else
52453 ac_cv_lib_GeoIP_GeoIP_new=no
52454 fi
52455 rm -f core conftest.err conftest.$ac_objext \
52456 conftest$ac_exeext conftest.$ac_ext
52457 LIBS=$ac_check_lib_save_LIBS
52458 fi
52459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GeoIP_GeoIP_new" >&5
52460 $as_echo "$ac_cv_lib_GeoIP_GeoIP_new" >&6; }
52461 if test "x$ac_cv_lib_GeoIP_GeoIP_new" = xyes; then :
52462  
52463 GEOIP_LIBS=-lGeoIP
52464  
52465 $as_echo "#define HAVE_GEOIP 1" >>confdefs.h
52466  
52467 have_good_geoip=yes
52468  
52469 fi
52470  
52471 if test "x$have_good_geoip" = "xyes"; then
52472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GeoIP_country_name_by_ipnum_v6 in -lGeoIP" >&5
52473 $as_echo_n "checking for GeoIP_country_name_by_ipnum_v6 in -lGeoIP... " >&6; }
52474 if ${ac_cv_lib_GeoIP_GeoIP_country_name_by_ipnum_v6+:} false; then :
52475 $as_echo_n "(cached) " >&6
52476 else
52477 ac_check_lib_save_LIBS=$LIBS
52478 LIBS="-lGeoIP $LIBS"
52479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52480 /* end confdefs.h. */
52481  
52482 /* Override any GCC internal prototype to avoid an error.
52483 Use char because int might match the return type of a GCC
52484 builtin and then its argument prototype would still apply. */
52485 #ifdef __cplusplus
52486 extern "C"
52487 #endif
52488 char GeoIP_country_name_by_ipnum_v6 ();
52489 int
52490 main ()
52491 {
52492 return GeoIP_country_name_by_ipnum_v6 ();
52493 ;
52494 return 0;
52495 }
52496 _ACEOF
52497 if ac_fn_c_try_link "$LINENO"; then :
52498 ac_cv_lib_GeoIP_GeoIP_country_name_by_ipnum_v6=yes
52499 else
52500 ac_cv_lib_GeoIP_GeoIP_country_name_by_ipnum_v6=no
52501 fi
52502 rm -f core conftest.err conftest.$ac_objext \
52503 conftest$ac_exeext conftest.$ac_ext
52504 LIBS=$ac_check_lib_save_LIBS
52505 fi
52506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GeoIP_GeoIP_country_name_by_ipnum_v6" >&5
52507 $as_echo "$ac_cv_lib_GeoIP_GeoIP_country_name_by_ipnum_v6" >&6; }
52508 if test "x$ac_cv_lib_GeoIP_GeoIP_country_name_by_ipnum_v6" = xyes; then :
52509  
52510  
52511 $as_echo "#define HAVE_GEOIP_V6 1" >>confdefs.h
52512  
52513  
52514 fi
52515  
52516 fi
52517 else
52518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not required" >&5
52519 $as_echo "not required" >&6; }
52520 fi
52521  
52522 fi
52523  
52524  
52525 LIBSSH=''
52526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use the libssh library if available" >&5
52527 $as_echo_n "checking whether to use the libssh library if available... " >&6; }
52528  
52529  
52530 # Check whether --with-ssh was given.
52531 if test "${with_ssh+set}" = set; then :
52532 withval=$with_ssh;
52533 if test "x$withval" = "xno"; then
52534 want_libssh=no
52535 elif test "x$withval" = "xyes"; then
52536 want_libssh=yes
52537 elif test -d "$withval"; then
52538 want_libssh=yes
52539  
52540 if ${WS_LDFLAGS+:} false; then :
52541  
52542 case " $WS_LDFLAGS " in #(
52543 *" -L${withval}/lib "*) :
52544 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS already contains -L\${withval}/lib"; } >&5
52545 (: WS_LDFLAGS already contains -L${withval}/lib) 2>&5
52546 ac_status=$?
52547 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52548 test $ac_status = 0; } ;; #(
52549 *) :
52550  
52551 as_fn_append WS_LDFLAGS " -L${withval}/lib"
52552 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
52553 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
52554 ac_status=$?
52555 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52556 test $ac_status = 0; }
52557 ;;
52558 esac
52559  
52560 else
52561  
52562 WS_LDFLAGS=-L${withval}/lib
52563 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
52564 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
52565 ac_status=$?
52566 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52567 test $ac_status = 0; }
52568  
52569 fi
52570  
52571 case "$host_os" in
52572 solaris*)
52573  
52574 if ${WS_LDFLAGS+:} false; then :
52575  
52576 case " $WS_LDFLAGS " in #(
52577 *" -R${withval}/lib "*) :
52578 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS already contains -R\${withval}/lib"; } >&5
52579 (: WS_LDFLAGS already contains -R${withval}/lib) 2>&5
52580 ac_status=$?
52581 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52582 test $ac_status = 0; } ;; #(
52583 *) :
52584  
52585 as_fn_append WS_LDFLAGS " -R${withval}/lib"
52586 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
52587 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
52588 ac_status=$?
52589 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52590 test $ac_status = 0; }
52591 ;;
52592 esac
52593  
52594 else
52595  
52596 WS_LDFLAGS=-R${withval}/lib
52597 { { $as_echo "$as_me:${as_lineno-$LINENO}: : WS_LDFLAGS=\"\$WS_LDFLAGS\""; } >&5
52598 (: WS_LDFLAGS="$WS_LDFLAGS") 2>&5
52599 ac_status=$?
52600 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52601 test $ac_status = 0; }
52602  
52603 fi
52604  
52605 ;;
52606 esac
52607  
52608 fi
52609  
52610 fi
52611  
52612 if test "x$want_libssh" = "xno"; then
52613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52614 $as_echo "no" >&6; }
52615 else
52616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52617 $as_echo "yes" >&6; }
52618  
52619 want_libssh=defaultyes
52620  
52621 if test "x$want_libssh" = "xdefaultyes"; then
52622 want_libssh=yes
52623 fi
52624  
52625 if test "x$want_libssh" = "xyes"; then
52626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssh_new in -lssh" >&5
52627 $as_echo_n "checking for ssh_new in -lssh... " >&6; }
52628 if ${ac_cv_lib_ssh_ssh_new+:} false; then :
52629 $as_echo_n "(cached) " >&6
52630 else
52631 ac_check_lib_save_LIBS=$LIBS
52632 LIBS="-lssh $LIBS"
52633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52634 /* end confdefs.h. */
52635  
52636 /* Override any GCC internal prototype to avoid an error.
52637 Use char because int might match the return type of a GCC
52638 builtin and then its argument prototype would still apply. */
52639 #ifdef __cplusplus
52640 extern "C"
52641 #endif
52642 char ssh_new ();
52643 int
52644 main ()
52645 {
52646 return ssh_new ();
52647 ;
52648 return 0;
52649 }
52650 _ACEOF
52651 if ac_fn_c_try_link "$LINENO"; then :
52652 ac_cv_lib_ssh_ssh_new=yes
52653 else
52654 ac_cv_lib_ssh_ssh_new=no
52655 fi
52656 rm -f core conftest.err conftest.$ac_objext \
52657 conftest$ac_exeext conftest.$ac_ext
52658 LIBS=$ac_check_lib_save_LIBS
52659 fi
52660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssh_ssh_new" >&5
52661 $as_echo "$ac_cv_lib_ssh_ssh_new" >&6; }
52662 if test "x$ac_cv_lib_ssh_ssh_new" = xyes; then :
52663  
52664 LIBSSH_LIBS=-lssh
52665  
52666 $as_echo "#define HAVE_LIBSSH 1" >>confdefs.h
52667  
52668 have_good_libssh=yes
52669  
52670 fi
52671  
52672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libssh >= 0.6.0 for sshdump, ciscodump" >&5
52673 $as_echo_n "checking whether libssh >= 0.6.0 for sshdump, ciscodump... " >&6; }
52674 if test -n "$PKG_CONFIG" && \
52675 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libssh >= 0.6.0\""; } >&5
52676 ($PKG_CONFIG --exists --print-errors "libssh >= 0.6.0") 2>&5
52677 ac_status=$?
52678 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52679 test $ac_status = 0; }; then
52680  
52681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52682 $as_echo "yes" >&6; }
52683  
52684 $as_echo "#define HAVE_LIBSSH_POINTSIX 1" >>confdefs.h
52685  
52686 have_libssh_pointsix=yes
52687  
52688 else
52689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52690 $as_echo "no" >&6; }
52691  
52692 fi
52693 if test "x$have_libssh_pointsix" = "xyes"; then
52694 # ssh_userauth_agent exists only >= 0.6.0, but not on Windows
52695 # so check explicitly
52696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssh_userauth_agent in -lssh" >&5
52697 $as_echo_n "checking for ssh_userauth_agent in -lssh... " >&6; }
52698 if ${ac_cv_lib_ssh_ssh_userauth_agent+:} false; then :
52699 $as_echo_n "(cached) " >&6
52700 else
52701 ac_check_lib_save_LIBS=$LIBS
52702 LIBS="-lssh $LIBS"
52703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52704 /* end confdefs.h. */
52705  
52706 /* Override any GCC internal prototype to avoid an error.
52707 Use char because int might match the return type of a GCC
52708 builtin and then its argument prototype would still apply. */
52709 #ifdef __cplusplus
52710 extern "C"
52711 #endif
52712 char ssh_userauth_agent ();
52713 int
52714 main ()
52715 {
52716 return ssh_userauth_agent ();
52717 ;
52718 return 0;
52719 }
52720 _ACEOF
52721 if ac_fn_c_try_link "$LINENO"; then :
52722 ac_cv_lib_ssh_ssh_userauth_agent=yes
52723 else
52724 ac_cv_lib_ssh_ssh_userauth_agent=no
52725 fi
52726 rm -f core conftest.err conftest.$ac_objext \
52727 conftest$ac_exeext conftest.$ac_ext
52728 LIBS=$ac_check_lib_save_LIBS
52729 fi
52730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssh_ssh_userauth_agent" >&5
52731 $as_echo "$ac_cv_lib_ssh_ssh_userauth_agent" >&6; }
52732 if test "x$ac_cv_lib_ssh_ssh_userauth_agent" = xyes; then :
52733  
52734  
52735 $as_echo "#define HAVE_SSH_USERAUTH_AGENT 1" >>confdefs.h
52736  
52737 have_ssh_userauth_agent=yes
52738  
52739 fi
52740  
52741 fi
52742 else
52743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not required" >&5
52744 $as_echo "not required" >&6; }
52745 fi
52746  
52747 fi
52748  
52749  
52750 # AC_C_CONST
52751  
52752 # Check how we can get the time zone abbreviation
52753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
52754 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
52755 if ${ac_cv_struct_tm+:} false; then :
52756 $as_echo_n "(cached) " >&6
52757 else
52758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52759 /* end confdefs.h. */
52760 #include <sys/types.h>
52761 #include <time.h>
52762  
52763 int
52764 main ()
52765 {
52766 struct tm tm;
52767 int *p = &tm.tm_sec;
52768 return !p;
52769 ;
52770 return 0;
52771 }
52772 _ACEOF
52773 if ac_fn_c_try_compile "$LINENO"; then :
52774 ac_cv_struct_tm=time.h
52775 else
52776 ac_cv_struct_tm=sys/time.h
52777 fi
52778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52779 fi
52780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
52781 $as_echo "$ac_cv_struct_tm" >&6; }
52782 if test $ac_cv_struct_tm = sys/time.h; then
52783  
52784 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
52785  
52786 fi
52787  
52788 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
52789 #include <$ac_cv_struct_tm>
52790  
52791 "
52792 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
52793  
52794 cat >>confdefs.h <<_ACEOF
52795 #define HAVE_STRUCT_TM_TM_ZONE 1
52796 _ACEOF
52797  
52798  
52799 fi
52800  
52801 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
52802  
52803 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
52804  
52805 else
52806 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
52807 "
52808 if test "x$ac_cv_have_decl_tzname" = xyes; then :
52809 ac_have_decl=1
52810 else
52811 ac_have_decl=0
52812 fi
52813  
52814 cat >>confdefs.h <<_ACEOF
52815 #define HAVE_DECL_TZNAME $ac_have_decl
52816 _ACEOF
52817  
52818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
52819 $as_echo_n "checking for tzname... " >&6; }
52820 if ${ac_cv_var_tzname+:} false; then :
52821 $as_echo_n "(cached) " >&6
52822 else
52823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52824 /* end confdefs.h. */
52825 #include <time.h>
52826 #if !HAVE_DECL_TZNAME
52827 extern char *tzname[];
52828 #endif
52829  
52830 int
52831 main ()
52832 {
52833 return tzname[0][0];
52834 ;
52835 return 0;
52836 }
52837 _ACEOF
52838 if ac_fn_c_try_link "$LINENO"; then :
52839 ac_cv_var_tzname=yes
52840 else
52841 ac_cv_var_tzname=no
52842 fi
52843 rm -f core conftest.err conftest.$ac_objext \
52844 conftest$ac_exeext conftest.$ac_ext
52845 fi
52846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
52847 $as_echo "$ac_cv_var_tzname" >&6; }
52848 if test $ac_cv_var_tzname = yes; then
52849  
52850 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
52851  
52852 fi
52853 fi
52854  
52855  
52856 # We need to know whether "struct stat" has an "st_flags" member
52857 # for file_user_immutable().
52858  
52859 ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
52860 if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
52861  
52862 cat >>confdefs.h <<_ACEOF
52863 #define HAVE_STRUCT_STAT_ST_FLAGS 1
52864 _ACEOF
52865  
52866  
52867 fi
52868  
52869  
52870 # We need to know whether "struct stat" has an "st_birthtime" member
52871 # or an "__st_birthtime" member for the file set dialog.
52872  
52873 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
52874 if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
52875  
52876 cat >>confdefs.h <<_ACEOF
52877 #define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
52878 _ACEOF
52879  
52880  
52881 fi
52882  
52883 ac_fn_c_check_member "$LINENO" "struct stat" "__st_birthtime" "ac_cv_member_struct_stat___st_birthtime" "$ac_includes_default"
52884 if test "x$ac_cv_member_struct_stat___st_birthtime" = xyes; then :
52885  
52886 cat >>confdefs.h <<_ACEOF
52887 #define HAVE_STRUCT_STAT___ST_BIRTHTIME 1
52888 _ACEOF
52889  
52890  
52891 fi
52892  
52893  
52894 # We need to know whether "struct sockaddr" has an "sa_len" member
52895 # for get_interface_list().
52896  
52897 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "$ac_includes_default"
52898 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
52899  
52900 cat >>confdefs.h <<_ACEOF
52901 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
52902 _ACEOF
52903  
52904  
52905 fi
52906  
52907  
52908 # We must know our byte order
52909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
52910 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
52911 if ${ac_cv_c_bigendian+:} false; then :
52912 $as_echo_n "(cached) " >&6
52913 else
52914 ac_cv_c_bigendian=unknown
52915 # See if we're dealing with a universal compiler.
52916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52917 /* end confdefs.h. */
52918 #ifndef __APPLE_CC__
52919 not a universal capable compiler
52920 #endif
52921 typedef int dummy;
52922  
52923 _ACEOF
52924 if ac_fn_c_try_compile "$LINENO"; then :
52925  
52926 # Check for potential -arch flags. It is not universal unless
52927 # there are at least two -arch flags with different values.
52928 ac_arch=
52929 ac_prev=
52930 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
52931 if test -n "$ac_prev"; then
52932 case $ac_word in
52933 i?86 | x86_64 | ppc | ppc64)
52934 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
52935 ac_arch=$ac_word
52936 else
52937 ac_cv_c_bigendian=universal
52938 break
52939 fi
52940 ;;
52941 esac
52942 ac_prev=
52943 elif test "x$ac_word" = "x-arch"; then
52944 ac_prev=arch
52945 fi
52946 done
52947 fi
52948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52949 if test $ac_cv_c_bigendian = unknown; then
52950 # See if sys/param.h defines the BYTE_ORDER macro.
52951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52952 /* end confdefs.h. */
52953 #include <sys/types.h>
52954 #include <sys/param.h>
52955  
52956 int
52957 main ()
52958 {
52959 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
52960 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
52961 && LITTLE_ENDIAN)
52962 bogus endian macros
52963 #endif
52964  
52965 ;
52966 return 0;
52967 }
52968 _ACEOF
52969 if ac_fn_c_try_compile "$LINENO"; then :
52970 # It does; now see whether it defined to BIG_ENDIAN or not.
52971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52972 /* end confdefs.h. */
52973 #include <sys/types.h>
52974 #include <sys/param.h>
52975  
52976 int
52977 main ()
52978 {
52979 #if BYTE_ORDER != BIG_ENDIAN
52980 not big endian
52981 #endif
52982  
52983 ;
52984 return 0;
52985 }
52986 _ACEOF
52987 if ac_fn_c_try_compile "$LINENO"; then :
52988 ac_cv_c_bigendian=yes
52989 else
52990 ac_cv_c_bigendian=no
52991 fi
52992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52993 fi
52994 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52995 fi
52996 if test $ac_cv_c_bigendian = unknown; then
52997 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
52998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52999 /* end confdefs.h. */
53000 #include <limits.h>
53001  
53002 int
53003 main ()
53004 {
53005 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
53006 bogus endian macros
53007 #endif
53008  
53009 ;
53010 return 0;
53011 }
53012 _ACEOF
53013 if ac_fn_c_try_compile "$LINENO"; then :
53014 # It does; now see whether it defined to _BIG_ENDIAN or not.
53015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53016 /* end confdefs.h. */
53017 #include <limits.h>
53018  
53019 int
53020 main ()
53021 {
53022 #ifndef _BIG_ENDIAN
53023 not big endian
53024 #endif
53025  
53026 ;
53027 return 0;
53028 }
53029 _ACEOF
53030 if ac_fn_c_try_compile "$LINENO"; then :
53031 ac_cv_c_bigendian=yes
53032 else
53033 ac_cv_c_bigendian=no
53034 fi
53035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53036 fi
53037 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53038 fi
53039 if test $ac_cv_c_bigendian = unknown; then
53040 # Compile a test program.
53041 if test "$cross_compiling" = yes; then :
53042 # Try to guess by grepping values from an object file.
53043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53044 /* end confdefs.h. */
53045 short int ascii_mm[] =
53046 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
53047 short int ascii_ii[] =
53048 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
53049 int use_ascii (int i) {
53050 return ascii_mm[i] + ascii_ii[i];
53051 }
53052 short int ebcdic_ii[] =
53053 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
53054 short int ebcdic_mm[] =
53055 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
53056 int use_ebcdic (int i) {
53057 return ebcdic_mm[i] + ebcdic_ii[i];
53058 }
53059 extern int foo;
53060  
53061 int
53062 main ()
53063 {
53064 return use_ascii (foo) == use_ebcdic (foo);
53065 ;
53066 return 0;
53067 }
53068 _ACEOF
53069 if ac_fn_c_try_compile "$LINENO"; then :
53070 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
53071 ac_cv_c_bigendian=yes
53072 fi
53073 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
53074 if test "$ac_cv_c_bigendian" = unknown; then
53075 ac_cv_c_bigendian=no
53076 else
53077 # finding both strings is unlikely to happen, but who knows?
53078 ac_cv_c_bigendian=unknown
53079 fi
53080 fi
53081 fi
53082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53083 else
53084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53085 /* end confdefs.h. */
53086 $ac_includes_default
53087 int
53088 main ()
53089 {
53090  
53091 /* Are we little or big endian? From Harbison&Steele. */
53092 union
53093 {
53094 long int l;
53095 char c[sizeof (long int)];
53096 } u;
53097 u.l = 1;
53098 return u.c[sizeof (long int) - 1] == 1;
53099  
53100 ;
53101 return 0;
53102 }
53103 _ACEOF
53104 if ac_fn_c_try_run "$LINENO"; then :
53105 ac_cv_c_bigendian=no
53106 else
53107 ac_cv_c_bigendian=yes
53108 fi
53109 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
53110 conftest.$ac_objext conftest.beam conftest.$ac_ext
53111 fi
53112  
53113 fi
53114 fi
53115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
53116 $as_echo "$ac_cv_c_bigendian" >&6; }
53117 case $ac_cv_c_bigendian in #(
53118 yes)
53119 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
53120 ;; #(
53121 no)
53122 ;; #(
53123 universal)
53124  
53125 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
53126  
53127 ;; #(
53128 *)
53129 as_fn_error $? "unknown endianness
53130 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
53131 esac
53132  
53133  
53134 # Checks whether "-traditional" is needed when using "ioctl".
53135 # XXX - do we need this?
53136 if test $ac_cv_c_compiler_gnu = yes; then
53137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
53138 $as_echo_n "checking whether $CC needs -traditional... " >&6; }
53139 if ${ac_cv_prog_gcc_traditional+:} false; then :
53140 $as_echo_n "(cached) " >&6
53141 else
53142 ac_pattern="Autoconf.*'x'"
53143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53144 /* end confdefs.h. */
53145 #include <sgtty.h>
53146 Autoconf TIOCGETP
53147 _ACEOF
53148 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
53149 $EGREP "$ac_pattern" >/dev/null 2>&1; then :
53150 ac_cv_prog_gcc_traditional=yes
53151 else
53152 ac_cv_prog_gcc_traditional=no
53153 fi
53154 rm -f conftest*
53155  
53156  
53157 if test $ac_cv_prog_gcc_traditional = no; then
53158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53159 /* end confdefs.h. */
53160 #include <termio.h>
53161 Autoconf TCGETA
53162 _ACEOF
53163 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
53164 $EGREP "$ac_pattern" >/dev/null 2>&1; then :
53165 ac_cv_prog_gcc_traditional=yes
53166 fi
53167 rm -f conftest*
53168  
53169 fi
53170 fi
53171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
53172 $as_echo "$ac_cv_prog_gcc_traditional" >&6; }
53173 if test $ac_cv_prog_gcc_traditional = yes; then
53174 CC="$CC -traditional"
53175 fi
53176 fi
53177  
53178  
53179 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
53180 if test "x$ac_cv_func_getopt_long" = xyes; then :
53181 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
53182  
53183 else
53184 case " $LIBOBJS " in
53185 *" getopt_long.$ac_objext "* ) ;;
53186 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
53187 ;;
53188 esac
53189  
53190 fi
53191  
53192  
53193 if test "x$ac_cv_func_getopt_long" = xyes; then
53194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether optreset is defined" >&5
53195 $as_echo_n "checking whether optreset is defined... " >&6; }
53196 if ${ac_cv_have_optreset+:} false; then :
53197 $as_echo_n "(cached) " >&6
53198 else
53199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53200 /* end confdefs.h. */
53201 extern int optreset;return optreset;
53202 _ACEOF
53203 if ac_fn_c_try_link "$LINENO"; then :
53204 ac_cv_have_optreset=yes
53205 else
53206 ac_cv_have_optreset=no
53207 fi
53208 rm -f core conftest.err conftest.$ac_objext \
53209 conftest$ac_exeext conftest.$ac_ext
53210 fi
53211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_optreset" >&5
53212 $as_echo "$ac_cv_have_optreset" >&6; }
53213 if test "$ac_cv_have_optreset" = yes ; then
53214  
53215 $as_echo "#define HAVE_OPTRESET 1" >>confdefs.h
53216  
53217 fi
53218 fi
53219  
53220 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
53221 if test "x$ac_cv_func_inet_aton" = xyes; then :
53222 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
53223  
53224 else
53225 case " $LIBOBJS " in
53226 *" inet_aton.$ac_objext "* ) ;;
53227 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
53228 ;;
53229 esac
53230  
53231 fi
53232  
53233  
53234  
53235 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
53236 if test "x$ac_cv_func_inet_pton" = xyes; then :
53237  
53238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken inet_pton" >&5
53239 $as_echo_n "checking for broken inet_pton... " >&6; }
53240 if test "$cross_compiling" = yes; then :
53241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross compiling, assume it is broken" >&5
53242 $as_echo "cross compiling, assume it is broken" >&6; };
53243 have_inet_pton=no
53244 else
53245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53246 /* end confdefs.h. */
53247 #include <sys/types.h>
53248 #include <sys/socket.h>
53249 #include <netinet/in.h>
53250 #include <arpa/inet.h>
53251 int main()
53252 {
53253 #ifdef AF_INET6
53254 char buf[16];
53255 /* this should return 0 (error) */
53256 return inet_pton(AF_INET6, "0:1:2:3:4:5:6:7:", buf);
53257 #else
53258 return 1;
53259 #endif
53260 }
53261 _ACEOF
53262 if ac_fn_c_try_run "$LINENO"; then :
53263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53264 $as_echo "ok" >&6; };
53265 have_inet_pton=yes
53266 else
53267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: broken" >&5
53268 $as_echo "broken" >&6; };
53269 have_inet_pton=no
53270 fi
53271 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
53272 conftest.$ac_objext conftest.beam conftest.$ac_ext
53273 fi
53274  
53275 else
53276 have_inet_pton=no
53277 fi
53278  
53279 if test "$have_inet_pton" = no; then
53280 case " $LIBOBJS " in
53281 *" inet_pton.$ac_objext "* ) ;;
53282 *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
53283 ;;
53284 esac
53285  
53286 else
53287  
53288 $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
53289  
53290 fi
53291  
53292 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
53293 if test "x$ac_cv_func_inet_ntop" = xyes; then :
53294 $as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
53295  
53296 else
53297 case " $LIBOBJS " in
53298 *" inet_ntop.$ac_objext "* ) ;;
53299 *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
53300 ;;
53301 esac
53302  
53303 fi
53304  
53305  
53306 ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
53307 if test "x$ac_cv_func_strptime" = xyes; then :
53308 $as_echo "#define HAVE_STRPTIME 1" >>confdefs.h
53309  
53310 else
53311 case " $LIBOBJS " in
53312 *" strptime.$ac_objext "* ) ;;
53313 *) LIBOBJS="$LIBOBJS strptime.$ac_objext"
53314 ;;
53315 esac
53316  
53317 fi
53318  
53319  
53320 ac_fn_c_check_func "$LINENO" "popcount" "ac_cv_func_popcount"
53321 if test "x$ac_cv_func_popcount" = xyes; then :
53322 $as_echo "#define HAVE_POPCOUNT 1" >>confdefs.h
53323  
53324 else
53325 case " $LIBOBJS " in
53326 *" popcount.$ac_objext "* ) ;;
53327 *) LIBOBJS="$LIBOBJS popcount.$ac_objext"
53328 ;;
53329 esac
53330  
53331 fi
53332  
53333  
53334  
53335 for ac_func in mkstemps mkdtemp
53336 do :
53337 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
53338 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
53339 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
53340 cat >>confdefs.h <<_ACEOF
53341 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
53342 _ACEOF
53343  
53344 fi
53345 done
53346  
53347 for ac_func in getprotobynumber
53348 do :
53349 ac_fn_c_check_func "$LINENO" "getprotobynumber" "ac_cv_func_getprotobynumber"
53350 if test "x$ac_cv_func_getprotobynumber" = xyes; then :
53351 cat >>confdefs.h <<_ACEOF
53352 #define HAVE_GETPROTOBYNUMBER 1
53353 _ACEOF
53354  
53355 fi
53356 done
53357  
53358 for ac_func in issetugid
53359 do :
53360 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
53361 if test "x$ac_cv_func_issetugid" = xyes; then :
53362 cat >>confdefs.h <<_ACEOF
53363 #define HAVE_ISSETUGID 1
53364 _ACEOF
53365  
53366 fi
53367 done
53368  
53369 for ac_func in sysconf
53370 do :
53371 ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
53372 if test "x$ac_cv_func_sysconf" = xyes; then :
53373 cat >>confdefs.h <<_ACEOF
53374 #define HAVE_SYSCONF 1
53375 _ACEOF
53376  
53377 fi
53378 done
53379  
53380 for ac_func in getifaddrs
53381 do :
53382 ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
53383 if test "x$ac_cv_func_getifaddrs" = xyes; then :
53384 cat >>confdefs.h <<_ACEOF
53385 #define HAVE_GETIFADDRS 1
53386 _ACEOF
53387  
53388 fi
53389 done
53390  
53391 ac_fn_c_check_func "$LINENO" "getexecname" "ac_cv_func_getexecname"
53392 if test "x$ac_cv_func_getexecname" = xyes; then :
53393  
53394 fi
53395  
53396  
53397 #
53398 # Check for SpeexDSP (http://www.speex.org)
53399 #
53400 if test "x$have_qt_multimedia_lib" = xyes; then :
53401  
53402 pkg_failed=no
53403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SPEEXDSP" >&5
53404 $as_echo_n "checking for SPEEXDSP... " >&6; }
53405  
53406 if test -n "$SPEEXDSP_CFLAGS"; then
53407 pkg_cv_SPEEXDSP_CFLAGS="$SPEEXDSP_CFLAGS"
53408 elif test -n "$PKG_CONFIG"; then
53409 if test -n "$PKG_CONFIG" && \
53410 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"speexdsp\""; } >&5
53411 ($PKG_CONFIG --exists --print-errors "speexdsp") 2>&5
53412 ac_status=$?
53413 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53414 test $ac_status = 0; }; then
53415 pkg_cv_SPEEXDSP_CFLAGS=`$PKG_CONFIG --cflags "speexdsp" 2>/dev/null`
53416 test "x$?" != "x0" && pkg_failed=yes
53417 else
53418 pkg_failed=yes
53419 fi
53420 else
53421 pkg_failed=untried
53422 fi
53423 if test -n "$SPEEXDSP_LIBS"; then
53424 pkg_cv_SPEEXDSP_LIBS="$SPEEXDSP_LIBS"
53425 elif test -n "$PKG_CONFIG"; then
53426 if test -n "$PKG_CONFIG" && \
53427 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"speexdsp\""; } >&5
53428 ($PKG_CONFIG --exists --print-errors "speexdsp") 2>&5
53429 ac_status=$?
53430 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53431 test $ac_status = 0; }; then
53432 pkg_cv_SPEEXDSP_LIBS=`$PKG_CONFIG --libs "speexdsp" 2>/dev/null`
53433 test "x$?" != "x0" && pkg_failed=yes
53434 else
53435 pkg_failed=yes
53436 fi
53437 else
53438 pkg_failed=untried
53439 fi
53440  
53441  
53442  
53443 if test $pkg_failed = yes; then
53444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53445 $as_echo "no" >&6; }
53446  
53447 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53448 _pkg_short_errors_supported=yes
53449 else
53450 _pkg_short_errors_supported=no
53451 fi
53452 if test $_pkg_short_errors_supported = yes; then
53453 SPEEXDSP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "speexdsp" 2>&1`
53454 else
53455 SPEEXDSP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "speexdsp" 2>&1`
53456 fi
53457 # Put the nasty error message in config.log where it belongs
53458 echo "$SPEEXDSP_PKG_ERRORS" >&5
53459  
53460 have_speexdsp=no
53461 elif test $pkg_failed = untried; then
53462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53463 $as_echo "no" >&6; }
53464 have_speexdsp=no
53465 else
53466 SPEEXDSP_CFLAGS=$pkg_cv_SPEEXDSP_CFLAGS
53467 SPEEXDSP_LIBS=$pkg_cv_SPEEXDSP_LIBS
53468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53469 $as_echo "yes" >&6; }
53470 have_speexdsp=yes
53471 fi
53472 fi
53473 if test "x$have_speexdsp" = xyes; then :
53474  
53475 $as_echo "#define HAVE_SPEEXDSP 1" >>confdefs.h
53476  
53477 fi
53478 if test "x$have_speexdsp" = "xyes"; then
53479 HAVE_SPEEXDSP_TRUE=
53480 HAVE_SPEEXDSP_FALSE='#'
53481 else
53482 HAVE_SPEEXDSP_TRUE='#'
53483 HAVE_SPEEXDSP_FALSE=
53484 fi
53485  
53486  
53487 # Check Bluetooth SBC codec for RTP Player
53488 # git://git.kernel.org/pub/scm/bluetooth/sbc.git
53489  
53490 # Check whether --with-sbc was given.
53491 if test "${with_sbc+set}" = set; then :
53492 withval=$with_sbc; with_sbc="$withval"; want_sbc="yes"
53493 else
53494 with_sbc="yes"
53495 fi
53496  
53497  
53498  
53499 pkg_failed=no
53500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SBC" >&5
53501 $as_echo_n "checking for SBC... " >&6; }
53502  
53503 if test -n "$SBC_CFLAGS"; then
53504 pkg_cv_SBC_CFLAGS="$SBC_CFLAGS"
53505 elif test -n "$PKG_CONFIG"; then
53506 if test -n "$PKG_CONFIG" && \
53507 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sbc >= 1.0\""; } >&5
53508 ($PKG_CONFIG --exists --print-errors "sbc >= 1.0") 2>&5
53509 ac_status=$?
53510 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53511 test $ac_status = 0; }; then
53512 pkg_cv_SBC_CFLAGS=`$PKG_CONFIG --cflags "sbc >= 1.0" 2>/dev/null`
53513 test "x$?" != "x0" && pkg_failed=yes
53514 else
53515 pkg_failed=yes
53516 fi
53517 else
53518 pkg_failed=untried
53519 fi
53520 if test -n "$SBC_LIBS"; then
53521 pkg_cv_SBC_LIBS="$SBC_LIBS"
53522 elif test -n "$PKG_CONFIG"; then
53523 if test -n "$PKG_CONFIG" && \
53524 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sbc >= 1.0\""; } >&5
53525 ($PKG_CONFIG --exists --print-errors "sbc >= 1.0") 2>&5
53526 ac_status=$?
53527 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53528 test $ac_status = 0; }; then
53529 pkg_cv_SBC_LIBS=`$PKG_CONFIG --libs "sbc >= 1.0" 2>/dev/null`
53530 test "x$?" != "x0" && pkg_failed=yes
53531 else
53532 pkg_failed=yes
53533 fi
53534 else
53535 pkg_failed=untried
53536 fi
53537  
53538  
53539  
53540 if test $pkg_failed = yes; then
53541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53542 $as_echo "no" >&6; }
53543  
53544 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53545 _pkg_short_errors_supported=yes
53546 else
53547 _pkg_short_errors_supported=no
53548 fi
53549 if test $_pkg_short_errors_supported = yes; then
53550 SBC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sbc >= 1.0" 2>&1`
53551 else
53552 SBC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sbc >= 1.0" 2>&1`
53553 fi
53554 # Put the nasty error message in config.log where it belongs
53555 echo "$SBC_PKG_ERRORS" >&5
53556  
53557 have_sbc=no
53558 elif test $pkg_failed = untried; then
53559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53560 $as_echo "no" >&6; }
53561 have_sbc=no
53562 else
53563 SBC_CFLAGS=$pkg_cv_SBC_CFLAGS
53564 SBC_LIBS=$pkg_cv_SBC_LIBS
53565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53566 $as_echo "yes" >&6; }
53567 have_sbc=yes
53568 fi
53569 if test "x$with_sbc" != "xno"; then
53570 if (test "${have_sbc}" = "yes"); then
53571  
53572 $as_echo "#define HAVE_SBC 1" >>confdefs.h
53573  
53574 elif test "x$want_sbc" = "xyes"; then
53575 # Error out if the user explicitly requested the sbc library
53576 as_fn_error $? "SBC codec library was requested, but is not available" "$LINENO" 5
53577 fi
53578 else
53579 have_sbc=no
53580 fi
53581 if test "x$have_sbc" = "xyes"; then
53582 HAVE_SBC_TRUE=
53583 HAVE_SBC_FALSE='#'
53584 else
53585 HAVE_SBC_TRUE='#'
53586 HAVE_SBC_FALSE=
53587 fi
53588  
53589  
53590 plugindir="\${libdir}/wireshark/plugins/${VERSION}"
53591  
53592 # Check whether --with-plugins was given.
53593 if test "${with_plugins+set}" = set; then :
53594 withval=$with_plugins;
53595 if test "x$withval" = "xno"; then
53596 have_plugins=no
53597 elif test "x$have_plugins" = "xno"; then
53598 as_fn_error $? "GLib on this platform doesn't support loadable modules, so you can't enable plugins." "$LINENO" 5
53599 elif test "x$withval" != "xyes"; then
53600 plugindir="$withval"
53601 fi
53602  
53603 fi
53604  
53605 if test "x$have_plugins" = "xyes"; then
53606 HAVE_PLUGINS_TRUE=
53607 HAVE_PLUGINS_FALSE='#'
53608 else
53609 HAVE_PLUGINS_TRUE='#'
53610 HAVE_PLUGINS_FALSE=
53611 fi
53612  
53613 if test x$have_plugins = xyes
53614 then
53615  
53616 $as_echo "#define HAVE_PLUGINS 1" >>confdefs.h
53617  
53618 fi
53619  
53620  
53621 #
53622 # The plugin dissectors reside in ./plugins/PROTO/
53623 #
53624 PLUGIN_LIBS=""
53625  
53626  
53627 extcapdir="\${libdir}/wireshark/extcap"
53628  
53629 # Check whether --with-extcap was given.
53630 if test "${with_extcap+set}" = set; then :
53631 withval=$with_extcap;
53632 if test "x$withval" = "xno"; then
53633 have_extcap=no
53634 elif test "x$withval" = "xyes"; then
53635 have_extcap=yes
53636 elif test "x$withval" != "xyes"; then
53637 have_extcap=yes
53638 extcapdir ="$withval"
53639 fi
53640  
53641 else
53642  
53643 have_extcap=yes
53644  
53645 fi
53646  
53647 if test "x$have_extcap" = "xyes"; then
53648 HAVE_EXTCAP_TRUE=
53649 HAVE_EXTCAP_FALSE='#'
53650 else
53651 HAVE_EXTCAP_TRUE='#'
53652 HAVE_EXTCAP_FALSE=
53653 fi
53654  
53655 if test "x$have_extcap" = "xyes"
53656 then
53657  
53658 $as_echo "#define HAVE_EXTCAP 1" >>confdefs.h
53659  
53660 extcap_subdir="extcap"
53661 extcap_man="extcap.4"
53662 fi
53663  
53664  
53665  
53666  
53667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build androiddump" >&5
53668 $as_echo_n "checking whether to build androiddump... " >&6; }
53669  
53670 # Check whether --enable-androiddump was given.
53671 if test "${enable_androiddump+set}" = set; then :
53672 enableval=$enable_androiddump; androiddump=$enableval
53673 else
53674 enable_androiddump=yes
53675 fi
53676  
53677  
53678 if test "x$have_extcap" != xyes; then
53679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, extcap disabled" >&5
53680 $as_echo "no, extcap disabled" >&6; }
53681 enable_androiddump=no
53682 elif test "x$enable_androiddump" = "xyes" ; then
53683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53684 $as_echo "yes" >&6; }
53685 else
53686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53687 $as_echo "no" >&6; }
53688 fi
53689  
53690 # Check whether --enable-androiddump_use_libpcap was given.
53691 if test "${enable_androiddump_use_libpcap+set}" = set; then :
53692 enableval=$enable_androiddump_use_libpcap; androiddump_use_libpcap=$enableval
53693 else
53694 enable_androiddump_use_libpcap=no
53695 fi
53696  
53697  
53698 if test "x$enable_androiddump" = "xyes" -a "x$enable_androiddump_use_libpcap" = "xyes" ; then
53699  
53700 $as_echo "#define ANDROIDDUMP_USE_LIBPCAP 1" >>confdefs.h
53701  
53702 fi
53703  
53704 if test "x$enable_androiddump" = "xyes" ; then
53705 androiddump_bin="androiddump\$(EXEEXT)"
53706 androiddump_man="androiddump.1"
53707 else
53708 androiddump_bin=""
53709 androiddump_man=""
53710 fi
53711  
53712  
53713  
53714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build sshdump" >&5
53715 $as_echo_n "checking whether to build sshdump... " >&6; }
53716  
53717 # Check whether --enable-sshdump was given.
53718 if test "${enable_sshdump+set}" = set; then :
53719 enableval=$enable_sshdump;
53720 else
53721 enable_sshdump=yes
53722 fi
53723  
53724  
53725 if test "x$have_extcap" != xyes; then
53726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, extcap disabled" >&5
53727 $as_echo "no, extcap disabled" >&6; }
53728 enable_sshdump=no
53729 elif test "x$have_libssh_pointsix" != xyes; then
53730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, libssh >= 0.6.0 not available" >&5
53731 $as_echo "no, libssh >= 0.6.0 not available" >&6; }
53732 enable_sshdump=no
53733 elif test "x$enable_sshdump" = "xyes" ; then
53734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53735 $as_echo "yes" >&6; }
53736 else
53737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53738 $as_echo "no" >&6; }
53739 fi
53740  
53741 if test "x$enable_sshdump" = "xyes" ; then
53742 sshdump_bin="sshdump\$(EXEEXT)"
53743 sshdump_man="sshdump.1"
53744 else
53745 sshdump_bin=""
53746 sshdump_man=""
53747 fi
53748  
53749  
53750  
53751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build ciscodump" >&5
53752 $as_echo_n "checking whether to build ciscodump... " >&6; }
53753  
53754 # Check whether --enable-ciscodump was given.
53755 if test "${enable_ciscodump+set}" = set; then :
53756 enableval=$enable_ciscodump;
53757 else
53758 enable_ciscodump=yes
53759 fi
53760  
53761  
53762 if test "x$have_extcap" != xyes; then
53763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, extcap disabled" >&5
53764 $as_echo "no, extcap disabled" >&6; }
53765 enable_ciscodump=no
53766 elif test "x$have_libssh_pointsix" != xyes; then
53767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, libssh >= 0.6.0 not available" >&5
53768 $as_echo "no, libssh >= 0.6.0 not available" >&6; }
53769 enable_ciscodump=no
53770 elif test "x$enable_ciscodump" = "xyes" ; then
53771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53772 $as_echo "yes" >&6; }
53773 else
53774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53775 $as_echo "no" >&6; }
53776 fi
53777  
53778 if test "x$enable_ciscodump" = "xyes" ; then
53779 ciscodump_bin="ciscodump\$(EXEEXT)"
53780 ciscodump_man="ciscodump.1"
53781 else
53782 ciscodump_bin=""
53783 ciscodump_man=""
53784 fi
53785  
53786  
53787  
53788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build randpktdump" >&5
53789 $as_echo_n "checking whether to build randpktdump... " >&6; }
53790  
53791 # Check whether --enable-randpktdump was given.
53792 if test "${enable_randpktdump+set}" = set; then :
53793 enableval=$enable_randpktdump; randpktdump=$enableval
53794 else
53795 enable_randpktdump=yes
53796 fi
53797  
53798  
53799 if test "x$have_extcap" != xyes; then
53800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, extcap disabled" >&5
53801 $as_echo "no, extcap disabled" >&6; }
53802 enable_randpktdump=no
53803 elif test "x$enable_randpktdump" = "xyes" ; then
53804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53805 $as_echo "yes" >&6; }
53806 else
53807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53808 $as_echo "no" >&6; }
53809 fi
53810  
53811 if test "x$enable_randpktdump" = "xyes" ; then
53812 randpktdump_bin="randpktdump\$(EXEEXT)"
53813 randpktdump_man="randpktdump.1"
53814 else
53815 randpktdump_bin=""
53816 randpktdump_man=""
53817 fi
53818  
53819  
53820  
53821 if test x$enable_static = xyes; then
53822 ENABLE_STATIC_TRUE=
53823 ENABLE_STATIC_FALSE='#'
53824 else
53825 ENABLE_STATIC_TRUE='#'
53826 ENABLE_STATIC_FALSE=
53827 fi
53828  
53829 if test x$enable_static = xyes -a x$have_plugins = xyes
53830 then
53831  
53832 $as_echo "#define ENABLE_STATIC 1" >>confdefs.h
53833  
53834 fi
53835  
53836  
53837 # Gather which GUI we're building for rpmbuild
53838 if test "x$have_gtk" = "xyes"; then
53839 if test "x$gtk_major_version" = "x3"; then
53840 RPMBUILD_WITH_ARGS="--with gtk3 --without gtk2"
53841 else
53842 RPMBUILD_WITH_ARGS="--without gtk3 --with gtk2"
53843 fi
53844 else
53845 RPMBUILD_WITH_ARGS="--without gtk2 --without gtk3"
53846 fi
53847 if test "x$have_qt" = "xyes" ; then
53848 if test "$qt_version" -eq "5"; then
53849 RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --with qt5"
53850 else
53851 RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --with qt"
53852 fi
53853 else
53854 RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --without qt --without qt5"
53855 fi
53856 if test "x$have_lua" = "xyes" ; then
53857 RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --with lua"
53858 else
53859 RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --without lua"
53860 fi
53861  
53862 RPM_VERSION=2.2.3
53863  
53864  
53865  
53866  
53867  
53868  
53869  
53870  
53871  
53872  
53873  
53874 cat >confcache <<\_ACEOF
53875 # This file is a shell script that caches the results of configure
53876 # tests run on this system so they can be shared between configure
53877 # scripts and configure runs, see configure's option --config-cache.
53878 # It is not useful on other systems. If it contains results you don't
53879 # want to keep, you may remove or edit it.
53880 #
53881 # config.status only pays attention to the cache file if you give it
53882 # the --recheck option to rerun configure.
53883 #
53884 # `ac_cv_env_foo' variables (set or unset) will be overridden when
53885 # loading this file, other *unset* `ac_cv_foo' will be assigned the
53886 # following values.
53887  
53888 _ACEOF
53889  
53890 # The following way of writing the cache mishandles newlines in values,
53891 # but we know of no workaround that is simple, portable, and efficient.
53892 # So, we kill variables containing newlines.
53893 # Ultrix sh set writes to stderr and can't be redirected directly,
53894 # and sets the high bit in the cache file unless we assign to the vars.
53895 (
53896 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53897 eval ac_val=\$$ac_var
53898 case $ac_val in #(
53899 *${as_nl}*)
53900 case $ac_var in #(
53901 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53902 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53903 esac
53904 case $ac_var in #(
53905 _ | IFS | as_nl) ;; #(
53906 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53907 *) { eval $ac_var=; unset $ac_var;} ;;
53908 esac ;;
53909 esac
53910 done
53911  
53912 (set) 2>&1 |
53913 case $as_nl`(ac_space=' '; set) 2>&1` in #(
53914 *${as_nl}ac_space=\ *)
53915 # `set' does not quote correctly, so add quotes: double-quote
53916 # substitution turns \\\\ into \\, and sed turns \\ into \.
53917 sed -n \
53918 "s/'/'\\\\''/g;
53919 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53920 ;; #(
53921 *)
53922 # `set' quotes correctly as required by POSIX, so do not add quotes.
53923 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53924 ;;
53925 esac |
53926 sort
53927 ) |
53928 sed '
53929 /^ac_cv_env_/b end
53930 t clear
53931 :clear
53932 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53933 t end
53934 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53935 :end' >>confcache
53936 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53937 if test -w "$cache_file"; then
53938 if test "x$cache_file" != "x/dev/null"; then
53939 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53940 $as_echo "$as_me: updating cache $cache_file" >&6;}
53941 if test ! -f "$cache_file" || test -h "$cache_file"; then
53942 cat confcache >"$cache_file"
53943 else
53944 case $cache_file in #(
53945 */* | ?:*)
53946 mv -f confcache "$cache_file"$$ &&
53947 mv -f "$cache_file"$$ "$cache_file" ;; #(
53948 *)
53949 mv -f confcache "$cache_file" ;;
53950 esac
53951 fi
53952 fi
53953 else
53954 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53955 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53956 fi
53957 fi
53958 rm -f confcache
53959  
53960  
53961  
53962 ac_config_headers="$ac_config_headers config.h"
53963  
53964  
53965 ac_config_files="$ac_config_files Makefile doxygen.cfg epan/dissectors/asn1/Makefile wireshark.pc epan/dissectors/asn1/acp133/Makefile epan/dissectors/asn1/acse/Makefile epan/dissectors/asn1/ansi_map/Makefile epan/dissectors/asn1/ansi_tcap/Makefile epan/dissectors/asn1/atn-cm/Makefile epan/dissectors/asn1/atn-cpdlc/Makefile epan/dissectors/asn1/atn-ulcs/Makefile epan/dissectors/asn1/c1222/Makefile epan/dissectors/asn1/camel/Makefile epan/dissectors/asn1/cdt/Makefile epan/dissectors/asn1/charging_ase/Makefile epan/dissectors/asn1/cmip/Makefile epan/dissectors/asn1/cmp/Makefile epan/dissectors/asn1/crmf/Makefile epan/dissectors/asn1/cms/Makefile epan/dissectors/asn1/credssp/Makefile epan/dissectors/asn1/dap/Makefile epan/dissectors/asn1/disp/Makefile epan/dissectors/asn1/dop/Makefile epan/dissectors/asn1/dsp/Makefile epan/dissectors/asn1/ess/Makefile epan/dissectors/asn1/ftam/Makefile epan/dissectors/asn1/goose/Makefile epan/dissectors/asn1/gprscdr/Makefile epan/dissectors/asn1/gsm_map/Makefile epan/dissectors/asn1/h225/Makefile epan/dissectors/asn1/h235/Makefile epan/dissectors/asn1/h245/Makefile epan/dissectors/asn1/h248/Makefile epan/dissectors/asn1/h282/Makefile epan/dissectors/asn1/h283/Makefile epan/dissectors/asn1/h323/Makefile epan/dissectors/asn1/h450/Makefile epan/dissectors/asn1/h450-ros/Makefile epan/dissectors/asn1/h460/Makefile epan/dissectors/asn1/h501/Makefile epan/dissectors/asn1/HI2Operations/Makefile epan/dissectors/asn1/hnbap/Makefile epan/dissectors/asn1/idmp/Makefile epan/dissectors/asn1/ilp/Makefile epan/dissectors/asn1/inap/Makefile epan/dissectors/asn1/isdn-sup/Makefile epan/dissectors/asn1/kerberos/Makefile epan/dissectors/asn1/lcsap/Makefile epan/dissectors/asn1/ldap/Makefile epan/dissectors/asn1/logotypecertextn/Makefile epan/dissectors/asn1/lpp/Makefile epan/dissectors/asn1/lppa/Makefile epan/dissectors/asn1/lppe/Makefile epan/dissectors/asn1/lte-rrc/Makefile epan/dissectors/asn1/m3ap/Makefile epan/dissectors/asn1/mms/Makefile epan/dissectors/asn1/mpeg-audio/Makefile epan/dissectors/asn1/mpeg-pes/Makefile epan/dissectors/asn1/nbap/Makefile epan/dissectors/asn1/ns_cert_exts/Makefile epan/dissectors/asn1/novell_pkis/Makefile epan/dissectors/asn1/ocsp/Makefile epan/dissectors/asn1/p1/Makefile epan/dissectors/asn1/p22/Makefile epan/dissectors/asn1/p7/Makefile epan/dissectors/asn1/p772/Makefile epan/dissectors/asn1/pcap/Makefile epan/dissectors/asn1/pkcs1/Makefile epan/dissectors/asn1/pkcs12/Makefile epan/dissectors/asn1/pkinit/Makefile epan/dissectors/asn1/pkixac/Makefile epan/dissectors/asn1/pkix1explicit/Makefile epan/dissectors/asn1/pkix1implicit/Makefile epan/dissectors/asn1/pkixproxy/Makefile epan/dissectors/asn1/pkixqualified/Makefile epan/dissectors/asn1/pkixtsp/Makefile epan/dissectors/asn1/pres/Makefile epan/dissectors/asn1/q932/Makefile epan/dissectors/asn1/q932-ros/Makefile epan/dissectors/asn1/qsig/Makefile epan/dissectors/asn1/ranap/Makefile epan/dissectors/asn1/rnsap/Makefile epan/dissectors/asn1/ros/Makefile epan/dissectors/asn1/rrc/Makefile epan/dissectors/asn1/rrlp/Makefile epan/dissectors/asn1/rtse/Makefile epan/dissectors/asn1/rua/Makefile epan/dissectors/asn1/s1ap/Makefile epan/dissectors/asn1/sabp/Makefile epan/dissectors/asn1/sbc-ap/Makefile epan/dissectors/asn1/smrse/Makefile epan/dissectors/asn1/snmp/Makefile epan/dissectors/asn1/spnego/Makefile epan/dissectors/asn1/sv/Makefile epan/dissectors/asn1/t124/Makefile epan/dissectors/asn1/t125/Makefile epan/dissectors/asn1/t38/Makefile epan/dissectors/asn1/tcap/Makefile epan/dissectors/asn1/tetra/Makefile epan/dissectors/asn1/ulp/Makefile epan/dissectors/asn1/wlancertextn/Makefile epan/dissectors/asn1/x2ap/Makefile epan/dissectors/asn1/x509af/Makefile epan/dissectors/asn1/x509ce/Makefile epan/dissectors/asn1/x509if/Makefile epan/dissectors/asn1/x509sat/Makefile epan/dissectors/asn1/x721/Makefile capchild/Makefile capchild/doxygen.cfg caputils/Makefile caputils/doxygen.cfg doc/Makefile docbook/Makefile epan/Makefile epan/compress/Makefile epan/crypt/Makefile epan/doxygen.cfg epan/dfilter/Makefile epan/dissectors/Makefile epan/dissectors/dcerpc/Makefile epan/ftypes/Makefile epan/nghttp2/Makefile epan/wmem/Makefile epan/wslua/Makefile extcap/Makefile codecs/Makefile ui/Makefile ui/doxygen.cfg ui/gtk/Makefile ui/gtk/doxygen.cfg ui/cli/Makefile ui/qt/Makefile ui/qt/doxygen.cfg help/Makefile packaging/Makefile packaging/macosx/Info.plist packaging/macosx/Makefile packaging/macosx/osx-dmg.sh packaging/macosx/Wireshark_package.pmdoc/index.xml packaging/nsis/Makefile packaging/rpm/Makefile packaging/rpm/SPECS/Makefile packaging/rpm/SPECS/wireshark.spec packaging/svr4/Makefile packaging/svr4/checkinstall packaging/svr4/pkginfo packaging/wix/Makefile plugins/Makefile plugins/docsis/Makefile plugins/easy_codec/Makefile plugins/ethercat/Makefile plugins/gryphon/Makefile plugins/irda/Makefile plugins/m2m/Makefile plugins/mate/Makefile plugins/opcua/Makefile plugins/profinet/Makefile plugins/stats_tree/Makefile plugins/unistim/Makefile plugins/wimax/Makefile plugins/wimaxasncp/Makefile plugins/wimaxmacphy/Makefile randpkt_core/doxygen.cfg randpkt_core/Makefile tools/Makefile tools/lemon/Makefile wiretap/Makefile writecap/Makefile writecap/doxygen.cfg wsutil/Makefile echld/Makefile"
53966  
53967  
53968 cat >confcache <<\_ACEOF
53969 # This file is a shell script that caches the results of configure
53970 # tests run on this system so they can be shared between configure
53971 # scripts and configure runs, see configure's option --config-cache.
53972 # It is not useful on other systems. If it contains results you don't
53973 # want to keep, you may remove or edit it.
53974 #
53975 # config.status only pays attention to the cache file if you give it
53976 # the --recheck option to rerun configure.
53977 #
53978 # `ac_cv_env_foo' variables (set or unset) will be overridden when
53979 # loading this file, other *unset* `ac_cv_foo' will be assigned the
53980 # following values.
53981  
53982 _ACEOF
53983  
53984 # The following way of writing the cache mishandles newlines in values,
53985 # but we know of no workaround that is simple, portable, and efficient.
53986 # So, we kill variables containing newlines.
53987 # Ultrix sh set writes to stderr and can't be redirected directly,
53988 # and sets the high bit in the cache file unless we assign to the vars.
53989 (
53990 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53991 eval ac_val=\$$ac_var
53992 case $ac_val in #(
53993 *${as_nl}*)
53994 case $ac_var in #(
53995 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53996 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53997 esac
53998 case $ac_var in #(
53999 _ | IFS | as_nl) ;; #(
54000 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
54001 *) { eval $ac_var=; unset $ac_var;} ;;
54002 esac ;;
54003 esac
54004 done
54005  
54006 (set) 2>&1 |
54007 case $as_nl`(ac_space=' '; set) 2>&1` in #(
54008 *${as_nl}ac_space=\ *)
54009 # `set' does not quote correctly, so add quotes: double-quote
54010 # substitution turns \\\\ into \\, and sed turns \\ into \.
54011 sed -n \
54012 "s/'/'\\\\''/g;
54013 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
54014 ;; #(
54015 *)
54016 # `set' quotes correctly as required by POSIX, so do not add quotes.
54017 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
54018 ;;
54019 esac |
54020 sort
54021 ) |
54022 sed '
54023 /^ac_cv_env_/b end
54024 t clear
54025 :clear
54026 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
54027 t end
54028 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
54029 :end' >>confcache
54030 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
54031 if test -w "$cache_file"; then
54032 if test "x$cache_file" != "x/dev/null"; then
54033 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
54034 $as_echo "$as_me: updating cache $cache_file" >&6;}
54035 if test ! -f "$cache_file" || test -h "$cache_file"; then
54036 cat confcache >"$cache_file"
54037 else
54038 case $cache_file in #(
54039 */* | ?:*)
54040 mv -f confcache "$cache_file"$$ &&
54041 mv -f "$cache_file"$$ "$cache_file" ;; #(
54042 *)
54043 mv -f confcache "$cache_file" ;;
54044 esac
54045 fi
54046 fi
54047 else
54048 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
54049 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
54050 fi
54051 fi
54052 rm -f confcache
54053  
54054 test "x$prefix" = xNONE && prefix=$ac_default_prefix
54055 # Let make expand exec_prefix.
54056 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
54057  
54058 DEFS=-DHAVE_CONFIG_H
54059  
54060 ac_libobjs=
54061 ac_ltlibobjs=
54062 U=
54063 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
54064 # 1. Remove the extension, and $U if already installed.
54065 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
54066 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
54067 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
54068 # will be set to the directory where LIBOBJS objects are built.
54069 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
54070 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
54071 done
54072 LIBOBJS=$ac_libobjs
54073  
54074 LTLIBOBJS=$ac_ltlibobjs
54075  
54076  
54077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
54078 $as_echo_n "checking that generated files are newer than configure... " >&6; }
54079 if test -n "$am_sleep_pid"; then
54080 # Hide warnings about reused PIDs.
54081 wait $am_sleep_pid 2>/dev/null
54082 fi
54083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
54084 $as_echo "done" >&6; }
54085 if test -n "$EXEEXT"; then
54086 am__EXEEXT_TRUE=
54087 am__EXEEXT_FALSE='#'
54088 else
54089 am__EXEEXT_TRUE='#'
54090 am__EXEEXT_FALSE=
54091 fi
54092  
54093 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
54094 as_fn_error $? "conditional \"AMDEP\" was never defined.
54095 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54096 fi
54097 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
54098 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
54099 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54100 fi
54101 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
54102 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
54103 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54104 fi
54105 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
54106 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
54107 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54108 fi
54109 if test -z "${HAVE_DOXYGEN_TRUE}" && test -z "${HAVE_DOXYGEN_FALSE}"; then
54110 as_fn_error $? "conditional \"HAVE_DOXYGEN\" was never defined.
54111 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54112 fi
54113 if test -z "${HAVE_A2X_TEXT_TRUE}" && test -z "${HAVE_A2X_TEXT_FALSE}"; then
54114 as_fn_error $? "conditional \"HAVE_A2X_TEXT\" was never defined.
54115 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54116 fi
54117 if test -z "${HAVE_RPM_TRUE}" && test -z "${HAVE_RPM_FALSE}"; then
54118 as_fn_error $? "conditional \"HAVE_RPM\" was never defined.
54119 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54120 fi
54121 if test -z "${NOT_OS_X_TRUE}" && test -z "${NOT_OS_X_FALSE}"; then
54122 as_fn_error $? "conditional \"NOT_OS_X\" was never defined.
54123 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54124 fi
54125 if test -z "${SSE42_SUPPORTED_TRUE}" && test -z "${SSE42_SUPPORTED_FALSE}"; then
54126 as_fn_error $? "conditional \"SSE42_SUPPORTED\" was never defined.
54127 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54128 fi
54129 if test -z "${HAVE_WARNINGS_AS_ERRORS_TRUE}" && test -z "${HAVE_WARNINGS_AS_ERRORS_FALSE}"; then
54130 as_fn_error $? "conditional \"HAVE_WARNINGS_AS_ERRORS\" was never defined.
54131 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54132 fi
54133 if test -z "${HAVE_OS_X_FRAMEWORKS_TRUE}" && test -z "${HAVE_OS_X_FRAMEWORKS_FALSE}"; then
54134 as_fn_error $? "conditional \"HAVE_OS_X_FRAMEWORKS\" was never defined.
54135 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54136 fi
54137 if test -z "${BUILDING_WIRESHARK_TRUE}" && test -z "${BUILDING_WIRESHARK_FALSE}"; then
54138 as_fn_error $? "conditional \"BUILDING_WIRESHARK\" was never defined.
54139 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54140 fi
54141 if test -z "${USE_PROFILE_BUILD_TRUE}" && test -z "${USE_PROFILE_BUILD_FALSE}"; then
54142 as_fn_error $? "conditional \"USE_PROFILE_BUILD\" was never defined.
54143 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54144 fi
54145 if test -z "${HAVE_GRESOURCE_PIXBUF_TRUE}" && test -z "${HAVE_GRESOURCE_PIXBUF_FALSE}"; then
54146 as_fn_error $? "conditional \"HAVE_GRESOURCE_PIXBUF\" was never defined.
54147 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54148 fi
54149 if test -z "${HAVE_Qt_TRUE}" && test -z "${HAVE_Qt_FALSE}"; then
54150 as_fn_error $? "conditional \"HAVE_Qt\" was never defined.
54151 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54152 fi
54153 if test -z "${HAVE_GTK_TRUE}" && test -z "${HAVE_GTK_FALSE}"; then
54154 as_fn_error $? "conditional \"HAVE_GTK\" was never defined.
54155 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54156 fi
54157 if test -z "${HAVE_ECHLD_TRUE}" && test -z "${HAVE_ECHLD_FALSE}"; then
54158 as_fn_error $? "conditional \"HAVE_ECHLD\" was never defined.
54159 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54160 fi
54161 if test -z "${HAVE_LIBLUA_TRUE}" && test -z "${HAVE_LIBLUA_FALSE}"; then
54162 as_fn_error $? "conditional \"HAVE_LIBLUA\" was never defined.
54163 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54164 fi
54165 if test -z "${HAVE_LIBPORTAUDIO_TRUE}" && test -z "${HAVE_LIBPORTAUDIO_FALSE}"; then
54166 as_fn_error $? "conditional \"HAVE_LIBPORTAUDIO\" was never defined.
54167 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54168 fi
54169 if test -z "${SETCAP_INSTALL_TRUE}" && test -z "${SETCAP_INSTALL_FALSE}"; then
54170 as_fn_error $? "conditional \"SETCAP_INSTALL\" was never defined.
54171 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54172 fi
54173 if test -z "${SETUID_INSTALL_TRUE}" && test -z "${SETUID_INSTALL_FALSE}"; then
54174 as_fn_error $? "conditional \"SETUID_INSTALL\" was never defined.
54175 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54176 fi
54177 if test -z "${HAVE_DUMPCAP_GROUP_TRUE}" && test -z "${HAVE_DUMPCAP_GROUP_FALSE}"; then
54178 as_fn_error $? "conditional \"HAVE_DUMPCAP_GROUP\" was never defined.
54179 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54180 fi
54181  
54182 if test -z "${HAVE_SPEEXDSP_TRUE}" && test -z "${HAVE_SPEEXDSP_FALSE}"; then
54183 as_fn_error $? "conditional \"HAVE_SPEEXDSP\" was never defined.
54184 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54185 fi
54186 if test -z "${HAVE_SBC_TRUE}" && test -z "${HAVE_SBC_FALSE}"; then
54187 as_fn_error $? "conditional \"HAVE_SBC\" was never defined.
54188 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54189 fi
54190 if test -z "${HAVE_PLUGINS_TRUE}" && test -z "${HAVE_PLUGINS_FALSE}"; then
54191 as_fn_error $? "conditional \"HAVE_PLUGINS\" was never defined.
54192 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54193 fi
54194 if test -z "${HAVE_EXTCAP_TRUE}" && test -z "${HAVE_EXTCAP_FALSE}"; then
54195 as_fn_error $? "conditional \"HAVE_EXTCAP\" was never defined.
54196 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54197 fi
54198 if test -z "${ENABLE_STATIC_TRUE}" && test -z "${ENABLE_STATIC_FALSE}"; then
54199 as_fn_error $? "conditional \"ENABLE_STATIC\" was never defined.
54200 Usually this means the macro was only invoked conditionally." "$LINENO" 5
54201 fi
54202  
54203 : "${CONFIG_STATUS=./config.status}"
54204 ac_write_fail=0
54205 ac_clean_files_save=$ac_clean_files
54206 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
54207 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
54208 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
54209 as_write_fail=0
54210 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
54211 #! $SHELL
54212 # Generated by $as_me.
54213 # Run this file to recreate the current configuration.
54214 # Compiler output produced by configure, useful for debugging
54215 # configure, is in config.log if it exists.
54216  
54217 debug=false
54218 ac_cs_recheck=false
54219 ac_cs_silent=false
54220  
54221 SHELL=\${CONFIG_SHELL-$SHELL}
54222 export SHELL
54223 _ASEOF
54224 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
54225 ## -------------------- ##
54226 ## M4sh Initialization. ##
54227 ## -------------------- ##
54228  
54229 # Be more Bourne compatible
54230 DUALCASE=1; export DUALCASE # for MKS sh
54231 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
54232 emulate sh
54233 NULLCMD=:
54234 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
54235 # is contrary to our usage. Disable this feature.
54236 alias -g '${1+"$@"}'='"$@"'
54237 setopt NO_GLOB_SUBST
54238 else
54239 case `(set -o) 2>/dev/null` in #(
54240 *posix*) :
54241 set -o posix ;; #(
54242 *) :
54243 ;;
54244 esac
54245 fi
54246  
54247  
54248 as_nl='
54249 '
54250 export as_nl
54251 # Printing a long string crashes Solaris 7 /usr/bin/printf.
54252 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
54253 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
54254 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
54255 # Prefer a ksh shell builtin over an external printf program on Solaris,
54256 # but without wasting forks for bash or zsh.
54257 if test -z "$BASH_VERSION$ZSH_VERSION" \
54258 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
54259 as_echo='print -r --'
54260 as_echo_n='print -rn --'
54261 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
54262 as_echo='printf %s\n'
54263 as_echo_n='printf %s'
54264 else
54265 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54266 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
54267 as_echo_n='/usr/ucb/echo -n'
54268 else
54269 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
54270 as_echo_n_body='eval
54271 arg=$1;
54272 case $arg in #(
54273 *"$as_nl"*)
54274 expr "X$arg" : "X\\(.*\\)$as_nl";
54275 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
54276 esac;
54277 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
54278 '
54279 export as_echo_n_body
54280 as_echo_n='sh -c $as_echo_n_body as_echo'
54281 fi
54282 export as_echo_body
54283 as_echo='sh -c $as_echo_body as_echo'
54284 fi
54285  
54286 # The user is always right.
54287 if test "${PATH_SEPARATOR+set}" != set; then
54288 PATH_SEPARATOR=:
54289 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
54290 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
54291 PATH_SEPARATOR=';'
54292 }
54293 fi
54294  
54295  
54296 # IFS
54297 # We need space, tab and new line, in precisely that order. Quoting is
54298 # there to prevent editors from complaining about space-tab.
54299 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
54300 # splitting by setting IFS to empty value.)
54301 IFS=" "" $as_nl"
54302  
54303 # Find who we are. Look in the path if we contain no directory separator.
54304 as_myself=
54305 case $0 in #((
54306 *[\\/]* ) as_myself=$0 ;;
54307 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
54308 for as_dir in $PATH
54309 do
54310 IFS=$as_save_IFS
54311 test -z "$as_dir" && as_dir=.
54312 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
54313 done
54314 IFS=$as_save_IFS
54315  
54316 ;;
54317 esac
54318 # We did not find ourselves, most probably we were run as `sh COMMAND'
54319 # in which case we are not to be found in the path.
54320 if test "x$as_myself" = x; then
54321 as_myself=$0
54322 fi
54323 if test ! -f "$as_myself"; then
54324 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
54325 exit 1
54326 fi
54327  
54328 # Unset variables that we do not need and which cause bugs (e.g. in
54329 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
54330 # suppresses any "Segmentation fault" message there. '((' could
54331 # trigger a bug in pdksh 5.2.14.
54332 for as_var in BASH_ENV ENV MAIL MAILPATH
54333 do eval test x\${$as_var+set} = xset \
54334 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
54335 done
54336 PS1='$ '
54337 PS2='> '
54338 PS4='+ '
54339  
54340 # NLS nuisances.
54341 LC_ALL=C
54342 export LC_ALL
54343 LANGUAGE=C
54344 export LANGUAGE
54345  
54346 # CDPATH.
54347 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
54348  
54349  
54350 # as_fn_error STATUS ERROR [LINENO LOG_FD]
54351 # ----------------------------------------
54352 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
54353 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
54354 # script with STATUS, using 1 if that was 0.
54355 as_fn_error ()
54356 {
54357 as_status=$1; test $as_status -eq 0 && as_status=1
54358 if test "$4"; then
54359 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
54360 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
54361 fi
54362 $as_echo "$as_me: error: $2" >&2
54363 as_fn_exit $as_status
54364 } # as_fn_error
54365  
54366  
54367 # as_fn_set_status STATUS
54368 # -----------------------
54369 # Set $? to STATUS, without forking.
54370 as_fn_set_status ()
54371 {
54372 return $1
54373 } # as_fn_set_status
54374  
54375 # as_fn_exit STATUS
54376 # -----------------
54377 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
54378 as_fn_exit ()
54379 {
54380 set +e
54381 as_fn_set_status $1
54382 exit $1
54383 } # as_fn_exit
54384  
54385 # as_fn_unset VAR
54386 # ---------------
54387 # Portably unset VAR.
54388 as_fn_unset ()
54389 {
54390 { eval $1=; unset $1;}
54391 }
54392 as_unset=as_fn_unset
54393 # as_fn_append VAR VALUE
54394 # ----------------------
54395 # Append the text in VALUE to the end of the definition contained in VAR. Take
54396 # advantage of any shell optimizations that allow amortized linear growth over
54397 # repeated appends, instead of the typical quadratic growth present in naive
54398 # implementations.
54399 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
54400 eval 'as_fn_append ()
54401 {
54402 eval $1+=\$2
54403 }'
54404 else
54405 as_fn_append ()
54406 {
54407 eval $1=\$$1\$2
54408 }
54409 fi # as_fn_append
54410  
54411 # as_fn_arith ARG...
54412 # ------------------
54413 # Perform arithmetic evaluation on the ARGs, and store the result in the
54414 # global $as_val. Take advantage of shells that can avoid forks. The arguments
54415 # must be portable across $(()) and expr.
54416 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
54417 eval 'as_fn_arith ()
54418 {
54419 as_val=$(( $* ))
54420 }'
54421 else
54422 as_fn_arith ()
54423 {
54424 as_val=`expr "$@" || test $? -eq 1`
54425 }
54426 fi # as_fn_arith
54427  
54428  
54429 if expr a : '\(a\)' >/dev/null 2>&1 &&
54430 test "X`expr 00001 : '.*\(...\)'`" = X001; then
54431 as_expr=expr
54432 else
54433 as_expr=false
54434 fi
54435  
54436 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
54437 as_basename=basename
54438 else
54439 as_basename=false
54440 fi
54441  
54442 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
54443 as_dirname=dirname
54444 else
54445 as_dirname=false
54446 fi
54447  
54448 as_me=`$as_basename -- "$0" ||
54449 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
54450 X"$0" : 'X\(//\)$' \| \
54451 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
54452 $as_echo X/"$0" |
54453 sed '/^.*\/\([^/][^/]*\)\/*$/{
54454 s//\1/
54455 q
54456 }
54457 /^X\/\(\/\/\)$/{
54458 s//\1/
54459 q
54460 }
54461 /^X\/\(\/\).*/{
54462 s//\1/
54463 q
54464 }
54465 s/.*/./; q'`
54466  
54467 # Avoid depending upon Character Ranges.
54468 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
54469 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
54470 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
54471 as_cr_digits='0123456789'
54472 as_cr_alnum=$as_cr_Letters$as_cr_digits
54473  
54474 ECHO_C= ECHO_N= ECHO_T=
54475 case `echo -n x` in #(((((
54476 -n*)
54477 case `echo 'xy\c'` in
54478 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
54479 xy) ECHO_C='\c';;
54480 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
54481 ECHO_T=' ';;
54482 esac;;
54483 *)
54484 ECHO_N='-n';;
54485 esac
54486  
54487 rm -f conf$$ conf$$.exe conf$$.file
54488 if test -d conf$$.dir; then
54489 rm -f conf$$.dir/conf$$.file
54490 else
54491 rm -f conf$$.dir
54492 mkdir conf$$.dir 2>/dev/null
54493 fi
54494 if (echo >conf$$.file) 2>/dev/null; then
54495 if ln -s conf$$.file conf$$ 2>/dev/null; then
54496 as_ln_s='ln -s'
54497 # ... but there are two gotchas:
54498 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
54499 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
54500 # In both cases, we have to default to `cp -pR'.
54501 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
54502 as_ln_s='cp -pR'
54503 elif ln conf$$.file conf$$ 2>/dev/null; then
54504 as_ln_s=ln
54505 else
54506 as_ln_s='cp -pR'
54507 fi
54508 else
54509 as_ln_s='cp -pR'
54510 fi
54511 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
54512 rmdir conf$$.dir 2>/dev/null
54513  
54514  
54515 # as_fn_mkdir_p
54516 # -------------
54517 # Create "$as_dir" as a directory, including parents if necessary.
54518 as_fn_mkdir_p ()
54519 {
54520  
54521 case $as_dir in #(
54522 -*) as_dir=./$as_dir;;
54523 esac
54524 test -d "$as_dir" || eval $as_mkdir_p || {
54525 as_dirs=
54526 while :; do
54527 case $as_dir in #(
54528 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
54529 *) as_qdir=$as_dir;;
54530 esac
54531 as_dirs="'$as_qdir' $as_dirs"
54532 as_dir=`$as_dirname -- "$as_dir" ||
54533 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54534 X"$as_dir" : 'X\(//\)[^/]' \| \
54535 X"$as_dir" : 'X\(//\)$' \| \
54536 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
54537 $as_echo X"$as_dir" |
54538 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54539 s//\1/
54540 q
54541 }
54542 /^X\(\/\/\)[^/].*/{
54543 s//\1/
54544 q
54545 }
54546 /^X\(\/\/\)$/{
54547 s//\1/
54548 q
54549 }
54550 /^X\(\/\).*/{
54551 s//\1/
54552 q
54553 }
54554 s/.*/./; q'`
54555 test -d "$as_dir" && break
54556 done
54557 test -z "$as_dirs" || eval "mkdir $as_dirs"
54558 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
54559  
54560  
54561 } # as_fn_mkdir_p
54562 if mkdir -p . 2>/dev/null; then
54563 as_mkdir_p='mkdir -p "$as_dir"'
54564 else
54565 test -d ./-p && rmdir ./-p
54566 as_mkdir_p=false
54567 fi
54568  
54569  
54570 # as_fn_executable_p FILE
54571 # -----------------------
54572 # Test if FILE is an executable regular file.
54573 as_fn_executable_p ()
54574 {
54575 test -f "$1" && test -x "$1"
54576 } # as_fn_executable_p
54577 as_test_x='test -x'
54578 as_executable_p=as_fn_executable_p
54579  
54580 # Sed expression to map a string onto a valid CPP name.
54581 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
54582  
54583 # Sed expression to map a string onto a valid variable name.
54584 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
54585  
54586  
54587 exec 6>&1
54588 ## ----------------------------------- ##
54589 ## Main body of $CONFIG_STATUS script. ##
54590 ## ----------------------------------- ##
54591 _ASEOF
54592 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
54593  
54594 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54595 # Save the log message, to keep $0 and so on meaningful, and to
54596 # report actual input values of CONFIG_FILES etc. instead of their
54597 # values after options handling.
54598 ac_log="
54599 This file was extended by Wireshark $as_me 2.2.3, which was
54600 generated by GNU Autoconf 2.69. Invocation command line was
54601  
54602 CONFIG_FILES = $CONFIG_FILES
54603 CONFIG_HEADERS = $CONFIG_HEADERS
54604 CONFIG_LINKS = $CONFIG_LINKS
54605 CONFIG_COMMANDS = $CONFIG_COMMANDS
54606 $ $0 $@
54607  
54608 on `(hostname || uname -n) 2>/dev/null | sed 1q`
54609 "
54610  
54611 _ACEOF
54612  
54613 case $ac_config_files in *"
54614 "*) set x $ac_config_files; shift; ac_config_files=$*;;
54615 esac
54616  
54617 case $ac_config_headers in *"
54618 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
54619 esac
54620  
54621  
54622 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54623 # Files that config.status was made for.
54624 config_files="$ac_config_files"
54625 config_headers="$ac_config_headers"
54626 config_commands="$ac_config_commands"
54627  
54628 _ACEOF
54629  
54630 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54631 ac_cs_usage="\
54632 \`$as_me' instantiates files and other configuration actions
54633 from templates according to the current configuration. Unless the files
54634 and actions are specified as TAGs, all are instantiated by default.
54635  
54636 Usage: $0 [OPTION]... [TAG]...
54637  
54638 -h, --help print this help, then exit
54639 -V, --version print version number and configuration settings, then exit
54640 --config print configuration, then exit
54641 -q, --quiet, --silent
54642 do not print progress messages
54643 -d, --debug don't remove temporary files
54644 --recheck update $as_me by reconfiguring in the same conditions
54645 --file=FILE[:TEMPLATE]
54646 instantiate the configuration file FILE
54647 --header=FILE[:TEMPLATE]
54648 instantiate the configuration header FILE
54649  
54650 Configuration files:
54651 $config_files
54652  
54653 Configuration headers:
54654 $config_headers
54655  
54656 Configuration commands:
54657 $config_commands
54658  
54659 Report bugs to <http://bugs.wireshark.org/>.
54660 Wireshark home page: <http://www.wireshark.org/>."
54661  
54662 _ACEOF
54663 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54664 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
54665 ac_cs_version="\\
54666 Wireshark config.status 2.2.3
54667 configured by $0, generated by GNU Autoconf 2.69,
54668 with options \\"\$ac_cs_config\\"
54669  
54670 Copyright (C) 2012 Free Software Foundation, Inc.
54671 This config.status script is free software; the Free Software Foundation
54672 gives unlimited permission to copy, distribute and modify it."
54673  
54674 ac_pwd='$ac_pwd'
54675 srcdir='$srcdir'
54676 INSTALL='$INSTALL'
54677 MKDIR_P='$MKDIR_P'
54678 AWK='$AWK'
54679 test -n "\$AWK" || AWK=awk
54680 _ACEOF
54681  
54682 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54683 # The default lists apply if the user does not specify any file.
54684 ac_need_defaults=:
54685 while test $# != 0
54686 do
54687 case $1 in
54688 --*=?*)
54689 ac_option=`expr "X$1" : 'X\([^=]*\)='`
54690 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
54691 ac_shift=:
54692 ;;
54693 --*=)
54694 ac_option=`expr "X$1" : 'X\([^=]*\)='`
54695 ac_optarg=
54696 ac_shift=:
54697 ;;
54698 *)
54699 ac_option=$1
54700 ac_optarg=$2
54701 ac_shift=shift
54702 ;;
54703 esac
54704  
54705 case $ac_option in
54706 # Handling of the options.
54707 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
54708 ac_cs_recheck=: ;;
54709 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
54710 $as_echo "$ac_cs_version"; exit ;;
54711 --config | --confi | --conf | --con | --co | --c )
54712 $as_echo "$ac_cs_config"; exit ;;
54713 --debug | --debu | --deb | --de | --d | -d )
54714 debug=: ;;
54715 --file | --fil | --fi | --f )
54716 $ac_shift
54717 case $ac_optarg in
54718 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
54719 '') as_fn_error $? "missing file argument" ;;
54720 esac
54721 as_fn_append CONFIG_FILES " '$ac_optarg'"
54722 ac_need_defaults=false;;
54723 --header | --heade | --head | --hea )
54724 $ac_shift
54725 case $ac_optarg in
54726 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
54727 esac
54728 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
54729 ac_need_defaults=false;;
54730 --he | --h)
54731 # Conflict between --help and --header
54732 as_fn_error $? "ambiguous option: \`$1'
54733 Try \`$0 --help' for more information.";;
54734 --help | --hel | -h )
54735 $as_echo "$ac_cs_usage"; exit ;;
54736 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
54737 | -silent | --silent | --silen | --sile | --sil | --si | --s)
54738 ac_cs_silent=: ;;
54739  
54740 # This is an error.
54741 -*) as_fn_error $? "unrecognized option: \`$1'
54742 Try \`$0 --help' for more information." ;;
54743  
54744 *) as_fn_append ac_config_targets " $1"
54745 ac_need_defaults=false ;;
54746  
54747 esac
54748 shift
54749 done
54750  
54751 ac_configure_extra_args=
54752  
54753 if $ac_cs_silent; then
54754 exec 6>/dev/null
54755 ac_configure_extra_args="$ac_configure_extra_args --silent"
54756 fi
54757  
54758 _ACEOF
54759 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54760 if \$ac_cs_recheck; then
54761 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54762 shift
54763 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54764 CONFIG_SHELL='$SHELL'
54765 export CONFIG_SHELL
54766 exec "\$@"
54767 fi
54768  
54769 _ACEOF
54770 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54771 exec 5>>config.log
54772 {
54773 echo
54774 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54775 ## Running $as_me. ##
54776 _ASBOX
54777 $as_echo "$ac_log"
54778 } >&5
54779  
54780 _ACEOF
54781 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54782 #
54783 # INIT-COMMANDS
54784 #
54785 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
54786  
54787  
54788 # The HP-UX ksh and POSIX shell print the target directory to stdout
54789 # if CDPATH is set.
54790 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
54791  
54792 sed_quote_subst='$sed_quote_subst'
54793 double_quote_subst='$double_quote_subst'
54794 delay_variable_subst='$delay_variable_subst'
54795 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
54796 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
54797 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
54798 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
54799 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
54800 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
54801 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
54802 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
54803 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
54804 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
54805 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
54806 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
54807 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
54808 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
54809 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
54810 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
54811 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
54812 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
54813 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
54814 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
54815 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
54816 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
54817 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
54818 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
54819 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
54820 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
54821 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
54822 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
54823 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
54824 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
54825 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
54826 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
54827 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
54828 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
54829 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
54830 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
54831 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
54832 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
54833 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
54834 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
54835 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
54836 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
54837 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
54838 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
54839 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
54840 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
54841 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
54842 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
54843 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
54844 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
54845 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
54846 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
54847 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
54848 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
54849 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
54850 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
54851 lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
54852 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
54853 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
54854 lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
54855 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
54856 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
54857 lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
54858 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
54859 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
54860 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
54861 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
54862 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
54863 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
54864 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
54865 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
54866 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
54867 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
54868 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
54869 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
54870 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
54871 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
54872 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
54873 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
54874 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
54875 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
54876 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
54877 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
54878 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
54879 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
54880 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
54881 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
54882 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
54883 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
54884 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
54885 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
54886 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
54887 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
54888 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
54889 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
54890 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
54891 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
54892 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
54893 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
54894 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
54895 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
54896 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
54897 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
54898 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
54899 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
54900 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
54901 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
54902 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
54903 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
54904 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
54905 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
54906 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
54907 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
54908 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
54909 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
54910 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
54911 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
54912 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
54913 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
54914 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
54915 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
54916 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
54917 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
54918 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
54919 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
54920 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
54921 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
54922 configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
54923 configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
54924 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
54925 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
54926 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
54927 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
54928 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
54929 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
54930 compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
54931 predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
54932 postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
54933 predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
54934 postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
54935 compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
54936 LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
54937 reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
54938 reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
54939 old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
54940 compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
54941 GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
54942 lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
54943 lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
54944 lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
54945 lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
54946 lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
54947 archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
54948 enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
54949 export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
54950 whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
54951 compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
54952 old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
54953 old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
54954 archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
54955 archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
54956 module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
54957 module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
54958 with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
54959 allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
54960 no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
54961 hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
54962 hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
54963 hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
54964 hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
54965 hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
54966 hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
54967 hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
54968 inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
54969 link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
54970 always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
54971 export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
54972 exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
54973 include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
54974 prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
54975 postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
54976 file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
54977 hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
54978 compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
54979 predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
54980 postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
54981 predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
54982 postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
54983 compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
54984  
54985 LTCC='$LTCC'
54986 LTCFLAGS='$LTCFLAGS'
54987 compiler='$compiler_DEFAULT'
54988  
54989 # A function that is used when there is no print builtin or printf.
54990 func_fallback_echo ()
54991 {
54992 eval 'cat <<_LTECHO_EOF
54993 \$1
54994 _LTECHO_EOF'
54995 }
54996  
54997 # Quote evaled strings.
54998 for var in SHELL \
54999 ECHO \
55000 PATH_SEPARATOR \
55001 SED \
55002 GREP \
55003 EGREP \
55004 FGREP \
55005 LD \
55006 NM \
55007 LN_S \
55008 lt_SP2NL \
55009 lt_NL2SP \
55010 reload_flag \
55011 OBJDUMP \
55012 deplibs_check_method \
55013 file_magic_cmd \
55014 file_magic_glob \
55015 want_nocaseglob \
55016 DLLTOOL \
55017 sharedlib_from_linklib_cmd \
55018 AR \
55019 AR_FLAGS \
55020 archiver_list_spec \
55021 STRIP \
55022 RANLIB \
55023 CC \
55024 CFLAGS \
55025 compiler \
55026 lt_cv_sys_global_symbol_pipe \
55027 lt_cv_sys_global_symbol_to_cdecl \
55028 lt_cv_sys_global_symbol_to_import \
55029 lt_cv_sys_global_symbol_to_c_name_address \
55030 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
55031 lt_cv_nm_interface \
55032 nm_file_list_spec \
55033 lt_cv_truncate_bin \
55034 lt_prog_compiler_no_builtin_flag \
55035 lt_prog_compiler_pic \
55036 lt_prog_compiler_wl \
55037 lt_prog_compiler_static \
55038 lt_cv_prog_compiler_c_o \
55039 need_locks \
55040 MANIFEST_TOOL \
55041 DSYMUTIL \
55042 NMEDIT \
55043 LIPO \
55044 OTOOL \
55045 OTOOL64 \
55046 shrext_cmds \
55047 export_dynamic_flag_spec \
55048 whole_archive_flag_spec \
55049 compiler_needs_object \
55050 with_gnu_ld \
55051 allow_undefined_flag \
55052 no_undefined_flag \
55053 hardcode_libdir_flag_spec \
55054 hardcode_libdir_separator \
55055 exclude_expsyms \
55056 include_expsyms \
55057 file_list_spec \
55058 variables_saved_for_relink \
55059 libname_spec \
55060 library_names_spec \
55061 soname_spec \
55062 install_override_mode \
55063 finish_eval \
55064 old_striplib \
55065 striplib \
55066 compiler_lib_search_dirs \
55067 predep_objects \
55068 postdep_objects \
55069 predeps \
55070 postdeps \
55071 compiler_lib_search_path \
55072 LD_CXX \
55073 reload_flag_CXX \
55074 compiler_CXX \
55075 lt_prog_compiler_no_builtin_flag_CXX \
55076 lt_prog_compiler_pic_CXX \
55077 lt_prog_compiler_wl_CXX \
55078 lt_prog_compiler_static_CXX \
55079 lt_cv_prog_compiler_c_o_CXX \
55080 export_dynamic_flag_spec_CXX \
55081 whole_archive_flag_spec_CXX \
55082 compiler_needs_object_CXX \
55083 with_gnu_ld_CXX \
55084 allow_undefined_flag_CXX \
55085 no_undefined_flag_CXX \
55086 hardcode_libdir_flag_spec_CXX \
55087 hardcode_libdir_separator_CXX \
55088 exclude_expsyms_CXX \
55089 include_expsyms_CXX \
55090 file_list_spec_CXX \
55091 compiler_lib_search_dirs_CXX \
55092 predep_objects_CXX \
55093 postdep_objects_CXX \
55094 predeps_CXX \
55095 postdeps_CXX \
55096 compiler_lib_search_path_CXX; do
55097 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
55098 *[\\\\\\\`\\"\\\$]*)
55099 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
55100 ;;
55101 *)
55102 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
55103 ;;
55104 esac
55105 done
55106  
55107 # Double-quote double-evaled strings.
55108 for var in reload_cmds \
55109 old_postinstall_cmds \
55110 old_postuninstall_cmds \
55111 old_archive_cmds \
55112 extract_expsyms_cmds \
55113 old_archive_from_new_cmds \
55114 old_archive_from_expsyms_cmds \
55115 archive_cmds \
55116 archive_expsym_cmds \
55117 module_cmds \
55118 module_expsym_cmds \
55119 export_symbols_cmds \
55120 prelink_cmds \
55121 postlink_cmds \
55122 postinstall_cmds \
55123 postuninstall_cmds \
55124 finish_cmds \
55125 sys_lib_search_path_spec \
55126 configure_time_dlsearch_path \
55127 configure_time_lt_sys_library_path \
55128 reload_cmds_CXX \
55129 old_archive_cmds_CXX \
55130 old_archive_from_new_cmds_CXX \
55131 old_archive_from_expsyms_cmds_CXX \
55132 archive_cmds_CXX \
55133 archive_expsym_cmds_CXX \
55134 module_cmds_CXX \
55135 module_expsym_cmds_CXX \
55136 export_symbols_cmds_CXX \
55137 prelink_cmds_CXX \
55138 postlink_cmds_CXX; do
55139 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
55140 *[\\\\\\\`\\"\\\$]*)
55141 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
55142 ;;
55143 *)
55144 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
55145 ;;
55146 esac
55147 done
55148  
55149 ac_aux_dir='$ac_aux_dir'
55150  
55151 # See if we are running on zsh, and set the options that allow our
55152 # commands through without removal of \ escapes INIT.
55153 if test -n "\${ZSH_VERSION+set}"; then
55154 setopt NO_GLOB_SUBST
55155 fi
55156  
55157  
55158 PACKAGE='$PACKAGE'
55159 VERSION='$VERSION'
55160 RM='$RM'
55161 ofile='$ofile'
55162  
55163  
55164  
55165  
55166  
55167  
55168 _ACEOF
55169  
55170 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
55171  
55172 # Handling of arguments.
55173 for ac_config_target in $ac_config_targets
55174 do
55175 case $ac_config_target in
55176 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
55177 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
55178 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
55179 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
55180 "doxygen.cfg") CONFIG_FILES="$CONFIG_FILES doxygen.cfg" ;;
55181 "epan/dissectors/asn1/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/Makefile" ;;
55182 "wireshark.pc") CONFIG_FILES="$CONFIG_FILES wireshark.pc" ;;
55183 "epan/dissectors/asn1/acp133/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/acp133/Makefile" ;;
55184 "epan/dissectors/asn1/acse/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/acse/Makefile" ;;
55185 "epan/dissectors/asn1/ansi_map/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/ansi_map/Makefile" ;;
55186 "epan/dissectors/asn1/ansi_tcap/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/ansi_tcap/Makefile" ;;
55187 "epan/dissectors/asn1/atn-cm/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/atn-cm/Makefile" ;;
55188 "epan/dissectors/asn1/atn-cpdlc/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/atn-cpdlc/Makefile" ;;
55189 "epan/dissectors/asn1/atn-ulcs/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/atn-ulcs/Makefile" ;;
55190 "epan/dissectors/asn1/c1222/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/c1222/Makefile" ;;
55191 "epan/dissectors/asn1/camel/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/camel/Makefile" ;;
55192 "epan/dissectors/asn1/cdt/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/cdt/Makefile" ;;
55193 "epan/dissectors/asn1/charging_ase/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/charging_ase/Makefile" ;;
55194 "epan/dissectors/asn1/cmip/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/cmip/Makefile" ;;
55195 "epan/dissectors/asn1/cmp/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/cmp/Makefile" ;;
55196 "epan/dissectors/asn1/crmf/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/crmf/Makefile" ;;
55197 "epan/dissectors/asn1/cms/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/cms/Makefile" ;;
55198 "epan/dissectors/asn1/credssp/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/credssp/Makefile" ;;
55199 "epan/dissectors/asn1/dap/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/dap/Makefile" ;;
55200 "epan/dissectors/asn1/disp/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/disp/Makefile" ;;
55201 "epan/dissectors/asn1/dop/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/dop/Makefile" ;;
55202 "epan/dissectors/asn1/dsp/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/dsp/Makefile" ;;
55203 "epan/dissectors/asn1/ess/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/ess/Makefile" ;;
55204 "epan/dissectors/asn1/ftam/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/ftam/Makefile" ;;
55205 "epan/dissectors/asn1/goose/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/goose/Makefile" ;;
55206 "epan/dissectors/asn1/gprscdr/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/gprscdr/Makefile" ;;
55207 "epan/dissectors/asn1/gsm_map/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/gsm_map/Makefile" ;;
55208 "epan/dissectors/asn1/h225/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/h225/Makefile" ;;
55209 "epan/dissectors/asn1/h235/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/h235/Makefile" ;;
55210 "epan/dissectors/asn1/h245/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/h245/Makefile" ;;
55211 "epan/dissectors/asn1/h248/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/h248/Makefile" ;;
55212 "epan/dissectors/asn1/h282/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/h282/Makefile" ;;
55213 "epan/dissectors/asn1/h283/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/h283/Makefile" ;;
55214 "epan/dissectors/asn1/h323/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/h323/Makefile" ;;
55215 "epan/dissectors/asn1/h450/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/h450/Makefile" ;;
55216 "epan/dissectors/asn1/h450-ros/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/h450-ros/Makefile" ;;
55217 "epan/dissectors/asn1/h460/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/h460/Makefile" ;;
55218 "epan/dissectors/asn1/h501/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/h501/Makefile" ;;
55219 "epan/dissectors/asn1/HI2Operations/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/HI2Operations/Makefile" ;;
55220 "epan/dissectors/asn1/hnbap/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/hnbap/Makefile" ;;
55221 "epan/dissectors/asn1/idmp/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/idmp/Makefile" ;;
55222 "epan/dissectors/asn1/ilp/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/ilp/Makefile" ;;
55223 "epan/dissectors/asn1/inap/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/inap/Makefile" ;;
55224 "epan/dissectors/asn1/isdn-sup/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/isdn-sup/Makefile" ;;
55225 "epan/dissectors/asn1/kerberos/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/kerberos/Makefile" ;;
55226 "epan/dissectors/asn1/lcsap/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/lcsap/Makefile" ;;
55227 "epan/dissectors/asn1/ldap/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/ldap/Makefile" ;;
55228 "epan/dissectors/asn1/logotypecertextn/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/logotypecertextn/Makefile" ;;
55229 "epan/dissectors/asn1/lpp/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/lpp/Makefile" ;;
55230 "epan/dissectors/asn1/lppa/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/lppa/Makefile" ;;
55231 "epan/dissectors/asn1/lppe/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/lppe/Makefile" ;;
55232 "epan/dissectors/asn1/lte-rrc/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/lte-rrc/Makefile" ;;
55233 "epan/dissectors/asn1/m3ap/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/m3ap/Makefile" ;;
55234 "epan/dissectors/asn1/mms/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/mms/Makefile" ;;
55235 "epan/dissectors/asn1/mpeg-audio/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/mpeg-audio/Makefile" ;;
55236 "epan/dissectors/asn1/mpeg-pes/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/mpeg-pes/Makefile" ;;
55237 "epan/dissectors/asn1/nbap/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/nbap/Makefile" ;;
55238 "epan/dissectors/asn1/ns_cert_exts/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/ns_cert_exts/Makefile" ;;
55239 "epan/dissectors/asn1/novell_pkis/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/novell_pkis/Makefile" ;;
55240 "epan/dissectors/asn1/ocsp/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/ocsp/Makefile" ;;
55241 "epan/dissectors/asn1/p1/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/p1/Makefile" ;;
55242 "epan/dissectors/asn1/p22/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/p22/Makefile" ;;
55243 "epan/dissectors/asn1/p7/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/p7/Makefile" ;;
55244 "epan/dissectors/asn1/p772/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/p772/Makefile" ;;
55245 "epan/dissectors/asn1/pcap/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/pcap/Makefile" ;;
55246 "epan/dissectors/asn1/pkcs1/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/pkcs1/Makefile" ;;
55247 "epan/dissectors/asn1/pkcs12/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/pkcs12/Makefile" ;;
55248 "epan/dissectors/asn1/pkinit/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/pkinit/Makefile" ;;
55249 "epan/dissectors/asn1/pkixac/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/pkixac/Makefile" ;;
55250 "epan/dissectors/asn1/pkix1explicit/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/pkix1explicit/Makefile" ;;
55251 "epan/dissectors/asn1/pkix1implicit/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/pkix1implicit/Makefile" ;;
55252 "epan/dissectors/asn1/pkixproxy/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/pkixproxy/Makefile" ;;
55253 "epan/dissectors/asn1/pkixqualified/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/pkixqualified/Makefile" ;;
55254 "epan/dissectors/asn1/pkixtsp/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/pkixtsp/Makefile" ;;
55255 "epan/dissectors/asn1/pres/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/pres/Makefile" ;;
55256 "epan/dissectors/asn1/q932/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/q932/Makefile" ;;
55257 "epan/dissectors/asn1/q932-ros/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/q932-ros/Makefile" ;;
55258 "epan/dissectors/asn1/qsig/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/qsig/Makefile" ;;
55259 "epan/dissectors/asn1/ranap/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/ranap/Makefile" ;;
55260 "epan/dissectors/asn1/rnsap/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/rnsap/Makefile" ;;
55261 "epan/dissectors/asn1/ros/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/ros/Makefile" ;;
55262 "epan/dissectors/asn1/rrc/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/rrc/Makefile" ;;
55263 "epan/dissectors/asn1/rrlp/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/rrlp/Makefile" ;;
55264 "epan/dissectors/asn1/rtse/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/rtse/Makefile" ;;
55265 "epan/dissectors/asn1/rua/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/rua/Makefile" ;;
55266 "epan/dissectors/asn1/s1ap/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/s1ap/Makefile" ;;
55267 "epan/dissectors/asn1/sabp/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/sabp/Makefile" ;;
55268 "epan/dissectors/asn1/sbc-ap/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/sbc-ap/Makefile" ;;
55269 "epan/dissectors/asn1/smrse/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/smrse/Makefile" ;;
55270 "epan/dissectors/asn1/snmp/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/snmp/Makefile" ;;
55271 "epan/dissectors/asn1/spnego/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/spnego/Makefile" ;;
55272 "epan/dissectors/asn1/sv/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/sv/Makefile" ;;
55273 "epan/dissectors/asn1/t124/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/t124/Makefile" ;;
55274 "epan/dissectors/asn1/t125/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/t125/Makefile" ;;
55275 "epan/dissectors/asn1/t38/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/t38/Makefile" ;;
55276 "epan/dissectors/asn1/tcap/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/tcap/Makefile" ;;
55277 "epan/dissectors/asn1/tetra/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/tetra/Makefile" ;;
55278 "epan/dissectors/asn1/ulp/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/ulp/Makefile" ;;
55279 "epan/dissectors/asn1/wlancertextn/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/wlancertextn/Makefile" ;;
55280 "epan/dissectors/asn1/x2ap/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/x2ap/Makefile" ;;
55281 "epan/dissectors/asn1/x509af/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/x509af/Makefile" ;;
55282 "epan/dissectors/asn1/x509ce/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/x509ce/Makefile" ;;
55283 "epan/dissectors/asn1/x509if/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/x509if/Makefile" ;;
55284 "epan/dissectors/asn1/x509sat/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/x509sat/Makefile" ;;
55285 "epan/dissectors/asn1/x721/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/asn1/x721/Makefile" ;;
55286 "capchild/Makefile") CONFIG_FILES="$CONFIG_FILES capchild/Makefile" ;;
55287 "capchild/doxygen.cfg") CONFIG_FILES="$CONFIG_FILES capchild/doxygen.cfg" ;;
55288 "caputils/Makefile") CONFIG_FILES="$CONFIG_FILES caputils/Makefile" ;;
55289 "caputils/doxygen.cfg") CONFIG_FILES="$CONFIG_FILES caputils/doxygen.cfg" ;;
55290 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
55291 "docbook/Makefile") CONFIG_FILES="$CONFIG_FILES docbook/Makefile" ;;
55292 "epan/Makefile") CONFIG_FILES="$CONFIG_FILES epan/Makefile" ;;
55293 "epan/compress/Makefile") CONFIG_FILES="$CONFIG_FILES epan/compress/Makefile" ;;
55294 "epan/crypt/Makefile") CONFIG_FILES="$CONFIG_FILES epan/crypt/Makefile" ;;
55295 "epan/doxygen.cfg") CONFIG_FILES="$CONFIG_FILES epan/doxygen.cfg" ;;
55296 "epan/dfilter/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dfilter/Makefile" ;;
55297 "epan/dissectors/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/Makefile" ;;
55298 "epan/dissectors/dcerpc/Makefile") CONFIG_FILES="$CONFIG_FILES epan/dissectors/dcerpc/Makefile" ;;
55299 "epan/ftypes/Makefile") CONFIG_FILES="$CONFIG_FILES epan/ftypes/Makefile" ;;
55300 "epan/nghttp2/Makefile") CONFIG_FILES="$CONFIG_FILES epan/nghttp2/Makefile" ;;
55301 "epan/wmem/Makefile") CONFIG_FILES="$CONFIG_FILES epan/wmem/Makefile" ;;
55302 "epan/wslua/Makefile") CONFIG_FILES="$CONFIG_FILES epan/wslua/Makefile" ;;
55303 "extcap/Makefile") CONFIG_FILES="$CONFIG_FILES extcap/Makefile" ;;
55304 "codecs/Makefile") CONFIG_FILES="$CONFIG_FILES codecs/Makefile" ;;
55305 "ui/Makefile") CONFIG_FILES="$CONFIG_FILES ui/Makefile" ;;
55306 "ui/doxygen.cfg") CONFIG_FILES="$CONFIG_FILES ui/doxygen.cfg" ;;
55307 "ui/gtk/Makefile") CONFIG_FILES="$CONFIG_FILES ui/gtk/Makefile" ;;
55308 "ui/gtk/doxygen.cfg") CONFIG_FILES="$CONFIG_FILES ui/gtk/doxygen.cfg" ;;
55309 "ui/cli/Makefile") CONFIG_FILES="$CONFIG_FILES ui/cli/Makefile" ;;
55310 "ui/qt/Makefile") CONFIG_FILES="$CONFIG_FILES ui/qt/Makefile" ;;
55311 "ui/qt/doxygen.cfg") CONFIG_FILES="$CONFIG_FILES ui/qt/doxygen.cfg" ;;
55312 "help/Makefile") CONFIG_FILES="$CONFIG_FILES help/Makefile" ;;
55313 "packaging/Makefile") CONFIG_FILES="$CONFIG_FILES packaging/Makefile" ;;
55314 "packaging/macosx/Info.plist") CONFIG_FILES="$CONFIG_FILES packaging/macosx/Info.plist" ;;
55315 "packaging/macosx/Makefile") CONFIG_FILES="$CONFIG_FILES packaging/macosx/Makefile" ;;
55316 "packaging/macosx/osx-dmg.sh") CONFIG_FILES="$CONFIG_FILES packaging/macosx/osx-dmg.sh" ;;
55317 "packaging/macosx/Wireshark_package.pmdoc/index.xml") CONFIG_FILES="$CONFIG_FILES packaging/macosx/Wireshark_package.pmdoc/index.xml" ;;
55318 "packaging/nsis/Makefile") CONFIG_FILES="$CONFIG_FILES packaging/nsis/Makefile" ;;
55319 "packaging/rpm/Makefile") CONFIG_FILES="$CONFIG_FILES packaging/rpm/Makefile" ;;
55320 "packaging/rpm/SPECS/Makefile") CONFIG_FILES="$CONFIG_FILES packaging/rpm/SPECS/Makefile" ;;
55321 "packaging/rpm/SPECS/wireshark.spec") CONFIG_FILES="$CONFIG_FILES packaging/rpm/SPECS/wireshark.spec" ;;
55322 "packaging/svr4/Makefile") CONFIG_FILES="$CONFIG_FILES packaging/svr4/Makefile" ;;
55323 "packaging/svr4/checkinstall") CONFIG_FILES="$CONFIG_FILES packaging/svr4/checkinstall" ;;
55324 "packaging/svr4/pkginfo") CONFIG_FILES="$CONFIG_FILES packaging/svr4/pkginfo" ;;
55325 "packaging/wix/Makefile") CONFIG_FILES="$CONFIG_FILES packaging/wix/Makefile" ;;
55326 "plugins/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/Makefile" ;;
55327 "plugins/docsis/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/docsis/Makefile" ;;
55328 "plugins/easy_codec/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/easy_codec/Makefile" ;;
55329 "plugins/ethercat/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/ethercat/Makefile" ;;
55330 "plugins/gryphon/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/gryphon/Makefile" ;;
55331 "plugins/irda/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/irda/Makefile" ;;
55332 "plugins/m2m/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/m2m/Makefile" ;;
55333 "plugins/mate/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/mate/Makefile" ;;
55334 "plugins/opcua/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/opcua/Makefile" ;;
55335 "plugins/profinet/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/profinet/Makefile" ;;
55336 "plugins/stats_tree/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/stats_tree/Makefile" ;;
55337 "plugins/unistim/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/unistim/Makefile" ;;
55338 "plugins/wimax/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/wimax/Makefile" ;;
55339 "plugins/wimaxasncp/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/wimaxasncp/Makefile" ;;
55340 "plugins/wimaxmacphy/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/wimaxmacphy/Makefile" ;;
55341 "randpkt_core/doxygen.cfg") CONFIG_FILES="$CONFIG_FILES randpkt_core/doxygen.cfg" ;;
55342 "randpkt_core/Makefile") CONFIG_FILES="$CONFIG_FILES randpkt_core/Makefile" ;;
55343 "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
55344 "tools/lemon/Makefile") CONFIG_FILES="$CONFIG_FILES tools/lemon/Makefile" ;;
55345 "wiretap/Makefile") CONFIG_FILES="$CONFIG_FILES wiretap/Makefile" ;;
55346 "writecap/Makefile") CONFIG_FILES="$CONFIG_FILES writecap/Makefile" ;;
55347 "writecap/doxygen.cfg") CONFIG_FILES="$CONFIG_FILES writecap/doxygen.cfg" ;;
55348 "wsutil/Makefile") CONFIG_FILES="$CONFIG_FILES wsutil/Makefile" ;;
55349 "echld/Makefile") CONFIG_FILES="$CONFIG_FILES echld/Makefile" ;;
55350  
55351 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
55352 esac
55353 done
55354  
55355  
55356 # If the user did not use the arguments to specify the items to instantiate,
55357 # then the envvar interface is used. Set only those that are not.
55358 # We use the long form for the default assignment because of an extremely
55359 # bizarre bug on SunOS 4.1.3.
55360 if $ac_need_defaults; then
55361 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
55362 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
55363 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
55364 fi
55365  
55366 # Have a temporary directory for convenience. Make it in the build tree
55367 # simply because there is no reason against having it here, and in addition,
55368 # creating and moving files from /tmp can sometimes cause problems.
55369 # Hook for its removal unless debugging.
55370 # Note that there is a small window in which the directory will not be cleaned:
55371 # after its creation but before its name has been assigned to `$tmp'.
55372 $debug ||
55373 {
55374 tmp= ac_tmp=
55375 trap 'exit_status=$?
55376 : "${ac_tmp:=$tmp}"
55377 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
55378 ' 0
55379 trap 'as_fn_exit 1' 1 2 13 15
55380 }
55381 # Create a (secure) tmp directory for tmp files.
55382  
55383 {
55384 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
55385 test -d "$tmp"
55386 } ||
55387 {
55388 tmp=./conf$$-$RANDOM
55389 (umask 077 && mkdir "$tmp")
55390 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
55391 ac_tmp=$tmp
55392  
55393 # Set up the scripts for CONFIG_FILES section.
55394 # No need to generate them if there are no CONFIG_FILES.
55395 # This happens for instance with `./config.status config.h'.
55396 if test -n "$CONFIG_FILES"; then
55397  
55398  
55399 ac_cr=`echo X | tr X '\015'`
55400 # On cygwin, bash can eat \r inside `` if the user requested igncr.
55401 # But we know of no other shell where ac_cr would be empty at this
55402 # point, so we can use a bashism as a fallback.
55403 if test "x$ac_cr" = x; then
55404 eval ac_cr=\$\'\\r\'
55405 fi
55406 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
55407 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
55408 ac_cs_awk_cr='\\r'
55409 else
55410 ac_cs_awk_cr=$ac_cr
55411 fi
55412  
55413 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
55414 _ACEOF
55415  
55416  
55417 {
55418 echo "cat >conf$$subs.awk <<_ACEOF" &&
55419 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
55420 echo "_ACEOF"
55421 } >conf$$subs.sh ||
55422 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
55423 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
55424 ac_delim='%!_!# '
55425 for ac_last_try in false false false false false :; do
55426 . ./conf$$subs.sh ||
55427 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
55428  
55429 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
55430 if test $ac_delim_n = $ac_delim_num; then
55431 break
55432 elif $ac_last_try; then
55433 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
55434 else
55435 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
55436 fi
55437 done
55438 rm -f conf$$subs.sh
55439  
55440 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
55441 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
55442 _ACEOF
55443 sed -n '
55444 h
55445 s/^/S["/; s/!.*/"]=/
55446 p
55447 g
55448 s/^[^!]*!//
55449 :repl
55450 t repl
55451 s/'"$ac_delim"'$//
55452 t delim
55453 :nl
55454 h
55455 s/\(.\{148\}\)..*/\1/
55456 t more1
55457 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
55458 p
55459 n
55460 b repl
55461 :more1
55462 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
55463 p
55464 g
55465 s/.\{148\}//
55466 t nl
55467 :delim
55468 h
55469 s/\(.\{148\}\)..*/\1/
55470 t more2
55471 s/["\\]/\\&/g; s/^/"/; s/$/"/
55472 p
55473 b
55474 :more2
55475 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
55476 p
55477 g
55478 s/.\{148\}//
55479 t delim
55480 ' <conf$$subs.awk | sed '
55481 /^[^""]/{
55482 N
55483 s/\n//
55484 }
55485 ' >>$CONFIG_STATUS || ac_write_fail=1
55486 rm -f conf$$subs.awk
55487 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
55488 _ACAWK
55489 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
55490 for (key in S) S_is_set[key] = 1
55491 FS = ""
55492  
55493 }
55494 {
55495 line = $ 0
55496 nfields = split(line, field, "@")
55497 substed = 0
55498 len = length(field[1])
55499 for (i = 2; i < nfields; i++) {
55500 key = field[i]
55501 keylen = length(key)
55502 if (S_is_set[key]) {
55503 value = S[key]
55504 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
55505 len += length(value) + length(field[++i])
55506 substed = 1
55507 } else
55508 len += 1 + keylen
55509 }
55510  
55511 print line
55512 }
55513  
55514 _ACAWK
55515 _ACEOF
55516 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
55517 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
55518 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
55519 else
55520 cat
55521 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
55522 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
55523 _ACEOF
55524  
55525 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
55526 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
55527 # trailing colons and then remove the whole line if VPATH becomes empty
55528 # (actually we leave an empty line to preserve line numbers).
55529 if test "x$srcdir" = x.; then
55530 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
55531 h
55532 s///
55533 s/^/:/
55534 s/[ ]*$/:/
55535 s/:\$(srcdir):/:/g
55536 s/:\${srcdir}:/:/g
55537 s/:@srcdir@:/:/g
55538 s/^:*//
55539 s/:*$//
55540 x
55541 s/\(=[ ]*\).*/\1/
55542 G
55543 s/\n//
55544 s/^[^=]*=[ ]*$//
55545 }'
55546 fi
55547  
55548 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
55549 fi # test -n "$CONFIG_FILES"
55550  
55551 # Set up the scripts for CONFIG_HEADERS section.
55552 # No need to generate them if there are no CONFIG_HEADERS.
55553 # This happens for instance with `./config.status Makefile'.
55554 if test -n "$CONFIG_HEADERS"; then
55555 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
55556 BEGIN {
55557 _ACEOF
55558  
55559 # Transform confdefs.h into an awk script `defines.awk', embedded as
55560 # here-document in config.status, that substitutes the proper values into
55561 # config.h.in to produce config.h.
55562  
55563 # Create a delimiter string that does not exist in confdefs.h, to ease
55564 # handling of long lines.
55565 ac_delim='%!_!# '
55566 for ac_last_try in false false :; do
55567 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
55568 if test -z "$ac_tt"; then
55569 break
55570 elif $ac_last_try; then
55571 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
55572 else
55573 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
55574 fi
55575 done
55576  
55577 # For the awk script, D is an array of macro values keyed by name,
55578 # likewise P contains macro parameters if any. Preserve backslash
55579 # newline sequences.
55580  
55581 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
55582 sed -n '
55583 s/.\{148\}/&'"$ac_delim"'/g
55584 t rset
55585 :rset
55586 s/^[ ]*#[ ]*define[ ][ ]*/ /
55587 t def
55588 d
55589 :def
55590 s/\\$//
55591 t bsnl
55592 s/["\\]/\\&/g
55593 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
55594 D["\1"]=" \3"/p
55595 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
55596 d
55597 :bsnl
55598 s/["\\]/\\&/g
55599 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
55600 D["\1"]=" \3\\\\\\n"\\/p
55601 t cont
55602 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
55603 t cont
55604 d
55605 :cont
55606 n
55607 s/.\{148\}/&'"$ac_delim"'/g
55608 t clear
55609 :clear
55610 s/\\$//
55611 t bsnlc
55612 s/["\\]/\\&/g; s/^/"/; s/$/"/p
55613 d
55614 :bsnlc
55615 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
55616 b cont
55617 ' <confdefs.h | sed '
55618 s/'"$ac_delim"'/"\\\
55619 "/g' >>$CONFIG_STATUS || ac_write_fail=1
55620  
55621 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
55622 for (key in D) D_is_set[key] = 1
55623 FS = ""
55624 }
55625 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
55626 line = \$ 0
55627 split(line, arg, " ")
55628 if (arg[1] == "#") {
55629 defundef = arg[2]
55630 mac1 = arg[3]
55631 } else {
55632 defundef = substr(arg[1], 2)
55633 mac1 = arg[2]
55634 }
55635 split(mac1, mac2, "(") #)
55636 macro = mac2[1]
55637 prefix = substr(line, 1, index(line, defundef) - 1)
55638 if (D_is_set[macro]) {
55639 # Preserve the white space surrounding the "#".
55640 print prefix "define", macro P[macro] D[macro]
55641 next
55642 } else {
55643 # Replace #undef with comments. This is necessary, for example,
55644 # in the case of _POSIX_SOURCE, which is predefined and required
55645 # on some systems where configure will not decide to define it.
55646 if (defundef == "undef") {
55647 print "/*", prefix defundef, macro, "*/"
55648 next
55649 }
55650 }
55651 }
55652 { print }
55653 _ACAWK
55654 _ACEOF
55655 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
55656 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
55657 fi # test -n "$CONFIG_HEADERS"
55658  
55659  
55660 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
55661 shift
55662 for ac_tag
55663 do
55664 case $ac_tag in
55665 :[FHLC]) ac_mode=$ac_tag; continue;;
55666 esac
55667 case $ac_mode$ac_tag in
55668 :[FHL]*:*);;
55669 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
55670 :[FH]-) ac_tag=-:-;;
55671 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
55672 esac
55673 ac_save_IFS=$IFS
55674 IFS=:
55675 set x $ac_tag
55676 IFS=$ac_save_IFS
55677 shift
55678 ac_file=$1
55679 shift
55680  
55681 case $ac_mode in
55682 :L) ac_source=$1;;
55683 :[FH])
55684 ac_file_inputs=
55685 for ac_f
55686 do
55687 case $ac_f in
55688 -) ac_f="$ac_tmp/stdin";;
55689 *) # Look for the file first in the build tree, then in the source tree
55690 # (if the path is not absolute). The absolute path cannot be DOS-style,
55691 # because $ac_f cannot contain `:'.
55692 test -f "$ac_f" ||
55693 case $ac_f in
55694 [\\/$]*) false;;
55695 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
55696 esac ||
55697 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
55698 esac
55699 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
55700 as_fn_append ac_file_inputs " '$ac_f'"
55701 done
55702  
55703 # Let's still pretend it is `configure' which instantiates (i.e., don't
55704 # use $as_me), people would be surprised to read:
55705 # /* config.h. Generated by config.status. */
55706 configure_input='Generated from '`
55707 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
55708 `' by configure.'
55709 if test x"$ac_file" != x-; then
55710 configure_input="$ac_file. $configure_input"
55711 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
55712 $as_echo "$as_me: creating $ac_file" >&6;}
55713 fi
55714 # Neutralize special characters interpreted by sed in replacement strings.
55715 case $configure_input in #(
55716 *\&* | *\|* | *\\* )
55717 ac_sed_conf_input=`$as_echo "$configure_input" |
55718 sed 's/[\\\\&|]/\\\\&/g'`;; #(
55719 *) ac_sed_conf_input=$configure_input;;
55720 esac
55721  
55722 case $ac_tag in
55723 *:-:* | *:-) cat >"$ac_tmp/stdin" \
55724 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
55725 esac
55726 ;;
55727 esac
55728  
55729 ac_dir=`$as_dirname -- "$ac_file" ||
55730 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
55731 X"$ac_file" : 'X\(//\)[^/]' \| \
55732 X"$ac_file" : 'X\(//\)$' \| \
55733 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
55734 $as_echo X"$ac_file" |
55735 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
55736 s//\1/
55737 q
55738 }
55739 /^X\(\/\/\)[^/].*/{
55740 s//\1/
55741 q
55742 }
55743 /^X\(\/\/\)$/{
55744 s//\1/
55745 q
55746 }
55747 /^X\(\/\).*/{
55748 s//\1/
55749 q
55750 }
55751 s/.*/./; q'`
55752 as_dir="$ac_dir"; as_fn_mkdir_p
55753 ac_builddir=.
55754  
55755 case "$ac_dir" in
55756 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
55757 *)
55758 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
55759 # A ".." for each directory in $ac_dir_suffix.
55760 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
55761 case $ac_top_builddir_sub in
55762 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
55763 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
55764 esac ;;
55765 esac
55766 ac_abs_top_builddir=$ac_pwd
55767 ac_abs_builddir=$ac_pwd$ac_dir_suffix
55768 # for backward compatibility:
55769 ac_top_builddir=$ac_top_build_prefix
55770  
55771 case $srcdir in
55772 .) # We are building in place.
55773 ac_srcdir=.
55774 ac_top_srcdir=$ac_top_builddir_sub
55775 ac_abs_top_srcdir=$ac_pwd ;;
55776 [\\/]* | ?:[\\/]* ) # Absolute name.
55777 ac_srcdir=$srcdir$ac_dir_suffix;
55778 ac_top_srcdir=$srcdir
55779 ac_abs_top_srcdir=$srcdir ;;
55780 *) # Relative name.
55781 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
55782 ac_top_srcdir=$ac_top_build_prefix$srcdir
55783 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
55784 esac
55785 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
55786  
55787  
55788 case $ac_mode in
55789 :F)
55790 #
55791 # CONFIG_FILE
55792 #
55793  
55794 case $INSTALL in
55795 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
55796 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
55797 esac
55798 ac_MKDIR_P=$MKDIR_P
55799 case $MKDIR_P in
55800 [\\/$]* | ?:[\\/]* ) ;;
55801 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
55802 esac
55803 _ACEOF
55804  
55805 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
55806 # If the template does not know about datarootdir, expand it.
55807 # FIXME: This hack should be removed a few years after 2.60.
55808 ac_datarootdir_hack=; ac_datarootdir_seen=
55809 ac_sed_dataroot='
55810 /datarootdir/ {
55811 p
55812 q
55813 }
55814 /@datadir@/p
55815 /@docdir@/p
55816 /@infodir@/p
55817 /@localedir@/p
55818 /@mandir@/p'
55819 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
55820 *datarootdir*) ac_datarootdir_seen=yes;;
55821 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
55822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
55823 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
55824 _ACEOF
55825 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
55826 ac_datarootdir_hack='
55827 s&@datadir@&$datadir&g
55828 s&@docdir@&$docdir&g
55829 s&@infodir@&$infodir&g
55830 s&@localedir@&$localedir&g
55831 s&@mandir@&$mandir&g
55832 s&\\\${datarootdir}&$datarootdir&g' ;;
55833 esac
55834 _ACEOF
55835  
55836 # Neutralize VPATH when `$srcdir' = `.'.
55837 # Shell code in configure.ac might set extrasub.
55838 # FIXME: do we really want to maintain this feature?
55839 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
55840 ac_sed_extra="$ac_vpsub
55841 $extrasub
55842 _ACEOF
55843 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
55844 :t
55845 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
55846 s|@configure_input@|$ac_sed_conf_input|;t t
55847 s&@top_builddir@&$ac_top_builddir_sub&;t t
55848 s&@top_build_prefix@&$ac_top_build_prefix&;t t
55849 s&@srcdir@&$ac_srcdir&;t t
55850 s&@abs_srcdir@&$ac_abs_srcdir&;t t
55851 s&@top_srcdir@&$ac_top_srcdir&;t t
55852 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
55853 s&@builddir@&$ac_builddir&;t t
55854 s&@abs_builddir@&$ac_abs_builddir&;t t
55855 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
55856 s&@INSTALL@&$ac_INSTALL&;t t
55857 s&@MKDIR_P@&$ac_MKDIR_P&;t t
55858 $ac_datarootdir_hack
55859 "
55860 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
55861 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
55862  
55863 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
55864 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
55865 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
55866 "$ac_tmp/out"`; test -z "$ac_out"; } &&
55867 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
55868 which seems to be undefined. Please make sure it is defined" >&5
55869 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
55870 which seems to be undefined. Please make sure it is defined" >&2;}
55871  
55872 rm -f "$ac_tmp/stdin"
55873 case $ac_file in
55874 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
55875 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
55876 esac \
55877 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
55878 ;;
55879 :H)
55880 #
55881 # CONFIG_HEADER
55882 #
55883 if test x"$ac_file" != x-; then
55884 {
55885 $as_echo "/* $configure_input */" \
55886 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
55887 } >"$ac_tmp/config.h" \
55888 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
55889 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
55890 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
55891 $as_echo "$as_me: $ac_file is unchanged" >&6;}
55892 else
55893 rm -f "$ac_file"
55894 mv "$ac_tmp/config.h" "$ac_file" \
55895 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
55896 fi
55897 else
55898 $as_echo "/* $configure_input */" \
55899 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
55900 || as_fn_error $? "could not create -" "$LINENO" 5
55901 fi
55902 # Compute "$ac_file"'s index in $config_headers.
55903 _am_arg="$ac_file"
55904 _am_stamp_count=1
55905 for _am_header in $config_headers :; do
55906 case $_am_header in
55907 $_am_arg | $_am_arg:* )
55908 break ;;
55909 * )
55910 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
55911 esac
55912 done
55913 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
55914 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
55915 X"$_am_arg" : 'X\(//\)[^/]' \| \
55916 X"$_am_arg" : 'X\(//\)$' \| \
55917 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
55918 $as_echo X"$_am_arg" |
55919 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
55920 s//\1/
55921 q
55922 }
55923 /^X\(\/\/\)[^/].*/{
55924 s//\1/
55925 q
55926 }
55927 /^X\(\/\/\)$/{
55928 s//\1/
55929 q
55930 }
55931 /^X\(\/\).*/{
55932 s//\1/
55933 q
55934 }
55935 s/.*/./; q'`/stamp-h$_am_stamp_count
55936 ;;
55937  
55938 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
55939 $as_echo "$as_me: executing $ac_file commands" >&6;}
55940 ;;
55941 esac
55942  
55943  
55944 case $ac_file$ac_mode in
55945 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
55946 # Older Autoconf quotes --file arguments for eval, but not when files
55947 # are listed without --file. Let's play safe and only enable the eval
55948 # if we detect the quoting.
55949 case $CONFIG_FILES in
55950 *\'*) eval set x "$CONFIG_FILES" ;;
55951 *) set x $CONFIG_FILES ;;
55952 esac
55953 shift
55954 for mf
55955 do
55956 # Strip MF so we end up with the name of the file.
55957 mf=`echo "$mf" | sed -e 's/:.*$//'`
55958 # Check whether this is an Automake generated Makefile or not.
55959 # We used to match only the files named 'Makefile.in', but
55960 # some people rename them; so instead we look at the file content.
55961 # Grep'ing the first line is not enough: some people post-process
55962 # each Makefile.in and add a new line on top of each file to say so.
55963 # Grep'ing the whole file is not good either: AIX grep has a line
55964 # limit of 2048, but all sed's we know have understand at least 4000.
55965 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
55966 dirpart=`$as_dirname -- "$mf" ||
55967 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
55968 X"$mf" : 'X\(//\)[^/]' \| \
55969 X"$mf" : 'X\(//\)$' \| \
55970 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
55971 $as_echo X"$mf" |
55972 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
55973 s//\1/
55974 q
55975 }
55976 /^X\(\/\/\)[^/].*/{
55977 s//\1/
55978 q
55979 }
55980 /^X\(\/\/\)$/{
55981 s//\1/
55982 q
55983 }
55984 /^X\(\/\).*/{
55985 s//\1/
55986 q
55987 }
55988 s/.*/./; q'`
55989 else
55990 continue
55991 fi
55992 # Extract the definition of DEPDIR, am__include, and am__quote
55993 # from the Makefile without running 'make'.
55994 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
55995 test -z "$DEPDIR" && continue
55996 am__include=`sed -n 's/^am__include = //p' < "$mf"`
55997 test -z "$am__include" && continue
55998 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
55999 # Find all dependency output files, they are included files with
56000 # $(DEPDIR) in their names. We invoke sed twice because it is the
56001 # simplest approach to changing $(DEPDIR) to its actual value in the
56002 # expansion.
56003 for file in `sed -n "
56004 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
56005 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
56006 # Make sure the directory exists.
56007 test -f "$dirpart/$file" && continue
56008 fdir=`$as_dirname -- "$file" ||
56009 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
56010 X"$file" : 'X\(//\)[^/]' \| \
56011 X"$file" : 'X\(//\)$' \| \
56012 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
56013 $as_echo X"$file" |
56014 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
56015 s//\1/
56016 q
56017 }
56018 /^X\(\/\/\)[^/].*/{
56019 s//\1/
56020 q
56021 }
56022 /^X\(\/\/\)$/{
56023 s//\1/
56024 q
56025 }
56026 /^X\(\/\).*/{
56027 s//\1/
56028 q
56029 }
56030 s/.*/./; q'`
56031 as_dir=$dirpart/$fdir; as_fn_mkdir_p
56032 # echo "creating $dirpart/$file"
56033 echo '# dummy' > "$dirpart/$file"
56034 done
56035 done
56036 }
56037 ;;
56038 "libtool":C)
56039  
56040 # See if we are running on zsh, and set the options that allow our
56041 # commands through without removal of \ escapes.
56042 if test -n "${ZSH_VERSION+set}"; then
56043 setopt NO_GLOB_SUBST
56044 fi
56045  
56046 cfgfile=${ofile}T
56047 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
56048 $RM "$cfgfile"
56049  
56050 cat <<_LT_EOF >> "$cfgfile"
56051 #! $SHELL
56052 # Generated automatically by $as_me ($PACKAGE) $VERSION
56053 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
56054 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
56055  
56056 # Provide generalized library-building support services.
56057 # Written by Gordon Matzigkeit, 1996
56058  
56059 # Copyright (C) 2014 Free Software Foundation, Inc.
56060 # This is free software; see the source for copying conditions. There is NO
56061 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
56062  
56063 # GNU Libtool is free software; you can redistribute it and/or modify
56064 # it under the terms of the GNU General Public License as published by
56065 # the Free Software Foundation; either version 2 of of the License, or
56066 # (at your option) any later version.
56067 #
56068 # As a special exception to the GNU General Public License, if you
56069 # distribute this file as part of a program or library that is built
56070 # using GNU Libtool, you may include this file under the same
56071 # distribution terms that you use for the rest of that program.
56072 #
56073 # GNU Libtool is distributed in the hope that it will be useful, but
56074 # WITHOUT ANY WARRANTY; without even the implied warranty of
56075 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56076 # GNU General Public License for more details.
56077 #
56078 # You should have received a copy of the GNU General Public License
56079 # along with this program. If not, see <http://www.gnu.org/licenses/>.
56080  
56081  
56082 # The names of the tagged configurations supported by this script.
56083 available_tags='CXX '
56084  
56085 # Configured defaults for sys_lib_dlsearch_path munging.
56086 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
56087  
56088 # ### BEGIN LIBTOOL CONFIG
56089  
56090 # Which release of libtool.m4 was used?
56091 macro_version=$macro_version
56092 macro_revision=$macro_revision
56093  
56094 # Whether or not to build static libraries.
56095 build_old_libs=$enable_static
56096  
56097 # Whether or not to build shared libraries.
56098 build_libtool_libs=$enable_shared
56099  
56100 # What type of objects to build.
56101 pic_mode=$pic_mode
56102  
56103 # Whether or not to optimize for fast installation.
56104 fast_install=$enable_fast_install
56105  
56106 # Shared archive member basename,for filename based shared library versioning on AIX.
56107 shared_archive_member_spec=$shared_archive_member_spec
56108  
56109 # Shell to use when invoking shell scripts.
56110 SHELL=$lt_SHELL
56111  
56112 # An echo program that protects backslashes.
56113 ECHO=$lt_ECHO
56114  
56115 # The PATH separator for the build system.
56116 PATH_SEPARATOR=$lt_PATH_SEPARATOR
56117  
56118 # The host system.
56119 host_alias=$host_alias
56120 host=$host
56121 host_os=$host_os
56122  
56123 # The build system.
56124 build_alias=$build_alias
56125 build=$build
56126 build_os=$build_os
56127  
56128 # A sed program that does not truncate output.
56129 SED=$lt_SED
56130  
56131 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
56132 Xsed="\$SED -e 1s/^X//"
56133  
56134 # A grep program that handles long lines.
56135 GREP=$lt_GREP
56136  
56137 # An ERE matcher.
56138 EGREP=$lt_EGREP
56139  
56140 # A literal string matcher.
56141 FGREP=$lt_FGREP
56142  
56143 # A BSD- or MS-compatible name lister.
56144 NM=$lt_NM
56145  
56146 # Whether we need soft or hard links.
56147 LN_S=$lt_LN_S
56148  
56149 # What is the maximum length of a command?
56150 max_cmd_len=$max_cmd_len
56151  
56152 # Object file suffix (normally "o").
56153 objext=$ac_objext
56154  
56155 # Executable file suffix (normally "").
56156 exeext=$exeext
56157  
56158 # whether the shell understands "unset".
56159 lt_unset=$lt_unset
56160  
56161 # turn spaces into newlines.
56162 SP2NL=$lt_lt_SP2NL
56163  
56164 # turn newlines into spaces.
56165 NL2SP=$lt_lt_NL2SP
56166  
56167 # convert \$build file names to \$host format.
56168 to_host_file_cmd=$lt_cv_to_host_file_cmd
56169  
56170 # convert \$build files to toolchain format.
56171 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
56172  
56173 # An object symbol dumper.
56174 OBJDUMP=$lt_OBJDUMP
56175  
56176 # Method to check whether dependent libraries are shared objects.
56177 deplibs_check_method=$lt_deplibs_check_method
56178  
56179 # Command to use when deplibs_check_method = "file_magic".
56180 file_magic_cmd=$lt_file_magic_cmd
56181  
56182 # How to find potential files when deplibs_check_method = "file_magic".
56183 file_magic_glob=$lt_file_magic_glob
56184  
56185 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
56186 want_nocaseglob=$lt_want_nocaseglob
56187  
56188 # DLL creation program.
56189 DLLTOOL=$lt_DLLTOOL
56190  
56191 # Command to associate shared and link libraries.
56192 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
56193  
56194 # The archiver.
56195 AR=$lt_AR
56196  
56197 # Flags to create an archive.
56198 AR_FLAGS=$lt_AR_FLAGS
56199  
56200 # How to feed a file listing to the archiver.
56201 archiver_list_spec=$lt_archiver_list_spec
56202  
56203 # A symbol stripping program.
56204 STRIP=$lt_STRIP
56205  
56206 # Commands used to install an old-style archive.
56207 RANLIB=$lt_RANLIB
56208 old_postinstall_cmds=$lt_old_postinstall_cmds
56209 old_postuninstall_cmds=$lt_old_postuninstall_cmds
56210  
56211 # Whether to use a lock for old archive extraction.
56212 lock_old_archive_extraction=$lock_old_archive_extraction
56213  
56214 # A C compiler.
56215 LTCC=$lt_CC
56216  
56217 # LTCC compiler flags.
56218 LTCFLAGS=$lt_CFLAGS
56219  
56220 # Take the output of nm and produce a listing of raw symbols and C names.
56221 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
56222  
56223 # Transform the output of nm in a proper C declaration.
56224 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
56225  
56226 # Transform the output of nm into a list of symbols to manually relocate.
56227 global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
56228  
56229 # Transform the output of nm in a C name address pair.
56230 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
56231  
56232 # Transform the output of nm in a C name address pair when lib prefix is needed.
56233 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
56234  
56235 # The name lister interface.
56236 nm_interface=$lt_lt_cv_nm_interface
56237  
56238 # Specify filename containing input files for \$NM.
56239 nm_file_list_spec=$lt_nm_file_list_spec
56240  
56241 # The root where to search for dependent libraries,and where our libraries should be installed.
56242 lt_sysroot=$lt_sysroot
56243  
56244 # Command to truncate a binary pipe.
56245 lt_truncate_bin=$lt_lt_cv_truncate_bin
56246  
56247 # The name of the directory that contains temporary libtool files.
56248 objdir=$objdir
56249  
56250 # Used to examine libraries when file_magic_cmd begins with "file".
56251 MAGIC_CMD=$MAGIC_CMD
56252  
56253 # Must we lock files when doing compilation?
56254 need_locks=$lt_need_locks
56255  
56256 # Manifest tool.
56257 MANIFEST_TOOL=$lt_MANIFEST_TOOL
56258  
56259 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
56260 DSYMUTIL=$lt_DSYMUTIL
56261  
56262 # Tool to change global to local symbols on Mac OS X.
56263 NMEDIT=$lt_NMEDIT
56264  
56265 # Tool to manipulate fat objects and archives on Mac OS X.
56266 LIPO=$lt_LIPO
56267  
56268 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
56269 OTOOL=$lt_OTOOL
56270  
56271 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
56272 OTOOL64=$lt_OTOOL64
56273  
56274 # Old archive suffix (normally "a").
56275 libext=$libext
56276  
56277 # Shared library suffix (normally ".so").
56278 shrext_cmds=$lt_shrext_cmds
56279  
56280 # The commands to extract the exported symbol list from a shared archive.
56281 extract_expsyms_cmds=$lt_extract_expsyms_cmds
56282  
56283 # Variables whose values should be saved in libtool wrapper scripts and
56284 # restored at link time.
56285 variables_saved_for_relink=$lt_variables_saved_for_relink
56286  
56287 # Do we need the "lib" prefix for modules?
56288 need_lib_prefix=$need_lib_prefix
56289  
56290 # Do we need a version for libraries?
56291 need_version=$need_version
56292  
56293 # Library versioning type.
56294 version_type=$version_type
56295  
56296 # Shared library runtime path variable.
56297 runpath_var=$runpath_var
56298  
56299 # Shared library path variable.
56300 shlibpath_var=$shlibpath_var
56301  
56302 # Is shlibpath searched before the hard-coded library search path?
56303 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
56304  
56305 # Format of library name prefix.
56306 libname_spec=$lt_libname_spec
56307  
56308 # List of archive names. First name is the real one, the rest are links.
56309 # The last name is the one that the linker finds with -lNAME
56310 library_names_spec=$lt_library_names_spec
56311  
56312 # The coded name of the library, if different from the real name.
56313 soname_spec=$lt_soname_spec
56314  
56315 # Permission mode override for installation of shared libraries.
56316 install_override_mode=$lt_install_override_mode
56317  
56318 # Command to use after installation of a shared archive.
56319 postinstall_cmds=$lt_postinstall_cmds
56320  
56321 # Command to use after uninstallation of a shared archive.
56322 postuninstall_cmds=$lt_postuninstall_cmds
56323  
56324 # Commands used to finish a libtool library installation in a directory.
56325 finish_cmds=$lt_finish_cmds
56326  
56327 # As "finish_cmds", except a single script fragment to be evaled but
56328 # not shown.
56329 finish_eval=$lt_finish_eval
56330  
56331 # Whether we should hardcode library paths into libraries.
56332 hardcode_into_libs=$hardcode_into_libs
56333  
56334 # Compile-time system search path for libraries.
56335 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
56336  
56337 # Detected run-time system search path for libraries.
56338 sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
56339  
56340 # Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
56341 configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
56342  
56343 # Whether dlopen is supported.
56344 dlopen_support=$enable_dlopen
56345  
56346 # Whether dlopen of programs is supported.
56347 dlopen_self=$enable_dlopen_self
56348  
56349 # Whether dlopen of statically linked programs is supported.
56350 dlopen_self_static=$enable_dlopen_self_static
56351  
56352 # Commands to strip libraries.
56353 old_striplib=$lt_old_striplib
56354 striplib=$lt_striplib
56355  
56356  
56357 # The linker used to build libraries.
56358 LD=$lt_LD
56359  
56360 # How to create reloadable object files.
56361 reload_flag=$lt_reload_flag
56362 reload_cmds=$lt_reload_cmds
56363  
56364 # Commands used to build an old-style archive.
56365 old_archive_cmds=$lt_old_archive_cmds
56366  
56367 # A language specific compiler.
56368 CC=$lt_compiler
56369  
56370 # Is the compiler the GNU compiler?
56371 with_gcc=$GCC
56372  
56373 # Compiler flag to turn off builtin functions.
56374 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
56375  
56376 # Additional compiler flags for building library objects.
56377 pic_flag=$lt_lt_prog_compiler_pic
56378  
56379 # How to pass a linker flag through the compiler.
56380 wl=$lt_lt_prog_compiler_wl
56381  
56382 # Compiler flag to prevent dynamic linking.
56383 link_static_flag=$lt_lt_prog_compiler_static
56384  
56385 # Does compiler simultaneously support -c and -o options?
56386 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
56387  
56388 # Whether or not to add -lc for building shared libraries.
56389 build_libtool_need_lc=$archive_cmds_need_lc
56390  
56391 # Whether or not to disallow shared libs when runtime libs are static.
56392 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
56393  
56394 # Compiler flag to allow reflexive dlopens.
56395 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
56396  
56397 # Compiler flag to generate shared objects directly from archives.
56398 whole_archive_flag_spec=$lt_whole_archive_flag_spec
56399  
56400 # Whether the compiler copes with passing no objects directly.
56401 compiler_needs_object=$lt_compiler_needs_object
56402  
56403 # Create an old-style archive from a shared archive.
56404 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
56405  
56406 # Create a temporary old-style archive to link instead of a shared archive.
56407 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
56408  
56409 # Commands used to build a shared archive.
56410 archive_cmds=$lt_archive_cmds
56411 archive_expsym_cmds=$lt_archive_expsym_cmds
56412  
56413 # Commands used to build a loadable module if different from building
56414 # a shared archive.
56415 module_cmds=$lt_module_cmds
56416 module_expsym_cmds=$lt_module_expsym_cmds
56417  
56418 # Whether we are building with GNU ld or not.
56419 with_gnu_ld=$lt_with_gnu_ld
56420  
56421 # Flag that allows shared libraries with undefined symbols to be built.
56422 allow_undefined_flag=$lt_allow_undefined_flag
56423  
56424 # Flag that enforces no undefined symbols.
56425 no_undefined_flag=$lt_no_undefined_flag
56426  
56427 # Flag to hardcode \$libdir into a binary during linking.
56428 # This must work even if \$libdir does not exist
56429 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
56430  
56431 # Whether we need a single "-rpath" flag with a separated argument.
56432 hardcode_libdir_separator=$lt_hardcode_libdir_separator
56433  
56434 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
56435 # DIR into the resulting binary.
56436 hardcode_direct=$hardcode_direct
56437  
56438 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
56439 # DIR into the resulting binary and the resulting library dependency is
56440 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
56441 # library is relocated.
56442 hardcode_direct_absolute=$hardcode_direct_absolute
56443  
56444 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
56445 # into the resulting binary.
56446 hardcode_minus_L=$hardcode_minus_L
56447  
56448 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
56449 # into the resulting binary.
56450 hardcode_shlibpath_var=$hardcode_shlibpath_var
56451  
56452 # Set to "yes" if building a shared library automatically hardcodes DIR
56453 # into the library and all subsequent libraries and executables linked
56454 # against it.
56455 hardcode_automatic=$hardcode_automatic
56456  
56457 # Set to yes if linker adds runtime paths of dependent libraries
56458 # to runtime path list.
56459 inherit_rpath=$inherit_rpath
56460  
56461 # Whether libtool must link a program against all its dependency libraries.
56462 link_all_deplibs=$link_all_deplibs
56463  
56464 # Set to "yes" if exported symbols are required.
56465 always_export_symbols=$always_export_symbols
56466  
56467 # The commands to list exported symbols.
56468 export_symbols_cmds=$lt_export_symbols_cmds
56469  
56470 # Symbols that should not be listed in the preloaded symbols.
56471 exclude_expsyms=$lt_exclude_expsyms
56472  
56473 # Symbols that must always be exported.
56474 include_expsyms=$lt_include_expsyms
56475  
56476 # Commands necessary for linking programs (against libraries) with templates.
56477 prelink_cmds=$lt_prelink_cmds
56478  
56479 # Commands necessary for finishing linking programs.
56480 postlink_cmds=$lt_postlink_cmds
56481  
56482 # Specify filename containing input files.
56483 file_list_spec=$lt_file_list_spec
56484  
56485 # How to hardcode a shared library path into an executable.
56486 hardcode_action=$hardcode_action
56487  
56488 # The directories searched by this compiler when creating a shared library.
56489 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
56490  
56491 # Dependencies to place before and after the objects being linked to
56492 # create a shared library.
56493 predep_objects=$lt_predep_objects
56494 postdep_objects=$lt_postdep_objects
56495 predeps=$lt_predeps
56496 postdeps=$lt_postdeps
56497  
56498 # The library search path used internally by the compiler when linking
56499 # a shared library.
56500 compiler_lib_search_path=$lt_compiler_lib_search_path
56501  
56502 # ### END LIBTOOL CONFIG
56503  
56504 _LT_EOF
56505  
56506 cat <<'_LT_EOF' >> "$cfgfile"
56507  
56508 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
56509  
56510 # func_munge_path_list VARIABLE PATH
56511 # -----------------------------------
56512 # VARIABLE is name of variable containing _space_ separated list of
56513 # directories to be munged by the contents of PATH, which is string
56514 # having a format:
56515 # "DIR[:DIR]:"
56516 # string "DIR[ DIR]" will be prepended to VARIABLE
56517 # ":DIR[:DIR]"
56518 # string "DIR[ DIR]" will be appended to VARIABLE
56519 # "DIRP[:DIRP]::[DIRA:]DIRA"
56520 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
56521 # "DIRA[ DIRA]" will be appended to VARIABLE
56522 # "DIR[:DIR]"
56523 # VARIABLE will be replaced by "DIR[ DIR]"
56524 func_munge_path_list ()
56525 {
56526 case x$2 in
56527 x)
56528 ;;
56529 *:)
56530 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
56531 ;;
56532 x:*)
56533 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
56534 ;;
56535 *::*)
56536 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
56537 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
56538 ;;
56539 *)
56540 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
56541 ;;
56542 esac
56543 }
56544  
56545  
56546 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
56547 func_cc_basename ()
56548 {
56549 for cc_temp in $*""; do
56550 case $cc_temp in
56551 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
56552 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
56553 \-*) ;;
56554 *) break;;
56555 esac
56556 done
56557 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
56558 }
56559  
56560  
56561 # ### END FUNCTIONS SHARED WITH CONFIGURE
56562  
56563 _LT_EOF
56564  
56565 case $host_os in
56566 aix3*)
56567 cat <<\_LT_EOF >> "$cfgfile"
56568 # AIX sometimes has problems with the GCC collect2 program. For some
56569 # reason, if we set the COLLECT_NAMES environment variable, the problems
56570 # vanish in a puff of smoke.
56571 if test set != "${COLLECT_NAMES+set}"; then
56572 COLLECT_NAMES=
56573 export COLLECT_NAMES
56574 fi
56575 _LT_EOF
56576 ;;
56577 esac
56578  
56579  
56580 ltmain=$ac_aux_dir/ltmain.sh
56581  
56582  
56583 # We use sed instead of cat because bash on DJGPP gets confused if
56584 # if finds mixed CR/LF and LF-only lines. Since sed operates in
56585 # text mode, it properly converts lines to CR/LF. This bash problem
56586 # is reportedly fixed, but why not run on old versions too?
56587 sed '$q' "$ltmain" >> "$cfgfile" \
56588 || (rm -f "$cfgfile"; exit 1)
56589  
56590 mv -f "$cfgfile" "$ofile" ||
56591 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
56592 chmod +x "$ofile"
56593  
56594  
56595 cat <<_LT_EOF >> "$ofile"
56596  
56597 # ### BEGIN LIBTOOL TAG CONFIG: CXX
56598  
56599 # The linker used to build libraries.
56600 LD=$lt_LD_CXX
56601  
56602 # How to create reloadable object files.
56603 reload_flag=$lt_reload_flag_CXX
56604 reload_cmds=$lt_reload_cmds_CXX
56605  
56606 # Commands used to build an old-style archive.
56607 old_archive_cmds=$lt_old_archive_cmds_CXX
56608  
56609 # A language specific compiler.
56610 CC=$lt_compiler_CXX
56611  
56612 # Is the compiler the GNU compiler?
56613 with_gcc=$GCC_CXX
56614  
56615 # Compiler flag to turn off builtin functions.
56616 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
56617  
56618 # Additional compiler flags for building library objects.
56619 pic_flag=$lt_lt_prog_compiler_pic_CXX
56620  
56621 # How to pass a linker flag through the compiler.
56622 wl=$lt_lt_prog_compiler_wl_CXX
56623  
56624 # Compiler flag to prevent dynamic linking.
56625 link_static_flag=$lt_lt_prog_compiler_static_CXX
56626  
56627 # Does compiler simultaneously support -c and -o options?
56628 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
56629  
56630 # Whether or not to add -lc for building shared libraries.
56631 build_libtool_need_lc=$archive_cmds_need_lc_CXX
56632  
56633 # Whether or not to disallow shared libs when runtime libs are static.
56634 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
56635  
56636 # Compiler flag to allow reflexive dlopens.
56637 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
56638  
56639 # Compiler flag to generate shared objects directly from archives.
56640 whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
56641  
56642 # Whether the compiler copes with passing no objects directly.
56643 compiler_needs_object=$lt_compiler_needs_object_CXX
56644  
56645 # Create an old-style archive from a shared archive.
56646 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
56647  
56648 # Create a temporary old-style archive to link instead of a shared archive.
56649 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
56650  
56651 # Commands used to build a shared archive.
56652 archive_cmds=$lt_archive_cmds_CXX
56653 archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
56654  
56655 # Commands used to build a loadable module if different from building
56656 # a shared archive.
56657 module_cmds=$lt_module_cmds_CXX
56658 module_expsym_cmds=$lt_module_expsym_cmds_CXX
56659  
56660 # Whether we are building with GNU ld or not.
56661 with_gnu_ld=$lt_with_gnu_ld_CXX
56662  
56663 # Flag that allows shared libraries with undefined symbols to be built.
56664 allow_undefined_flag=$lt_allow_undefined_flag_CXX
56665  
56666 # Flag that enforces no undefined symbols.
56667 no_undefined_flag=$lt_no_undefined_flag_CXX
56668  
56669 # Flag to hardcode \$libdir into a binary during linking.
56670 # This must work even if \$libdir does not exist
56671 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
56672  
56673 # Whether we need a single "-rpath" flag with a separated argument.
56674 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
56675  
56676 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
56677 # DIR into the resulting binary.
56678 hardcode_direct=$hardcode_direct_CXX
56679  
56680 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
56681 # DIR into the resulting binary and the resulting library dependency is
56682 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
56683 # library is relocated.
56684 hardcode_direct_absolute=$hardcode_direct_absolute_CXX
56685  
56686 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
56687 # into the resulting binary.
56688 hardcode_minus_L=$hardcode_minus_L_CXX
56689  
56690 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
56691 # into the resulting binary.
56692 hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
56693  
56694 # Set to "yes" if building a shared library automatically hardcodes DIR
56695 # into the library and all subsequent libraries and executables linked
56696 # against it.
56697 hardcode_automatic=$hardcode_automatic_CXX
56698  
56699 # Set to yes if linker adds runtime paths of dependent libraries
56700 # to runtime path list.
56701 inherit_rpath=$inherit_rpath_CXX
56702  
56703 # Whether libtool must link a program against all its dependency libraries.
56704 link_all_deplibs=$link_all_deplibs_CXX
56705  
56706 # Set to "yes" if exported symbols are required.
56707 always_export_symbols=$always_export_symbols_CXX
56708  
56709 # The commands to list exported symbols.
56710 export_symbols_cmds=$lt_export_symbols_cmds_CXX
56711  
56712 # Symbols that should not be listed in the preloaded symbols.
56713 exclude_expsyms=$lt_exclude_expsyms_CXX
56714  
56715 # Symbols that must always be exported.
56716 include_expsyms=$lt_include_expsyms_CXX
56717  
56718 # Commands necessary for linking programs (against libraries) with templates.
56719 prelink_cmds=$lt_prelink_cmds_CXX
56720  
56721 # Commands necessary for finishing linking programs.
56722 postlink_cmds=$lt_postlink_cmds_CXX
56723  
56724 # Specify filename containing input files.
56725 file_list_spec=$lt_file_list_spec_CXX
56726  
56727 # How to hardcode a shared library path into an executable.
56728 hardcode_action=$hardcode_action_CXX
56729  
56730 # The directories searched by this compiler when creating a shared library.
56731 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
56732  
56733 # Dependencies to place before and after the objects being linked to
56734 # create a shared library.
56735 predep_objects=$lt_predep_objects_CXX
56736 postdep_objects=$lt_postdep_objects_CXX
56737 predeps=$lt_predeps_CXX
56738 postdeps=$lt_postdeps_CXX
56739  
56740 # The library search path used internally by the compiler when linking
56741 # a shared library.
56742 compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
56743  
56744 # ### END LIBTOOL TAG CONFIG: CXX
56745 _LT_EOF
56746  
56747 ;;
56748  
56749 esac
56750 done # for ac_tag
56751  
56752  
56753 as_fn_exit 0
56754 _ACEOF
56755 ac_clean_files=$ac_clean_files_save
56756  
56757 test $ac_write_fail = 0 ||
56758 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
56759  
56760  
56761 # configure is writing to config.log, and then calls config.status.
56762 # config.status does its own redirection, appending to config.log.
56763 # Unfortunately, on DOS this fails, as config.log is still kept open
56764 # by configure, so config.status won't be able to write to it; its
56765 # output is simply discarded. So we exec the FD to /dev/null,
56766 # effectively closing config.log, so it can be properly (re)opened and
56767 # appended to by config.status. When coming back to configure, we
56768 # need to make the FD available again.
56769 if test "$no_create" != yes; then
56770 ac_cs_success=:
56771 ac_config_status_args=
56772 test "$silent" = yes &&
56773 ac_config_status_args="$ac_config_status_args --quiet"
56774 exec 5>/dev/null
56775 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
56776 exec 5>>config.log
56777 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
56778 # would make configure fail if this is the last instruction.
56779 $ac_cs_success || as_fn_exit 1
56780 fi
56781 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
56782 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
56783 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
56784 fi
56785  
56786  
56787  
56788 # Pretty messages
56789  
56790 if test "x$have_gtk" = "xyes"; then
56791 gtk_lib_message=" (with GTK+ v$GTK_VERSION"
56792 if test "x$have_ige_mac" = "xyes"; then
56793 gtk_lib_message="$gtk_lib_message and OS X integration)"
56794 else
56795 gtk_lib_message="$gtk_lib_message)"
56796 fi
56797 fi
56798  
56799 if test "x$have_qt" = "xyes" ; then
56800 enable_wireshark_qt="yes"
56801 qt_lib_message=" (with Qt$qt_version v$QT_VERSION)"
56802 else
56803 enable_wireshark_qt="no"
56804 fi
56805  
56806 if test "x$enable_setcap_install" = "xyes" ; then
56807 setcap_message="yes"
56808 else
56809 setcap_message="no"
56810 fi
56811  
56812 if test "x$enable_setuid_install" = "xyes" ; then
56813 setuid_message="yes"
56814 else
56815 setuid_message="no"
56816 fi
56817  
56818 if test "x$DUMPCAP_GROUP" = "x" ; then
56819 dumpcap_group_message="(none)"
56820 else
56821 dumpcap_group_message="$DUMPCAP_GROUP"
56822 fi
56823  
56824 if test "x$want_zlib" = "xno" ; then
56825 zlib_message="no"
56826 else
56827 zlib_message="yes"
56828 fi
56829  
56830 if test "x$have_lua" = "xyes" ; then
56831 lua_message="yes"
56832 else
56833 lua_message="no"
56834 fi
56835  
56836 if test "x$have_qt_multimedia_lib" = "xyes" ; then
56837 qt_multimedia_message="yes"
56838 else
56839 qt_multimedia_message="no"
56840 fi
56841  
56842 if test "x$want_portaudio" = "xyes" ; then
56843 portaudio_message="yes"
56844 else
56845 portaudio_message="no"
56846 fi
56847  
56848 if test "x$want_ssl" = "xno" ; then
56849 ssl_message="no"
56850 else
56851 ssl_message="yes"
56852 fi
56853  
56854 if test "x$want_krb5" = "xno" ; then
56855 krb5_message="no"
56856 else
56857 krb5_message="yes ($ac_krb5_version)"
56858 fi
56859  
56860 if test "x$have_good_c_ares" = "xyes" ; then
56861 c_ares_message="yes"
56862 else
56863 c_ares_message="no (name resolution will be disabled)"
56864 fi
56865  
56866 if test "x$have_good_libcap" = "xyes" ; then
56867 libcap_message="yes"
56868 else
56869 libcap_message="no"
56870 fi
56871  
56872 if test "x$have_good_geoip" = "xyes" ; then
56873 geoip_message="yes"
56874 else
56875 geoip_message="no"
56876 fi
56877  
56878 if test "x$have_good_libssh" = "xyes" ; then
56879 libssh_message="yes"
56880 else
56881 libssh_message="no"
56882 fi
56883  
56884 if test "x$have_ssh_userauth_agent" = "xyes" ; then
56885 ssh_userauth_agent_message="yes"
56886 else
56887 ssh_userauth_agent_message="no"
56888 fi
56889  
56890 echo ""
56891 echo " CPPFLAGS: $WS_CPPFLAGS $CPPFLAGS"
56892 echo ""
56893 echo " CFLAGS: $WS_CFLAGS $CFLAGS"
56894 echo ""
56895 echo " CXXFLAGS: $WS_CXXFLAGS $CXXFLAGS"
56896 echo ""
56897 echo " LDFLAGS: $WS_LDFLAGS $LDFLAGS"
56898 echo ""
56899 echo " LIBS: $LIBS"
56900  
56901 echo ""
56902 echo "The Wireshark package has been configured with the following options:"
56903 echo " GLib version : v$GLIB_VERSION"
56904 echo " Build wireshark : $enable_wireshark_qt$qt_lib_message"
56905 echo " Build wireshark-gtk : $have_gtk""$gtk_lib_message"
56906 echo " Build tshark : $enable_tshark"
56907 echo " Build tfshark : $enable_tfshark"
56908 echo " Build capinfos : $enable_capinfos"
56909 echo " Build captype : $enable_captype"
56910 echo " Build editcap : $enable_editcap"
56911 echo " Build dumpcap : $enable_dumpcap"
56912 echo " Build mergecap : $enable_mergecap"
56913 echo " Build reordercap : $enable_reordercap"
56914 echo " Build text2pcap : $enable_text2pcap"
56915 echo " Build randpkt : $enable_randpkt"
56916 echo " Build dftest : $enable_dftest"
56917 echo " Build rawshark : $enable_rawshark"
56918 echo " Build androiddump : $enable_androiddump"
56919 echo " Build sshdump : $enable_sshdump"
56920 echo " Build ciscodump : $enable_ciscodump"
56921 echo " Build randpktdump : $enable_randpktdump"
56922 echo " Build echld : $have_echld"
56923 echo ""
56924 echo " Save files as pcap-ng by default : $enable_pcap_ng_default"
56925 echo " Install dumpcap with capabilities : $setcap_message"
56926 echo " Install dumpcap setuid : $setuid_message"
56927 echo " Use dumpcap group : $dumpcap_group_message"
56928 echo " Use plugins : $have_plugins"
56929 echo " Use external capture sources : $have_extcap"
56930 echo " Use Lua library : $lua_message"
56931 echo " Build Qt RTP player : $qt_multimedia_message"
56932 echo " Build GTK+ RTP player : $portaudio_message"
56933 echo " Build profile binaries : $enable_profile_build"
56934 echo " Use pcap library : $want_pcap"
56935 echo " Use zlib library : $zlib_message"
56936 echo " Use kerberos library : $krb5_message"
56937 echo " Use c-ares library : $c_ares_message"
56938 echo " Use SMI MIB library : $libsmi_message"
56939 echo " Use GNU gcrypt library : $gcrypt_message"
56940 echo " Use SSL crypto library : $ssl_message"
56941 echo " Use GnuTLS library : $tls_message"
56942 echo " Use POSIX capabilities library : $libcap_message"
56943 echo " Use GeoIP library : $geoip_message"
56944 echo " Use libssh library : $libssh_message"
56945 echo " Have ssh_userauth_agent : $ssh_userauth_agent_message"
56946 echo " Use nl library : $libnl_message"
56947 echo " Use SBC codec library : $have_sbc"
56948 #echo " Use GDK-Pixbuf with GResource: $have_gresource_pixbuf"