xref: /freebsd/contrib/libpcap/configure (revision d9a42747950146bf03cda7f6e25d219253f8a57a)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for pcap 1.10.3.
4#
5#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7#
8#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
14
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18  emulate sh
19  NULLCMD=:
20  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21  # is contrary to our usage.  Disable this feature.
22  alias -g '${1+"$@"}'='"$@"'
23  setopt NO_GLOB_SUBST
24else
25  case `(set -o) 2>/dev/null` in #(
26  *posix*) :
27    set -o posix ;; #(
28  *) :
29     ;;
30esac
31fi
32
33
34as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45  as_echo='print -r --'
46  as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48  as_echo='printf %s\n'
49  as_echo_n='printf %s'
50else
51  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53    as_echo_n='/usr/ucb/echo -n'
54  else
55    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56    as_echo_n_body='eval
57      arg=$1;
58      case $arg in #(
59      *"$as_nl"*)
60	expr "X$arg" : "X\\(.*\\)$as_nl";
61	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62      esac;
63      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64    '
65    export as_echo_n_body
66    as_echo_n='sh -c $as_echo_n_body as_echo'
67  fi
68  export as_echo_body
69  as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74  PATH_SEPARATOR=:
75  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77      PATH_SEPARATOR=';'
78  }
79fi
80
81
82# IFS
83# We need space, tab and new line, in precisely that order.  Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
87IFS=" ""	$as_nl"
88
89# Find who we are.  Look in the path if we contain no directory separator.
90as_myself=
91case $0 in #((
92  *[\\/]* ) as_myself=$0 ;;
93  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96  IFS=$as_save_IFS
97  test -z "$as_dir" && as_dir=.
98    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99  done
100IFS=$as_save_IFS
101
102     ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107  as_myself=$0
108fi
109if test ! -f "$as_myself"; then
110  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111  exit 1
112fi
113
114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there.  '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121done
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
131
132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135# Use a proper internal environment variable to ensure we don't fall
136  # into an infinite loop, continuously re-executing ourselves.
137  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138    _as_can_reexec=no; export _as_can_reexec;
139    # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147  *v*x* | *x*v* ) as_opts=-vx ;;
148  *v* ) as_opts=-v ;;
149  *x* ) as_opts=-x ;;
150  * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157  fi
158  # We don't want this to propagate to other subprocesses.
159          { _as_can_reexec=; unset _as_can_reexec;}
160if test "x$CONFIG_SHELL" = x; then
161  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162  emulate sh
163  NULLCMD=:
164  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165  # is contrary to our usage.  Disable this feature.
166  alias -g '\${1+\"\$@\"}'='\"\$@\"'
167  setopt NO_GLOB_SUBST
168else
169  case \`(set -o) 2>/dev/null\` in #(
170  *posix*) :
171    set -o posix ;; #(
172  *) :
173     ;;
174esac
175fi
176"
177  as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191  exitcode=1; echo positional parameters were not saved.
192fi
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
195  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200  if (eval "$as_required") 2>/dev/null; then :
201  as_have_required=yes
202else
203  as_have_required=no
204fi
205  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211do
212  IFS=$as_save_IFS
213  test -z "$as_dir" && as_dir=.
214  as_found=:
215  case $as_dir in #(
216	 /*)
217	   for as_base in sh bash ksh sh5; do
218	     # Try only shells that exist, to save several forks.
219	     as_shell=$as_dir/$as_base
220	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222  CONFIG_SHELL=$as_shell as_have_required=yes
223		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224  break 2
225fi
226fi
227	   done;;
228       esac
229  as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233  CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238      if test "x$CONFIG_SHELL" != x; then :
239  export CONFIG_SHELL
240             # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248  *v*x* | *x*v* ) as_opts=-vx ;;
249  *v* ) as_opts=-v ;;
250  *x* ) as_opts=-x ;;
251  * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
258fi
259
260    if test x$as_have_required = xno; then :
261  $as_echo "$0: This script requires a shell more modern than all"
262  $as_echo "$0: the shells that I found on your system."
263  if test x${ZSH_VERSION+set} = xset ; then
264    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266  else
267    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
271  fi
272  exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290  { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299  return $1
300} # as_fn_set_status
301
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307  set +e
308  as_fn_set_status $1
309  exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318  case $as_dir in #(
319  -*) as_dir=./$as_dir;;
320  esac
321  test -d "$as_dir" || eval $as_mkdir_p || {
322    as_dirs=
323    while :; do
324      case $as_dir in #(
325      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326      *) as_qdir=$as_dir;;
327      esac
328      as_dirs="'$as_qdir' $as_dirs"
329      as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331	 X"$as_dir" : 'X\(//\)[^/]' \| \
332	 X"$as_dir" : 'X\(//\)$' \| \
333	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336	    s//\1/
337	    q
338	  }
339	  /^X\(\/\/\)[^/].*/{
340	    s//\1/
341	    q
342	  }
343	  /^X\(\/\/\)$/{
344	    s//\1/
345	    q
346	  }
347	  /^X\(\/\).*/{
348	    s//\1/
349	    q
350	  }
351	  s/.*/./; q'`
352      test -d "$as_dir" && break
353    done
354    test -z "$as_dirs" || eval "mkdir $as_dirs"
355  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358} # as_fn_mkdir_p
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365  test -f "$1" && test -x "$1"
366} # as_fn_executable_p
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374  eval 'as_fn_append ()
375  {
376    eval $1+=\$2
377  }'
378else
379  as_fn_append ()
380  {
381    eval $1=\$$1\$2
382  }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391  eval 'as_fn_arith ()
392  {
393    as_val=$(( $* ))
394  }'
395else
396  as_fn_arith ()
397  {
398    as_val=`expr "$@" || test $? -eq 1`
399  }
400fi # as_fn_arith
401
402
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407# script with STATUS, using 1 if that was 0.
408as_fn_error ()
409{
410  as_status=$1; test $as_status -eq 0 && as_status=1
411  if test "$4"; then
412    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414  fi
415  $as_echo "$as_me: error: $2" >&2
416  as_fn_exit $as_status
417} # as_fn_error
418
419if expr a : '\(a\)' >/dev/null 2>&1 &&
420   test "X`expr 00001 : '.*\(...\)'`" = X001; then
421  as_expr=expr
422else
423  as_expr=false
424fi
425
426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427  as_basename=basename
428else
429  as_basename=false
430fi
431
432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433  as_dirname=dirname
434else
435  as_dirname=false
436fi
437
438as_me=`$as_basename -- "$0" ||
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440	 X"$0" : 'X\(//\)$' \| \
441	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442$as_echo X/"$0" |
443    sed '/^.*\/\([^/][^/]*\)\/*$/{
444	    s//\1/
445	    q
446	  }
447	  /^X\/\(\/\/\)$/{
448	    s//\1/
449	    q
450	  }
451	  /^X\/\(\/\).*/{
452	    s//\1/
453	    q
454	  }
455	  s/.*/./; q'`
456
457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465  as_lineno_1=$LINENO as_lineno_1a=$LINENO
466  as_lineno_2=$LINENO as_lineno_2a=$LINENO
467  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
470  sed -n '
471    p
472    /[$]LINENO/=
473  ' <$as_myself |
474    sed '
475      s/[$]LINENO.*/&-/
476      t lineno
477      b
478      :lineno
479      N
480      :loop
481      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482      t loop
483      s/-\n.*//
484    ' >$as_me.lineno &&
485  chmod +x "$as_me.lineno" ||
486    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489  # already done that, so ensure we don't try to do so again and fall
490  # in an infinite loop.  This has already happened in practice.
491  _as_can_reexec=no; export _as_can_reexec
492  # Don't try to exec as it changes $[0], causing all sort of problems
493  # (the dirname of $[0] is not the place where we might find the
494  # original and so on.  Autoconf is especially sensitive to this).
495  . "./$as_me.lineno"
496  # Exit status is that of the last command.
497  exit
498}
499
500ECHO_C= ECHO_N= ECHO_T=
501case `echo -n x` in #(((((
502-n*)
503  case `echo 'xy\c'` in
504  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
505  xy)  ECHO_C='\c';;
506  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
507       ECHO_T='	';;
508  esac;;
509*)
510  ECHO_N='-n';;
511esac
512
513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515  rm -f conf$$.dir/conf$$.file
516else
517  rm -f conf$$.dir
518  mkdir conf$$.dir 2>/dev/null
519fi
520if (echo >conf$$.file) 2>/dev/null; then
521  if ln -s conf$$.file conf$$ 2>/dev/null; then
522    as_ln_s='ln -s'
523    # ... but there are two gotchas:
524    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526    # In both cases, we have to default to `cp -pR'.
527    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528      as_ln_s='cp -pR'
529  elif ln conf$$.file conf$$ 2>/dev/null; then
530    as_ln_s=ln
531  else
532    as_ln_s='cp -pR'
533  fi
534else
535  as_ln_s='cp -pR'
536fi
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
539
540if mkdir -p . 2>/dev/null; then
541  as_mkdir_p='mkdir -p "$as_dir"'
542else
543  test -d ./-p && rmdir ./-p
544  as_mkdir_p=false
545fi
546
547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
559
560# Name of the host.
561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565#
566# Initializations.
567#
568ac_default_prefix=/usr/local
569ac_clean_files=
570ac_config_libobj_dir=.
571LIBOBJS=
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
576
577# Identity of this package.
578PACKAGE_NAME='pcap'
579PACKAGE_TARNAME='pcap'
580PACKAGE_VERSION='1.10.3'
581PACKAGE_STRING='pcap 1.10.3'
582PACKAGE_BUGREPORT=''
583PACKAGE_URL=''
584
585ac_unique_file="pcap.c"
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
589#ifdef HAVE_SYS_TYPES_H
590# include <sys/types.h>
591#endif
592#ifdef HAVE_SYS_STAT_H
593# include <sys/stat.h>
594#endif
595#ifdef STDC_HEADERS
596# include <stdlib.h>
597# include <stddef.h>
598#else
599# ifdef HAVE_STDLIB_H
600#  include <stdlib.h>
601# endif
602#endif
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605#  include <memory.h>
606# endif
607# include <string.h>
608#endif
609#ifdef HAVE_STRINGS_H
610# include <strings.h>
611#endif
612#ifdef HAVE_INTTYPES_H
613# include <inttypes.h>
614#endif
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
619# include <unistd.h>
620#endif"
621
622ac_subst_vars='LTLIBOBJS
623RPCAPD_LIBS
624INSTALL_RPCAPD
625BUILD_RPCAPD
626PTHREAD_LIBS
627REMOTE_C_SRC
628MODULE_C_SRC
629PLATFORM_CXX_SRC
630PLATFORM_C_SRC
631ADDLARCHIVEOBJS
632ADDLOBJS
633RPATH
634V_SONAME_OPT
635V_SHLIB_OPT
636V_SHLIB_CMD
637V_SHLIB_CCOPT
638INSTALL_DATA
639INSTALL_SCRIPT
640INSTALL_PROGRAM
641PCAP_SUPPORT_RDMASNIFF
642LIBIBVERBS_LIBS_STATIC
643LIBIBVERBS_LIBS
644LIBIBVERBS_CFLAGS
645PCAP_SUPPORT_DBUS
646DBUS_LIBS_STATIC
647DBUS_LIBS
648DBUS_CFLAGS
649PCAP_SUPPORT_BT
650PCAP_SUPPORT_DPDK
651DPDK_LIBS_STATIC
652DPDK_LIBS
653DPDK_CFLAGS
654PCAP_SUPPORT_NETMAP
655PCAP_SUPPORT_NETFILTER
656PCAP_SUPPORT_LINUX_USBMON
657MKDEP
658DEPENDENCY_CFLAG
659LN_S
660AR
661RANLIB
662MAN_ADMIN_COMMANDS
663MAN_MISC_INFO
664MAN_FILE_FORMATS
665MAN_DEVICES
666DYEXT
667V_PROG_LDFLAGS_FAT
668V_PROG_CCOPT_FAT
669V_LIB_LDFLAGS_FAT
670V_LIB_CCOPT_FAT
671REENTRANT_PARSER
672BISON_BYACC
673LEXLIB
674LEX_OUTPUT_ROOT
675LEX
676OPENSSL_LIBS_STATIC
677OPENSSL_LIBS
678OPENSSL_CFLAGS
679LIBNL_LIBS_STATIC
680LIBNL_LIBS
681LIBNL_CFLAGS
682BREW
683PKG_CONFIG_LIBDIR
684PKG_CONFIG_PATH
685PKG_CONFIG
686VALGRINDTEST_SRC
687LIBOBJS
688ac_ct_CXX
689CXXFLAGS
690CXX
691EGREP
692GREP
693CPP
694OBJEXT
695EXEEXT
696ac_ct_CC
697CPPFLAGS
698LDFLAGS
699CFLAGS
700CC
701SHLICC2
702target_os
703target_vendor
704target_cpu
705target
706host_os
707host_vendor
708host_cpu
709host
710build_os
711build_vendor
712build_cpu
713build
714LIBS_PRIVATE
715REQUIRES_PRIVATE
716LIBS_STATIC
717V_INCLS
718V_DEFS
719V_CCOPT
720target_alias
721host_alias
722build_alias
723LIBS
724ECHO_T
725ECHO_N
726ECHO_C
727DEFS
728mandir
729localedir
730libdir
731psdir
732pdfdir
733dvidir
734htmldir
735infodir
736docdir
737oldincludedir
738includedir
739localstatedir
740sharedstatedir
741sysconfdir
742datadir
743datarootdir
744libexecdir
745sbindir
746bindir
747program_transform_name
748prefix
749exec_prefix
750PACKAGE_URL
751PACKAGE_BUGREPORT
752PACKAGE_STRING
753PACKAGE_VERSION
754PACKAGE_TARNAME
755PACKAGE_NAME
756PATH_SEPARATOR
757SHELL'
758ac_subst_files=''
759ac_user_opts='
760enable_option_checking
761with_gcc
762enable_largefile
763enable_protochain
764with_pcap
765with_libnl
766enable_ipv6
767with_dag
768with_dag_includes
769with_dag_libraries
770with_septel
771with_snf
772with_snf_includes
773with_snf_libraries
774with_turbocap
775enable_remote
776enable_optimizer_dbg
777enable_yydebug
778enable_universal
779enable_shared
780enable_usb
781enable_netmap
782with_dpdk
783enable_bluetooth
784enable_dbus
785enable_rdma
786'
787      ac_precious_vars='build_alias
788host_alias
789target_alias
790CC
791CFLAGS
792LDFLAGS
793LIBS
794CPPFLAGS
795CPP
796CXX
797CXXFLAGS
798CCC
799PKG_CONFIG
800PKG_CONFIG_PATH
801PKG_CONFIG_LIBDIR
802LIBNL_CFLAGS
803LIBNL_LIBS
804LIBNL_LIBS_STATIC
805OPENSSL_CFLAGS
806OPENSSL_LIBS
807OPENSSL_LIBS_STATIC
808DPDK_CFLAGS
809DPDK_LIBS
810DPDK_LIBS_STATIC
811DBUS_CFLAGS
812DBUS_LIBS
813DBUS_LIBS_STATIC
814LIBIBVERBS_CFLAGS
815LIBIBVERBS_LIBS
816LIBIBVERBS_LIBS_STATIC'
817
818
819# Initialize some variables set by options.
820ac_init_help=
821ac_init_version=false
822ac_unrecognized_opts=
823ac_unrecognized_sep=
824# The variables have the same names as the options, with
825# dashes changed to underlines.
826cache_file=/dev/null
827exec_prefix=NONE
828no_create=
829no_recursion=
830prefix=NONE
831program_prefix=NONE
832program_suffix=NONE
833program_transform_name=s,x,x,
834silent=
835site=
836srcdir=
837verbose=
838x_includes=NONE
839x_libraries=NONE
840
841# Installation directory options.
842# These are left unexpanded so users can "make install exec_prefix=/foo"
843# and all the variables that are supposed to be based on exec_prefix
844# by default will actually change.
845# Use braces instead of parens because sh, perl, etc. also accept them.
846# (The list follows the same order as the GNU Coding Standards.)
847bindir='${exec_prefix}/bin'
848sbindir='${exec_prefix}/sbin'
849libexecdir='${exec_prefix}/libexec'
850datarootdir='${prefix}/share'
851datadir='${datarootdir}'
852sysconfdir='${prefix}/etc'
853sharedstatedir='${prefix}/com'
854localstatedir='${prefix}/var'
855includedir='${prefix}/include'
856oldincludedir='/usr/include'
857docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
858infodir='${datarootdir}/info'
859htmldir='${docdir}'
860dvidir='${docdir}'
861pdfdir='${docdir}'
862psdir='${docdir}'
863libdir='${exec_prefix}/lib'
864localedir='${datarootdir}/locale'
865mandir='${datarootdir}/man'
866
867ac_prev=
868ac_dashdash=
869for ac_option
870do
871  # If the previous option needs an argument, assign it.
872  if test -n "$ac_prev"; then
873    eval $ac_prev=\$ac_option
874    ac_prev=
875    continue
876  fi
877
878  case $ac_option in
879  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
880  *=)   ac_optarg= ;;
881  *)    ac_optarg=yes ;;
882  esac
883
884  # Accept the important Cygnus configure options, so we can diagnose typos.
885
886  case $ac_dashdash$ac_option in
887  --)
888    ac_dashdash=yes ;;
889
890  -bindir | --bindir | --bindi | --bind | --bin | --bi)
891    ac_prev=bindir ;;
892  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
893    bindir=$ac_optarg ;;
894
895  -build | --build | --buil | --bui | --bu)
896    ac_prev=build_alias ;;
897  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
898    build_alias=$ac_optarg ;;
899
900  -cache-file | --cache-file | --cache-fil | --cache-fi \
901  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
902    ac_prev=cache_file ;;
903  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
904  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
905    cache_file=$ac_optarg ;;
906
907  --config-cache | -C)
908    cache_file=config.cache ;;
909
910  -datadir | --datadir | --datadi | --datad)
911    ac_prev=datadir ;;
912  -datadir=* | --datadir=* | --datadi=* | --datad=*)
913    datadir=$ac_optarg ;;
914
915  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
916  | --dataroo | --dataro | --datar)
917    ac_prev=datarootdir ;;
918  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
919  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
920    datarootdir=$ac_optarg ;;
921
922  -disable-* | --disable-*)
923    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
924    # Reject names that are not valid shell variable names.
925    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
926      as_fn_error $? "invalid feature name: $ac_useropt"
927    ac_useropt_orig=$ac_useropt
928    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
929    case $ac_user_opts in
930      *"
931"enable_$ac_useropt"
932"*) ;;
933      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
934	 ac_unrecognized_sep=', ';;
935    esac
936    eval enable_$ac_useropt=no ;;
937
938  -docdir | --docdir | --docdi | --doc | --do)
939    ac_prev=docdir ;;
940  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
941    docdir=$ac_optarg ;;
942
943  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
944    ac_prev=dvidir ;;
945  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
946    dvidir=$ac_optarg ;;
947
948  -enable-* | --enable-*)
949    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
950    # Reject names that are not valid shell variable names.
951    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
952      as_fn_error $? "invalid feature name: $ac_useropt"
953    ac_useropt_orig=$ac_useropt
954    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
955    case $ac_user_opts in
956      *"
957"enable_$ac_useropt"
958"*) ;;
959      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
960	 ac_unrecognized_sep=', ';;
961    esac
962    eval enable_$ac_useropt=\$ac_optarg ;;
963
964  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
965  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
966  | --exec | --exe | --ex)
967    ac_prev=exec_prefix ;;
968  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
969  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
970  | --exec=* | --exe=* | --ex=*)
971    exec_prefix=$ac_optarg ;;
972
973  -gas | --gas | --ga | --g)
974    # Obsolete; use --with-gas.
975    with_gas=yes ;;
976
977  -help | --help | --hel | --he | -h)
978    ac_init_help=long ;;
979  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
980    ac_init_help=recursive ;;
981  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
982    ac_init_help=short ;;
983
984  -host | --host | --hos | --ho)
985    ac_prev=host_alias ;;
986  -host=* | --host=* | --hos=* | --ho=*)
987    host_alias=$ac_optarg ;;
988
989  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
990    ac_prev=htmldir ;;
991  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
992  | --ht=*)
993    htmldir=$ac_optarg ;;
994
995  -includedir | --includedir | --includedi | --included | --include \
996  | --includ | --inclu | --incl | --inc)
997    ac_prev=includedir ;;
998  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
999  | --includ=* | --inclu=* | --incl=* | --inc=*)
1000    includedir=$ac_optarg ;;
1001
1002  -infodir | --infodir | --infodi | --infod | --info | --inf)
1003    ac_prev=infodir ;;
1004  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1005    infodir=$ac_optarg ;;
1006
1007  -libdir | --libdir | --libdi | --libd)
1008    ac_prev=libdir ;;
1009  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1010    libdir=$ac_optarg ;;
1011
1012  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1013  | --libexe | --libex | --libe)
1014    ac_prev=libexecdir ;;
1015  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1016  | --libexe=* | --libex=* | --libe=*)
1017    libexecdir=$ac_optarg ;;
1018
1019  -localedir | --localedir | --localedi | --localed | --locale)
1020    ac_prev=localedir ;;
1021  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1022    localedir=$ac_optarg ;;
1023
1024  -localstatedir | --localstatedir | --localstatedi | --localstated \
1025  | --localstate | --localstat | --localsta | --localst | --locals)
1026    ac_prev=localstatedir ;;
1027  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1028  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1029    localstatedir=$ac_optarg ;;
1030
1031  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1032    ac_prev=mandir ;;
1033  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1034    mandir=$ac_optarg ;;
1035
1036  -nfp | --nfp | --nf)
1037    # Obsolete; use --without-fp.
1038    with_fp=no ;;
1039
1040  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1041  | --no-cr | --no-c | -n)
1042    no_create=yes ;;
1043
1044  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1045  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1046    no_recursion=yes ;;
1047
1048  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1049  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1050  | --oldin | --oldi | --old | --ol | --o)
1051    ac_prev=oldincludedir ;;
1052  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1053  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1054  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1055    oldincludedir=$ac_optarg ;;
1056
1057  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1058    ac_prev=prefix ;;
1059  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1060    prefix=$ac_optarg ;;
1061
1062  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1063  | --program-pre | --program-pr | --program-p)
1064    ac_prev=program_prefix ;;
1065  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1066  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1067    program_prefix=$ac_optarg ;;
1068
1069  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1070  | --program-suf | --program-su | --program-s)
1071    ac_prev=program_suffix ;;
1072  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1073  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1074    program_suffix=$ac_optarg ;;
1075
1076  -program-transform-name | --program-transform-name \
1077  | --program-transform-nam | --program-transform-na \
1078  | --program-transform-n | --program-transform- \
1079  | --program-transform | --program-transfor \
1080  | --program-transfo | --program-transf \
1081  | --program-trans | --program-tran \
1082  | --progr-tra | --program-tr | --program-t)
1083    ac_prev=program_transform_name ;;
1084  -program-transform-name=* | --program-transform-name=* \
1085  | --program-transform-nam=* | --program-transform-na=* \
1086  | --program-transform-n=* | --program-transform-=* \
1087  | --program-transform=* | --program-transfor=* \
1088  | --program-transfo=* | --program-transf=* \
1089  | --program-trans=* | --program-tran=* \
1090  | --progr-tra=* | --program-tr=* | --program-t=*)
1091    program_transform_name=$ac_optarg ;;
1092
1093  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1094    ac_prev=pdfdir ;;
1095  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1096    pdfdir=$ac_optarg ;;
1097
1098  -psdir | --psdir | --psdi | --psd | --ps)
1099    ac_prev=psdir ;;
1100  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1101    psdir=$ac_optarg ;;
1102
1103  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1104  | -silent | --silent | --silen | --sile | --sil)
1105    silent=yes ;;
1106
1107  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1108    ac_prev=sbindir ;;
1109  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1110  | --sbi=* | --sb=*)
1111    sbindir=$ac_optarg ;;
1112
1113  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1114  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1115  | --sharedst | --shareds | --shared | --share | --shar \
1116  | --sha | --sh)
1117    ac_prev=sharedstatedir ;;
1118  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1119  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1120  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1121  | --sha=* | --sh=*)
1122    sharedstatedir=$ac_optarg ;;
1123
1124  -site | --site | --sit)
1125    ac_prev=site ;;
1126  -site=* | --site=* | --sit=*)
1127    site=$ac_optarg ;;
1128
1129  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1130    ac_prev=srcdir ;;
1131  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1132    srcdir=$ac_optarg ;;
1133
1134  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1135  | --syscon | --sysco | --sysc | --sys | --sy)
1136    ac_prev=sysconfdir ;;
1137  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1138  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1139    sysconfdir=$ac_optarg ;;
1140
1141  -target | --target | --targe | --targ | --tar | --ta | --t)
1142    ac_prev=target_alias ;;
1143  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1144    target_alias=$ac_optarg ;;
1145
1146  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1147    verbose=yes ;;
1148
1149  -version | --version | --versio | --versi | --vers | -V)
1150    ac_init_version=: ;;
1151
1152  -with-* | --with-*)
1153    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1154    # Reject names that are not valid shell variable names.
1155    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1156      as_fn_error $? "invalid package name: $ac_useropt"
1157    ac_useropt_orig=$ac_useropt
1158    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1159    case $ac_user_opts in
1160      *"
1161"with_$ac_useropt"
1162"*) ;;
1163      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1164	 ac_unrecognized_sep=', ';;
1165    esac
1166    eval with_$ac_useropt=\$ac_optarg ;;
1167
1168  -without-* | --without-*)
1169    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1170    # Reject names that are not valid shell variable names.
1171    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1172      as_fn_error $? "invalid package name: $ac_useropt"
1173    ac_useropt_orig=$ac_useropt
1174    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1175    case $ac_user_opts in
1176      *"
1177"with_$ac_useropt"
1178"*) ;;
1179      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1180	 ac_unrecognized_sep=', ';;
1181    esac
1182    eval with_$ac_useropt=no ;;
1183
1184  --x)
1185    # Obsolete; use --with-x.
1186    with_x=yes ;;
1187
1188  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1189  | --x-incl | --x-inc | --x-in | --x-i)
1190    ac_prev=x_includes ;;
1191  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1192  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1193    x_includes=$ac_optarg ;;
1194
1195  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1196  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1197    ac_prev=x_libraries ;;
1198  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1199  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1200    x_libraries=$ac_optarg ;;
1201
1202  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1203Try \`$0 --help' for more information"
1204    ;;
1205
1206  *=*)
1207    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1208    # Reject names that are not valid shell variable names.
1209    case $ac_envvar in #(
1210      '' | [0-9]* | *[!_$as_cr_alnum]* )
1211      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1212    esac
1213    eval $ac_envvar=\$ac_optarg
1214    export $ac_envvar ;;
1215
1216  *)
1217    # FIXME: should be removed in autoconf 3.0.
1218    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1219    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1220      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1221    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1222    ;;
1223
1224  esac
1225done
1226
1227if test -n "$ac_prev"; then
1228  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1229  as_fn_error $? "missing argument to $ac_option"
1230fi
1231
1232if test -n "$ac_unrecognized_opts"; then
1233  case $enable_option_checking in
1234    no) ;;
1235    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1236    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1237  esac
1238fi
1239
1240# Check all directory arguments for consistency.
1241for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1242		datadir sysconfdir sharedstatedir localstatedir includedir \
1243		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1244		libdir localedir mandir
1245do
1246  eval ac_val=\$$ac_var
1247  # Remove trailing slashes.
1248  case $ac_val in
1249    */ )
1250      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1251      eval $ac_var=\$ac_val;;
1252  esac
1253  # Be sure to have absolute directory names.
1254  case $ac_val in
1255    [\\/$]* | ?:[\\/]* )  continue;;
1256    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1257  esac
1258  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1259done
1260
1261# There might be people who depend on the old broken behavior: `$host'
1262# used to hold the argument of --host etc.
1263# FIXME: To remove some day.
1264build=$build_alias
1265host=$host_alias
1266target=$target_alias
1267
1268# FIXME: To remove some day.
1269if test "x$host_alias" != x; then
1270  if test "x$build_alias" = x; then
1271    cross_compiling=maybe
1272  elif test "x$build_alias" != "x$host_alias"; then
1273    cross_compiling=yes
1274  fi
1275fi
1276
1277ac_tool_prefix=
1278test -n "$host_alias" && ac_tool_prefix=$host_alias-
1279
1280test "$silent" = yes && exec 6>/dev/null
1281
1282
1283ac_pwd=`pwd` && test -n "$ac_pwd" &&
1284ac_ls_di=`ls -di .` &&
1285ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1286  as_fn_error $? "working directory cannot be determined"
1287test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1288  as_fn_error $? "pwd does not report name of working directory"
1289
1290
1291# Find the source files, if location was not specified.
1292if test -z "$srcdir"; then
1293  ac_srcdir_defaulted=yes
1294  # Try the directory containing this script, then the parent directory.
1295  ac_confdir=`$as_dirname -- "$as_myself" ||
1296$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1297	 X"$as_myself" : 'X\(//\)[^/]' \| \
1298	 X"$as_myself" : 'X\(//\)$' \| \
1299	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1300$as_echo X"$as_myself" |
1301    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1302	    s//\1/
1303	    q
1304	  }
1305	  /^X\(\/\/\)[^/].*/{
1306	    s//\1/
1307	    q
1308	  }
1309	  /^X\(\/\/\)$/{
1310	    s//\1/
1311	    q
1312	  }
1313	  /^X\(\/\).*/{
1314	    s//\1/
1315	    q
1316	  }
1317	  s/.*/./; q'`
1318  srcdir=$ac_confdir
1319  if test ! -r "$srcdir/$ac_unique_file"; then
1320    srcdir=..
1321  fi
1322else
1323  ac_srcdir_defaulted=no
1324fi
1325if test ! -r "$srcdir/$ac_unique_file"; then
1326  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1327  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1328fi
1329ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1330ac_abs_confdir=`(
1331	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1332	pwd)`
1333# When building in place, set srcdir=.
1334if test "$ac_abs_confdir" = "$ac_pwd"; then
1335  srcdir=.
1336fi
1337# Remove unnecessary trailing slashes from srcdir.
1338# Double slashes in file names in object file debugging info
1339# mess up M-x gdb in Emacs.
1340case $srcdir in
1341*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1342esac
1343for ac_var in $ac_precious_vars; do
1344  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1345  eval ac_env_${ac_var}_value=\$${ac_var}
1346  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1347  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1348done
1349
1350#
1351# Report the --help message.
1352#
1353if test "$ac_init_help" = "long"; then
1354  # Omit some internal or obsolete options to make the list less imposing.
1355  # This message is too long to be a string in the A/UX 3.1 sh.
1356  cat <<_ACEOF
1357\`configure' configures pcap 1.10.3 to adapt to many kinds of systems.
1358
1359Usage: $0 [OPTION]... [VAR=VALUE]...
1360
1361To assign environment variables (e.g., CC, CFLAGS...), specify them as
1362VAR=VALUE.  See below for descriptions of some of the useful variables.
1363
1364Defaults for the options are specified in brackets.
1365
1366Configuration:
1367  -h, --help              display this help and exit
1368      --help=short        display options specific to this package
1369      --help=recursive    display the short help of all the included packages
1370  -V, --version           display version information and exit
1371  -q, --quiet, --silent   do not print \`checking ...' messages
1372      --cache-file=FILE   cache test results in FILE [disabled]
1373  -C, --config-cache      alias for \`--cache-file=config.cache'
1374  -n, --no-create         do not create output files
1375      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1376
1377Installation directories:
1378  --prefix=PREFIX         install architecture-independent files in PREFIX
1379                          [$ac_default_prefix]
1380  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1381                          [PREFIX]
1382
1383By default, \`make install' will install all the files in
1384\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1385an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1386for instance \`--prefix=\$HOME'.
1387
1388For better control, use the options below.
1389
1390Fine tuning of the installation directories:
1391  --bindir=DIR            user executables [EPREFIX/bin]
1392  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1393  --libexecdir=DIR        program executables [EPREFIX/libexec]
1394  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1395  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1396  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1397  --libdir=DIR            object code libraries [EPREFIX/lib]
1398  --includedir=DIR        C header files [PREFIX/include]
1399  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1400  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1401  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1402  --infodir=DIR           info documentation [DATAROOTDIR/info]
1403  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1404  --mandir=DIR            man documentation [DATAROOTDIR/man]
1405  --docdir=DIR            documentation root [DATAROOTDIR/doc/pcap]
1406  --htmldir=DIR           html documentation [DOCDIR]
1407  --dvidir=DIR            dvi documentation [DOCDIR]
1408  --pdfdir=DIR            pdf documentation [DOCDIR]
1409  --psdir=DIR             ps documentation [DOCDIR]
1410_ACEOF
1411
1412  cat <<\_ACEOF
1413
1414System types:
1415  --build=BUILD     configure for building on BUILD [guessed]
1416  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1417  --target=TARGET   configure for building compilers for TARGET [HOST]
1418_ACEOF
1419fi
1420
1421if test -n "$ac_init_help"; then
1422  case $ac_init_help in
1423     short | recursive ) echo "Configuration of pcap 1.10.3:";;
1424   esac
1425  cat <<\_ACEOF
1426
1427Optional Features:
1428  --disable-option-checking  ignore unrecognized --enable/--with options
1429  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1430  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1431  --disable-largefile     omit support for large files
1432  --disable-protochain    disable \"protochain\" insn
1433  --enable-ipv6           build IPv6-capable version [default=yes]
1434  --enable-remote         enable remote packet capture [default=no]
1435  --enable-optimizer-dbg  build optimizer debugging code
1436  --enable-yydebug        build parser debugging code
1437  --disable-universal     don't build universal on macOS
1438  --enable-shared         build shared libraries [default=yes, if support
1439                          available]
1440  --enable-usb            enable Linux usbmon USB capture support
1441                          [default=yes, if support available]
1442  --enable-netmap         enable netmap support [default=yes, if support
1443                          available]
1444  --enable-bluetooth      enable Bluetooth support [default=yes, if support
1445                          available]
1446  --enable-dbus           enable D-Bus capture support [default=yes, if
1447                          support available]
1448  --enable-rdma           enable RDMA capture support [default=yes, if support
1449                          available]
1450
1451Optional Packages:
1452  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1453  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1454  --without-gcc           don't use gcc
1455  --with-pcap=TYPE        use packet capture TYPE
1456  --without-libnl         disable libnl support [default=yes, on Linux, if
1457                          present]
1458  --with-dag[=DIR]        include Endace DAG support (located in directory
1459                          DIR, if supplied). [default=yes, if present]
1460  --with-dag-includes=IDIR
1461                          Endace DAG include directory, if not DIR/include
1462  --with-dag-libraries=LDIR
1463                          Endace DAG library directory, if not DIR/lib
1464  --with-septel[=DIR]     include Septel support (located in directory DIR, if
1465                          supplied). [default=yes, if present]
1466  --with-snf[=DIR]        include Myricom SNF support (located in directory
1467                          DIR, if supplied). [default=yes, if present]
1468  --with-snf-includes=IDIR
1469                          Myricom SNF include directory, if not DIR/include
1470  --with-snf-libraries=LDIR
1471                          Myricom SNF library directory, if not DIR/lib
1472  --with-turbocap[=DIR]   include Riverbed TurboCap support (located in
1473                          directory DIR, if supplied). [default=yes, if
1474                          present]
1475  --with-dpdk[=DIR]       include DPDK support (located in directory DIR, if
1476                          supplied). [default=yes, if present]
1477
1478Some influential environment variables:
1479  CC          C compiler command
1480  CFLAGS      C compiler flags
1481  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1482              nonstandard directory <lib dir>
1483  LIBS        libraries to pass to the linker, e.g. -l<library>
1484  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1485              you have headers in a nonstandard directory <include dir>
1486  CPP         C preprocessor
1487  CXX         C++ compiler command
1488  CXXFLAGS    C++ compiler flags
1489  PKG_CONFIG  path to pkg-config utility
1490  PKG_CONFIG_PATH
1491              directories to add to pkg-config's search path
1492  PKG_CONFIG_LIBDIR
1493              path overriding pkg-config's built-in search path
1494  LIBNL_CFLAGS
1495              C compiler flags for libnl-genl-3.0, overriding pkg-config
1496  LIBNL_LIBS  linker flags for libnl-genl-3.0, overriding pkg-config
1497  LIBNL_LIBS_STATIC
1498              static-link linker flags for libnl-genl-3.0, overriding
1499              pkg-config
1500  OPENSSL_CFLAGS
1501              C compiler flags for openssl, overriding pkg-config
1502  OPENSSL_LIBS
1503              linker flags for openssl, overriding pkg-config
1504  OPENSSL_LIBS_STATIC
1505              static-link linker flags for openssl, overriding pkg-config
1506  DPDK_CFLAGS C compiler flags for libdpdk, overriding pkg-config
1507  DPDK_LIBS   linker flags for libdpdk, overriding pkg-config
1508  DPDK_LIBS_STATIC
1509              static-link linker flags for libdpdk, overriding pkg-config
1510  DBUS_CFLAGS C compiler flags for dbus-1, overriding pkg-config
1511  DBUS_LIBS   linker flags for dbus-1, overriding pkg-config
1512  DBUS_LIBS_STATIC
1513              static-link linker flags for dbus-1, overriding pkg-config
1514  LIBIBVERBS_CFLAGS
1515              C compiler flags for libibverbs, overriding pkg-config
1516  LIBIBVERBS_LIBS
1517              linker flags for libibverbs, overriding pkg-config
1518  LIBIBVERBS_LIBS_STATIC
1519              static-link linker flags for libibverbs, overriding pkg-config
1520
1521Use these variables to override the choices made by `configure' or to help
1522it to find libraries and programs with nonstandard names/locations.
1523
1524Report bugs to the package provider.
1525_ACEOF
1526ac_status=$?
1527fi
1528
1529if test "$ac_init_help" = "recursive"; then
1530  # If there are subdirs, report their specific --help.
1531  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1532    test -d "$ac_dir" ||
1533      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1534      continue
1535    ac_builddir=.
1536
1537case "$ac_dir" in
1538.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1539*)
1540  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1541  # A ".." for each directory in $ac_dir_suffix.
1542  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1543  case $ac_top_builddir_sub in
1544  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1545  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1546  esac ;;
1547esac
1548ac_abs_top_builddir=$ac_pwd
1549ac_abs_builddir=$ac_pwd$ac_dir_suffix
1550# for backward compatibility:
1551ac_top_builddir=$ac_top_build_prefix
1552
1553case $srcdir in
1554  .)  # We are building in place.
1555    ac_srcdir=.
1556    ac_top_srcdir=$ac_top_builddir_sub
1557    ac_abs_top_srcdir=$ac_pwd ;;
1558  [\\/]* | ?:[\\/]* )  # Absolute name.
1559    ac_srcdir=$srcdir$ac_dir_suffix;
1560    ac_top_srcdir=$srcdir
1561    ac_abs_top_srcdir=$srcdir ;;
1562  *) # Relative name.
1563    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1564    ac_top_srcdir=$ac_top_build_prefix$srcdir
1565    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1566esac
1567ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1568
1569    cd "$ac_dir" || { ac_status=$?; continue; }
1570    # Check for guested configure.
1571    if test -f "$ac_srcdir/configure.gnu"; then
1572      echo &&
1573      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1574    elif test -f "$ac_srcdir/configure"; then
1575      echo &&
1576      $SHELL "$ac_srcdir/configure" --help=recursive
1577    else
1578      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1579    fi || ac_status=$?
1580    cd "$ac_pwd" || { ac_status=$?; break; }
1581  done
1582fi
1583
1584test -n "$ac_init_help" && exit $ac_status
1585if $ac_init_version; then
1586  cat <<\_ACEOF
1587pcap configure 1.10.3
1588generated by GNU Autoconf 2.69
1589
1590Copyright (C) 2012 Free Software Foundation, Inc.
1591This configure script is free software; the Free Software Foundation
1592gives unlimited permission to copy, distribute and modify it.
1593_ACEOF
1594  exit
1595fi
1596
1597## ------------------------ ##
1598## Autoconf initialization. ##
1599## ------------------------ ##
1600
1601# ac_fn_c_try_compile LINENO
1602# --------------------------
1603# Try to compile conftest.$ac_ext, and return whether this succeeded.
1604ac_fn_c_try_compile ()
1605{
1606  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1607  rm -f conftest.$ac_objext
1608  if { { ac_try="$ac_compile"
1609case "(($ac_try" in
1610  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1611  *) ac_try_echo=$ac_try;;
1612esac
1613eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1614$as_echo "$ac_try_echo"; } >&5
1615  (eval "$ac_compile") 2>conftest.err
1616  ac_status=$?
1617  if test -s conftest.err; then
1618    grep -v '^ *+' conftest.err >conftest.er1
1619    cat conftest.er1 >&5
1620    mv -f conftest.er1 conftest.err
1621  fi
1622  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1623  test $ac_status = 0; } && {
1624	 test -z "$ac_c_werror_flag" ||
1625	 test ! -s conftest.err
1626       } && test -s conftest.$ac_objext; then :
1627  ac_retval=0
1628else
1629  $as_echo "$as_me: failed program was:" >&5
1630sed 's/^/| /' conftest.$ac_ext >&5
1631
1632	ac_retval=1
1633fi
1634  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1635  as_fn_set_status $ac_retval
1636
1637} # ac_fn_c_try_compile
1638
1639# ac_fn_c_try_run LINENO
1640# ----------------------
1641# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1642# that executables *can* be run.
1643ac_fn_c_try_run ()
1644{
1645  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1646  if { { ac_try="$ac_link"
1647case "(($ac_try" in
1648  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1649  *) ac_try_echo=$ac_try;;
1650esac
1651eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1652$as_echo "$ac_try_echo"; } >&5
1653  (eval "$ac_link") 2>&5
1654  ac_status=$?
1655  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1656  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1657  { { case "(($ac_try" in
1658  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1659  *) ac_try_echo=$ac_try;;
1660esac
1661eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1662$as_echo "$ac_try_echo"; } >&5
1663  (eval "$ac_try") 2>&5
1664  ac_status=$?
1665  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1666  test $ac_status = 0; }; }; then :
1667  ac_retval=0
1668else
1669  $as_echo "$as_me: program exited with status $ac_status" >&5
1670       $as_echo "$as_me: failed program was:" >&5
1671sed 's/^/| /' conftest.$ac_ext >&5
1672
1673       ac_retval=$ac_status
1674fi
1675  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1676  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1677  as_fn_set_status $ac_retval
1678
1679} # ac_fn_c_try_run
1680
1681# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1682# --------------------------------------------
1683# Tries to find the compile-time value of EXPR in a program that includes
1684# INCLUDES, setting VAR accordingly. Returns whether the value could be
1685# computed
1686ac_fn_c_compute_int ()
1687{
1688  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1689  if test "$cross_compiling" = yes; then
1690    # Depending upon the size, compute the lo and hi bounds.
1691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1692/* end confdefs.h.  */
1693$4
1694int
1695main ()
1696{
1697static int test_array [1 - 2 * !(($2) >= 0)];
1698test_array [0] = 0;
1699return test_array [0];
1700
1701  ;
1702  return 0;
1703}
1704_ACEOF
1705if ac_fn_c_try_compile "$LINENO"; then :
1706  ac_lo=0 ac_mid=0
1707  while :; do
1708    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1709/* end confdefs.h.  */
1710$4
1711int
1712main ()
1713{
1714static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1715test_array [0] = 0;
1716return test_array [0];
1717
1718  ;
1719  return 0;
1720}
1721_ACEOF
1722if ac_fn_c_try_compile "$LINENO"; then :
1723  ac_hi=$ac_mid; break
1724else
1725  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1726			if test $ac_lo -le $ac_mid; then
1727			  ac_lo= ac_hi=
1728			  break
1729			fi
1730			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
1731fi
1732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1733  done
1734else
1735  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1736/* end confdefs.h.  */
1737$4
1738int
1739main ()
1740{
1741static int test_array [1 - 2 * !(($2) < 0)];
1742test_array [0] = 0;
1743return test_array [0];
1744
1745  ;
1746  return 0;
1747}
1748_ACEOF
1749if ac_fn_c_try_compile "$LINENO"; then :
1750  ac_hi=-1 ac_mid=-1
1751  while :; do
1752    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1753/* end confdefs.h.  */
1754$4
1755int
1756main ()
1757{
1758static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1759test_array [0] = 0;
1760return test_array [0];
1761
1762  ;
1763  return 0;
1764}
1765_ACEOF
1766if ac_fn_c_try_compile "$LINENO"; then :
1767  ac_lo=$ac_mid; break
1768else
1769  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1770			if test $ac_mid -le $ac_hi; then
1771			  ac_lo= ac_hi=
1772			  break
1773			fi
1774			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1775fi
1776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1777  done
1778else
1779  ac_lo= ac_hi=
1780fi
1781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1782fi
1783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1784# Binary search between lo and hi bounds.
1785while test "x$ac_lo" != "x$ac_hi"; do
1786  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1788/* end confdefs.h.  */
1789$4
1790int
1791main ()
1792{
1793static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1794test_array [0] = 0;
1795return test_array [0];
1796
1797  ;
1798  return 0;
1799}
1800_ACEOF
1801if ac_fn_c_try_compile "$LINENO"; then :
1802  ac_hi=$ac_mid
1803else
1804  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
1805fi
1806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1807done
1808case $ac_lo in #((
1809?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
1810'') ac_retval=1 ;;
1811esac
1812  else
1813    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1814/* end confdefs.h.  */
1815$4
1816static long int longval () { return $2; }
1817static unsigned long int ulongval () { return $2; }
1818#include <stdio.h>
1819#include <stdlib.h>
1820int
1821main ()
1822{
1823
1824  FILE *f = fopen ("conftest.val", "w");
1825  if (! f)
1826    return 1;
1827  if (($2) < 0)
1828    {
1829      long int i = longval ();
1830      if (i != ($2))
1831	return 1;
1832      fprintf (f, "%ld", i);
1833    }
1834  else
1835    {
1836      unsigned long int i = ulongval ();
1837      if (i != ($2))
1838	return 1;
1839      fprintf (f, "%lu", i);
1840    }
1841  /* Do not output a trailing newline, as this causes \r\n confusion
1842     on some platforms.  */
1843  return ferror (f) || fclose (f) != 0;
1844
1845  ;
1846  return 0;
1847}
1848_ACEOF
1849if ac_fn_c_try_run "$LINENO"; then :
1850  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
1851else
1852  ac_retval=1
1853fi
1854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1855  conftest.$ac_objext conftest.beam conftest.$ac_ext
1856rm -f conftest.val
1857
1858  fi
1859  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1860  as_fn_set_status $ac_retval
1861
1862} # ac_fn_c_compute_int
1863
1864# ac_fn_c_try_cpp LINENO
1865# ----------------------
1866# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1867ac_fn_c_try_cpp ()
1868{
1869  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1870  if { { ac_try="$ac_cpp conftest.$ac_ext"
1871case "(($ac_try" in
1872  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1873  *) ac_try_echo=$ac_try;;
1874esac
1875eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1876$as_echo "$ac_try_echo"; } >&5
1877  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1878  ac_status=$?
1879  if test -s conftest.err; then
1880    grep -v '^ *+' conftest.err >conftest.er1
1881    cat conftest.er1 >&5
1882    mv -f conftest.er1 conftest.err
1883  fi
1884  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1885  test $ac_status = 0; } > conftest.i && {
1886	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1887	 test ! -s conftest.err
1888       }; then :
1889  ac_retval=0
1890else
1891  $as_echo "$as_me: failed program was:" >&5
1892sed 's/^/| /' conftest.$ac_ext >&5
1893
1894    ac_retval=1
1895fi
1896  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1897  as_fn_set_status $ac_retval
1898
1899} # ac_fn_c_try_cpp
1900
1901# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1902# -------------------------------------------------------
1903# Tests whether HEADER exists and can be compiled using the include files in
1904# INCLUDES, setting the cache variable VAR accordingly.
1905ac_fn_c_check_header_compile ()
1906{
1907  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1908  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1909$as_echo_n "checking for $2... " >&6; }
1910if eval \${$3+:} false; then :
1911  $as_echo_n "(cached) " >&6
1912else
1913  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1914/* end confdefs.h.  */
1915$4
1916#include <$2>
1917_ACEOF
1918if ac_fn_c_try_compile "$LINENO"; then :
1919  eval "$3=yes"
1920else
1921  eval "$3=no"
1922fi
1923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1924fi
1925eval ac_res=\$$3
1926	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1927$as_echo "$ac_res" >&6; }
1928  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1929
1930} # ac_fn_c_check_header_compile
1931
1932# ac_fn_cxx_try_compile LINENO
1933# ----------------------------
1934# Try to compile conftest.$ac_ext, and return whether this succeeded.
1935ac_fn_cxx_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"
1940case "(($ac_try" in
1941  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1942  *) ac_try_echo=$ac_try;;
1943esac
1944eval 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_cxx_werror_flag" ||
1956	 test ! -s conftest.err
1957       } && test -s conftest.$ac_objext; then :
1958  ac_retval=0
1959else
1960  $as_echo "$as_me: failed program was:" >&5
1961sed 's/^/| /' conftest.$ac_ext >&5
1962
1963	ac_retval=1
1964fi
1965  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1966  as_fn_set_status $ac_retval
1967
1968} # ac_fn_cxx_try_compile
1969
1970# ac_fn_cxx_try_run LINENO
1971# ------------------------
1972# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1973# that executables *can* be run.
1974ac_fn_cxx_try_run ()
1975{
1976  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1977  if { { ac_try="$ac_link"
1978case "(($ac_try" in
1979  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1980  *) ac_try_echo=$ac_try;;
1981esac
1982eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1983$as_echo "$ac_try_echo"; } >&5
1984  (eval "$ac_link") 2>&5
1985  ac_status=$?
1986  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1987  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1988  { { case "(($ac_try" in
1989  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1990  *) ac_try_echo=$ac_try;;
1991esac
1992eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1993$as_echo "$ac_try_echo"; } >&5
1994  (eval "$ac_try") 2>&5
1995  ac_status=$?
1996  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1997  test $ac_status = 0; }; }; then :
1998  ac_retval=0
1999else
2000  $as_echo "$as_me: program exited with status $ac_status" >&5
2001       $as_echo "$as_me: failed program was:" >&5
2002sed 's/^/| /' conftest.$ac_ext >&5
2003
2004       ac_retval=$ac_status
2005fi
2006  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2007  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2008  as_fn_set_status $ac_retval
2009
2010} # ac_fn_cxx_try_run
2011
2012# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2013# ----------------------------------------------
2014# Tries to find the compile-time value of EXPR in a program that includes
2015# INCLUDES, setting VAR accordingly. Returns whether the value could be
2016# computed
2017ac_fn_cxx_compute_int ()
2018{
2019  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2020  if test "$cross_compiling" = yes; then
2021    # Depending upon the size, compute the lo and hi bounds.
2022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2023/* end confdefs.h.  */
2024$4
2025int
2026main ()
2027{
2028static int test_array [1 - 2 * !(($2) >= 0)];
2029test_array [0] = 0;
2030return test_array [0];
2031
2032  ;
2033  return 0;
2034}
2035_ACEOF
2036if ac_fn_cxx_try_compile "$LINENO"; then :
2037  ac_lo=0 ac_mid=0
2038  while :; do
2039    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040/* end confdefs.h.  */
2041$4
2042int
2043main ()
2044{
2045static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2046test_array [0] = 0;
2047return test_array [0];
2048
2049  ;
2050  return 0;
2051}
2052_ACEOF
2053if ac_fn_cxx_try_compile "$LINENO"; then :
2054  ac_hi=$ac_mid; break
2055else
2056  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2057			if test $ac_lo -le $ac_mid; then
2058			  ac_lo= ac_hi=
2059			  break
2060			fi
2061			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2062fi
2063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2064  done
2065else
2066  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067/* end confdefs.h.  */
2068$4
2069int
2070main ()
2071{
2072static int test_array [1 - 2 * !(($2) < 0)];
2073test_array [0] = 0;
2074return test_array [0];
2075
2076  ;
2077  return 0;
2078}
2079_ACEOF
2080if ac_fn_cxx_try_compile "$LINENO"; then :
2081  ac_hi=-1 ac_mid=-1
2082  while :; do
2083    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h.  */
2085$4
2086int
2087main ()
2088{
2089static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2090test_array [0] = 0;
2091return test_array [0];
2092
2093  ;
2094  return 0;
2095}
2096_ACEOF
2097if ac_fn_cxx_try_compile "$LINENO"; then :
2098  ac_lo=$ac_mid; break
2099else
2100  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2101			if test $ac_mid -le $ac_hi; then
2102			  ac_lo= ac_hi=
2103			  break
2104			fi
2105			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2106fi
2107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108  done
2109else
2110  ac_lo= ac_hi=
2111fi
2112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113fi
2114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2115# Binary search between lo and hi bounds.
2116while test "x$ac_lo" != "x$ac_hi"; do
2117  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2118  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h.  */
2120$4
2121int
2122main ()
2123{
2124static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2125test_array [0] = 0;
2126return test_array [0];
2127
2128  ;
2129  return 0;
2130}
2131_ACEOF
2132if ac_fn_cxx_try_compile "$LINENO"; then :
2133  ac_hi=$ac_mid
2134else
2135  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2136fi
2137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2138done
2139case $ac_lo in #((
2140?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2141'') ac_retval=1 ;;
2142esac
2143  else
2144    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2145/* end confdefs.h.  */
2146$4
2147static long int longval () { return $2; }
2148static unsigned long int ulongval () { return $2; }
2149#include <stdio.h>
2150#include <stdlib.h>
2151int
2152main ()
2153{
2154
2155  FILE *f = fopen ("conftest.val", "w");
2156  if (! f)
2157    return 1;
2158  if (($2) < 0)
2159    {
2160      long int i = longval ();
2161      if (i != ($2))
2162	return 1;
2163      fprintf (f, "%ld", i);
2164    }
2165  else
2166    {
2167      unsigned long int i = ulongval ();
2168      if (i != ($2))
2169	return 1;
2170      fprintf (f, "%lu", i);
2171    }
2172  /* Do not output a trailing newline, as this causes \r\n confusion
2173     on some platforms.  */
2174  return ferror (f) || fclose (f) != 0;
2175
2176  ;
2177  return 0;
2178}
2179_ACEOF
2180if ac_fn_cxx_try_run "$LINENO"; then :
2181  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2182else
2183  ac_retval=1
2184fi
2185rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2186  conftest.$ac_objext conftest.beam conftest.$ac_ext
2187rm -f conftest.val
2188
2189  fi
2190  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2191  as_fn_set_status $ac_retval
2192
2193} # ac_fn_cxx_compute_int
2194
2195# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2196# -------------------------------------------------------
2197# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2198# the include files in INCLUDES and setting the cache variable VAR
2199# accordingly.
2200ac_fn_c_check_header_mongrel ()
2201{
2202  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2203  if eval \${$3+:} false; then :
2204  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2205$as_echo_n "checking for $2... " >&6; }
2206if eval \${$3+:} false; then :
2207  $as_echo_n "(cached) " >&6
2208fi
2209eval ac_res=\$$3
2210	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2211$as_echo "$ac_res" >&6; }
2212else
2213  # Is the header compilable?
2214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2215$as_echo_n "checking $2 usability... " >&6; }
2216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2217/* end confdefs.h.  */
2218$4
2219#include <$2>
2220_ACEOF
2221if ac_fn_c_try_compile "$LINENO"; then :
2222  ac_header_compiler=yes
2223else
2224  ac_header_compiler=no
2225fi
2226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2228$as_echo "$ac_header_compiler" >&6; }
2229
2230# Is the header present?
2231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2232$as_echo_n "checking $2 presence... " >&6; }
2233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2234/* end confdefs.h.  */
2235#include <$2>
2236_ACEOF
2237if ac_fn_c_try_cpp "$LINENO"; then :
2238  ac_header_preproc=yes
2239else
2240  ac_header_preproc=no
2241fi
2242rm -f conftest.err conftest.i conftest.$ac_ext
2243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2244$as_echo "$ac_header_preproc" >&6; }
2245
2246# So?  What about this header?
2247case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2248  yes:no: )
2249    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2250$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2251    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2252$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2253    ;;
2254  no:yes:* )
2255    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2256$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2257    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2258$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2259    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2260$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2261    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2262$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2263    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2264$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2265    ;;
2266esac
2267  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2268$as_echo_n "checking for $2... " >&6; }
2269if eval \${$3+:} false; then :
2270  $as_echo_n "(cached) " >&6
2271else
2272  eval "$3=\$ac_header_compiler"
2273fi
2274eval ac_res=\$$3
2275	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2276$as_echo "$ac_res" >&6; }
2277fi
2278  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2279
2280} # ac_fn_c_check_header_mongrel
2281
2282# ac_fn_c_check_func LINENO FUNC VAR
2283# ----------------------------------
2284# Tests whether FUNC exists, setting the cache variable VAR accordingly
2285ac_fn_c_check_func ()
2286{
2287  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2288  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2289$as_echo_n "checking for $2... " >&6; }
2290if eval \${$3+:} false; then :
2291  $as_echo_n "(cached) " >&6
2292else
2293  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2294/* end confdefs.h.  */
2295/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2296   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2297#define $2 innocuous_$2
2298
2299/* System header to define __stub macros and hopefully few prototypes,
2300    which can conflict with char $2 (); below.
2301    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2302    <limits.h> exists even on freestanding compilers.  */
2303
2304#ifdef __STDC__
2305# include <limits.h>
2306#else
2307# include <assert.h>
2308#endif
2309
2310#undef $2
2311
2312/* Override any GCC internal prototype to avoid an error.
2313   Use char because int might match the return type of a GCC
2314   builtin and then its argument prototype would still apply.  */
2315#ifdef __cplusplus
2316extern "C"
2317#endif
2318char $2 ();
2319/* The GNU C library defines this for functions which it implements
2320    to always fail with ENOSYS.  Some functions are actually named
2321    something starting with __ and the normal name is an alias.  */
2322#if defined __stub_$2 || defined __stub___$2
2323choke me
2324#endif
2325
2326int
2327main ()
2328{
2329return $2 ();
2330  ;
2331  return 0;
2332}
2333_ACEOF
2334if ac_fn_c_try_link "$LINENO"; then :
2335  eval "$3=yes"
2336else
2337  eval "$3=no"
2338fi
2339rm -f core conftest.err conftest.$ac_objext \
2340    conftest$ac_exeext conftest.$ac_ext
2341fi
2342eval ac_res=\$$3
2343	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2344$as_echo "$ac_res" >&6; }
2345  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2346
2347} # ac_fn_c_check_func
2348
2349# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2350# ---------------------------------------------
2351# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2352# accordingly.
2353ac_fn_c_check_decl ()
2354{
2355  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2356  as_decl_name=`echo $2|sed 's/ *(.*//'`
2357  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2358  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2359$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2360if eval \${$3+:} false; then :
2361  $as_echo_n "(cached) " >&6
2362else
2363  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2364/* end confdefs.h.  */
2365$4
2366int
2367main ()
2368{
2369#ifndef $as_decl_name
2370#ifdef __cplusplus
2371  (void) $as_decl_use;
2372#else
2373  (void) $as_decl_name;
2374#endif
2375#endif
2376
2377  ;
2378  return 0;
2379}
2380_ACEOF
2381if ac_fn_c_try_compile "$LINENO"; then :
2382  eval "$3=yes"
2383else
2384  eval "$3=no"
2385fi
2386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2387fi
2388eval ac_res=\$$3
2389	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2390$as_echo "$ac_res" >&6; }
2391  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2392
2393} # ac_fn_c_check_decl
2394
2395# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2396# -------------------------------------------
2397# Tests whether TYPE exists after having included INCLUDES, setting cache
2398# variable VAR accordingly.
2399ac_fn_c_check_type ()
2400{
2401  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2402  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2403$as_echo_n "checking for $2... " >&6; }
2404if eval \${$3+:} false; then :
2405  $as_echo_n "(cached) " >&6
2406else
2407  eval "$3=no"
2408  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2409/* end confdefs.h.  */
2410$4
2411int
2412main ()
2413{
2414if (sizeof ($2))
2415	 return 0;
2416  ;
2417  return 0;
2418}
2419_ACEOF
2420if ac_fn_c_try_compile "$LINENO"; then :
2421  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2422/* end confdefs.h.  */
2423$4
2424int
2425main ()
2426{
2427if (sizeof (($2)))
2428	    return 0;
2429  ;
2430  return 0;
2431}
2432_ACEOF
2433if ac_fn_c_try_compile "$LINENO"; then :
2434
2435else
2436  eval "$3=yes"
2437fi
2438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2439fi
2440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2441fi
2442eval ac_res=\$$3
2443	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2444$as_echo "$ac_res" >&6; }
2445  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2446
2447} # ac_fn_c_check_type
2448
2449# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2450# ----------------------------------------------------
2451# Tries to find if the field MEMBER exists in type AGGR, after including
2452# INCLUDES, setting cache variable VAR accordingly.
2453ac_fn_c_check_member ()
2454{
2455  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2456  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2457$as_echo_n "checking for $2.$3... " >&6; }
2458if eval \${$4+:} false; then :
2459  $as_echo_n "(cached) " >&6
2460else
2461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2462/* end confdefs.h.  */
2463$5
2464int
2465main ()
2466{
2467static $2 ac_aggr;
2468if (ac_aggr.$3)
2469return 0;
2470  ;
2471  return 0;
2472}
2473_ACEOF
2474if ac_fn_c_try_compile "$LINENO"; then :
2475  eval "$4=yes"
2476else
2477  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2478/* end confdefs.h.  */
2479$5
2480int
2481main ()
2482{
2483static $2 ac_aggr;
2484if (sizeof ac_aggr.$3)
2485return 0;
2486  ;
2487  return 0;
2488}
2489_ACEOF
2490if ac_fn_c_try_compile "$LINENO"; then :
2491  eval "$4=yes"
2492else
2493  eval "$4=no"
2494fi
2495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2496fi
2497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2498fi
2499eval ac_res=\$$4
2500	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2501$as_echo "$ac_res" >&6; }
2502  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2503
2504} # ac_fn_c_check_member
2505cat >config.log <<_ACEOF
2506This file contains any messages produced by compilers while
2507running configure, to aid debugging if configure makes a mistake.
2508
2509It was created by pcap $as_me 1.10.3, which was
2510generated by GNU Autoconf 2.69.  Invocation command line was
2511
2512  $ $0 $@
2513
2514_ACEOF
2515exec 5>>config.log
2516{
2517cat <<_ASUNAME
2518## --------- ##
2519## Platform. ##
2520## --------- ##
2521
2522hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2523uname -m = `(uname -m) 2>/dev/null || echo unknown`
2524uname -r = `(uname -r) 2>/dev/null || echo unknown`
2525uname -s = `(uname -s) 2>/dev/null || echo unknown`
2526uname -v = `(uname -v) 2>/dev/null || echo unknown`
2527
2528/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2529/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2530
2531/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2532/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2533/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2534/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2535/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2536/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2537/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2538
2539_ASUNAME
2540
2541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2542for as_dir in $PATH
2543do
2544  IFS=$as_save_IFS
2545  test -z "$as_dir" && as_dir=.
2546    $as_echo "PATH: $as_dir"
2547  done
2548IFS=$as_save_IFS
2549
2550} >&5
2551
2552cat >&5 <<_ACEOF
2553
2554
2555## ----------- ##
2556## Core tests. ##
2557## ----------- ##
2558
2559_ACEOF
2560
2561
2562# Keep a trace of the command line.
2563# Strip out --no-create and --no-recursion so they do not pile up.
2564# Strip out --silent because we don't want to record it for future runs.
2565# Also quote any args containing shell meta-characters.
2566# Make two passes to allow for proper duplicate-argument suppression.
2567ac_configure_args=
2568ac_configure_args0=
2569ac_configure_args1=
2570ac_must_keep_next=false
2571for ac_pass in 1 2
2572do
2573  for ac_arg
2574  do
2575    case $ac_arg in
2576    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2577    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2578    | -silent | --silent | --silen | --sile | --sil)
2579      continue ;;
2580    *\'*)
2581      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2582    esac
2583    case $ac_pass in
2584    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2585    2)
2586      as_fn_append ac_configure_args1 " '$ac_arg'"
2587      if test $ac_must_keep_next = true; then
2588	ac_must_keep_next=false # Got value, back to normal.
2589      else
2590	case $ac_arg in
2591	  *=* | --config-cache | -C | -disable-* | --disable-* \
2592	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2593	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2594	  | -with-* | --with-* | -without-* | --without-* | --x)
2595	    case "$ac_configure_args0 " in
2596	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2597	    esac
2598	    ;;
2599	  -* ) ac_must_keep_next=true ;;
2600	esac
2601      fi
2602      as_fn_append ac_configure_args " '$ac_arg'"
2603      ;;
2604    esac
2605  done
2606done
2607{ ac_configure_args0=; unset ac_configure_args0;}
2608{ ac_configure_args1=; unset ac_configure_args1;}
2609
2610# When interrupted or exit'd, cleanup temporary files, and complete
2611# config.log.  We remove comments because anyway the quotes in there
2612# would cause problems or look ugly.
2613# WARNING: Use '\'' to represent an apostrophe within the trap.
2614# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2615trap 'exit_status=$?
2616  # Save into config.log some information that might help in debugging.
2617  {
2618    echo
2619
2620    $as_echo "## ---------------- ##
2621## Cache variables. ##
2622## ---------------- ##"
2623    echo
2624    # The following way of writing the cache mishandles newlines in values,
2625(
2626  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2627    eval ac_val=\$$ac_var
2628    case $ac_val in #(
2629    *${as_nl}*)
2630      case $ac_var in #(
2631      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2632$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2633      esac
2634      case $ac_var in #(
2635      _ | IFS | as_nl) ;; #(
2636      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2637      *) { eval $ac_var=; unset $ac_var;} ;;
2638      esac ;;
2639    esac
2640  done
2641  (set) 2>&1 |
2642    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2643    *${as_nl}ac_space=\ *)
2644      sed -n \
2645	"s/'\''/'\''\\\\'\'''\''/g;
2646	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2647      ;; #(
2648    *)
2649      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2650      ;;
2651    esac |
2652    sort
2653)
2654    echo
2655
2656    $as_echo "## ----------------- ##
2657## Output variables. ##
2658## ----------------- ##"
2659    echo
2660    for ac_var in $ac_subst_vars
2661    do
2662      eval ac_val=\$$ac_var
2663      case $ac_val in
2664      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2665      esac
2666      $as_echo "$ac_var='\''$ac_val'\''"
2667    done | sort
2668    echo
2669
2670    if test -n "$ac_subst_files"; then
2671      $as_echo "## ------------------- ##
2672## File substitutions. ##
2673## ------------------- ##"
2674      echo
2675      for ac_var in $ac_subst_files
2676      do
2677	eval ac_val=\$$ac_var
2678	case $ac_val in
2679	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2680	esac
2681	$as_echo "$ac_var='\''$ac_val'\''"
2682      done | sort
2683      echo
2684    fi
2685
2686    if test -s confdefs.h; then
2687      $as_echo "## ----------- ##
2688## confdefs.h. ##
2689## ----------- ##"
2690      echo
2691      cat confdefs.h
2692      echo
2693    fi
2694    test "$ac_signal" != 0 &&
2695      $as_echo "$as_me: caught signal $ac_signal"
2696    $as_echo "$as_me: exit $exit_status"
2697  } >&5
2698  rm -f core *.core core.conftest.* &&
2699    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2700    exit $exit_status
2701' 0
2702for ac_signal in 1 2 13 15; do
2703  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2704done
2705ac_signal=0
2706
2707# confdefs.h avoids OS command line length limits that DEFS can exceed.
2708rm -f -r conftest* confdefs.h
2709
2710$as_echo "/* confdefs.h */" > confdefs.h
2711
2712# Predefined preprocessor variables.
2713
2714cat >>confdefs.h <<_ACEOF
2715#define PACKAGE_NAME "$PACKAGE_NAME"
2716_ACEOF
2717
2718cat >>confdefs.h <<_ACEOF
2719#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2720_ACEOF
2721
2722cat >>confdefs.h <<_ACEOF
2723#define PACKAGE_VERSION "$PACKAGE_VERSION"
2724_ACEOF
2725
2726cat >>confdefs.h <<_ACEOF
2727#define PACKAGE_STRING "$PACKAGE_STRING"
2728_ACEOF
2729
2730cat >>confdefs.h <<_ACEOF
2731#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2732_ACEOF
2733
2734cat >>confdefs.h <<_ACEOF
2735#define PACKAGE_URL "$PACKAGE_URL"
2736_ACEOF
2737
2738
2739# Let the site file select an alternate cache file if it wants to.
2740# Prefer an explicitly selected file to automatically selected ones.
2741ac_site_file1=NONE
2742ac_site_file2=NONE
2743if test -n "$CONFIG_SITE"; then
2744  # We do not want a PATH search for config.site.
2745  case $CONFIG_SITE in #((
2746    -*)  ac_site_file1=./$CONFIG_SITE;;
2747    */*) ac_site_file1=$CONFIG_SITE;;
2748    *)   ac_site_file1=./$CONFIG_SITE;;
2749  esac
2750elif test "x$prefix" != xNONE; then
2751  ac_site_file1=$prefix/share/config.site
2752  ac_site_file2=$prefix/etc/config.site
2753else
2754  ac_site_file1=$ac_default_prefix/share/config.site
2755  ac_site_file2=$ac_default_prefix/etc/config.site
2756fi
2757for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2758do
2759  test "x$ac_site_file" = xNONE && continue
2760  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2761    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2762$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2763    sed 's/^/| /' "$ac_site_file" >&5
2764    . "$ac_site_file" \
2765      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2766$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2767as_fn_error $? "failed to load site script $ac_site_file
2768See \`config.log' for more details" "$LINENO" 5; }
2769  fi
2770done
2771
2772if test -r "$cache_file"; then
2773  # Some versions of bash will fail to source /dev/null (special files
2774  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2775  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2776    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2777$as_echo "$as_me: loading cache $cache_file" >&6;}
2778    case $cache_file in
2779      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2780      *)                      . "./$cache_file";;
2781    esac
2782  fi
2783else
2784  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2785$as_echo "$as_me: creating cache $cache_file" >&6;}
2786  >$cache_file
2787fi
2788
2789# Check that the precious variables saved in the cache have kept the same
2790# value.
2791ac_cache_corrupted=false
2792for ac_var in $ac_precious_vars; do
2793  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2794  eval ac_new_set=\$ac_env_${ac_var}_set
2795  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2796  eval ac_new_val=\$ac_env_${ac_var}_value
2797  case $ac_old_set,$ac_new_set in
2798    set,)
2799      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2800$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2801      ac_cache_corrupted=: ;;
2802    ,set)
2803      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2804$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2805      ac_cache_corrupted=: ;;
2806    ,);;
2807    *)
2808      if test "x$ac_old_val" != "x$ac_new_val"; then
2809	# differences in whitespace do not lead to failure.
2810	ac_old_val_w=`echo x $ac_old_val`
2811	ac_new_val_w=`echo x $ac_new_val`
2812	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2813	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2814$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2815	  ac_cache_corrupted=:
2816	else
2817	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2818$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2819	  eval $ac_var=\$ac_old_val
2820	fi
2821	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2822$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2823	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2824$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2825      fi;;
2826  esac
2827  # Pass precious variables to config.status.
2828  if test "$ac_new_set" = set; then
2829    case $ac_new_val in
2830    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2831    *) ac_arg=$ac_var=$ac_new_val ;;
2832    esac
2833    case " $ac_configure_args " in
2834      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2835      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2836    esac
2837  fi
2838done
2839if $ac_cache_corrupted; then
2840  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2841$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2842  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2843$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2844  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2845fi
2846## -------------------- ##
2847## Main body of script. ##
2848## -------------------- ##
2849
2850ac_ext=c
2851ac_cpp='$CPP $CPPFLAGS'
2852ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2853ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2854ac_compiler_gnu=$ac_cv_c_compiler_gnu
2855
2856
2857
2858
2859
2860#
2861# These are the variables that are used in Makefile, pcap-config, and
2862# libpcap.pc.
2863#
2864# CFLAGS: inherited from the environment, not modified by us (except
2865# temporarily during tests that involve compilation).  Used only when
2866# compiling C source.
2867#
2868# CXXFLAGS: inherited from the environment, not modified by us.  Used only
2869# when compiling C++ source.
2870#
2871# LDFLAGS: inherited from the environment, not modified by us.
2872#
2873# LIBS: inherited from the environment; we add libraries required by
2874# libpcap.  Librares that the core libpcap code requires are added
2875# first; libraries required by additional pcap modules are first
2876# added to ADDITIONAL_LIBS, and only added to LIBS at the end, after
2877# we're finished doing configuration tests for the modules.
2878#
2879# LIBS_STATIC: libraries with which a program using the libpcap *static*
2880# library needs to be linked.  This is a superset of LIBS, used in
2881# pcap-config, so that "pcap-config --libs --static" will report them.
2882# Initialized to LIBS.
2883#
2884# REQUIRES_PRIVATE: pkg-config package names for additional libraries
2885# with which a program using the libpcap *static* library needs to be
2886# linked and for which a .pc file exists.  This is used in libpcap.pc,
2887# so that "pkg-config --libs --static" will report them, and so that
2888# those libraries will be determined using the library's .pc file, not
2889# from our .pc file.  Initialized to an empty string.
2890#
2891# V_CCOPT: additional compiler flags other than -I and -D flags
2892# needed when compiling libpcap.  Used in Makefile for both C and
2893# C++ source.
2894#
2895# V_DEFS: additional -D compiler flags needed when compiling
2896# libpcap.  Used in Makefile for both C and C++ source.
2897#
2898# V_INCLS: additional -I compiler flags needed when compiling
2899# libpcap.  Used in Makefile for both C and C++ source.
2900#
2901# ADDITIONAL_LIBS: additional libraries with which the libpcap dynamic
2902# library needs to be linked.  Used in Makwfile; not used in pcap-config
2903# or libpcap.pc, as, in all platforms on which we run, if a dynamic
2904# library is linked with other dynamic libraries, a program using
2905# that dynamic library doesn't have to link with those libraries -
2906# they will be automatically loaded at run time.  Initialized to an
2907# empty string.
2908#
2909# ADDITIONAL_LIBS_STATIC: additional libraries with which a program
2910# using the libpcap *static* library needs to be linked.  This is used
2911# in pcap-config, so that "pcap-config --libs --static" will report
2912# them.  Initialized to an empty string.
2913#
2914# REQUIRES_PRIVATE: pkg-config package names for additional libraries
2915# with which a program using the libpcap *static* library needs to be
2916# linked and for which a .pc file exists.  This is used in libpcap.pc,
2917# so that "pkg-config --libs --static" will report them, and so that
2918# those libraries will be determined using the library's .pc file, not
2919# from our .pc file.  Initialized to an empty string.
2920#
2921# LIBS_PRIVATE: pkg-config package names for additional libraries with
2922# which a program using the libpcap *static* library needs to be linked
2923# and for which a .pc file does not exist.  This is used in libpcap.pc,
2924# so that "pkg-config --libs --static" will report them (those libraries
2925# cannot be determined using the library's .pc file, as there is no such
2926# file, so it has to come from our .pc file.  Initialized to an empty
2927# string.
2928#
2929LIBS_STATIC=""
2930REQUIRES_PRIVATE=""
2931LIBS_PRIVATE=""
2932
2933
2934
2935
2936
2937
2938
2939
2940ac_aux_dir=
2941for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2942  if test -f "$ac_dir/install-sh"; then
2943    ac_aux_dir=$ac_dir
2944    ac_install_sh="$ac_aux_dir/install-sh -c"
2945    break
2946  elif test -f "$ac_dir/install.sh"; then
2947    ac_aux_dir=$ac_dir
2948    ac_install_sh="$ac_aux_dir/install.sh -c"
2949    break
2950  elif test -f "$ac_dir/shtool"; then
2951    ac_aux_dir=$ac_dir
2952    ac_install_sh="$ac_aux_dir/shtool install -c"
2953    break
2954  fi
2955done
2956if test -z "$ac_aux_dir"; then
2957  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2958fi
2959
2960# These three variables are undocumented and unsupported,
2961# and are intended to be withdrawn in a future Autoconf release.
2962# They can cause serious problems if a builder's source tree is in a directory
2963# whose full name contains unusual characters.
2964ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2965ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2966ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2967
2968
2969# Make sure we can run config.sub.
2970$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2971  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2972
2973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2974$as_echo_n "checking build system type... " >&6; }
2975if ${ac_cv_build+:} false; then :
2976  $as_echo_n "(cached) " >&6
2977else
2978  ac_build_alias=$build_alias
2979test "x$ac_build_alias" = x &&
2980  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2981test "x$ac_build_alias" = x &&
2982  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2983ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2984  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2985
2986fi
2987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2988$as_echo "$ac_cv_build" >&6; }
2989case $ac_cv_build in
2990*-*-*) ;;
2991*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2992esac
2993build=$ac_cv_build
2994ac_save_IFS=$IFS; IFS='-'
2995set x $ac_cv_build
2996shift
2997build_cpu=$1
2998build_vendor=$2
2999shift; shift
3000# Remember, the first character of IFS is used to create $*,
3001# except with old shells:
3002build_os=$*
3003IFS=$ac_save_IFS
3004case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3005
3006
3007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3008$as_echo_n "checking host system type... " >&6; }
3009if ${ac_cv_host+:} false; then :
3010  $as_echo_n "(cached) " >&6
3011else
3012  if test "x$host_alias" = x; then
3013  ac_cv_host=$ac_cv_build
3014else
3015  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3016    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3017fi
3018
3019fi
3020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3021$as_echo "$ac_cv_host" >&6; }
3022case $ac_cv_host in
3023*-*-*) ;;
3024*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3025esac
3026host=$ac_cv_host
3027ac_save_IFS=$IFS; IFS='-'
3028set x $ac_cv_host
3029shift
3030host_cpu=$1
3031host_vendor=$2
3032shift; shift
3033# Remember, the first character of IFS is used to create $*,
3034# except with old shells:
3035host_os=$*
3036IFS=$ac_save_IFS
3037case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3038
3039
3040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
3041$as_echo_n "checking target system type... " >&6; }
3042if ${ac_cv_target+:} false; then :
3043  $as_echo_n "(cached) " >&6
3044else
3045  if test "x$target_alias" = x; then
3046  ac_cv_target=$ac_cv_host
3047else
3048  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
3049    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3050fi
3051
3052fi
3053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
3054$as_echo "$ac_cv_target" >&6; }
3055case $ac_cv_target in
3056*-*-*) ;;
3057*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3058esac
3059target=$ac_cv_target
3060ac_save_IFS=$IFS; IFS='-'
3061set x $ac_cv_target
3062shift
3063target_cpu=$1
3064target_vendor=$2
3065shift; shift
3066# Remember, the first character of IFS is used to create $*,
3067# except with old shells:
3068target_os=$*
3069IFS=$ac_save_IFS
3070case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
3071
3072
3073# The aliases save the names the user supplied, while $host etc.
3074# will get canonicalized.
3075test -n "$target_alias" &&
3076  test "$program_prefix$program_suffix$program_transform_name" = \
3077    NONENONEs,x,x, &&
3078  program_prefix=${target_alias}-
3079
3080
3081
3082
3083
3084
3085
3086
3087# Check whether --with-gcc was given.
3088if test "${with_gcc+set}" = set; then :
3089  withval=$with_gcc;
3090fi
3091
3092    V_CCOPT=""
3093    if test "${srcdir}" != "." ; then
3094	    V_CCOPT="-I\$(srcdir)"
3095    fi
3096    if test "${CFLAGS+set}" = set; then
3097	    LBL_CFLAGS="$CFLAGS"
3098    fi
3099    if test -z "$CC" ; then
3100	    case "$host_os" in
3101
3102	    bsdi*)
3103		    # Extract the first word of "shlicc2", so it can be a program name with args.
3104set dummy shlicc2; ac_word=$2
3105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3106$as_echo_n "checking for $ac_word... " >&6; }
3107if ${ac_cv_prog_SHLICC2+:} false; then :
3108  $as_echo_n "(cached) " >&6
3109else
3110  if test -n "$SHLICC2"; then
3111  ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test.
3112else
3113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3114for as_dir in $PATH
3115do
3116  IFS=$as_save_IFS
3117  test -z "$as_dir" && as_dir=.
3118    for ac_exec_ext in '' $ac_executable_extensions; do
3119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3120    ac_cv_prog_SHLICC2="yes"
3121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3122    break 2
3123  fi
3124done
3125  done
3126IFS=$as_save_IFS
3127
3128  test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no"
3129fi
3130fi
3131SHLICC2=$ac_cv_prog_SHLICC2
3132if test -n "$SHLICC2"; then
3133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLICC2" >&5
3134$as_echo "$SHLICC2" >&6; }
3135else
3136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3137$as_echo "no" >&6; }
3138fi
3139
3140
3141		    if test $SHLICC2 = yes ; then
3142			    CC=shlicc2
3143			    export CC
3144		    fi
3145		    ;;
3146	    esac
3147    fi
3148    if test -z "$CC" -a "$with_gcc" = no ; then
3149	    CC=cc
3150	    export CC
3151    fi
3152
3153#
3154# We require C99 or later.
3155# Try to get it, which may involve adding compiler flags;
3156# if that fails, give up.
3157#
3158ac_ext=c
3159ac_cpp='$CPP $CPPFLAGS'
3160ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3161ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3162ac_compiler_gnu=$ac_cv_c_compiler_gnu
3163if test -n "$ac_tool_prefix"; then
3164  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3165set dummy ${ac_tool_prefix}gcc; ac_word=$2
3166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3167$as_echo_n "checking for $ac_word... " >&6; }
3168if ${ac_cv_prog_CC+:} false; then :
3169  $as_echo_n "(cached) " >&6
3170else
3171  if test -n "$CC"; then
3172  ac_cv_prog_CC="$CC" # Let the user override the test.
3173else
3174as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3175for as_dir in $PATH
3176do
3177  IFS=$as_save_IFS
3178  test -z "$as_dir" && as_dir=.
3179    for ac_exec_ext in '' $ac_executable_extensions; do
3180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3181    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3183    break 2
3184  fi
3185done
3186  done
3187IFS=$as_save_IFS
3188
3189fi
3190fi
3191CC=$ac_cv_prog_CC
3192if test -n "$CC"; then
3193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3194$as_echo "$CC" >&6; }
3195else
3196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3197$as_echo "no" >&6; }
3198fi
3199
3200
3201fi
3202if test -z "$ac_cv_prog_CC"; then
3203  ac_ct_CC=$CC
3204  # Extract the first word of "gcc", so it can be a program name with args.
3205set dummy gcc; ac_word=$2
3206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3207$as_echo_n "checking for $ac_word... " >&6; }
3208if ${ac_cv_prog_ac_ct_CC+:} false; then :
3209  $as_echo_n "(cached) " >&6
3210else
3211  if test -n "$ac_ct_CC"; then
3212  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3213else
3214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3215for as_dir in $PATH
3216do
3217  IFS=$as_save_IFS
3218  test -z "$as_dir" && as_dir=.
3219    for ac_exec_ext in '' $ac_executable_extensions; do
3220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3221    ac_cv_prog_ac_ct_CC="gcc"
3222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3223    break 2
3224  fi
3225done
3226  done
3227IFS=$as_save_IFS
3228
3229fi
3230fi
3231ac_ct_CC=$ac_cv_prog_ac_ct_CC
3232if test -n "$ac_ct_CC"; then
3233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3234$as_echo "$ac_ct_CC" >&6; }
3235else
3236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3237$as_echo "no" >&6; }
3238fi
3239
3240  if test "x$ac_ct_CC" = x; then
3241    CC=""
3242  else
3243    case $cross_compiling:$ac_tool_warned in
3244yes:)
3245{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3246$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3247ac_tool_warned=yes ;;
3248esac
3249    CC=$ac_ct_CC
3250  fi
3251else
3252  CC="$ac_cv_prog_CC"
3253fi
3254
3255if test -z "$CC"; then
3256          if test -n "$ac_tool_prefix"; then
3257    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3258set dummy ${ac_tool_prefix}cc; ac_word=$2
3259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3260$as_echo_n "checking for $ac_word... " >&6; }
3261if ${ac_cv_prog_CC+:} false; then :
3262  $as_echo_n "(cached) " >&6
3263else
3264  if test -n "$CC"; then
3265  ac_cv_prog_CC="$CC" # Let the user override the test.
3266else
3267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3268for as_dir in $PATH
3269do
3270  IFS=$as_save_IFS
3271  test -z "$as_dir" && as_dir=.
3272    for ac_exec_ext in '' $ac_executable_extensions; do
3273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3274    ac_cv_prog_CC="${ac_tool_prefix}cc"
3275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3276    break 2
3277  fi
3278done
3279  done
3280IFS=$as_save_IFS
3281
3282fi
3283fi
3284CC=$ac_cv_prog_CC
3285if test -n "$CC"; then
3286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3287$as_echo "$CC" >&6; }
3288else
3289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3290$as_echo "no" >&6; }
3291fi
3292
3293
3294  fi
3295fi
3296if test -z "$CC"; then
3297  # Extract the first word of "cc", so it can be a program name with args.
3298set dummy cc; ac_word=$2
3299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3300$as_echo_n "checking for $ac_word... " >&6; }
3301if ${ac_cv_prog_CC+:} false; then :
3302  $as_echo_n "(cached) " >&6
3303else
3304  if test -n "$CC"; then
3305  ac_cv_prog_CC="$CC" # Let the user override the test.
3306else
3307  ac_prog_rejected=no
3308as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3309for as_dir in $PATH
3310do
3311  IFS=$as_save_IFS
3312  test -z "$as_dir" && as_dir=.
3313    for ac_exec_ext in '' $ac_executable_extensions; do
3314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3315    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3316       ac_prog_rejected=yes
3317       continue
3318     fi
3319    ac_cv_prog_CC="cc"
3320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3321    break 2
3322  fi
3323done
3324  done
3325IFS=$as_save_IFS
3326
3327if test $ac_prog_rejected = yes; then
3328  # We found a bogon in the path, so make sure we never use it.
3329  set dummy $ac_cv_prog_CC
3330  shift
3331  if test $# != 0; then
3332    # We chose a different compiler from the bogus one.
3333    # However, it has the same basename, so the bogon will be chosen
3334    # first if we set CC to just the basename; use the full file name.
3335    shift
3336    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3337  fi
3338fi
3339fi
3340fi
3341CC=$ac_cv_prog_CC
3342if test -n "$CC"; then
3343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3344$as_echo "$CC" >&6; }
3345else
3346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3347$as_echo "no" >&6; }
3348fi
3349
3350
3351fi
3352if test -z "$CC"; then
3353  if test -n "$ac_tool_prefix"; then
3354  for ac_prog in cl.exe
3355  do
3356    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3357set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3359$as_echo_n "checking for $ac_word... " >&6; }
3360if ${ac_cv_prog_CC+:} false; then :
3361  $as_echo_n "(cached) " >&6
3362else
3363  if test -n "$CC"; then
3364  ac_cv_prog_CC="$CC" # Let the user override the test.
3365else
3366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3367for as_dir in $PATH
3368do
3369  IFS=$as_save_IFS
3370  test -z "$as_dir" && as_dir=.
3371    for ac_exec_ext in '' $ac_executable_extensions; do
3372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3373    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3375    break 2
3376  fi
3377done
3378  done
3379IFS=$as_save_IFS
3380
3381fi
3382fi
3383CC=$ac_cv_prog_CC
3384if test -n "$CC"; then
3385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3386$as_echo "$CC" >&6; }
3387else
3388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3389$as_echo "no" >&6; }
3390fi
3391
3392
3393    test -n "$CC" && break
3394  done
3395fi
3396if test -z "$CC"; then
3397  ac_ct_CC=$CC
3398  for ac_prog in cl.exe
3399do
3400  # Extract the first word of "$ac_prog", so it can be a program name with args.
3401set dummy $ac_prog; ac_word=$2
3402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3403$as_echo_n "checking for $ac_word... " >&6; }
3404if ${ac_cv_prog_ac_ct_CC+:} false; then :
3405  $as_echo_n "(cached) " >&6
3406else
3407  if test -n "$ac_ct_CC"; then
3408  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3409else
3410as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3411for as_dir in $PATH
3412do
3413  IFS=$as_save_IFS
3414  test -z "$as_dir" && as_dir=.
3415    for ac_exec_ext in '' $ac_executable_extensions; do
3416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3417    ac_cv_prog_ac_ct_CC="$ac_prog"
3418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3419    break 2
3420  fi
3421done
3422  done
3423IFS=$as_save_IFS
3424
3425fi
3426fi
3427ac_ct_CC=$ac_cv_prog_ac_ct_CC
3428if test -n "$ac_ct_CC"; then
3429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3430$as_echo "$ac_ct_CC" >&6; }
3431else
3432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3433$as_echo "no" >&6; }
3434fi
3435
3436
3437  test -n "$ac_ct_CC" && break
3438done
3439
3440  if test "x$ac_ct_CC" = x; then
3441    CC=""
3442  else
3443    case $cross_compiling:$ac_tool_warned in
3444yes:)
3445{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3446$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3447ac_tool_warned=yes ;;
3448esac
3449    CC=$ac_ct_CC
3450  fi
3451fi
3452
3453fi
3454
3455
3456test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3457$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3458as_fn_error $? "no acceptable C compiler found in \$PATH
3459See \`config.log' for more details" "$LINENO" 5; }
3460
3461# Provide some information about the compiler.
3462$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3463set X $ac_compile
3464ac_compiler=$2
3465for ac_option in --version -v -V -qversion; do
3466  { { ac_try="$ac_compiler $ac_option >&5"
3467case "(($ac_try" in
3468  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3469  *) ac_try_echo=$ac_try;;
3470esac
3471eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3472$as_echo "$ac_try_echo"; } >&5
3473  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3474  ac_status=$?
3475  if test -s conftest.err; then
3476    sed '10a\
3477... rest of stderr output deleted ...
3478         10q' conftest.err >conftest.er1
3479    cat conftest.er1 >&5
3480  fi
3481  rm -f conftest.er1 conftest.err
3482  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3483  test $ac_status = 0; }
3484done
3485
3486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3487/* end confdefs.h.  */
3488
3489int
3490main ()
3491{
3492
3493  ;
3494  return 0;
3495}
3496_ACEOF
3497ac_clean_files_save=$ac_clean_files
3498ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3499# Try to create an executable without -o first, disregard a.out.
3500# It will help us diagnose broken compilers, and finding out an intuition
3501# of exeext.
3502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3503$as_echo_n "checking whether the C compiler works... " >&6; }
3504ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3505
3506# The possible output files:
3507ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3508
3509ac_rmfiles=
3510for ac_file in $ac_files
3511do
3512  case $ac_file in
3513    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3514    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3515  esac
3516done
3517rm -f $ac_rmfiles
3518
3519if { { ac_try="$ac_link_default"
3520case "(($ac_try" in
3521  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3522  *) ac_try_echo=$ac_try;;
3523esac
3524eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3525$as_echo "$ac_try_echo"; } >&5
3526  (eval "$ac_link_default") 2>&5
3527  ac_status=$?
3528  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3529  test $ac_status = 0; }; then :
3530  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3531# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3532# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3533# so that the user can short-circuit this test for compilers unknown to
3534# Autoconf.
3535for ac_file in $ac_files ''
3536do
3537  test -f "$ac_file" || continue
3538  case $ac_file in
3539    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3540	;;
3541    [ab].out )
3542	# We found the default executable, but exeext='' is most
3543	# certainly right.
3544	break;;
3545    *.* )
3546	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3547	then :; else
3548	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3549	fi
3550	# We set ac_cv_exeext here because the later test for it is not
3551	# safe: cross compilers may not add the suffix if given an `-o'
3552	# argument, so we may need to know it at that point already.
3553	# Even if this section looks crufty: it has the advantage of
3554	# actually working.
3555	break;;
3556    * )
3557	break;;
3558  esac
3559done
3560test "$ac_cv_exeext" = no && ac_cv_exeext=
3561
3562else
3563  ac_file=''
3564fi
3565if test -z "$ac_file"; then :
3566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3567$as_echo "no" >&6; }
3568$as_echo "$as_me: failed program was:" >&5
3569sed 's/^/| /' conftest.$ac_ext >&5
3570
3571{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3572$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3573as_fn_error 77 "C compiler cannot create executables
3574See \`config.log' for more details" "$LINENO" 5; }
3575else
3576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3577$as_echo "yes" >&6; }
3578fi
3579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3580$as_echo_n "checking for C compiler default output file name... " >&6; }
3581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3582$as_echo "$ac_file" >&6; }
3583ac_exeext=$ac_cv_exeext
3584
3585rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3586ac_clean_files=$ac_clean_files_save
3587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3588$as_echo_n "checking for suffix of executables... " >&6; }
3589if { { ac_try="$ac_link"
3590case "(($ac_try" in
3591  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3592  *) ac_try_echo=$ac_try;;
3593esac
3594eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3595$as_echo "$ac_try_echo"; } >&5
3596  (eval "$ac_link") 2>&5
3597  ac_status=$?
3598  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3599  test $ac_status = 0; }; then :
3600  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3601# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3602# work properly (i.e., refer to `conftest.exe'), while it won't with
3603# `rm'.
3604for ac_file in conftest.exe conftest conftest.*; do
3605  test -f "$ac_file" || continue
3606  case $ac_file in
3607    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3608    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3609	  break;;
3610    * ) break;;
3611  esac
3612done
3613else
3614  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3615$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3616as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3617See \`config.log' for more details" "$LINENO" 5; }
3618fi
3619rm -f conftest conftest$ac_cv_exeext
3620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3621$as_echo "$ac_cv_exeext" >&6; }
3622
3623rm -f conftest.$ac_ext
3624EXEEXT=$ac_cv_exeext
3625ac_exeext=$EXEEXT
3626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3627/* end confdefs.h.  */
3628#include <stdio.h>
3629int
3630main ()
3631{
3632FILE *f = fopen ("conftest.out", "w");
3633 return ferror (f) || fclose (f) != 0;
3634
3635  ;
3636  return 0;
3637}
3638_ACEOF
3639ac_clean_files="$ac_clean_files conftest.out"
3640# Check that the compiler produces executables we can run.  If not, either
3641# the compiler is broken, or we cross compile.
3642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3643$as_echo_n "checking whether we are cross compiling... " >&6; }
3644if test "$cross_compiling" != yes; then
3645  { { ac_try="$ac_link"
3646case "(($ac_try" in
3647  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3648  *) ac_try_echo=$ac_try;;
3649esac
3650eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3651$as_echo "$ac_try_echo"; } >&5
3652  (eval "$ac_link") 2>&5
3653  ac_status=$?
3654  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3655  test $ac_status = 0; }
3656  if { ac_try='./conftest$ac_cv_exeext'
3657  { { case "(($ac_try" in
3658  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3659  *) ac_try_echo=$ac_try;;
3660esac
3661eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3662$as_echo "$ac_try_echo"; } >&5
3663  (eval "$ac_try") 2>&5
3664  ac_status=$?
3665  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3666  test $ac_status = 0; }; }; then
3667    cross_compiling=no
3668  else
3669    if test "$cross_compiling" = maybe; then
3670	cross_compiling=yes
3671    else
3672	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3673$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3674as_fn_error $? "cannot run C compiled programs.
3675If you meant to cross compile, use \`--host'.
3676See \`config.log' for more details" "$LINENO" 5; }
3677    fi
3678  fi
3679fi
3680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3681$as_echo "$cross_compiling" >&6; }
3682
3683rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3684ac_clean_files=$ac_clean_files_save
3685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3686$as_echo_n "checking for suffix of object files... " >&6; }
3687if ${ac_cv_objext+:} false; then :
3688  $as_echo_n "(cached) " >&6
3689else
3690  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3691/* end confdefs.h.  */
3692
3693int
3694main ()
3695{
3696
3697  ;
3698  return 0;
3699}
3700_ACEOF
3701rm -f conftest.o conftest.obj
3702if { { ac_try="$ac_compile"
3703case "(($ac_try" in
3704  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3705  *) ac_try_echo=$ac_try;;
3706esac
3707eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3708$as_echo "$ac_try_echo"; } >&5
3709  (eval "$ac_compile") 2>&5
3710  ac_status=$?
3711  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3712  test $ac_status = 0; }; then :
3713  for ac_file in conftest.o conftest.obj conftest.*; do
3714  test -f "$ac_file" || continue;
3715  case $ac_file in
3716    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3717    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3718       break;;
3719  esac
3720done
3721else
3722  $as_echo "$as_me: failed program was:" >&5
3723sed 's/^/| /' conftest.$ac_ext >&5
3724
3725{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3726$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3727as_fn_error $? "cannot compute suffix of object files: cannot compile
3728See \`config.log' for more details" "$LINENO" 5; }
3729fi
3730rm -f conftest.$ac_cv_objext conftest.$ac_ext
3731fi
3732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3733$as_echo "$ac_cv_objext" >&6; }
3734OBJEXT=$ac_cv_objext
3735ac_objext=$OBJEXT
3736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3737$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3738if ${ac_cv_c_compiler_gnu+:} false; then :
3739  $as_echo_n "(cached) " >&6
3740else
3741  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3742/* end confdefs.h.  */
3743
3744int
3745main ()
3746{
3747#ifndef __GNUC__
3748       choke me
3749#endif
3750
3751  ;
3752  return 0;
3753}
3754_ACEOF
3755if ac_fn_c_try_compile "$LINENO"; then :
3756  ac_compiler_gnu=yes
3757else
3758  ac_compiler_gnu=no
3759fi
3760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3761ac_cv_c_compiler_gnu=$ac_compiler_gnu
3762
3763fi
3764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3765$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3766if test $ac_compiler_gnu = yes; then
3767  GCC=yes
3768else
3769  GCC=
3770fi
3771ac_test_CFLAGS=${CFLAGS+set}
3772ac_save_CFLAGS=$CFLAGS
3773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3774$as_echo_n "checking whether $CC accepts -g... " >&6; }
3775if ${ac_cv_prog_cc_g+:} false; then :
3776  $as_echo_n "(cached) " >&6
3777else
3778  ac_save_c_werror_flag=$ac_c_werror_flag
3779   ac_c_werror_flag=yes
3780   ac_cv_prog_cc_g=no
3781   CFLAGS="-g"
3782   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3783/* end confdefs.h.  */
3784
3785int
3786main ()
3787{
3788
3789  ;
3790  return 0;
3791}
3792_ACEOF
3793if ac_fn_c_try_compile "$LINENO"; then :
3794  ac_cv_prog_cc_g=yes
3795else
3796  CFLAGS=""
3797      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3798/* end confdefs.h.  */
3799
3800int
3801main ()
3802{
3803
3804  ;
3805  return 0;
3806}
3807_ACEOF
3808if ac_fn_c_try_compile "$LINENO"; then :
3809
3810else
3811  ac_c_werror_flag=$ac_save_c_werror_flag
3812	 CFLAGS="-g"
3813	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3814/* end confdefs.h.  */
3815
3816int
3817main ()
3818{
3819
3820  ;
3821  return 0;
3822}
3823_ACEOF
3824if ac_fn_c_try_compile "$LINENO"; then :
3825  ac_cv_prog_cc_g=yes
3826fi
3827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3828fi
3829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3830fi
3831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3832   ac_c_werror_flag=$ac_save_c_werror_flag
3833fi
3834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3835$as_echo "$ac_cv_prog_cc_g" >&6; }
3836if test "$ac_test_CFLAGS" = set; then
3837  CFLAGS=$ac_save_CFLAGS
3838elif test $ac_cv_prog_cc_g = yes; then
3839  if test "$GCC" = yes; then
3840    CFLAGS="-g -O2"
3841  else
3842    CFLAGS="-g"
3843  fi
3844else
3845  if test "$GCC" = yes; then
3846    CFLAGS="-O2"
3847  else
3848    CFLAGS=
3849  fi
3850fi
3851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3852$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3853if ${ac_cv_prog_cc_c89+:} false; then :
3854  $as_echo_n "(cached) " >&6
3855else
3856  ac_cv_prog_cc_c89=no
3857ac_save_CC=$CC
3858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3859/* end confdefs.h.  */
3860#include <stdarg.h>
3861#include <stdio.h>
3862struct stat;
3863/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3864struct buf { int x; };
3865FILE * (*rcsopen) (struct buf *, struct stat *, int);
3866static char *e (p, i)
3867     char **p;
3868     int i;
3869{
3870  return p[i];
3871}
3872static char *f (char * (*g) (char **, int), char **p, ...)
3873{
3874  char *s;
3875  va_list v;
3876  va_start (v,p);
3877  s = g (p, va_arg (v,int));
3878  va_end (v);
3879  return s;
3880}
3881
3882/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3883   function prototypes and stuff, but not '\xHH' hex character constants.
3884   These don't provoke an error unfortunately, instead are silently treated
3885   as 'x'.  The following induces an error, until -std is added to get
3886   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3887   array size at least.  It's necessary to write '\x00'==0 to get something
3888   that's true only with -std.  */
3889int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3890
3891/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3892   inside strings and character constants.  */
3893#define FOO(x) 'x'
3894int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3895
3896int test (int i, double x);
3897struct s1 {int (*f) (int a);};
3898struct s2 {int (*f) (double a);};
3899int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3900int argc;
3901char **argv;
3902int
3903main ()
3904{
3905return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3906  ;
3907  return 0;
3908}
3909_ACEOF
3910for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3911	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3912do
3913  CC="$ac_save_CC $ac_arg"
3914  if ac_fn_c_try_compile "$LINENO"; then :
3915  ac_cv_prog_cc_c89=$ac_arg
3916fi
3917rm -f core conftest.err conftest.$ac_objext
3918  test "x$ac_cv_prog_cc_c89" != "xno" && break
3919done
3920rm -f conftest.$ac_ext
3921CC=$ac_save_CC
3922
3923fi
3924# AC_CACHE_VAL
3925case "x$ac_cv_prog_cc_c89" in
3926  x)
3927    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3928$as_echo "none needed" >&6; } ;;
3929  xno)
3930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3931$as_echo "unsupported" >&6; } ;;
3932  *)
3933    CC="$CC $ac_cv_prog_cc_c89"
3934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3935$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3936esac
3937if test "x$ac_cv_prog_cc_c89" != xno; then :
3938
3939fi
3940
3941ac_ext=c
3942ac_cpp='$CPP $CPPFLAGS'
3943ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3944ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3945ac_compiler_gnu=$ac_cv_c_compiler_gnu
3946
3947   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
3948$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
3949if ${ac_cv_prog_cc_c99+:} false; then :
3950  $as_echo_n "(cached) " >&6
3951else
3952  ac_cv_prog_cc_c99=no
3953ac_save_CC=$CC
3954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3955/* end confdefs.h.  */
3956#include <stdarg.h>
3957#include <stdbool.h>
3958#include <stdlib.h>
3959#include <wchar.h>
3960#include <stdio.h>
3961
3962// Check varargs macros.  These examples are taken from C99 6.10.3.5.
3963#define debug(...) fprintf (stderr, __VA_ARGS__)
3964#define showlist(...) puts (#__VA_ARGS__)
3965#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
3966static void
3967test_varargs_macros (void)
3968{
3969  int x = 1234;
3970  int y = 5678;
3971  debug ("Flag");
3972  debug ("X = %d\n", x);
3973  showlist (The first, second, and third items.);
3974  report (x>y, "x is %d but y is %d", x, y);
3975}
3976
3977// Check long long types.
3978#define BIG64 18446744073709551615ull
3979#define BIG32 4294967295ul
3980#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
3981#if !BIG_OK
3982  your preprocessor is broken;
3983#endif
3984#if BIG_OK
3985#else
3986  your preprocessor is broken;
3987#endif
3988static long long int bignum = -9223372036854775807LL;
3989static unsigned long long int ubignum = BIG64;
3990
3991struct incomplete_array
3992{
3993  int datasize;
3994  double data[];
3995};
3996
3997struct named_init {
3998  int number;
3999  const wchar_t *name;
4000  double average;
4001};
4002
4003typedef const char *ccp;
4004
4005static inline int
4006test_restrict (ccp restrict text)
4007{
4008  // See if C++-style comments work.
4009  // Iterate through items via the restricted pointer.
4010  // Also check for declarations in for loops.
4011  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4012    continue;
4013  return 0;
4014}
4015
4016// Check varargs and va_copy.
4017static void
4018test_varargs (const char *format, ...)
4019{
4020  va_list args;
4021  va_start (args, format);
4022  va_list args_copy;
4023  va_copy (args_copy, args);
4024
4025  const char *str;
4026  int number;
4027  float fnumber;
4028
4029  while (*format)
4030    {
4031      switch (*format++)
4032	{
4033	case 's': // string
4034	  str = va_arg (args_copy, const char *);
4035	  break;
4036	case 'd': // int
4037	  number = va_arg (args_copy, int);
4038	  break;
4039	case 'f': // float
4040	  fnumber = va_arg (args_copy, double);
4041	  break;
4042	default:
4043	  break;
4044	}
4045    }
4046  va_end (args_copy);
4047  va_end (args);
4048}
4049
4050int
4051main ()
4052{
4053
4054  // Check bool.
4055  _Bool success = false;
4056
4057  // Check restrict.
4058  if (test_restrict ("String literal") == 0)
4059    success = true;
4060  char *restrict newvar = "Another string";
4061
4062  // Check varargs.
4063  test_varargs ("s, d' f .", "string", 65, 34.234);
4064  test_varargs_macros ();
4065
4066  // Check flexible array members.
4067  struct incomplete_array *ia =
4068    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4069  ia->datasize = 10;
4070  for (int i = 0; i < ia->datasize; ++i)
4071    ia->data[i] = i * 1.234;
4072
4073  // Check named initializers.
4074  struct named_init ni = {
4075    .number = 34,
4076    .name = L"Test wide string",
4077    .average = 543.34343,
4078  };
4079
4080  ni.number = 58;
4081
4082  int dynamic_array[ni.number];
4083  dynamic_array[ni.number - 1] = 543;
4084
4085  // work around unused variable warnings
4086  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4087	  || dynamic_array[ni.number - 1] != 543);
4088
4089  ;
4090  return 0;
4091}
4092_ACEOF
4093for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4094do
4095  CC="$ac_save_CC $ac_arg"
4096  if ac_fn_c_try_compile "$LINENO"; then :
4097  ac_cv_prog_cc_c99=$ac_arg
4098fi
4099rm -f core conftest.err conftest.$ac_objext
4100  test "x$ac_cv_prog_cc_c99" != "xno" && break
4101done
4102rm -f conftest.$ac_ext
4103CC=$ac_save_CC
4104
4105fi
4106# AC_CACHE_VAL
4107case "x$ac_cv_prog_cc_c99" in
4108  x)
4109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4110$as_echo "none needed" >&6; } ;;
4111  xno)
4112    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4113$as_echo "unsupported" >&6; } ;;
4114  *)
4115    CC="$CC $ac_cv_prog_cc_c99"
4116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4117$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4118esac
4119if test "x$ac_cv_prog_cc_c99" != xno; then :
4120
4121fi
4122
4123
4124if test "$ac_cv_prog_cc_c99" = "no"; then
4125	as_fn_error $? "The C compiler does not support C99" "$LINENO" 5
4126fi
4127
4128#
4129# Get the size of a void *, to determine whether this is a 32-bit
4130# or 64-bit build.
4131#
4132
4133ac_ext=c
4134ac_cpp='$CPP $CPPFLAGS'
4135ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4136ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4137ac_compiler_gnu=$ac_cv_c_compiler_gnu
4138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4139$as_echo_n "checking how to run the C preprocessor... " >&6; }
4140# On Suns, sometimes $CPP names a directory.
4141if test -n "$CPP" && test -d "$CPP"; then
4142  CPP=
4143fi
4144if test -z "$CPP"; then
4145  if ${ac_cv_prog_CPP+:} false; then :
4146  $as_echo_n "(cached) " >&6
4147else
4148      # Double quotes because CPP needs to be expanded
4149    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4150    do
4151      ac_preproc_ok=false
4152for ac_c_preproc_warn_flag in '' yes
4153do
4154  # Use a header file that comes with gcc, so configuring glibc
4155  # with a fresh cross-compiler works.
4156  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4157  # <limits.h> exists even on freestanding compilers.
4158  # On the NeXT, cc -E runs the code through the compiler's parser,
4159  # not just through cpp. "Syntax error" is here to catch this case.
4160  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4161/* end confdefs.h.  */
4162#ifdef __STDC__
4163# include <limits.h>
4164#else
4165# include <assert.h>
4166#endif
4167		     Syntax error
4168_ACEOF
4169if ac_fn_c_try_cpp "$LINENO"; then :
4170
4171else
4172  # Broken: fails on valid input.
4173continue
4174fi
4175rm -f conftest.err conftest.i conftest.$ac_ext
4176
4177  # OK, works on sane cases.  Now check whether nonexistent headers
4178  # can be detected and how.
4179  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4180/* end confdefs.h.  */
4181#include <ac_nonexistent.h>
4182_ACEOF
4183if ac_fn_c_try_cpp "$LINENO"; then :
4184  # Broken: success on invalid input.
4185continue
4186else
4187  # Passes both tests.
4188ac_preproc_ok=:
4189break
4190fi
4191rm -f conftest.err conftest.i conftest.$ac_ext
4192
4193done
4194# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4195rm -f conftest.i conftest.err conftest.$ac_ext
4196if $ac_preproc_ok; then :
4197  break
4198fi
4199
4200    done
4201    ac_cv_prog_CPP=$CPP
4202
4203fi
4204  CPP=$ac_cv_prog_CPP
4205else
4206  ac_cv_prog_CPP=$CPP
4207fi
4208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4209$as_echo "$CPP" >&6; }
4210ac_preproc_ok=false
4211for ac_c_preproc_warn_flag in '' yes
4212do
4213  # Use a header file that comes with gcc, so configuring glibc
4214  # with a fresh cross-compiler works.
4215  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4216  # <limits.h> exists even on freestanding compilers.
4217  # On the NeXT, cc -E runs the code through the compiler's parser,
4218  # not just through cpp. "Syntax error" is here to catch this case.
4219  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4220/* end confdefs.h.  */
4221#ifdef __STDC__
4222# include <limits.h>
4223#else
4224# include <assert.h>
4225#endif
4226		     Syntax error
4227_ACEOF
4228if ac_fn_c_try_cpp "$LINENO"; then :
4229
4230else
4231  # Broken: fails on valid input.
4232continue
4233fi
4234rm -f conftest.err conftest.i conftest.$ac_ext
4235
4236  # OK, works on sane cases.  Now check whether nonexistent headers
4237  # can be detected and how.
4238  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4239/* end confdefs.h.  */
4240#include <ac_nonexistent.h>
4241_ACEOF
4242if ac_fn_c_try_cpp "$LINENO"; then :
4243  # Broken: success on invalid input.
4244continue
4245else
4246  # Passes both tests.
4247ac_preproc_ok=:
4248break
4249fi
4250rm -f conftest.err conftest.i conftest.$ac_ext
4251
4252done
4253# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4254rm -f conftest.i conftest.err conftest.$ac_ext
4255if $ac_preproc_ok; then :
4256
4257else
4258  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4259$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4260as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4261See \`config.log' for more details" "$LINENO" 5; }
4262fi
4263
4264ac_ext=c
4265ac_cpp='$CPP $CPPFLAGS'
4266ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4267ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4268ac_compiler_gnu=$ac_cv_c_compiler_gnu
4269
4270
4271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4272$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4273if ${ac_cv_path_GREP+:} false; then :
4274  $as_echo_n "(cached) " >&6
4275else
4276  if test -z "$GREP"; then
4277  ac_path_GREP_found=false
4278  # Loop through the user's path and test for each of PROGNAME-LIST
4279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4280for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4281do
4282  IFS=$as_save_IFS
4283  test -z "$as_dir" && as_dir=.
4284    for ac_prog in grep ggrep; do
4285    for ac_exec_ext in '' $ac_executable_extensions; do
4286      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4287      as_fn_executable_p "$ac_path_GREP" || continue
4288# Check for GNU ac_path_GREP and select it if it is found.
4289  # Check for GNU $ac_path_GREP
4290case `"$ac_path_GREP" --version 2>&1` in
4291*GNU*)
4292  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4293*)
4294  ac_count=0
4295  $as_echo_n 0123456789 >"conftest.in"
4296  while :
4297  do
4298    cat "conftest.in" "conftest.in" >"conftest.tmp"
4299    mv "conftest.tmp" "conftest.in"
4300    cp "conftest.in" "conftest.nl"
4301    $as_echo 'GREP' >> "conftest.nl"
4302    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4303    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4304    as_fn_arith $ac_count + 1 && ac_count=$as_val
4305    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4306      # Best one so far, save it but keep looking for a better one
4307      ac_cv_path_GREP="$ac_path_GREP"
4308      ac_path_GREP_max=$ac_count
4309    fi
4310    # 10*(2^10) chars as input seems more than enough
4311    test $ac_count -gt 10 && break
4312  done
4313  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4314esac
4315
4316      $ac_path_GREP_found && break 3
4317    done
4318  done
4319  done
4320IFS=$as_save_IFS
4321  if test -z "$ac_cv_path_GREP"; then
4322    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4323  fi
4324else
4325  ac_cv_path_GREP=$GREP
4326fi
4327
4328fi
4329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4330$as_echo "$ac_cv_path_GREP" >&6; }
4331 GREP="$ac_cv_path_GREP"
4332
4333
4334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4335$as_echo_n "checking for egrep... " >&6; }
4336if ${ac_cv_path_EGREP+:} false; then :
4337  $as_echo_n "(cached) " >&6
4338else
4339  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4340   then ac_cv_path_EGREP="$GREP -E"
4341   else
4342     if test -z "$EGREP"; then
4343  ac_path_EGREP_found=false
4344  # Loop through the user's path and test for each of PROGNAME-LIST
4345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4346for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4347do
4348  IFS=$as_save_IFS
4349  test -z "$as_dir" && as_dir=.
4350    for ac_prog in egrep; do
4351    for ac_exec_ext in '' $ac_executable_extensions; do
4352      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4353      as_fn_executable_p "$ac_path_EGREP" || continue
4354# Check for GNU ac_path_EGREP and select it if it is found.
4355  # Check for GNU $ac_path_EGREP
4356case `"$ac_path_EGREP" --version 2>&1` in
4357*GNU*)
4358  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4359*)
4360  ac_count=0
4361  $as_echo_n 0123456789 >"conftest.in"
4362  while :
4363  do
4364    cat "conftest.in" "conftest.in" >"conftest.tmp"
4365    mv "conftest.tmp" "conftest.in"
4366    cp "conftest.in" "conftest.nl"
4367    $as_echo 'EGREP' >> "conftest.nl"
4368    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4369    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4370    as_fn_arith $ac_count + 1 && ac_count=$as_val
4371    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4372      # Best one so far, save it but keep looking for a better one
4373      ac_cv_path_EGREP="$ac_path_EGREP"
4374      ac_path_EGREP_max=$ac_count
4375    fi
4376    # 10*(2^10) chars as input seems more than enough
4377    test $ac_count -gt 10 && break
4378  done
4379  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4380esac
4381
4382      $ac_path_EGREP_found && break 3
4383    done
4384  done
4385  done
4386IFS=$as_save_IFS
4387  if test -z "$ac_cv_path_EGREP"; then
4388    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4389  fi
4390else
4391  ac_cv_path_EGREP=$EGREP
4392fi
4393
4394   fi
4395fi
4396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4397$as_echo "$ac_cv_path_EGREP" >&6; }
4398 EGREP="$ac_cv_path_EGREP"
4399
4400
4401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4402$as_echo_n "checking for ANSI C header files... " >&6; }
4403if ${ac_cv_header_stdc+:} false; then :
4404  $as_echo_n "(cached) " >&6
4405else
4406  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4407/* end confdefs.h.  */
4408#include <stdlib.h>
4409#include <stdarg.h>
4410#include <string.h>
4411#include <float.h>
4412
4413int
4414main ()
4415{
4416
4417  ;
4418  return 0;
4419}
4420_ACEOF
4421if ac_fn_c_try_compile "$LINENO"; then :
4422  ac_cv_header_stdc=yes
4423else
4424  ac_cv_header_stdc=no
4425fi
4426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4427
4428if test $ac_cv_header_stdc = yes; then
4429  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4430  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4431/* end confdefs.h.  */
4432#include <string.h>
4433
4434_ACEOF
4435if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4436  $EGREP "memchr" >/dev/null 2>&1; then :
4437
4438else
4439  ac_cv_header_stdc=no
4440fi
4441rm -f conftest*
4442
4443fi
4444
4445if test $ac_cv_header_stdc = yes; then
4446  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4447  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4448/* end confdefs.h.  */
4449#include <stdlib.h>
4450
4451_ACEOF
4452if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4453  $EGREP "free" >/dev/null 2>&1; then :
4454
4455else
4456  ac_cv_header_stdc=no
4457fi
4458rm -f conftest*
4459
4460fi
4461
4462if test $ac_cv_header_stdc = yes; then
4463  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4464  if test "$cross_compiling" = yes; then :
4465  :
4466else
4467  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4468/* end confdefs.h.  */
4469#include <ctype.h>
4470#include <stdlib.h>
4471#if ((' ' & 0x0FF) == 0x020)
4472# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4473# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4474#else
4475# define ISLOWER(c) \
4476		   (('a' <= (c) && (c) <= 'i') \
4477		     || ('j' <= (c) && (c) <= 'r') \
4478		     || ('s' <= (c) && (c) <= 'z'))
4479# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4480#endif
4481
4482#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4483int
4484main ()
4485{
4486  int i;
4487  for (i = 0; i < 256; i++)
4488    if (XOR (islower (i), ISLOWER (i))
4489	|| toupper (i) != TOUPPER (i))
4490      return 2;
4491  return 0;
4492}
4493_ACEOF
4494if ac_fn_c_try_run "$LINENO"; then :
4495
4496else
4497  ac_cv_header_stdc=no
4498fi
4499rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4500  conftest.$ac_objext conftest.beam conftest.$ac_ext
4501fi
4502
4503fi
4504fi
4505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4506$as_echo "$ac_cv_header_stdc" >&6; }
4507if test $ac_cv_header_stdc = yes; then
4508
4509$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4510
4511fi
4512
4513# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4514for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4515		  inttypes.h stdint.h unistd.h
4516do :
4517  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4518ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4519"
4520if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4521  cat >>confdefs.h <<_ACEOF
4522#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4523_ACEOF
4524
4525fi
4526
4527done
4528
4529
4530# The cast to long int works around a bug in the HP C Compiler
4531# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4532# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4533# This bug is HP SR number 8606223364.
4534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
4535$as_echo_n "checking size of void *... " >&6; }
4536if ${ac_cv_sizeof_void_p+:} false; then :
4537  $as_echo_n "(cached) " >&6
4538else
4539  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
4540
4541else
4542  if test "$ac_cv_type_void_p" = yes; then
4543     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4544$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4545as_fn_error 77 "cannot compute sizeof (void *)
4546See \`config.log' for more details" "$LINENO" 5; }
4547   else
4548     ac_cv_sizeof_void_p=0
4549   fi
4550fi
4551
4552fi
4553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
4554$as_echo "$ac_cv_sizeof_void_p" >&6; }
4555
4556
4557
4558cat >>confdefs.h <<_ACEOF
4559#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4560_ACEOF
4561
4562
4563ac_lbl_c_sizeof_void_p="$ac_cv_sizeof_void_p"
4564
4565#
4566# We only need a C++ compiler for Haiku; all code except for its
4567# pcap module is in C.
4568#
4569case "$host_os" in
4570haiku*)
4571	ac_ext=cpp
4572ac_cpp='$CXXCPP $CPPFLAGS'
4573ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4574ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4575ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4576if test -z "$CXX"; then
4577  if test -n "$CCC"; then
4578    CXX=$CCC
4579  else
4580    if test -n "$ac_tool_prefix"; then
4581  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4582  do
4583    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4584set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4586$as_echo_n "checking for $ac_word... " >&6; }
4587if ${ac_cv_prog_CXX+:} false; then :
4588  $as_echo_n "(cached) " >&6
4589else
4590  if test -n "$CXX"; then
4591  ac_cv_prog_CXX="$CXX" # Let the user override the test.
4592else
4593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4594for as_dir in $PATH
4595do
4596  IFS=$as_save_IFS
4597  test -z "$as_dir" && as_dir=.
4598    for ac_exec_ext in '' $ac_executable_extensions; do
4599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4600    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4602    break 2
4603  fi
4604done
4605  done
4606IFS=$as_save_IFS
4607
4608fi
4609fi
4610CXX=$ac_cv_prog_CXX
4611if test -n "$CXX"; then
4612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4613$as_echo "$CXX" >&6; }
4614else
4615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4616$as_echo "no" >&6; }
4617fi
4618
4619
4620    test -n "$CXX" && break
4621  done
4622fi
4623if test -z "$CXX"; then
4624  ac_ct_CXX=$CXX
4625  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4626do
4627  # Extract the first word of "$ac_prog", so it can be a program name with args.
4628set dummy $ac_prog; ac_word=$2
4629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4630$as_echo_n "checking for $ac_word... " >&6; }
4631if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4632  $as_echo_n "(cached) " >&6
4633else
4634  if test -n "$ac_ct_CXX"; then
4635  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4636else
4637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4638for as_dir in $PATH
4639do
4640  IFS=$as_save_IFS
4641  test -z "$as_dir" && as_dir=.
4642    for ac_exec_ext in '' $ac_executable_extensions; do
4643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4644    ac_cv_prog_ac_ct_CXX="$ac_prog"
4645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4646    break 2
4647  fi
4648done
4649  done
4650IFS=$as_save_IFS
4651
4652fi
4653fi
4654ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4655if test -n "$ac_ct_CXX"; then
4656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4657$as_echo "$ac_ct_CXX" >&6; }
4658else
4659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4660$as_echo "no" >&6; }
4661fi
4662
4663
4664  test -n "$ac_ct_CXX" && break
4665done
4666
4667  if test "x$ac_ct_CXX" = x; then
4668    CXX="g++"
4669  else
4670    case $cross_compiling:$ac_tool_warned in
4671yes:)
4672{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4673$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4674ac_tool_warned=yes ;;
4675esac
4676    CXX=$ac_ct_CXX
4677  fi
4678fi
4679
4680  fi
4681fi
4682# Provide some information about the compiler.
4683$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4684set X $ac_compile
4685ac_compiler=$2
4686for ac_option in --version -v -V -qversion; do
4687  { { ac_try="$ac_compiler $ac_option >&5"
4688case "(($ac_try" in
4689  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4690  *) ac_try_echo=$ac_try;;
4691esac
4692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4693$as_echo "$ac_try_echo"; } >&5
4694  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4695  ac_status=$?
4696  if test -s conftest.err; then
4697    sed '10a\
4698... rest of stderr output deleted ...
4699         10q' conftest.err >conftest.er1
4700    cat conftest.er1 >&5
4701  fi
4702  rm -f conftest.er1 conftest.err
4703  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4704  test $ac_status = 0; }
4705done
4706
4707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4708$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4709if ${ac_cv_cxx_compiler_gnu+:} false; then :
4710  $as_echo_n "(cached) " >&6
4711else
4712  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4713/* end confdefs.h.  */
4714
4715int
4716main ()
4717{
4718#ifndef __GNUC__
4719       choke me
4720#endif
4721
4722  ;
4723  return 0;
4724}
4725_ACEOF
4726if ac_fn_cxx_try_compile "$LINENO"; then :
4727  ac_compiler_gnu=yes
4728else
4729  ac_compiler_gnu=no
4730fi
4731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4732ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4733
4734fi
4735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4736$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4737if test $ac_compiler_gnu = yes; then
4738  GXX=yes
4739else
4740  GXX=
4741fi
4742ac_test_CXXFLAGS=${CXXFLAGS+set}
4743ac_save_CXXFLAGS=$CXXFLAGS
4744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4745$as_echo_n "checking whether $CXX accepts -g... " >&6; }
4746if ${ac_cv_prog_cxx_g+:} false; then :
4747  $as_echo_n "(cached) " >&6
4748else
4749  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4750   ac_cxx_werror_flag=yes
4751   ac_cv_prog_cxx_g=no
4752   CXXFLAGS="-g"
4753   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4754/* end confdefs.h.  */
4755
4756int
4757main ()
4758{
4759
4760  ;
4761  return 0;
4762}
4763_ACEOF
4764if ac_fn_cxx_try_compile "$LINENO"; then :
4765  ac_cv_prog_cxx_g=yes
4766else
4767  CXXFLAGS=""
4768      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4769/* end confdefs.h.  */
4770
4771int
4772main ()
4773{
4774
4775  ;
4776  return 0;
4777}
4778_ACEOF
4779if ac_fn_cxx_try_compile "$LINENO"; then :
4780
4781else
4782  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4783	 CXXFLAGS="-g"
4784	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4785/* end confdefs.h.  */
4786
4787int
4788main ()
4789{
4790
4791  ;
4792  return 0;
4793}
4794_ACEOF
4795if ac_fn_cxx_try_compile "$LINENO"; then :
4796  ac_cv_prog_cxx_g=yes
4797fi
4798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4799fi
4800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4801fi
4802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4803   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4804fi
4805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4806$as_echo "$ac_cv_prog_cxx_g" >&6; }
4807if test "$ac_test_CXXFLAGS" = set; then
4808  CXXFLAGS=$ac_save_CXXFLAGS
4809elif test $ac_cv_prog_cxx_g = yes; then
4810  if test "$GXX" = yes; then
4811    CXXFLAGS="-g -O2"
4812  else
4813    CXXFLAGS="-g"
4814  fi
4815else
4816  if test "$GXX" = yes; then
4817    CXXFLAGS="-O2"
4818  else
4819    CXXFLAGS=
4820  fi
4821fi
4822ac_ext=c
4823ac_cpp='$CPP $CPPFLAGS'
4824ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4825ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4826ac_compiler_gnu=$ac_cv_c_compiler_gnu
4827
4828
4829	#
4830	# Make sure C and C++ have the same pointer sizes with the flags
4831	# they're given; if they don't, it means that the compilers for the
4832	# languages will, with those flags, not produce code that can be
4833	# linked together.
4834	#
4835	# We have to use different data types, because the results of
4836	# a test are cached, so if we test for the size of a given type
4837	# in C, the subsequent test in C++ will use the cached variable.
4838	# We trick autoconf by testing the size of a "void *" in C and a
4839	# "const void *" in C++.
4840	#
4841	ac_ext=cpp
4842ac_cpp='$CXXCPP $CPPFLAGS'
4843ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4844ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4845ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4846
4847
4848# The cast to long int works around a bug in the HP C Compiler
4849# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4850# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4851# This bug is HP SR number 8606223364.
4852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of const void *" >&5
4853$as_echo_n "checking size of const void *... " >&6; }
4854if ${ac_cv_sizeof_const_void_p+:} false; then :
4855  $as_echo_n "(cached) " >&6
4856else
4857  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (const void *))" "ac_cv_sizeof_const_void_p"        "$ac_includes_default"; then :
4858
4859else
4860  if test "$ac_cv_type_const_void_p" = yes; then
4861     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4863as_fn_error 77 "cannot compute sizeof (const void *)
4864See \`config.log' for more details" "$LINENO" 5; }
4865   else
4866     ac_cv_sizeof_const_void_p=0
4867   fi
4868fi
4869
4870fi
4871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_const_void_p" >&5
4872$as_echo "$ac_cv_sizeof_const_void_p" >&6; }
4873
4874
4875
4876cat >>confdefs.h <<_ACEOF
4877#define SIZEOF_CONST_VOID_P $ac_cv_sizeof_const_void_p
4878_ACEOF
4879
4880
4881	ac_lbl_cxx_sizeof_void_p="$ac_cv_sizeof_const_void_p"
4882	ac_ext=c
4883ac_cpp='$CPP $CPPFLAGS'
4884ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4885ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4886ac_compiler_gnu=$ac_cv_c_compiler_gnu
4887
4888	if test "$ac_lbl_cxx_sizeof_void_p" -eq 0; then
4889		as_fn_error $? "No C++ compiler was found" "$LINENO" 5
4890	fi
4891	if test "$ac_lbl_c_sizeof_void_p" -ne "$ac_lbl_cxx_sizeof_void_p"; then
4892		as_fn_error $? "C compiler $CC produces code with $ac_lbl_c_sizeof_void_p-byte pointers
4893while C++ compiler $CXX produces code with $ac_lbl_cxx_sizeof_void_p-byte pointers.  This prevents
4894code in those languages from being combined." "$LINENO" 5
4895	fi
4896	;;
4897esac
4898
4899
4900
4901
4902
4903    if test "$GCC" = yes ; then
4904	    #
4905	    # -Werror forces warnings to be errors.
4906	    #
4907	    ac_lbl_cc_force_warning_errors=-Werror
4908
4909	    #
4910	    # Try to have the compiler default to hiding symbols,
4911	    # so that only symbols explicitly exported with
4912	    # PCAP_API will be visible outside (shared) libraries.
4913	    #
4914
4915	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
4916$as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
4917	save_CFLAGS="$CFLAGS"
4918	CFLAGS="$CFLAGS -fvisibility=hidden"
4919	#
4920	# XXX - yes, this depends on the way AC_LANG_WERROR works,
4921	# but no mechanism is provided to turn AC_LANG_WERROR on
4922	# *and then turn it back off*, so that we *only* do it when
4923	# testing compiler options - 15 years after somebody asked
4924	# for it:
4925	#
4926	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
4927	#
4928	save_ac_c_werror_flag="$ac_c_werror_flag"
4929	ac_c_werror_flag=yes
4930	#
4931	# We use AC_LANG_SOURCE() so that we can control the complete
4932	# content of the program being compiled.  We do not, for example,
4933	# want the default "int main()" that AC_LANG_PROGRAM() generates,
4934	# as it will generate a warning with -Wold-style-definition, meaning
4935	# that we would treat it as not working, as the test will fail if
4936	# *any* error output, including a warning due to the flag we're
4937	# testing, is generated; see
4938	#
4939	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
4940	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
4941	#
4942	# This may, as per those two messages, be fixed in autoconf 2.70,
4943	# but we only require 2.64 or newer for now.
4944	#
4945	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4946/* end confdefs.h.  */
4947int main(void) { return 0; }
4948_ACEOF
4949if ac_fn_c_try_compile "$LINENO"; then :
4950
4951		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4952$as_echo "yes" >&6; }
4953		can_add_to_cflags=yes
4954		#
4955		# The compile supports this; do we have some C code for
4956		# which the warning should *not* appear?
4957		# We test the fourth argument because the third argument
4958		# could contain quotes, breaking the test.
4959		#
4960		if test "x" != "x"
4961		then
4962		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
4963		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5
4964$as_echo_n "checking whether -fvisibility=hidden ... " >&6; }
4965		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4966/* end confdefs.h.  */
4967
4968_ACEOF
4969if ac_fn_c_try_compile "$LINENO"; then :
4970
4971			#
4972			# Not a problem.
4973			#
4974			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4975$as_echo "no" >&6; }
4976
4977else
4978
4979			#
4980			# A problem.
4981			#
4982			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4983$as_echo "yes" >&6; }
4984			can_add_to_cflags=no
4985
4986fi
4987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4988		fi
4989		CFLAGS="$save_CFLAGS"
4990		if test x"$can_add_to_cflags" = "xyes"
4991		then
4992		    V_CCOPT="$V_CCOPT -fvisibility=hidden"
4993		fi
4994
4995else
4996
4997		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4998$as_echo "no" >&6; }
4999		CFLAGS="$save_CFLAGS"
5000
5001fi
5002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5003	ac_c_werror_flag="$save_ac_c_werror_flag"
5004
5005    else
5006	    V_INCLS="$V_INCLS -I/usr/local/include"
5007	    LDFLAGS="$LDFLAGS -L/usr/local/lib"
5008
5009	    case "$host_os" in
5010
5011	    darwin*)
5012		    #
5013		    # This is assumed either to be GCC or clang, both
5014		    # of which use -Werror to force warnings to be errors.
5015		    #
5016		    ac_lbl_cc_force_warning_errors=-Werror
5017
5018		    #
5019		    # Try to have the compiler default to hiding symbols,
5020		    # so that only symbols explicitly exported with
5021		    # PCAP_API will be visible outside (shared) libraries.
5022		    #
5023
5024	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
5025$as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
5026	save_CFLAGS="$CFLAGS"
5027	CFLAGS="$CFLAGS -fvisibility=hidden"
5028	#
5029	# XXX - yes, this depends on the way AC_LANG_WERROR works,
5030	# but no mechanism is provided to turn AC_LANG_WERROR on
5031	# *and then turn it back off*, so that we *only* do it when
5032	# testing compiler options - 15 years after somebody asked
5033	# for it:
5034	#
5035	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
5036	#
5037	save_ac_c_werror_flag="$ac_c_werror_flag"
5038	ac_c_werror_flag=yes
5039	#
5040	# We use AC_LANG_SOURCE() so that we can control the complete
5041	# content of the program being compiled.  We do not, for example,
5042	# want the default "int main()" that AC_LANG_PROGRAM() generates,
5043	# as it will generate a warning with -Wold-style-definition, meaning
5044	# that we would treat it as not working, as the test will fail if
5045	# *any* error output, including a warning due to the flag we're
5046	# testing, is generated; see
5047	#
5048	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
5049	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
5050	#
5051	# This may, as per those two messages, be fixed in autoconf 2.70,
5052	# but we only require 2.64 or newer for now.
5053	#
5054	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5055/* end confdefs.h.  */
5056int main(void) { return 0; }
5057_ACEOF
5058if ac_fn_c_try_compile "$LINENO"; then :
5059
5060		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5061$as_echo "yes" >&6; }
5062		can_add_to_cflags=yes
5063		#
5064		# The compile supports this; do we have some C code for
5065		# which the warning should *not* appear?
5066		# We test the fourth argument because the third argument
5067		# could contain quotes, breaking the test.
5068		#
5069		if test "x" != "x"
5070		then
5071		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
5072		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5
5073$as_echo_n "checking whether -fvisibility=hidden ... " >&6; }
5074		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5075/* end confdefs.h.  */
5076
5077_ACEOF
5078if ac_fn_c_try_compile "$LINENO"; then :
5079
5080			#
5081			# Not a problem.
5082			#
5083			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5084$as_echo "no" >&6; }
5085
5086else
5087
5088			#
5089			# A problem.
5090			#
5091			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5092$as_echo "yes" >&6; }
5093			can_add_to_cflags=no
5094
5095fi
5096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5097		fi
5098		CFLAGS="$save_CFLAGS"
5099		if test x"$can_add_to_cflags" = "xyes"
5100		then
5101		    V_CCOPT="$V_CCOPT -fvisibility=hidden"
5102		fi
5103
5104else
5105
5106		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5107$as_echo "no" >&6; }
5108		CFLAGS="$save_CFLAGS"
5109
5110fi
5111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5112	ac_c_werror_flag="$save_ac_c_werror_flag"
5113
5114		    ;;
5115
5116	    hpux*)
5117		    #
5118		    # HP C, which is what we presume we're using, doesn't
5119		    # exit with a non-zero exit status if we hand it an
5120		    # invalid -W flag, can't be forced to do so even with
5121		    # +We, and doesn't handle GCC-style -W flags, so we
5122		    # don't want to try using GCC-style -W flags.
5123		    #
5124		    ac_lbl_cc_dont_try_gcc_dashW=yes
5125		    ;;
5126
5127	    irix*)
5128		    #
5129		    # MIPS C, which is what we presume we're using, doesn't
5130		    # necessarily exit with a non-zero exit status if we
5131		    # hand it an invalid -W flag, can't be forced to do
5132		    # so, and doesn't handle GCC-style -W flags, so we
5133		    # don't want to try using GCC-style -W flags.
5134		    #
5135		    ac_lbl_cc_dont_try_gcc_dashW=yes
5136		    #
5137		    # It also, apparently, defaults to "char" being
5138		    # unsigned, unlike most other C implementations;
5139		    # I suppose we could say "signed char" whenever
5140		    # we want to guarantee a signed "char", but let's
5141		    # just force signed chars.
5142		    #
5143		    # -xansi is normally the default, but the
5144		    # configure script was setting it; perhaps -cckr
5145		    # was the default in the Old Days.  (Then again,
5146		    # that would probably be for backwards compatibility
5147		    # in the days when ANSI C was Shiny and New, i.e.
5148		    # 1989 and the early '90's, so maybe we can just
5149		    # drop support for those compilers.)
5150		    #
5151		    # -g is equivalent to -g2, which turns off
5152		    # optimization; we choose -g3, which generates
5153		    # debugging information but doesn't turn off
5154		    # optimization (even if the optimization would
5155		    # cause inaccuracies in debugging).
5156		    #
5157		    V_CCOPT="$V_CCOPT -xansi -signed -g3"
5158		    ;;
5159
5160	    osf*)
5161		    #
5162		    # Presumed to be DEC OSF/1, Digital UNIX, or
5163		    # Tru64 UNIX.
5164		    #
5165		    # The DEC C compiler, which is what we presume we're
5166		    # using, doesn't exit with a non-zero exit status if we
5167		    # hand it an invalid -W flag, can't be forced to do
5168		    # so, and doesn't handle GCC-style -W flags, so we
5169		    # don't want to try using GCC-style -W flags.
5170		    #
5171		    ac_lbl_cc_dont_try_gcc_dashW=yes
5172		    #
5173		    # -g is equivalent to -g2, which turns off
5174		    # optimization; we choose -g3, which generates
5175		    # debugging information but doesn't turn off
5176		    # optimization (even if the optimization would
5177		    # cause inaccuracies in debugging).
5178		    #
5179		    V_CCOPT="$V_CCOPT -g3"
5180		    ;;
5181
5182	    solaris*)
5183		    #
5184		    # Assumed to be Sun C, which requires -errwarn to force
5185		    # warnings to be treated as errors.
5186		    #
5187		    ac_lbl_cc_force_warning_errors=-errwarn
5188
5189		    #
5190		    # Try to have the compiler default to hiding symbols,
5191		    # so that only symbols explicitly exported with
5192		    # PCAP_API will be visible outside (shared) libraries.
5193		    #
5194
5195	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -xldscope=hidden option" >&5
5196$as_echo_n "checking whether the compiler supports the -xldscope=hidden option... " >&6; }
5197	save_CFLAGS="$CFLAGS"
5198	CFLAGS="$CFLAGS -xldscope=hidden"
5199	#
5200	# XXX - yes, this depends on the way AC_LANG_WERROR works,
5201	# but no mechanism is provided to turn AC_LANG_WERROR on
5202	# *and then turn it back off*, so that we *only* do it when
5203	# testing compiler options - 15 years after somebody asked
5204	# for it:
5205	#
5206	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
5207	#
5208	save_ac_c_werror_flag="$ac_c_werror_flag"
5209	ac_c_werror_flag=yes
5210	#
5211	# We use AC_LANG_SOURCE() so that we can control the complete
5212	# content of the program being compiled.  We do not, for example,
5213	# want the default "int main()" that AC_LANG_PROGRAM() generates,
5214	# as it will generate a warning with -Wold-style-definition, meaning
5215	# that we would treat it as not working, as the test will fail if
5216	# *any* error output, including a warning due to the flag we're
5217	# testing, is generated; see
5218	#
5219	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
5220	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
5221	#
5222	# This may, as per those two messages, be fixed in autoconf 2.70,
5223	# but we only require 2.64 or newer for now.
5224	#
5225	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5226/* end confdefs.h.  */
5227int main(void) { return 0; }
5228_ACEOF
5229if ac_fn_c_try_compile "$LINENO"; then :
5230
5231		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5232$as_echo "yes" >&6; }
5233		can_add_to_cflags=yes
5234		#
5235		# The compile supports this; do we have some C code for
5236		# which the warning should *not* appear?
5237		# We test the fourth argument because the third argument
5238		# could contain quotes, breaking the test.
5239		#
5240		if test "x" != "x"
5241		then
5242		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
5243		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -xldscope=hidden " >&5
5244$as_echo_n "checking whether -xldscope=hidden ... " >&6; }
5245		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5246/* end confdefs.h.  */
5247
5248_ACEOF
5249if ac_fn_c_try_compile "$LINENO"; then :
5250
5251			#
5252			# Not a problem.
5253			#
5254			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5255$as_echo "no" >&6; }
5256
5257else
5258
5259			#
5260			# A problem.
5261			#
5262			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5263$as_echo "yes" >&6; }
5264			can_add_to_cflags=no
5265
5266fi
5267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5268		fi
5269		CFLAGS="$save_CFLAGS"
5270		if test x"$can_add_to_cflags" = "xyes"
5271		then
5272		    V_CCOPT="$V_CCOPT -xldscope=hidden"
5273		fi
5274
5275else
5276
5277		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5278$as_echo "no" >&6; }
5279		CFLAGS="$save_CFLAGS"
5280
5281fi
5282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5283	ac_c_werror_flag="$save_ac_c_werror_flag"
5284
5285		    ;;
5286
5287	    ultrix*)
5288		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking that Ultrix $CC hacks const in prototypes" >&5
5289$as_echo_n "checking that Ultrix $CC hacks const in prototypes... " >&6; }
5290		    if ${ac_cv_lbl_cc_const_proto+:} false; then :
5291  $as_echo_n "(cached) " >&6
5292else
5293  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5294/* end confdefs.h.  */
5295#include <sys/types.h>
5296int
5297main ()
5298{
5299struct a { int b; };
5300			    void c(const struct a *)
5301  ;
5302  return 0;
5303}
5304_ACEOF
5305if ac_fn_c_try_compile "$LINENO"; then :
5306  ac_cv_lbl_cc_const_proto=yes
5307else
5308  ac_cv_lbl_cc_const_proto=no
5309fi
5310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5311fi
5312
5313		    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_const_proto" >&5
5314$as_echo "$ac_cv_lbl_cc_const_proto" >&6; }
5315		    if test $ac_cv_lbl_cc_const_proto = no ; then
5316
5317$as_echo "#define const /**/" >>confdefs.h
5318
5319		    fi
5320		    ;;
5321	    esac
5322	    V_CCOPT="$V_CCOPT -O"
5323    fi
5324
5325
5326    if test "$GCC" = yes ; then
5327	    #
5328	    # On platforms where we build a shared library:
5329	    #
5330	    #	add options to generate position-independent code,
5331	    #	if necessary (it's the default in AIX and Darwin/macOS);
5332	    #
5333	    #	define option to set the soname of the shared library,
5334	    #	if the OS supports that;
5335	    #
5336	    #	add options to specify, at link time, a directory to
5337	    #	add to the run-time search path, if that's necessary.
5338	    #
5339	    V_SHLIB_CMD="\$(CC)"
5340	    V_SHLIB_OPT="-shared"
5341	    case "$host_os" in
5342
5343	    aix*)
5344		    ;;
5345
5346	    freebsd*|netbsd*|openbsd*|dragonfly*|linux*|osf*|haiku*|midipix*)
5347		    #
5348		    # Platforms where the C compiler is GCC or accepts
5349		    # compatible command-line arguments, and the linker
5350		    # is the GNU linker or accepts compatible command-line
5351		    # arguments.
5352		    #
5353		    # Some instruction sets require -fPIC on some
5354		    # operating systems.  Check for them.  If you
5355		    # have a combination that requires it, add it
5356		    # here.
5357		    #
5358		    PIC_OPT=-fpic
5359		    case "$host_cpu" in
5360
5361		    sparc64*)
5362			case "$host_os" in
5363
5364			freebsd*|openbsd*|linux*)
5365			    PIC_OPT=-fPIC
5366			    ;;
5367			esac
5368			;;
5369		    esac
5370		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT $PIC_OPT"
5371		    V_SONAME_OPT="-Wl,-soname,"
5372		    ;;
5373
5374	    hpux*)
5375		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
5376		    #
5377		    # XXX - this assumes GCC is using the HP linker,
5378		    # rather than the GNU linker, and that the "+h"
5379		    # option is used on all HP-UX platforms, both .sl
5380		    # and .so.
5381		    #
5382		    V_SONAME_OPT="-Wl,+h,"
5383		    #
5384		    # By default, directories specified with -L
5385		    # are added to the run-time search path, so
5386		    # we don't add them in pcap-config.
5387		    #
5388		    ;;
5389
5390	    solaris*)
5391		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
5392		    #
5393		    # Sun/Oracle's C compiler, GCC, and GCC-compatible
5394		    # compilers support -Wl,{comma-separated list of options},
5395		    # and we use the C compiler, not ld, for all linking,
5396		    # including linking to produce a shared library.
5397		    #
5398		    V_SONAME_OPT="-Wl,-h,"
5399		    ;;
5400	    esac
5401    else
5402	    #
5403	    # Set the appropriate compiler flags and, on platforms
5404	    # where we build a shared library:
5405	    #
5406	    #	add options to generate position-independent code,
5407	    #	if necessary (it's the default in Darwin/macOS);
5408	    #
5409	    #	if we generate ".so" shared libraries, define the
5410	    #	appropriate options for building the shared library;
5411	    #
5412	    #	add options to specify, at link time, a directory to
5413	    #	add to the run-time search path, if that's necessary.
5414	    #
5415	    # Note: spaces after V_SONAME_OPT are significant; on
5416	    # some platforms the soname is passed with a GCC-like
5417	    # "-Wl,-soname,{soname}" option, with the soname part
5418	    # of the option, while on other platforms the C compiler
5419	    # driver takes it as a regular option with the soname
5420	    # following the option.
5421	    #
5422	    case "$host_os" in
5423
5424	    aix*)
5425		    V_SHLIB_CMD="\$(CC)"
5426		    V_SHLIB_OPT="-G -bnoentry -bexpall"
5427		    ;;
5428
5429	    freebsd*|netbsd*|openbsd*|dragonfly*|linux*)
5430		    #
5431		    # Platforms where the C compiler is GCC or accepts
5432		    # compatible command-line arguments, and the linker
5433		    # is the GNU linker or accepts compatible command-line
5434		    # arguments.
5435		    #
5436		    # XXX - does 64-bit SPARC require -fPIC?
5437		    #
5438		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
5439		    V_SHLIB_CMD="\$(CC)"
5440		    V_SHLIB_OPT="-shared"
5441		    V_SONAME_OPT="-Wl,-soname,"
5442		    ;;
5443
5444	    hpux*)
5445		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT +z"
5446		    V_SHLIB_CMD="\$(LD)"
5447		    V_SHLIB_OPT="-b"
5448		    V_SONAME_OPT="+h "
5449		    #
5450		    # By default, directories specified with -L
5451		    # are added to the run-time search path, so
5452		    # we don't add them in pcap-config.
5453		    #
5454		    ;;
5455
5456	    osf*)
5457		    #
5458		    # Presumed to be DEC OSF/1, Digital UNIX, or
5459		    # Tru64 UNIX.
5460		    #
5461		    V_SHLIB_CMD="\$(CC)"
5462		    V_SHLIB_OPT="-shared"
5463		    V_SONAME_OPT="-soname "
5464		    ;;
5465
5466	    solaris*)
5467		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT -Kpic"
5468		    V_SHLIB_CMD="\$(CC)"
5469		    V_SHLIB_OPT="-G"
5470		    #
5471		    # Sun/Oracle's C compiler, GCC, and GCC-compatible
5472		    # compilers support -Wl,{comma-separated list of options},
5473		    # and we use the C compiler, not ld, for all linking,
5474		    # including linking to produce a shared library.
5475		    #
5476		    V_SONAME_OPT="-Wl,-h,"
5477		    ;;
5478	    esac
5479    fi
5480
5481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5482$as_echo_n "checking for inline... " >&6; }
5483    save_CFLAGS="$CFLAGS"
5484    CFLAGS="$V_CCOPT"
5485    if ${ac_cv_lbl_inline+:} false; then :
5486  $as_echo_n "(cached) " >&6
5487else
5488
5489	ac_cv_lbl_inline=""
5490	ac_lbl_cc_inline=no
5491	for ac_lbl_inline in inline __inline__ __inline
5492	do
5493	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5494/* end confdefs.h.  */
5495#define inline $ac_lbl_inline
5496		static inline struct iltest *foo(void);
5497		struct iltest {
5498		    int iltest1;
5499		    int iltest2;
5500		};
5501
5502		static inline struct iltest *
5503		foo()
5504		{
5505		    static struct iltest xxx;
5506
5507		    return &xxx;
5508		}
5509int
5510main ()
5511{
5512
5513  ;
5514  return 0;
5515}
5516_ACEOF
5517if ac_fn_c_try_compile "$LINENO"; then :
5518  ac_lbl_cc_inline=yes
5519fi
5520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5521	    if test "$ac_lbl_cc_inline" = yes ; then
5522		break;
5523	    fi
5524	done
5525	if test "$ac_lbl_cc_inline" = yes ; then
5526	    ac_cv_lbl_inline=$ac_lbl_inline
5527	fi
5528fi
5529
5530    CFLAGS="$save_CFLAGS"
5531    if test ! -z "$ac_cv_lbl_inline" ; then
5532	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_inline" >&5
5533$as_echo "$ac_cv_lbl_inline" >&6; }
5534    else
5535	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5536$as_echo "no" >&6; }
5537    fi
5538
5539cat >>confdefs.h <<_ACEOF
5540#define inline $ac_cv_lbl_inline
5541_ACEOF
5542
5543
5544	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_load_n" >&5
5545$as_echo_n "checking for __atomic_load_n... " >&6; }
5546	if ${ac_cv_have___atomic_load_n+:} false; then :
5547  $as_echo_n "(cached) " >&6
5548else
5549
5550# ac_fn_c_try_link LINENO
5551# -----------------------
5552# Try to link conftest.$ac_ext, and return whether this succeeded.
5553ac_fn_c_try_link ()
5554{
5555  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
5556  rm -f conftest.$ac_objext conftest$ac_exeext
5557  if { { ac_try="$ac_link"
5558case "(($ac_try" in
5559  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5560  *) ac_try_echo=$ac_try;;
5561esac
5562eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5563$as_echo "$ac_try_echo"; } >&5
5564  (eval "$ac_link") 2>conftest.err
5565  ac_status=$?
5566  if test -s conftest.err; then
5567    grep -v '^ *+' conftest.err >conftest.er1
5568    cat conftest.er1 >&5
5569    mv -f conftest.er1 conftest.err
5570  fi
5571  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5572  test $ac_status = 0; } && {
5573	 test -z "$ac_c_werror_flag" ||
5574	 test ! -s conftest.err
5575       } && test -s conftest$ac_exeext && {
5576	 test "$cross_compiling" = yes ||
5577	 test -x conftest$ac_exeext
5578       }; then :
5579  ac_retval=0
5580else
5581  $as_echo "$as_me: failed program was:" >&5
5582sed 's/^/| /' conftest.$ac_ext >&5
5583
5584	ac_retval=1
5585fi
5586  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
5587  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
5588  # interfere with the next link command; also delete a directory that is
5589  # left behind by Apple's compiler.  We do this before executing the actions.
5590  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
5591  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
5592  as_fn_set_status $ac_retval
5593
5594} # ac_fn_c_try_link
5595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5596/* end confdefs.h.  */
5597
5598int
5599main ()
5600{
5601
5602		    int i = 17;
5603		    int j;
5604		    j = __atomic_load_n(&i, __ATOMIC_RELAXED);
5605
5606  ;
5607  return 0;
5608}
5609_ACEOF
5610if ac_fn_c_try_link "$LINENO"; then :
5611  ac_have___atomic_load_n=yes
5612else
5613  ac_have___atomic_load_n=no
5614fi
5615rm -f core conftest.err conftest.$ac_objext \
5616    conftest$ac_exeext conftest.$ac_ext
5617fi
5618
5619	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_have___atomic_load_n" >&5
5620$as_echo "$ac_have___atomic_load_n" >&6; }
5621	if test $ac_have___atomic_load_n = yes ; then
5622
5623$as_echo "#define HAVE___ATOMIC_LOAD_N 1" >>confdefs.h
5624
5625	fi
5626
5627	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_store_n" >&5
5628$as_echo_n "checking for __atomic_store_n... " >&6; }
5629	if ${ac_cv_have___atomic_store_n+:} false; then :
5630  $as_echo_n "(cached) " >&6
5631else
5632  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5633/* end confdefs.h.  */
5634
5635int
5636main ()
5637{
5638
5639		    int i;
5640		    __atomic_store_n(&i, 17, __ATOMIC_RELAXED);
5641
5642  ;
5643  return 0;
5644}
5645_ACEOF
5646if ac_fn_c_try_link "$LINENO"; then :
5647  ac_have___atomic_store_n=yes
5648else
5649  ac_have___atomic_store_n=no
5650fi
5651rm -f core conftest.err conftest.$ac_objext \
5652    conftest$ac_exeext conftest.$ac_ext
5653fi
5654
5655	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_have___atomic_store_n" >&5
5656$as_echo "$ac_have___atomic_store_n" >&6; }
5657	if test $ac_have___atomic_store_n = yes ; then
5658
5659$as_echo "#define HAVE___ATOMIC_STORE_N 1" >>confdefs.h
5660
5661	fi
5662
5663#
5664# Try to arrange for large file support.
5665#
5666# Check whether --enable-largefile was given.
5667if test "${enable_largefile+set}" = set; then :
5668  enableval=$enable_largefile;
5669fi
5670
5671if test "$enable_largefile" != no; then
5672
5673  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5674$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5675if ${ac_cv_sys_largefile_CC+:} false; then :
5676  $as_echo_n "(cached) " >&6
5677else
5678  ac_cv_sys_largefile_CC=no
5679     if test "$GCC" != yes; then
5680       ac_save_CC=$CC
5681       while :; do
5682	 # IRIX 6.2 and later do not support large files by default,
5683	 # so use the C compiler's -n32 option if that helps.
5684	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5685/* end confdefs.h.  */
5686#include <sys/types.h>
5687 /* Check that off_t can represent 2**63 - 1 correctly.
5688    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5689    since some C++ compilers masquerading as C compilers
5690    incorrectly reject 9223372036854775807.  */
5691#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5692  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5693		       && LARGE_OFF_T % 2147483647 == 1)
5694		      ? 1 : -1];
5695int
5696main ()
5697{
5698
5699  ;
5700  return 0;
5701}
5702_ACEOF
5703	 if ac_fn_c_try_compile "$LINENO"; then :
5704  break
5705fi
5706rm -f core conftest.err conftest.$ac_objext
5707	 CC="$CC -n32"
5708	 if ac_fn_c_try_compile "$LINENO"; then :
5709  ac_cv_sys_largefile_CC=' -n32'; break
5710fi
5711rm -f core conftest.err conftest.$ac_objext
5712	 break
5713       done
5714       CC=$ac_save_CC
5715       rm -f conftest.$ac_ext
5716    fi
5717fi
5718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5719$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5720  if test "$ac_cv_sys_largefile_CC" != no; then
5721    CC=$CC$ac_cv_sys_largefile_CC
5722  fi
5723
5724  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5725$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5726if ${ac_cv_sys_file_offset_bits+:} false; then :
5727  $as_echo_n "(cached) " >&6
5728else
5729  while :; do
5730  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5731/* end confdefs.h.  */
5732#include <sys/types.h>
5733 /* Check that off_t can represent 2**63 - 1 correctly.
5734    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5735    since some C++ compilers masquerading as C compilers
5736    incorrectly reject 9223372036854775807.  */
5737#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5738  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5739		       && LARGE_OFF_T % 2147483647 == 1)
5740		      ? 1 : -1];
5741int
5742main ()
5743{
5744
5745  ;
5746  return 0;
5747}
5748_ACEOF
5749if ac_fn_c_try_compile "$LINENO"; then :
5750  ac_cv_sys_file_offset_bits=no; break
5751fi
5752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5753  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5754/* end confdefs.h.  */
5755#define _FILE_OFFSET_BITS 64
5756#include <sys/types.h>
5757 /* Check that off_t can represent 2**63 - 1 correctly.
5758    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5759    since some C++ compilers masquerading as C compilers
5760    incorrectly reject 9223372036854775807.  */
5761#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5762  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5763		       && LARGE_OFF_T % 2147483647 == 1)
5764		      ? 1 : -1];
5765int
5766main ()
5767{
5768
5769  ;
5770  return 0;
5771}
5772_ACEOF
5773if ac_fn_c_try_compile "$LINENO"; then :
5774  ac_cv_sys_file_offset_bits=64; break
5775fi
5776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5777  ac_cv_sys_file_offset_bits=unknown
5778  break
5779done
5780fi
5781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5782$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5783case $ac_cv_sys_file_offset_bits in #(
5784  no | unknown) ;;
5785  *)
5786cat >>confdefs.h <<_ACEOF
5787#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5788_ACEOF
5789;;
5790esac
5791rm -rf conftest*
5792  if test $ac_cv_sys_file_offset_bits = unknown; then
5793    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5794$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5795if ${ac_cv_sys_large_files+:} false; then :
5796  $as_echo_n "(cached) " >&6
5797else
5798  while :; do
5799  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5800/* end confdefs.h.  */
5801#include <sys/types.h>
5802 /* Check that off_t can represent 2**63 - 1 correctly.
5803    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5804    since some C++ compilers masquerading as C compilers
5805    incorrectly reject 9223372036854775807.  */
5806#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5807  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5808		       && LARGE_OFF_T % 2147483647 == 1)
5809		      ? 1 : -1];
5810int
5811main ()
5812{
5813
5814  ;
5815  return 0;
5816}
5817_ACEOF
5818if ac_fn_c_try_compile "$LINENO"; then :
5819  ac_cv_sys_large_files=no; break
5820fi
5821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5822  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5823/* end confdefs.h.  */
5824#define _LARGE_FILES 1
5825#include <sys/types.h>
5826 /* Check that off_t can represent 2**63 - 1 correctly.
5827    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5828    since some C++ compilers masquerading as C compilers
5829    incorrectly reject 9223372036854775807.  */
5830#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5831  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5832		       && LARGE_OFF_T % 2147483647 == 1)
5833		      ? 1 : -1];
5834int
5835main ()
5836{
5837
5838  ;
5839  return 0;
5840}
5841_ACEOF
5842if ac_fn_c_try_compile "$LINENO"; then :
5843  ac_cv_sys_large_files=1; break
5844fi
5845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5846  ac_cv_sys_large_files=unknown
5847  break
5848done
5849fi
5850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5851$as_echo "$ac_cv_sys_large_files" >&6; }
5852case $ac_cv_sys_large_files in #(
5853  no | unknown) ;;
5854  *)
5855cat >>confdefs.h <<_ACEOF
5856#define _LARGE_FILES $ac_cv_sys_large_files
5857_ACEOF
5858;;
5859esac
5860rm -rf conftest*
5861  fi
5862
5863
5864fi
5865
5866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
5867$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
5868if ${ac_cv_sys_largefile_source+:} false; then :
5869  $as_echo_n "(cached) " >&6
5870else
5871  while :; do
5872  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5873/* end confdefs.h.  */
5874#include <sys/types.h> /* for off_t */
5875     #include <stdio.h>
5876int
5877main ()
5878{
5879int (*fp) (FILE *, off_t, int) = fseeko;
5880     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
5881  ;
5882  return 0;
5883}
5884_ACEOF
5885if ac_fn_c_try_link "$LINENO"; then :
5886  ac_cv_sys_largefile_source=no; break
5887fi
5888rm -f core conftest.err conftest.$ac_objext \
5889    conftest$ac_exeext conftest.$ac_ext
5890  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5891/* end confdefs.h.  */
5892#define _LARGEFILE_SOURCE 1
5893#include <sys/types.h> /* for off_t */
5894     #include <stdio.h>
5895int
5896main ()
5897{
5898int (*fp) (FILE *, off_t, int) = fseeko;
5899     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
5900  ;
5901  return 0;
5902}
5903_ACEOF
5904if ac_fn_c_try_link "$LINENO"; then :
5905  ac_cv_sys_largefile_source=1; break
5906fi
5907rm -f core conftest.err conftest.$ac_objext \
5908    conftest$ac_exeext conftest.$ac_ext
5909  ac_cv_sys_largefile_source=unknown
5910  break
5911done
5912fi
5913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
5914$as_echo "$ac_cv_sys_largefile_source" >&6; }
5915case $ac_cv_sys_largefile_source in #(
5916  no | unknown) ;;
5917  *)
5918cat >>confdefs.h <<_ACEOF
5919#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
5920_ACEOF
5921;;
5922esac
5923rm -rf conftest*
5924
5925# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
5926# in glibc 2.1.3, but that breaks too many other things.
5927# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
5928if test $ac_cv_sys_largefile_source != unknown; then
5929
5930$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
5931
5932fi
5933
5934
5935for ac_header in sys/ioccom.h sys/sockio.h
5936do :
5937  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5938ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5939if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5940  cat >>confdefs.h <<_ACEOF
5941#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5942_ACEOF
5943
5944fi
5945
5946done
5947
5948for ac_header in netpacket/packet.h
5949do :
5950  ac_fn_c_check_header_mongrel "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "$ac_includes_default"
5951if test "x$ac_cv_header_netpacket_packet_h" = xyes; then :
5952  cat >>confdefs.h <<_ACEOF
5953#define HAVE_NETPACKET_PACKET_H 1
5954_ACEOF
5955
5956fi
5957
5958done
5959
5960
5961
5962	save_CFLAGS="$CFLAGS"
5963	save_LIBS="$LIBS"
5964	save_LDFLAGS="$LDFLAGS"
5965
5966case "$host_os" in
5967haiku*)
5968	#
5969	# Haiku needs _BSD_SOURCE for the _IO* macros because it doesn't use them.
5970	#
5971	CFLAGS="$CFLAGS -D_BSD_SOURCE"
5972	#
5973	# Haiku has getpass in libbsd.
5974	#
5975	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpass in -lbsd" >&5
5976$as_echo_n "checking for getpass in -lbsd... " >&6; }
5977if ${ac_cv_lib_bsd_getpass+:} false; then :
5978  $as_echo_n "(cached) " >&6
5979else
5980  ac_check_lib_save_LIBS=$LIBS
5981LIBS="-lbsd  $LIBS"
5982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5983/* end confdefs.h.  */
5984
5985/* Override any GCC internal prototype to avoid an error.
5986   Use char because int might match the return type of a GCC
5987   builtin and then its argument prototype would still apply.  */
5988#ifdef __cplusplus
5989extern "C"
5990#endif
5991char getpass ();
5992int
5993main ()
5994{
5995return getpass ();
5996  ;
5997  return 0;
5998}
5999_ACEOF
6000if ac_fn_c_try_link "$LINENO"; then :
6001  ac_cv_lib_bsd_getpass=yes
6002else
6003  ac_cv_lib_bsd_getpass=no
6004fi
6005rm -f core conftest.err conftest.$ac_objext \
6006    conftest$ac_exeext conftest.$ac_ext
6007LIBS=$ac_check_lib_save_LIBS
6008fi
6009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getpass" >&5
6010$as_echo "$ac_cv_lib_bsd_getpass" >&6; }
6011if test "x$ac_cv_lib_bsd_getpass" = xyes; then :
6012  cat >>confdefs.h <<_ACEOF
6013#define HAVE_LIBBSD 1
6014_ACEOF
6015
6016  LIBS="-lbsd $LIBS"
6017
6018fi
6019
6020	;;
6021esac
6022
6023if test "$GCC" = yes ; then
6024	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI ioctl definitions" >&5
6025$as_echo_n "checking for ANSI ioctl definitions... " >&6; }
6026	    if ${ac_cv_lbl_gcc_fixincludes+:} false; then :
6027  $as_echo_n "(cached) " >&6
6028else
6029  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6030/* end confdefs.h.  */
6031/*
6032		     * This generates a "duplicate case value" when fixincludes
6033		     * has not be run.
6034		     */
6035#		include <sys/types.h>
6036#		include <sys/time.h>
6037#		include <sys/ioctl.h>
6038#		ifdef HAVE_SYS_IOCCOM_H
6039#		include <sys/ioccom.h>
6040#		endif
6041int
6042main ()
6043{
6044switch (0) {
6045		    case _IO('A', 1):;
6046		    case _IO('B', 1):;
6047		    }
6048  ;
6049  return 0;
6050}
6051_ACEOF
6052if ac_fn_c_try_compile "$LINENO"; then :
6053  ac_cv_lbl_gcc_fixincludes=yes
6054else
6055  ac_cv_lbl_gcc_fixincludes=no
6056fi
6057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6058fi
6059
6060	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_gcc_fixincludes" >&5
6061$as_echo "$ac_cv_lbl_gcc_fixincludes" >&6; }
6062	    if test $ac_cv_lbl_gcc_fixincludes = no ; then
6063		    # Don't cache failure
6064		    unset ac_cv_lbl_gcc_fixincludes
6065		    as_fn_error $? "see the INSTALL for more info" "$LINENO" 5
6066	    fi
6067    fi
6068
6069	CFLAGS="$save_CFLAGS"
6070	LIBS="$save_LIBS"
6071	LDFLAGS="$save_LDFLAGS"
6072
6073
6074for ac_func in strerror
6075do :
6076  ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
6077if test "x$ac_cv_func_strerror" = xyes; then :
6078  cat >>confdefs.h <<_ACEOF
6079#define HAVE_STRERROR 1
6080_ACEOF
6081
6082fi
6083done
6084
6085ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
6086if test "x$ac_cv_func_strerror_r" = xyes; then :
6087
6088	#
6089	# We have strerror_r; if we define _GNU_SOURCE, is it a
6090	# POSIX-compliant strerror_r() or a GNU strerror_r()?
6091	#
6092	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r is GNU-style" >&5
6093$as_echo_n "checking whether strerror_r is GNU-style... " >&6; }
6094	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6095/* end confdefs.h.  */
6096
6097		#define _GNU_SOURCE
6098#include <string.h>
6099
6100/* Define it GNU-style; that will cause an error if it's not GNU-style */
6101extern char *strerror_r(int, char *, size_t);
6102
6103int
6104main(void)
6105{
6106	return 0;
6107}
6108
6109
6110_ACEOF
6111if ac_fn_c_try_compile "$LINENO"; then :
6112
6113	        # GNU-style
6114		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6115$as_echo "yes" >&6; }
6116
6117$as_echo "#define HAVE_GNU_STRERROR_R /**/" >>confdefs.h
6118
6119
6120else
6121
6122		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6123$as_echo "no" >&6; }
6124
6125$as_echo "#define HAVE_POSIX_STRERROR_R /**/" >>confdefs.h
6126
6127
6128fi
6129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6130
6131else
6132
6133	#
6134	# We don't have strerror_r; do we have _wcserror_s?
6135	#
6136	for ac_func in _wcserror_s
6137do :
6138  ac_fn_c_check_func "$LINENO" "_wcserror_s" "ac_cv_func__wcserror_s"
6139if test "x$ac_cv_func__wcserror_s" = xyes; then :
6140  cat >>confdefs.h <<_ACEOF
6141#define HAVE__WCSERROR_S 1
6142_ACEOF
6143
6144fi
6145done
6146
6147
6148fi
6149
6150
6151#
6152# Thanks, IBM, for not providing vsyslog() in AIX!
6153#
6154for ac_func in vsyslog
6155do :
6156  ac_fn_c_check_func "$LINENO" "vsyslog" "ac_cv_func_vsyslog"
6157if test "x$ac_cv_func_vsyslog" = xyes; then :
6158  cat >>confdefs.h <<_ACEOF
6159#define HAVE_VSYSLOG 1
6160_ACEOF
6161
6162fi
6163done
6164
6165
6166#
6167# Make sure we have vsnprintf() and snprintf(); we require them.
6168#
6169ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
6170if test "x$ac_cv_func_vsnprintf" = xyes; then :
6171
6172else
6173  as_fn_error $? "vsnprintf() is required but wasn't found" "$LINENO" 5
6174fi
6175
6176ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
6177if test "x$ac_cv_func_snprintf" = xyes; then :
6178
6179else
6180  as_fn_error $? "snprintf() is required but wasn't found" "$LINENO" 5
6181fi
6182
6183
6184needasprintf=no
6185for ac_func in vasprintf asprintf
6186do :
6187  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6188ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6189if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6190  cat >>confdefs.h <<_ACEOF
6191#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6192_ACEOF
6193
6194else
6195  needasprintf=yes
6196fi
6197done
6198
6199if test $needasprintf = yes; then
6200	case " $LIBOBJS " in
6201  *" asprintf.$ac_objext "* ) ;;
6202  *) LIBOBJS="$LIBOBJS asprintf.$ac_objext"
6203 ;;
6204esac
6205
6206fi
6207
6208needstrlcat=no
6209for ac_func in strlcat
6210do :
6211  ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
6212if test "x$ac_cv_func_strlcat" = xyes; then :
6213  cat >>confdefs.h <<_ACEOF
6214#define HAVE_STRLCAT 1
6215_ACEOF
6216
6217else
6218  needstrlcat=yes
6219fi
6220done
6221
6222if test $needstrlcat = yes; then
6223	case " $LIBOBJS " in
6224  *" strlcat.$ac_objext "* ) ;;
6225  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
6226 ;;
6227esac
6228
6229fi
6230
6231needstrlcpy=no
6232for ac_func in strlcpy
6233do :
6234  ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
6235if test "x$ac_cv_func_strlcpy" = xyes; then :
6236  cat >>confdefs.h <<_ACEOF
6237#define HAVE_STRLCPY 1
6238_ACEOF
6239
6240else
6241  needstrlcpy=yes
6242fi
6243done
6244
6245if test $needstrlcpy = yes; then
6246	case " $LIBOBJS " in
6247  *" strlcpy.$ac_objext "* ) ;;
6248  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
6249 ;;
6250esac
6251
6252fi
6253
6254needstrtok_r=no
6255for ac_func in strtok_r
6256do :
6257  ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
6258if test "x$ac_cv_func_strtok_r" = xyes; then :
6259  cat >>confdefs.h <<_ACEOF
6260#define HAVE_STRTOK_R 1
6261_ACEOF
6262
6263else
6264  needstrtok_r=yes
6265fi
6266done
6267
6268if test $needstrtok_r = yes; then
6269	case " $LIBOBJS " in
6270  *" strtok_r.$ac_objext "* ) ;;
6271  *) LIBOBJS="$LIBOBJS strtok_r.$ac_objext"
6272 ;;
6273esac
6274
6275fi
6276
6277#
6278# Do we have ffs(), and is it declared in <strings.h>?
6279#
6280for ac_func in ffs
6281do :
6282  ac_fn_c_check_func "$LINENO" "ffs" "ac_cv_func_ffs"
6283if test "x$ac_cv_func_ffs" = xyes; then :
6284  cat >>confdefs.h <<_ACEOF
6285#define HAVE_FFS 1
6286_ACEOF
6287
6288fi
6289done
6290
6291if test "$ac_cv_func_ffs" = yes; then
6292	#
6293	# We have ffs(); is it declared in <strings.h>?
6294	#
6295	# This test fails if we don't have <strings.h> or if we do
6296	# but it doesn't declare ffs().
6297	#
6298	ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "
6299#include <strings.h>
6300
6301"
6302if test "x$ac_cv_have_decl_ffs" = xyes; then :
6303
6304
6305$as_echo "#define STRINGS_H_DECLARES_FFS /**/" >>confdefs.h
6306
6307
6308fi
6309
6310fi
6311
6312#
6313# Do this before checking for ether_hostton(), as it's a
6314# "getaddrinfo()-ish function".
6315#
6316
6317    #
6318    # Most operating systems have getaddrinfo() in the default searched
6319    # libraries (i.e. libc).  Check there first.
6320    #
6321    ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
6322if test "x$ac_cv_func_getaddrinfo" = xyes; then :
6323
6324else
6325
6326	#
6327	# Not found in the standard system libraries.
6328	# Try libsocket, which requires libnsl.
6329	#
6330	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lsocket" >&5
6331$as_echo_n "checking for getaddrinfo in -lsocket... " >&6; }
6332if ${ac_cv_lib_socket_getaddrinfo+:} false; then :
6333  $as_echo_n "(cached) " >&6
6334else
6335  ac_check_lib_save_LIBS=$LIBS
6336LIBS="-lsocket -lnsl $LIBS"
6337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6338/* end confdefs.h.  */
6339
6340/* Override any GCC internal prototype to avoid an error.
6341   Use char because int might match the return type of a GCC
6342   builtin and then its argument prototype would still apply.  */
6343#ifdef __cplusplus
6344extern "C"
6345#endif
6346char getaddrinfo ();
6347int
6348main ()
6349{
6350return getaddrinfo ();
6351  ;
6352  return 0;
6353}
6354_ACEOF
6355if ac_fn_c_try_link "$LINENO"; then :
6356  ac_cv_lib_socket_getaddrinfo=yes
6357else
6358  ac_cv_lib_socket_getaddrinfo=no
6359fi
6360rm -f core conftest.err conftest.$ac_objext \
6361    conftest$ac_exeext conftest.$ac_ext
6362LIBS=$ac_check_lib_save_LIBS
6363fi
6364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getaddrinfo" >&5
6365$as_echo "$ac_cv_lib_socket_getaddrinfo" >&6; }
6366if test "x$ac_cv_lib_socket_getaddrinfo" = xyes; then :
6367
6368	    #
6369	    # OK, we found it in libsocket.
6370	    #
6371	    LIBS="-lsocket -lnsl $LIBS"
6372
6373else
6374
6375	    #
6376	    # Not found in libsocket; test for it in libnetwork, which
6377	    # is where it is in Haiku.
6378	    #
6379	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lnetwork" >&5
6380$as_echo_n "checking for getaddrinfo in -lnetwork... " >&6; }
6381if ${ac_cv_lib_network_getaddrinfo+:} false; then :
6382  $as_echo_n "(cached) " >&6
6383else
6384  ac_check_lib_save_LIBS=$LIBS
6385LIBS="-lnetwork  $LIBS"
6386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6387/* end confdefs.h.  */
6388
6389/* Override any GCC internal prototype to avoid an error.
6390   Use char because int might match the return type of a GCC
6391   builtin and then its argument prototype would still apply.  */
6392#ifdef __cplusplus
6393extern "C"
6394#endif
6395char getaddrinfo ();
6396int
6397main ()
6398{
6399return getaddrinfo ();
6400  ;
6401  return 0;
6402}
6403_ACEOF
6404if ac_fn_c_try_link "$LINENO"; then :
6405  ac_cv_lib_network_getaddrinfo=yes
6406else
6407  ac_cv_lib_network_getaddrinfo=no
6408fi
6409rm -f core conftest.err conftest.$ac_objext \
6410    conftest$ac_exeext conftest.$ac_ext
6411LIBS=$ac_check_lib_save_LIBS
6412fi
6413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_getaddrinfo" >&5
6414$as_echo "$ac_cv_lib_network_getaddrinfo" >&6; }
6415if test "x$ac_cv_lib_network_getaddrinfo" = xyes; then :
6416
6417		#
6418		# OK, we found it in libnetwork.
6419		#
6420		LIBS="-lnetwork $LIBS"
6421
6422else
6423
6424		#
6425		# We didn't find it.
6426		#
6427		as_fn_error $? "getaddrinfo is required, but wasn't found" "$LINENO" 5
6428
6429fi
6430
6431
6432fi
6433
6434
6435	#
6436	# OK, do we have recvmsg() in libxnet?
6437	# We also link with libsocket and libnsl.
6438	#
6439	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for recvmsg in -lxnet" >&5
6440$as_echo_n "checking for recvmsg in -lxnet... " >&6; }
6441if ${ac_cv_lib_xnet_recvmsg+:} false; then :
6442  $as_echo_n "(cached) " >&6
6443else
6444  ac_check_lib_save_LIBS=$LIBS
6445LIBS="-lxnet -lsocket -lnsl $LIBS"
6446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6447/* end confdefs.h.  */
6448
6449/* Override any GCC internal prototype to avoid an error.
6450   Use char because int might match the return type of a GCC
6451   builtin and then its argument prototype would still apply.  */
6452#ifdef __cplusplus
6453extern "C"
6454#endif
6455char recvmsg ();
6456int
6457main ()
6458{
6459return recvmsg ();
6460  ;
6461  return 0;
6462}
6463_ACEOF
6464if ac_fn_c_try_link "$LINENO"; then :
6465  ac_cv_lib_xnet_recvmsg=yes
6466else
6467  ac_cv_lib_xnet_recvmsg=no
6468fi
6469rm -f core conftest.err conftest.$ac_objext \
6470    conftest$ac_exeext conftest.$ac_ext
6471LIBS=$ac_check_lib_save_LIBS
6472fi
6473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_recvmsg" >&5
6474$as_echo "$ac_cv_lib_xnet_recvmsg" >&6; }
6475if test "x$ac_cv_lib_xnet_recvmsg" = xyes; then :
6476
6477	    #
6478	    # Yes - link with it as well.
6479	    #
6480	    LIBS="-lxnet $LIBS"
6481
6482fi
6483
6484
6485fi
6486
6487    # DLPI needs putmsg under HPUX so test for -lstr while we're at it
6488    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing putmsg" >&5
6489$as_echo_n "checking for library containing putmsg... " >&6; }
6490if ${ac_cv_search_putmsg+:} false; then :
6491  $as_echo_n "(cached) " >&6
6492else
6493  ac_func_search_save_LIBS=$LIBS
6494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6495/* end confdefs.h.  */
6496
6497/* Override any GCC internal prototype to avoid an error.
6498   Use char because int might match the return type of a GCC
6499   builtin and then its argument prototype would still apply.  */
6500#ifdef __cplusplus
6501extern "C"
6502#endif
6503char putmsg ();
6504int
6505main ()
6506{
6507return putmsg ();
6508  ;
6509  return 0;
6510}
6511_ACEOF
6512for ac_lib in '' str; do
6513  if test -z "$ac_lib"; then
6514    ac_res="none required"
6515  else
6516    ac_res=-l$ac_lib
6517    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6518  fi
6519  if ac_fn_c_try_link "$LINENO"; then :
6520  ac_cv_search_putmsg=$ac_res
6521fi
6522rm -f core conftest.err conftest.$ac_objext \
6523    conftest$ac_exeext
6524  if ${ac_cv_search_putmsg+:} false; then :
6525  break
6526fi
6527done
6528if ${ac_cv_search_putmsg+:} false; then :
6529
6530else
6531  ac_cv_search_putmsg=no
6532fi
6533rm conftest.$ac_ext
6534LIBS=$ac_func_search_save_LIBS
6535fi
6536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_putmsg" >&5
6537$as_echo "$ac_cv_search_putmsg" >&6; }
6538ac_res=$ac_cv_search_putmsg
6539if test "$ac_res" != no; then :
6540  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6541
6542fi
6543
6544
6545
6546#
6547# Check for reentrant versions of getnetbyname_r(), as provided by
6548# Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!).
6549# If we don't find one, we just use getnetbyname(), which uses
6550# thread-specific data on many platforms, but doesn't use it on
6551# NetBSD or OpenBSD, and may not use it on older versions of other
6552# platforms.
6553#
6554# Only do the check if we have a declaration of getnetbyname_r();
6555# without it, we can't check which API it has.  (We assume that
6556# if there's a declaration, it has a prototype, so that the API
6557# can be checked.)
6558#
6559ac_fn_c_check_decl "$LINENO" "getnetbyname_r" "ac_cv_have_decl_getnetbyname_r" "#include <netdb.h>
6560"
6561if test "x$ac_cv_have_decl_getnetbyname_r" = xyes; then :
6562
6563	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getnetbyname_r()" >&5
6564$as_echo_n "checking for the Linux getnetbyname_r()... " >&6; }
6565	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6566/* end confdefs.h.  */
6567#include <netdb.h>
6568int
6569main ()
6570{
6571
6572		struct netent netent_buf;
6573		char buf[1024];
6574		struct netent *resultp;
6575		int h_errnoval;
6576
6577		return getnetbyname_r((const char *)0, &netent_buf, buf, sizeof buf, &resultp, &h_errnoval);
6578
6579  ;
6580  return 0;
6581}
6582_ACEOF
6583if ac_fn_c_try_link "$LINENO"; then :
6584
6585		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6586$as_echo "yes" >&6; }
6587
6588$as_echo "#define HAVE_LINUX_GETNETBYNAME_R 1" >>confdefs.h
6589
6590
6591else
6592
6593		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6594$as_echo "no" >&6; }
6595
6596		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getnetbyname_r()" >&5
6597$as_echo_n "checking for Solaris/IRIX getnetbyname_r()... " >&6; }
6598		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6599/* end confdefs.h.  */
6600#include <netdb.h>
6601int
6602main ()
6603{
6604
6605			struct netent netent_buf;
6606			char buf[1024];
6607
6608			return getnetbyname_r((const char *)0, &netent_buf, buf, (int)sizeof buf) != NULL;
6609
6610  ;
6611  return 0;
6612}
6613_ACEOF
6614if ac_fn_c_try_link "$LINENO"; then :
6615
6616			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6617$as_echo "yes" >&6; }
6618
6619$as_echo "#define HAVE_SOLARIS_IRIX_GETNETBYNAME_R 1" >>confdefs.h
6620
6621
6622else
6623
6624			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6625$as_echo "no" >&6; }
6626
6627			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX getnetbyname_r()" >&5
6628$as_echo_n "checking for AIX getnetbyname_r()... " >&6; }
6629			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6630/* end confdefs.h.  */
6631#include <netdb.h>
6632int
6633main ()
6634{
6635
6636				struct netent netent_buf;
6637				struct netent_data net_data;
6638
6639				return getnetbyname_r((const char *)0, &netent_buf, &net_data);
6640
6641  ;
6642  return 0;
6643}
6644_ACEOF
6645if ac_fn_c_try_link "$LINENO"; then :
6646
6647				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6648$as_echo "yes" >&6; }
6649
6650$as_echo "#define HAVE_AIX_GETNETBYNAME_R 1" >>confdefs.h
6651
6652
6653else
6654
6655				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6656$as_echo "no" >&6; }
6657
6658fi
6659rm -f core conftest.err conftest.$ac_objext \
6660    conftest$ac_exeext conftest.$ac_ext
6661
6662fi
6663rm -f core conftest.err conftest.$ac_objext \
6664    conftest$ac_exeext conftest.$ac_ext
6665
6666fi
6667rm -f core conftest.err conftest.$ac_objext \
6668    conftest$ac_exeext conftest.$ac_ext
6669
6670fi
6671
6672
6673#
6674# Check for reentrant versions of getprotobyname_r(), as provided by
6675# Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!).
6676# If we don't find one, we just use getprotobyname(), which uses
6677# thread-specific data on many platforms, but doesn't use it on
6678# NetBSD or OpenBSD, and may not use it on older versions of other
6679# platforms.
6680#
6681# Only do the check if we have a declaration of getprotobyname_r();
6682# without it, we can't check which API it has.  (We assume that
6683# if there's a declaration, it has a prototype, so that the API
6684# can be checked.)
6685#
6686ac_fn_c_check_decl "$LINENO" "getprotobyname_r" "ac_cv_have_decl_getprotobyname_r" "#include <netdb.h>
6687"
6688if test "x$ac_cv_have_decl_getprotobyname_r" = xyes; then :
6689
6690	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getprotobyname_r()" >&5
6691$as_echo_n "checking for the Linux getprotobyname_r()... " >&6; }
6692	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6693/* end confdefs.h.  */
6694#include <netdb.h>
6695int
6696main ()
6697{
6698
6699		struct protoent protoent_buf;
6700		char buf[1024];
6701		struct protoent *resultp;
6702
6703		return getprotobyname_r((const char *)0, &protoent_buf, buf, sizeof buf, &resultp);
6704
6705  ;
6706  return 0;
6707}
6708_ACEOF
6709if ac_fn_c_try_link "$LINENO"; then :
6710
6711		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6712$as_echo "yes" >&6; }
6713
6714$as_echo "#define HAVE_LINUX_GETPROTOBYNAME_R 1" >>confdefs.h
6715
6716
6717else
6718
6719		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6720$as_echo "no" >&6; }
6721
6722		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getprotobyname_r()" >&5
6723$as_echo_n "checking for Solaris/IRIX getprotobyname_r()... " >&6; }
6724		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6725/* end confdefs.h.  */
6726#include <netdb.h>
6727int
6728main ()
6729{
6730
6731			struct protoent protoent_buf;
6732			char buf[1024];
6733
6734			return getprotobyname_r((const char *)0, &protoent_buf, buf, (int)sizeof buf) != NULL;
6735
6736  ;
6737  return 0;
6738}
6739_ACEOF
6740if ac_fn_c_try_link "$LINENO"; then :
6741
6742			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6743$as_echo "yes" >&6; }
6744
6745$as_echo "#define HAVE_SOLARIS_IRIX_GETPROTOBYNAME_R 1" >>confdefs.h
6746
6747
6748else
6749
6750			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6751$as_echo "no" >&6; }
6752
6753			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX getprotobyname_r()" >&5
6754$as_echo_n "checking for AIX getprotobyname_r()... " >&6; }
6755			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6756/* end confdefs.h.  */
6757#include <netdb.h>
6758int
6759main ()
6760{
6761
6762				struct protoent protoent_buf;
6763				struct protoent_data proto_data;
6764
6765				return getprotobyname_r((const char *)0, &protoent_buf, &proto_data);
6766
6767  ;
6768  return 0;
6769}
6770_ACEOF
6771if ac_fn_c_try_link "$LINENO"; then :
6772
6773				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6774$as_echo "yes" >&6; }
6775
6776$as_echo "#define HAVE_AIX_GETPROTOBYNAME_R 1" >>confdefs.h
6777
6778
6779else
6780
6781				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6782$as_echo "no" >&6; }
6783
6784fi
6785rm -f core conftest.err conftest.$ac_objext \
6786    conftest$ac_exeext conftest.$ac_ext
6787
6788fi
6789rm -f core conftest.err conftest.$ac_objext \
6790    conftest$ac_exeext conftest.$ac_ext
6791
6792fi
6793rm -f core conftest.err conftest.$ac_objext \
6794    conftest$ac_exeext conftest.$ac_ext
6795
6796fi
6797
6798
6799#
6800# You are in a twisty little maze of UN*Xes, all different.
6801# Some might not have ether_hostton().
6802# Some might have it and declare it in <net/ethernet.h>.
6803# Some might have it and declare it in <netinet/ether.h>
6804# Some might have it and declare it in <sys/ethernet.h>.
6805# Some might have it and declare it in <arpa/inet.h>.
6806# Some might have it and declare it in <netinet/if_ether.h>.
6807# Some might have it and not declare it in any header file.
6808#
6809# Before you is a C compiler.
6810#
6811for ac_func in ether_hostton
6812do :
6813  ac_fn_c_check_func "$LINENO" "ether_hostton" "ac_cv_func_ether_hostton"
6814if test "x$ac_cv_func_ether_hostton" = xyes; then :
6815  cat >>confdefs.h <<_ACEOF
6816#define HAVE_ETHER_HOSTTON 1
6817_ACEOF
6818
6819fi
6820done
6821
6822if test "$ac_cv_func_ether_hostton" = yes; then
6823	#
6824	# OK, we have ether_hostton().  Is it declared in <net/ethernet.h>?
6825	#
6826	# This test fails if we don't have <net/ethernet.h> or if we do
6827	# but it doesn't declare ether_hostton().
6828	#
6829	ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6830#include <net/ethernet.h>
6831
6832"
6833if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6834
6835
6836$as_echo "#define NET_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6837
6838
6839fi
6840
6841	#
6842	# Did that succeed?
6843	#
6844	if test "$ac_cv_have_decl_ether_hostton" != yes; then
6845		#
6846		# No, how about <netinet/ether.h>, as on Linux?
6847		#
6848		# This test fails if we don't have <netinet/ether.h>
6849		# or if we do but it doesn't declare ether_hostton().
6850		#
6851		# Unset ac_cv_have_decl_ether_hostton so we don't
6852		# treat the previous failure as a cached value and
6853		# suppress the next test.
6854		#
6855		unset ac_cv_have_decl_ether_hostton
6856		ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6857#include <netinet/ether.h>
6858
6859"
6860if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6861
6862
6863$as_echo "#define NETINET_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6864
6865
6866fi
6867
6868	fi
6869	#
6870	# Did that succeed?
6871	#
6872	if test "$ac_cv_have_decl_ether_hostton" != yes; then
6873		#
6874		# No, how about <sys/ethernet.h>, as on Solaris 10
6875		# and later?
6876		#
6877		# This test fails if we don't have <sys/ethernet.h>
6878		# or if we do but it doesn't declare ether_hostton().
6879		#
6880		# Unset ac_cv_have_decl_ether_hostton so we don't
6881		# treat the previous failure as a cached value and
6882		# suppress the next test.
6883		#
6884		unset ac_cv_have_decl_ether_hostton
6885		ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6886#include <sys/ethernet.h>
6887
6888"
6889if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6890
6891
6892$as_echo "#define SYS_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6893
6894
6895fi
6896
6897	fi
6898	#
6899	# Did that succeed?
6900	#
6901	if test "$ac_cv_have_decl_ether_hostton" != yes; then
6902		#
6903		# No, how about <arpa/inet.h>, as in AIX?
6904		#
6905		# This test fails if we don't have <arpa/inet.h>
6906		# (if we have ether_hostton(), we should have
6907		# networking, and if we have networking, we should
6908		# have <arpa/inet.h>) or if we do but it doesn't
6909		# declare ether_hostton().
6910		#
6911		# Unset ac_cv_have_decl_ether_hostton so we don't
6912		# treat the previous failure as a cached value and
6913		# suppress the next test.
6914		#
6915		unset ac_cv_have_decl_ether_hostton
6916		ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6917#include <arpa/inet.h>
6918
6919"
6920if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6921
6922
6923$as_echo "#define ARPA_INET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6924
6925
6926fi
6927
6928	fi
6929	#
6930	# Did that succeed?
6931	#
6932	if test "$ac_cv_have_decl_ether_hostton" != yes; then
6933		#
6934		# No, how about <netinet/if_ether.h>?
6935		# On some platforms, it requires <net/if.h> and
6936		# <netinet/in.h>, and we always include it with
6937		# both of them, so test it with both of them.
6938		#
6939		# This test fails if we don't have <netinet/if_ether.h>
6940		# and the headers we include before it, or if we do but
6941		# <netinet/if_ether.h> doesn't declare ether_hostton().
6942		#
6943		# Unset ac_cv_have_decl_ether_hostton so we don't
6944		# treat the previous failure as a cached value and
6945		# suppress the next test.
6946		#
6947		unset ac_cv_have_decl_ether_hostton
6948		ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6949#include <sys/types.h>
6950#include <sys/socket.h>
6951#include <net/if.h>
6952#include <netinet/in.h>
6953#include <netinet/if_ether.h>
6954
6955"
6956if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6957
6958
6959$as_echo "#define NETINET_IF_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6960
6961
6962fi
6963
6964	fi
6965	#
6966	# After all that, is ether_hostton() declared?
6967	#
6968	if test "$ac_cv_have_decl_ether_hostton" = yes; then
6969		#
6970		# Yes.
6971		#
6972
6973$as_echo "#define HAVE_DECL_ETHER_HOSTTON 1" >>confdefs.h
6974
6975        else
6976		#
6977		# No, we'll have to declare it ourselves.
6978		# Do we have "struct ether_addr" if we include
6979		# <netinet/if_ether.h>?
6980		#
6981		ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" "
6982			#include <sys/types.h>
6983			#include <sys/socket.h>
6984			#include <net/if.h>
6985			#include <netinet/in.h>
6986			#include <netinet/if_ether.h>
6987
6988"
6989if test "x$ac_cv_type_struct_ether_addr" = xyes; then :
6990
6991cat >>confdefs.h <<_ACEOF
6992#define HAVE_STRUCT_ETHER_ADDR 1
6993_ACEOF
6994
6995
6996fi
6997
6998	fi
6999fi
7000
7001#
7002# For various things that might use pthreads.
7003#
7004ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
7005if test "x$ac_cv_header_pthread_h" = xyes; then :
7006
7007	#
7008	# OK, we have pthread.h.  Do we have pthread_create in the
7009	# system libraries?
7010	#
7011	ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create"
7012if test "x$ac_cv_func_pthread_create" = xyes; then :
7013
7014		#
7015		# Yes.
7016		#
7017		ac_lbl_have_pthreads="found"
7018
7019else
7020
7021		#
7022		# No - do we have it in -lpthreads?
7023		#
7024		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
7025$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
7026if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
7027  $as_echo_n "(cached) " >&6
7028else
7029  ac_check_lib_save_LIBS=$LIBS
7030LIBS="-lpthreads  $LIBS"
7031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7032/* end confdefs.h.  */
7033
7034/* Override any GCC internal prototype to avoid an error.
7035   Use char because int might match the return type of a GCC
7036   builtin and then its argument prototype would still apply.  */
7037#ifdef __cplusplus
7038extern "C"
7039#endif
7040char pthread_create ();
7041int
7042main ()
7043{
7044return pthread_create ();
7045  ;
7046  return 0;
7047}
7048_ACEOF
7049if ac_fn_c_try_link "$LINENO"; then :
7050  ac_cv_lib_pthreads_pthread_create=yes
7051else
7052  ac_cv_lib_pthreads_pthread_create=no
7053fi
7054rm -f core conftest.err conftest.$ac_objext \
7055    conftest$ac_exeext conftest.$ac_ext
7056LIBS=$ac_check_lib_save_LIBS
7057fi
7058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
7059$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
7060if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
7061
7062			#
7063			# Yes - add -lpthreads.
7064			#
7065			ac_lbl_have_pthreads="found"
7066			PTHREAD_LIBS="$PTHREAD_LIBS -lpthreads"
7067
7068else
7069
7070			#
7071			# No - do we have it in -lpthread?
7072			#
7073			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
7074$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
7075if ${ac_cv_lib_pthread_pthread_create+:} false; then :
7076  $as_echo_n "(cached) " >&6
7077else
7078  ac_check_lib_save_LIBS=$LIBS
7079LIBS="-lpthread  $LIBS"
7080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7081/* end confdefs.h.  */
7082
7083/* Override any GCC internal prototype to avoid an error.
7084   Use char because int might match the return type of a GCC
7085   builtin and then its argument prototype would still apply.  */
7086#ifdef __cplusplus
7087extern "C"
7088#endif
7089char pthread_create ();
7090int
7091main ()
7092{
7093return pthread_create ();
7094  ;
7095  return 0;
7096}
7097_ACEOF
7098if ac_fn_c_try_link "$LINENO"; then :
7099  ac_cv_lib_pthread_pthread_create=yes
7100else
7101  ac_cv_lib_pthread_pthread_create=no
7102fi
7103rm -f core conftest.err conftest.$ac_objext \
7104    conftest$ac_exeext conftest.$ac_ext
7105LIBS=$ac_check_lib_save_LIBS
7106fi
7107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
7108$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
7109if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
7110
7111				#
7112				# Yes - add -lpthread.
7113				#
7114                                ac_lbl_have_pthreads="found"
7115				PTHREAD_LIBS="$PTHREAD_LIBS -lpthread"
7116
7117else
7118
7119				#
7120				# No.
7121				#
7122				ac_lbl_have_pthreads="not found"
7123
7124fi
7125
7126
7127fi
7128
7129
7130fi
7131
7132
7133else
7134
7135	#
7136	# We didn't find pthread.h.
7137	#
7138	ac_lbl_have_pthreads="not found"
7139
7140
7141fi
7142
7143
7144
7145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --disable-protochain option is specified" >&5
7146$as_echo_n "checking if --disable-protochain option is specified... " >&6; }
7147# Check whether --enable-protochain was given.
7148if test "${enable_protochain+set}" = set; then :
7149  enableval=$enable_protochain;
7150fi
7151
7152case "x$enable_protochain" in
7153xyes)	enable_protochain=enabled	;;
7154xno)	enable_protochain=disabled	;;
7155x)	enable_protochain=enabled	;;
7156esac
7157
7158if test "$enable_protochain" = "disabled"; then
7159
7160$as_echo "#define NO_PROTOCHAIN 1" >>confdefs.h
7161
7162fi
7163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_protochain}" >&5
7164$as_echo "${enable_protochain}" >&6; }
7165
7166#
7167# valgrindtest directly uses the native capture mechanism, but
7168# only tests with BPF and PF_PACKET sockets; only enable it if
7169# we have BPF or PF_PACKET sockets.
7170#
7171VALGRINDTEST_SRC=
7172
7173
7174# Check whether --with-pcap was given.
7175if test "${with_pcap+set}" = set; then :
7176  withval=$with_pcap;
7177fi
7178
7179if test ! -z "$with_pcap" ; then
7180	V_PCAP="$withval"
7181else
7182	#
7183	# Check for a bunch of headers for various packet
7184	# capture mechanisms.
7185	#
7186	for ac_header in net/bpf.h
7187do :
7188  ac_fn_c_check_header_mongrel "$LINENO" "net/bpf.h" "ac_cv_header_net_bpf_h" "$ac_includes_default"
7189if test "x$ac_cv_header_net_bpf_h" = xyes; then :
7190  cat >>confdefs.h <<_ACEOF
7191#define HAVE_NET_BPF_H 1
7192_ACEOF
7193
7194fi
7195
7196done
7197
7198	if test "$ac_cv_header_net_bpf_h" = yes; then
7199		#
7200		# Does it define BIOCSETIF?
7201		# I.e., is it a header for an LBL/BSD-style capture
7202		# mechanism, or is it just a header for a BPF filter
7203		# engine?  Some versions of Arch Linux, for example,
7204		# have a net/bpf.h that doesn't define BIOCSETIF;
7205		# as it's a Linux, it should use packet sockets,
7206		# instead.
7207		#
7208		# We need:
7209		#
7210		#  sys/types.h, because FreeBSD 10's net/bpf.h
7211		#  requires that various BSD-style integer types
7212		#  be defined;
7213		#
7214		#  sys/time.h, because AIX 5.2 and 5.3's net/bpf.h
7215		#  doesn't include it but does use struct timeval
7216		#  in ioctl definitions;
7217		#
7218		#  sys/ioctl.h and, if we have it, sys/ioccom.h,
7219		#  because net/bpf.h defines ioctls;
7220		#
7221		#  net/if.h, because it defines some structures
7222		#  used in ioctls defined by net/bpf.h;
7223		#
7224		#  sys/socket.h, because OpenBSD 5.9's net/bpf.h
7225		#  defines some structure fields as being
7226		#  struct sockaddrs;
7227		#
7228		# and net/bpf.h doesn't necessarily include all
7229		# of those headers itself.
7230		#
7231		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if net/bpf.h defines BIOCSETIF" >&5
7232$as_echo_n "checking if net/bpf.h defines BIOCSETIF... " >&6; }
7233		if ${ac_cv_lbl_bpf_h_defines_biocsetif+:} false; then :
7234  $as_echo_n "(cached) " >&6
7235else
7236  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7237/* end confdefs.h.  */
7238
7239#include <sys/types.h>
7240#include <sys/time.h>
7241#include <sys/ioctl.h>
7242#include <sys/socket.h>
7243#ifdef HAVE_SYS_IOCCOM_H
7244#include <sys/ioccom.h>
7245#endif
7246#include <net/bpf.h>
7247#include <net/if.h>
7248
7249int
7250main ()
7251{
7252u_int i = BIOCSETIF;
7253  ;
7254  return 0;
7255}
7256_ACEOF
7257if ac_fn_c_try_compile "$LINENO"; then :
7258  ac_cv_lbl_bpf_h_defines_biocsetif=yes
7259else
7260  ac_cv_lbl_bpf_h_defines_biocsetif=no
7261fi
7262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7263fi
7264
7265		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_bpf_h_defines_biocsetif" >&5
7266$as_echo "$ac_cv_lbl_bpf_h_defines_biocsetif" >&6; }
7267	fi
7268	for ac_header in net/pfilt.h net/enet.h
7269do :
7270  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7271ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7272if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7273  cat >>confdefs.h <<_ACEOF
7274#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7275_ACEOF
7276
7277fi
7278
7279done
7280
7281	for ac_header in net/nit.h sys/net/nit.h
7282do :
7283  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7284ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7285if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7286  cat >>confdefs.h <<_ACEOF
7287#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7288_ACEOF
7289
7290fi
7291
7292done
7293
7294	for ac_header in linux/socket.h net/raw.h sys/dlpi.h
7295do :
7296  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7297ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7298if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7299  cat >>confdefs.h <<_ACEOF
7300#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7301_ACEOF
7302
7303fi
7304
7305done
7306
7307	for ac_header in config/HaikuConfig.h
7308do :
7309  ac_fn_c_check_header_mongrel "$LINENO" "config/HaikuConfig.h" "ac_cv_header_config_HaikuConfig_h" "$ac_includes_default"
7310if test "x$ac_cv_header_config_HaikuConfig_h" = xyes; then :
7311  cat >>confdefs.h <<_ACEOF
7312#define HAVE_CONFIG_HAIKUCONFIG_H 1
7313_ACEOF
7314
7315fi
7316
7317done
7318
7319
7320	if test "$ac_cv_lbl_bpf_h_defines_biocsetif" = yes; then
7321		#
7322		# BPF.
7323		# Check this before DLPI, so that we pick BPF on
7324		# Solaris 11 and later.
7325		#
7326		V_PCAP=bpf
7327
7328		#
7329		# We have BPF, so build valgrindtest with "make test"
7330		# on macOS and FreeBSD (add your OS once there's a
7331		# valgrind for it).
7332		#
7333		case "$host_os" in
7334
7335		freebsd*|darwin*|linux*)
7336			VALGRINDTEST_SRC=valgrindtest.c
7337			;;
7338		esac
7339	elif test "$ac_cv_header_linux_socket_h" = yes; then
7340		#
7341		# No prizes for guessing this one.
7342		#
7343		V_PCAP=linux
7344		VALGRINDTEST_SRC=valgrindtest.c
7345	elif test "$ac_cv_header_net_pfilt_h" = yes; then
7346	        #
7347	        # DEC OSF/1, Digital UNIX, Tru64 UNIX
7348        	#
7349		V_PCAP=pf
7350	elif test "$ac_cv_header_net_enet_h" = yes; then
7351		#
7352		# Stanford Enetfilter.
7353		#
7354		V_PCAP=enet
7355	elif test "$ac_cv_header_net_nit_h" = yes; then
7356		#
7357		# SunOS 4.x STREAMS NIT.
7358		#
7359		V_PCAP=snit
7360	elif test "$ac_cv_header_sys_net_nit_h" = yes; then
7361		#
7362		# Pre-SunOS 4.x non-STREAMS NIT.
7363		#
7364		V_PCAP=nit
7365	elif test "$ac_cv_header_net_raw_h" = yes; then
7366		#
7367		# IRIX snoop.
7368		#
7369		V_PCAP=snoop
7370	elif test "$ac_cv_header_sys_dlpi_h" = yes; then
7371		#
7372		# DLPI on pre-Solaris 11 SunOS 5, HP-UX, possibly others.
7373		#
7374		V_PCAP=dlpi
7375	elif test "$ac_cv_header_config_HaikuConfig_h" = yes; then
7376		#
7377		# Haiku.
7378		#
7379		V_PCAP=haiku
7380	else
7381		#
7382		# Nothing we support.
7383		#
7384		V_PCAP=null
7385		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine packet capture interface" >&5
7386$as_echo "$as_me: WARNING: cannot determine packet capture interface" >&2;}
7387		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: (see the INSTALL.md file for more info)" >&5
7388$as_echo "$as_me: WARNING: (see the INSTALL.md file for more info)" >&2;}
7389	fi
7390fi
7391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking packet capture type" >&5
7392$as_echo_n "checking packet capture type... " >&6; }
7393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $V_PCAP" >&5
7394$as_echo "$V_PCAP" >&6; }
7395
7396
7397#
7398# Do we have pkg-config?
7399#
7400
7401
7402
7403
7404
7405
7406
7407if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7408	if test -n "$ac_tool_prefix"; then
7409  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7410set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7412$as_echo_n "checking for $ac_word... " >&6; }
7413if ${ac_cv_path_PKG_CONFIG+:} false; then :
7414  $as_echo_n "(cached) " >&6
7415else
7416  case $PKG_CONFIG in
7417  [\\/]* | ?:[\\/]*)
7418  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7419  ;;
7420  *)
7421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7422for as_dir in $PATH
7423do
7424  IFS=$as_save_IFS
7425  test -z "$as_dir" && as_dir=.
7426    for ac_exec_ext in '' $ac_executable_extensions; do
7427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7428    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7430    break 2
7431  fi
7432done
7433  done
7434IFS=$as_save_IFS
7435
7436  ;;
7437esac
7438fi
7439PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7440if test -n "$PKG_CONFIG"; then
7441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7442$as_echo "$PKG_CONFIG" >&6; }
7443else
7444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7445$as_echo "no" >&6; }
7446fi
7447
7448
7449fi
7450if test -z "$ac_cv_path_PKG_CONFIG"; then
7451  ac_pt_PKG_CONFIG=$PKG_CONFIG
7452  # Extract the first word of "pkg-config", so it can be a program name with args.
7453set dummy pkg-config; ac_word=$2
7454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7455$as_echo_n "checking for $ac_word... " >&6; }
7456if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7457  $as_echo_n "(cached) " >&6
7458else
7459  case $ac_pt_PKG_CONFIG in
7460  [\\/]* | ?:[\\/]*)
7461  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7462  ;;
7463  *)
7464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7465for as_dir in $PATH
7466do
7467  IFS=$as_save_IFS
7468  test -z "$as_dir" && as_dir=.
7469    for ac_exec_ext in '' $ac_executable_extensions; do
7470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7471    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7473    break 2
7474  fi
7475done
7476  done
7477IFS=$as_save_IFS
7478
7479  ;;
7480esac
7481fi
7482ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7483if test -n "$ac_pt_PKG_CONFIG"; then
7484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7485$as_echo "$ac_pt_PKG_CONFIG" >&6; }
7486else
7487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7488$as_echo "no" >&6; }
7489fi
7490
7491  if test "x$ac_pt_PKG_CONFIG" = x; then
7492    PKG_CONFIG=""
7493  else
7494    case $cross_compiling:$ac_tool_warned in
7495yes:)
7496{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7497$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7498ac_tool_warned=yes ;;
7499esac
7500    PKG_CONFIG=$ac_pt_PKG_CONFIG
7501  fi
7502else
7503  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7504fi
7505
7506fi
7507if test -n "$PKG_CONFIG"; then
7508	_pkg_min_version=0.9.0
7509	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7510$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7511	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7512		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7513$as_echo "yes" >&6; }
7514	else
7515		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7516$as_echo "no" >&6; }
7517		PKG_CONFIG=""
7518	fi
7519fi
7520
7521#
7522# Do we have the brew command from Homebrew?
7523#
7524# Extract the first word of "brew", so it can be a program name with args.
7525set dummy brew; ac_word=$2
7526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7527$as_echo_n "checking for $ac_word... " >&6; }
7528if ${ac_cv_path_BREW+:} false; then :
7529  $as_echo_n "(cached) " >&6
7530else
7531  case $BREW in
7532  [\\/]* | ?:[\\/]*)
7533  ac_cv_path_BREW="$BREW" # Let the user override the test with a path.
7534  ;;
7535  *)
7536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7537for as_dir in $PATH
7538do
7539  IFS=$as_save_IFS
7540  test -z "$as_dir" && as_dir=.
7541    for ac_exec_ext in '' $ac_executable_extensions; do
7542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7543    ac_cv_path_BREW="$as_dir/$ac_word$ac_exec_ext"
7544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7545    break 2
7546  fi
7547done
7548  done
7549IFS=$as_save_IFS
7550
7551  ;;
7552esac
7553fi
7554BREW=$ac_cv_path_BREW
7555if test -n "$BREW"; then
7556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BREW" >&5
7557$as_echo "$BREW" >&6; }
7558else
7559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7560$as_echo "no" >&6; }
7561fi
7562
7563
7564
7565#
7566# Solaris pkg-config is annoying.  For at least one package (D-Bus, I'm
7567# looking at *you*!), there are separate include files for 32-bit and
7568# 64-bit builds (I guess using "unsigned long long" as a 64-bit integer
7569# type on a 64-bit build is like crossing the beams or soething), and
7570# there are two separate .pc files, so if we're doing a 32-bit build we
7571# should make sure we look in /usr/lib/pkgconfig for .pc files and if
7572# we're doing a 64-bit build we should make sure we look in
7573# /usr/lib/amd64/pkgconfig for .pc files.
7574#
7575case "$host_os" in
7576
7577solaris*)
7578	if test "$ac_cv_sizeof_void_p" -eq 8; then
7579		#
7580		# 64-bit build.  If the path is empty, set it to
7581                # /usr/lib/amd64/pkgconfig; otherwise, if
7582                # /usr/lib/pkgconfig appears in the path, prepend
7583		# /usr/lib/amd64/pkgconfig to it; otherwise, put
7584		# /usr/lib/amd64/pkgconfig at the end.
7585		#
7586		if test -z "$PKG_CONFIG_PATH"; then
7587			#
7588			# Not set, or empty.  Set it to
7589			# /usr/lib/amd64/pkgconfig.
7590			#
7591			PKG_CONFIG_PATH=/usr/lib/amd64/pkgconfig
7592		elif test ! -z `echo "$PKG_CONFIG_PATH" | grep "/usr/lib/pkgconfig"`; then
7593			#
7594			# It contains /usr/lib/pkgconfig.  Prepend
7595			# /usr/lib/amd64/pkgconfig to /usr/lib/pkgconfig.
7596			#
7597			PKG_CONFIG_PATH=`echo "$PKG_CONFIG_PATH" | sed "s;/usr/lib/pkgconfig;/usr/lib/amd64/pkgconfig:/usr/lib/pkgconfig;"`
7598		else
7599			#
7600			# Not empty, but doesn't contain /usr/lib/pkgconfig.
7601			# Append /usr/lib/amd64/pkgconfig to it.
7602			#
7603			PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/lib/amd64/pkgconfig"
7604		fi
7605		export PKG_CONFIG_PATH
7606	elif test "$ac_cv_sizeof_void_p" -eq 4; then
7607		#
7608		# 32-bit build.  If /usr/amd64/lib/pkgconfig appears
7609		# in the path, prepend /usr/lib/pkgconfig to it.
7610		#
7611		if test ! -z `echo "$PKG_CONFIG_PATH" | grep "/usr/lib/amd64/pkgconfig"`; then
7612			#
7613			# It contains /usr/lib/amd64/pkgconfig.  Prepend
7614			# /usr/lib/pkgconfig to /usr/lib/amd64/pkgconfig.
7615			#
7616			PKG_CONFIG_PATH=`echo "$PKG_CONFIG_PATH" | sed "s;/usr/lib/amd64/pkgconfig;/usr/lib/pkgconfig:/usr/lib/amd64/pkgconfig;"`
7617			export PKG_CONFIG_PATH
7618		fi
7619	fi
7620esac
7621
7622#
7623# Handle each capture type.
7624#
7625case "$V_PCAP" in
7626dlpi)
7627	#
7628	# Checks for some header files.
7629	#
7630	for ac_header in sys/bufmod.h sys/dlpi_ext.h
7631do :
7632  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7633ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7634if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7635  cat >>confdefs.h <<_ACEOF
7636#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7637_ACEOF
7638
7639fi
7640
7641done
7642
7643
7644	#
7645	# Checks to see if Solaris has the public libdlpi(3LIB) library.
7646	# Note: The existence of /usr/include/libdlpi.h does not mean it is the
7647	# public libdlpi(3LIB) version. Before libdlpi was made public, a
7648	# private version also existed, which did not have the same APIs.
7649	# Due to a gcc bug, the default search path for 32-bit libraries does
7650	# not include /lib, we add it explicitly here.
7651	# [http://bugs.opensolaris.org/view_bug.do?bug_id=6619485].
7652	# Also, due to the bug above applications that link to libpcap with
7653	# libdlpi will have to add "-L/lib" option to "configure".
7654	#
7655	save_LDFLAGS="$LDFLAGS"
7656	LDFLAGS="$LIBS -L/lib"
7657	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5
7658$as_echo_n "checking for dlpi_walk in -ldlpi... " >&6; }
7659if ${ac_cv_lib_dlpi_dlpi_walk+:} false; then :
7660  $as_echo_n "(cached) " >&6
7661else
7662  ac_check_lib_save_LIBS=$LIBS
7663LIBS="-ldlpi  $LIBS"
7664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7665/* end confdefs.h.  */
7666
7667/* Override any GCC internal prototype to avoid an error.
7668   Use char because int might match the return type of a GCC
7669   builtin and then its argument prototype would still apply.  */
7670#ifdef __cplusplus
7671extern "C"
7672#endif
7673char dlpi_walk ();
7674int
7675main ()
7676{
7677return dlpi_walk ();
7678  ;
7679  return 0;
7680}
7681_ACEOF
7682if ac_fn_c_try_link "$LINENO"; then :
7683  ac_cv_lib_dlpi_dlpi_walk=yes
7684else
7685  ac_cv_lib_dlpi_dlpi_walk=no
7686fi
7687rm -f core conftest.err conftest.$ac_objext \
7688    conftest$ac_exeext conftest.$ac_ext
7689LIBS=$ac_check_lib_save_LIBS
7690fi
7691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5
7692$as_echo "$ac_cv_lib_dlpi_dlpi_walk" >&6; }
7693if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes; then :
7694
7695			LIBS="-ldlpi $LIBS"
7696			LIBS_STATIC="-ldlpi $LIBS_STATIC"
7697			LIBS_PRIVATE="-ldlpi $LIBS_PRIVATE"
7698			V_PCAP=libdlpi
7699
7700			#
7701			# Capture module plus common code needed for
7702			# common functions used by pcap-[dlpi,libdlpi].c
7703			#
7704			PLATFORM_C_SRC="pcap-libdlpi.c dlpisubs.c"
7705
7706$as_echo "#define HAVE_LIBDLPI 1" >>confdefs.h
7707
7708
7709else
7710
7711			V_PCAP=dlpi
7712
7713			#
7714			# Capture module plus common code needed for
7715			# common functions used by pcap-[dlpi,libdlpi].c
7716			#
7717			PLATFORM_C_SRC="pcap-dlpi.c dlpisubs.c"
7718
7719fi
7720
7721	LDFLAGS="$save_LDFLAGS"
7722
7723	#
7724	# Checks whether <sys/dlpi.h> is usable, to catch weird SCO
7725	# versions of DLPI.
7726	#
7727	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/dlpi.h> is usable" >&5
7728$as_echo_n "checking whether <sys/dlpi.h> is usable... " >&6; }
7729	if ${ac_cv_sys_dlpi_usable+:} false; then :
7730  $as_echo_n "(cached) " >&6
7731else
7732  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7733/* end confdefs.h.  */
7734
7735			#include <sys/types.h>
7736			#include <sys/time.h>
7737			#include <sys/dlpi.h>
7738
7739int
7740main ()
7741{
7742int i = DL_PROMISC_PHYS;
7743  ;
7744  return 0;
7745}
7746_ACEOF
7747if ac_fn_c_try_compile "$LINENO"; then :
7748  ac_cv_sys_dlpi_usable=yes
7749else
7750  ac_cv_sys_dlpi_usable=no
7751fi
7752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7753fi
7754
7755	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_dlpi_usable" >&5
7756$as_echo "$ac_cv_sys_dlpi_usable" >&6; }
7757	if test $ac_cv_sys_dlpi_usable = no ; then
7758		as_fn_error $? "<sys/dlpi.h> is not usable on this system; it probably has a non-standard DLPI" "$LINENO" 5
7759	fi
7760
7761	#
7762	# Check to see if Solaris has the dl_passive_req_t struct defined
7763	# in <sys/dlpi.h>.
7764	# This check is for DLPI support for passive modes.
7765	# See dlpi(7P) for more details.
7766	#
7767	ac_fn_c_check_type "$LINENO" "dl_passive_req_t" "ac_cv_type_dl_passive_req_t" "
7768		#include <sys/types.h>
7769		#include <sys/dlpi.h>
7770
7771"
7772if test "x$ac_cv_type_dl_passive_req_t" = xyes; then :
7773
7774cat >>confdefs.h <<_ACEOF
7775#define HAVE_DL_PASSIVE_REQ_T 1
7776_ACEOF
7777
7778
7779fi
7780
7781	;;
7782
7783enet)
7784	#
7785	# Capture module
7786	#
7787 	PLATFORM_C_SRC="pcap-enet.c"
7788	;;
7789
7790haiku)
7791	#
7792	# Capture module
7793	#
7794 	PLATFORM_CXX_SRC="pcap-haiku.cpp"
7795
7796	#
7797	# Just for the sake of it.
7798	#
7799	for ac_header in net/if.h net/if_dl.h net/if_types.h
7800do :
7801  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7802ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7803if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7804  cat >>confdefs.h <<_ACEOF
7805#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7806_ACEOF
7807
7808fi
7809
7810done
7811
7812	;;
7813
7814linux)
7815	#
7816	# Capture module
7817	#
7818 	PLATFORM_C_SRC="pcap-linux.c"
7819
7820	#
7821	# Do we have the wireless extensions?
7822	#
7823	for ac_header in linux/wireless.h
7824do :
7825  ac_fn_c_check_header_compile "$LINENO" "linux/wireless.h" "ac_cv_header_linux_wireless_h" "
7826#include <sys/socket.h>
7827#include <linux/if.h>
7828#include <linux/types.h>
7829
7830"
7831if test "x$ac_cv_header_linux_wireless_h" = xyes; then :
7832  cat >>confdefs.h <<_ACEOF
7833#define HAVE_LINUX_WIRELESS_H 1
7834_ACEOF
7835
7836fi
7837
7838done
7839
7840
7841	#
7842	# Do we have libnl?
7843	# We only want version 3.  Version 2 was, apparently,
7844	# short-lived, and version 1 is source and binary
7845	# incompatible with version 3, and it appears that,
7846	# these days, everybody's using version 3.  We're
7847	# not supporting older versions of the Linux kernel;
7848	# let's drop support for older versions of libnl, too.
7849	#
7850
7851# Check whether --with-libnl was given.
7852if test "${with_libnl+set}" = set; then :
7853  withval=$with_libnl; with_libnl=$withval
7854else
7855  with_libnl=if_available
7856fi
7857
7858
7859	if test x$with_libnl != xno ; then
7860		#
7861		# Check for libnl-genl-3.0 with pkg-config.
7862		#
7863
7864
7865pkg_failed=no
7866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnl-genl-3.0 with pkg-config" >&5
7867$as_echo_n "checking for libnl-genl-3.0 with pkg-config... " >&6; }
7868
7869if test -n "$PKG_CONFIG" && \
7870    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-genl-3.0\""; } >&5
7871  ($PKG_CONFIG --exists --print-errors "libnl-genl-3.0") 2>&5
7872  ac_status=$?
7873  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7874  test $ac_status = 0; }; then
7875
7876	#
7877	# The package was found, so try to get its C flags and
7878	# libraries.
7879	#
7880	if test -n "$LIBNL_CFLAGS"; then
7881    pkg_cv_LIBNL_CFLAGS="$LIBNL_CFLAGS"
7882 elif test -n "$PKG_CONFIG"; then
7883
7884if test -n "$PKG_CONFIG" && \
7885    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-genl-3.0\""; } >&5
7886  ($PKG_CONFIG --exists --print-errors "libnl-genl-3.0") 2>&5
7887  ac_status=$?
7888  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7889  test $ac_status = 0; }; then
7890  pkg_cv_LIBNL_CFLAGS=`$PKG_CONFIG --cflags "libnl-genl-3.0" 2>/dev/null`
7891		      test "x$?" != "x0" && pkg_failed=yes
7892else
7893  pkg_failed=yes
7894fi
7895 else
7896    pkg_failed=untried
7897fi
7898	if test -n "$LIBNL_LIBS"; then
7899    pkg_cv_LIBNL_LIBS="$LIBNL_LIBS"
7900 elif test -n "$PKG_CONFIG"; then
7901
7902if test -n "$PKG_CONFIG" && \
7903    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-genl-3.0\""; } >&5
7904  ($PKG_CONFIG --exists --print-errors "libnl-genl-3.0") 2>&5
7905  ac_status=$?
7906  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7907  test $ac_status = 0; }; then
7908  pkg_cv_LIBNL_LIBS=`$PKG_CONFIG --libs "libnl-genl-3.0" 2>/dev/null`
7909		      test "x$?" != "x0" && pkg_failed=yes
7910else
7911  pkg_failed=yes
7912fi
7913 else
7914    pkg_failed=untried
7915fi
7916	if test -n "$LIBNL_LIBS_STATIC"; then
7917    pkg_cv_LIBNL_LIBS_STATIC="$LIBNL_LIBS_STATIC"
7918 elif test -n "$PKG_CONFIG"; then
7919
7920if test -n "$PKG_CONFIG" && \
7921    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-genl-3.0\""; } >&5
7922  ($PKG_CONFIG --exists --print-errors "libnl-genl-3.0") 2>&5
7923  ac_status=$?
7924  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7925  test $ac_status = 0; }; then
7926  pkg_cv_LIBNL_LIBS_STATIC=`$PKG_CONFIG --libs --static "libnl-genl-3.0" 2>/dev/null`
7927		      test "x$?" != "x0" && pkg_failed=yes
7928else
7929  pkg_failed=yes
7930fi
7931 else
7932    pkg_failed=untried
7933fi
7934
7935
7936
7937	if test $pkg_failed = yes; then
7938		#
7939		# That failed - report an error.
7940		#
7941	   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
7942$as_echo "error" >&6; }
7943
7944if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7945        _pkg_short_errors_supported=yes
7946else
7947        _pkg_short_errors_supported=no
7948fi
7949	        if test $_pkg_short_errors_supported = yes; then
7950		        LIBNL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnl-genl-3.0" 2>&1`
7951	        else
7952		        LIBNL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnl-genl-3.0" 2>&1`
7953	        fi
7954		# Put the nasty error message in config.log where it belongs
7955		echo "$LIBNL_PKG_ERRORS" >&5
7956
7957		as_fn_error $? "Package requirements (libnl-genl-3.0) were not met:
7958
7959$LIBNL_PKG_ERRORS
7960
7961Consider adjusting the PKG_CONFIG_PATH environment variable if you
7962installed software in a non-standard prefix.
7963
7964
7965Alternatively, you may set the environment variables LIBNL_CFLAGS
7966and LIBNL_LIBS to avoid the need to call pkg-config.
7967See the pkg-config man page for more details." "$LINENO" 5
7968	elif test $pkg_failed = untried; then
7969		#
7970		# We don't have pkg-config, so it didn't work.
7971		#
7972	     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
7973$as_echo "not found (pkg-config not found)" >&6; }
7974	else
7975		#
7976		# We found the package.
7977		#
7978		LIBNL_CFLAGS=$pkg_cv_LIBNL_CFLAGS
7979		LIBNL_LIBS=$pkg_cv_LIBNL_LIBS
7980		LIBNL_LIBS_STATIC=$pkg_cv_LIBNL_LIBS_STATIC
7981	        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
7982$as_echo "found" >&6; }
7983
7984			pkg_config_found_libnl=yes
7985			V_INCLS="$V_INCLS $LIBNL_CFLAGS"
7986			ADDITIONAL_LIBS="$LIBNL_LIBS $ADDITIONAL_LIBS"
7987			ADDITIONAL_LIBS_STATIC="$LIBNL_LIBS_STATIC $ADDITIONAL_LIBS_STATIC"
7988			REQUIRES_PRIVATE="libnl-genl-3.0 $REQUIRES_PRIVATE"
7989
7990$as_echo "#define HAVE_LIBNL 1" >>confdefs.h
7991
7992
7993	fi
7994else
7995
7996	#
7997	# The package isn't present.
7998	#
7999	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8000$as_echo "not found" >&6; }
8001
8002fi
8003
8004
8005		if test x$pkg_config_found_libnl != xyes; then
8006			#
8007			# OK, either we don't have pkg-config or there
8008			# wasn't a .pc file for it; Check for it directly.
8009			#
8010			case "$with_libnl" in
8011
8012			yes|if_available)
8013				incdir=-I/usr/include/libnl3
8014				libnldir=
8015				;;
8016
8017			*)
8018				if test -d $withval; then
8019					libnldir=-L${withval}/lib
8020					incdir=-I${withval}/include
8021				fi
8022				;;
8023			esac
8024
8025			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl-3" >&5
8026$as_echo_n "checking for nl_socket_alloc in -lnl-3... " >&6; }
8027if ${ac_cv_lib_nl_3_nl_socket_alloc+:} false; then :
8028  $as_echo_n "(cached) " >&6
8029else
8030  ac_check_lib_save_LIBS=$LIBS
8031LIBS="-lnl-3 ${incdir} ${libnldir} -lnl-genl-3 -lnl-3  $LIBS"
8032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8033/* end confdefs.h.  */
8034
8035/* Override any GCC internal prototype to avoid an error.
8036   Use char because int might match the return type of a GCC
8037   builtin and then its argument prototype would still apply.  */
8038#ifdef __cplusplus
8039extern "C"
8040#endif
8041char nl_socket_alloc ();
8042int
8043main ()
8044{
8045return nl_socket_alloc ();
8046  ;
8047  return 0;
8048}
8049_ACEOF
8050if ac_fn_c_try_link "$LINENO"; then :
8051  ac_cv_lib_nl_3_nl_socket_alloc=yes
8052else
8053  ac_cv_lib_nl_3_nl_socket_alloc=no
8054fi
8055rm -f core conftest.err conftest.$ac_objext \
8056    conftest$ac_exeext conftest.$ac_ext
8057LIBS=$ac_check_lib_save_LIBS
8058fi
8059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_3_nl_socket_alloc" >&5
8060$as_echo "$ac_cv_lib_nl_3_nl_socket_alloc" >&6; }
8061if test "x$ac_cv_lib_nl_3_nl_socket_alloc" = xyes; then :
8062
8063				#
8064				# Yes, we have libnl 3.x.
8065				#
8066				ADDITIONAL_LIBS="${libnldir} -lnl-genl-3 -lnl-3 $ADDITIONAL_LIBS"
8067				ADDITIONAL_LIBS_STATIC="${libnldir} -lnl-genl-3 -lnl-3 $ADDITIONAL_LIBS_STATIC"
8068				LIBS_PRIVATE="${libnldir} -lnl-genl-3 -lnl-3 $LIBS_PRIVATE"
8069
8070$as_echo "#define HAVE_LIBNL 1" >>confdefs.h
8071
8072				V_INCLS="$V_INCLS ${incdir}"
8073
8074else
8075
8076				#
8077				# No, we don't have libnl at all.
8078				# Fail if the user explicitly requested
8079				# it.
8080				#
8081				if test x$with_libnl = xyes ; then
8082					as_fn_error $? "libnl support requested but libnl not found" "$LINENO" 5
8083				fi
8084
8085fi
8086
8087		fi
8088	fi
8089
8090	#
8091	# Check to see if the tpacket_auxdata struct has a tp_vlan_tci member.
8092	#
8093	# NOTE: any failure means we conclude that it doesn't have that
8094	# member, so if we don't have tpacket_auxdata, we conclude it
8095	# doesn't have that member (which is OK, as either we won't be
8096	# using code that would use that member, or we wouldn't compile
8097	# in any case).
8098	ac_fn_c_check_member "$LINENO" "struct tpacket_auxdata" "tp_vlan_tci" "ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" "
8099		#include <sys/types.h>
8100		#include <linux/if_packet.h>
8101
8102"
8103if test "x$ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" = xyes; then :
8104
8105cat >>confdefs.h <<_ACEOF
8106#define HAVE_STRUCT_TPACKET_AUXDATA_TP_VLAN_TCI 1
8107_ACEOF
8108
8109
8110fi
8111
8112	;;
8113
8114bpf)
8115	#
8116	# Capture module
8117	#
8118 	PLATFORM_C_SRC="pcap-bpf.c"
8119
8120	#
8121	# Check whether we have the *BSD-style ioctls.
8122	#
8123	for ac_header in net/if_media.h
8124do :
8125  ac_fn_c_check_header_mongrel "$LINENO" "net/if_media.h" "ac_cv_header_net_if_media_h" "$ac_includes_default"
8126if test "x$ac_cv_header_net_if_media_h" = xyes; then :
8127  cat >>confdefs.h <<_ACEOF
8128#define HAVE_NET_IF_MEDIA_H 1
8129_ACEOF
8130
8131fi
8132
8133done
8134
8135
8136	#
8137	# Check whether we have struct BPF_TIMEVAL.
8138	#
8139	ac_fn_c_check_type "$LINENO" "struct BPF_TIMEVAL" "ac_cv_type_struct_BPF_TIMEVAL" "
8140		#include <sys/types.h>
8141		#include <sys/ioctl.h>
8142		#ifdef HAVE_SYS_IOCCOM_H
8143		#include <sys/ioccom.h>
8144		#endif
8145		#include <net/bpf.h>
8146
8147"
8148if test "x$ac_cv_type_struct_BPF_TIMEVAL" = xyes; then :
8149
8150cat >>confdefs.h <<_ACEOF
8151#define HAVE_STRUCT_BPF_TIMEVAL 1
8152_ACEOF
8153
8154
8155fi
8156
8157	;;
8158
8159pf)
8160	#
8161	# Capture module
8162	#
8163 	PLATFORM_C_SRC="pcap-pf.c"
8164	;;
8165
8166snit)
8167	#
8168	# Capture module
8169	#
8170 	PLATFORM_C_SRC="pcap-snit.c"
8171	;;
8172
8173snoop)
8174	#
8175	# Capture module
8176	#
8177 	PLATFORM_C_SRC="pcap-snoop.c"
8178	;;
8179
8180dag)
8181	#
8182	# --with-pcap=dag is the only way to get here, and it means
8183	# "DAG support but nothing else"
8184	#
8185	V_DEFS="$V_DEFS -DDAG_ONLY"
8186	PLATFORM_C_SRC="pcap-dag.c"
8187	xxx_only=yes
8188	;;
8189
8190dpdk)
8191	#
8192	# --with-pcap=dpdk is the only way to get here, and it means
8193	# "DPDK support but nothing else"
8194	#
8195	V_DEFS="$V_DEFS -DDPDK_ONLY"
8196	PLATFORM_C_SRC="pcap-dpdk.c"
8197	xxx_only=yes
8198	;;
8199
8200septel)
8201	#
8202	# --with-pcap=septel is the only way to get here, and it means
8203	# "Septel support but nothing else"
8204	#
8205	V_DEFS="$V_DEFS -DSEPTEL_ONLY"
8206	PLATFORM_C_SRC="pcap-septel.c"
8207	xxx_only=yes
8208	;;
8209
8210snf)
8211	#
8212	# --with-pcap=snf is the only way to get here, and it means
8213	# "SNF support but nothing else"
8214	#
8215	V_DEFS="$V_DEFS -DSNF_ONLY"
8216	PLATFORM_C_SRC="pcap-snf.c"
8217	xxx_only=yes
8218	;;
8219
8220null)
8221	#
8222	# Capture module
8223	#
8224 	PLATFORM_C_SRC="pcap-null.c"
8225	;;
8226
8227*)
8228	as_fn_error $? "$V_PCAP is not a valid pcap type" "$LINENO" 5
8229	;;
8230esac
8231
8232if test "$V_PCAP" != null
8233then
8234	ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
8235if test "x$ac_cv_func_getifaddrs" = xyes; then :
8236
8237		#
8238		# We have "getifaddrs()"; make sure we have <ifaddrs.h>
8239		# as well, just in case some platform is really weird.
8240		#
8241		ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default"
8242if test "x$ac_cv_header_ifaddrs_h" = xyes; then :
8243
8244		    #
8245		    # We have the header, so we use "getifaddrs()" to
8246		    # get the list of interfaces.
8247		    #
8248		    PLATFORM_C_SRC="$PLATFORM_C_SRC fad-getad.c"
8249
8250else
8251
8252		    #
8253		    # We don't have the header - give up.
8254		    # XXX - we could also fall back on some other
8255		    # mechanism, but, for now, this'll catch this
8256		    # problem so that we can at least try to figure
8257		    # out something to do on systems with "getifaddrs()"
8258		    # but without "ifaddrs.h", if there is something
8259		    # we can do on those systems.
8260		    #
8261		    as_fn_error $? "Your system has getifaddrs() but doesn't have a usable <ifaddrs.h>." "$LINENO" 5
8262
8263fi
8264
8265
8266
8267else
8268
8269		#
8270		# Well, we don't have "getifaddrs()", at least not with the
8271		# libraries with which we've decided we need to link
8272		# libpcap with, so we have to use some other mechanism.
8273		#
8274		# Note that this may happen on Solaris, which has
8275		# getifaddrs(), but in -lsocket, not in -lxnet, so we
8276		# won't find it if we link with -lxnet, which we want
8277		# to do for other reasons.
8278		#
8279		# For now, we use either the SIOCGIFCONF ioctl or the
8280		# SIOCGLIFCONF ioctl, preferring the latter if we have
8281		# it; the latter is a Solarisism that first appeared
8282		# in Solaris 8.  (Solaris's getifaddrs() appears to
8283		# be built atop SIOCGLIFCONF; using it directly
8284		# avoids a not-all-that-useful middleman.)
8285		#
8286		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have SIOCGLIFCONF" >&5
8287$as_echo_n "checking whether we have SIOCGLIFCONF... " >&6; }
8288		if ${ac_cv_lbl_have_siocglifconf+:} false; then :
8289  $as_echo_n "(cached) " >&6
8290else
8291  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8292/* end confdefs.h.  */
8293#include <sys/param.h>
8294			#include <sys/file.h>
8295			#include <sys/ioctl.h>
8296			#include <sys/socket.h>
8297			#include <sys/sockio.h>
8298int
8299main ()
8300{
8301ioctl(0, SIOCGLIFCONF, (char *)0);
8302  ;
8303  return 0;
8304}
8305_ACEOF
8306if ac_fn_c_try_compile "$LINENO"; then :
8307  ac_cv_lbl_have_siocglifconf=yes
8308else
8309  ac_cv_lbl_have_siocglifconf=no
8310fi
8311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8312fi
8313
8314		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_have_siocglifconf" >&5
8315$as_echo "$ac_cv_lbl_have_siocglifconf" >&6; }
8316		if test $ac_cv_lbl_have_siocglifconf = yes ; then
8317			PLATFORM_C_SRC="$PLATFORM_C_SRC fad-glifc.c"
8318		else
8319			PLATFORM_C_SRC="$PLATFORM_C_SRC fad-gifc.c"
8320		fi
8321
8322fi
8323
8324fi
8325
8326case "$host_os" in
8327linux*)
8328	for ac_header in linux/net_tstamp.h
8329do :
8330  ac_fn_c_check_header_mongrel "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default"
8331if test "x$ac_cv_header_linux_net_tstamp_h" = xyes; then :
8332  cat >>confdefs.h <<_ACEOF
8333#define HAVE_LINUX_NET_TSTAMP_H 1
8334_ACEOF
8335
8336fi
8337
8338done
8339
8340	;;
8341*)
8342	{ $as_echo "$as_me:${as_lineno-$LINENO}: no hardware timestamp support implemented for $host_os" >&5
8343$as_echo "$as_me: no hardware timestamp support implemented for $host_os" >&6;}
8344	;;
8345esac
8346
8347#
8348# Check for socklen_t.
8349#
8350ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
8351	#include <sys/types.h>
8352	#include <sys/socket.h>
8353
8354"
8355if test "x$ac_cv_type_socklen_t" = xyes; then :
8356
8357cat >>confdefs.h <<_ACEOF
8358#define HAVE_SOCKLEN_T 1
8359_ACEOF
8360
8361
8362fi
8363
8364
8365# Check whether --enable-ipv6 was given.
8366if test "${enable_ipv6+set}" = set; then :
8367  enableval=$enable_ipv6;
8368else
8369  enable_ipv6=yes
8370fi
8371
8372if test "$enable_ipv6" != "no"; then
8373	#
8374	# We've already made sure we have getaddrinfo above in
8375	# AC_LBL_LIBRARY_NET.
8376	#
8377
8378$as_echo "#define INET6 1" >>confdefs.h
8379
8380fi
8381
8382# Check for Endace DAG card support.
8383
8384# Check whether --with-dag was given.
8385if test "${with_dag+set}" = set; then :
8386  withval=$with_dag;
8387	if test "$withval" = no
8388	then
8389		# User doesn't want DAG support.
8390		want_dag=no
8391	elif test "$withval" = yes
8392	then
8393		# User wants DAG support but hasn't specified a directory.
8394		want_dag=yes
8395	else
8396		# User wants DAG support and has specified a directory, so use the provided value.
8397		want_dag=yes
8398		dag_root=$withval
8399	fi
8400
8401else
8402
8403	if test "$V_PCAP" = dag; then
8404		# User requested DAG-only libpcap, so we'd better have
8405		# the DAG API.
8406		want_dag=yes
8407	elif test "xxx_only" = yes; then
8408		# User requested something-else-only pcap, so they don't
8409		# want DAG support.
8410		want_dag=no
8411	else
8412		#
8413		# Use DAG API if present, otherwise don't
8414		#
8415		want_dag=ifpresent
8416	fi
8417
8418fi
8419
8420
8421
8422# Check whether --with-dag-includes was given.
8423if test "${with_dag_includes+set}" = set; then :
8424  withval=$with_dag_includes;
8425	# User wants DAG support and has specified a header directory, so use the provided value.
8426	want_dag=yes
8427	dag_include_dir=$withval
8428
8429fi
8430
8431
8432
8433# Check whether --with-dag-libraries was given.
8434if test "${with_dag_libraries+set}" = set; then :
8435  withval=$with_dag_libraries;
8436	# User wants DAG support and has specified a library directory, so use the provided value.
8437	want_dag=yes
8438	dag_lib_dir=$withval
8439
8440fi
8441
8442
8443if test "$want_dag" != no; then
8444
8445	# If necessary, set default paths for DAG API headers and libraries.
8446	if test -z "$dag_root"; then
8447		dag_root=/usr/local
8448	fi
8449
8450	if test -z "$dag_include_dir"; then
8451		dag_include_dir="$dag_root/include"
8452	fi
8453
8454	if test -z "$dag_lib_dir"; then
8455		dag_lib_dir="$dag_root/lib"
8456		#
8457		# Handle multiarch systems.
8458		#
8459		if test -d "$dag_lib_dir/$host"
8460		then
8461			dag_lib_dir="$dag_lib_dir/$host"
8462		fi
8463	fi
8464
8465
8466	save_CFLAGS="$CFLAGS"
8467	save_LIBS="$LIBS"
8468	save_LDFLAGS="$LDFLAGS"
8469
8470	CFLAGS="$CFLAGS -I$dag_include_dir"
8471	for ac_header in dagapi.h
8472do :
8473  ac_fn_c_check_header_mongrel "$LINENO" "dagapi.h" "ac_cv_header_dagapi_h" "$ac_includes_default"
8474if test "x$ac_cv_header_dagapi_h" = xyes; then :
8475  cat >>confdefs.h <<_ACEOF
8476#define HAVE_DAGAPI_H 1
8477_ACEOF
8478
8479fi
8480
8481done
8482
8483
8484	CFLAGS="$save_CFLAGS"
8485	LIBS="$save_LIBS"
8486	LDFLAGS="$save_LDFLAGS"
8487
8488
8489	if test "$ac_cv_header_dagapi_h" = yes; then
8490
8491		V_INCLS="$V_INCLS -I$dag_include_dir"
8492
8493		if test $V_PCAP != dag ; then
8494			 MODULE_C_SRC="$MODULE_C_SRC pcap-dag.c"
8495		fi
8496
8497		# Check for various DAG API functions.
8498		# Don't need to save and restore LIBS to prevent -ldag being
8499		# included if there's a found-action (arg 3).
8500
8501	save_CFLAGS="$CFLAGS"
8502	save_LIBS="$LIBS"
8503	save_LDFLAGS="$LDFLAGS"
8504
8505		LDFLAGS="-L$dag_lib_dir"
8506		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream in -ldag" >&5
8507$as_echo_n "checking for dag_attach_stream in -ldag... " >&6; }
8508if ${ac_cv_lib_dag_dag_attach_stream+:} false; then :
8509  $as_echo_n "(cached) " >&6
8510else
8511  ac_check_lib_save_LIBS=$LIBS
8512LIBS="-ldag  $LIBS"
8513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8514/* end confdefs.h.  */
8515
8516/* Override any GCC internal prototype to avoid an error.
8517   Use char because int might match the return type of a GCC
8518   builtin and then its argument prototype would still apply.  */
8519#ifdef __cplusplus
8520extern "C"
8521#endif
8522char dag_attach_stream ();
8523int
8524main ()
8525{
8526return dag_attach_stream ();
8527  ;
8528  return 0;
8529}
8530_ACEOF
8531if ac_fn_c_try_link "$LINENO"; then :
8532  ac_cv_lib_dag_dag_attach_stream=yes
8533else
8534  ac_cv_lib_dag_dag_attach_stream=no
8535fi
8536rm -f core conftest.err conftest.$ac_objext \
8537    conftest$ac_exeext conftest.$ac_ext
8538LIBS=$ac_check_lib_save_LIBS
8539fi
8540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream" >&5
8541$as_echo "$ac_cv_lib_dag_dag_attach_stream" >&6; }
8542if test "x$ac_cv_lib_dag_dag_attach_stream" = xyes; then :
8543
8544			#
8545			# We assume that if we have libdag we have
8546			# libdagconf, as they're installed at the
8547			# same time from the same package.
8548			#
8549			ADDITIONAL_LIBS="-L$dag_lib_dir $ADDITIONAL_LIBS -ldag -ldagconf"
8550			ADDITIONAL_LIBS_STATIC="-L$dag_lib_dir $ADDITIONAL_LIBS_STATIC -ldag -ldagconf"
8551			LIBS_PRIVATE="-L$dag_lib_dir $LIBS_PRIVATE -ldag -ldagconf"
8552
8553else
8554  as_fn_error $? "DAG library lacks streams support" "$LINENO" 5
8555fi
8556
8557		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream64 in -ldag" >&5
8558$as_echo_n "checking for dag_attach_stream64 in -ldag... " >&6; }
8559if ${ac_cv_lib_dag_dag_attach_stream64+:} false; then :
8560  $as_echo_n "(cached) " >&6
8561else
8562  ac_check_lib_save_LIBS=$LIBS
8563LIBS="-ldag  $LIBS"
8564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8565/* end confdefs.h.  */
8566
8567/* Override any GCC internal prototype to avoid an error.
8568   Use char because int might match the return type of a GCC
8569   builtin and then its argument prototype would still apply.  */
8570#ifdef __cplusplus
8571extern "C"
8572#endif
8573char dag_attach_stream64 ();
8574int
8575main ()
8576{
8577return dag_attach_stream64 ();
8578  ;
8579  return 0;
8580}
8581_ACEOF
8582if ac_fn_c_try_link "$LINENO"; then :
8583  ac_cv_lib_dag_dag_attach_stream64=yes
8584else
8585  ac_cv_lib_dag_dag_attach_stream64=no
8586fi
8587rm -f core conftest.err conftest.$ac_objext \
8588    conftest$ac_exeext conftest.$ac_ext
8589LIBS=$ac_check_lib_save_LIBS
8590fi
8591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream64" >&5
8592$as_echo "$ac_cv_lib_dag_dag_attach_stream64" >&6; }
8593if test "x$ac_cv_lib_dag_dag_attach_stream64" = xyes; then :
8594  dag_large_streams="1"
8595else
8596  dag_large_streams="0"
8597fi
8598
8599		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_get_erf_types in -ldag" >&5
8600$as_echo_n "checking for dag_get_erf_types in -ldag... " >&6; }
8601if ${ac_cv_lib_dag_dag_get_erf_types+:} false; then :
8602  $as_echo_n "(cached) " >&6
8603else
8604  ac_check_lib_save_LIBS=$LIBS
8605LIBS="-ldag  $LIBS"
8606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8607/* end confdefs.h.  */
8608
8609/* Override any GCC internal prototype to avoid an error.
8610   Use char because int might match the return type of a GCC
8611   builtin and then its argument prototype would still apply.  */
8612#ifdef __cplusplus
8613extern "C"
8614#endif
8615char dag_get_erf_types ();
8616int
8617main ()
8618{
8619return dag_get_erf_types ();
8620  ;
8621  return 0;
8622}
8623_ACEOF
8624if ac_fn_c_try_link "$LINENO"; then :
8625  ac_cv_lib_dag_dag_get_erf_types=yes
8626else
8627  ac_cv_lib_dag_dag_get_erf_types=no
8628fi
8629rm -f core conftest.err conftest.$ac_objext \
8630    conftest$ac_exeext conftest.$ac_ext
8631LIBS=$ac_check_lib_save_LIBS
8632fi
8633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_erf_types" >&5
8634$as_echo "$ac_cv_lib_dag_dag_get_erf_types" >&6; }
8635if test "x$ac_cv_lib_dag_dag_get_erf_types" = xyes; then :
8636
8637
8638$as_echo "#define HAVE_DAG_GET_ERF_TYPES 1" >>confdefs.h
8639
8640fi
8641
8642		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_get_stream_erf_types in -ldag" >&5
8643$as_echo_n "checking for dag_get_stream_erf_types in -ldag... " >&6; }
8644if ${ac_cv_lib_dag_dag_get_stream_erf_types+:} false; then :
8645  $as_echo_n "(cached) " >&6
8646else
8647  ac_check_lib_save_LIBS=$LIBS
8648LIBS="-ldag  $LIBS"
8649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8650/* end confdefs.h.  */
8651
8652/* Override any GCC internal prototype to avoid an error.
8653   Use char because int might match the return type of a GCC
8654   builtin and then its argument prototype would still apply.  */
8655#ifdef __cplusplus
8656extern "C"
8657#endif
8658char dag_get_stream_erf_types ();
8659int
8660main ()
8661{
8662return dag_get_stream_erf_types ();
8663  ;
8664  return 0;
8665}
8666_ACEOF
8667if ac_fn_c_try_link "$LINENO"; then :
8668  ac_cv_lib_dag_dag_get_stream_erf_types=yes
8669else
8670  ac_cv_lib_dag_dag_get_stream_erf_types=no
8671fi
8672rm -f core conftest.err conftest.$ac_objext \
8673    conftest$ac_exeext conftest.$ac_ext
8674LIBS=$ac_check_lib_save_LIBS
8675fi
8676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_stream_erf_types" >&5
8677$as_echo "$ac_cv_lib_dag_dag_get_stream_erf_types" >&6; }
8678if test "x$ac_cv_lib_dag_dag_get_stream_erf_types" = xyes; then :
8679
8680
8681$as_echo "#define HAVE_DAG_GET_STREAM_ERF_TYPES 1" >>confdefs.h
8682
8683fi
8684
8685
8686	CFLAGS="$save_CFLAGS"
8687	LIBS="$save_LIBS"
8688	LDFLAGS="$save_LDFLAGS"
8689
8690
8691		#
8692		# We assume that if we have libdag we have libdagconf,
8693		# as they're installed at the same time from the same
8694		# package.
8695		#
8696		if test "$dag_large_streams" = 1; then
8697
8698$as_echo "#define HAVE_DAG_LARGE_STREAMS_API 1" >>confdefs.h
8699
8700
8701	save_CFLAGS="$CFLAGS"
8702	save_LIBS="$LIBS"
8703	save_LDFLAGS="$LDFLAGS"
8704
8705			LIBS="$LIBS -ldag -ldagconf"
8706			LDFLAGS="$LDFLAGS -L$dag_lib_dir"
8707			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for vdag_set_device_info in -lvdag" >&5
8708$as_echo_n "checking for vdag_set_device_info in -lvdag... " >&6; }
8709if ${ac_cv_lib_vdag_vdag_set_device_info+:} false; then :
8710  $as_echo_n "(cached) " >&6
8711else
8712  ac_check_lib_save_LIBS=$LIBS
8713LIBS="-lvdag  $LIBS"
8714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8715/* end confdefs.h.  */
8716
8717/* Override any GCC internal prototype to avoid an error.
8718   Use char because int might match the return type of a GCC
8719   builtin and then its argument prototype would still apply.  */
8720#ifdef __cplusplus
8721extern "C"
8722#endif
8723char vdag_set_device_info ();
8724int
8725main ()
8726{
8727return vdag_set_device_info ();
8728  ;
8729  return 0;
8730}
8731_ACEOF
8732if ac_fn_c_try_link "$LINENO"; then :
8733  ac_cv_lib_vdag_vdag_set_device_info=yes
8734else
8735  ac_cv_lib_vdag_vdag_set_device_info=no
8736fi
8737rm -f core conftest.err conftest.$ac_objext \
8738    conftest$ac_exeext conftest.$ac_ext
8739LIBS=$ac_check_lib_save_LIBS
8740fi
8741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vdag_vdag_set_device_info" >&5
8742$as_echo "$ac_cv_lib_vdag_vdag_set_device_info" >&6; }
8743if test "x$ac_cv_lib_vdag_vdag_set_device_info" = xyes; then :
8744  ac_dag_have_vdag="1"
8745else
8746  ac_dag_have_vdag="0"
8747fi
8748
8749
8750	CFLAGS="$save_CFLAGS"
8751	LIBS="$save_LIBS"
8752	LDFLAGS="$save_LDFLAGS"
8753
8754			if test "$ac_dag_have_vdag" = 1; then
8755
8756$as_echo "#define HAVE_DAG_VDAG 1" >>confdefs.h
8757
8758				if test "$ac_lbl_have_pthreads" != "found"; then
8759					as_fn_error $? "DAG requires pthreads, but we didn't find them" "$LINENO" 5
8760				fi
8761				ADDITIONAL_LIBS="$ADDITIONAL_LIBS $PTHREAD_LIBS"
8762				ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $PTHREAD_LIBS"
8763				LIBS_PRIVATE="$LIBS_PRIVATE $PTHREAD_LIBS"
8764			fi
8765		fi
8766
8767
8768$as_echo "#define HAVE_DAG_API 1" >>confdefs.h
8769
8770	else
8771		if test "$V_PCAP" = dag; then
8772			# User requested "dag" capture type but we couldn't
8773			# find the DAG API support.
8774			as_fn_error $? "DAG support requested with --with-pcap=dag, but the DAG headers weren't found at $dag_include_dir: make sure the DAG support is installed, specify a different path or paths if necessary, or don't request DAG support" "$LINENO" 5
8775		fi
8776
8777		if test "$want_dag" = yes; then
8778			# User wanted DAG support but we couldn't find it.
8779			as_fn_error $? "DAG support requested with --with-dag, but the DAG headers weren't found at $dag_include_dir: make sure the DAG support is installed, specify a different path or paths if necessary, or don't request DAG support" "$LINENO" 5
8780		fi
8781	fi
8782	CFLAGS="$save_CFLAGS"
8783fi
8784
8785
8786# Check whether --with-septel was given.
8787if test "${with_septel+set}" = set; then :
8788  withval=$with_septel;
8789	if test "$withval" = no
8790	then
8791		want_septel=no
8792	elif test "$withval" = yes
8793	then
8794		want_septel=yes
8795		septel_root=
8796	else
8797		want_septel=yes
8798		septel_root=$withval
8799	fi
8800
8801else
8802
8803	if test "$V_PCAP" = septel; then
8804		# User requested Septel-only libpcap, so we'd better have
8805		# the Septel API.
8806		want_septel=yes
8807	elif test "xxx_only" = yes; then
8808		# User requested something-else-only pcap, so they don't
8809		# want Septel support.
8810		want_septel=no
8811	else
8812		#
8813		# Use Septel API if present, otherwise don't
8814		#
8815		want_septel=ifpresent
8816	fi
8817
8818fi
8819
8820
8821ac_cv_lbl_septel_api=no
8822if test "$with_septel" != no; then
8823
8824	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have Septel API headers" >&5
8825$as_echo_n "checking whether we have Septel API headers... " >&6; }
8826
8827	# If necessary, set default paths for Septel API headers and libraries.
8828	if test -z "$septel_root"; then
8829		septel_root=$srcdir/../septel
8830	fi
8831
8832	septel_tools_dir="$septel_root"
8833	septel_include_dir="$septel_root/INC"
8834
8835	if test -r "$septel_include_dir/msg.h"; then
8836		ac_cv_lbl_septel_api=yes
8837	fi
8838
8839	if test "$ac_cv_lbl_septel_api" = yes; then
8840		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($septel_include_dir)" >&5
8841$as_echo "yes ($septel_include_dir)" >&6; }
8842
8843		V_INCLS="$V_INCLS -I$septel_include_dir"
8844		ADDLOBJS="$ADDLOBJS $septel_tools_dir/asciibin.o $septel_tools_dir/bit2byte.o $septel_tools_dir/confirm.o $septel_tools_dir/fmtmsg.o $septel_tools_dir/gct_unix.o $septel_tools_dir/hqueue.o $septel_tools_dir/ident.o $septel_tools_dir/mem.o $septel_tools_dir/pack.o $septel_tools_dir/parse.o $septel_tools_dir/pool.o $septel_tools_dir/sdlsig.o $septel_tools_dir/strtonum.o $septel_tools_dir/timer.o $septel_tools_dir/trace.o"
8845		ADDLARCHIVEOBJS="$ADDLARCHIVEOBJS $septel_tools_dir/asciibin.o $septel_tools_dir/bit2byte.o $septel_tools_dir/confirm.o $septel_tools_dir/fmtmsg.o $septel_tools_dir/gct_unix.o $septel_tools_dir/hqueue.o $septel_tools_dir/ident.o $septel_tools_dir/mem.o $septel_tools_dir/pack.o $septel_tools_dir/parse.o $septel_tools_dir/pool.o $septel_tools_dir/sdlsig.o $septel_tools_dir/strtonum.o $septel_tools_dir/timer.o $septel_tools_dir/trace.o"
8846
8847		if test "$V_PCAP" != septel ; then
8848			 MODULE_C_SRC="$MODULE_C_SRC pcap-septel.c"
8849		fi
8850
8851
8852$as_echo "#define HAVE_SEPTEL_API 1" >>confdefs.h
8853
8854	else
8855		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8856$as_echo "no" >&6; }
8857
8858		if test "$V_PCAP" = septel; then
8859			# User requested "septel" capture type but
8860			# we couldn't find the Septel API support.
8861			as_fn_error $? "Septel support requested with --with-pcap=septel, but the Septel headers weren't found at $septel_include_dir: make sure the Septel support is installed, specify a different path or paths if necessary, or don't request Septel support" "$LINENO" 5
8862		fi
8863
8864		if test "$want_septel" = yes; then
8865			# User wanted Septel support but we couldn't find it.
8866			as_fn_error $? "Septel support requested with --with-septel, but the Septel headers weren't found at $septel_include_dir: make sure the Septel support is installed, specify a different path or paths if necessary, or don't request Septel support" "$LINENO" 5
8867		fi
8868	fi
8869fi
8870
8871# Check for Myricom SNF support.
8872
8873# Check whether --with-snf was given.
8874if test "${with_snf+set}" = set; then :
8875  withval=$with_snf;
8876	if test "$withval" = no
8877	then
8878		# User explicitly doesn't want SNF
8879		want_snf=no
8880	elif test "$withval" = yes
8881	then
8882		# User wants SNF support but hasn't specified a directory.
8883		want_snf=yes
8884	else
8885		# User wants SNF support with a specified directory.
8886		want_snf=yes
8887		snf_root=$withval
8888	fi
8889
8890else
8891
8892	if test "$V_PCAP" = snf; then
8893		# User requested Sniffer-only libpcap, so we'd better have
8894		# the Sniffer API.
8895		want_snf=yes
8896	elif test "xxx_only" = yes; then
8897		# User requested something-else-only pcap, so they don't
8898		# want SNF support.
8899		want_snf=no
8900	else
8901		#
8902		# Use Sniffer API if present, otherwise don't
8903		#
8904		want_snf=ifpresent
8905	fi
8906
8907fi
8908
8909
8910
8911# Check whether --with-snf-includes was given.
8912if test "${with_snf_includes+set}" = set; then :
8913  withval=$with_snf_includes;
8914	# User wants SNF with specific header directory
8915	want_snf=yes
8916	snf_include_dir=$withval
8917
8918fi
8919
8920
8921
8922# Check whether --with-snf-libraries was given.
8923if test "${with_snf_libraries+set}" = set; then :
8924  withval=$with_snf_libraries;
8925	# User wants SNF with specific lib directory
8926	want_snf=yes
8927	snf_lib_dir=$withval
8928
8929fi
8930
8931
8932ac_cv_lbl_snf_api=no
8933if test "$with_snf" != no; then
8934
8935	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have Myricom Sniffer API" >&5
8936$as_echo_n "checking whether we have Myricom Sniffer API... " >&6; }
8937
8938	# If necessary, set default paths for Sniffer headers and libraries.
8939	if test -z "$snf_root"; then
8940		snf_root=/opt/snf
8941	fi
8942
8943	if test -z "$snf_include_dir"; then
8944		snf_include_dir="$snf_root/include"
8945	fi
8946
8947	if test -z "$snf_lib_dir"; then
8948		snf_lib_dir="$snf_root/lib"
8949		#
8950		# Handle multiarch systems.
8951		#
8952		if test -d "$snf_lib_dir/$host"
8953		then
8954			snf_lib_dir="$snf_lib_dir/$host"
8955		fi
8956	fi
8957
8958	if test -f "$snf_include_dir/snf.h"; then
8959		# We found a header; make sure we can link with the library
8960
8961	save_CFLAGS="$CFLAGS"
8962	save_LIBS="$LIBS"
8963	save_LDFLAGS="$LDFLAGS"
8964
8965		LDFLAGS="$LDFLAGS -L$snf_lib_dir"
8966		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for snf_init in -lsnf" >&5
8967$as_echo_n "checking for snf_init in -lsnf... " >&6; }
8968if ${ac_cv_lib_snf_snf_init+:} false; then :
8969  $as_echo_n "(cached) " >&6
8970else
8971  ac_check_lib_save_LIBS=$LIBS
8972LIBS="-lsnf  $LIBS"
8973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8974/* end confdefs.h.  */
8975
8976/* Override any GCC internal prototype to avoid an error.
8977   Use char because int might match the return type of a GCC
8978   builtin and then its argument prototype would still apply.  */
8979#ifdef __cplusplus
8980extern "C"
8981#endif
8982char snf_init ();
8983int
8984main ()
8985{
8986return snf_init ();
8987  ;
8988  return 0;
8989}
8990_ACEOF
8991if ac_fn_c_try_link "$LINENO"; then :
8992  ac_cv_lib_snf_snf_init=yes
8993else
8994  ac_cv_lib_snf_snf_init=no
8995fi
8996rm -f core conftest.err conftest.$ac_objext \
8997    conftest$ac_exeext conftest.$ac_ext
8998LIBS=$ac_check_lib_save_LIBS
8999fi
9000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_snf_snf_init" >&5
9001$as_echo "$ac_cv_lib_snf_snf_init" >&6; }
9002if test "x$ac_cv_lib_snf_snf_init" = xyes; then :
9003  ac_cv_lbl_snf_api="yes"
9004fi
9005
9006
9007	CFLAGS="$save_CFLAGS"
9008	LIBS="$save_LIBS"
9009	LDFLAGS="$save_LDFLAGS"
9010
9011		if test "$ac_cv_lbl_snf_api" = no; then
9012			as_fn_error $? "SNF API cannot correctly be linked; check config.log" "$LINENO" 5
9013		fi
9014	fi
9015
9016	if test "$ac_cv_lbl_snf_api" = yes; then
9017		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($snf_root)" >&5
9018$as_echo "yes ($snf_root)" >&6; }
9019
9020		V_INCLS="$V_INCLS -I$snf_include_dir"
9021		ADDITIONAL_LIBS="$ADDITIONAL_LIBS -L$snf_lib_dir -lsnf"
9022		ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC -L$snf_lib_dir -lsnf"
9023		LIBS_PRIVATE="$LIBS_PRIVATE -L$snf_lib_dir -lsnf"
9024
9025		if test "$V_PCAP" != snf ; then
9026			MODULE_C_SRC="$MODULE_C_SRC pcap-snf.c"
9027		fi
9028
9029
9030$as_echo "#define HAVE_SNF_API 1" >>confdefs.h
9031
9032	else
9033		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9034$as_echo "no" >&6; }
9035
9036		if test "$want_snf" = yes; then
9037			# User requested "snf" capture type but
9038			# we couldn't find the Sniffer API support.
9039			as_fn_error $? "Myricom Sniffer support requested with --with-pcap=snf, but the Sniffer headers weren't found at $snf_include_dir: make sure the Sniffer support is installed, specify a different path or paths if necessary, or don't request Sniffer support" "$LINENO" 5
9040		fi
9041
9042		if test "$want_snf" = yes; then
9043			as_fn_error $? "Myricom Sniffer support requested with --with-snf, but the Sniffer headers weren't found at $snf_include_dir: make sure the Sniffer support is installed, specify a different path or paths if necessary, or don't request Sniffer support" "$LINENO" 5
9044		fi
9045	fi
9046fi
9047
9048# Check for Riverbed TurboCap support.
9049
9050# Check whether --with-turbocap was given.
9051if test "${with_turbocap+set}" = set; then :
9052  withval=$with_turbocap;
9053	if test "$withval" = no
9054	then
9055		# User explicitly doesn't want TurboCap
9056		want_turbocap=no
9057	elif test "$withval" = yes
9058	then
9059		# User wants TurboCap support but hasn't specified a directory.
9060		want_turbocap=yes
9061	else
9062		# User wants TurboCap support with a specified directory.
9063		want_turbocap=yes
9064		turbocap_root=$withval
9065	fi
9066
9067else
9068
9069	if test "xxx_only" = yes; then
9070		# User requested something-else-only pcap, so they don't
9071		# want TurboCap support.
9072		want_turbocap=no
9073	else
9074		#
9075		# Use TurboCap API if present, otherwise don't
9076		#
9077		want_turbocap=ifpresent
9078	fi
9079
9080fi
9081
9082
9083ac_cv_lbl_turbocap_api=no
9084if test "$want_turbocap" != no; then
9085
9086	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TurboCap is supported" >&5
9087$as_echo_n "checking whether TurboCap is supported... " >&6; }
9088
9089
9090	save_CFLAGS="$CFLAGS"
9091	save_LIBS="$LIBS"
9092	save_LDFLAGS="$LDFLAGS"
9093
9094	if test ! -z "$turbocap_root"; then
9095		TURBOCAP_CFLAGS="-I$turbocap_root/include"
9096		TURBOCAP_LDFLAGS="-L$turbocap_root/lib"
9097		CFLAGS="$CFLAGS $TURBOCAP_CFLAGS"
9098		LDFLAGS="$LDFLAGS $TURBOCAP_LDFLAGS"
9099	fi
9100
9101	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9102/* end confdefs.h.  */
9103
9104	    #include <TcApi.h>
9105
9106int
9107main ()
9108{
9109
9110	    TC_INSTANCE a; TC_PORT b; TC_BOARD c;
9111	    TC_INSTANCE i;
9112	    (void)TcInstanceCreateByName("foo", &i);
9113
9114  ;
9115  return 0;
9116}
9117_ACEOF
9118if ac_fn_c_try_compile "$LINENO"; then :
9119  ac_cv_lbl_turbocap_api=yes
9120fi
9121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9122
9123
9124	CFLAGS="$save_CFLAGS"
9125	LIBS="$save_LIBS"
9126	LDFLAGS="$save_LDFLAGS"
9127
9128	if test $ac_cv_lbl_turbocap_api = yes; then
9129		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9130$as_echo "yes" >&6; }
9131
9132		MODULE_C_SRC="$MODULE_C_SRC pcap-tc.c"
9133		V_INCLS="$V_INCLS $TURBOCAP_CFLAGS"
9134		ADDITIONAL_LIBS="$ADDITIONAL_LIBS $TURBOCAP_LDFLAGS -lTcApi -lpthread -lstdc++"
9135		ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $TURBOCAP_LDFLAGS -lTcApi -lpthread -lstdc++"
9136		LIBS_PRIVATE="$LIBS_PRIVATE $TURBOCAP_LDFLAGS -lTcApi -lpthread -lstdc++"
9137
9138
9139$as_echo "#define HAVE_TC_API 1" >>confdefs.h
9140
9141	else
9142		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9143$as_echo "no" >&6; }
9144
9145		if test "$want_turbocap" = yes; then
9146			# User wanted Turbo support but we couldn't find it.
9147			as_fn_error $? "TurboCap support requested with --with-turbocap, but the TurboCap headers weren't found: make sure the TurboCap support is installed or don't request TurboCap support" "$LINENO" 5
9148		fi
9149	fi
9150fi
9151
9152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable remote packet capture" >&5
9153$as_echo_n "checking whether to enable remote packet capture... " >&6; }
9154# Check whether --enable-remote was given.
9155if test "${enable_remote+set}" = set; then :
9156  enableval=$enable_remote;
9157else
9158  enableval=no
9159fi
9160
9161case "$enableval" in
9162yes)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9163$as_echo "yes" >&6; }
9164	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Remote packet capture may expose libpcap-based applications" >&5
9165$as_echo "$as_me: WARNING: Remote packet capture may expose libpcap-based applications" >&2;}
9166	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: to attacks by malicious remote capture servers!" >&5
9167$as_echo "$as_me: WARNING: to attacks by malicious remote capture servers!" >&2;}
9168	#
9169	# rpcapd requires pthreads on UN*X.
9170	#
9171	if test "$ac_lbl_have_pthreads" != "found"; then
9172		as_fn_error $? "rpcapd requires pthreads, but we didn't find them" "$LINENO" 5
9173	fi
9174	#
9175	# It also requires crypt().
9176	# Do we have it in the system libraries?
9177	#
9178	ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
9179if test "x$ac_cv_func_crypt" = xyes; then :
9180
9181else
9182
9183		#
9184		# No.  Do we have it in -lcrypt?
9185		#
9186		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
9187$as_echo_n "checking for crypt in -lcrypt... " >&6; }
9188if ${ac_cv_lib_crypt_crypt+:} false; then :
9189  $as_echo_n "(cached) " >&6
9190else
9191  ac_check_lib_save_LIBS=$LIBS
9192LIBS="-lcrypt  $LIBS"
9193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9194/* end confdefs.h.  */
9195
9196/* Override any GCC internal prototype to avoid an error.
9197   Use char because int might match the return type of a GCC
9198   builtin and then its argument prototype would still apply.  */
9199#ifdef __cplusplus
9200extern "C"
9201#endif
9202char crypt ();
9203int
9204main ()
9205{
9206return crypt ();
9207  ;
9208  return 0;
9209}
9210_ACEOF
9211if ac_fn_c_try_link "$LINENO"; then :
9212  ac_cv_lib_crypt_crypt=yes
9213else
9214  ac_cv_lib_crypt_crypt=no
9215fi
9216rm -f core conftest.err conftest.$ac_objext \
9217    conftest$ac_exeext conftest.$ac_ext
9218LIBS=$ac_check_lib_save_LIBS
9219fi
9220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
9221$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
9222if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
9223
9224			#
9225			# Yes; add -lcrypt to the libraries for rpcapd.
9226			#
9227			RPCAPD_LIBS="$RPCAPD_LIBS -lcrypt"
9228
9229else
9230
9231			as_fn_error $? "rpcapd requires crypt(), but we didn't find it" "$LINENO" 5
9232
9233fi
9234
9235
9236fi
9237
9238
9239	#
9240	# OK, we have crypt().  Do we have getspnam()?
9241	#
9242	for ac_func in getspnam
9243do :
9244  ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
9245if test "x$ac_cv_func_getspnam" = xyes; then :
9246  cat >>confdefs.h <<_ACEOF
9247#define HAVE_GETSPNAM 1
9248_ACEOF
9249
9250fi
9251done
9252
9253
9254	#
9255	# Check for various members of struct msghdr.
9256	#
9257	ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
9258		#include \"ftmacros.h\"
9259		#include <sys/socket.h>
9260
9261"
9262if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then :
9263
9264cat >>confdefs.h <<_ACEOF
9265#define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
9266_ACEOF
9267
9268
9269fi
9270
9271	ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_flags" "ac_cv_member_struct_msghdr_msg_flags" "
9272		#include \"ftmacros.h\"
9273		#include <sys/socket.h>
9274
9275"
9276if test "x$ac_cv_member_struct_msghdr_msg_flags" = xyes; then :
9277
9278cat >>confdefs.h <<_ACEOF
9279#define HAVE_STRUCT_MSGHDR_MSG_FLAGS 1
9280_ACEOF
9281
9282
9283fi
9284
9285
9286	#
9287	# Optionally, we may want to support SSL.
9288	# Check for OpenSSL/libressl.
9289	#
9290	# First, try looking for it with pkg-config, if we have it.
9291	#
9292	# Homebrew's pkg-config does not, by default, look for
9293	# pkg-config files for packages it has installed.
9294	# Furthermore, at least for OpenSSL, they appear to be
9295	# dumped in package-specific directories whose paths are
9296	# not only package-specific but package-version-specific.
9297	#
9298	# So the only way to find openssl is to get the value of
9299	# PKG_CONFIG_PATH from "brew --env openssl" and add that
9300	# to PKG_CONFIG_PATH.  (No, we can't just assume it's under
9301	# /usr/local; Homebrew have conveniently chosen to put it
9302	# under /opt/homebrew on ARM.)
9303	#
9304	# That's the nice thing about Homebrew - it makes things easier!
9305	# Thanks!
9306	#
9307	save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
9308	if test -n "$BREW"; then
9309		openssl_pkgconfig_dir=`$BREW --env --plain openssl | sed -n 's/PKG_CONFIG_PATH: //p'`
9310		PKG_CONFIG_PATH="$openssl_pkgconfig_dir:$PKG_CONFIG_PATH"
9311	fi
9312
9313
9314pkg_failed=no
9315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl with pkg-config" >&5
9316$as_echo_n "checking for openssl with pkg-config... " >&6; }
9317
9318if test -n "$PKG_CONFIG" && \
9319    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
9320  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
9321  ac_status=$?
9322  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9323  test $ac_status = 0; }; then
9324
9325	#
9326	# The package was found, so try to get its C flags and
9327	# libraries.
9328	#
9329	if test -n "$OPENSSL_CFLAGS"; then
9330    pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"
9331 elif test -n "$PKG_CONFIG"; then
9332
9333if test -n "$PKG_CONFIG" && \
9334    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
9335  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
9336  ac_status=$?
9337  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9338  test $ac_status = 0; }; then
9339  pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null`
9340		      test "x$?" != "x0" && pkg_failed=yes
9341else
9342  pkg_failed=yes
9343fi
9344 else
9345    pkg_failed=untried
9346fi
9347	if test -n "$OPENSSL_LIBS"; then
9348    pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS"
9349 elif test -n "$PKG_CONFIG"; then
9350
9351if test -n "$PKG_CONFIG" && \
9352    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
9353  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
9354  ac_status=$?
9355  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9356  test $ac_status = 0; }; then
9357  pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null`
9358		      test "x$?" != "x0" && pkg_failed=yes
9359else
9360  pkg_failed=yes
9361fi
9362 else
9363    pkg_failed=untried
9364fi
9365	if test -n "$OPENSSL_LIBS_STATIC"; then
9366    pkg_cv_OPENSSL_LIBS_STATIC="$OPENSSL_LIBS_STATIC"
9367 elif test -n "$PKG_CONFIG"; then
9368
9369if test -n "$PKG_CONFIG" && \
9370    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
9371  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
9372  ac_status=$?
9373  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9374  test $ac_status = 0; }; then
9375  pkg_cv_OPENSSL_LIBS_STATIC=`$PKG_CONFIG --libs --static "openssl" 2>/dev/null`
9376		      test "x$?" != "x0" && pkg_failed=yes
9377else
9378  pkg_failed=yes
9379fi
9380 else
9381    pkg_failed=untried
9382fi
9383
9384
9385
9386	if test $pkg_failed = yes; then
9387		#
9388		# That failed - report an error.
9389		#
9390	   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
9391$as_echo "error" >&6; }
9392
9393if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9394        _pkg_short_errors_supported=yes
9395else
9396        _pkg_short_errors_supported=no
9397fi
9398	        if test $_pkg_short_errors_supported = yes; then
9399		        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl" 2>&1`
9400	        else
9401		        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl" 2>&1`
9402	        fi
9403		# Put the nasty error message in config.log where it belongs
9404		echo "$OPENSSL_PKG_ERRORS" >&5
9405
9406		as_fn_error $? "Package requirements (openssl) were not met:
9407
9408$OPENSSL_PKG_ERRORS
9409
9410Consider adjusting the PKG_CONFIG_PATH environment variable if you
9411installed software in a non-standard prefix.
9412
9413
9414Alternatively, you may set the environment variables OPENSSL_CFLAGS
9415and OPENSSL_LIBS to avoid the need to call pkg-config.
9416See the pkg-config man page for more details." "$LINENO" 5
9417	elif test $pkg_failed = untried; then
9418		#
9419		# We don't have pkg-config, so it didn't work.
9420		#
9421	     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
9422$as_echo "not found (pkg-config not found)" >&6; }
9423	else
9424		#
9425		# We found the package.
9426		#
9427		OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS
9428		OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS
9429		OPENSSL_LIBS_STATIC=$pkg_cv_OPENSSL_LIBS_STATIC
9430	        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
9431$as_echo "found" >&6; }
9432
9433		#
9434		# We found OpenSSL/libressl.
9435		#
9436		HAVE_OPENSSL=yes
9437		REQUIRES_PRIVATE="$REQUIRES_PRIVATE openssl"
9438
9439	fi
9440else
9441
9442	#
9443	# The package isn't present.
9444	#
9445	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9446$as_echo "not found" >&6; }
9447
9448fi
9449
9450	PKG_CONFIG_PATH="$save_PKG_CONFIG_PATH"
9451
9452	#
9453	# If it wasn't found, and we have Homebrew installed, see
9454	# if it's in Homebrew.
9455	#
9456	if test "x$HAVE_OPENSSL" != "xyes" -a -n "$BREW"; then
9457		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl in Homebrew" >&5
9458$as_echo_n "checking for openssl in Homebrew... " >&6; }
9459		#
9460		# The brew man page lies when it speaks of
9461		# $BREW --prefix --installed <formula>
9462		# outputting nothing.  In Homebrew 3.3.16,
9463		# it produces output regardless of whether
9464		# the formula is installed or not, so we
9465		# send the standard output and error to
9466		# the bit bucket.
9467		#
9468		if $BREW --prefix --installed openssl >/dev/null 2>&1; then
9469			#
9470			# Yes.  Get the include directory and library
9471			# directory.  (No, we can't just assume it's
9472			# under /usr/local; Homebrew have conveniently
9473			# chosen to put it under /opt/homebrew on ARM.)
9474			#
9475			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9476$as_echo "yes" >&6; }
9477			HAVE_OPENSSL=yes
9478			openssl_path=`$BREW --prefix openssl`
9479			OPENSSL_CFLAGS="-I$openssl_path/include"
9480			OPENSSL_LIBS="-L$openssl_path/lib -lssl -lcrypto"
9481			OPENSSL_LIBS_STATIC="-L$openssl_path/lib -lssl -lcrypto"
9482			OPENSSL_LIBS_PRIVATE="-L$openssl_path/lib -lssl -lcrypto"
9483		else
9484			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9485$as_echo "no" >&6; }
9486		fi
9487	fi
9488
9489	#
9490	# If it wasn't found, and /usr/local/include and /usr/local/lib
9491	# exist, check if it's in /usr/local.  (We check whether they
9492	# exist because, if they don't exist, the compiler will warn
9493	# about that and then ignore the argument, so they test
9494	# using just the system header files and libraries.)
9495	#
9496	# We include the standard include file to 1) make sure that
9497	# it's installed (if it's just a shared library for the
9498	# benefit of existing programs, that's not useful) and 2)
9499	# because SSL_library_init() is a library routine in some
9500	# versions and a #defined wrapper around OPENSSL_init_ssl()
9501	# in others.
9502	#
9503	if test "x$HAVE_OPENSSL" != "xyes" -a -d "/usr/local/include" -a -d "/usr/local/lib"; then
9504
9505	save_CFLAGS="$CFLAGS"
9506	save_LIBS="$LIBS"
9507	save_LDFLAGS="$LDFLAGS"
9508
9509		CFLAGS="$CFLAGS -I/usr/local/include"
9510		LIBS="$LIBS -L/usr/local/lib -lssl -lcrypto"
9511		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have OpenSSL/libressl in /usr/local that we can use" >&5
9512$as_echo_n "checking whether we have OpenSSL/libressl in /usr/local that we can use... " >&6; }
9513		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9514/* end confdefs.h.  */
9515
9516#include <openssl/ssl.h>
9517
9518int
9519main ()
9520{
9521
9522SSL_library_init();
9523return 0;
9524
9525  ;
9526  return 0;
9527}
9528_ACEOF
9529if ac_fn_c_try_link "$LINENO"; then :
9530
9531			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9532$as_echo "yes" >&6; }
9533			HAVE_OPENSSL=yes
9534			OPENSSL_CFLAGS="-I/usr/local/include"
9535			OPENSSL_LIBS="-L/usr/local/lib -lssl -lcrypto"
9536			OPENSSL_LIBS_STATIC="-L/usr/local/lib -lssl -lcrypto"
9537			OPENSSL_LIBS_PRIVATE="-L/usr/local/lib -lssl -lcrypto"
9538
9539else
9540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9541$as_echo "no" >&6; }
9542fi
9543rm -f core conftest.err conftest.$ac_objext \
9544    conftest$ac_exeext conftest.$ac_ext
9545
9546	CFLAGS="$save_CFLAGS"
9547	LIBS="$save_LIBS"
9548	LDFLAGS="$save_LDFLAGS"
9549
9550	fi
9551
9552	#
9553	# If it wasn't found, check if it's a system library.
9554	#
9555	# We include the standard include file to 1) make sure that
9556	# it's installed (if it's just a shared library for the
9557	# benefit of existing programs, that's not useful) and 2)
9558	# because SSL_library_init() is a library routine in some
9559	# versions and a #defined wrapper around OPENSSL_init_ssl()
9560	# in others.
9561	#
9562	if test "x$HAVE_OPENSSL" != "xyes"; then
9563
9564	save_CFLAGS="$CFLAGS"
9565	save_LIBS="$LIBS"
9566	save_LDFLAGS="$LDFLAGS"
9567
9568		LIBS="$LIBS -lssl -lcrypto"
9569		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have a system OpenSSL/libressl that we can use" >&5
9570$as_echo_n "checking whether we have a system OpenSSL/libressl that we can use... " >&6; }
9571		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9572/* end confdefs.h.  */
9573
9574#include <openssl/ssl.h>
9575
9576int
9577main ()
9578{
9579
9580SSL_library_init();
9581return 0;
9582
9583  ;
9584  return 0;
9585}
9586_ACEOF
9587if ac_fn_c_try_link "$LINENO"; then :
9588
9589			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9590$as_echo "yes" >&6; }
9591			HAVE_OPENSSL=yes
9592			OPENSSL_LIBS="-lssl -lcrypto"
9593			OPENSSL_LIBS_STATIC="-lssl -lcrypto"
9594			OPENSSL_LIBS_PRIVATE="-lssl -lcrypto"
9595
9596else
9597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9598$as_echo "no" >&6; }
9599fi
9600rm -f core conftest.err conftest.$ac_objext \
9601    conftest$ac_exeext conftest.$ac_ext
9602
9603	CFLAGS="$save_CFLAGS"
9604	LIBS="$save_LIBS"
9605	LDFLAGS="$save_LDFLAGS"
9606
9607	fi
9608
9609	#
9610	# OK, did we find it?
9611	#
9612	if test "x$HAVE_OPENSSL" = "xyes"; then
9613
9614$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
9615
9616		V_INCLS="$V_INCLS $OPENSSL_CFLAGS"
9617		ADDITIONAL_LIBS="$ADDITIONAL_LIBS $OPENSSL_LIBS"
9618		ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $OPENSSL_LIBS_STATIC"
9619		LIBS_PRIVATE="$LIBS_PRIVATE $OPENSSL_LIBS_PRIVATE"
9620		REQUIRES_PRIVATE="$REQUIRES_PRIVATE $OPENSSL_REQUIRES_PRIVATE"
9621	else
9622		{ $as_echo "$as_me:${as_lineno-$LINENO}: OpenSSL not found" >&5
9623$as_echo "$as_me: OpenSSL not found" >&6;}
9624	fi
9625
9626
9627$as_echo "#define ENABLE_REMOTE /**/" >>confdefs.h
9628
9629	REMOTE_C_SRC="$REMOTE_C_SRC pcap-new.c pcap-rpcap.c rpcap-protocol.c sockutils.c sslutils.c"
9630	BUILD_RPCAPD=build-rpcapd
9631	INSTALL_RPCAPD=install-rpcapd
9632	;;
9633*)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9634$as_echo "no" >&6; }
9635	;;
9636esac
9637
9638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build optimizer debugging code" >&5
9639$as_echo_n "checking whether to build optimizer debugging code... " >&6; }
9640# Check whether --enable-optimizer-dbg was given.
9641if test "${enable_optimizer_dbg+set}" = set; then :
9642  enableval=$enable_optimizer_dbg;
9643fi
9644
9645if test "$enable_optimizer_dbg" = "yes"; then
9646
9647$as_echo "#define BDEBUG 1" >>confdefs.h
9648
9649fi
9650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_optimizer_dbg-no}" >&5
9651$as_echo "${enable_optimizer_dbg-no}" >&6; }
9652
9653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build parser debugging code" >&5
9654$as_echo_n "checking whether to build parser debugging code... " >&6; }
9655# Check whether --enable-yydebug was given.
9656if test "${enable_yydebug+set}" = set; then :
9657  enableval=$enable_yydebug;
9658fi
9659
9660if test "$enable_yydebug" = "yes"; then
9661
9662$as_echo "#define YYDEBUG 1" >>confdefs.h
9663
9664fi
9665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_yydebug-no}" >&5
9666$as_echo "${enable_yydebug-no}" >&6; }
9667
9668#
9669# Look for {f}lex.
9670#
9671for ac_prog in flex lex
9672do
9673  # Extract the first word of "$ac_prog", so it can be a program name with args.
9674set dummy $ac_prog; ac_word=$2
9675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9676$as_echo_n "checking for $ac_word... " >&6; }
9677if ${ac_cv_prog_LEX+:} false; then :
9678  $as_echo_n "(cached) " >&6
9679else
9680  if test -n "$LEX"; then
9681  ac_cv_prog_LEX="$LEX" # Let the user override the test.
9682else
9683as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9684for as_dir in $PATH
9685do
9686  IFS=$as_save_IFS
9687  test -z "$as_dir" && as_dir=.
9688    for ac_exec_ext in '' $ac_executable_extensions; do
9689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9690    ac_cv_prog_LEX="$ac_prog"
9691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9692    break 2
9693  fi
9694done
9695  done
9696IFS=$as_save_IFS
9697
9698fi
9699fi
9700LEX=$ac_cv_prog_LEX
9701if test -n "$LEX"; then
9702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
9703$as_echo "$LEX" >&6; }
9704else
9705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9706$as_echo "no" >&6; }
9707fi
9708
9709
9710  test -n "$LEX" && break
9711done
9712test -n "$LEX" || LEX=":"
9713
9714if test "x$LEX" != "x:"; then
9715  cat >conftest.l <<_ACEOF
9716%%
9717a { ECHO; }
9718b { REJECT; }
9719c { yymore (); }
9720d { yyless (1); }
9721e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
9722    yyless ((input () != 0)); }
9723f { unput (yytext[0]); }
9724. { BEGIN INITIAL; }
9725%%
9726#ifdef YYTEXT_POINTER
9727extern char *yytext;
9728#endif
9729int
9730main (void)
9731{
9732  return ! yylex () + ! yywrap ();
9733}
9734_ACEOF
9735{ { ac_try="$LEX conftest.l"
9736case "(($ac_try" in
9737  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9738  *) ac_try_echo=$ac_try;;
9739esac
9740eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
9741$as_echo "$ac_try_echo"; } >&5
9742  (eval "$LEX conftest.l") 2>&5
9743  ac_status=$?
9744  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9745  test $ac_status = 0; }
9746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
9747$as_echo_n "checking lex output file root... " >&6; }
9748if ${ac_cv_prog_lex_root+:} false; then :
9749  $as_echo_n "(cached) " >&6
9750else
9751
9752if test -f lex.yy.c; then
9753  ac_cv_prog_lex_root=lex.yy
9754elif test -f lexyy.c; then
9755  ac_cv_prog_lex_root=lexyy
9756else
9757  as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
9758fi
9759fi
9760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
9761$as_echo "$ac_cv_prog_lex_root" >&6; }
9762LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
9763
9764if test -z "${LEXLIB+set}"; then
9765  { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
9766$as_echo_n "checking lex library... " >&6; }
9767if ${ac_cv_lib_lex+:} false; then :
9768  $as_echo_n "(cached) " >&6
9769else
9770
9771    ac_save_LIBS=$LIBS
9772    ac_cv_lib_lex='none needed'
9773    for ac_lib in '' -lfl -ll; do
9774      LIBS="$ac_lib $ac_save_LIBS"
9775      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9776/* end confdefs.h.  */
9777`cat $LEX_OUTPUT_ROOT.c`
9778_ACEOF
9779if ac_fn_c_try_link "$LINENO"; then :
9780  ac_cv_lib_lex=$ac_lib
9781fi
9782rm -f core conftest.err conftest.$ac_objext \
9783    conftest$ac_exeext conftest.$ac_ext
9784      test "$ac_cv_lib_lex" != 'none needed' && break
9785    done
9786    LIBS=$ac_save_LIBS
9787
9788fi
9789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
9790$as_echo "$ac_cv_lib_lex" >&6; }
9791  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
9792fi
9793
9794
9795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
9796$as_echo_n "checking whether yytext is a pointer... " >&6; }
9797if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
9798  $as_echo_n "(cached) " >&6
9799else
9800  # POSIX says lex can declare yytext either as a pointer or an array; the
9801# default is implementation-dependent.  Figure out which it is, since
9802# not all implementations provide the %pointer and %array declarations.
9803ac_cv_prog_lex_yytext_pointer=no
9804ac_save_LIBS=$LIBS
9805LIBS="$LEXLIB $ac_save_LIBS"
9806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9807/* end confdefs.h.  */
9808
9809  #define YYTEXT_POINTER 1
9810`cat $LEX_OUTPUT_ROOT.c`
9811_ACEOF
9812if ac_fn_c_try_link "$LINENO"; then :
9813  ac_cv_prog_lex_yytext_pointer=yes
9814fi
9815rm -f core conftest.err conftest.$ac_objext \
9816    conftest$ac_exeext conftest.$ac_ext
9817LIBS=$ac_save_LIBS
9818
9819fi
9820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
9821$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
9822if test $ac_cv_prog_lex_yytext_pointer = yes; then
9823
9824$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
9825
9826fi
9827rm -f conftest.l $LEX_OUTPUT_ROOT.c
9828
9829fi
9830if test "$LEX" = ":"; then
9831	as_fn_error $? "Neither flex nor lex was found." "$LINENO" 5
9832fi
9833
9834#
9835# Make sure {f}lex supports the -P, --header-file, and --nounput flags
9836# and supports processing our scanner.l.
9837#
9838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable lex" >&5
9839$as_echo_n "checking for capable lex... " >&6; }
9840if ${tcpdump_cv_capable_lex+:} false; then :
9841  $as_echo_n "(cached) " >&6
9842else
9843  if $LEX -P pcap_ --header-file=/dev/null --nounput -t $srcdir/scanner.l > /dev/null 2>&1; then
9844	    tcpdump_cv_capable_lex=yes
9845	else
9846	    tcpdump_cv_capable_lex=insufficient
9847	fi
9848fi
9849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_lex" >&5
9850$as_echo "$tcpdump_cv_capable_lex" >&6; }
9851if test $tcpdump_cv_capable_lex = insufficient ; then
9852	as_fn_error $? "$LEX is insufficient to compile libpcap.
9853 libpcap requires Flex 2.5.31 or later, or a compatible version of lex.
9854 If a suitable version of Lex/Flex is available as a non-standard command
9855 and/or not in the PATH, you can specify it using the LEX environment
9856 variable. That said, on some systems the error can mean that Flex/Lex is
9857 actually acceptable, but m4 is not. Likewise, if a suitable version of
9858 m4 (such as GNU M4) is available but has not been detected, you can
9859 specify it using the M4 environment variable." "$LINENO" 5
9860fi
9861
9862#
9863# Look for yacc/bison/byacc.
9864# If it's Bison, we do not want -y, as 1) we will be using -o to cause
9865# the output for XXX.y to be written to XXX.c and 2) we don't want
9866# it to issue warnings about stuff not supported by POSIX YACC - we
9867# want to use that stuff, and don't care whether plain YACC supports
9868# it or not, we require either Bison or Berkeley YACC.
9869#
9870BISON_BYACC=""
9871#
9872# Look for Bison.
9873#
9874for ac_prog in bison
9875do
9876  # Extract the first word of "$ac_prog", so it can be a program name with args.
9877set dummy $ac_prog; ac_word=$2
9878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9879$as_echo_n "checking for $ac_word... " >&6; }
9880if ${ac_cv_prog_BISON_BYACC+:} false; then :
9881  $as_echo_n "(cached) " >&6
9882else
9883  if test -n "$BISON_BYACC"; then
9884  ac_cv_prog_BISON_BYACC="$BISON_BYACC" # Let the user override the test.
9885else
9886as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9887for as_dir in $PATH
9888do
9889  IFS=$as_save_IFS
9890  test -z "$as_dir" && as_dir=.
9891    for ac_exec_ext in '' $ac_executable_extensions; do
9892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9893    ac_cv_prog_BISON_BYACC="$ac_prog"
9894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9895    break 2
9896  fi
9897done
9898  done
9899IFS=$as_save_IFS
9900
9901fi
9902fi
9903BISON_BYACC=$ac_cv_prog_BISON_BYACC
9904if test -n "$BISON_BYACC"; then
9905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON_BYACC" >&5
9906$as_echo "$BISON_BYACC" >&6; }
9907else
9908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9909$as_echo "no" >&6; }
9910fi
9911
9912
9913  test -n "$BISON_BYACC" && break
9914done
9915
9916if test x"$BISON_BYACC" != x; then
9917	#
9918	# We found Bison.
9919	#
9920	# Bison prior to 2.4(.1) doesn't support "%define api.pure", so use
9921	# "%pure-parser".
9922	#
9923	bison_major_version=`$BISON_BYACC -V | sed -n 's/.* \([1-9][0-9]*\)\.[0-9][0-9.]*/\1/p'`
9924	bison_minor_version=`$BISON_BYACC -V | sed -n 's/.* [1-9][0-9]*\.\([0-9]+\).*/\1/p'`
9925	if test "$bison_major_version" -lt 2 -o \
9926	    \( "$bison_major_version" -eq 2 -a "$bison_major_version" -lt 4 \)
9927	then
9928		REENTRANT_PARSER="%pure-parser"
9929	else
9930		REENTRANT_PARSER="%define api.pure"
9931	fi
9932else
9933	#
9934	# We didn't find Bison; check for Berkeley YACC, under the
9935	# names byacc and yacc.
9936	#
9937	for ac_prog in byacc yacc
9938do
9939  # Extract the first word of "$ac_prog", so it can be a program name with args.
9940set dummy $ac_prog; ac_word=$2
9941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9942$as_echo_n "checking for $ac_word... " >&6; }
9943if ${ac_cv_prog_BISON_BYACC+:} false; then :
9944  $as_echo_n "(cached) " >&6
9945else
9946  if test -n "$BISON_BYACC"; then
9947  ac_cv_prog_BISON_BYACC="$BISON_BYACC" # Let the user override the test.
9948else
9949as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9950for as_dir in $PATH
9951do
9952  IFS=$as_save_IFS
9953  test -z "$as_dir" && as_dir=.
9954    for ac_exec_ext in '' $ac_executable_extensions; do
9955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9956    ac_cv_prog_BISON_BYACC="$ac_prog"
9957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9958    break 2
9959  fi
9960done
9961  done
9962IFS=$as_save_IFS
9963
9964fi
9965fi
9966BISON_BYACC=$ac_cv_prog_BISON_BYACC
9967if test -n "$BISON_BYACC"; then
9968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON_BYACC" >&5
9969$as_echo "$BISON_BYACC" >&6; }
9970else
9971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9972$as_echo "no" >&6; }
9973fi
9974
9975
9976  test -n "$BISON_BYACC" && break
9977done
9978
9979	if test x"$BISON_BYACC" != x; then
9980		#
9981		# Make sure this is Berkeley YACC, not AT&T YACC;
9982		# the latter doesn't support reentrant parsers.
9983		# Run it with "-V"; that succeeds and reports the
9984		# version number with Berkeley YACC, but will
9985		# (probably) fail with various vendor flavors
9986		# of AT&T YACC.
9987		#
9988		# Hopefully this also eliminates any versions
9989		# of Berkeley YACC that don't support reentrant
9990		# parsers, if there are any.
9991		#
9992		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable yacc" >&5
9993$as_echo_n "checking for capable yacc... " >&6; }
9994if ${tcpdump_cv_capable_yacc+:} false; then :
9995  $as_echo_n "(cached) " >&6
9996else
9997  if $BISON_BYACC -V >/dev/null 2>&1; then
9998			tcpdump_cv_capable_yacc=yes
9999		    else
10000			tcpdump_cv_capable_yacc=insufficient
10001		    fi
10002fi
10003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_yacc" >&5
10004$as_echo "$tcpdump_cv_capable_yacc" >&6; }
10005		if test $tcpdump_cv_capable_yacc = insufficient ; then
10006		    as_fn_error $? "$BISON_BYACC is insufficient to compile libpcap.
10007 libpcap requires Bison, a newer version of Berkeley YACC with support
10008 for reentrant parsers, or another YACC compatible with them." "$LINENO" 5
10009		fi
10010	else
10011		#
10012		# OK, we found neither byacc nor yacc.
10013		#
10014		as_fn_error $? "Neither bison, byacc, nor yacc was found.
10015 libpcap requires Bison, a newer version of Berkeley YACC with support
10016 for reentrant parsers, or another YACC compatible with them." "$LINENO" 5
10017	fi
10018
10019	#
10020	# Berkeley YACC doesn't support "%define api.pure", so use
10021	# "%pure-parser".
10022	#
10023	REENTRANT_PARSER="%pure-parser"
10024fi
10025
10026
10027
10028#
10029# Do various checks for various OSes and versions of those OSes.
10030#
10031# Assume, by default, no support for shared libraries and V7/BSD
10032# convention for man pages (devices in section 4, file formats in
10033# section 5, miscellaneous info in section 7, administrative commands
10034# and daemons in section 8).  Individual cases can override this.
10035#
10036DYEXT="none"
10037MAN_DEVICES=4
10038MAN_FILE_FORMATS=5
10039MAN_MISC_INFO=7
10040MAN_ADMIN_COMMANDS=8
10041case "$host_os" in
10042
10043aix*)
10044
10045$as_echo "#define _SUN 1" >>confdefs.h
10046
10047
10048	#
10049	# AIX makes it fun to build shared and static libraries,
10050	# because they're *both* ".a" archive libraries.  We
10051	# build the static library for the benefit of the traditional
10052	# scheme of building libpcap and tcpdump in subdirectories of
10053	# the same directory, with tcpdump statically linked with the
10054	# libpcap in question, but we also build a shared library as
10055	# "libpcap.shareda" and install *it*, rather than the static
10056	# library, as "libpcap.a".
10057	#
10058	DYEXT="shareda"
10059
10060	case "$V_PCAP" in
10061
10062	dlpi)
10063		#
10064		# If we're using DLPI, applications will need to
10065		# use /lib/pse.exp if present, as we use the
10066		# STREAMS routines.
10067		#
10068		pseexe="/lib/pse.exp"
10069		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pseexe" >&5
10070$as_echo_n "checking for $pseexe... " >&6; }
10071		if test -f $pseexe ; then
10072			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10073$as_echo "yes" >&6; }
10074			LIBS="-I:$pseexe"
10075		fi
10076		;;
10077
10078	bpf)
10079		#
10080		# If we're using BPF, we need "-lodm" and "-lcfg", as
10081		# we use them to load the BPF module.
10082		#
10083		LIBS="-lodm -lcfg"
10084		;;
10085	esac
10086	;;
10087
10088darwin*)
10089	DYEXT="dylib"
10090	V_CCOPT="$V_CCOPT -fno-common"
10091	# Check whether --enable-universal was given.
10092if test "${enable_universal+set}" = set; then :
10093  enableval=$enable_universal;
10094fi
10095
10096	if test "$enable_universal" != "no"; then
10097		case "$host_os" in
10098
10099		darwin[0-7].*)
10100			#
10101			# Pre-Tiger.  Build only for 32-bit PowerPC; no
10102			# need for any special compiler or linker flags.
10103			#
10104			;;
10105
10106		darwin8.[0123]|darwin8.[0123].*)
10107			#
10108			# Tiger, prior to Intel support.  Build
10109			# libraries and executables for 32-bit PowerPC
10110			# and 64-bit PowerPC, with 32-bit PowerPC first.
10111			# (I'm guessing that's what Apple does.)
10112			#
10113			# (The double brackets are needed because
10114			# autotools/m4 use brackets as a quoting
10115			# character; the double brackets turn into
10116			# single brackets in the generated configure
10117			# file.)
10118			#
10119			V_LIB_CCOPT_FAT="-arch ppc -arch ppc64"
10120			V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64"
10121			V_PROG_CCOPT_FAT="-arch ppc -arch ppc64"
10122			V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64"
10123			;;
10124
10125		darwin8.[456]|darwin8.[456].*)
10126			#
10127			# Tiger, subsequent to Intel support but prior
10128			# to x86-64 support.  Build libraries and
10129			# executables for 32-bit PowerPC, 64-bit
10130			# PowerPC, and 32-bit x86, with 32-bit PowerPC
10131			# first.  (I'm guessing that's what Apple does.)
10132			#
10133			# (The double brackets are needed because
10134			# autotools/m4 use brackets as a quoting
10135			# character; the double brackets turn into
10136			# single brackets in the generated configure
10137			# file.)
10138			#
10139			V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386"
10140			V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386"
10141			V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386"
10142			V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386"
10143			;;
10144
10145		darwin8.*)
10146			#
10147			# All other Tiger, so subsequent to x86-64
10148			# support.  Build libraries and executables for
10149			# 32-bit PowerPC, 64-bit PowerPC, 32-bit x86,
10150			# and x86-64, with 32-bit PowerPC first.  (I'm
10151			# guessing that's what Apple does.)
10152			#
10153			V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
10154			V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
10155			V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
10156			V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
10157			;;
10158
10159		darwin9.*)
10160			#
10161			# Leopard.  Build libraries for 32-bit PowerPC,
10162			# 64-bit PowerPC, 32-bit x86, and x86-64, with
10163			# 32-bit PowerPC first, and build executables
10164			# for 32-bit x86 and 32-bit PowerPC, with 32-bit
10165			# x86 first.  (That's what Apple does.)
10166			#
10167			V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
10168			V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
10169			V_PROG_CCOPT_FAT="-arch i386 -arch ppc"
10170			V_PROG_LDFLAGS_FAT="-arch i386 -arch ppc"
10171			;;
10172
10173		darwin10.*)
10174			#
10175			# Snow Leopard.  Build libraries for x86-64,
10176			# 32-bit x86, and 32-bit PowerPC, with x86-64
10177			# first, and build executables for x86-64 and
10178			# 32-bit x86, with x86-64 first.  (That's what
10179			# Apple does, even though Snow Leopard doesn't
10180			# run on PPC, so PPC libpcap runs under Rosetta,
10181			# and Rosetta doesn't support BPF ioctls, so PPC
10182			# programs can't do live captures.)
10183			#
10184			V_LIB_CCOPT_FAT="-arch x86_64 -arch i386 -arch ppc"
10185			V_LIB_LDFLAGS_FAT="-arch x86_64 -arch i386 -arch ppc"
10186			V_PROG_CCOPT_FAT="-arch x86_64 -arch i386"
10187			V_PROG_LDFLAGS_FAT="-arch x86_64 -arch i386"
10188			;;
10189
10190		darwin1[1-8]*)
10191			#
10192			# Post-Snow Leopard, pre-Catalina.  Build
10193			# libraries for x86-64 and 32-bit x86, with
10194			# x86-64 first, and build executables only for
10195			# x86-64.  (That's what Apple does.)  This
10196			# requires no special flags for programs.
10197			#
10198			# We check whether we *can* build for i386 and,
10199			# if not, suggest that the user install the
10200			# /usr/include headers if they want to build
10201			# fat.
10202			#
10203			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether building for 32-bit x86 is supported" >&5
10204$as_echo_n "checking whether building for 32-bit x86 is supported... " >&6; }
10205
10206	save_CFLAGS="$CFLAGS"
10207	save_LIBS="$LIBS"
10208	save_LDFLAGS="$LDFLAGS"
10209
10210			CFLAGS="$CFLAGS -arch i386"
10211			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10212/* end confdefs.h.  */
10213
10214int
10215main ()
10216{
10217return 0;
10218  ;
10219  return 0;
10220}
10221_ACEOF
10222if ac_fn_c_try_link "$LINENO"; then :
10223
10224				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10225$as_echo "yes" >&6; }
10226				V_LIB_CCOPT_FAT="-arch x86_64"
10227				V_LIB_LDFLAGS_FAT="-arch x86_64"
10228
10229				#
10230				# OpenSSL installation on macOS seems
10231				# to install only the libs for 64-bit
10232				# x86 - at least that's what Brew does:
10233				# only configure 32-bit builds if we
10234				# don't have OpenSSL.
10235				#
10236				if test "$HAVE_OPENSSL" != yes; then
10237					V_LIB_CCOPT_FAT="$V_LIB_CCOPT_FAT -arch i386"
10238					V_LIB_LDFLAGS_FAT="$V_LIB_LDFLAGS_FAT -arch i386"
10239				fi
10240
10241else
10242
10243				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10244$as_echo "no" >&6; }
10245				V_LIB_CCOPT_FAT="-arch x86_64"
10246				V_LIB_LDFLAGS_FAT="-arch x86_64"
10247				case "$host_os" in
10248
10249				darwin18.*)
10250					#
10251					# Mojave; you need to install the
10252					# /usr/include headers to get
10253					# 32-bit x86 builds to work.
10254					#
10255					{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools and, after that, installing the /usr/include headers from the /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg package" >&5
10256$as_echo "$as_me: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools and, after that, installing the /usr/include headers from the /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg package" >&2;}
10257					;;
10258
10259				*)
10260					#
10261					# Pre-Mojave; the command-line
10262					# tools should be sufficient to
10263					# enable 32-bit x86 builds.
10264					#
10265					{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools" >&5
10266$as_echo "$as_me: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools" >&2;}
10267					;;
10268				esac
10269
10270fi
10271rm -f core conftest.err conftest.$ac_objext \
10272    conftest$ac_exeext conftest.$ac_ext
10273
10274	CFLAGS="$save_CFLAGS"
10275	LIBS="$save_LIBS"
10276	LDFLAGS="$save_LDFLAGS"
10277
10278			;;
10279
10280		darwin19*)
10281			#
10282			# Catalina.  Build libraries and executables
10283			# only for x86-64.  (That's what Apple does;
10284			# 32-bit x86 binaries are not supported on
10285			# Catalina.)
10286			#
10287			V_LIB_CCOPT_FAT="-arch x86_64"
10288			V_LIB_LDFLAGS_FAT="-arch x86_64"
10289			V_PROG_CCOPT_FAT="-arch x86_64"
10290			V_PROG_LDFLAGS_FAT="-arch x86_64"
10291			;;
10292
10293		darwin*)
10294			#
10295			# Post-Catalina.  Build libraries and
10296			# executables for x86-64 and ARM64.
10297			# (That's what Apple does, except they
10298			# build for arm64e, which may include
10299			# some of the pointer-checking extensions.)
10300			#
10301			# If we're building with libssl, make sure
10302			# we can build fat with it (i.e., that it
10303			# was built fat); if we can't, don't set
10304			# the target architectures, and just
10305			# build for the host we're on.
10306			#
10307			# Otherwise, just add both of them.
10308			#
10309			if test "$HAVE_OPENSSL" = yes; then
10310				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether building fat with libssl is supported" >&5
10311$as_echo_n "checking whether building fat with libssl is supported... " >&6; }
10312
10313	save_CFLAGS="$CFLAGS"
10314	save_LIBS="$LIBS"
10315	save_LDFLAGS="$LDFLAGS"
10316
10317				CFLAGS="$CFLAGS -arch x86_64 -arch arm64"
10318				LDFLAGS="$LDFLAGS $OPENSSL_LIBS"
10319				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10320/* end confdefs.h.  */
10321
10322					#include <openssl/ssl.h>
10323
10324int
10325main ()
10326{
10327
10328					SSL_library_init();
10329					return 0;
10330
10331  ;
10332  return 0;
10333}
10334_ACEOF
10335if ac_fn_c_try_link "$LINENO"; then :
10336
10337					{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10338$as_echo "yes" >&6; }
10339					V_LIB_CCOPT_FAT="-arch x86_64 -arch arm64"
10340					V_LIB_LDFLAGS_FAT="-arch x86_64 -arch arm64"
10341					V_PROG_CCOPT_FAT="-arch x86_64 -arch arm64"
10342					V_PROG_LDFLAGS_FAT="-arch x86_64 -arch arm64"
10343
10344else
10345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10346$as_echo "no" >&6; }
10347
10348fi
10349rm -f core conftest.err conftest.$ac_objext \
10350    conftest$ac_exeext conftest.$ac_ext
10351
10352	CFLAGS="$save_CFLAGS"
10353	LIBS="$save_LIBS"
10354	LDFLAGS="$save_LDFLAGS"
10355
10356			else
10357				V_LIB_CCOPT_FAT="-arch x86_64 -arch arm64"
10358				V_LIB_LDFLAGS_FAT="-arch x86_64 -arch arm64"
10359				V_PROG_CCOPT_FAT="-arch x86_64 -arch arm64"
10360				V_PROG_LDFLAGS_FAT="-arch x86_64 -arch arm64"
10361			fi
10362			;;
10363		esac
10364	fi
10365	;;
10366
10367hpux9*)
10368
10369$as_echo "#define HAVE_HPUX9 1" >>confdefs.h
10370
10371
10372	#
10373	# Use System V conventions for man pages.
10374	#
10375	MAN_ADMIN_COMMANDS=1m
10376	MAN_FILE_FORMATS=4
10377	MAN_MISC_INFO=5
10378	;;
10379
10380hpux10.0*)
10381
10382	#
10383	# Use System V conventions for man pages.
10384	#
10385	MAN_ADMIN_COMMANDS=1m
10386	MAN_FILE_FORMATS=4
10387	MAN_MISC_INFO=5
10388	;;
10389
10390hpux10.1*)
10391
10392	#
10393	# Use System V conventions for man pages.
10394	#
10395	MAN_ADMIN_COMMANDS=1m
10396	MAN_FILE_FORMATS=4
10397	MAN_MISC_INFO=5
10398	;;
10399
10400hpux*)
10401
10402$as_echo "#define HAVE_HPUX10_20_OR_LATER 1" >>confdefs.h
10403
10404	if test "`uname -m`" = "ia64"; then
10405		DYEXT="so"
10406	else
10407		DYEXT="sl"
10408	fi
10409
10410	#
10411	# "-b" builds a shared library; "+h" sets the soname.
10412	#
10413	SHLIB_OPT="-b"
10414	SONAME_OPT="+h"
10415
10416	#
10417	# Use System V conventions for man pages.
10418	#
10419	MAN_FILE_FORMATS=4
10420	MAN_MISC_INFO=5
10421	;;
10422
10423irix*)
10424	#
10425	# Use IRIX conventions for man pages; they're the same as the
10426	# System V conventions, except that they use section 8 for
10427	# administrative commands and daemons.
10428	#
10429	MAN_FILE_FORMATS=4
10430	MAN_MISC_INFO=5
10431	;;
10432
10433linux*|freebsd*|netbsd*|openbsd*|dragonfly*|kfreebsd*|gnu*|haiku*|midipix*)
10434	DYEXT="so"
10435	;;
10436
10437osf*)
10438	DYEXT="so"
10439
10440	#
10441	# DEC OSF/1, a/k/a Digital UNIX, a/k/a Tru64 UNIX.
10442	# Use Tru64 UNIX conventions for man pages; they're the same as
10443	# the System V conventions except that they use section 8 for
10444	# administrative commands and daemons.
10445	#
10446	MAN_FILE_FORMATS=4
10447	MAN_MISC_INFO=5
10448	MAN_DEVICES=7
10449	;;
10450
10451sinix*)
10452	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if SINIX compiler defines sinix" >&5
10453$as_echo_n "checking if SINIX compiler defines sinix... " >&6; }
10454	if ${ac_cv_cc_sinix_defined+:} false; then :
10455  $as_echo_n "(cached) " >&6
10456else
10457  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10458/* end confdefs.h.  */
10459
10460int
10461main ()
10462{
10463int i = sinix;
10464  ;
10465  return 0;
10466}
10467_ACEOF
10468if ac_fn_c_try_compile "$LINENO"; then :
10469  ac_cv_cc_sinix_defined=yes
10470else
10471  ac_cv_cc_sinix_defined=no
10472fi
10473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10474fi
10475
10476	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_sinix_defined" >&5
10477$as_echo "$ac_cv_cc_sinix_defined" >&6; }
10478	    if test $ac_cv_cc_sinix_defined = no ; then
10479
10480$as_echo "#define sinix 1" >>confdefs.h
10481
10482	    fi
10483	;;
10484
10485solaris*)
10486
10487$as_echo "#define HAVE_SOLARIS 1" >>confdefs.h
10488
10489
10490	DYEXT="so"
10491
10492	#
10493	# Make sure errno is thread-safe, in case we're called in
10494	# a multithreaded program.  We don't guarantee that two
10495	# threads can use the *same* pcap_t safely, but the
10496	# current version does guarantee that you can use different
10497	# pcap_t's in different threads, and even that pcap_compile()
10498	# is thread-safe (it wasn't thread-safe in some older versions).
10499	#
10500	V_CCOPT="$V_CCOPT -D_TS_ERRNO"
10501
10502	case "`uname -r`" in
10503
10504	5.12)
10505		;;
10506
10507	*)
10508		#
10509		# Use System V conventions for man pages.
10510		#
10511		MAN_ADMIN_COMMANDS=1m
10512		MAN_FILE_FORMATS=4
10513		MAN_MISC_INFO=5
10514		MAN_DEVICES=7D
10515	esac
10516	;;
10517esac
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528# Check whether --enable-shared was given.
10529if test "${enable_shared+set}" = set; then :
10530  enableval=$enable_shared;
10531fi
10532
10533test "x$enable_shared" = "xno" && DYEXT="none"
10534
10535if test -n "$ac_tool_prefix"; then
10536  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
10537set dummy ${ac_tool_prefix}ranlib; ac_word=$2
10538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10539$as_echo_n "checking for $ac_word... " >&6; }
10540if ${ac_cv_prog_RANLIB+:} false; then :
10541  $as_echo_n "(cached) " >&6
10542else
10543  if test -n "$RANLIB"; then
10544  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
10545else
10546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10547for as_dir in $PATH
10548do
10549  IFS=$as_save_IFS
10550  test -z "$as_dir" && as_dir=.
10551    for ac_exec_ext in '' $ac_executable_extensions; do
10552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10553    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
10554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10555    break 2
10556  fi
10557done
10558  done
10559IFS=$as_save_IFS
10560
10561fi
10562fi
10563RANLIB=$ac_cv_prog_RANLIB
10564if test -n "$RANLIB"; then
10565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
10566$as_echo "$RANLIB" >&6; }
10567else
10568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10569$as_echo "no" >&6; }
10570fi
10571
10572
10573fi
10574if test -z "$ac_cv_prog_RANLIB"; then
10575  ac_ct_RANLIB=$RANLIB
10576  # Extract the first word of "ranlib", so it can be a program name with args.
10577set dummy ranlib; ac_word=$2
10578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10579$as_echo_n "checking for $ac_word... " >&6; }
10580if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
10581  $as_echo_n "(cached) " >&6
10582else
10583  if test -n "$ac_ct_RANLIB"; then
10584  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
10585else
10586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10587for as_dir in $PATH
10588do
10589  IFS=$as_save_IFS
10590  test -z "$as_dir" && as_dir=.
10591    for ac_exec_ext in '' $ac_executable_extensions; do
10592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10593    ac_cv_prog_ac_ct_RANLIB="ranlib"
10594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10595    break 2
10596  fi
10597done
10598  done
10599IFS=$as_save_IFS
10600
10601fi
10602fi
10603ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
10604if test -n "$ac_ct_RANLIB"; then
10605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
10606$as_echo "$ac_ct_RANLIB" >&6; }
10607else
10608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10609$as_echo "no" >&6; }
10610fi
10611
10612  if test "x$ac_ct_RANLIB" = x; then
10613    RANLIB=":"
10614  else
10615    case $cross_compiling:$ac_tool_warned in
10616yes:)
10617{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10618$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10619ac_tool_warned=yes ;;
10620esac
10621    RANLIB=$ac_ct_RANLIB
10622  fi
10623else
10624  RANLIB="$ac_cv_prog_RANLIB"
10625fi
10626
10627if test -n "$ac_tool_prefix"; then
10628  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
10629set dummy ${ac_tool_prefix}ar; ac_word=$2
10630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10631$as_echo_n "checking for $ac_word... " >&6; }
10632if ${ac_cv_prog_AR+:} false; then :
10633  $as_echo_n "(cached) " >&6
10634else
10635  if test -n "$AR"; then
10636  ac_cv_prog_AR="$AR" # Let the user override the test.
10637else
10638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10639for as_dir in $PATH
10640do
10641  IFS=$as_save_IFS
10642  test -z "$as_dir" && as_dir=.
10643    for ac_exec_ext in '' $ac_executable_extensions; do
10644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10645    ac_cv_prog_AR="${ac_tool_prefix}ar"
10646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10647    break 2
10648  fi
10649done
10650  done
10651IFS=$as_save_IFS
10652
10653fi
10654fi
10655AR=$ac_cv_prog_AR
10656if test -n "$AR"; then
10657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
10658$as_echo "$AR" >&6; }
10659else
10660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10661$as_echo "no" >&6; }
10662fi
10663
10664
10665fi
10666if test -z "$ac_cv_prog_AR"; then
10667  ac_ct_AR=$AR
10668  # Extract the first word of "ar", so it can be a program name with args.
10669set dummy ar; ac_word=$2
10670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10671$as_echo_n "checking for $ac_word... " >&6; }
10672if ${ac_cv_prog_ac_ct_AR+:} false; then :
10673  $as_echo_n "(cached) " >&6
10674else
10675  if test -n "$ac_ct_AR"; then
10676  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
10677else
10678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10679for as_dir in $PATH
10680do
10681  IFS=$as_save_IFS
10682  test -z "$as_dir" && as_dir=.
10683    for ac_exec_ext in '' $ac_executable_extensions; do
10684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10685    ac_cv_prog_ac_ct_AR="ar"
10686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10687    break 2
10688  fi
10689done
10690  done
10691IFS=$as_save_IFS
10692
10693fi
10694fi
10695ac_ct_AR=$ac_cv_prog_ac_ct_AR
10696if test -n "$ac_ct_AR"; then
10697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
10698$as_echo "$ac_ct_AR" >&6; }
10699else
10700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10701$as_echo "no" >&6; }
10702fi
10703
10704  if test "x$ac_ct_AR" = x; then
10705    AR=""
10706  else
10707    case $cross_compiling:$ac_tool_warned in
10708yes:)
10709{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10710$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10711ac_tool_warned=yes ;;
10712esac
10713    AR=$ac_ct_AR
10714  fi
10715else
10716  AR="$ac_cv_prog_AR"
10717fi
10718
10719
10720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
10721$as_echo_n "checking whether ln -s works... " >&6; }
10722LN_S=$as_ln_s
10723if test "$LN_S" = "ln -s"; then
10724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10725$as_echo "yes" >&6; }
10726else
10727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
10728$as_echo "no, using $LN_S" >&6; }
10729fi
10730
10731
10732
10733rm -f os-proto.h
10734    if test "${LBL_CFLAGS+set}" = set; then
10735	    V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
10736    fi
10737    if test -f .devel ; then
10738	    #
10739	    # Skip all the warning option stuff on some compilers.
10740	    #
10741	    if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
10742
10743	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -W option" >&5
10744$as_echo_n "checking whether the compiler supports the -W option... " >&6; }
10745	save_CFLAGS="$CFLAGS"
10746	CFLAGS="$CFLAGS -W"
10747	#
10748	# XXX - yes, this depends on the way AC_LANG_WERROR works,
10749	# but no mechanism is provided to turn AC_LANG_WERROR on
10750	# *and then turn it back off*, so that we *only* do it when
10751	# testing compiler options - 15 years after somebody asked
10752	# for it:
10753	#
10754	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10755	#
10756	save_ac_c_werror_flag="$ac_c_werror_flag"
10757	ac_c_werror_flag=yes
10758	#
10759	# We use AC_LANG_SOURCE() so that we can control the complete
10760	# content of the program being compiled.  We do not, for example,
10761	# want the default "int main()" that AC_LANG_PROGRAM() generates,
10762	# as it will generate a warning with -Wold-style-definition, meaning
10763	# that we would treat it as not working, as the test will fail if
10764	# *any* error output, including a warning due to the flag we're
10765	# testing, is generated; see
10766	#
10767	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10768	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10769	#
10770	# This may, as per those two messages, be fixed in autoconf 2.70,
10771	# but we only require 2.64 or newer for now.
10772	#
10773	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10774/* end confdefs.h.  */
10775int main(void) { return 0; }
10776_ACEOF
10777if ac_fn_c_try_compile "$LINENO"; then :
10778
10779		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10780$as_echo "yes" >&6; }
10781		can_add_to_cflags=yes
10782		#
10783		# The compile supports this; do we have some C code for
10784		# which the warning should *not* appear?
10785		# We test the fourth argument because the third argument
10786		# could contain quotes, breaking the test.
10787		#
10788		if test "x" != "x"
10789		then
10790		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10791		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -W " >&5
10792$as_echo_n "checking whether -W ... " >&6; }
10793		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10794/* end confdefs.h.  */
10795
10796_ACEOF
10797if ac_fn_c_try_compile "$LINENO"; then :
10798
10799			#
10800			# Not a problem.
10801			#
10802			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10803$as_echo "no" >&6; }
10804
10805else
10806
10807			#
10808			# A problem.
10809			#
10810			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10811$as_echo "yes" >&6; }
10812			can_add_to_cflags=no
10813
10814fi
10815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10816		fi
10817		CFLAGS="$save_CFLAGS"
10818		if test x"$can_add_to_cflags" = "xyes"
10819		then
10820		    V_CCOPT="$V_CCOPT -W"
10821		fi
10822
10823else
10824
10825		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10826$as_echo "no" >&6; }
10827		CFLAGS="$save_CFLAGS"
10828
10829fi
10830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10831	ac_c_werror_flag="$save_ac_c_werror_flag"
10832
10833
10834	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5
10835$as_echo_n "checking whether the compiler supports the -Wall option... " >&6; }
10836	save_CFLAGS="$CFLAGS"
10837	CFLAGS="$CFLAGS -Wall"
10838	#
10839	# XXX - yes, this depends on the way AC_LANG_WERROR works,
10840	# but no mechanism is provided to turn AC_LANG_WERROR on
10841	# *and then turn it back off*, so that we *only* do it when
10842	# testing compiler options - 15 years after somebody asked
10843	# for it:
10844	#
10845	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10846	#
10847	save_ac_c_werror_flag="$ac_c_werror_flag"
10848	ac_c_werror_flag=yes
10849	#
10850	# We use AC_LANG_SOURCE() so that we can control the complete
10851	# content of the program being compiled.  We do not, for example,
10852	# want the default "int main()" that AC_LANG_PROGRAM() generates,
10853	# as it will generate a warning with -Wold-style-definition, meaning
10854	# that we would treat it as not working, as the test will fail if
10855	# *any* error output, including a warning due to the flag we're
10856	# testing, is generated; see
10857	#
10858	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10859	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10860	#
10861	# This may, as per those two messages, be fixed in autoconf 2.70,
10862	# but we only require 2.64 or newer for now.
10863	#
10864	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10865/* end confdefs.h.  */
10866int main(void) { return 0; }
10867_ACEOF
10868if ac_fn_c_try_compile "$LINENO"; then :
10869
10870		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10871$as_echo "yes" >&6; }
10872		can_add_to_cflags=yes
10873		#
10874		# The compile supports this; do we have some C code for
10875		# which the warning should *not* appear?
10876		# We test the fourth argument because the third argument
10877		# could contain quotes, breaking the test.
10878		#
10879		if test "x" != "x"
10880		then
10881		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10882		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wall " >&5
10883$as_echo_n "checking whether -Wall ... " >&6; }
10884		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10885/* end confdefs.h.  */
10886
10887_ACEOF
10888if ac_fn_c_try_compile "$LINENO"; then :
10889
10890			#
10891			# Not a problem.
10892			#
10893			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10894$as_echo "no" >&6; }
10895
10896else
10897
10898			#
10899			# A problem.
10900			#
10901			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10902$as_echo "yes" >&6; }
10903			can_add_to_cflags=no
10904
10905fi
10906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10907		fi
10908		CFLAGS="$save_CFLAGS"
10909		if test x"$can_add_to_cflags" = "xyes"
10910		then
10911		    V_CCOPT="$V_CCOPT -Wall"
10912		fi
10913
10914else
10915
10916		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10917$as_echo "no" >&6; }
10918		CFLAGS="$save_CFLAGS"
10919
10920fi
10921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10922	ac_c_werror_flag="$save_ac_c_werror_flag"
10923
10924
10925	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcomma option" >&5
10926$as_echo_n "checking whether the compiler supports the -Wcomma option... " >&6; }
10927	save_CFLAGS="$CFLAGS"
10928	CFLAGS="$CFLAGS -Wcomma"
10929	#
10930	# XXX - yes, this depends on the way AC_LANG_WERROR works,
10931	# but no mechanism is provided to turn AC_LANG_WERROR on
10932	# *and then turn it back off*, so that we *only* do it when
10933	# testing compiler options - 15 years after somebody asked
10934	# for it:
10935	#
10936	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10937	#
10938	save_ac_c_werror_flag="$ac_c_werror_flag"
10939	ac_c_werror_flag=yes
10940	#
10941	# We use AC_LANG_SOURCE() so that we can control the complete
10942	# content of the program being compiled.  We do not, for example,
10943	# want the default "int main()" that AC_LANG_PROGRAM() generates,
10944	# as it will generate a warning with -Wold-style-definition, meaning
10945	# that we would treat it as not working, as the test will fail if
10946	# *any* error output, including a warning due to the flag we're
10947	# testing, is generated; see
10948	#
10949	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10950	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10951	#
10952	# This may, as per those two messages, be fixed in autoconf 2.70,
10953	# but we only require 2.64 or newer for now.
10954	#
10955	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10956/* end confdefs.h.  */
10957int main(void) { return 0; }
10958_ACEOF
10959if ac_fn_c_try_compile "$LINENO"; then :
10960
10961		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10962$as_echo "yes" >&6; }
10963		can_add_to_cflags=yes
10964		#
10965		# The compile supports this; do we have some C code for
10966		# which the warning should *not* appear?
10967		# We test the fourth argument because the third argument
10968		# could contain quotes, breaking the test.
10969		#
10970		if test "x" != "x"
10971		then
10972		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10973		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wcomma " >&5
10974$as_echo_n "checking whether -Wcomma ... " >&6; }
10975		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10976/* end confdefs.h.  */
10977
10978_ACEOF
10979if ac_fn_c_try_compile "$LINENO"; then :
10980
10981			#
10982			# Not a problem.
10983			#
10984			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10985$as_echo "no" >&6; }
10986
10987else
10988
10989			#
10990			# A problem.
10991			#
10992			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10993$as_echo "yes" >&6; }
10994			can_add_to_cflags=no
10995
10996fi
10997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10998		fi
10999		CFLAGS="$save_CFLAGS"
11000		if test x"$can_add_to_cflags" = "xyes"
11001		then
11002		    V_CCOPT="$V_CCOPT -Wcomma"
11003		fi
11004
11005else
11006
11007		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11008$as_echo "no" >&6; }
11009		CFLAGS="$save_CFLAGS"
11010
11011fi
11012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11013	ac_c_werror_flag="$save_ac_c_werror_flag"
11014
11015
11016	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wdocumentation option" >&5
11017$as_echo_n "checking whether the compiler supports the -Wdocumentation option... " >&6; }
11018	save_CFLAGS="$CFLAGS"
11019	CFLAGS="$CFLAGS -Wdocumentation"
11020	#
11021	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11022	# but no mechanism is provided to turn AC_LANG_WERROR on
11023	# *and then turn it back off*, so that we *only* do it when
11024	# testing compiler options - 15 years after somebody asked
11025	# for it:
11026	#
11027	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11028	#
11029	save_ac_c_werror_flag="$ac_c_werror_flag"
11030	ac_c_werror_flag=yes
11031	#
11032	# We use AC_LANG_SOURCE() so that we can control the complete
11033	# content of the program being compiled.  We do not, for example,
11034	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11035	# as it will generate a warning with -Wold-style-definition, meaning
11036	# that we would treat it as not working, as the test will fail if
11037	# *any* error output, including a warning due to the flag we're
11038	# testing, is generated; see
11039	#
11040	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11041	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11042	#
11043	# This may, as per those two messages, be fixed in autoconf 2.70,
11044	# but we only require 2.64 or newer for now.
11045	#
11046	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11047/* end confdefs.h.  */
11048int main(void) { return 0; }
11049_ACEOF
11050if ac_fn_c_try_compile "$LINENO"; then :
11051
11052		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11053$as_echo "yes" >&6; }
11054		can_add_to_cflags=yes
11055		#
11056		# The compile supports this; do we have some C code for
11057		# which the warning should *not* appear?
11058		# We test the fourth argument because the third argument
11059		# could contain quotes, breaking the test.
11060		#
11061		if test "x" != "x"
11062		then
11063		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11064		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wdocumentation " >&5
11065$as_echo_n "checking whether -Wdocumentation ... " >&6; }
11066		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11067/* end confdefs.h.  */
11068
11069_ACEOF
11070if ac_fn_c_try_compile "$LINENO"; then :
11071
11072			#
11073			# Not a problem.
11074			#
11075			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11076$as_echo "no" >&6; }
11077
11078else
11079
11080			#
11081			# A problem.
11082			#
11083			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11084$as_echo "yes" >&6; }
11085			can_add_to_cflags=no
11086
11087fi
11088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11089		fi
11090		CFLAGS="$save_CFLAGS"
11091		if test x"$can_add_to_cflags" = "xyes"
11092		then
11093		    V_CCOPT="$V_CCOPT -Wdocumentation"
11094		fi
11095
11096else
11097
11098		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11099$as_echo "no" >&6; }
11100		CFLAGS="$save_CFLAGS"
11101
11102fi
11103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11104	ac_c_werror_flag="$save_ac_c_werror_flag"
11105
11106
11107	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wformat-nonliteral option" >&5
11108$as_echo_n "checking whether the compiler supports the -Wformat-nonliteral option... " >&6; }
11109	save_CFLAGS="$CFLAGS"
11110	CFLAGS="$CFLAGS -Wformat-nonliteral"
11111	#
11112	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11113	# but no mechanism is provided to turn AC_LANG_WERROR on
11114	# *and then turn it back off*, so that we *only* do it when
11115	# testing compiler options - 15 years after somebody asked
11116	# for it:
11117	#
11118	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11119	#
11120	save_ac_c_werror_flag="$ac_c_werror_flag"
11121	ac_c_werror_flag=yes
11122	#
11123	# We use AC_LANG_SOURCE() so that we can control the complete
11124	# content of the program being compiled.  We do not, for example,
11125	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11126	# as it will generate a warning with -Wold-style-definition, meaning
11127	# that we would treat it as not working, as the test will fail if
11128	# *any* error output, including a warning due to the flag we're
11129	# testing, is generated; see
11130	#
11131	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11132	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11133	#
11134	# This may, as per those two messages, be fixed in autoconf 2.70,
11135	# but we only require 2.64 or newer for now.
11136	#
11137	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11138/* end confdefs.h.  */
11139int main(void) { return 0; }
11140_ACEOF
11141if ac_fn_c_try_compile "$LINENO"; then :
11142
11143		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11144$as_echo "yes" >&6; }
11145		can_add_to_cflags=yes
11146		#
11147		# The compile supports this; do we have some C code for
11148		# which the warning should *not* appear?
11149		# We test the fourth argument because the third argument
11150		# could contain quotes, breaking the test.
11151		#
11152		if test "x" != "x"
11153		then
11154		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11155		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wformat-nonliteral " >&5
11156$as_echo_n "checking whether -Wformat-nonliteral ... " >&6; }
11157		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11158/* end confdefs.h.  */
11159
11160_ACEOF
11161if ac_fn_c_try_compile "$LINENO"; then :
11162
11163			#
11164			# Not a problem.
11165			#
11166			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11167$as_echo "no" >&6; }
11168
11169else
11170
11171			#
11172			# A problem.
11173			#
11174			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11175$as_echo "yes" >&6; }
11176			can_add_to_cflags=no
11177
11178fi
11179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11180		fi
11181		CFLAGS="$save_CFLAGS"
11182		if test x"$can_add_to_cflags" = "xyes"
11183		then
11184		    V_CCOPT="$V_CCOPT -Wformat-nonliteral"
11185		fi
11186
11187else
11188
11189		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11190$as_echo "no" >&6; }
11191		CFLAGS="$save_CFLAGS"
11192
11193fi
11194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11195	ac_c_werror_flag="$save_ac_c_werror_flag"
11196
11197
11198	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-noreturn option" >&5
11199$as_echo_n "checking whether the compiler supports the -Wmissing-noreturn option... " >&6; }
11200	save_CFLAGS="$CFLAGS"
11201	CFLAGS="$CFLAGS -Wmissing-noreturn"
11202	#
11203	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11204	# but no mechanism is provided to turn AC_LANG_WERROR on
11205	# *and then turn it back off*, so that we *only* do it when
11206	# testing compiler options - 15 years after somebody asked
11207	# for it:
11208	#
11209	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11210	#
11211	save_ac_c_werror_flag="$ac_c_werror_flag"
11212	ac_c_werror_flag=yes
11213	#
11214	# We use AC_LANG_SOURCE() so that we can control the complete
11215	# content of the program being compiled.  We do not, for example,
11216	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11217	# as it will generate a warning with -Wold-style-definition, meaning
11218	# that we would treat it as not working, as the test will fail if
11219	# *any* error output, including a warning due to the flag we're
11220	# testing, is generated; see
11221	#
11222	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11223	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11224	#
11225	# This may, as per those two messages, be fixed in autoconf 2.70,
11226	# but we only require 2.64 or newer for now.
11227	#
11228	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11229/* end confdefs.h.  */
11230int main(void) { return 0; }
11231_ACEOF
11232if ac_fn_c_try_compile "$LINENO"; then :
11233
11234		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11235$as_echo "yes" >&6; }
11236		can_add_to_cflags=yes
11237		#
11238		# The compile supports this; do we have some C code for
11239		# which the warning should *not* appear?
11240		# We test the fourth argument because the third argument
11241		# could contain quotes, breaking the test.
11242		#
11243		if test "x" != "x"
11244		then
11245		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11246		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-noreturn " >&5
11247$as_echo_n "checking whether -Wmissing-noreturn ... " >&6; }
11248		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11249/* end confdefs.h.  */
11250
11251_ACEOF
11252if ac_fn_c_try_compile "$LINENO"; then :
11253
11254			#
11255			# Not a problem.
11256			#
11257			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11258$as_echo "no" >&6; }
11259
11260else
11261
11262			#
11263			# A problem.
11264			#
11265			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11266$as_echo "yes" >&6; }
11267			can_add_to_cflags=no
11268
11269fi
11270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11271		fi
11272		CFLAGS="$save_CFLAGS"
11273		if test x"$can_add_to_cflags" = "xyes"
11274		then
11275		    V_CCOPT="$V_CCOPT -Wmissing-noreturn"
11276		fi
11277
11278else
11279
11280		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11281$as_echo "no" >&6; }
11282		CFLAGS="$save_CFLAGS"
11283
11284fi
11285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11286	ac_c_werror_flag="$save_ac_c_werror_flag"
11287
11288
11289	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5
11290$as_echo_n "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
11291	save_CFLAGS="$CFLAGS"
11292	CFLAGS="$CFLAGS -Wmissing-prototypes"
11293	#
11294	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11295	# but no mechanism is provided to turn AC_LANG_WERROR on
11296	# *and then turn it back off*, so that we *only* do it when
11297	# testing compiler options - 15 years after somebody asked
11298	# for it:
11299	#
11300	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11301	#
11302	save_ac_c_werror_flag="$ac_c_werror_flag"
11303	ac_c_werror_flag=yes
11304	#
11305	# We use AC_LANG_SOURCE() so that we can control the complete
11306	# content of the program being compiled.  We do not, for example,
11307	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11308	# as it will generate a warning with -Wold-style-definition, meaning
11309	# that we would treat it as not working, as the test will fail if
11310	# *any* error output, including a warning due to the flag we're
11311	# testing, is generated; see
11312	#
11313	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11314	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11315	#
11316	# This may, as per those two messages, be fixed in autoconf 2.70,
11317	# but we only require 2.64 or newer for now.
11318	#
11319	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11320/* end confdefs.h.  */
11321int main(void) { return 0; }
11322_ACEOF
11323if ac_fn_c_try_compile "$LINENO"; then :
11324
11325		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11326$as_echo "yes" >&6; }
11327		can_add_to_cflags=yes
11328		#
11329		# The compile supports this; do we have some C code for
11330		# which the warning should *not* appear?
11331		# We test the fourth argument because the third argument
11332		# could contain quotes, breaking the test.
11333		#
11334		if test "x" != "x"
11335		then
11336		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11337		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-prototypes " >&5
11338$as_echo_n "checking whether -Wmissing-prototypes ... " >&6; }
11339		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11340/* end confdefs.h.  */
11341
11342_ACEOF
11343if ac_fn_c_try_compile "$LINENO"; then :
11344
11345			#
11346			# Not a problem.
11347			#
11348			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11349$as_echo "no" >&6; }
11350
11351else
11352
11353			#
11354			# A problem.
11355			#
11356			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11357$as_echo "yes" >&6; }
11358			can_add_to_cflags=no
11359
11360fi
11361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11362		fi
11363		CFLAGS="$save_CFLAGS"
11364		if test x"$can_add_to_cflags" = "xyes"
11365		then
11366		    V_CCOPT="$V_CCOPT -Wmissing-prototypes"
11367		fi
11368
11369else
11370
11371		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11372$as_echo "no" >&6; }
11373		CFLAGS="$save_CFLAGS"
11374
11375fi
11376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11377	ac_c_werror_flag="$save_ac_c_werror_flag"
11378
11379
11380	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-variable-declarations option" >&5
11381$as_echo_n "checking whether the compiler supports the -Wmissing-variable-declarations option... " >&6; }
11382	save_CFLAGS="$CFLAGS"
11383	CFLAGS="$CFLAGS -Wmissing-variable-declarations"
11384	#
11385	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11386	# but no mechanism is provided to turn AC_LANG_WERROR on
11387	# *and then turn it back off*, so that we *only* do it when
11388	# testing compiler options - 15 years after somebody asked
11389	# for it:
11390	#
11391	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11392	#
11393	save_ac_c_werror_flag="$ac_c_werror_flag"
11394	ac_c_werror_flag=yes
11395	#
11396	# We use AC_LANG_SOURCE() so that we can control the complete
11397	# content of the program being compiled.  We do not, for example,
11398	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11399	# as it will generate a warning with -Wold-style-definition, meaning
11400	# that we would treat it as not working, as the test will fail if
11401	# *any* error output, including a warning due to the flag we're
11402	# testing, is generated; see
11403	#
11404	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11405	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11406	#
11407	# This may, as per those two messages, be fixed in autoconf 2.70,
11408	# but we only require 2.64 or newer for now.
11409	#
11410	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11411/* end confdefs.h.  */
11412int main(void) { return 0; }
11413_ACEOF
11414if ac_fn_c_try_compile "$LINENO"; then :
11415
11416		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11417$as_echo "yes" >&6; }
11418		can_add_to_cflags=yes
11419		#
11420		# The compile supports this; do we have some C code for
11421		# which the warning should *not* appear?
11422		# We test the fourth argument because the third argument
11423		# could contain quotes, breaking the test.
11424		#
11425		if test "x" != "x"
11426		then
11427		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11428		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-variable-declarations " >&5
11429$as_echo_n "checking whether -Wmissing-variable-declarations ... " >&6; }
11430		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11431/* end confdefs.h.  */
11432
11433_ACEOF
11434if ac_fn_c_try_compile "$LINENO"; then :
11435
11436			#
11437			# Not a problem.
11438			#
11439			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11440$as_echo "no" >&6; }
11441
11442else
11443
11444			#
11445			# A problem.
11446			#
11447			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11448$as_echo "yes" >&6; }
11449			can_add_to_cflags=no
11450
11451fi
11452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11453		fi
11454		CFLAGS="$save_CFLAGS"
11455		if test x"$can_add_to_cflags" = "xyes"
11456		then
11457		    V_CCOPT="$V_CCOPT -Wmissing-variable-declarations"
11458		fi
11459
11460else
11461
11462		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11463$as_echo "no" >&6; }
11464		CFLAGS="$save_CFLAGS"
11465
11466fi
11467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11468	ac_c_werror_flag="$save_ac_c_werror_flag"
11469
11470
11471	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-arith option" >&5
11472$as_echo_n "checking whether the compiler supports the -Wpointer-arith option... " >&6; }
11473	save_CFLAGS="$CFLAGS"
11474	CFLAGS="$CFLAGS -Wpointer-arith"
11475	#
11476	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11477	# but no mechanism is provided to turn AC_LANG_WERROR on
11478	# *and then turn it back off*, so that we *only* do it when
11479	# testing compiler options - 15 years after somebody asked
11480	# for it:
11481	#
11482	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11483	#
11484	save_ac_c_werror_flag="$ac_c_werror_flag"
11485	ac_c_werror_flag=yes
11486	#
11487	# We use AC_LANG_SOURCE() so that we can control the complete
11488	# content of the program being compiled.  We do not, for example,
11489	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11490	# as it will generate a warning with -Wold-style-definition, meaning
11491	# that we would treat it as not working, as the test will fail if
11492	# *any* error output, including a warning due to the flag we're
11493	# testing, is generated; see
11494	#
11495	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11496	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11497	#
11498	# This may, as per those two messages, be fixed in autoconf 2.70,
11499	# but we only require 2.64 or newer for now.
11500	#
11501	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11502/* end confdefs.h.  */
11503int main(void) { return 0; }
11504_ACEOF
11505if ac_fn_c_try_compile "$LINENO"; then :
11506
11507		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11508$as_echo "yes" >&6; }
11509		can_add_to_cflags=yes
11510		#
11511		# The compile supports this; do we have some C code for
11512		# which the warning should *not* appear?
11513		# We test the fourth argument because the third argument
11514		# could contain quotes, breaking the test.
11515		#
11516		if test "x" != "x"
11517		then
11518		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11519		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wpointer-arith " >&5
11520$as_echo_n "checking whether -Wpointer-arith ... " >&6; }
11521		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11522/* end confdefs.h.  */
11523
11524_ACEOF
11525if ac_fn_c_try_compile "$LINENO"; then :
11526
11527			#
11528			# Not a problem.
11529			#
11530			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11531$as_echo "no" >&6; }
11532
11533else
11534
11535			#
11536			# A problem.
11537			#
11538			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11539$as_echo "yes" >&6; }
11540			can_add_to_cflags=no
11541
11542fi
11543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11544		fi
11545		CFLAGS="$save_CFLAGS"
11546		if test x"$can_add_to_cflags" = "xyes"
11547		then
11548		    V_CCOPT="$V_CCOPT -Wpointer-arith"
11549		fi
11550
11551else
11552
11553		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11554$as_echo "no" >&6; }
11555		CFLAGS="$save_CFLAGS"
11556
11557fi
11558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11559	ac_c_werror_flag="$save_ac_c_werror_flag"
11560
11561
11562	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-sign option" >&5
11563$as_echo_n "checking whether the compiler supports the -Wpointer-sign option... " >&6; }
11564	save_CFLAGS="$CFLAGS"
11565	CFLAGS="$CFLAGS -Wpointer-sign"
11566	#
11567	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11568	# but no mechanism is provided to turn AC_LANG_WERROR on
11569	# *and then turn it back off*, so that we *only* do it when
11570	# testing compiler options - 15 years after somebody asked
11571	# for it:
11572	#
11573	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11574	#
11575	save_ac_c_werror_flag="$ac_c_werror_flag"
11576	ac_c_werror_flag=yes
11577	#
11578	# We use AC_LANG_SOURCE() so that we can control the complete
11579	# content of the program being compiled.  We do not, for example,
11580	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11581	# as it will generate a warning with -Wold-style-definition, meaning
11582	# that we would treat it as not working, as the test will fail if
11583	# *any* error output, including a warning due to the flag we're
11584	# testing, is generated; see
11585	#
11586	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11587	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11588	#
11589	# This may, as per those two messages, be fixed in autoconf 2.70,
11590	# but we only require 2.64 or newer for now.
11591	#
11592	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11593/* end confdefs.h.  */
11594int main(void) { return 0; }
11595_ACEOF
11596if ac_fn_c_try_compile "$LINENO"; then :
11597
11598		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11599$as_echo "yes" >&6; }
11600		can_add_to_cflags=yes
11601		#
11602		# The compile supports this; do we have some C code for
11603		# which the warning should *not* appear?
11604		# We test the fourth argument because the third argument
11605		# could contain quotes, breaking the test.
11606		#
11607		if test "x" != "x"
11608		then
11609		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11610		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wpointer-sign " >&5
11611$as_echo_n "checking whether -Wpointer-sign ... " >&6; }
11612		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11613/* end confdefs.h.  */
11614
11615_ACEOF
11616if ac_fn_c_try_compile "$LINENO"; then :
11617
11618			#
11619			# Not a problem.
11620			#
11621			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11622$as_echo "no" >&6; }
11623
11624else
11625
11626			#
11627			# A problem.
11628			#
11629			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11630$as_echo "yes" >&6; }
11631			can_add_to_cflags=no
11632
11633fi
11634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11635		fi
11636		CFLAGS="$save_CFLAGS"
11637		if test x"$can_add_to_cflags" = "xyes"
11638		then
11639		    V_CCOPT="$V_CCOPT -Wpointer-sign"
11640		fi
11641
11642else
11643
11644		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11645$as_echo "no" >&6; }
11646		CFLAGS="$save_CFLAGS"
11647
11648fi
11649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11650	ac_c_werror_flag="$save_ac_c_werror_flag"
11651
11652
11653	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshadow option" >&5
11654$as_echo_n "checking whether the compiler supports the -Wshadow option... " >&6; }
11655	save_CFLAGS="$CFLAGS"
11656	CFLAGS="$CFLAGS -Wshadow"
11657	#
11658	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11659	# but no mechanism is provided to turn AC_LANG_WERROR on
11660	# *and then turn it back off*, so that we *only* do it when
11661	# testing compiler options - 15 years after somebody asked
11662	# for it:
11663	#
11664	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11665	#
11666	save_ac_c_werror_flag="$ac_c_werror_flag"
11667	ac_c_werror_flag=yes
11668	#
11669	# We use AC_LANG_SOURCE() so that we can control the complete
11670	# content of the program being compiled.  We do not, for example,
11671	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11672	# as it will generate a warning with -Wold-style-definition, meaning
11673	# that we would treat it as not working, as the test will fail if
11674	# *any* error output, including a warning due to the flag we're
11675	# testing, is generated; see
11676	#
11677	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11678	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11679	#
11680	# This may, as per those two messages, be fixed in autoconf 2.70,
11681	# but we only require 2.64 or newer for now.
11682	#
11683	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11684/* end confdefs.h.  */
11685int main(void) { return 0; }
11686_ACEOF
11687if ac_fn_c_try_compile "$LINENO"; then :
11688
11689		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11690$as_echo "yes" >&6; }
11691		can_add_to_cflags=yes
11692		#
11693		# The compile supports this; do we have some C code for
11694		# which the warning should *not* appear?
11695		# We test the fourth argument because the third argument
11696		# could contain quotes, breaking the test.
11697		#
11698		if test "x" != "x"
11699		then
11700		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11701		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wshadow " >&5
11702$as_echo_n "checking whether -Wshadow ... " >&6; }
11703		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11704/* end confdefs.h.  */
11705
11706_ACEOF
11707if ac_fn_c_try_compile "$LINENO"; then :
11708
11709			#
11710			# Not a problem.
11711			#
11712			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11713$as_echo "no" >&6; }
11714
11715else
11716
11717			#
11718			# A problem.
11719			#
11720			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11721$as_echo "yes" >&6; }
11722			can_add_to_cflags=no
11723
11724fi
11725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11726		fi
11727		CFLAGS="$save_CFLAGS"
11728		if test x"$can_add_to_cflags" = "xyes"
11729		then
11730		    V_CCOPT="$V_CCOPT -Wshadow"
11731		fi
11732
11733else
11734
11735		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11736$as_echo "no" >&6; }
11737		CFLAGS="$save_CFLAGS"
11738
11739fi
11740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11741	ac_c_werror_flag="$save_ac_c_werror_flag"
11742
11743
11744	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wsign-compare option" >&5
11745$as_echo_n "checking whether the compiler supports the -Wsign-compare option... " >&6; }
11746	save_CFLAGS="$CFLAGS"
11747	CFLAGS="$CFLAGS -Wsign-compare"
11748	#
11749	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11750	# but no mechanism is provided to turn AC_LANG_WERROR on
11751	# *and then turn it back off*, so that we *only* do it when
11752	# testing compiler options - 15 years after somebody asked
11753	# for it:
11754	#
11755	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11756	#
11757	save_ac_c_werror_flag="$ac_c_werror_flag"
11758	ac_c_werror_flag=yes
11759	#
11760	# We use AC_LANG_SOURCE() so that we can control the complete
11761	# content of the program being compiled.  We do not, for example,
11762	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11763	# as it will generate a warning with -Wold-style-definition, meaning
11764	# that we would treat it as not working, as the test will fail if
11765	# *any* error output, including a warning due to the flag we're
11766	# testing, is generated; see
11767	#
11768	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11769	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11770	#
11771	# This may, as per those two messages, be fixed in autoconf 2.70,
11772	# but we only require 2.64 or newer for now.
11773	#
11774	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11775/* end confdefs.h.  */
11776int main(void) { return 0; }
11777_ACEOF
11778if ac_fn_c_try_compile "$LINENO"; then :
11779
11780		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11781$as_echo "yes" >&6; }
11782		can_add_to_cflags=yes
11783		#
11784		# The compile supports this; do we have some C code for
11785		# which the warning should *not* appear?
11786		# We test the fourth argument because the third argument
11787		# could contain quotes, breaking the test.
11788		#
11789		if test "x" != "x"
11790		then
11791		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11792		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wsign-compare " >&5
11793$as_echo_n "checking whether -Wsign-compare ... " >&6; }
11794		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11795/* end confdefs.h.  */
11796
11797_ACEOF
11798if ac_fn_c_try_compile "$LINENO"; then :
11799
11800			#
11801			# Not a problem.
11802			#
11803			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11804$as_echo "no" >&6; }
11805
11806else
11807
11808			#
11809			# A problem.
11810			#
11811			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11812$as_echo "yes" >&6; }
11813			can_add_to_cflags=no
11814
11815fi
11816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11817		fi
11818		CFLAGS="$save_CFLAGS"
11819		if test x"$can_add_to_cflags" = "xyes"
11820		then
11821		    V_CCOPT="$V_CCOPT -Wsign-compare"
11822		fi
11823
11824else
11825
11826		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11827$as_echo "no" >&6; }
11828		CFLAGS="$save_CFLAGS"
11829
11830fi
11831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11832	ac_c_werror_flag="$save_ac_c_werror_flag"
11833
11834
11835	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5
11836$as_echo_n "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; }
11837	save_CFLAGS="$CFLAGS"
11838	CFLAGS="$CFLAGS -Wstrict-prototypes"
11839	#
11840	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11841	# but no mechanism is provided to turn AC_LANG_WERROR on
11842	# *and then turn it back off*, so that we *only* do it when
11843	# testing compiler options - 15 years after somebody asked
11844	# for it:
11845	#
11846	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11847	#
11848	save_ac_c_werror_flag="$ac_c_werror_flag"
11849	ac_c_werror_flag=yes
11850	#
11851	# We use AC_LANG_SOURCE() so that we can control the complete
11852	# content of the program being compiled.  We do not, for example,
11853	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11854	# as it will generate a warning with -Wold-style-definition, meaning
11855	# that we would treat it as not working, as the test will fail if
11856	# *any* error output, including a warning due to the flag we're
11857	# testing, is generated; see
11858	#
11859	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11860	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11861	#
11862	# This may, as per those two messages, be fixed in autoconf 2.70,
11863	# but we only require 2.64 or newer for now.
11864	#
11865	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11866/* end confdefs.h.  */
11867int main(void) { return 0; }
11868_ACEOF
11869if ac_fn_c_try_compile "$LINENO"; then :
11870
11871		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11872$as_echo "yes" >&6; }
11873		can_add_to_cflags=yes
11874		#
11875		# The compile supports this; do we have some C code for
11876		# which the warning should *not* appear?
11877		# We test the fourth argument because the third argument
11878		# could contain quotes, breaking the test.
11879		#
11880		if test "x" != "x"
11881		then
11882		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11883		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wstrict-prototypes " >&5
11884$as_echo_n "checking whether -Wstrict-prototypes ... " >&6; }
11885		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11886/* end confdefs.h.  */
11887
11888_ACEOF
11889if ac_fn_c_try_compile "$LINENO"; then :
11890
11891			#
11892			# Not a problem.
11893			#
11894			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11895$as_echo "no" >&6; }
11896
11897else
11898
11899			#
11900			# A problem.
11901			#
11902			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11903$as_echo "yes" >&6; }
11904			can_add_to_cflags=no
11905
11906fi
11907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11908		fi
11909		CFLAGS="$save_CFLAGS"
11910		if test x"$can_add_to_cflags" = "xyes"
11911		then
11912		    V_CCOPT="$V_CCOPT -Wstrict-prototypes"
11913		fi
11914
11915else
11916
11917		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11918$as_echo "no" >&6; }
11919		CFLAGS="$save_CFLAGS"
11920
11921fi
11922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11923	ac_c_werror_flag="$save_ac_c_werror_flag"
11924
11925
11926	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunused-parameter option" >&5
11927$as_echo_n "checking whether the compiler supports the -Wunused-parameter option... " >&6; }
11928	save_CFLAGS="$CFLAGS"
11929	CFLAGS="$CFLAGS -Wunused-parameter"
11930	#
11931	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11932	# but no mechanism is provided to turn AC_LANG_WERROR on
11933	# *and then turn it back off*, so that we *only* do it when
11934	# testing compiler options - 15 years after somebody asked
11935	# for it:
11936	#
11937	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11938	#
11939	save_ac_c_werror_flag="$ac_c_werror_flag"
11940	ac_c_werror_flag=yes
11941	#
11942	# We use AC_LANG_SOURCE() so that we can control the complete
11943	# content of the program being compiled.  We do not, for example,
11944	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11945	# as it will generate a warning with -Wold-style-definition, meaning
11946	# that we would treat it as not working, as the test will fail if
11947	# *any* error output, including a warning due to the flag we're
11948	# testing, is generated; see
11949	#
11950	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11951	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11952	#
11953	# This may, as per those two messages, be fixed in autoconf 2.70,
11954	# but we only require 2.64 or newer for now.
11955	#
11956	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11957/* end confdefs.h.  */
11958int main(void) { return 0; }
11959_ACEOF
11960if ac_fn_c_try_compile "$LINENO"; then :
11961
11962		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11963$as_echo "yes" >&6; }
11964		can_add_to_cflags=yes
11965		#
11966		# The compile supports this; do we have some C code for
11967		# which the warning should *not* appear?
11968		# We test the fourth argument because the third argument
11969		# could contain quotes, breaking the test.
11970		#
11971		if test "x" != "x"
11972		then
11973		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11974		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wunused-parameter " >&5
11975$as_echo_n "checking whether -Wunused-parameter ... " >&6; }
11976		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11977/* end confdefs.h.  */
11978
11979_ACEOF
11980if ac_fn_c_try_compile "$LINENO"; then :
11981
11982			#
11983			# Not a problem.
11984			#
11985			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11986$as_echo "no" >&6; }
11987
11988else
11989
11990			#
11991			# A problem.
11992			#
11993			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11994$as_echo "yes" >&6; }
11995			can_add_to_cflags=no
11996
11997fi
11998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11999		fi
12000		CFLAGS="$save_CFLAGS"
12001		if test x"$can_add_to_cflags" = "xyes"
12002		then
12003		    V_CCOPT="$V_CCOPT -Wunused-parameter"
12004		fi
12005
12006else
12007
12008		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12009$as_echo "no" >&6; }
12010		CFLAGS="$save_CFLAGS"
12011
12012fi
12013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12014	ac_c_werror_flag="$save_ac_c_werror_flag"
12015
12016
12017	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wused-but-marked-unused option" >&5
12018$as_echo_n "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; }
12019	save_CFLAGS="$CFLAGS"
12020	CFLAGS="$CFLAGS -Wused-but-marked-unused"
12021	#
12022	# XXX - yes, this depends on the way AC_LANG_WERROR works,
12023	# but no mechanism is provided to turn AC_LANG_WERROR on
12024	# *and then turn it back off*, so that we *only* do it when
12025	# testing compiler options - 15 years after somebody asked
12026	# for it:
12027	#
12028	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
12029	#
12030	save_ac_c_werror_flag="$ac_c_werror_flag"
12031	ac_c_werror_flag=yes
12032	#
12033	# We use AC_LANG_SOURCE() so that we can control the complete
12034	# content of the program being compiled.  We do not, for example,
12035	# want the default "int main()" that AC_LANG_PROGRAM() generates,
12036	# as it will generate a warning with -Wold-style-definition, meaning
12037	# that we would treat it as not working, as the test will fail if
12038	# *any* error output, including a warning due to the flag we're
12039	# testing, is generated; see
12040	#
12041	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
12042	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
12043	#
12044	# This may, as per those two messages, be fixed in autoconf 2.70,
12045	# but we only require 2.64 or newer for now.
12046	#
12047	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12048/* end confdefs.h.  */
12049int main(void) { return 0; }
12050_ACEOF
12051if ac_fn_c_try_compile "$LINENO"; then :
12052
12053		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12054$as_echo "yes" >&6; }
12055		can_add_to_cflags=yes
12056		#
12057		# The compile supports this; do we have some C code for
12058		# which the warning should *not* appear?
12059		# We test the fourth argument because the third argument
12060		# could contain quotes, breaking the test.
12061		#
12062		if test "x" != "x"
12063		then
12064		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
12065		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wused-but-marked-unused " >&5
12066$as_echo_n "checking whether -Wused-but-marked-unused ... " >&6; }
12067		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12068/* end confdefs.h.  */
12069
12070_ACEOF
12071if ac_fn_c_try_compile "$LINENO"; then :
12072
12073			#
12074			# Not a problem.
12075			#
12076			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12077$as_echo "no" >&6; }
12078
12079else
12080
12081			#
12082			# A problem.
12083			#
12084			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12085$as_echo "yes" >&6; }
12086			can_add_to_cflags=no
12087
12088fi
12089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12090		fi
12091		CFLAGS="$save_CFLAGS"
12092		if test x"$can_add_to_cflags" = "xyes"
12093		then
12094		    V_CCOPT="$V_CCOPT -Wused-but-marked-unused"
12095		fi
12096
12097else
12098
12099		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12100$as_echo "no" >&6; }
12101		CFLAGS="$save_CFLAGS"
12102
12103fi
12104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12105	ac_c_werror_flag="$save_ac_c_werror_flag"
12106
12107		    # Warns about safeguards added in case the enums are
12108		    # extended
12109		    # AC_LBL_CHECK_COMPILER_OPT(V_CCOPT, -Wcovered-switch-default)
12110		    #
12111		    # This can cause problems with ntohs(), ntohl(),
12112		    # htons(), and htonl() on some platforms, such
12113		    # as OpenBSD 6.3 with Clang 5.0.1.  I guess the
12114		    # problem is that the macro that ultimately does
12115		    # the byte-swapping involves a conditional
12116		    # expression that tests whether the value being
12117		    # swapped is a compile-time constant or not,
12118		    # using __builtin_constant_p(), and, depending
12119		    # on whether it is, does a compile-time swap or
12120		    # a run-time swap; perhaps the compiler always
12121		    # considers one of the two results of the
12122		    # conditional expressin is never evaluated,
12123		    # because the conditional check is done at
12124		    # compile time, and thus always says "that
12125		    # expression is never executed".
12126		    #
12127		    # (Perhaps there should be a way of flagging
12128		    # an expression that you *want* evaluated at
12129		    # compile time, so that the compiler 1) warns
12130		    # if it *can't* be evaluated at compile time
12131		    # and 2) *doesn't* warn that the true or false
12132		    # branch will never be reached.)
12133		    #
12134
12135	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunreachable-code option" >&5
12136$as_echo_n "checking whether the compiler supports the -Wunreachable-code option... " >&6; }
12137	save_CFLAGS="$CFLAGS"
12138	CFLAGS="$CFLAGS -Wunreachable-code"
12139	#
12140	# XXX - yes, this depends on the way AC_LANG_WERROR works,
12141	# but no mechanism is provided to turn AC_LANG_WERROR on
12142	# *and then turn it back off*, so that we *only* do it when
12143	# testing compiler options - 15 years after somebody asked
12144	# for it:
12145	#
12146	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
12147	#
12148	save_ac_c_werror_flag="$ac_c_werror_flag"
12149	ac_c_werror_flag=yes
12150	#
12151	# We use AC_LANG_SOURCE() so that we can control the complete
12152	# content of the program being compiled.  We do not, for example,
12153	# want the default "int main()" that AC_LANG_PROGRAM() generates,
12154	# as it will generate a warning with -Wold-style-definition, meaning
12155	# that we would treat it as not working, as the test will fail if
12156	# *any* error output, including a warning due to the flag we're
12157	# testing, is generated; see
12158	#
12159	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
12160	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
12161	#
12162	# This may, as per those two messages, be fixed in autoconf 2.70,
12163	# but we only require 2.64 or newer for now.
12164	#
12165	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12166/* end confdefs.h.  */
12167int main(void) { return 0; }
12168_ACEOF
12169if ac_fn_c_try_compile "$LINENO"; then :
12170
12171		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12172$as_echo "yes" >&6; }
12173		can_add_to_cflags=yes
12174		#
12175		# The compile supports this; do we have some C code for
12176		# which the warning should *not* appear?
12177		# We test the fourth argument because the third argument
12178		# could contain quotes, breaking the test.
12179		#
12180		if test "xgenerates warnings from ntohs()" != "x"
12181		then
12182		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
12183		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wunreachable-code generates warnings from ntohs()" >&5
12184$as_echo_n "checking whether -Wunreachable-code generates warnings from ntohs()... " >&6; }
12185		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12186/* end confdefs.h.  */
12187#include <arpa/inet.h>
12188
12189unsigned short
12190testme(unsigned short a)
12191{
12192	return ntohs(a);
12193}
12194
12195_ACEOF
12196if ac_fn_c_try_compile "$LINENO"; then :
12197
12198			#
12199			# Not a problem.
12200			#
12201			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12202$as_echo "no" >&6; }
12203
12204else
12205
12206			#
12207			# A problem.
12208			#
12209			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12210$as_echo "yes" >&6; }
12211			can_add_to_cflags=no
12212
12213fi
12214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12215		fi
12216		CFLAGS="$save_CFLAGS"
12217		if test x"$can_add_to_cflags" = "xyes"
12218		then
12219		    V_CCOPT="$V_CCOPT -Wunreachable-code"
12220		fi
12221
12222else
12223
12224		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12225$as_echo "no" >&6; }
12226		CFLAGS="$save_CFLAGS"
12227
12228fi
12229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12230	ac_c_werror_flag="$save_ac_c_werror_flag"
12231
12232
12233	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshorten-64-to-32 option" >&5
12234$as_echo_n "checking whether the compiler supports the -Wshorten-64-to-32 option... " >&6; }
12235	save_CFLAGS="$CFLAGS"
12236	CFLAGS="$CFLAGS -Wshorten-64-to-32"
12237	#
12238	# XXX - yes, this depends on the way AC_LANG_WERROR works,
12239	# but no mechanism is provided to turn AC_LANG_WERROR on
12240	# *and then turn it back off*, so that we *only* do it when
12241	# testing compiler options - 15 years after somebody asked
12242	# for it:
12243	#
12244	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
12245	#
12246	save_ac_c_werror_flag="$ac_c_werror_flag"
12247	ac_c_werror_flag=yes
12248	#
12249	# We use AC_LANG_SOURCE() so that we can control the complete
12250	# content of the program being compiled.  We do not, for example,
12251	# want the default "int main()" that AC_LANG_PROGRAM() generates,
12252	# as it will generate a warning with -Wold-style-definition, meaning
12253	# that we would treat it as not working, as the test will fail if
12254	# *any* error output, including a warning due to the flag we're
12255	# testing, is generated; see
12256	#
12257	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
12258	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
12259	#
12260	# This may, as per those two messages, be fixed in autoconf 2.70,
12261	# but we only require 2.64 or newer for now.
12262	#
12263	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12264/* end confdefs.h.  */
12265int main(void) { return 0; }
12266_ACEOF
12267if ac_fn_c_try_compile "$LINENO"; then :
12268
12269		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12270$as_echo "yes" >&6; }
12271		can_add_to_cflags=yes
12272		#
12273		# The compile supports this; do we have some C code for
12274		# which the warning should *not* appear?
12275		# We test the fourth argument because the third argument
12276		# could contain quotes, breaking the test.
12277		#
12278		if test "x" != "x"
12279		then
12280		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
12281		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wshorten-64-to-32 " >&5
12282$as_echo_n "checking whether -Wshorten-64-to-32 ... " >&6; }
12283		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12284/* end confdefs.h.  */
12285
12286_ACEOF
12287if ac_fn_c_try_compile "$LINENO"; then :
12288
12289			#
12290			# Not a problem.
12291			#
12292			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12293$as_echo "no" >&6; }
12294
12295else
12296
12297			#
12298			# A problem.
12299			#
12300			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12301$as_echo "yes" >&6; }
12302			can_add_to_cflags=no
12303
12304fi
12305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12306		fi
12307		CFLAGS="$save_CFLAGS"
12308		if test x"$can_add_to_cflags" = "xyes"
12309		then
12310		    V_CCOPT="$V_CCOPT -Wshorten-64-to-32"
12311		fi
12312
12313else
12314
12315		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12316$as_echo "no" >&6; }
12317		CFLAGS="$save_CFLAGS"
12318
12319fi
12320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12321	ac_c_werror_flag="$save_ac_c_werror_flag"
12322
12323	    fi
12324
12325	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5
12326$as_echo_n "checking whether the compiler supports generating dependencies... " >&6; }
12327	if test "$GCC" = yes ; then
12328		#
12329		# GCC, or a compiler deemed to be GCC by AC_PROG_CC (even
12330		# though it's not); we assume that, in this case, the flag
12331		# would be -M.
12332		#
12333		ac_lbl_dependency_flag="-M"
12334	else
12335		#
12336		# Not GCC or a compiler deemed to be GCC; what platform is
12337		# this?  (We're assuming that if the compiler isn't GCC
12338		# it's the compiler from the vendor of the OS; that won't
12339		# necessarily be true for x86 platforms, where it might be
12340		# the Intel C compiler.)
12341		#
12342		case "$host_os" in
12343
12344		irix*|osf*|darwin*)
12345			#
12346			# MIPS C for IRIX, DEC C, and clang all use -M.
12347			#
12348			ac_lbl_dependency_flag="-M"
12349			;;
12350
12351		solaris*)
12352			#
12353			# Sun C uses -xM.
12354			#
12355			ac_lbl_dependency_flag="-xM"
12356			;;
12357
12358		hpux*)
12359			#
12360			# HP's older C compilers don't support this.
12361			# HP's newer C compilers support this with
12362			# either +M or +Make; the older compilers
12363			# interpret +M as something completely
12364			# different, so we use +Make so we don't
12365			# think it works with the older compilers.
12366			#
12367			ac_lbl_dependency_flag="+Make"
12368			;;
12369
12370		*)
12371			#
12372			# Not one of the above; assume no support for
12373			# generating dependencies.
12374			#
12375			ac_lbl_dependency_flag=""
12376			;;
12377		esac
12378	fi
12379
12380	#
12381	# Is ac_lbl_dependency_flag defined and, if so, does the compiler
12382	# complain about it?
12383	#
12384	# Note: clang doesn't seem to exit with an error status when handed
12385	# an unknown non-warning error, even if you pass it
12386	# -Werror=unknown-warning-option.  However, it always supports
12387	# -M, so the fact that this test always succeeds with clang
12388	# isn't an issue.
12389	#
12390	if test ! -z "$ac_lbl_dependency_flag"; then
12391		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12392/* end confdefs.h.  */
12393int main(void) { return 0; }
12394_ACEOF
12395		if { { $as_echo "$as_me:${as_lineno-$LINENO}: eval \"\$CC \$ac_lbl_dependency_flag conftest.c >/dev/null 2>&1\""; } >&5
12396  (eval "$CC $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1") 2>&5
12397  ac_status=$?
12398  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12399  test $ac_status = 0; }; then
12400			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5
12401$as_echo "yes, with $ac_lbl_dependency_flag" >&6; }
12402			DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
12403			MKDEP='${top_srcdir}/mkdep'
12404		else
12405			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12406$as_echo "no" >&6; }
12407			#
12408			# We can't run mkdep, so have "make depend" do
12409			# nothing.
12410			#
12411			MKDEP='${top_srcdir}/nomkdep'
12412		fi
12413		rm -rf conftest*
12414	else
12415		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12416$as_echo "no" >&6; }
12417		#
12418		# We can't run mkdep, so have "make depend" do
12419		# nothing.
12420		#
12421		MKDEP='${top_srcdir}/nomkdep'
12422	fi
12423
12424
12425
12426	    #
12427	    # We used to set -n32 for IRIX 6 when not using GCC (presumed
12428	    # to mean that we're using MIPS C or MIPSpro C); it specified
12429	    # the "new" faster 32-bit ABI, introduced in IRIX 6.2.  I'm
12430	    # not sure why that would be something to do *only* with a
12431	    # .devel file; why should the ABI for which we produce code
12432	    # depend on .devel?
12433	    #
12434	    os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
12435	    name="lbl/os-$os.h"
12436	    if test -f $name ; then
12437		    ln -s $name os-proto.h
12438
12439$as_echo "#define HAVE_OS_PROTO_H 1" >>confdefs.h
12440
12441	    else
12442		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find $name" >&5
12443$as_echo "$as_me: WARNING: can't find $name" >&2;}
12444	    fi
12445    fi
12446
12447#
12448# Check to see if the sockaddr struct has the 4.4 BSD sa_len member.
12449#
12450ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "
12451	#include <sys/types.h>
12452	#include <sys/socket.h>
12453
12454"
12455if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
12456
12457cat >>confdefs.h <<_ACEOF
12458#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12459_ACEOF
12460
12461
12462fi
12463
12464
12465#
12466# Check to see if there's a sockaddr_storage structure.
12467#
12468ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
12469	#include <sys/types.h>
12470	#include <sys/socket.h>
12471
12472"
12473if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
12474
12475cat >>confdefs.h <<_ACEOF
12476#define HAVE_STRUCT_SOCKADDR_STORAGE 1
12477_ACEOF
12478
12479
12480fi
12481
12482
12483#
12484# Check to see if the dl_hp_ppa_info_t struct has the HP-UX 11.00
12485# dl_module_id_1 member.
12486#
12487# NOTE: any failure means we conclude that it doesn't have that member,
12488# so if we don't have DLPI, don't have a <sys/dlpi_ext.h> header, or
12489# have one that doesn't declare a dl_hp_ppa_info_t type, we conclude
12490# it doesn't have that member (which is OK, as either we won't be
12491# using code that would use that member, or we wouldn't compile in
12492# any case).
12493#
12494ac_fn_c_check_member "$LINENO" "dl_hp_ppa_info_t" "dl_module_id_1" "ac_cv_member_dl_hp_ppa_info_t_dl_module_id_1" "
12495	#include <sys/types.h>
12496	#include <sys/dlpi.h>
12497	#include <sys/dlpi_ext.h>
12498
12499"
12500if test "x$ac_cv_member_dl_hp_ppa_info_t_dl_module_id_1" = xyes; then :
12501
12502cat >>confdefs.h <<_ACEOF
12503#define HAVE_DL_HP_PPA_INFO_T_DL_MODULE_ID_1 1
12504_ACEOF
12505
12506
12507fi
12508
12509
12510#
12511# Various Linux-specific mechanisms.
12512#
12513# Check whether --enable-usb was given.
12514if test "${enable_usb+set}" = set; then :
12515  enableval=$enable_usb;
12516else
12517  enable_usb=yes
12518fi
12519
12520
12521#
12522# If somebody requested an XXX-only pcap, that doesn't include
12523# additional mechanisms.
12524#
12525if test "xxx_only" != yes; then
12526  case "$host_os" in
12527  linux*)
12528        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux usbmon USB sniffing support" >&5
12529$as_echo_n "checking for Linux usbmon USB sniffing support... " >&6; }
12530    if test "x$enable_usb" != "xno" ; then
12531
12532$as_echo "#define PCAP_SUPPORT_LINUX_USBMON 1" >>confdefs.h
12533
12534      MODULE_C_SRC="$MODULE_C_SRC pcap-usb-linux.c"
12535      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12536$as_echo "yes" >&6; }
12537      #
12538      # Note: if the directory for special files is *EVER* somewhere
12539      # other than the UN*X standard of /dev (which will break any
12540      # software that looks for /dev/null or /dev/tty, for example,
12541      # so doing that is *REALLY* not a good idea), please provide
12542      # some mechanism to determine that directory at *run time*,
12543      # rather than *configure time*, so that it works when doinga
12544      # a cross-build, and that works with *multiple* distributions,
12545      # with our without udev, and with multiple versions of udev,
12546      # with udevinfo or udevadm or any other mechanism to get the
12547      # special files directory.
12548      #
12549      # Do we have a version of <linux/compiler.h> available?
12550      # If so, we might need it for <linux/usbdevice_fs.h>.
12551      #
12552      for ac_header in linux/compiler.h
12553do :
12554  ac_fn_c_check_header_mongrel "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default"
12555if test "x$ac_cv_header_linux_compiler_h" = xyes; then :
12556  cat >>confdefs.h <<_ACEOF
12557#define HAVE_LINUX_COMPILER_H 1
12558_ACEOF
12559
12560fi
12561
12562done
12563
12564      if test "$ac_cv_header_linux_compiler_h" = yes; then
12565        #
12566        # Yes - include it when testing for <linux/usbdevice_fs.h>.
12567        #
12568        for ac_header in linux/usbdevice_fs.h
12569do :
12570  ac_fn_c_check_header_compile "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "#include <linux/compiler.h>
12571"
12572if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then :
12573  cat >>confdefs.h <<_ACEOF
12574#define HAVE_LINUX_USBDEVICE_FS_H 1
12575_ACEOF
12576
12577fi
12578
12579done
12580
12581      else
12582        for ac_header in linux/usbdevice_fs.h
12583do :
12584  ac_fn_c_check_header_mongrel "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "$ac_includes_default"
12585if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then :
12586  cat >>confdefs.h <<_ACEOF
12587#define HAVE_LINUX_USBDEVICE_FS_H 1
12588_ACEOF
12589
12590fi
12591
12592done
12593
12594      fi
12595      if test "$ac_cv_header_linux_usbdevice_fs_h" = yes; then
12596        #
12597        # OK, does it define bRequestType?  Older versions of the kernel
12598        # define fields with names like "requesttype, "request", and
12599        # "value", rather than "bRequestType", "bRequest", and
12600        # "wValue".
12601        #
12602        ac_fn_c_check_member "$LINENO" "struct usbdevfs_ctrltransfer" "bRequestType" "ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" "
12603            $ac_includes_default
12604            #ifdef HAVE_LINUX_COMPILER_H
12605            #include <linux/compiler.h>
12606            #endif
12607            #include <linux/usbdevice_fs.h>
12608
12609"
12610if test "x$ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" = xyes; then :
12611
12612cat >>confdefs.h <<_ACEOF
12613#define HAVE_STRUCT_USBDEVFS_CTRLTRANSFER_BREQUESTTYPE 1
12614_ACEOF
12615
12616
12617fi
12618
12619      fi
12620    else
12621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12622$as_echo "no" >&6; }
12623    fi
12624
12625    #
12626    # Life's too short to deal with trying to get this to compile
12627    # if you don't get the right types defined with
12628    # __KERNEL_STRICT_NAMES getting defined by some other include.
12629    #
12630    # Check whether the includes Just Work.  If not, don't turn on
12631    # netfilter support.
12632    #
12633    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netfilter support" >&5
12634$as_echo_n "checking whether we can compile the netfilter support... " >&6; }
12635    if ${ac_cv_netfilter_can_compile+:} false; then :
12636  $as_echo_n "(cached) " >&6
12637else
12638  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12639/* end confdefs.h.  */
12640
12641$ac_includes_default
12642#include <sys/socket.h>
12643#include <netinet/in.h>
12644#include <linux/types.h>
12645
12646#include <linux/netlink.h>
12647#include <linux/netfilter.h>
12648#include <linux/netfilter/nfnetlink.h>
12649#include <linux/netfilter/nfnetlink_log.h>
12650#include <linux/netfilter/nfnetlink_queue.h>
12651int
12652main ()
12653{
12654
12655  ;
12656  return 0;
12657}
12658_ACEOF
12659if ac_fn_c_try_compile "$LINENO"; then :
12660  ac_cv_netfilter_can_compile=yes
12661else
12662  ac_cv_netfilter_can_compile=no
12663fi
12664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12665fi
12666
12667    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_netfilter_can_compile" >&5
12668$as_echo "$ac_cv_netfilter_can_compile" >&6; }
12669    if test $ac_cv_netfilter_can_compile = yes ; then
12670
12671$as_echo "#define PCAP_SUPPORT_NETFILTER 1" >>confdefs.h
12672
12673      MODULE_C_SRC="$MODULE_C_SRC pcap-netfilter-linux.c"
12674    fi
12675    ;;
12676  esac
12677fi
12678
12679
12680
12681# Check whether --enable-netmap was given.
12682if test "${enable_netmap+set}" = set; then :
12683  enableval=$enable_netmap;
12684else
12685  enable_netmap=yes
12686fi
12687
12688
12689if test "x$enable_netmap" != "xno" ; then
12690	#
12691	# Check whether net/netmap_user.h is usable if NETMAP_WITH_LIBS is
12692	# defined; it's not usable on DragonFly BSD 4.6 if NETMAP_WITH_LIBS
12693	# is defined, for example, as it includes a non-existent malloc.h
12694	# header.
12695	#
12696	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netmap support" >&5
12697$as_echo_n "checking whether we can compile the netmap support... " >&6; }
12698	if ${ac_cv_net_netmap_user_can_compile+:} false; then :
12699  $as_echo_n "(cached) " >&6
12700else
12701  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12702/* end confdefs.h.  */
12703
12704$ac_includes_default
12705#define NETMAP_WITH_LIBS
12706#include <net/netmap_user.h>
12707int
12708main ()
12709{
12710
12711  ;
12712  return 0;
12713}
12714_ACEOF
12715if ac_fn_c_try_compile "$LINENO"; then :
12716  ac_cv_net_netmap_user_can_compile=yes
12717else
12718  ac_cv_net_netmap_user_can_compile=no
12719fi
12720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12721fi
12722
12723	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_net_netmap_user_can_compile" >&5
12724$as_echo "$ac_cv_net_netmap_user_can_compile" >&6; }
12725	if test $ac_cv_net_netmap_user_can_compile = yes ; then
12726
12727$as_echo "#define PCAP_SUPPORT_NETMAP 1" >>confdefs.h
12728
12729	    MODULE_C_SRC="$MODULE_C_SRC pcap-netmap.c"
12730	fi
12731
12732fi
12733
12734# Check for DPDK support.
12735
12736# Check whether --with-dpdk was given.
12737if test "${with_dpdk+set}" = set; then :
12738  withval=$with_dpdk;
12739	if test "$withval" = no
12740	then
12741		# User doesn't want DPDK support.
12742		want_dpdk=no
12743	elif test "$withval" = yes
12744	then
12745		# User wants DPDK support but hasn't specified a directory.
12746		want_dpdk=yes
12747	else
12748		# User wants DPDK support and has specified a directory,
12749		# so use the provided value.
12750		want_dpdk=yes
12751		dpdk_dir=$withval
12752	fi
12753
12754else
12755
12756	if test "$V_PCAP" = dpdk; then
12757		# User requested DPDK-only libpcap, so we'd better have
12758		# the DPDK API.
12759		want_dpdk=yes
12760	elif test "xxx_only" = yes; then
12761		# User requested something-else-only pcap, so they don't
12762		# want DPDK support.
12763		want_dpdk=no
12764	else
12765		#
12766		# Use DPDK API if present, otherwise don't
12767		#
12768		want_dpdk=ifpresent
12769	fi
12770
12771fi
12772
12773
12774if test "$want_dpdk" != no; then
12775	#
12776	# The user didn't explicitly say they don't want DPDK,
12777	# so see if we have it.
12778	#
12779	# We only try to find it using pkg-config; DPDK is *SO*
12780	# complicated - DPDK 19.02, for example, has about 117(!)
12781	# libraries, and the precise set of libraries required has
12782	# changed over time - so attempting to guess which libraries
12783	# you need, and hardcoding that in an attempt to find the
12784	# libraries without DPDK, rather than relying on DPDK to
12785	# tell you, with a .pc file, what libraries are needed,
12786	# is *EXTREMELY* fragile and has caused some bug reports,
12787	# so we're just not going to do it.
12788	#
12789	# If that causes a problem, the only thing we will do is
12790	# accept an alternative way of finding the appropriate
12791	# library set for the installed version of DPDK that is
12792	# as robust as pkg-config (i.e., it had better work as well
12793	# as pkg-config with *ALL* versions of DPDK that provide a
12794	# libdpdk.pc file).
12795	#
12796	# If --with-dpdk={path} was specified, add {path}/pkgconfig
12797	# to PKG_CONFIG_PATH, so we look for the .pc file there,
12798	# first.
12799	#
12800	save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
12801	if test -n "$dpdk_dir"; then
12802		PKG_CONFIG_PATH="$dpdk_dir:$PKG_CONFIG_PATH"
12803	fi
12804
12805
12806pkg_failed=no
12807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdpdk with pkg-config" >&5
12808$as_echo_n "checking for libdpdk with pkg-config... " >&6; }
12809
12810if test -n "$PKG_CONFIG" && \
12811    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdpdk\""; } >&5
12812  ($PKG_CONFIG --exists --print-errors "libdpdk") 2>&5
12813  ac_status=$?
12814  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12815  test $ac_status = 0; }; then
12816
12817	#
12818	# The package was found, so try to get its C flags and
12819	# libraries.
12820	#
12821	if test -n "$DPDK_CFLAGS"; then
12822    pkg_cv_DPDK_CFLAGS="$DPDK_CFLAGS"
12823 elif test -n "$PKG_CONFIG"; then
12824
12825if test -n "$PKG_CONFIG" && \
12826    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdpdk\""; } >&5
12827  ($PKG_CONFIG --exists --print-errors "libdpdk") 2>&5
12828  ac_status=$?
12829  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12830  test $ac_status = 0; }; then
12831  pkg_cv_DPDK_CFLAGS=`$PKG_CONFIG --cflags "libdpdk" 2>/dev/null`
12832		      test "x$?" != "x0" && pkg_failed=yes
12833else
12834  pkg_failed=yes
12835fi
12836 else
12837    pkg_failed=untried
12838fi
12839	if test -n "$DPDK_LIBS"; then
12840    pkg_cv_DPDK_LIBS="$DPDK_LIBS"
12841 elif test -n "$PKG_CONFIG"; then
12842
12843if test -n "$PKG_CONFIG" && \
12844    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdpdk\""; } >&5
12845  ($PKG_CONFIG --exists --print-errors "libdpdk") 2>&5
12846  ac_status=$?
12847  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12848  test $ac_status = 0; }; then
12849  pkg_cv_DPDK_LIBS=`$PKG_CONFIG --libs "libdpdk" 2>/dev/null`
12850		      test "x$?" != "x0" && pkg_failed=yes
12851else
12852  pkg_failed=yes
12853fi
12854 else
12855    pkg_failed=untried
12856fi
12857	if test -n "$DPDK_LIBS_STATIC"; then
12858    pkg_cv_DPDK_LIBS_STATIC="$DPDK_LIBS_STATIC"
12859 elif test -n "$PKG_CONFIG"; then
12860
12861if test -n "$PKG_CONFIG" && \
12862    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdpdk\""; } >&5
12863  ($PKG_CONFIG --exists --print-errors "libdpdk") 2>&5
12864  ac_status=$?
12865  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12866  test $ac_status = 0; }; then
12867  pkg_cv_DPDK_LIBS_STATIC=`$PKG_CONFIG --libs --static "libdpdk" 2>/dev/null`
12868		      test "x$?" != "x0" && pkg_failed=yes
12869else
12870  pkg_failed=yes
12871fi
12872 else
12873    pkg_failed=untried
12874fi
12875
12876
12877
12878	if test $pkg_failed = yes; then
12879		#
12880		# That failed - report an error.
12881		#
12882	   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
12883$as_echo "error" >&6; }
12884
12885if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
12886        _pkg_short_errors_supported=yes
12887else
12888        _pkg_short_errors_supported=no
12889fi
12890	        if test $_pkg_short_errors_supported = yes; then
12891		        DPDK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdpdk" 2>&1`
12892	        else
12893		        DPDK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdpdk" 2>&1`
12894	        fi
12895		# Put the nasty error message in config.log where it belongs
12896		echo "$DPDK_PKG_ERRORS" >&5
12897
12898		as_fn_error $? "Package requirements (libdpdk) were not met:
12899
12900$DPDK_PKG_ERRORS
12901
12902Consider adjusting the PKG_CONFIG_PATH environment variable if you
12903installed software in a non-standard prefix.
12904
12905
12906Alternatively, you may set the environment variables DPDK_CFLAGS
12907and DPDK_LIBS to avoid the need to call pkg-config.
12908See the pkg-config man page for more details." "$LINENO" 5
12909	elif test $pkg_failed = untried; then
12910		#
12911		# We don't have pkg-config, so it didn't work.
12912		#
12913	     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
12914$as_echo "not found (pkg-config not found)" >&6; }
12915	else
12916		#
12917		# We found the package.
12918		#
12919		DPDK_CFLAGS=$pkg_cv_DPDK_CFLAGS
12920		DPDK_LIBS=$pkg_cv_DPDK_LIBS
12921		DPDK_LIBS_STATIC=$pkg_cv_DPDK_LIBS_STATIC
12922	        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
12923$as_echo "found" >&6; }
12924
12925		found_dpdk=yes
12926
12927	fi
12928else
12929
12930	#
12931	# The package isn't present.
12932	#
12933	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12934$as_echo "not found" >&6; }
12935
12936fi
12937
12938	PKG_CONFIG_PATH="$save_PKG_CONFIG_PATH"
12939
12940	#
12941	# Did we find DPDK?
12942	#
12943	if test "$found_dpdk" = yes; then
12944		#
12945		# Found it.
12946		#
12947		# We call rte_eth_dev_count_avail(), and older versions
12948		# of DPDK didn't have it, so check for it.
12949		#
12950
12951	save_CFLAGS="$CFLAGS"
12952	save_LIBS="$LIBS"
12953	save_LDFLAGS="$LDFLAGS"
12954
12955		CFLAGS="$CFLAGS $DPDK_CFLAGS"
12956		LIBS="$LIBS $DPDK_LIBS"
12957		ac_fn_c_check_func "$LINENO" "rte_eth_dev_count_avail" "ac_cv_func_rte_eth_dev_count_avail"
12958if test "x$ac_cv_func_rte_eth_dev_count_avail" = xyes; then :
12959
12960fi
12961
12962
12963	CFLAGS="$save_CFLAGS"
12964	LIBS="$save_LIBS"
12965	LDFLAGS="$save_LDFLAGS"
12966
12967	fi
12968
12969	if test "$ac_cv_func_rte_eth_dev_count_avail" = yes; then
12970		#
12971		# We found a usable DPDK.
12972		#
12973		# Check whether the rte_ether.h file defines
12974		# struct ether_addr or struct rte_ether_addr.
12975		#
12976		# ("API compatibility?  That's for losers!")
12977		#
12978
12979	save_CFLAGS="$CFLAGS"
12980	save_LIBS="$LIBS"
12981	save_LDFLAGS="$LDFLAGS"
12982
12983		CFLAGS="$CFLAGS $DPDK_CFLAGS"
12984		LIBS="$LIBS $DPDK_LIBS"
12985		ac_fn_c_check_type "$LINENO" "struct rte_ether_addr" "ac_cv_type_struct_rte_ether_addr" "
12986			#include <rte_ether.h>
12987
12988"
12989if test "x$ac_cv_type_struct_rte_ether_addr" = xyes; then :
12990
12991cat >>confdefs.h <<_ACEOF
12992#define HAVE_STRUCT_RTE_ETHER_ADDR 1
12993_ACEOF
12994
12995
12996fi
12997
12998
12999	CFLAGS="$save_CFLAGS"
13000	LIBS="$save_LIBS"
13001	LDFLAGS="$save_LDFLAGS"
13002
13003
13004		#
13005		# We can build with DPDK.
13006		#
13007		V_INCLS="$V_INCLS $DPDK_CFLAGS"
13008		ADDITIONAL_LIBS="$ADDITIONAL_LIBS $DPDK_LIBS"
13009		ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $DPDK_LIBS_STATIC"
13010		REQUIRES_PRIVATE="$REQUIRES_PRIVATE libdpdk"
13011
13012$as_echo "#define PCAP_SUPPORT_DPDK 1" >>confdefs.h
13013
13014		if test $V_PCAP != dpdk ; then
13015			MODULE_C_SRC="$MODULE_C_SRC pcap-dpdk.c"
13016		fi
13017	else
13018		#
13019		# We didn't find a usable DPDK.
13020		# If we required it (with --with-dpdk or --with-pcap=dpdk),
13021		# fail with an appropriate message telling the user what
13022		# the problem was, otherwise note the problem with a
13023		# warning.
13024		#
13025		if test "$found_dpdk" != yes; then
13026			#
13027			# Not found with pkg-config.  Note that we
13028			# require that DPDK must be findable with
13029			# pkg-config.
13030			#
13031			if test "$V_PCAP" = dpdk; then
13032				#
13033				# User requested DPDK-only capture support.
13034				#
13035				as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but
13036we couldn't find DPDK with pkg-config.  Make sure that pkg-config is
13037installed, that DPDK 18.02.2 or later is installed, and that DPDK
13038provides a .pc file." "$LINENO" 5
13039			fi
13040
13041			if test "$want_dpdk" = yes; then
13042				#
13043				# User requested that libpcap include
13044				# DPDK capture support.
13045				#
13046				as_fn_error $? "DPDK support requested with --with-dpdk, but we
13047couldn't find DPDK with pkg-config.  Make sure that pkg-config
13048is installed, that DPDK 18.02.2 or later is installed, and that
13049DPDK provides .pc file." "$LINENO" 5
13050			fi
13051
13052			#
13053			# User didn't indicate whether they wanted DPDK
13054			# or not; just warn why we didn't find it.
13055			#
13056			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: We couldn't find DPDK with pkg-config.  If
13057you want DPDK support, make sure that pkg-config is installed,
13058that DPDK 18.02.2 or later is installed, and that DPDK provides a
13059.pc file." >&5
13060$as_echo "$as_me: WARNING: We couldn't find DPDK with pkg-config.  If
13061you want DPDK support, make sure that pkg-config is installed,
13062that DPDK 18.02.2 or later is installed, and that DPDK provides a
13063.pc file." >&2;}
13064		elif test "$ac_cv_func_rte_eth_dev_count_avail" != yes; then
13065			#
13066			# Found with pkg-config, but we couldn't compile
13067			# a program that calls rte_eth_dev_count(); we
13068			# probably have the developer package installed,
13069			# but don't have a sufficiently recent version
13070			# of DPDK.  Note that we need a sufficiently
13071			# recent version of DPDK.
13072			#
13073			if test "$V_PCAP" = dpdk; then
13074				#
13075				# User requested DPDK-only capture support.
13076				#
13077				as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but we
13078can't compile libpcap with DPDK.  Make sure that DPDK 18.02.2 or later
13079is installed." "$LINENO" 5
13080			fi
13081
13082			if test "$want_dpdk" = yes; then
13083				#
13084				# User requested that libpcap include
13085				# DPDK capture support.
13086				#
13087				as_fn_error $? "DPDK support requested with --with-dpdk, but
13088we can't compile libpcap with DPDK.  Make sure that DPDK 18.02.2
13089or later is DPDK is installed." "$LINENO" 5
13090			fi
13091
13092			#
13093			# User didn't indicate whether they wanted DPDK
13094			# or not; just warn why we didn't find it.
13095			#
13096			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DPDK was found, but we can't compile libpcap with it.
13097Make sure that DPDK 18.02.2 or later is installed." >&5
13098$as_echo "$as_me: WARNING: DPDK was found, but we can't compile libpcap with it.
13099Make sure that DPDK 18.02.2 or later is installed." >&2;}
13100		fi
13101	fi
13102fi
13103
13104
13105# Check whether --enable-bluetooth was given.
13106if test "${enable_bluetooth+set}" = set; then :
13107  enableval=$enable_bluetooth;
13108else
13109  enable_bluetooth=ifsupportavailable
13110fi
13111
13112
13113if test "xxx_only" = yes; then
13114	# User requested something-else-only pcap, so they don't
13115	# want Bluetooth support.
13116	enable_bluetooth=no
13117fi
13118
13119if test "x$enable_bluetooth" != "xno" ; then
13120		case "$host_os" in
13121	linux*)
13122		ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
13123if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
13124
13125			#
13126			# We have bluetooth.h, so we support Bluetooth
13127			# sniffing.
13128			#
13129
13130$as_echo "#define PCAP_SUPPORT_BT 1" >>confdefs.h
13131
13132			MODULE_C_SRC="$MODULE_C_SRC pcap-bt-linux.c"
13133			{ $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is supported" >&5
13134$as_echo "$as_me: Bluetooth sniffing is supported" >&6;}
13135			ac_lbl_bluetooth_available=yes
13136
13137			#
13138			# OK, does struct sockaddr_hci have an hci_channel
13139			# member?
13140			#
13141			ac_fn_c_check_member "$LINENO" "struct sockaddr_hci" "hci_channel" "ac_cv_member_struct_sockaddr_hci_hci_channel" "
13142				#include <bluetooth/bluetooth.h>
13143				#include <bluetooth/hci.h>
13144
13145"
13146if test "x$ac_cv_member_struct_sockaddr_hci_hci_channel" = xyes; then :
13147
13148cat >>confdefs.h <<_ACEOF
13149#define HAVE_STRUCT_SOCKADDR_HCI_HCI_CHANNEL 1
13150_ACEOF
13151
13152
13153				#
13154				# Yes; is HCI_CHANNEL_MONITOR defined?
13155				#
13156				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if HCI_CHANNEL_MONITOR is defined" >&5
13157$as_echo_n "checking if HCI_CHANNEL_MONITOR is defined... " >&6; }
13158				if ${ac_cv_lbl_hci_channel_monitor_is_defined+:} false; then :
13159  $as_echo_n "(cached) " >&6
13160else
13161  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13162/* end confdefs.h.  */
13163
13164					    #include <bluetooth/bluetooth.h>
13165					    #include <bluetooth/hci.h>
13166
13167int
13168main ()
13169{
13170
13171					    u_int i = HCI_CHANNEL_MONITOR;
13172
13173  ;
13174  return 0;
13175}
13176_ACEOF
13177if ac_fn_c_try_compile "$LINENO"; then :
13178
13179					    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13180$as_echo "yes" >&6; }
13181
13182$as_echo "#define PCAP_SUPPORT_BT_MONITOR /**/" >>confdefs.h
13183
13184					    MODULE_C_SRC="$MODULE_C_SRC pcap-bt-monitor-linux.c"
13185
13186else
13187
13188					    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13189$as_echo "no" >&6; }
13190
13191fi
13192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13193fi
13194
13195
13196fi
13197
13198
13199else
13200
13201			#
13202			# We don't have bluetooth.h, so we don't support
13203			# Bluetooth sniffing.
13204			#
13205			if test "x$enable_bluetooth" = "xyes" ; then
13206				as_fn_error $? "Bluetooth sniffing is not supported; install bluez-lib devel to enable it" "$LINENO" 5
13207			else
13208				{ $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&5
13209$as_echo "$as_me: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&6;}
13210			fi
13211
13212fi
13213
13214
13215		;;
13216	*)
13217		if test "x$enable_bluetooth" = "xyes" ; then
13218			as_fn_error $? "no Bluetooth sniffing support implemented for $host_os" "$LINENO" 5
13219		else
13220			{ $as_echo "$as_me:${as_lineno-$LINENO}: no Bluetooth sniffing support implemented for $host_os" >&5
13221$as_echo "$as_me: no Bluetooth sniffing support implemented for $host_os" >&6;}
13222		fi
13223		;;
13224	esac
13225
13226fi
13227
13228# Check whether --enable-dbus was given.
13229if test "${enable_dbus+set}" = set; then :
13230  enableval=$enable_dbus;
13231else
13232  enable_dbus=ifavailable
13233fi
13234
13235
13236if test "xxx_only" = yes; then
13237	# User requested something-else-only pcap, so they don't
13238	# want D-Bus support.
13239	enable_dbus=no
13240fi
13241
13242if test "x$enable_dbus" != "xno"; then
13243	if test "x$enable_dbus" = "xyes"; then
13244		case "$host_os" in
13245
13246		darwin*)
13247			#
13248			# We don't support D-Bus sniffing on macOS; see
13249			#
13250			# https://bugs.freedesktop.org/show_bug.cgi?id=74029
13251			#
13252			# The user requested it, so fail.
13253			#
13254			as_fn_error $? "Due to freedesktop.org bug 74029, D-Bus capture support is not available on macOS" "$LINENO" 5
13255		esac
13256	else
13257		case "$host_os" in
13258
13259		darwin*)
13260			#
13261			# We don't support D-Bus sniffing on macOS; see
13262			#
13263			# https://bugs.freedesktop.org/show_bug.cgi?id=74029
13264			#
13265			# The user dind't explicitly request it, so just
13266			# silently refuse to enable it.
13267			#
13268			enable_dbus="no"
13269			;;
13270		esac
13271	fi
13272fi
13273
13274if test "x$enable_dbus" != "xno"; then
13275
13276
13277pkg_failed=no
13278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 with pkg-config" >&5
13279$as_echo_n "checking for dbus-1 with pkg-config... " >&6; }
13280
13281if test -n "$PKG_CONFIG" && \
13282    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
13283  ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
13284  ac_status=$?
13285  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13286  test $ac_status = 0; }; then
13287
13288	#
13289	# The package was found, so try to get its C flags and
13290	# libraries.
13291	#
13292	if test -n "$DBUS_CFLAGS"; then
13293    pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS"
13294 elif test -n "$PKG_CONFIG"; then
13295
13296if test -n "$PKG_CONFIG" && \
13297    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
13298  ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
13299  ac_status=$?
13300  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13301  test $ac_status = 0; }; then
13302  pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1" 2>/dev/null`
13303		      test "x$?" != "x0" && pkg_failed=yes
13304else
13305  pkg_failed=yes
13306fi
13307 else
13308    pkg_failed=untried
13309fi
13310	if test -n "$DBUS_LIBS"; then
13311    pkg_cv_DBUS_LIBS="$DBUS_LIBS"
13312 elif test -n "$PKG_CONFIG"; then
13313
13314if test -n "$PKG_CONFIG" && \
13315    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
13316  ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
13317  ac_status=$?
13318  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13319  test $ac_status = 0; }; then
13320  pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1" 2>/dev/null`
13321		      test "x$?" != "x0" && pkg_failed=yes
13322else
13323  pkg_failed=yes
13324fi
13325 else
13326    pkg_failed=untried
13327fi
13328	if test -n "$DBUS_LIBS_STATIC"; then
13329    pkg_cv_DBUS_LIBS_STATIC="$DBUS_LIBS_STATIC"
13330 elif test -n "$PKG_CONFIG"; then
13331
13332if test -n "$PKG_CONFIG" && \
13333    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
13334  ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
13335  ac_status=$?
13336  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13337  test $ac_status = 0; }; then
13338  pkg_cv_DBUS_LIBS_STATIC=`$PKG_CONFIG --libs --static "dbus-1" 2>/dev/null`
13339		      test "x$?" != "x0" && pkg_failed=yes
13340else
13341  pkg_failed=yes
13342fi
13343 else
13344    pkg_failed=untried
13345fi
13346
13347
13348
13349	if test $pkg_failed = yes; then
13350		#
13351		# That failed - report an error.
13352		#
13353	   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
13354$as_echo "error" >&6; }
13355
13356if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
13357        _pkg_short_errors_supported=yes
13358else
13359        _pkg_short_errors_supported=no
13360fi
13361	        if test $_pkg_short_errors_supported = yes; then
13362		        DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "dbus-1" 2>&1`
13363	        else
13364		        DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "dbus-1" 2>&1`
13365	        fi
13366		# Put the nasty error message in config.log where it belongs
13367		echo "$DBUS_PKG_ERRORS" >&5
13368
13369
13370		if test "x$enable_dbus" = "xyes"; then
13371			as_fn_error $? "--enable-dbus was given, but the dbus-1 package is not installed" "$LINENO" 5
13372		fi
13373
13374	elif test $pkg_failed = untried; then
13375		#
13376		# We don't have pkg-config, so it didn't work.
13377		#
13378	     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
13379$as_echo "not found (pkg-config not found)" >&6; }
13380	else
13381		#
13382		# We found the package.
13383		#
13384		DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS
13385		DBUS_LIBS=$pkg_cv_DBUS_LIBS
13386		DBUS_LIBS_STATIC=$pkg_cv_DBUS_LIBS_STATIC
13387	        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
13388$as_echo "found" >&6; }
13389
13390
13391	save_CFLAGS="$CFLAGS"
13392	save_LIBS="$LIBS"
13393	save_LDFLAGS="$LDFLAGS"
13394
13395		CFLAGS="$CFLAGS $DBUS_CFLAGS"
13396		LIBS="$LIBS $DBUS_LIBS"
13397		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D-Bus library defines dbus_connection_read_write" >&5
13398$as_echo_n "checking whether the D-Bus library defines dbus_connection_read_write... " >&6; }
13399		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13400/* end confdefs.h.  */
13401#include <string.h>
13402
13403		     #include <time.h>
13404		     #include <sys/time.h>
13405
13406		     #include <dbus/dbus.h>
13407int
13408main ()
13409{
13410return dbus_connection_read_write(NULL, 0);
13411  ;
13412  return 0;
13413}
13414_ACEOF
13415if ac_fn_c_try_link "$LINENO"; then :
13416
13417			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13418$as_echo "yes" >&6; }
13419
13420$as_echo "#define PCAP_SUPPORT_DBUS 1" >>confdefs.h
13421
13422			MODULE_C_SRC="$MODULE_C_SRC pcap-dbus.c"
13423			V_INCLS="$V_INCLS $DBUS_CFLAGS"
13424			ADDITIONAL_LIBS="$ADDITIONAL_LIBS $DBUS_LIBS"
13425			ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $DBUS_LIBS_STATIC"
13426			REQUIRES_PRIVATE="$REQUIRES_PRIVATE dbus-1"
13427
13428else
13429
13430			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13431$as_echo "no" >&6; }
13432			if test "x$enable_dbus" = "xyes"; then
13433			    as_fn_error $? "--enable-dbus was given, but the D-Bus library doesn't define dbus_connection_read_write()" "$LINENO" 5
13434			fi
13435
13436fi
13437rm -f core conftest.err conftest.$ac_objext \
13438    conftest$ac_exeext conftest.$ac_ext
13439
13440	CFLAGS="$save_CFLAGS"
13441	LIBS="$save_LIBS"
13442	LDFLAGS="$save_LDFLAGS"
13443
13444
13445	fi
13446else
13447
13448	#
13449	# The package isn't present.
13450	#
13451	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13452$as_echo "not found" >&6; }
13453
13454fi
13455
13456
13457fi
13458
13459# Check whether --enable-rdma was given.
13460if test "${enable_rdma+set}" = set; then :
13461  enableval=$enable_rdma;
13462else
13463  enable_rdma=ifavailable
13464fi
13465
13466
13467if test "xxx_only" = yes; then
13468	# User requested something-else-only pcap, so they don't
13469	# want RDMA support.
13470	enable_rdma=no
13471fi
13472
13473if test "x$enable_rdma" != "xno"; then
13474
13475
13476pkg_failed=no
13477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libibverbs with pkg-config" >&5
13478$as_echo_n "checking for libibverbs with pkg-config... " >&6; }
13479
13480if test -n "$PKG_CONFIG" && \
13481    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libibverbs\""; } >&5
13482  ($PKG_CONFIG --exists --print-errors "libibverbs") 2>&5
13483  ac_status=$?
13484  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13485  test $ac_status = 0; }; then
13486
13487	#
13488	# The package was found, so try to get its C flags and
13489	# libraries.
13490	#
13491	if test -n "$LIBIBVERBS_CFLAGS"; then
13492    pkg_cv_LIBIBVERBS_CFLAGS="$LIBIBVERBS_CFLAGS"
13493 elif test -n "$PKG_CONFIG"; then
13494
13495if test -n "$PKG_CONFIG" && \
13496    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libibverbs\""; } >&5
13497  ($PKG_CONFIG --exists --print-errors "libibverbs") 2>&5
13498  ac_status=$?
13499  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13500  test $ac_status = 0; }; then
13501  pkg_cv_LIBIBVERBS_CFLAGS=`$PKG_CONFIG --cflags "libibverbs" 2>/dev/null`
13502		      test "x$?" != "x0" && pkg_failed=yes
13503else
13504  pkg_failed=yes
13505fi
13506 else
13507    pkg_failed=untried
13508fi
13509	if test -n "$LIBIBVERBS_LIBS"; then
13510    pkg_cv_LIBIBVERBS_LIBS="$LIBIBVERBS_LIBS"
13511 elif test -n "$PKG_CONFIG"; then
13512
13513if test -n "$PKG_CONFIG" && \
13514    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libibverbs\""; } >&5
13515  ($PKG_CONFIG --exists --print-errors "libibverbs") 2>&5
13516  ac_status=$?
13517  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13518  test $ac_status = 0; }; then
13519  pkg_cv_LIBIBVERBS_LIBS=`$PKG_CONFIG --libs "libibverbs" 2>/dev/null`
13520		      test "x$?" != "x0" && pkg_failed=yes
13521else
13522  pkg_failed=yes
13523fi
13524 else
13525    pkg_failed=untried
13526fi
13527	if test -n "$LIBIBVERBS_LIBS_STATIC"; then
13528    pkg_cv_LIBIBVERBS_LIBS_STATIC="$LIBIBVERBS_LIBS_STATIC"
13529 elif test -n "$PKG_CONFIG"; then
13530
13531if test -n "$PKG_CONFIG" && \
13532    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libibverbs\""; } >&5
13533  ($PKG_CONFIG --exists --print-errors "libibverbs") 2>&5
13534  ac_status=$?
13535  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13536  test $ac_status = 0; }; then
13537  pkg_cv_LIBIBVERBS_LIBS_STATIC=`$PKG_CONFIG --libs --static "libibverbs" 2>/dev/null`
13538		      test "x$?" != "x0" && pkg_failed=yes
13539else
13540  pkg_failed=yes
13541fi
13542 else
13543    pkg_failed=untried
13544fi
13545
13546
13547
13548	if test $pkg_failed = yes; then
13549		#
13550		# That failed - report an error.
13551		#
13552	   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
13553$as_echo "error" >&6; }
13554
13555if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
13556        _pkg_short_errors_supported=yes
13557else
13558        _pkg_short_errors_supported=no
13559fi
13560	        if test $_pkg_short_errors_supported = yes; then
13561		        LIBIBVERBS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libibverbs" 2>&1`
13562	        else
13563		        LIBIBVERBS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libibverbs" 2>&1`
13564	        fi
13565		# Put the nasty error message in config.log where it belongs
13566		echo "$LIBIBVERBS_PKG_ERRORS" >&5
13567
13568		as_fn_error $? "Package requirements (libibverbs) were not met:
13569
13570$LIBIBVERBS_PKG_ERRORS
13571
13572Consider adjusting the PKG_CONFIG_PATH environment variable if you
13573installed software in a non-standard prefix.
13574
13575
13576Alternatively, you may set the environment variables LIBIBVERBS_CFLAGS
13577and LIBIBVERBS_LIBS to avoid the need to call pkg-config.
13578See the pkg-config man page for more details." "$LINENO" 5
13579	elif test $pkg_failed = untried; then
13580		#
13581		# We don't have pkg-config, so it didn't work.
13582		#
13583	     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
13584$as_echo "not found (pkg-config not found)" >&6; }
13585	else
13586		#
13587		# We found the package.
13588		#
13589		LIBIBVERBS_CFLAGS=$pkg_cv_LIBIBVERBS_CFLAGS
13590		LIBIBVERBS_LIBS=$pkg_cv_LIBIBVERBS_LIBS
13591		LIBIBVERBS_LIBS_STATIC=$pkg_cv_LIBIBVERBS_LIBS_STATIC
13592	        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
13593$as_echo "found" >&6; }
13594
13595		found_libibverbs=yes
13596		LIBIBVERBS_REQUIRES_PRIVATE="libibverbs"
13597
13598	fi
13599else
13600
13601	#
13602	# The package isn't present.
13603	#
13604	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13605$as_echo "not found" >&6; }
13606
13607fi
13608
13609
13610	if test "x$found_libibverbs" != "xyes"; then
13611		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibv_get_device_list in -libverbs" >&5
13612$as_echo_n "checking for ibv_get_device_list in -libverbs... " >&6; }
13613if ${ac_cv_lib_ibverbs_ibv_get_device_list+:} false; then :
13614  $as_echo_n "(cached) " >&6
13615else
13616  ac_check_lib_save_LIBS=$LIBS
13617LIBS="-libverbs  $LIBS"
13618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13619/* end confdefs.h.  */
13620
13621/* Override any GCC internal prototype to avoid an error.
13622   Use char because int might match the return type of a GCC
13623   builtin and then its argument prototype would still apply.  */
13624#ifdef __cplusplus
13625extern "C"
13626#endif
13627char ibv_get_device_list ();
13628int
13629main ()
13630{
13631return ibv_get_device_list ();
13632  ;
13633  return 0;
13634}
13635_ACEOF
13636if ac_fn_c_try_link "$LINENO"; then :
13637  ac_cv_lib_ibverbs_ibv_get_device_list=yes
13638else
13639  ac_cv_lib_ibverbs_ibv_get_device_list=no
13640fi
13641rm -f core conftest.err conftest.$ac_objext \
13642    conftest$ac_exeext conftest.$ac_ext
13643LIBS=$ac_check_lib_save_LIBS
13644fi
13645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ibverbs_ibv_get_device_list" >&5
13646$as_echo "$ac_cv_lib_ibverbs_ibv_get_device_list" >&6; }
13647if test "x$ac_cv_lib_ibverbs_ibv_get_device_list" = xyes; then :
13648
13649			found_libibverbs=yes
13650			LIBIBVERBS_CFLAGS=""
13651			LIBIBVERBS_LIBS="-libverbs"
13652			# XXX - at least on Ubuntu 20.04, there are many more
13653			# libraries needed; is there any platform where
13654			# libibverbs is available but where pkg-config isn't
13655			# available or libibverbs doesn't use it?  If not,
13656			# we should only use pkg-config for it.
13657			LIBIBVERBS_LIBS_STATIC="-libverbs"
13658			LIBIBVERBS_LIBS_PRIVATE="-libverbs"
13659
13660
13661fi
13662
13663	fi
13664
13665	if test "x$found_libibverbs" = "xyes"; then
13666
13667	save_CFLAGS="$CFLAGS"
13668	save_LIBS="$LIBS"
13669	save_LDFLAGS="$LDFLAGS"
13670
13671		CFLAGS="$CFLAGS $LIBIBVERBS_CFLAGS"
13672		LIBS="$LIBS $LIBIBVERBS_LIBS"
13673		ac_fn_c_check_header_mongrel "$LINENO" "infiniband/verbs.h" "ac_cv_header_infiniband_verbs_h" "$ac_includes_default"
13674if test "x$ac_cv_header_infiniband_verbs_h" = xyes; then :
13675
13676			#
13677			# ibv_create_flow may be defined as a static inline
13678			# function in infiniband/verbs.h, so we can't
13679			# use AC_CHECK_LIB.
13680			#
13681			# Too bad autoconf has no AC_SYMBOL_EXISTS()
13682			# macro that works like CMake's check_symbol_exists()
13683			# function, to check do a compile check like
13684			# this (they do a clever trick to avoid having
13685			# to know the function's signature).
13686			#
13687			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libibverbs defines ibv_create_flow" >&5
13688$as_echo_n "checking whether libibverbs defines ibv_create_flow... " >&6; }
13689			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13690/* end confdefs.h.  */
13691
13692					#include <infiniband/verbs.h>
13693
13694int
13695main ()
13696{
13697
13698					(void) ibv_create_flow((struct ibv_qp *) NULL,
13699							       (struct ibv_flow_attr *) NULL);
13700
13701  ;
13702  return 0;
13703}
13704_ACEOF
13705if ac_fn_c_try_link "$LINENO"; then :
13706
13707					{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13708$as_echo "yes" >&6; }
13709					found_usable_libibverbs=yes
13710
13711else
13712
13713					{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13714$as_echo "no" >&6; }
13715
13716
13717fi
13718rm -f core conftest.err conftest.$ac_objext \
13719    conftest$ac_exeext conftest.$ac_ext
13720
13721fi
13722
13723
13724
13725	CFLAGS="$save_CFLAGS"
13726	LIBS="$save_LIBS"
13727	LDFLAGS="$save_LDFLAGS"
13728
13729	fi
13730
13731	if test "x$found_usable_libibverbs" = "xyes"
13732	then
13733
13734$as_echo "#define PCAP_SUPPORT_RDMASNIFF /**/" >>confdefs.h
13735
13736		MODULE_C_SRC="$MODULE_C_SRC pcap-rdmasniff.c"
13737		CFLAGS="$LIBIBVERBS_CFLAGS $CFLAGS"
13738		ADDITIONAL_LIBS="$LIBIBVERBS_LIBS $ADDITIONAL_LIBS"
13739		ADDITIONAL_LIBS_STATIC="$LIBIBVERBS_LIBS_STATIC $ADDITIONAL_LIBS_STATIC"
13740		LIBS_PRIVATE="$LIBIBVERBS_LIBS_PRIVATE $LIBS_PRIVATE"
13741		REQUIRES_PRIVATE="$REQUIRES_PRIVATE $LIBIBVERBS_REQUIRES_PRIVATE"
13742	fi
13743
13744fi
13745
13746#
13747# If this is a platform where we need to have the .pc file and
13748# pcap-config script supply an rpath option to specify the directory
13749# in which the libpcap shared library is installed, and the install
13750# prefix /usr (meaning we're not installing a system library), provide
13751# the rpath option.
13752#
13753# (We must check $prefix, as $libdir isn't necessarily /usr/lib in this
13754# case - for example, Linux distributions for 64-bit platforms that
13755# also provide support for binaries for a 32-bit version of the
13756# platform may put the 64-bit libraries, the 32-bit libraries, or both
13757# in directories other than /usr/lib.)
13758#
13759# In AIX, do we have to do this?
13760#
13761# In Darwin-based OSes, the full paths of the shared libraries with
13762# which the program was linked are stored in the executable, so we don't
13763# need to provide an rpath option.
13764#
13765# With the HP-UX linker, directories specified with -L are, by default,
13766# added to the run-time search path, so we don't need to supply them.
13767#
13768# For Tru64 UNIX, "-rpath" works with DEC's^WCompaq's^WHP's C compiler
13769# for Alpha, but isn't documented as working with GCC, and no GCC-
13770# compatible option is documented as working with the DEC compiler.
13771# If anybody needs this on Tru64/Alpha, they're welcome to figure out a
13772# way to make it work.
13773#
13774# This must *not* depend on the compiler, as, on platforms where there's
13775# a GCC-compatible compiler and a vendor compiler, we need to work with
13776# both.
13777#
13778if test "$prefix" != "/usr"; then
13779	case "$host_os" in
13780
13781	freebsd*|netbsd*|openbsd*|dragonfly*|linux*|haiku*|midipix*|gnu*)
13782		#
13783		# Platforms where the "native" C compiler is GCC or
13784		# accepts compatible command-line arguments, and the
13785		# "native" linker is the GNU linker or accepts
13786		# compatible command-line arguments.
13787		#
13788		RPATH="-Wl,-rpath,\${libdir}"
13789		;;
13790
13791	solaris*)
13792		#
13793		# Sun/Oracle's linker, the GNU linker, and
13794		# GNU-compatible linkers all support -R.
13795		#
13796		RPATH="-Wl,-R,\${libdir}"
13797		;;
13798	esac
13799fi
13800
13801# Find a good install program.  We prefer a C program (faster),
13802# so one script is as good as another.  But avoid the broken or
13803# incompatible versions:
13804# SysV /etc/install, /usr/sbin/install
13805# SunOS /usr/etc/install
13806# IRIX /sbin/install
13807# AIX /bin/install
13808# AmigaOS /C/install, which installs bootblocks on floppy discs
13809# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
13810# AFS /usr/afsws/bin/install, which mishandles nonexistent args
13811# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
13812# OS/2's system install, which has a completely different semantic
13813# ./install, which can be erroneously created by make from ./install.sh.
13814# Reject install programs that cannot install multiple files.
13815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
13816$as_echo_n "checking for a BSD-compatible install... " >&6; }
13817if test -z "$INSTALL"; then
13818if ${ac_cv_path_install+:} false; then :
13819  $as_echo_n "(cached) " >&6
13820else
13821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13822for as_dir in $PATH
13823do
13824  IFS=$as_save_IFS
13825  test -z "$as_dir" && as_dir=.
13826    # Account for people who put trailing slashes in PATH elements.
13827case $as_dir/ in #((
13828  ./ | .// | /[cC]/* | \
13829  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
13830  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
13831  /usr/ucb/* ) ;;
13832  *)
13833    # OSF1 and SCO ODT 3.0 have their own names for install.
13834    # Don't use installbsd from OSF since it installs stuff as root
13835    # by default.
13836    for ac_prog in ginstall scoinst install; do
13837      for ac_exec_ext in '' $ac_executable_extensions; do
13838	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
13839	  if test $ac_prog = install &&
13840	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
13841	    # AIX install.  It has an incompatible calling convention.
13842	    :
13843	  elif test $ac_prog = install &&
13844	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
13845	    # program-specific install script used by HP pwplus--don't use.
13846	    :
13847	  else
13848	    rm -rf conftest.one conftest.two conftest.dir
13849	    echo one > conftest.one
13850	    echo two > conftest.two
13851	    mkdir conftest.dir
13852	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
13853	      test -s conftest.one && test -s conftest.two &&
13854	      test -s conftest.dir/conftest.one &&
13855	      test -s conftest.dir/conftest.two
13856	    then
13857	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
13858	      break 3
13859	    fi
13860	  fi
13861	fi
13862      done
13863    done
13864    ;;
13865esac
13866
13867  done
13868IFS=$as_save_IFS
13869
13870rm -rf conftest.one conftest.two conftest.dir
13871
13872fi
13873  if test "${ac_cv_path_install+set}" = set; then
13874    INSTALL=$ac_cv_path_install
13875  else
13876    # As a last resort, use the slow shell script.  Don't cache a
13877    # value for INSTALL within a source directory, because that will
13878    # break other packages using the cache if that directory is
13879    # removed, or if the value is a relative name.
13880    INSTALL=$ac_install_sh
13881  fi
13882fi
13883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
13884$as_echo "$INSTALL" >&6; }
13885
13886# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
13887# It thinks the first close brace ends the variable substitution.
13888test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
13889
13890test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
13891
13892test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
13893
13894
13895ac_config_headers="$ac_config_headers config.h"
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914#
13915# We're done with configuration operations; add ADDITIONAL_LIBS and
13916# ADDITIONAL_LIBS_STATIC to LIBS and LIBS_STATIC, respectively.
13917#
13918LIBS="$ADDITIONAL_LIBS $LIBS"
13919LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $LIBS_STATIC"
13920
13921ac_config_commands="$ac_config_commands default-1"
13922
13923ac_config_files="$ac_config_files Makefile grammar.y pcap-filter.manmisc pcap-linktype.manmisc pcap-tstamp.manmisc pcap-savefile.manfile pcap.3pcap pcap_compile.3pcap pcap_datalink.3pcap pcap_dump_open.3pcap pcap_get_tstamp_precision.3pcap pcap_list_datalinks.3pcap pcap_list_tstamp_types.3pcap pcap_open_dead.3pcap pcap_open_offline.3pcap pcap_set_immediate_mode.3pcap pcap_set_tstamp_precision.3pcap pcap_set_tstamp_type.3pcap rpcapd/Makefile rpcapd/rpcapd.manadmin rpcapd/rpcapd-config.manfile testprogs/Makefile"
13924
13925cat >confcache <<\_ACEOF
13926# This file is a shell script that caches the results of configure
13927# tests run on this system so they can be shared between configure
13928# scripts and configure runs, see configure's option --config-cache.
13929# It is not useful on other systems.  If it contains results you don't
13930# want to keep, you may remove or edit it.
13931#
13932# config.status only pays attention to the cache file if you give it
13933# the --recheck option to rerun configure.
13934#
13935# `ac_cv_env_foo' variables (set or unset) will be overridden when
13936# loading this file, other *unset* `ac_cv_foo' will be assigned the
13937# following values.
13938
13939_ACEOF
13940
13941# The following way of writing the cache mishandles newlines in values,
13942# but we know of no workaround that is simple, portable, and efficient.
13943# So, we kill variables containing newlines.
13944# Ultrix sh set writes to stderr and can't be redirected directly,
13945# and sets the high bit in the cache file unless we assign to the vars.
13946(
13947  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13948    eval ac_val=\$$ac_var
13949    case $ac_val in #(
13950    *${as_nl}*)
13951      case $ac_var in #(
13952      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13953$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
13954      esac
13955      case $ac_var in #(
13956      _ | IFS | as_nl) ;; #(
13957      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13958      *) { eval $ac_var=; unset $ac_var;} ;;
13959      esac ;;
13960    esac
13961  done
13962
13963  (set) 2>&1 |
13964    case $as_nl`(ac_space=' '; set) 2>&1` in #(
13965    *${as_nl}ac_space=\ *)
13966      # `set' does not quote correctly, so add quotes: double-quote
13967      # substitution turns \\\\ into \\, and sed turns \\ into \.
13968      sed -n \
13969	"s/'/'\\\\''/g;
13970	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
13971      ;; #(
13972    *)
13973      # `set' quotes correctly as required by POSIX, so do not add quotes.
13974      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
13975      ;;
13976    esac |
13977    sort
13978) |
13979  sed '
13980     /^ac_cv_env_/b end
13981     t clear
13982     :clear
13983     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13984     t end
13985     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13986     :end' >>confcache
13987if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13988  if test -w "$cache_file"; then
13989    if test "x$cache_file" != "x/dev/null"; then
13990      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13991$as_echo "$as_me: updating cache $cache_file" >&6;}
13992      if test ! -f "$cache_file" || test -h "$cache_file"; then
13993	cat confcache >"$cache_file"
13994      else
13995        case $cache_file in #(
13996        */* | ?:*)
13997	  mv -f confcache "$cache_file"$$ &&
13998	  mv -f "$cache_file"$$ "$cache_file" ;; #(
13999        *)
14000	  mv -f confcache "$cache_file" ;;
14001	esac
14002      fi
14003    fi
14004  else
14005    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14006$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
14007  fi
14008fi
14009rm -f confcache
14010
14011test "x$prefix" = xNONE && prefix=$ac_default_prefix
14012# Let make expand exec_prefix.
14013test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14014
14015DEFS=-DHAVE_CONFIG_H
14016
14017ac_libobjs=
14018ac_ltlibobjs=
14019U=
14020for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14021  # 1. Remove the extension, and $U if already installed.
14022  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14023  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14024  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
14025  #    will be set to the directory where LIBOBJS objects are built.
14026  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14027  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
14028done
14029LIBOBJS=$ac_libobjs
14030
14031LTLIBOBJS=$ac_ltlibobjs
14032
14033
14034
14035: "${CONFIG_STATUS=./config.status}"
14036ac_write_fail=0
14037ac_clean_files_save=$ac_clean_files
14038ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14039{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14040$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14041as_write_fail=0
14042cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
14043#! $SHELL
14044# Generated by $as_me.
14045# Run this file to recreate the current configuration.
14046# Compiler output produced by configure, useful for debugging
14047# configure, is in config.log if it exists.
14048
14049debug=false
14050ac_cs_recheck=false
14051ac_cs_silent=false
14052
14053SHELL=\${CONFIG_SHELL-$SHELL}
14054export SHELL
14055_ASEOF
14056cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14057## -------------------- ##
14058## M4sh Initialization. ##
14059## -------------------- ##
14060
14061# Be more Bourne compatible
14062DUALCASE=1; export DUALCASE # for MKS sh
14063if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
14064  emulate sh
14065  NULLCMD=:
14066  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
14067  # is contrary to our usage.  Disable this feature.
14068  alias -g '${1+"$@"}'='"$@"'
14069  setopt NO_GLOB_SUBST
14070else
14071  case `(set -o) 2>/dev/null` in #(
14072  *posix*) :
14073    set -o posix ;; #(
14074  *) :
14075     ;;
14076esac
14077fi
14078
14079
14080as_nl='
14081'
14082export as_nl
14083# Printing a long string crashes Solaris 7 /usr/bin/printf.
14084as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14085as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14086as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14087# Prefer a ksh shell builtin over an external printf program on Solaris,
14088# but without wasting forks for bash or zsh.
14089if test -z "$BASH_VERSION$ZSH_VERSION" \
14090    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14091  as_echo='print -r --'
14092  as_echo_n='print -rn --'
14093elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14094  as_echo='printf %s\n'
14095  as_echo_n='printf %s'
14096else
14097  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14098    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14099    as_echo_n='/usr/ucb/echo -n'
14100  else
14101    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14102    as_echo_n_body='eval
14103      arg=$1;
14104      case $arg in #(
14105      *"$as_nl"*)
14106	expr "X$arg" : "X\\(.*\\)$as_nl";
14107	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14108      esac;
14109      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14110    '
14111    export as_echo_n_body
14112    as_echo_n='sh -c $as_echo_n_body as_echo'
14113  fi
14114  export as_echo_body
14115  as_echo='sh -c $as_echo_body as_echo'
14116fi
14117
14118# The user is always right.
14119if test "${PATH_SEPARATOR+set}" != set; then
14120  PATH_SEPARATOR=:
14121  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14122    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14123      PATH_SEPARATOR=';'
14124  }
14125fi
14126
14127
14128# IFS
14129# We need space, tab and new line, in precisely that order.  Quoting is
14130# there to prevent editors from complaining about space-tab.
14131# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14132# splitting by setting IFS to empty value.)
14133IFS=" ""	$as_nl"
14134
14135# Find who we are.  Look in the path if we contain no directory separator.
14136as_myself=
14137case $0 in #((
14138  *[\\/]* ) as_myself=$0 ;;
14139  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14140for as_dir in $PATH
14141do
14142  IFS=$as_save_IFS
14143  test -z "$as_dir" && as_dir=.
14144    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14145  done
14146IFS=$as_save_IFS
14147
14148     ;;
14149esac
14150# We did not find ourselves, most probably we were run as `sh COMMAND'
14151# in which case we are not to be found in the path.
14152if test "x$as_myself" = x; then
14153  as_myself=$0
14154fi
14155if test ! -f "$as_myself"; then
14156  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14157  exit 1
14158fi
14159
14160# Unset variables that we do not need and which cause bugs (e.g. in
14161# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
14162# suppresses any "Segmentation fault" message there.  '((' could
14163# trigger a bug in pdksh 5.2.14.
14164for as_var in BASH_ENV ENV MAIL MAILPATH
14165do eval test x\${$as_var+set} = xset \
14166  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
14167done
14168PS1='$ '
14169PS2='> '
14170PS4='+ '
14171
14172# NLS nuisances.
14173LC_ALL=C
14174export LC_ALL
14175LANGUAGE=C
14176export LANGUAGE
14177
14178# CDPATH.
14179(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14180
14181
14182# as_fn_error STATUS ERROR [LINENO LOG_FD]
14183# ----------------------------------------
14184# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14185# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14186# script with STATUS, using 1 if that was 0.
14187as_fn_error ()
14188{
14189  as_status=$1; test $as_status -eq 0 && as_status=1
14190  if test "$4"; then
14191    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14192    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
14193  fi
14194  $as_echo "$as_me: error: $2" >&2
14195  as_fn_exit $as_status
14196} # as_fn_error
14197
14198
14199# as_fn_set_status STATUS
14200# -----------------------
14201# Set $? to STATUS, without forking.
14202as_fn_set_status ()
14203{
14204  return $1
14205} # as_fn_set_status
14206
14207# as_fn_exit STATUS
14208# -----------------
14209# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14210as_fn_exit ()
14211{
14212  set +e
14213  as_fn_set_status $1
14214  exit $1
14215} # as_fn_exit
14216
14217# as_fn_unset VAR
14218# ---------------
14219# Portably unset VAR.
14220as_fn_unset ()
14221{
14222  { eval $1=; unset $1;}
14223}
14224as_unset=as_fn_unset
14225# as_fn_append VAR VALUE
14226# ----------------------
14227# Append the text in VALUE to the end of the definition contained in VAR. Take
14228# advantage of any shell optimizations that allow amortized linear growth over
14229# repeated appends, instead of the typical quadratic growth present in naive
14230# implementations.
14231if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14232  eval 'as_fn_append ()
14233  {
14234    eval $1+=\$2
14235  }'
14236else
14237  as_fn_append ()
14238  {
14239    eval $1=\$$1\$2
14240  }
14241fi # as_fn_append
14242
14243# as_fn_arith ARG...
14244# ------------------
14245# Perform arithmetic evaluation on the ARGs, and store the result in the
14246# global $as_val. Take advantage of shells that can avoid forks. The arguments
14247# must be portable across $(()) and expr.
14248if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14249  eval 'as_fn_arith ()
14250  {
14251    as_val=$(( $* ))
14252  }'
14253else
14254  as_fn_arith ()
14255  {
14256    as_val=`expr "$@" || test $? -eq 1`
14257  }
14258fi # as_fn_arith
14259
14260
14261if expr a : '\(a\)' >/dev/null 2>&1 &&
14262   test "X`expr 00001 : '.*\(...\)'`" = X001; then
14263  as_expr=expr
14264else
14265  as_expr=false
14266fi
14267
14268if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14269  as_basename=basename
14270else
14271  as_basename=false
14272fi
14273
14274if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14275  as_dirname=dirname
14276else
14277  as_dirname=false
14278fi
14279
14280as_me=`$as_basename -- "$0" ||
14281$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14282	 X"$0" : 'X\(//\)$' \| \
14283	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
14284$as_echo X/"$0" |
14285    sed '/^.*\/\([^/][^/]*\)\/*$/{
14286	    s//\1/
14287	    q
14288	  }
14289	  /^X\/\(\/\/\)$/{
14290	    s//\1/
14291	    q
14292	  }
14293	  /^X\/\(\/\).*/{
14294	    s//\1/
14295	    q
14296	  }
14297	  s/.*/./; q'`
14298
14299# Avoid depending upon Character Ranges.
14300as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14301as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14302as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14303as_cr_digits='0123456789'
14304as_cr_alnum=$as_cr_Letters$as_cr_digits
14305
14306ECHO_C= ECHO_N= ECHO_T=
14307case `echo -n x` in #(((((
14308-n*)
14309  case `echo 'xy\c'` in
14310  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
14311  xy)  ECHO_C='\c';;
14312  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
14313       ECHO_T='	';;
14314  esac;;
14315*)
14316  ECHO_N='-n';;
14317esac
14318
14319rm -f conf$$ conf$$.exe conf$$.file
14320if test -d conf$$.dir; then
14321  rm -f conf$$.dir/conf$$.file
14322else
14323  rm -f conf$$.dir
14324  mkdir conf$$.dir 2>/dev/null
14325fi
14326if (echo >conf$$.file) 2>/dev/null; then
14327  if ln -s conf$$.file conf$$ 2>/dev/null; then
14328    as_ln_s='ln -s'
14329    # ... but there are two gotchas:
14330    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14331    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14332    # In both cases, we have to default to `cp -pR'.
14333    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14334      as_ln_s='cp -pR'
14335  elif ln conf$$.file conf$$ 2>/dev/null; then
14336    as_ln_s=ln
14337  else
14338    as_ln_s='cp -pR'
14339  fi
14340else
14341  as_ln_s='cp -pR'
14342fi
14343rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14344rmdir conf$$.dir 2>/dev/null
14345
14346
14347# as_fn_mkdir_p
14348# -------------
14349# Create "$as_dir" as a directory, including parents if necessary.
14350as_fn_mkdir_p ()
14351{
14352
14353  case $as_dir in #(
14354  -*) as_dir=./$as_dir;;
14355  esac
14356  test -d "$as_dir" || eval $as_mkdir_p || {
14357    as_dirs=
14358    while :; do
14359      case $as_dir in #(
14360      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14361      *) as_qdir=$as_dir;;
14362      esac
14363      as_dirs="'$as_qdir' $as_dirs"
14364      as_dir=`$as_dirname -- "$as_dir" ||
14365$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14366	 X"$as_dir" : 'X\(//\)[^/]' \| \
14367	 X"$as_dir" : 'X\(//\)$' \| \
14368	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14369$as_echo X"$as_dir" |
14370    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14371	    s//\1/
14372	    q
14373	  }
14374	  /^X\(\/\/\)[^/].*/{
14375	    s//\1/
14376	    q
14377	  }
14378	  /^X\(\/\/\)$/{
14379	    s//\1/
14380	    q
14381	  }
14382	  /^X\(\/\).*/{
14383	    s//\1/
14384	    q
14385	  }
14386	  s/.*/./; q'`
14387      test -d "$as_dir" && break
14388    done
14389    test -z "$as_dirs" || eval "mkdir $as_dirs"
14390  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
14391
14392
14393} # as_fn_mkdir_p
14394if mkdir -p . 2>/dev/null; then
14395  as_mkdir_p='mkdir -p "$as_dir"'
14396else
14397  test -d ./-p && rmdir ./-p
14398  as_mkdir_p=false
14399fi
14400
14401
14402# as_fn_executable_p FILE
14403# -----------------------
14404# Test if FILE is an executable regular file.
14405as_fn_executable_p ()
14406{
14407  test -f "$1" && test -x "$1"
14408} # as_fn_executable_p
14409as_test_x='test -x'
14410as_executable_p=as_fn_executable_p
14411
14412# Sed expression to map a string onto a valid CPP name.
14413as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
14414
14415# Sed expression to map a string onto a valid variable name.
14416as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
14417
14418
14419exec 6>&1
14420## ----------------------------------- ##
14421## Main body of $CONFIG_STATUS script. ##
14422## ----------------------------------- ##
14423_ASEOF
14424test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
14425
14426cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14427# Save the log message, to keep $0 and so on meaningful, and to
14428# report actual input values of CONFIG_FILES etc. instead of their
14429# values after options handling.
14430ac_log="
14431This file was extended by pcap $as_me 1.10.3, which was
14432generated by GNU Autoconf 2.69.  Invocation command line was
14433
14434  CONFIG_FILES    = $CONFIG_FILES
14435  CONFIG_HEADERS  = $CONFIG_HEADERS
14436  CONFIG_LINKS    = $CONFIG_LINKS
14437  CONFIG_COMMANDS = $CONFIG_COMMANDS
14438  $ $0 $@
14439
14440on `(hostname || uname -n) 2>/dev/null | sed 1q`
14441"
14442
14443_ACEOF
14444
14445case $ac_config_files in *"
14446"*) set x $ac_config_files; shift; ac_config_files=$*;;
14447esac
14448
14449case $ac_config_headers in *"
14450"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14451esac
14452
14453
14454cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14455# Files that config.status was made for.
14456config_files="$ac_config_files"
14457config_headers="$ac_config_headers"
14458config_commands="$ac_config_commands"
14459
14460_ACEOF
14461
14462cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14463ac_cs_usage="\
14464\`$as_me' instantiates files and other configuration actions
14465from templates according to the current configuration.  Unless the files
14466and actions are specified as TAGs, all are instantiated by default.
14467
14468Usage: $0 [OPTION]... [TAG]...
14469
14470  -h, --help       print this help, then exit
14471  -V, --version    print version number and configuration settings, then exit
14472      --config     print configuration, then exit
14473  -q, --quiet, --silent
14474                   do not print progress messages
14475  -d, --debug      don't remove temporary files
14476      --recheck    update $as_me by reconfiguring in the same conditions
14477      --file=FILE[:TEMPLATE]
14478                   instantiate the configuration file FILE
14479      --header=FILE[:TEMPLATE]
14480                   instantiate the configuration header FILE
14481
14482Configuration files:
14483$config_files
14484
14485Configuration headers:
14486$config_headers
14487
14488Configuration commands:
14489$config_commands
14490
14491Report bugs to the package provider."
14492
14493_ACEOF
14494cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14495ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
14496ac_cs_version="\\
14497pcap config.status 1.10.3
14498configured by $0, generated by GNU Autoconf 2.69,
14499  with options \\"\$ac_cs_config\\"
14500
14501Copyright (C) 2012 Free Software Foundation, Inc.
14502This config.status script is free software; the Free Software Foundation
14503gives unlimited permission to copy, distribute and modify it."
14504
14505ac_pwd='$ac_pwd'
14506srcdir='$srcdir'
14507INSTALL='$INSTALL'
14508test -n "\$AWK" || AWK=awk
14509_ACEOF
14510
14511cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14512# The default lists apply if the user does not specify any file.
14513ac_need_defaults=:
14514while test $# != 0
14515do
14516  case $1 in
14517  --*=?*)
14518    ac_option=`expr "X$1" : 'X\([^=]*\)='`
14519    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
14520    ac_shift=:
14521    ;;
14522  --*=)
14523    ac_option=`expr "X$1" : 'X\([^=]*\)='`
14524    ac_optarg=
14525    ac_shift=:
14526    ;;
14527  *)
14528    ac_option=$1
14529    ac_optarg=$2
14530    ac_shift=shift
14531    ;;
14532  esac
14533
14534  case $ac_option in
14535  # Handling of the options.
14536  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14537    ac_cs_recheck=: ;;
14538  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
14539    $as_echo "$ac_cs_version"; exit ;;
14540  --config | --confi | --conf | --con | --co | --c )
14541    $as_echo "$ac_cs_config"; exit ;;
14542  --debug | --debu | --deb | --de | --d | -d )
14543    debug=: ;;
14544  --file | --fil | --fi | --f )
14545    $ac_shift
14546    case $ac_optarg in
14547    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14548    '') as_fn_error $? "missing file argument" ;;
14549    esac
14550    as_fn_append CONFIG_FILES " '$ac_optarg'"
14551    ac_need_defaults=false;;
14552  --header | --heade | --head | --hea )
14553    $ac_shift
14554    case $ac_optarg in
14555    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14556    esac
14557    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
14558    ac_need_defaults=false;;
14559  --he | --h)
14560    # Conflict between --help and --header
14561    as_fn_error $? "ambiguous option: \`$1'
14562Try \`$0 --help' for more information.";;
14563  --help | --hel | -h )
14564    $as_echo "$ac_cs_usage"; exit ;;
14565  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14566  | -silent | --silent | --silen | --sile | --sil | --si | --s)
14567    ac_cs_silent=: ;;
14568
14569  # This is an error.
14570  -*) as_fn_error $? "unrecognized option: \`$1'
14571Try \`$0 --help' for more information." ;;
14572
14573  *) as_fn_append ac_config_targets " $1"
14574     ac_need_defaults=false ;;
14575
14576  esac
14577  shift
14578done
14579
14580ac_configure_extra_args=
14581
14582if $ac_cs_silent; then
14583  exec 6>/dev/null
14584  ac_configure_extra_args="$ac_configure_extra_args --silent"
14585fi
14586
14587_ACEOF
14588cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14589if \$ac_cs_recheck; then
14590  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14591  shift
14592  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14593  CONFIG_SHELL='$SHELL'
14594  export CONFIG_SHELL
14595  exec "\$@"
14596fi
14597
14598_ACEOF
14599cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14600exec 5>>config.log
14601{
14602  echo
14603  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14604## Running $as_me. ##
14605_ASBOX
14606  $as_echo "$ac_log"
14607} >&5
14608
14609_ACEOF
14610cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14611#
14612# INIT-COMMANDS
14613#
14614
14615
14616_ACEOF
14617
14618cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14619
14620# Handling of arguments.
14621for ac_config_target in $ac_config_targets
14622do
14623  case $ac_config_target in
14624    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
14625    "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
14626    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
14627    "grammar.y") CONFIG_FILES="$CONFIG_FILES grammar.y" ;;
14628    "pcap-filter.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-filter.manmisc" ;;
14629    "pcap-linktype.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-linktype.manmisc" ;;
14630    "pcap-tstamp.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-tstamp.manmisc" ;;
14631    "pcap-savefile.manfile") CONFIG_FILES="$CONFIG_FILES pcap-savefile.manfile" ;;
14632    "pcap.3pcap") CONFIG_FILES="$CONFIG_FILES pcap.3pcap" ;;
14633    "pcap_compile.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_compile.3pcap" ;;
14634    "pcap_datalink.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_datalink.3pcap" ;;
14635    "pcap_dump_open.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_dump_open.3pcap" ;;
14636    "pcap_get_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_get_tstamp_precision.3pcap" ;;
14637    "pcap_list_datalinks.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_datalinks.3pcap" ;;
14638    "pcap_list_tstamp_types.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_tstamp_types.3pcap" ;;
14639    "pcap_open_dead.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_dead.3pcap" ;;
14640    "pcap_open_offline.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_offline.3pcap" ;;
14641    "pcap_set_immediate_mode.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_immediate_mode.3pcap" ;;
14642    "pcap_set_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_precision.3pcap" ;;
14643    "pcap_set_tstamp_type.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_type.3pcap" ;;
14644    "rpcapd/Makefile") CONFIG_FILES="$CONFIG_FILES rpcapd/Makefile" ;;
14645    "rpcapd/rpcapd.manadmin") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd.manadmin" ;;
14646    "rpcapd/rpcapd-config.manfile") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd-config.manfile" ;;
14647    "testprogs/Makefile") CONFIG_FILES="$CONFIG_FILES testprogs/Makefile" ;;
14648
14649  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
14650  esac
14651done
14652
14653
14654# If the user did not use the arguments to specify the items to instantiate,
14655# then the envvar interface is used.  Set only those that are not.
14656# We use the long form for the default assignment because of an extremely
14657# bizarre bug on SunOS 4.1.3.
14658if $ac_need_defaults; then
14659  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14660  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14661  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14662fi
14663
14664# Have a temporary directory for convenience.  Make it in the build tree
14665# simply because there is no reason against having it here, and in addition,
14666# creating and moving files from /tmp can sometimes cause problems.
14667# Hook for its removal unless debugging.
14668# Note that there is a small window in which the directory will not be cleaned:
14669# after its creation but before its name has been assigned to `$tmp'.
14670$debug ||
14671{
14672  tmp= ac_tmp=
14673  trap 'exit_status=$?
14674  : "${ac_tmp:=$tmp}"
14675  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
14676' 0
14677  trap 'as_fn_exit 1' 1 2 13 15
14678}
14679# Create a (secure) tmp directory for tmp files.
14680
14681{
14682  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
14683  test -d "$tmp"
14684}  ||
14685{
14686  tmp=./conf$$-$RANDOM
14687  (umask 077 && mkdir "$tmp")
14688} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14689ac_tmp=$tmp
14690
14691# Set up the scripts for CONFIG_FILES section.
14692# No need to generate them if there are no CONFIG_FILES.
14693# This happens for instance with `./config.status config.h'.
14694if test -n "$CONFIG_FILES"; then
14695
14696
14697ac_cr=`echo X | tr X '\015'`
14698# On cygwin, bash can eat \r inside `` if the user requested igncr.
14699# But we know of no other shell where ac_cr would be empty at this
14700# point, so we can use a bashism as a fallback.
14701if test "x$ac_cr" = x; then
14702  eval ac_cr=\$\'\\r\'
14703fi
14704ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14705if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14706  ac_cs_awk_cr='\\r'
14707else
14708  ac_cs_awk_cr=$ac_cr
14709fi
14710
14711echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
14712_ACEOF
14713
14714
14715{
14716  echo "cat >conf$$subs.awk <<_ACEOF" &&
14717  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14718  echo "_ACEOF"
14719} >conf$$subs.sh ||
14720  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14721ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
14722ac_delim='%!_!# '
14723for ac_last_try in false false false false false :; do
14724  . ./conf$$subs.sh ||
14725    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14726
14727  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14728  if test $ac_delim_n = $ac_delim_num; then
14729    break
14730  elif $ac_last_try; then
14731    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14732  else
14733    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14734  fi
14735done
14736rm -f conf$$subs.sh
14737
14738cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14739cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
14740_ACEOF
14741sed -n '
14742h
14743s/^/S["/; s/!.*/"]=/
14744p
14745g
14746s/^[^!]*!//
14747:repl
14748t repl
14749s/'"$ac_delim"'$//
14750t delim
14751:nl
14752h
14753s/\(.\{148\}\)..*/\1/
14754t more1
14755s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14756p
14757n
14758b repl
14759:more1
14760s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14761p
14762g
14763s/.\{148\}//
14764t nl
14765:delim
14766h
14767s/\(.\{148\}\)..*/\1/
14768t more2
14769s/["\\]/\\&/g; s/^/"/; s/$/"/
14770p
14771b
14772:more2
14773s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14774p
14775g
14776s/.\{148\}//
14777t delim
14778' <conf$$subs.awk | sed '
14779/^[^""]/{
14780  N
14781  s/\n//
14782}
14783' >>$CONFIG_STATUS || ac_write_fail=1
14784rm -f conf$$subs.awk
14785cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14786_ACAWK
14787cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
14788  for (key in S) S_is_set[key] = 1
14789  FS = ""
14790
14791}
14792{
14793  line = $ 0
14794  nfields = split(line, field, "@")
14795  substed = 0
14796  len = length(field[1])
14797  for (i = 2; i < nfields; i++) {
14798    key = field[i]
14799    keylen = length(key)
14800    if (S_is_set[key]) {
14801      value = S[key]
14802      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14803      len += length(value) + length(field[++i])
14804      substed = 1
14805    } else
14806      len += 1 + keylen
14807  }
14808
14809  print line
14810}
14811
14812_ACAWK
14813_ACEOF
14814cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14815if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14816  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14817else
14818  cat
14819fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14820  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
14821_ACEOF
14822
14823# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14824# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
14825# trailing colons and then remove the whole line if VPATH becomes empty
14826# (actually we leave an empty line to preserve line numbers).
14827if test "x$srcdir" = x.; then
14828  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
14829h
14830s///
14831s/^/:/
14832s/[	 ]*$/:/
14833s/:\$(srcdir):/:/g
14834s/:\${srcdir}:/:/g
14835s/:@srcdir@:/:/g
14836s/^:*//
14837s/:*$//
14838x
14839s/\(=[	 ]*\).*/\1/
14840G
14841s/\n//
14842s/^[^=]*=[	 ]*$//
14843}'
14844fi
14845
14846cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14847fi # test -n "$CONFIG_FILES"
14848
14849# Set up the scripts for CONFIG_HEADERS section.
14850# No need to generate them if there are no CONFIG_HEADERS.
14851# This happens for instance with `./config.status Makefile'.
14852if test -n "$CONFIG_HEADERS"; then
14853cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
14854BEGIN {
14855_ACEOF
14856
14857# Transform confdefs.h into an awk script `defines.awk', embedded as
14858# here-document in config.status, that substitutes the proper values into
14859# config.h.in to produce config.h.
14860
14861# Create a delimiter string that does not exist in confdefs.h, to ease
14862# handling of long lines.
14863ac_delim='%!_!# '
14864for ac_last_try in false false :; do
14865  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14866  if test -z "$ac_tt"; then
14867    break
14868  elif $ac_last_try; then
14869    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
14870  else
14871    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14872  fi
14873done
14874
14875# For the awk script, D is an array of macro values keyed by name,
14876# likewise P contains macro parameters if any.  Preserve backslash
14877# newline sequences.
14878
14879ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14880sed -n '
14881s/.\{148\}/&'"$ac_delim"'/g
14882t rset
14883:rset
14884s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
14885t def
14886d
14887:def
14888s/\\$//
14889t bsnl
14890s/["\\]/\\&/g
14891s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
14892D["\1"]=" \3"/p
14893s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
14894d
14895:bsnl
14896s/["\\]/\\&/g
14897s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
14898D["\1"]=" \3\\\\\\n"\\/p
14899t cont
14900s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14901t cont
14902d
14903:cont
14904n
14905s/.\{148\}/&'"$ac_delim"'/g
14906t clear
14907:clear
14908s/\\$//
14909t bsnlc
14910s/["\\]/\\&/g; s/^/"/; s/$/"/p
14911d
14912:bsnlc
14913s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14914b cont
14915' <confdefs.h | sed '
14916s/'"$ac_delim"'/"\\\
14917"/g' >>$CONFIG_STATUS || ac_write_fail=1
14918
14919cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14920  for (key in D) D_is_set[key] = 1
14921  FS = ""
14922}
14923/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14924  line = \$ 0
14925  split(line, arg, " ")
14926  if (arg[1] == "#") {
14927    defundef = arg[2]
14928    mac1 = arg[3]
14929  } else {
14930    defundef = substr(arg[1], 2)
14931    mac1 = arg[2]
14932  }
14933  split(mac1, mac2, "(") #)
14934  macro = mac2[1]
14935  prefix = substr(line, 1, index(line, defundef) - 1)
14936  if (D_is_set[macro]) {
14937    # Preserve the white space surrounding the "#".
14938    print prefix "define", macro P[macro] D[macro]
14939    next
14940  } else {
14941    # Replace #undef with comments.  This is necessary, for example,
14942    # in the case of _POSIX_SOURCE, which is predefined and required
14943    # on some systems where configure will not decide to define it.
14944    if (defundef == "undef") {
14945      print "/*", prefix defundef, macro, "*/"
14946      next
14947    }
14948  }
14949}
14950{ print }
14951_ACAWK
14952_ACEOF
14953cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14954  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
14955fi # test -n "$CONFIG_HEADERS"
14956
14957
14958eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
14959shift
14960for ac_tag
14961do
14962  case $ac_tag in
14963  :[FHLC]) ac_mode=$ac_tag; continue;;
14964  esac
14965  case $ac_mode$ac_tag in
14966  :[FHL]*:*);;
14967  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
14968  :[FH]-) ac_tag=-:-;;
14969  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14970  esac
14971  ac_save_IFS=$IFS
14972  IFS=:
14973  set x $ac_tag
14974  IFS=$ac_save_IFS
14975  shift
14976  ac_file=$1
14977  shift
14978
14979  case $ac_mode in
14980  :L) ac_source=$1;;
14981  :[FH])
14982    ac_file_inputs=
14983    for ac_f
14984    do
14985      case $ac_f in
14986      -) ac_f="$ac_tmp/stdin";;
14987      *) # Look for the file first in the build tree, then in the source tree
14988	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
14989	 # because $ac_f cannot contain `:'.
14990	 test -f "$ac_f" ||
14991	   case $ac_f in
14992	   [\\/$]*) false;;
14993	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14994	   esac ||
14995	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
14996      esac
14997      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14998      as_fn_append ac_file_inputs " '$ac_f'"
14999    done
15000
15001    # Let's still pretend it is `configure' which instantiates (i.e., don't
15002    # use $as_me), people would be surprised to read:
15003    #    /* config.h.  Generated by config.status.  */
15004    configure_input='Generated from '`
15005	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15006	`' by configure.'
15007    if test x"$ac_file" != x-; then
15008      configure_input="$ac_file.  $configure_input"
15009      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15010$as_echo "$as_me: creating $ac_file" >&6;}
15011    fi
15012    # Neutralize special characters interpreted by sed in replacement strings.
15013    case $configure_input in #(
15014    *\&* | *\|* | *\\* )
15015       ac_sed_conf_input=`$as_echo "$configure_input" |
15016       sed 's/[\\\\&|]/\\\\&/g'`;; #(
15017    *) ac_sed_conf_input=$configure_input;;
15018    esac
15019
15020    case $ac_tag in
15021    *:-:* | *:-) cat >"$ac_tmp/stdin" \
15022      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
15023    esac
15024    ;;
15025  esac
15026
15027  ac_dir=`$as_dirname -- "$ac_file" ||
15028$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15029	 X"$ac_file" : 'X\(//\)[^/]' \| \
15030	 X"$ac_file" : 'X\(//\)$' \| \
15031	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15032$as_echo X"$ac_file" |
15033    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15034	    s//\1/
15035	    q
15036	  }
15037	  /^X\(\/\/\)[^/].*/{
15038	    s//\1/
15039	    q
15040	  }
15041	  /^X\(\/\/\)$/{
15042	    s//\1/
15043	    q
15044	  }
15045	  /^X\(\/\).*/{
15046	    s//\1/
15047	    q
15048	  }
15049	  s/.*/./; q'`
15050  as_dir="$ac_dir"; as_fn_mkdir_p
15051  ac_builddir=.
15052
15053case "$ac_dir" in
15054.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15055*)
15056  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15057  # A ".." for each directory in $ac_dir_suffix.
15058  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15059  case $ac_top_builddir_sub in
15060  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15061  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15062  esac ;;
15063esac
15064ac_abs_top_builddir=$ac_pwd
15065ac_abs_builddir=$ac_pwd$ac_dir_suffix
15066# for backward compatibility:
15067ac_top_builddir=$ac_top_build_prefix
15068
15069case $srcdir in
15070  .)  # We are building in place.
15071    ac_srcdir=.
15072    ac_top_srcdir=$ac_top_builddir_sub
15073    ac_abs_top_srcdir=$ac_pwd ;;
15074  [\\/]* | ?:[\\/]* )  # Absolute name.
15075    ac_srcdir=$srcdir$ac_dir_suffix;
15076    ac_top_srcdir=$srcdir
15077    ac_abs_top_srcdir=$srcdir ;;
15078  *) # Relative name.
15079    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15080    ac_top_srcdir=$ac_top_build_prefix$srcdir
15081    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
15082esac
15083ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
15084
15085
15086  case $ac_mode in
15087  :F)
15088  #
15089  # CONFIG_FILE
15090  #
15091
15092  case $INSTALL in
15093  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15094  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
15095  esac
15096_ACEOF
15097
15098cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15099# If the template does not know about datarootdir, expand it.
15100# FIXME: This hack should be removed a few years after 2.60.
15101ac_datarootdir_hack=; ac_datarootdir_seen=
15102ac_sed_dataroot='
15103/datarootdir/ {
15104  p
15105  q
15106}
15107/@datadir@/p
15108/@docdir@/p
15109/@infodir@/p
15110/@localedir@/p
15111/@mandir@/p'
15112case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
15113*datarootdir*) ac_datarootdir_seen=yes;;
15114*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
15115  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15116$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
15117_ACEOF
15118cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15119  ac_datarootdir_hack='
15120  s&@datadir@&$datadir&g
15121  s&@docdir@&$docdir&g
15122  s&@infodir@&$infodir&g
15123  s&@localedir@&$localedir&g
15124  s&@mandir@&$mandir&g
15125  s&\\\${datarootdir}&$datarootdir&g' ;;
15126esac
15127_ACEOF
15128
15129# Neutralize VPATH when `$srcdir' = `.'.
15130# Shell code in configure.ac might set extrasub.
15131# FIXME: do we really want to maintain this feature?
15132cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15133ac_sed_extra="$ac_vpsub
15134$extrasub
15135_ACEOF
15136cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15137:t
15138/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15139s|@configure_input@|$ac_sed_conf_input|;t t
15140s&@top_builddir@&$ac_top_builddir_sub&;t t
15141s&@top_build_prefix@&$ac_top_build_prefix&;t t
15142s&@srcdir@&$ac_srcdir&;t t
15143s&@abs_srcdir@&$ac_abs_srcdir&;t t
15144s&@top_srcdir@&$ac_top_srcdir&;t t
15145s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15146s&@builddir@&$ac_builddir&;t t
15147s&@abs_builddir@&$ac_abs_builddir&;t t
15148s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15149s&@INSTALL@&$ac_INSTALL&;t t
15150$ac_datarootdir_hack
15151"
15152eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15153  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15154
15155test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15156  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15157  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
15158      "$ac_tmp/out"`; test -z "$ac_out"; } &&
15159  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15160which seems to be undefined.  Please make sure it is defined" >&5
15161$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15162which seems to be undefined.  Please make sure it is defined" >&2;}
15163
15164  rm -f "$ac_tmp/stdin"
15165  case $ac_file in
15166  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15167  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
15168  esac \
15169  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15170 ;;
15171  :H)
15172  #
15173  # CONFIG_HEADER
15174  #
15175  if test x"$ac_file" != x-; then
15176    {
15177      $as_echo "/* $configure_input  */" \
15178      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15179    } >"$ac_tmp/config.h" \
15180      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15181    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
15182      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15183$as_echo "$as_me: $ac_file is unchanged" >&6;}
15184    else
15185      rm -f "$ac_file"
15186      mv "$ac_tmp/config.h" "$ac_file" \
15187	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
15188    fi
15189  else
15190    $as_echo "/* $configure_input  */" \
15191      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15192      || as_fn_error $? "could not create -" "$LINENO" 5
15193  fi
15194 ;;
15195
15196  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
15197$as_echo "$as_me: executing $ac_file commands" >&6;}
15198 ;;
15199  esac
15200
15201
15202  case $ac_file$ac_mode in
15203    "default-1":C) if test -f .devel; then
15204	echo timestamp > stamp-h
15205	cat $srcdir/Makefile-devel-adds >> Makefile
15206	make depend || exit 1
15207fi ;;
15208
15209  esac
15210done # for ac_tag
15211
15212
15213as_fn_exit 0
15214_ACEOF
15215ac_clean_files=$ac_clean_files_save
15216
15217test $ac_write_fail = 0 ||
15218  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
15219
15220
15221# configure is writing to config.log, and then calls config.status.
15222# config.status does its own redirection, appending to config.log.
15223# Unfortunately, on DOS this fails, as config.log is still kept open
15224# by configure, so config.status won't be able to write to it; its
15225# output is simply discarded.  So we exec the FD to /dev/null,
15226# effectively closing config.log, so it can be properly (re)opened and
15227# appended to by config.status.  When coming back to configure, we
15228# need to make the FD available again.
15229if test "$no_create" != yes; then
15230  ac_cs_success=:
15231  ac_config_status_args=
15232  test "$silent" = yes &&
15233    ac_config_status_args="$ac_config_status_args --quiet"
15234  exec 5>/dev/null
15235  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
15236  exec 5>>config.log
15237  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15238  # would make configure fail if this is the last instruction.
15239  $ac_cs_success || as_fn_exit 1
15240fi
15241if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15242  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15243$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
15244fi
15245
15246exit 0
15247