• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for pcap 1.10.1.
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.1'
581PACKAGE_STRING='pcap 1.10.1'
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
623INSTALL_DATA
624INSTALL_SCRIPT
625INSTALL_PROGRAM
626PCAP_SUPPORT_RDMASNIFF
627PCAP_SUPPORT_DBUS
628PCAP_SUPPORT_BT
629PCAP_SUPPORT_DPDK
630PCAP_SUPPORT_NETMAP
631PCAP_SUPPORT_NETFILTER
632PCAP_SUPPORT_LINUX_USBMON
633EXTRA_NETWORK_LIBS
634RPCAPD_LIBS
635INSTALL_RPCAPD
636BUILD_RPCAPD
637PTHREAD_LIBS
638MAN_ADMIN_COMMANDS
639MAN_MISC_INFO
640MAN_FILE_FORMATS
641MAN_DEVICES
642DYEXT
643REMOTE_C_SRC
644MODULE_C_SRC
645PLATFORM_CXX_SRC
646PLATFORM_C_SRC
647ADDLARCHIVEOBJS
648ADDLOBJS
649V_YACC
650V_RPATH_OPT
651V_SONAME_OPT
652V_SHLIB_OPT
653V_SHLIB_CMD
654V_SHLIB_CCOPT
655V_LEX
656V_INCLS
657V_DEFS
658V_PROG_LDFLAGS_FAT
659V_PROG_CCOPT_FAT
660V_LIB_LDFLAGS_FAT
661V_LIB_CCOPT_FAT
662V_CCOPT
663MKDEP
664DEPENDENCY_CFLAG
665LN_S
666AR
667RANLIB
668REENTRANT_PARSER
669BISON_BYACC
670LEXLIB
671LEX_OUTPUT_ROOT
672LEX
673PKGCONFIG
674VALGRINDTEST_SRC
675LIBOBJS
676EGREP
677GREP
678CPP
679ac_ct_CXX
680CXXFLAGS
681CXX
682OBJEXT
683EXEEXT
684ac_ct_CC
685CPPFLAGS
686LDFLAGS
687CFLAGS
688CC
689SHLICC2
690target_os
691target_vendor
692target_cpu
693target
694host_os
695host_vendor
696host_cpu
697host
698build_os
699build_vendor
700build_cpu
701build
702target_alias
703host_alias
704build_alias
705LIBS
706ECHO_T
707ECHO_N
708ECHO_C
709DEFS
710mandir
711localedir
712libdir
713psdir
714pdfdir
715dvidir
716htmldir
717infodir
718docdir
719oldincludedir
720includedir
721runstatedir
722localstatedir
723sharedstatedir
724sysconfdir
725datadir
726datarootdir
727libexecdir
728sbindir
729bindir
730program_transform_name
731prefix
732exec_prefix
733PACKAGE_URL
734PACKAGE_BUGREPORT
735PACKAGE_STRING
736PACKAGE_VERSION
737PACKAGE_TARNAME
738PACKAGE_NAME
739PATH_SEPARATOR
740SHELL'
741ac_subst_files=''
742ac_user_opts='
743enable_option_checking
744with_gcc
745enable_largefile
746enable_protochain
747with_pcap
748with_libnl
749enable_ipv6
750with_dag
751with_dag_includes
752with_dag_libraries
753with_septel
754with_snf
755with_snf_includes
756with_snf_libraries
757with_turbocap
758enable_remote
759enable_optimizer_dbg
760enable_yydebug
761enable_universal
762enable_shared
763enable_usb
764enable_netmap
765with_dpdk
766enable_bluetooth
767enable_dbus
768enable_rdma
769'
770      ac_precious_vars='build_alias
771host_alias
772target_alias
773CC
774CFLAGS
775LDFLAGS
776LIBS
777CPPFLAGS
778CXX
779CXXFLAGS
780CCC
781CPP'
782
783
784# Initialize some variables set by options.
785ac_init_help=
786ac_init_version=false
787ac_unrecognized_opts=
788ac_unrecognized_sep=
789# The variables have the same names as the options, with
790# dashes changed to underlines.
791cache_file=/dev/null
792exec_prefix=NONE
793no_create=
794no_recursion=
795prefix=NONE
796program_prefix=NONE
797program_suffix=NONE
798program_transform_name=s,x,x,
799silent=
800site=
801srcdir=
802verbose=
803x_includes=NONE
804x_libraries=NONE
805
806# Installation directory options.
807# These are left unexpanded so users can "make install exec_prefix=/foo"
808# and all the variables that are supposed to be based on exec_prefix
809# by default will actually change.
810# Use braces instead of parens because sh, perl, etc. also accept them.
811# (The list follows the same order as the GNU Coding Standards.)
812bindir='${exec_prefix}/bin'
813sbindir='${exec_prefix}/sbin'
814libexecdir='${exec_prefix}/libexec'
815datarootdir='${prefix}/share'
816datadir='${datarootdir}'
817sysconfdir='${prefix}/etc'
818sharedstatedir='${prefix}/com'
819localstatedir='${prefix}/var'
820runstatedir='${localstatedir}/run'
821includedir='${prefix}/include'
822oldincludedir='/usr/include'
823docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
824infodir='${datarootdir}/info'
825htmldir='${docdir}'
826dvidir='${docdir}'
827pdfdir='${docdir}'
828psdir='${docdir}'
829libdir='${exec_prefix}/lib'
830localedir='${datarootdir}/locale'
831mandir='${datarootdir}/man'
832
833ac_prev=
834ac_dashdash=
835for ac_option
836do
837  # If the previous option needs an argument, assign it.
838  if test -n "$ac_prev"; then
839    eval $ac_prev=\$ac_option
840    ac_prev=
841    continue
842  fi
843
844  case $ac_option in
845  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
846  *=)   ac_optarg= ;;
847  *)    ac_optarg=yes ;;
848  esac
849
850  # Accept the important Cygnus configure options, so we can diagnose typos.
851
852  case $ac_dashdash$ac_option in
853  --)
854    ac_dashdash=yes ;;
855
856  -bindir | --bindir | --bindi | --bind | --bin | --bi)
857    ac_prev=bindir ;;
858  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
859    bindir=$ac_optarg ;;
860
861  -build | --build | --buil | --bui | --bu)
862    ac_prev=build_alias ;;
863  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
864    build_alias=$ac_optarg ;;
865
866  -cache-file | --cache-file | --cache-fil | --cache-fi \
867  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
868    ac_prev=cache_file ;;
869  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
870  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
871    cache_file=$ac_optarg ;;
872
873  --config-cache | -C)
874    cache_file=config.cache ;;
875
876  -datadir | --datadir | --datadi | --datad)
877    ac_prev=datadir ;;
878  -datadir=* | --datadir=* | --datadi=* | --datad=*)
879    datadir=$ac_optarg ;;
880
881  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
882  | --dataroo | --dataro | --datar)
883    ac_prev=datarootdir ;;
884  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
885  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
886    datarootdir=$ac_optarg ;;
887
888  -disable-* | --disable-*)
889    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
890    # Reject names that are not valid shell variable names.
891    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
892      as_fn_error $? "invalid feature name: $ac_useropt"
893    ac_useropt_orig=$ac_useropt
894    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
895    case $ac_user_opts in
896      *"
897"enable_$ac_useropt"
898"*) ;;
899      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
900	 ac_unrecognized_sep=', ';;
901    esac
902    eval enable_$ac_useropt=no ;;
903
904  -docdir | --docdir | --docdi | --doc | --do)
905    ac_prev=docdir ;;
906  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
907    docdir=$ac_optarg ;;
908
909  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
910    ac_prev=dvidir ;;
911  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
912    dvidir=$ac_optarg ;;
913
914  -enable-* | --enable-*)
915    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
916    # Reject names that are not valid shell variable names.
917    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
918      as_fn_error $? "invalid feature name: $ac_useropt"
919    ac_useropt_orig=$ac_useropt
920    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
921    case $ac_user_opts in
922      *"
923"enable_$ac_useropt"
924"*) ;;
925      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
926	 ac_unrecognized_sep=', ';;
927    esac
928    eval enable_$ac_useropt=\$ac_optarg ;;
929
930  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
931  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
932  | --exec | --exe | --ex)
933    ac_prev=exec_prefix ;;
934  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
935  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
936  | --exec=* | --exe=* | --ex=*)
937    exec_prefix=$ac_optarg ;;
938
939  -gas | --gas | --ga | --g)
940    # Obsolete; use --with-gas.
941    with_gas=yes ;;
942
943  -help | --help | --hel | --he | -h)
944    ac_init_help=long ;;
945  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
946    ac_init_help=recursive ;;
947  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
948    ac_init_help=short ;;
949
950  -host | --host | --hos | --ho)
951    ac_prev=host_alias ;;
952  -host=* | --host=* | --hos=* | --ho=*)
953    host_alias=$ac_optarg ;;
954
955  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
956    ac_prev=htmldir ;;
957  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
958  | --ht=*)
959    htmldir=$ac_optarg ;;
960
961  -includedir | --includedir | --includedi | --included | --include \
962  | --includ | --inclu | --incl | --inc)
963    ac_prev=includedir ;;
964  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
965  | --includ=* | --inclu=* | --incl=* | --inc=*)
966    includedir=$ac_optarg ;;
967
968  -infodir | --infodir | --infodi | --infod | --info | --inf)
969    ac_prev=infodir ;;
970  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
971    infodir=$ac_optarg ;;
972
973  -libdir | --libdir | --libdi | --libd)
974    ac_prev=libdir ;;
975  -libdir=* | --libdir=* | --libdi=* | --libd=*)
976    libdir=$ac_optarg ;;
977
978  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
979  | --libexe | --libex | --libe)
980    ac_prev=libexecdir ;;
981  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
982  | --libexe=* | --libex=* | --libe=*)
983    libexecdir=$ac_optarg ;;
984
985  -localedir | --localedir | --localedi | --localed | --locale)
986    ac_prev=localedir ;;
987  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
988    localedir=$ac_optarg ;;
989
990  -localstatedir | --localstatedir | --localstatedi | --localstated \
991  | --localstate | --localstat | --localsta | --localst | --locals)
992    ac_prev=localstatedir ;;
993  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
994  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
995    localstatedir=$ac_optarg ;;
996
997  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
998    ac_prev=mandir ;;
999  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1000    mandir=$ac_optarg ;;
1001
1002  -nfp | --nfp | --nf)
1003    # Obsolete; use --without-fp.
1004    with_fp=no ;;
1005
1006  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1007  | --no-cr | --no-c | -n)
1008    no_create=yes ;;
1009
1010  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1011  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1012    no_recursion=yes ;;
1013
1014  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1015  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1016  | --oldin | --oldi | --old | --ol | --o)
1017    ac_prev=oldincludedir ;;
1018  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1019  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1020  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1021    oldincludedir=$ac_optarg ;;
1022
1023  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1024    ac_prev=prefix ;;
1025  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1026    prefix=$ac_optarg ;;
1027
1028  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1029  | --program-pre | --program-pr | --program-p)
1030    ac_prev=program_prefix ;;
1031  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1032  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1033    program_prefix=$ac_optarg ;;
1034
1035  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1036  | --program-suf | --program-su | --program-s)
1037    ac_prev=program_suffix ;;
1038  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1039  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1040    program_suffix=$ac_optarg ;;
1041
1042  -program-transform-name | --program-transform-name \
1043  | --program-transform-nam | --program-transform-na \
1044  | --program-transform-n | --program-transform- \
1045  | --program-transform | --program-transfor \
1046  | --program-transfo | --program-transf \
1047  | --program-trans | --program-tran \
1048  | --progr-tra | --program-tr | --program-t)
1049    ac_prev=program_transform_name ;;
1050  -program-transform-name=* | --program-transform-name=* \
1051  | --program-transform-nam=* | --program-transform-na=* \
1052  | --program-transform-n=* | --program-transform-=* \
1053  | --program-transform=* | --program-transfor=* \
1054  | --program-transfo=* | --program-transf=* \
1055  | --program-trans=* | --program-tran=* \
1056  | --progr-tra=* | --program-tr=* | --program-t=*)
1057    program_transform_name=$ac_optarg ;;
1058
1059  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1060    ac_prev=pdfdir ;;
1061  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1062    pdfdir=$ac_optarg ;;
1063
1064  -psdir | --psdir | --psdi | --psd | --ps)
1065    ac_prev=psdir ;;
1066  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1067    psdir=$ac_optarg ;;
1068
1069  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1070  | -silent | --silent | --silen | --sile | --sil)
1071    silent=yes ;;
1072
1073  -runstatedir | --runstatedir | --runstatedi | --runstated \
1074  | --runstate | --runstat | --runsta | --runst | --runs \
1075  | --run | --ru | --r)
1076    ac_prev=runstatedir ;;
1077  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1078  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1079  | --run=* | --ru=* | --r=*)
1080    runstatedir=$ac_optarg ;;
1081
1082  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1083    ac_prev=sbindir ;;
1084  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1085  | --sbi=* | --sb=*)
1086    sbindir=$ac_optarg ;;
1087
1088  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1089  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1090  | --sharedst | --shareds | --shared | --share | --shar \
1091  | --sha | --sh)
1092    ac_prev=sharedstatedir ;;
1093  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1094  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1095  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1096  | --sha=* | --sh=*)
1097    sharedstatedir=$ac_optarg ;;
1098
1099  -site | --site | --sit)
1100    ac_prev=site ;;
1101  -site=* | --site=* | --sit=*)
1102    site=$ac_optarg ;;
1103
1104  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1105    ac_prev=srcdir ;;
1106  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1107    srcdir=$ac_optarg ;;
1108
1109  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1110  | --syscon | --sysco | --sysc | --sys | --sy)
1111    ac_prev=sysconfdir ;;
1112  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1113  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1114    sysconfdir=$ac_optarg ;;
1115
1116  -target | --target | --targe | --targ | --tar | --ta | --t)
1117    ac_prev=target_alias ;;
1118  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1119    target_alias=$ac_optarg ;;
1120
1121  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1122    verbose=yes ;;
1123
1124  -version | --version | --versio | --versi | --vers | -V)
1125    ac_init_version=: ;;
1126
1127  -with-* | --with-*)
1128    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1129    # Reject names that are not valid shell variable names.
1130    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1131      as_fn_error $? "invalid package name: $ac_useropt"
1132    ac_useropt_orig=$ac_useropt
1133    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1134    case $ac_user_opts in
1135      *"
1136"with_$ac_useropt"
1137"*) ;;
1138      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1139	 ac_unrecognized_sep=', ';;
1140    esac
1141    eval with_$ac_useropt=\$ac_optarg ;;
1142
1143  -without-* | --without-*)
1144    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1145    # Reject names that are not valid shell variable names.
1146    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1147      as_fn_error $? "invalid package name: $ac_useropt"
1148    ac_useropt_orig=$ac_useropt
1149    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1150    case $ac_user_opts in
1151      *"
1152"with_$ac_useropt"
1153"*) ;;
1154      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1155	 ac_unrecognized_sep=', ';;
1156    esac
1157    eval with_$ac_useropt=no ;;
1158
1159  --x)
1160    # Obsolete; use --with-x.
1161    with_x=yes ;;
1162
1163  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1164  | --x-incl | --x-inc | --x-in | --x-i)
1165    ac_prev=x_includes ;;
1166  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1167  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1168    x_includes=$ac_optarg ;;
1169
1170  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1171  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1172    ac_prev=x_libraries ;;
1173  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1174  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1175    x_libraries=$ac_optarg ;;
1176
1177  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1178Try \`$0 --help' for more information"
1179    ;;
1180
1181  *=*)
1182    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1183    # Reject names that are not valid shell variable names.
1184    case $ac_envvar in #(
1185      '' | [0-9]* | *[!_$as_cr_alnum]* )
1186      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1187    esac
1188    eval $ac_envvar=\$ac_optarg
1189    export $ac_envvar ;;
1190
1191  *)
1192    # FIXME: should be removed in autoconf 3.0.
1193    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1194    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1195      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1196    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1197    ;;
1198
1199  esac
1200done
1201
1202if test -n "$ac_prev"; then
1203  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1204  as_fn_error $? "missing argument to $ac_option"
1205fi
1206
1207if test -n "$ac_unrecognized_opts"; then
1208  case $enable_option_checking in
1209    no) ;;
1210    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1211    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1212  esac
1213fi
1214
1215# Check all directory arguments for consistency.
1216for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1217		datadir sysconfdir sharedstatedir localstatedir includedir \
1218		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1219		libdir localedir mandir runstatedir
1220do
1221  eval ac_val=\$$ac_var
1222  # Remove trailing slashes.
1223  case $ac_val in
1224    */ )
1225      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1226      eval $ac_var=\$ac_val;;
1227  esac
1228  # Be sure to have absolute directory names.
1229  case $ac_val in
1230    [\\/$]* | ?:[\\/]* )  continue;;
1231    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1232  esac
1233  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1234done
1235
1236# There might be people who depend on the old broken behavior: `$host'
1237# used to hold the argument of --host etc.
1238# FIXME: To remove some day.
1239build=$build_alias
1240host=$host_alias
1241target=$target_alias
1242
1243# FIXME: To remove some day.
1244if test "x$host_alias" != x; then
1245  if test "x$build_alias" = x; then
1246    cross_compiling=maybe
1247  elif test "x$build_alias" != "x$host_alias"; then
1248    cross_compiling=yes
1249  fi
1250fi
1251
1252ac_tool_prefix=
1253test -n "$host_alias" && ac_tool_prefix=$host_alias-
1254
1255test "$silent" = yes && exec 6>/dev/null
1256
1257
1258ac_pwd=`pwd` && test -n "$ac_pwd" &&
1259ac_ls_di=`ls -di .` &&
1260ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1261  as_fn_error $? "working directory cannot be determined"
1262test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1263  as_fn_error $? "pwd does not report name of working directory"
1264
1265
1266# Find the source files, if location was not specified.
1267if test -z "$srcdir"; then
1268  ac_srcdir_defaulted=yes
1269  # Try the directory containing this script, then the parent directory.
1270  ac_confdir=`$as_dirname -- "$as_myself" ||
1271$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1272	 X"$as_myself" : 'X\(//\)[^/]' \| \
1273	 X"$as_myself" : 'X\(//\)$' \| \
1274	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1275$as_echo X"$as_myself" |
1276    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1277	    s//\1/
1278	    q
1279	  }
1280	  /^X\(\/\/\)[^/].*/{
1281	    s//\1/
1282	    q
1283	  }
1284	  /^X\(\/\/\)$/{
1285	    s//\1/
1286	    q
1287	  }
1288	  /^X\(\/\).*/{
1289	    s//\1/
1290	    q
1291	  }
1292	  s/.*/./; q'`
1293  srcdir=$ac_confdir
1294  if test ! -r "$srcdir/$ac_unique_file"; then
1295    srcdir=..
1296  fi
1297else
1298  ac_srcdir_defaulted=no
1299fi
1300if test ! -r "$srcdir/$ac_unique_file"; then
1301  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1302  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1303fi
1304ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1305ac_abs_confdir=`(
1306	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1307	pwd)`
1308# When building in place, set srcdir=.
1309if test "$ac_abs_confdir" = "$ac_pwd"; then
1310  srcdir=.
1311fi
1312# Remove unnecessary trailing slashes from srcdir.
1313# Double slashes in file names in object file debugging info
1314# mess up M-x gdb in Emacs.
1315case $srcdir in
1316*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1317esac
1318for ac_var in $ac_precious_vars; do
1319  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1320  eval ac_env_${ac_var}_value=\$${ac_var}
1321  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1322  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1323done
1324
1325#
1326# Report the --help message.
1327#
1328if test "$ac_init_help" = "long"; then
1329  # Omit some internal or obsolete options to make the list less imposing.
1330  # This message is too long to be a string in the A/UX 3.1 sh.
1331  cat <<_ACEOF
1332\`configure' configures pcap 1.10.1 to adapt to many kinds of systems.
1333
1334Usage: $0 [OPTION]... [VAR=VALUE]...
1335
1336To assign environment variables (e.g., CC, CFLAGS...), specify them as
1337VAR=VALUE.  See below for descriptions of some of the useful variables.
1338
1339Defaults for the options are specified in brackets.
1340
1341Configuration:
1342  -h, --help              display this help and exit
1343      --help=short        display options specific to this package
1344      --help=recursive    display the short help of all the included packages
1345  -V, --version           display version information and exit
1346  -q, --quiet, --silent   do not print \`checking ...' messages
1347      --cache-file=FILE   cache test results in FILE [disabled]
1348  -C, --config-cache      alias for \`--cache-file=config.cache'
1349  -n, --no-create         do not create output files
1350      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1351
1352Installation directories:
1353  --prefix=PREFIX         install architecture-independent files in PREFIX
1354                          [$ac_default_prefix]
1355  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1356                          [PREFIX]
1357
1358By default, \`make install' will install all the files in
1359\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1360an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1361for instance \`--prefix=\$HOME'.
1362
1363For better control, use the options below.
1364
1365Fine tuning of the installation directories:
1366  --bindir=DIR            user executables [EPREFIX/bin]
1367  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1368  --libexecdir=DIR        program executables [EPREFIX/libexec]
1369  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1370  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1371  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1372  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1373  --libdir=DIR            object code libraries [EPREFIX/lib]
1374  --includedir=DIR        C header files [PREFIX/include]
1375  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1376  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1377  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1378  --infodir=DIR           info documentation [DATAROOTDIR/info]
1379  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1380  --mandir=DIR            man documentation [DATAROOTDIR/man]
1381  --docdir=DIR            documentation root [DATAROOTDIR/doc/pcap]
1382  --htmldir=DIR           html documentation [DOCDIR]
1383  --dvidir=DIR            dvi documentation [DOCDIR]
1384  --pdfdir=DIR            pdf documentation [DOCDIR]
1385  --psdir=DIR             ps documentation [DOCDIR]
1386_ACEOF
1387
1388  cat <<\_ACEOF
1389
1390System types:
1391  --build=BUILD     configure for building on BUILD [guessed]
1392  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1393  --target=TARGET   configure for building compilers for TARGET [HOST]
1394_ACEOF
1395fi
1396
1397if test -n "$ac_init_help"; then
1398  case $ac_init_help in
1399     short | recursive ) echo "Configuration of pcap 1.10.1:";;
1400   esac
1401  cat <<\_ACEOF
1402
1403Optional Features:
1404  --disable-option-checking  ignore unrecognized --enable/--with options
1405  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1406  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1407  --disable-largefile     omit support for large files
1408  --disable-protochain    disable \"protochain\" insn
1409  --enable-ipv6           build IPv6-capable version [default=yes]
1410  --enable-remote         enable remote packet capture [default=no]
1411  --disable-remote        disable remote packet capture
1412  --enable-optimizer-dbg  build optimizer debugging code
1413  --enable-yydebug        build parser debugging code
1414  --disable-universal     don't build universal on macOS
1415  --enable-shared         build shared libraries [default=yes, if support
1416                          available]
1417  --enable-usb            enable Linux usbmon USB capture support
1418                          [default=yes, if support available]
1419  --enable-netmap         enable netmap support [default=yes, if support
1420                          available]
1421  --enable-bluetooth      enable Bluetooth support [default=yes, if support
1422                          available]
1423  --enable-dbus           enable D-Bus capture support [default=yes, if
1424                          support available]
1425  --enable-rdma           enable RDMA capture support [default=yes, if support
1426                          available]
1427
1428Optional Packages:
1429  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1430  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1431  --without-gcc           don't use gcc
1432  --with-pcap=TYPE        use packet capture TYPE
1433  --without-libnl         disable libnl support [default=yes, on Linux, if
1434                          present]
1435  --with-dag[=DIR]        include Endace DAG support (located in directory
1436                          DIR, if supplied). [default=yes, if present]
1437  --with-dag-includes=IDIR
1438                          Endace DAG include directory, if not DIR/include
1439  --with-dag-libraries=LDIR
1440                          Endace DAG library directory, if not DIR/lib
1441  --with-septel[=DIR]     include Septel support (located in directory DIR, if
1442                          supplied). [default=yes, if present]
1443  --with-snf[=DIR]        include Myricom SNF support (located in directory
1444                          DIR, if supplied). [default=yes, if present]
1445  --with-snf-includes=IDIR
1446                          Myricom SNF include directory, if not DIR/include
1447  --with-snf-libraries=LDIR
1448                          Myricom SNF library directory, if not DIR/lib
1449  --with-turbocap[=DIR]   include Riverbed TurboCap support (located in
1450                          directory DIR, if supplied). [default=yes, if
1451                          present]
1452  --with-dpdk[=DIR]       include DPDK support (located in directory DIR, if
1453                          supplied). [default=yes, if present]
1454
1455Some influential environment variables:
1456  CC          C compiler command
1457  CFLAGS      C compiler flags
1458  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1459              nonstandard directory <lib dir>
1460  LIBS        libraries to pass to the linker, e.g. -l<library>
1461  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1462              you have headers in a nonstandard directory <include dir>
1463  CXX         C++ compiler command
1464  CXXFLAGS    C++ compiler flags
1465  CPP         C preprocessor
1466
1467Use these variables to override the choices made by `configure' or to help
1468it to find libraries and programs with nonstandard names/locations.
1469
1470Report bugs to the package provider.
1471_ACEOF
1472ac_status=$?
1473fi
1474
1475if test "$ac_init_help" = "recursive"; then
1476  # If there are subdirs, report their specific --help.
1477  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1478    test -d "$ac_dir" ||
1479      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1480      continue
1481    ac_builddir=.
1482
1483case "$ac_dir" in
1484.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1485*)
1486  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1487  # A ".." for each directory in $ac_dir_suffix.
1488  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1489  case $ac_top_builddir_sub in
1490  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1491  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1492  esac ;;
1493esac
1494ac_abs_top_builddir=$ac_pwd
1495ac_abs_builddir=$ac_pwd$ac_dir_suffix
1496# for backward compatibility:
1497ac_top_builddir=$ac_top_build_prefix
1498
1499case $srcdir in
1500  .)  # We are building in place.
1501    ac_srcdir=.
1502    ac_top_srcdir=$ac_top_builddir_sub
1503    ac_abs_top_srcdir=$ac_pwd ;;
1504  [\\/]* | ?:[\\/]* )  # Absolute name.
1505    ac_srcdir=$srcdir$ac_dir_suffix;
1506    ac_top_srcdir=$srcdir
1507    ac_abs_top_srcdir=$srcdir ;;
1508  *) # Relative name.
1509    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1510    ac_top_srcdir=$ac_top_build_prefix$srcdir
1511    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1512esac
1513ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1514
1515    cd "$ac_dir" || { ac_status=$?; continue; }
1516    # Check for guested configure.
1517    if test -f "$ac_srcdir/configure.gnu"; then
1518      echo &&
1519      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1520    elif test -f "$ac_srcdir/configure"; then
1521      echo &&
1522      $SHELL "$ac_srcdir/configure" --help=recursive
1523    else
1524      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1525    fi || ac_status=$?
1526    cd "$ac_pwd" || { ac_status=$?; break; }
1527  done
1528fi
1529
1530test -n "$ac_init_help" && exit $ac_status
1531if $ac_init_version; then
1532  cat <<\_ACEOF
1533pcap configure 1.10.1
1534generated by GNU Autoconf 2.69
1535
1536Copyright (C) 2012 Free Software Foundation, Inc.
1537This configure script is free software; the Free Software Foundation
1538gives unlimited permission to copy, distribute and modify it.
1539_ACEOF
1540  exit
1541fi
1542
1543## ------------------------ ##
1544## Autoconf initialization. ##
1545## ------------------------ ##
1546
1547# ac_fn_c_try_compile LINENO
1548# --------------------------
1549# Try to compile conftest.$ac_ext, and return whether this succeeded.
1550ac_fn_c_try_compile ()
1551{
1552  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1553  rm -f conftest.$ac_objext
1554  if { { ac_try="$ac_compile"
1555case "(($ac_try" in
1556  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1557  *) ac_try_echo=$ac_try;;
1558esac
1559eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1560$as_echo "$ac_try_echo"; } >&5
1561  (eval "$ac_compile") 2>conftest.err
1562  ac_status=$?
1563  if test -s conftest.err; then
1564    grep -v '^ *+' conftest.err >conftest.er1
1565    cat conftest.er1 >&5
1566    mv -f conftest.er1 conftest.err
1567  fi
1568  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1569  test $ac_status = 0; } && {
1570	 test -z "$ac_c_werror_flag" ||
1571	 test ! -s conftest.err
1572       } && test -s conftest.$ac_objext; then :
1573  ac_retval=0
1574else
1575  $as_echo "$as_me: failed program was:" >&5
1576sed 's/^/| /' conftest.$ac_ext >&5
1577
1578	ac_retval=1
1579fi
1580  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1581  as_fn_set_status $ac_retval
1582
1583} # ac_fn_c_try_compile
1584
1585# ac_fn_cxx_try_compile LINENO
1586# ----------------------------
1587# Try to compile conftest.$ac_ext, and return whether this succeeded.
1588ac_fn_cxx_try_compile ()
1589{
1590  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1591  rm -f conftest.$ac_objext
1592  if { { ac_try="$ac_compile"
1593case "(($ac_try" in
1594  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1595  *) ac_try_echo=$ac_try;;
1596esac
1597eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1598$as_echo "$ac_try_echo"; } >&5
1599  (eval "$ac_compile") 2>conftest.err
1600  ac_status=$?
1601  if test -s conftest.err; then
1602    grep -v '^ *+' conftest.err >conftest.er1
1603    cat conftest.er1 >&5
1604    mv -f conftest.er1 conftest.err
1605  fi
1606  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1607  test $ac_status = 0; } && {
1608	 test -z "$ac_cxx_werror_flag" ||
1609	 test ! -s conftest.err
1610       } && test -s conftest.$ac_objext; then :
1611  ac_retval=0
1612else
1613  $as_echo "$as_me: failed program was:" >&5
1614sed 's/^/| /' conftest.$ac_ext >&5
1615
1616	ac_retval=1
1617fi
1618  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1619  as_fn_set_status $ac_retval
1620
1621} # ac_fn_cxx_try_compile
1622
1623# ac_fn_c_try_cpp LINENO
1624# ----------------------
1625# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1626ac_fn_c_try_cpp ()
1627{
1628  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1629  if { { ac_try="$ac_cpp conftest.$ac_ext"
1630case "(($ac_try" in
1631  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1632  *) ac_try_echo=$ac_try;;
1633esac
1634eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1635$as_echo "$ac_try_echo"; } >&5
1636  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1637  ac_status=$?
1638  if test -s conftest.err; then
1639    grep -v '^ *+' conftest.err >conftest.er1
1640    cat conftest.er1 >&5
1641    mv -f conftest.er1 conftest.err
1642  fi
1643  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1644  test $ac_status = 0; } > conftest.i && {
1645	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1646	 test ! -s conftest.err
1647       }; then :
1648  ac_retval=0
1649else
1650  $as_echo "$as_me: failed program was:" >&5
1651sed 's/^/| /' conftest.$ac_ext >&5
1652
1653    ac_retval=1
1654fi
1655  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1656  as_fn_set_status $ac_retval
1657
1658} # ac_fn_c_try_cpp
1659
1660# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1661# -------------------------------------------------------
1662# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1663# the include files in INCLUDES and setting the cache variable VAR
1664# accordingly.
1665ac_fn_c_check_header_mongrel ()
1666{
1667  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1668  if eval \${$3+:} false; then :
1669  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1670$as_echo_n "checking for $2... " >&6; }
1671if eval \${$3+:} false; then :
1672  $as_echo_n "(cached) " >&6
1673fi
1674eval ac_res=\$$3
1675	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1676$as_echo "$ac_res" >&6; }
1677else
1678  # Is the header compilable?
1679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1680$as_echo_n "checking $2 usability... " >&6; }
1681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1682/* end confdefs.h.  */
1683$4
1684#include <$2>
1685_ACEOF
1686if ac_fn_c_try_compile "$LINENO"; then :
1687  ac_header_compiler=yes
1688else
1689  ac_header_compiler=no
1690fi
1691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1693$as_echo "$ac_header_compiler" >&6; }
1694
1695# Is the header present?
1696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1697$as_echo_n "checking $2 presence... " >&6; }
1698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1699/* end confdefs.h.  */
1700#include <$2>
1701_ACEOF
1702if ac_fn_c_try_cpp "$LINENO"; then :
1703  ac_header_preproc=yes
1704else
1705  ac_header_preproc=no
1706fi
1707rm -f conftest.err conftest.i conftest.$ac_ext
1708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1709$as_echo "$ac_header_preproc" >&6; }
1710
1711# So?  What about this header?
1712case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1713  yes:no: )
1714    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1715$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1716    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1717$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1718    ;;
1719  no:yes:* )
1720    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1721$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1722    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1723$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1724    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1725$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1726    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1727$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1728    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1729$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1730    ;;
1731esac
1732  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1733$as_echo_n "checking for $2... " >&6; }
1734if eval \${$3+:} false; then :
1735  $as_echo_n "(cached) " >&6
1736else
1737  eval "$3=\$ac_header_compiler"
1738fi
1739eval ac_res=\$$3
1740	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1741$as_echo "$ac_res" >&6; }
1742fi
1743  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1744
1745} # ac_fn_c_check_header_mongrel
1746
1747# ac_fn_c_try_run LINENO
1748# ----------------------
1749# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1750# that executables *can* be run.
1751ac_fn_c_try_run ()
1752{
1753  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1754  if { { ac_try="$ac_link"
1755case "(($ac_try" in
1756  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1757  *) ac_try_echo=$ac_try;;
1758esac
1759eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1760$as_echo "$ac_try_echo"; } >&5
1761  (eval "$ac_link") 2>&5
1762  ac_status=$?
1763  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1764  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1765  { { case "(($ac_try" in
1766  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1767  *) ac_try_echo=$ac_try;;
1768esac
1769eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1770$as_echo "$ac_try_echo"; } >&5
1771  (eval "$ac_try") 2>&5
1772  ac_status=$?
1773  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1774  test $ac_status = 0; }; }; then :
1775  ac_retval=0
1776else
1777  $as_echo "$as_me: program exited with status $ac_status" >&5
1778       $as_echo "$as_me: failed program was:" >&5
1779sed 's/^/| /' conftest.$ac_ext >&5
1780
1781       ac_retval=$ac_status
1782fi
1783  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1784  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1785  as_fn_set_status $ac_retval
1786
1787} # ac_fn_c_try_run
1788
1789# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1790# -------------------------------------------------------
1791# Tests whether HEADER exists and can be compiled using the include files in
1792# INCLUDES, setting the cache variable VAR accordingly.
1793ac_fn_c_check_header_compile ()
1794{
1795  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1797$as_echo_n "checking for $2... " >&6; }
1798if eval \${$3+:} false; then :
1799  $as_echo_n "(cached) " >&6
1800else
1801  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1802/* end confdefs.h.  */
1803$4
1804#include <$2>
1805_ACEOF
1806if ac_fn_c_try_compile "$LINENO"; then :
1807  eval "$3=yes"
1808else
1809  eval "$3=no"
1810fi
1811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1812fi
1813eval ac_res=\$$3
1814	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1815$as_echo "$ac_res" >&6; }
1816  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1817
1818} # ac_fn_c_check_header_compile
1819
1820# ac_fn_c_check_func LINENO FUNC VAR
1821# ----------------------------------
1822# Tests whether FUNC exists, setting the cache variable VAR accordingly
1823ac_fn_c_check_func ()
1824{
1825  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1826  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1827$as_echo_n "checking for $2... " >&6; }
1828if eval \${$3+:} false; then :
1829  $as_echo_n "(cached) " >&6
1830else
1831  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832/* end confdefs.h.  */
1833/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1834   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1835#define $2 innocuous_$2
1836
1837/* System header to define __stub macros and hopefully few prototypes,
1838    which can conflict with char $2 (); below.
1839    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1840    <limits.h> exists even on freestanding compilers.  */
1841
1842#ifdef __STDC__
1843# include <limits.h>
1844#else
1845# include <assert.h>
1846#endif
1847
1848#undef $2
1849
1850/* Override any GCC internal prototype to avoid an error.
1851   Use char because int might match the return type of a GCC
1852   builtin and then its argument prototype would still apply.  */
1853#ifdef __cplusplus
1854extern "C"
1855#endif
1856char $2 ();
1857/* The GNU C library defines this for functions which it implements
1858    to always fail with ENOSYS.  Some functions are actually named
1859    something starting with __ and the normal name is an alias.  */
1860#if defined __stub_$2 || defined __stub___$2
1861choke me
1862#endif
1863
1864int
1865main ()
1866{
1867return $2 ();
1868  ;
1869  return 0;
1870}
1871_ACEOF
1872if ac_fn_c_try_link "$LINENO"; then :
1873  eval "$3=yes"
1874else
1875  eval "$3=no"
1876fi
1877rm -f core conftest.err conftest.$ac_objext \
1878    conftest$ac_exeext conftest.$ac_ext
1879fi
1880eval ac_res=\$$3
1881	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1882$as_echo "$ac_res" >&6; }
1883  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1884
1885} # ac_fn_c_check_func
1886
1887# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1888# ---------------------------------------------
1889# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1890# accordingly.
1891ac_fn_c_check_decl ()
1892{
1893  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1894  as_decl_name=`echo $2|sed 's/ *(.*//'`
1895  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1896  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1897$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1898if eval \${$3+:} false; then :
1899  $as_echo_n "(cached) " >&6
1900else
1901  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1902/* end confdefs.h.  */
1903$4
1904int
1905main ()
1906{
1907#ifndef $as_decl_name
1908#ifdef __cplusplus
1909  (void) $as_decl_use;
1910#else
1911  (void) $as_decl_name;
1912#endif
1913#endif
1914
1915  ;
1916  return 0;
1917}
1918_ACEOF
1919if ac_fn_c_try_compile "$LINENO"; then :
1920  eval "$3=yes"
1921else
1922  eval "$3=no"
1923fi
1924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1925fi
1926eval ac_res=\$$3
1927	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1928$as_echo "$ac_res" >&6; }
1929  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1930
1931} # ac_fn_c_check_decl
1932
1933# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1934# -------------------------------------------
1935# Tests whether TYPE exists after having included INCLUDES, setting cache
1936# variable VAR accordingly.
1937ac_fn_c_check_type ()
1938{
1939  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1941$as_echo_n "checking for $2... " >&6; }
1942if eval \${$3+:} false; then :
1943  $as_echo_n "(cached) " >&6
1944else
1945  eval "$3=no"
1946  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947/* end confdefs.h.  */
1948$4
1949int
1950main ()
1951{
1952if (sizeof ($2))
1953	 return 0;
1954  ;
1955  return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h.  */
1961$4
1962int
1963main ()
1964{
1965if (sizeof (($2)))
1966	    return 0;
1967  ;
1968  return 0;
1969}
1970_ACEOF
1971if ac_fn_c_try_compile "$LINENO"; then :
1972
1973else
1974  eval "$3=yes"
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1979fi
1980eval ac_res=\$$3
1981	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982$as_echo "$ac_res" >&6; }
1983  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1984
1985} # ac_fn_c_check_type
1986
1987# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1988# ----------------------------------------------------
1989# Tries to find if the field MEMBER exists in type AGGR, after including
1990# INCLUDES, setting cache variable VAR accordingly.
1991ac_fn_c_check_member ()
1992{
1993  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1995$as_echo_n "checking for $2.$3... " >&6; }
1996if eval \${$4+:} false; then :
1997  $as_echo_n "(cached) " >&6
1998else
1999  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2000/* end confdefs.h.  */
2001$5
2002int
2003main ()
2004{
2005static $2 ac_aggr;
2006if (ac_aggr.$3)
2007return 0;
2008  ;
2009  return 0;
2010}
2011_ACEOF
2012if ac_fn_c_try_compile "$LINENO"; then :
2013  eval "$4=yes"
2014else
2015  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016/* end confdefs.h.  */
2017$5
2018int
2019main ()
2020{
2021static $2 ac_aggr;
2022if (sizeof ac_aggr.$3)
2023return 0;
2024  ;
2025  return 0;
2026}
2027_ACEOF
2028if ac_fn_c_try_compile "$LINENO"; then :
2029  eval "$4=yes"
2030else
2031  eval "$4=no"
2032fi
2033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2034fi
2035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2036fi
2037eval ac_res=\$$4
2038	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2039$as_echo "$ac_res" >&6; }
2040  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2041
2042} # ac_fn_c_check_member
2043cat >config.log <<_ACEOF
2044This file contains any messages produced by compilers while
2045running configure, to aid debugging if configure makes a mistake.
2046
2047It was created by pcap $as_me 1.10.1, which was
2048generated by GNU Autoconf 2.69.  Invocation command line was
2049
2050  $ $0 $@
2051
2052_ACEOF
2053exec 5>>config.log
2054{
2055cat <<_ASUNAME
2056## --------- ##
2057## Platform. ##
2058## --------- ##
2059
2060hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2061uname -m = `(uname -m) 2>/dev/null || echo unknown`
2062uname -r = `(uname -r) 2>/dev/null || echo unknown`
2063uname -s = `(uname -s) 2>/dev/null || echo unknown`
2064uname -v = `(uname -v) 2>/dev/null || echo unknown`
2065
2066/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2067/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2068
2069/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2070/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2071/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2072/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2073/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2074/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2075/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2076
2077_ASUNAME
2078
2079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2080for as_dir in $PATH
2081do
2082  IFS=$as_save_IFS
2083  test -z "$as_dir" && as_dir=.
2084    $as_echo "PATH: $as_dir"
2085  done
2086IFS=$as_save_IFS
2087
2088} >&5
2089
2090cat >&5 <<_ACEOF
2091
2092
2093## ----------- ##
2094## Core tests. ##
2095## ----------- ##
2096
2097_ACEOF
2098
2099
2100# Keep a trace of the command line.
2101# Strip out --no-create and --no-recursion so they do not pile up.
2102# Strip out --silent because we don't want to record it for future runs.
2103# Also quote any args containing shell meta-characters.
2104# Make two passes to allow for proper duplicate-argument suppression.
2105ac_configure_args=
2106ac_configure_args0=
2107ac_configure_args1=
2108ac_must_keep_next=false
2109for ac_pass in 1 2
2110do
2111  for ac_arg
2112  do
2113    case $ac_arg in
2114    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2115    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2116    | -silent | --silent | --silen | --sile | --sil)
2117      continue ;;
2118    *\'*)
2119      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2120    esac
2121    case $ac_pass in
2122    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2123    2)
2124      as_fn_append ac_configure_args1 " '$ac_arg'"
2125      if test $ac_must_keep_next = true; then
2126	ac_must_keep_next=false # Got value, back to normal.
2127      else
2128	case $ac_arg in
2129	  *=* | --config-cache | -C | -disable-* | --disable-* \
2130	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2131	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2132	  | -with-* | --with-* | -without-* | --without-* | --x)
2133	    case "$ac_configure_args0 " in
2134	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2135	    esac
2136	    ;;
2137	  -* ) ac_must_keep_next=true ;;
2138	esac
2139      fi
2140      as_fn_append ac_configure_args " '$ac_arg'"
2141      ;;
2142    esac
2143  done
2144done
2145{ ac_configure_args0=; unset ac_configure_args0;}
2146{ ac_configure_args1=; unset ac_configure_args1;}
2147
2148# When interrupted or exit'd, cleanup temporary files, and complete
2149# config.log.  We remove comments because anyway the quotes in there
2150# would cause problems or look ugly.
2151# WARNING: Use '\'' to represent an apostrophe within the trap.
2152# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2153trap 'exit_status=$?
2154  # Save into config.log some information that might help in debugging.
2155  {
2156    echo
2157
2158    $as_echo "## ---------------- ##
2159## Cache variables. ##
2160## ---------------- ##"
2161    echo
2162    # The following way of writing the cache mishandles newlines in values,
2163(
2164  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2165    eval ac_val=\$$ac_var
2166    case $ac_val in #(
2167    *${as_nl}*)
2168      case $ac_var in #(
2169      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2170$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2171      esac
2172      case $ac_var in #(
2173      _ | IFS | as_nl) ;; #(
2174      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2175      *) { eval $ac_var=; unset $ac_var;} ;;
2176      esac ;;
2177    esac
2178  done
2179  (set) 2>&1 |
2180    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2181    *${as_nl}ac_space=\ *)
2182      sed -n \
2183	"s/'\''/'\''\\\\'\'''\''/g;
2184	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2185      ;; #(
2186    *)
2187      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2188      ;;
2189    esac |
2190    sort
2191)
2192    echo
2193
2194    $as_echo "## ----------------- ##
2195## Output variables. ##
2196## ----------------- ##"
2197    echo
2198    for ac_var in $ac_subst_vars
2199    do
2200      eval ac_val=\$$ac_var
2201      case $ac_val in
2202      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2203      esac
2204      $as_echo "$ac_var='\''$ac_val'\''"
2205    done | sort
2206    echo
2207
2208    if test -n "$ac_subst_files"; then
2209      $as_echo "## ------------------- ##
2210## File substitutions. ##
2211## ------------------- ##"
2212      echo
2213      for ac_var in $ac_subst_files
2214      do
2215	eval ac_val=\$$ac_var
2216	case $ac_val in
2217	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2218	esac
2219	$as_echo "$ac_var='\''$ac_val'\''"
2220      done | sort
2221      echo
2222    fi
2223
2224    if test -s confdefs.h; then
2225      $as_echo "## ----------- ##
2226## confdefs.h. ##
2227## ----------- ##"
2228      echo
2229      cat confdefs.h
2230      echo
2231    fi
2232    test "$ac_signal" != 0 &&
2233      $as_echo "$as_me: caught signal $ac_signal"
2234    $as_echo "$as_me: exit $exit_status"
2235  } >&5
2236  rm -f core *.core core.conftest.* &&
2237    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2238    exit $exit_status
2239' 0
2240for ac_signal in 1 2 13 15; do
2241  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2242done
2243ac_signal=0
2244
2245# confdefs.h avoids OS command line length limits that DEFS can exceed.
2246rm -f -r conftest* confdefs.h
2247
2248$as_echo "/* confdefs.h */" > confdefs.h
2249
2250# Predefined preprocessor variables.
2251
2252cat >>confdefs.h <<_ACEOF
2253#define PACKAGE_NAME "$PACKAGE_NAME"
2254_ACEOF
2255
2256cat >>confdefs.h <<_ACEOF
2257#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2258_ACEOF
2259
2260cat >>confdefs.h <<_ACEOF
2261#define PACKAGE_VERSION "$PACKAGE_VERSION"
2262_ACEOF
2263
2264cat >>confdefs.h <<_ACEOF
2265#define PACKAGE_STRING "$PACKAGE_STRING"
2266_ACEOF
2267
2268cat >>confdefs.h <<_ACEOF
2269#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2270_ACEOF
2271
2272cat >>confdefs.h <<_ACEOF
2273#define PACKAGE_URL "$PACKAGE_URL"
2274_ACEOF
2275
2276
2277# Let the site file select an alternate cache file if it wants to.
2278# Prefer an explicitly selected file to automatically selected ones.
2279ac_site_file1=NONE
2280ac_site_file2=NONE
2281if test -n "$CONFIG_SITE"; then
2282  # We do not want a PATH search for config.site.
2283  case $CONFIG_SITE in #((
2284    -*)  ac_site_file1=./$CONFIG_SITE;;
2285    */*) ac_site_file1=$CONFIG_SITE;;
2286    *)   ac_site_file1=./$CONFIG_SITE;;
2287  esac
2288elif test "x$prefix" != xNONE; then
2289  ac_site_file1=$prefix/share/config.site
2290  ac_site_file2=$prefix/etc/config.site
2291else
2292  ac_site_file1=$ac_default_prefix/share/config.site
2293  ac_site_file2=$ac_default_prefix/etc/config.site
2294fi
2295for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2296do
2297  test "x$ac_site_file" = xNONE && continue
2298  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2299    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2300$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2301    sed 's/^/| /' "$ac_site_file" >&5
2302    . "$ac_site_file" \
2303      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2304$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2305as_fn_error $? "failed to load site script $ac_site_file
2306See \`config.log' for more details" "$LINENO" 5; }
2307  fi
2308done
2309
2310if test -r "$cache_file"; then
2311  # Some versions of bash will fail to source /dev/null (special files
2312  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2313  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2314    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2315$as_echo "$as_me: loading cache $cache_file" >&6;}
2316    case $cache_file in
2317      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2318      *)                      . "./$cache_file";;
2319    esac
2320  fi
2321else
2322  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2323$as_echo "$as_me: creating cache $cache_file" >&6;}
2324  >$cache_file
2325fi
2326
2327# Check that the precious variables saved in the cache have kept the same
2328# value.
2329ac_cache_corrupted=false
2330for ac_var in $ac_precious_vars; do
2331  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2332  eval ac_new_set=\$ac_env_${ac_var}_set
2333  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2334  eval ac_new_val=\$ac_env_${ac_var}_value
2335  case $ac_old_set,$ac_new_set in
2336    set,)
2337      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2338$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2339      ac_cache_corrupted=: ;;
2340    ,set)
2341      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2342$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2343      ac_cache_corrupted=: ;;
2344    ,);;
2345    *)
2346      if test "x$ac_old_val" != "x$ac_new_val"; then
2347	# differences in whitespace do not lead to failure.
2348	ac_old_val_w=`echo x $ac_old_val`
2349	ac_new_val_w=`echo x $ac_new_val`
2350	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2351	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2352$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2353	  ac_cache_corrupted=:
2354	else
2355	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2356$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2357	  eval $ac_var=\$ac_old_val
2358	fi
2359	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2360$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2361	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2362$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2363      fi;;
2364  esac
2365  # Pass precious variables to config.status.
2366  if test "$ac_new_set" = set; then
2367    case $ac_new_val in
2368    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2369    *) ac_arg=$ac_var=$ac_new_val ;;
2370    esac
2371    case " $ac_configure_args " in
2372      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2373      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2374    esac
2375  fi
2376done
2377if $ac_cache_corrupted; then
2378  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2379$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2380  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2381$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2382  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2383fi
2384## -------------------- ##
2385## Main body of script. ##
2386## -------------------- ##
2387
2388ac_ext=c
2389ac_cpp='$CPP $CPPFLAGS'
2390ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2391ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2392ac_compiler_gnu=$ac_cv_c_compiler_gnu
2393
2394
2395
2396
2397
2398ac_aux_dir=
2399for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2400  if test -f "$ac_dir/install-sh"; then
2401    ac_aux_dir=$ac_dir
2402    ac_install_sh="$ac_aux_dir/install-sh -c"
2403    break
2404  elif test -f "$ac_dir/install.sh"; then
2405    ac_aux_dir=$ac_dir
2406    ac_install_sh="$ac_aux_dir/install.sh -c"
2407    break
2408  elif test -f "$ac_dir/shtool"; then
2409    ac_aux_dir=$ac_dir
2410    ac_install_sh="$ac_aux_dir/shtool install -c"
2411    break
2412  fi
2413done
2414if test -z "$ac_aux_dir"; then
2415  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2416fi
2417
2418# These three variables are undocumented and unsupported,
2419# and are intended to be withdrawn in a future Autoconf release.
2420# They can cause serious problems if a builder's source tree is in a directory
2421# whose full name contains unusual characters.
2422ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2423ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2424ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2425
2426
2427# Make sure we can run config.sub.
2428$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2429  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2430
2431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2432$as_echo_n "checking build system type... " >&6; }
2433if ${ac_cv_build+:} false; then :
2434  $as_echo_n "(cached) " >&6
2435else
2436  ac_build_alias=$build_alias
2437test "x$ac_build_alias" = x &&
2438  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2439test "x$ac_build_alias" = x &&
2440  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2441ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2442  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2443
2444fi
2445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2446$as_echo "$ac_cv_build" >&6; }
2447case $ac_cv_build in
2448*-*-*) ;;
2449*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2450esac
2451build=$ac_cv_build
2452ac_save_IFS=$IFS; IFS='-'
2453set x $ac_cv_build
2454shift
2455build_cpu=$1
2456build_vendor=$2
2457shift; shift
2458# Remember, the first character of IFS is used to create $*,
2459# except with old shells:
2460build_os=$*
2461IFS=$ac_save_IFS
2462case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2463
2464
2465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2466$as_echo_n "checking host system type... " >&6; }
2467if ${ac_cv_host+:} false; then :
2468  $as_echo_n "(cached) " >&6
2469else
2470  if test "x$host_alias" = x; then
2471  ac_cv_host=$ac_cv_build
2472else
2473  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2474    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2475fi
2476
2477fi
2478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2479$as_echo "$ac_cv_host" >&6; }
2480case $ac_cv_host in
2481*-*-*) ;;
2482*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2483esac
2484host=$ac_cv_host
2485ac_save_IFS=$IFS; IFS='-'
2486set x $ac_cv_host
2487shift
2488host_cpu=$1
2489host_vendor=$2
2490shift; shift
2491# Remember, the first character of IFS is used to create $*,
2492# except with old shells:
2493host_os=$*
2494IFS=$ac_save_IFS
2495case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2496
2497
2498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2499$as_echo_n "checking target system type... " >&6; }
2500if ${ac_cv_target+:} false; then :
2501  $as_echo_n "(cached) " >&6
2502else
2503  if test "x$target_alias" = x; then
2504  ac_cv_target=$ac_cv_host
2505else
2506  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2507    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
2508fi
2509
2510fi
2511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2512$as_echo "$ac_cv_target" >&6; }
2513case $ac_cv_target in
2514*-*-*) ;;
2515*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
2516esac
2517target=$ac_cv_target
2518ac_save_IFS=$IFS; IFS='-'
2519set x $ac_cv_target
2520shift
2521target_cpu=$1
2522target_vendor=$2
2523shift; shift
2524# Remember, the first character of IFS is used to create $*,
2525# except with old shells:
2526target_os=$*
2527IFS=$ac_save_IFS
2528case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2529
2530
2531# The aliases save the names the user supplied, while $host etc.
2532# will get canonicalized.
2533test -n "$target_alias" &&
2534  test "$program_prefix$program_suffix$program_transform_name" = \
2535    NONENONEs,x,x, &&
2536  program_prefix=${target_alias}-
2537
2538
2539
2540
2541
2542
2543
2544
2545# Check whether --with-gcc was given.
2546if test "${with_gcc+set}" = set; then :
2547  withval=$with_gcc;
2548fi
2549
2550    V_CCOPT=""
2551    if test "${srcdir}" != "." ; then
2552	    V_CCOPT="-I\$(srcdir)"
2553    fi
2554    if test "${CFLAGS+set}" = set; then
2555	    LBL_CFLAGS="$CFLAGS"
2556    fi
2557    if test -z "$CC" ; then
2558	    case "$host_os" in
2559
2560	    bsdi*)
2561		    # Extract the first word of "shlicc2", so it can be a program name with args.
2562set dummy shlicc2; ac_word=$2
2563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2564$as_echo_n "checking for $ac_word... " >&6; }
2565if ${ac_cv_prog_SHLICC2+:} false; then :
2566  $as_echo_n "(cached) " >&6
2567else
2568  if test -n "$SHLICC2"; then
2569  ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test.
2570else
2571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2572for as_dir in $PATH
2573do
2574  IFS=$as_save_IFS
2575  test -z "$as_dir" && as_dir=.
2576    for ac_exec_ext in '' $ac_executable_extensions; do
2577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2578    ac_cv_prog_SHLICC2="yes"
2579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2580    break 2
2581  fi
2582done
2583  done
2584IFS=$as_save_IFS
2585
2586  test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no"
2587fi
2588fi
2589SHLICC2=$ac_cv_prog_SHLICC2
2590if test -n "$SHLICC2"; then
2591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLICC2" >&5
2592$as_echo "$SHLICC2" >&6; }
2593else
2594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2595$as_echo "no" >&6; }
2596fi
2597
2598
2599		    if test $SHLICC2 = yes ; then
2600			    CC=shlicc2
2601			    export CC
2602		    fi
2603		    ;;
2604	    esac
2605    fi
2606    if test -z "$CC" -a "$with_gcc" = no ; then
2607	    CC=cc
2608	    export CC
2609    fi
2610
2611#
2612# We require C99 or later.
2613# Try to get it, which may involve adding compiler flags;
2614# if that fails, give up.
2615#
2616ac_ext=c
2617ac_cpp='$CPP $CPPFLAGS'
2618ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2619ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2620ac_compiler_gnu=$ac_cv_c_compiler_gnu
2621if test -n "$ac_tool_prefix"; then
2622  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2623set dummy ${ac_tool_prefix}gcc; ac_word=$2
2624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2625$as_echo_n "checking for $ac_word... " >&6; }
2626if ${ac_cv_prog_CC+:} false; then :
2627  $as_echo_n "(cached) " >&6
2628else
2629  if test -n "$CC"; then
2630  ac_cv_prog_CC="$CC" # Let the user override the test.
2631else
2632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2633for as_dir in $PATH
2634do
2635  IFS=$as_save_IFS
2636  test -z "$as_dir" && as_dir=.
2637    for ac_exec_ext in '' $ac_executable_extensions; do
2638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2639    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2641    break 2
2642  fi
2643done
2644  done
2645IFS=$as_save_IFS
2646
2647fi
2648fi
2649CC=$ac_cv_prog_CC
2650if test -n "$CC"; then
2651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2652$as_echo "$CC" >&6; }
2653else
2654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2655$as_echo "no" >&6; }
2656fi
2657
2658
2659fi
2660if test -z "$ac_cv_prog_CC"; then
2661  ac_ct_CC=$CC
2662  # Extract the first word of "gcc", so it can be a program name with args.
2663set dummy gcc; ac_word=$2
2664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2665$as_echo_n "checking for $ac_word... " >&6; }
2666if ${ac_cv_prog_ac_ct_CC+:} false; then :
2667  $as_echo_n "(cached) " >&6
2668else
2669  if test -n "$ac_ct_CC"; then
2670  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2671else
2672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2673for as_dir in $PATH
2674do
2675  IFS=$as_save_IFS
2676  test -z "$as_dir" && as_dir=.
2677    for ac_exec_ext in '' $ac_executable_extensions; do
2678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2679    ac_cv_prog_ac_ct_CC="gcc"
2680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2681    break 2
2682  fi
2683done
2684  done
2685IFS=$as_save_IFS
2686
2687fi
2688fi
2689ac_ct_CC=$ac_cv_prog_ac_ct_CC
2690if test -n "$ac_ct_CC"; then
2691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2692$as_echo "$ac_ct_CC" >&6; }
2693else
2694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2695$as_echo "no" >&6; }
2696fi
2697
2698  if test "x$ac_ct_CC" = x; then
2699    CC=""
2700  else
2701    case $cross_compiling:$ac_tool_warned in
2702yes:)
2703{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2704$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2705ac_tool_warned=yes ;;
2706esac
2707    CC=$ac_ct_CC
2708  fi
2709else
2710  CC="$ac_cv_prog_CC"
2711fi
2712
2713if test -z "$CC"; then
2714          if test -n "$ac_tool_prefix"; then
2715    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2716set dummy ${ac_tool_prefix}cc; ac_word=$2
2717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2718$as_echo_n "checking for $ac_word... " >&6; }
2719if ${ac_cv_prog_CC+:} false; then :
2720  $as_echo_n "(cached) " >&6
2721else
2722  if test -n "$CC"; then
2723  ac_cv_prog_CC="$CC" # Let the user override the test.
2724else
2725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2726for as_dir in $PATH
2727do
2728  IFS=$as_save_IFS
2729  test -z "$as_dir" && as_dir=.
2730    for ac_exec_ext in '' $ac_executable_extensions; do
2731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2732    ac_cv_prog_CC="${ac_tool_prefix}cc"
2733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2734    break 2
2735  fi
2736done
2737  done
2738IFS=$as_save_IFS
2739
2740fi
2741fi
2742CC=$ac_cv_prog_CC
2743if test -n "$CC"; then
2744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2745$as_echo "$CC" >&6; }
2746else
2747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2748$as_echo "no" >&6; }
2749fi
2750
2751
2752  fi
2753fi
2754if test -z "$CC"; then
2755  # Extract the first word of "cc", so it can be a program name with args.
2756set dummy cc; ac_word=$2
2757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2758$as_echo_n "checking for $ac_word... " >&6; }
2759if ${ac_cv_prog_CC+:} false; then :
2760  $as_echo_n "(cached) " >&6
2761else
2762  if test -n "$CC"; then
2763  ac_cv_prog_CC="$CC" # Let the user override the test.
2764else
2765  ac_prog_rejected=no
2766as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2767for as_dir in $PATH
2768do
2769  IFS=$as_save_IFS
2770  test -z "$as_dir" && as_dir=.
2771    for ac_exec_ext in '' $ac_executable_extensions; do
2772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2773    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2774       ac_prog_rejected=yes
2775       continue
2776     fi
2777    ac_cv_prog_CC="cc"
2778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2779    break 2
2780  fi
2781done
2782  done
2783IFS=$as_save_IFS
2784
2785if test $ac_prog_rejected = yes; then
2786  # We found a bogon in the path, so make sure we never use it.
2787  set dummy $ac_cv_prog_CC
2788  shift
2789  if test $# != 0; then
2790    # We chose a different compiler from the bogus one.
2791    # However, it has the same basename, so the bogon will be chosen
2792    # first if we set CC to just the basename; use the full file name.
2793    shift
2794    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2795  fi
2796fi
2797fi
2798fi
2799CC=$ac_cv_prog_CC
2800if test -n "$CC"; then
2801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2802$as_echo "$CC" >&6; }
2803else
2804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2805$as_echo "no" >&6; }
2806fi
2807
2808
2809fi
2810if test -z "$CC"; then
2811  if test -n "$ac_tool_prefix"; then
2812  for ac_prog in cl.exe
2813  do
2814    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2815set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2817$as_echo_n "checking for $ac_word... " >&6; }
2818if ${ac_cv_prog_CC+:} false; then :
2819  $as_echo_n "(cached) " >&6
2820else
2821  if test -n "$CC"; then
2822  ac_cv_prog_CC="$CC" # Let the user override the test.
2823else
2824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2825for as_dir in $PATH
2826do
2827  IFS=$as_save_IFS
2828  test -z "$as_dir" && as_dir=.
2829    for ac_exec_ext in '' $ac_executable_extensions; do
2830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2831    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2833    break 2
2834  fi
2835done
2836  done
2837IFS=$as_save_IFS
2838
2839fi
2840fi
2841CC=$ac_cv_prog_CC
2842if test -n "$CC"; then
2843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2844$as_echo "$CC" >&6; }
2845else
2846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2847$as_echo "no" >&6; }
2848fi
2849
2850
2851    test -n "$CC" && break
2852  done
2853fi
2854if test -z "$CC"; then
2855  ac_ct_CC=$CC
2856  for ac_prog in cl.exe
2857do
2858  # Extract the first word of "$ac_prog", so it can be a program name with args.
2859set dummy $ac_prog; ac_word=$2
2860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2861$as_echo_n "checking for $ac_word... " >&6; }
2862if ${ac_cv_prog_ac_ct_CC+:} false; then :
2863  $as_echo_n "(cached) " >&6
2864else
2865  if test -n "$ac_ct_CC"; then
2866  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2867else
2868as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2869for as_dir in $PATH
2870do
2871  IFS=$as_save_IFS
2872  test -z "$as_dir" && as_dir=.
2873    for ac_exec_ext in '' $ac_executable_extensions; do
2874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2875    ac_cv_prog_ac_ct_CC="$ac_prog"
2876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2877    break 2
2878  fi
2879done
2880  done
2881IFS=$as_save_IFS
2882
2883fi
2884fi
2885ac_ct_CC=$ac_cv_prog_ac_ct_CC
2886if test -n "$ac_ct_CC"; then
2887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2888$as_echo "$ac_ct_CC" >&6; }
2889else
2890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2891$as_echo "no" >&6; }
2892fi
2893
2894
2895  test -n "$ac_ct_CC" && break
2896done
2897
2898  if test "x$ac_ct_CC" = x; then
2899    CC=""
2900  else
2901    case $cross_compiling:$ac_tool_warned in
2902yes:)
2903{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2904$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2905ac_tool_warned=yes ;;
2906esac
2907    CC=$ac_ct_CC
2908  fi
2909fi
2910
2911fi
2912
2913
2914test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2915$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2916as_fn_error $? "no acceptable C compiler found in \$PATH
2917See \`config.log' for more details" "$LINENO" 5; }
2918
2919# Provide some information about the compiler.
2920$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2921set X $ac_compile
2922ac_compiler=$2
2923for ac_option in --version -v -V -qversion; do
2924  { { ac_try="$ac_compiler $ac_option >&5"
2925case "(($ac_try" in
2926  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2927  *) ac_try_echo=$ac_try;;
2928esac
2929eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2930$as_echo "$ac_try_echo"; } >&5
2931  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2932  ac_status=$?
2933  if test -s conftest.err; then
2934    sed '10a\
2935... rest of stderr output deleted ...
2936         10q' conftest.err >conftest.er1
2937    cat conftest.er1 >&5
2938  fi
2939  rm -f conftest.er1 conftest.err
2940  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2941  test $ac_status = 0; }
2942done
2943
2944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2945/* end confdefs.h.  */
2946
2947int
2948main ()
2949{
2950
2951  ;
2952  return 0;
2953}
2954_ACEOF
2955ac_clean_files_save=$ac_clean_files
2956ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2957# Try to create an executable without -o first, disregard a.out.
2958# It will help us diagnose broken compilers, and finding out an intuition
2959# of exeext.
2960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2961$as_echo_n "checking whether the C compiler works... " >&6; }
2962ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2963
2964# The possible output files:
2965ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2966
2967ac_rmfiles=
2968for ac_file in $ac_files
2969do
2970  case $ac_file in
2971    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2972    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2973  esac
2974done
2975rm -f $ac_rmfiles
2976
2977if { { ac_try="$ac_link_default"
2978case "(($ac_try" in
2979  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2980  *) ac_try_echo=$ac_try;;
2981esac
2982eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2983$as_echo "$ac_try_echo"; } >&5
2984  (eval "$ac_link_default") 2>&5
2985  ac_status=$?
2986  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2987  test $ac_status = 0; }; then :
2988  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2989# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2990# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2991# so that the user can short-circuit this test for compilers unknown to
2992# Autoconf.
2993for ac_file in $ac_files ''
2994do
2995  test -f "$ac_file" || continue
2996  case $ac_file in
2997    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2998	;;
2999    [ab].out )
3000	# We found the default executable, but exeext='' is most
3001	# certainly right.
3002	break;;
3003    *.* )
3004	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3005	then :; else
3006	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3007	fi
3008	# We set ac_cv_exeext here because the later test for it is not
3009	# safe: cross compilers may not add the suffix if given an `-o'
3010	# argument, so we may need to know it at that point already.
3011	# Even if this section looks crufty: it has the advantage of
3012	# actually working.
3013	break;;
3014    * )
3015	break;;
3016  esac
3017done
3018test "$ac_cv_exeext" = no && ac_cv_exeext=
3019
3020else
3021  ac_file=''
3022fi
3023if test -z "$ac_file"; then :
3024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3025$as_echo "no" >&6; }
3026$as_echo "$as_me: failed program was:" >&5
3027sed 's/^/| /' conftest.$ac_ext >&5
3028
3029{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3030$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3031as_fn_error 77 "C compiler cannot create executables
3032See \`config.log' for more details" "$LINENO" 5; }
3033else
3034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3035$as_echo "yes" >&6; }
3036fi
3037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3038$as_echo_n "checking for C compiler default output file name... " >&6; }
3039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3040$as_echo "$ac_file" >&6; }
3041ac_exeext=$ac_cv_exeext
3042
3043rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3044ac_clean_files=$ac_clean_files_save
3045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3046$as_echo_n "checking for suffix of executables... " >&6; }
3047if { { ac_try="$ac_link"
3048case "(($ac_try" in
3049  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3050  *) ac_try_echo=$ac_try;;
3051esac
3052eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3053$as_echo "$ac_try_echo"; } >&5
3054  (eval "$ac_link") 2>&5
3055  ac_status=$?
3056  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3057  test $ac_status = 0; }; then :
3058  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3059# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3060# work properly (i.e., refer to `conftest.exe'), while it won't with
3061# `rm'.
3062for ac_file in conftest.exe conftest conftest.*; do
3063  test -f "$ac_file" || continue
3064  case $ac_file in
3065    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3066    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3067	  break;;
3068    * ) break;;
3069  esac
3070done
3071else
3072  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3073$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3074as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3075See \`config.log' for more details" "$LINENO" 5; }
3076fi
3077rm -f conftest conftest$ac_cv_exeext
3078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3079$as_echo "$ac_cv_exeext" >&6; }
3080
3081rm -f conftest.$ac_ext
3082EXEEXT=$ac_cv_exeext
3083ac_exeext=$EXEEXT
3084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3085/* end confdefs.h.  */
3086#include <stdio.h>
3087int
3088main ()
3089{
3090FILE *f = fopen ("conftest.out", "w");
3091 return ferror (f) || fclose (f) != 0;
3092
3093  ;
3094  return 0;
3095}
3096_ACEOF
3097ac_clean_files="$ac_clean_files conftest.out"
3098# Check that the compiler produces executables we can run.  If not, either
3099# the compiler is broken, or we cross compile.
3100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3101$as_echo_n "checking whether we are cross compiling... " >&6; }
3102if test "$cross_compiling" != yes; then
3103  { { ac_try="$ac_link"
3104case "(($ac_try" in
3105  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3106  *) ac_try_echo=$ac_try;;
3107esac
3108eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3109$as_echo "$ac_try_echo"; } >&5
3110  (eval "$ac_link") 2>&5
3111  ac_status=$?
3112  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3113  test $ac_status = 0; }
3114  if { ac_try='./conftest$ac_cv_exeext'
3115  { { case "(($ac_try" in
3116  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3117  *) ac_try_echo=$ac_try;;
3118esac
3119eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3120$as_echo "$ac_try_echo"; } >&5
3121  (eval "$ac_try") 2>&5
3122  ac_status=$?
3123  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3124  test $ac_status = 0; }; }; then
3125    cross_compiling=no
3126  else
3127    if test "$cross_compiling" = maybe; then
3128	cross_compiling=yes
3129    else
3130	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3131$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3132as_fn_error $? "cannot run C compiled programs.
3133If you meant to cross compile, use \`--host'.
3134See \`config.log' for more details" "$LINENO" 5; }
3135    fi
3136  fi
3137fi
3138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3139$as_echo "$cross_compiling" >&6; }
3140
3141rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3142ac_clean_files=$ac_clean_files_save
3143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3144$as_echo_n "checking for suffix of object files... " >&6; }
3145if ${ac_cv_objext+:} false; then :
3146  $as_echo_n "(cached) " >&6
3147else
3148  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3149/* end confdefs.h.  */
3150
3151int
3152main ()
3153{
3154
3155  ;
3156  return 0;
3157}
3158_ACEOF
3159rm -f conftest.o conftest.obj
3160if { { ac_try="$ac_compile"
3161case "(($ac_try" in
3162  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3163  *) ac_try_echo=$ac_try;;
3164esac
3165eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3166$as_echo "$ac_try_echo"; } >&5
3167  (eval "$ac_compile") 2>&5
3168  ac_status=$?
3169  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3170  test $ac_status = 0; }; then :
3171  for ac_file in conftest.o conftest.obj conftest.*; do
3172  test -f "$ac_file" || continue;
3173  case $ac_file in
3174    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3175    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3176       break;;
3177  esac
3178done
3179else
3180  $as_echo "$as_me: failed program was:" >&5
3181sed 's/^/| /' conftest.$ac_ext >&5
3182
3183{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3184$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3185as_fn_error $? "cannot compute suffix of object files: cannot compile
3186See \`config.log' for more details" "$LINENO" 5; }
3187fi
3188rm -f conftest.$ac_cv_objext conftest.$ac_ext
3189fi
3190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3191$as_echo "$ac_cv_objext" >&6; }
3192OBJEXT=$ac_cv_objext
3193ac_objext=$OBJEXT
3194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3195$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3196if ${ac_cv_c_compiler_gnu+:} false; then :
3197  $as_echo_n "(cached) " >&6
3198else
3199  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3200/* end confdefs.h.  */
3201
3202int
3203main ()
3204{
3205#ifndef __GNUC__
3206       choke me
3207#endif
3208
3209  ;
3210  return 0;
3211}
3212_ACEOF
3213if ac_fn_c_try_compile "$LINENO"; then :
3214  ac_compiler_gnu=yes
3215else
3216  ac_compiler_gnu=no
3217fi
3218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3219ac_cv_c_compiler_gnu=$ac_compiler_gnu
3220
3221fi
3222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3223$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3224if test $ac_compiler_gnu = yes; then
3225  GCC=yes
3226else
3227  GCC=
3228fi
3229ac_test_CFLAGS=${CFLAGS+set}
3230ac_save_CFLAGS=$CFLAGS
3231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3232$as_echo_n "checking whether $CC accepts -g... " >&6; }
3233if ${ac_cv_prog_cc_g+:} false; then :
3234  $as_echo_n "(cached) " >&6
3235else
3236  ac_save_c_werror_flag=$ac_c_werror_flag
3237   ac_c_werror_flag=yes
3238   ac_cv_prog_cc_g=no
3239   CFLAGS="-g"
3240   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3241/* end confdefs.h.  */
3242
3243int
3244main ()
3245{
3246
3247  ;
3248  return 0;
3249}
3250_ACEOF
3251if ac_fn_c_try_compile "$LINENO"; then :
3252  ac_cv_prog_cc_g=yes
3253else
3254  CFLAGS=""
3255      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3256/* end confdefs.h.  */
3257
3258int
3259main ()
3260{
3261
3262  ;
3263  return 0;
3264}
3265_ACEOF
3266if ac_fn_c_try_compile "$LINENO"; then :
3267
3268else
3269  ac_c_werror_flag=$ac_save_c_werror_flag
3270	 CFLAGS="-g"
3271	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3272/* end confdefs.h.  */
3273
3274int
3275main ()
3276{
3277
3278  ;
3279  return 0;
3280}
3281_ACEOF
3282if ac_fn_c_try_compile "$LINENO"; then :
3283  ac_cv_prog_cc_g=yes
3284fi
3285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3286fi
3287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3288fi
3289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3290   ac_c_werror_flag=$ac_save_c_werror_flag
3291fi
3292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3293$as_echo "$ac_cv_prog_cc_g" >&6; }
3294if test "$ac_test_CFLAGS" = set; then
3295  CFLAGS=$ac_save_CFLAGS
3296elif test $ac_cv_prog_cc_g = yes; then
3297  if test "$GCC" = yes; then
3298    CFLAGS="-g -O2"
3299  else
3300    CFLAGS="-g"
3301  fi
3302else
3303  if test "$GCC" = yes; then
3304    CFLAGS="-O2"
3305  else
3306    CFLAGS=
3307  fi
3308fi
3309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3310$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3311if ${ac_cv_prog_cc_c89+:} false; then :
3312  $as_echo_n "(cached) " >&6
3313else
3314  ac_cv_prog_cc_c89=no
3315ac_save_CC=$CC
3316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3317/* end confdefs.h.  */
3318#include <stdarg.h>
3319#include <stdio.h>
3320struct stat;
3321/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3322struct buf { int x; };
3323FILE * (*rcsopen) (struct buf *, struct stat *, int);
3324static char *e (p, i)
3325     char **p;
3326     int i;
3327{
3328  return p[i];
3329}
3330static char *f (char * (*g) (char **, int), char **p, ...)
3331{
3332  char *s;
3333  va_list v;
3334  va_start (v,p);
3335  s = g (p, va_arg (v,int));
3336  va_end (v);
3337  return s;
3338}
3339
3340/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3341   function prototypes and stuff, but not '\xHH' hex character constants.
3342   These don't provoke an error unfortunately, instead are silently treated
3343   as 'x'.  The following induces an error, until -std is added to get
3344   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3345   array size at least.  It's necessary to write '\x00'==0 to get something
3346   that's true only with -std.  */
3347int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3348
3349/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3350   inside strings and character constants.  */
3351#define FOO(x) 'x'
3352int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3353
3354int test (int i, double x);
3355struct s1 {int (*f) (int a);};
3356struct s2 {int (*f) (double a);};
3357int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3358int argc;
3359char **argv;
3360int
3361main ()
3362{
3363return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3364  ;
3365  return 0;
3366}
3367_ACEOF
3368for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3369	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3370do
3371  CC="$ac_save_CC $ac_arg"
3372  if ac_fn_c_try_compile "$LINENO"; then :
3373  ac_cv_prog_cc_c89=$ac_arg
3374fi
3375rm -f core conftest.err conftest.$ac_objext
3376  test "x$ac_cv_prog_cc_c89" != "xno" && break
3377done
3378rm -f conftest.$ac_ext
3379CC=$ac_save_CC
3380
3381fi
3382# AC_CACHE_VAL
3383case "x$ac_cv_prog_cc_c89" in
3384  x)
3385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3386$as_echo "none needed" >&6; } ;;
3387  xno)
3388    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3389$as_echo "unsupported" >&6; } ;;
3390  *)
3391    CC="$CC $ac_cv_prog_cc_c89"
3392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3393$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3394esac
3395if test "x$ac_cv_prog_cc_c89" != xno; then :
3396
3397fi
3398
3399ac_ext=c
3400ac_cpp='$CPP $CPPFLAGS'
3401ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3402ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3403ac_compiler_gnu=$ac_cv_c_compiler_gnu
3404
3405   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
3406$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
3407if ${ac_cv_prog_cc_c99+:} false; then :
3408  $as_echo_n "(cached) " >&6
3409else
3410  ac_cv_prog_cc_c99=no
3411ac_save_CC=$CC
3412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3413/* end confdefs.h.  */
3414#include <stdarg.h>
3415#include <stdbool.h>
3416#include <stdlib.h>
3417#include <wchar.h>
3418#include <stdio.h>
3419
3420// Check varargs macros.  These examples are taken from C99 6.10.3.5.
3421#define debug(...) fprintf (stderr, __VA_ARGS__)
3422#define showlist(...) puts (#__VA_ARGS__)
3423#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
3424static void
3425test_varargs_macros (void)
3426{
3427  int x = 1234;
3428  int y = 5678;
3429  debug ("Flag");
3430  debug ("X = %d\n", x);
3431  showlist (The first, second, and third items.);
3432  report (x>y, "x is %d but y is %d", x, y);
3433}
3434
3435// Check long long types.
3436#define BIG64 18446744073709551615ull
3437#define BIG32 4294967295ul
3438#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
3439#if !BIG_OK
3440  your preprocessor is broken;
3441#endif
3442#if BIG_OK
3443#else
3444  your preprocessor is broken;
3445#endif
3446static long long int bignum = -9223372036854775807LL;
3447static unsigned long long int ubignum = BIG64;
3448
3449struct incomplete_array
3450{
3451  int datasize;
3452  double data[];
3453};
3454
3455struct named_init {
3456  int number;
3457  const wchar_t *name;
3458  double average;
3459};
3460
3461typedef const char *ccp;
3462
3463static inline int
3464test_restrict (ccp restrict text)
3465{
3466  // See if C++-style comments work.
3467  // Iterate through items via the restricted pointer.
3468  // Also check for declarations in for loops.
3469  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
3470    continue;
3471  return 0;
3472}
3473
3474// Check varargs and va_copy.
3475static void
3476test_varargs (const char *format, ...)
3477{
3478  va_list args;
3479  va_start (args, format);
3480  va_list args_copy;
3481  va_copy (args_copy, args);
3482
3483  const char *str;
3484  int number;
3485  float fnumber;
3486
3487  while (*format)
3488    {
3489      switch (*format++)
3490	{
3491	case 's': // string
3492	  str = va_arg (args_copy, const char *);
3493	  break;
3494	case 'd': // int
3495	  number = va_arg (args_copy, int);
3496	  break;
3497	case 'f': // float
3498	  fnumber = va_arg (args_copy, double);
3499	  break;
3500	default:
3501	  break;
3502	}
3503    }
3504  va_end (args_copy);
3505  va_end (args);
3506}
3507
3508int
3509main ()
3510{
3511
3512  // Check bool.
3513  _Bool success = false;
3514
3515  // Check restrict.
3516  if (test_restrict ("String literal") == 0)
3517    success = true;
3518  char *restrict newvar = "Another string";
3519
3520  // Check varargs.
3521  test_varargs ("s, d' f .", "string", 65, 34.234);
3522  test_varargs_macros ();
3523
3524  // Check flexible array members.
3525  struct incomplete_array *ia =
3526    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
3527  ia->datasize = 10;
3528  for (int i = 0; i < ia->datasize; ++i)
3529    ia->data[i] = i * 1.234;
3530
3531  // Check named initializers.
3532  struct named_init ni = {
3533    .number = 34,
3534    .name = L"Test wide string",
3535    .average = 543.34343,
3536  };
3537
3538  ni.number = 58;
3539
3540  int dynamic_array[ni.number];
3541  dynamic_array[ni.number - 1] = 543;
3542
3543  // work around unused variable warnings
3544  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
3545	  || dynamic_array[ni.number - 1] != 543);
3546
3547  ;
3548  return 0;
3549}
3550_ACEOF
3551for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
3552do
3553  CC="$ac_save_CC $ac_arg"
3554  if ac_fn_c_try_compile "$LINENO"; then :
3555  ac_cv_prog_cc_c99=$ac_arg
3556fi
3557rm -f core conftest.err conftest.$ac_objext
3558  test "x$ac_cv_prog_cc_c99" != "xno" && break
3559done
3560rm -f conftest.$ac_ext
3561CC=$ac_save_CC
3562
3563fi
3564# AC_CACHE_VAL
3565case "x$ac_cv_prog_cc_c99" in
3566  x)
3567    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3568$as_echo "none needed" >&6; } ;;
3569  xno)
3570    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3571$as_echo "unsupported" >&6; } ;;
3572  *)
3573    CC="$CC $ac_cv_prog_cc_c99"
3574    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3575$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
3576esac
3577if test "x$ac_cv_prog_cc_c99" != xno; then :
3578
3579fi
3580
3581
3582if test "$ac_cv_prog_cc_c99" = "no"; then
3583	as_fn_error $? "The C compiler does not support C99" "$LINENO" 5
3584fi
3585case "$host_os" in
3586haiku*)
3587	#
3588	# Haiku's platform file is in C++.
3589	#
3590	ac_ext=cpp
3591ac_cpp='$CXXCPP $CPPFLAGS'
3592ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3593ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3594ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3595if test -z "$CXX"; then
3596  if test -n "$CCC"; then
3597    CXX=$CCC
3598  else
3599    if test -n "$ac_tool_prefix"; then
3600  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3601  do
3602    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3603set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3605$as_echo_n "checking for $ac_word... " >&6; }
3606if ${ac_cv_prog_CXX+:} false; then :
3607  $as_echo_n "(cached) " >&6
3608else
3609  if test -n "$CXX"; then
3610  ac_cv_prog_CXX="$CXX" # Let the user override the test.
3611else
3612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3613for as_dir in $PATH
3614do
3615  IFS=$as_save_IFS
3616  test -z "$as_dir" && as_dir=.
3617    for ac_exec_ext in '' $ac_executable_extensions; do
3618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3619    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3621    break 2
3622  fi
3623done
3624  done
3625IFS=$as_save_IFS
3626
3627fi
3628fi
3629CXX=$ac_cv_prog_CXX
3630if test -n "$CXX"; then
3631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3632$as_echo "$CXX" >&6; }
3633else
3634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3635$as_echo "no" >&6; }
3636fi
3637
3638
3639    test -n "$CXX" && break
3640  done
3641fi
3642if test -z "$CXX"; then
3643  ac_ct_CXX=$CXX
3644  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3645do
3646  # Extract the first word of "$ac_prog", so it can be a program name with args.
3647set dummy $ac_prog; ac_word=$2
3648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3649$as_echo_n "checking for $ac_word... " >&6; }
3650if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3651  $as_echo_n "(cached) " >&6
3652else
3653  if test -n "$ac_ct_CXX"; then
3654  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3655else
3656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3657for as_dir in $PATH
3658do
3659  IFS=$as_save_IFS
3660  test -z "$as_dir" && as_dir=.
3661    for ac_exec_ext in '' $ac_executable_extensions; do
3662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3663    ac_cv_prog_ac_ct_CXX="$ac_prog"
3664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3665    break 2
3666  fi
3667done
3668  done
3669IFS=$as_save_IFS
3670
3671fi
3672fi
3673ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3674if test -n "$ac_ct_CXX"; then
3675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3676$as_echo "$ac_ct_CXX" >&6; }
3677else
3678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3679$as_echo "no" >&6; }
3680fi
3681
3682
3683  test -n "$ac_ct_CXX" && break
3684done
3685
3686  if test "x$ac_ct_CXX" = x; then
3687    CXX="g++"
3688  else
3689    case $cross_compiling:$ac_tool_warned in
3690yes:)
3691{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3692$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3693ac_tool_warned=yes ;;
3694esac
3695    CXX=$ac_ct_CXX
3696  fi
3697fi
3698
3699  fi
3700fi
3701# Provide some information about the compiler.
3702$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3703set X $ac_compile
3704ac_compiler=$2
3705for ac_option in --version -v -V -qversion; do
3706  { { ac_try="$ac_compiler $ac_option >&5"
3707case "(($ac_try" in
3708  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3709  *) ac_try_echo=$ac_try;;
3710esac
3711eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3712$as_echo "$ac_try_echo"; } >&5
3713  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3714  ac_status=$?
3715  if test -s conftest.err; then
3716    sed '10a\
3717... rest of stderr output deleted ...
3718         10q' conftest.err >conftest.er1
3719    cat conftest.er1 >&5
3720  fi
3721  rm -f conftest.er1 conftest.err
3722  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3723  test $ac_status = 0; }
3724done
3725
3726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3727$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3728if ${ac_cv_cxx_compiler_gnu+:} false; then :
3729  $as_echo_n "(cached) " >&6
3730else
3731  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3732/* end confdefs.h.  */
3733
3734int
3735main ()
3736{
3737#ifndef __GNUC__
3738       choke me
3739#endif
3740
3741  ;
3742  return 0;
3743}
3744_ACEOF
3745if ac_fn_cxx_try_compile "$LINENO"; then :
3746  ac_compiler_gnu=yes
3747else
3748  ac_compiler_gnu=no
3749fi
3750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3751ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3752
3753fi
3754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3755$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3756if test $ac_compiler_gnu = yes; then
3757  GXX=yes
3758else
3759  GXX=
3760fi
3761ac_test_CXXFLAGS=${CXXFLAGS+set}
3762ac_save_CXXFLAGS=$CXXFLAGS
3763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3764$as_echo_n "checking whether $CXX accepts -g... " >&6; }
3765if ${ac_cv_prog_cxx_g+:} false; then :
3766  $as_echo_n "(cached) " >&6
3767else
3768  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3769   ac_cxx_werror_flag=yes
3770   ac_cv_prog_cxx_g=no
3771   CXXFLAGS="-g"
3772   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3773/* end confdefs.h.  */
3774
3775int
3776main ()
3777{
3778
3779  ;
3780  return 0;
3781}
3782_ACEOF
3783if ac_fn_cxx_try_compile "$LINENO"; then :
3784  ac_cv_prog_cxx_g=yes
3785else
3786  CXXFLAGS=""
3787      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3788/* end confdefs.h.  */
3789
3790int
3791main ()
3792{
3793
3794  ;
3795  return 0;
3796}
3797_ACEOF
3798if ac_fn_cxx_try_compile "$LINENO"; then :
3799
3800else
3801  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3802	 CXXFLAGS="-g"
3803	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3804/* end confdefs.h.  */
3805
3806int
3807main ()
3808{
3809
3810  ;
3811  return 0;
3812}
3813_ACEOF
3814if ac_fn_cxx_try_compile "$LINENO"; then :
3815  ac_cv_prog_cxx_g=yes
3816fi
3817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3818fi
3819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3820fi
3821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3822   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3823fi
3824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3825$as_echo "$ac_cv_prog_cxx_g" >&6; }
3826if test "$ac_test_CXXFLAGS" = set; then
3827  CXXFLAGS=$ac_save_CXXFLAGS
3828elif test $ac_cv_prog_cxx_g = yes; then
3829  if test "$GXX" = yes; then
3830    CXXFLAGS="-g -O2"
3831  else
3832    CXXFLAGS="-g"
3833  fi
3834else
3835  if test "$GXX" = yes; then
3836    CXXFLAGS="-O2"
3837  else
3838    CXXFLAGS=
3839  fi
3840fi
3841ac_ext=c
3842ac_cpp='$CPP $CPPFLAGS'
3843ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3844ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3845ac_compiler_gnu=$ac_cv_c_compiler_gnu
3846
3847	;;
3848esac
3849
3850
3851
3852
3853
3854
3855    if test "$GCC" = yes ; then
3856	    #
3857	    # -Werror forces warnings to be errors.
3858	    #
3859	    ac_lbl_cc_force_warning_errors=-Werror
3860
3861	    #
3862	    # Try to have the compiler default to hiding symbols,
3863	    # so that only symbols explicitly exported with
3864	    # PCAP_API will be visible outside (shared) libraries.
3865	    #
3866
3867	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
3868$as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
3869	save_CFLAGS="$CFLAGS"
3870	if expr "x-fvisibility=hidden" : "x-W.*" >/dev/null
3871	then
3872	    CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -fvisibility=hidden"
3873	elif expr "x-fvisibility=hidden" : "x-f.*" >/dev/null
3874	then
3875	    CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3876	elif expr "x-fvisibility=hidden" : "x-m.*" >/dev/null
3877	then
3878	    CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3879	else
3880	    CFLAGS="$CFLAGS -fvisibility=hidden"
3881	fi
3882	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3883/* end confdefs.h.  */
3884
3885int
3886main ()
3887{
3888return 0
3889  ;
3890  return 0;
3891}
3892_ACEOF
3893if ac_fn_c_try_compile "$LINENO"; then :
3894
3895		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3896$as_echo "yes" >&6; }
3897		can_add_to_cflags=yes
3898		#
3899		# The compile supports this; do we have some C code for
3900		# which the warning should *not* appear?
3901		# We test the fourth argument because the third argument
3902		# could contain quotes, breaking the test.
3903		#
3904		if test "x" != "x"
3905		then
3906		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
3907		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5
3908$as_echo_n "checking whether -fvisibility=hidden ... " >&6; }
3909		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3910/* end confdefs.h.  */
3911
3912_ACEOF
3913if ac_fn_c_try_compile "$LINENO"; then :
3914
3915			#
3916			# Not a problem.
3917			#
3918			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3919$as_echo "no" >&6; }
3920
3921else
3922
3923			#
3924			# A problem.
3925			#
3926			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3927$as_echo "yes" >&6; }
3928			can_add_to_cflags=no
3929
3930fi
3931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3932		fi
3933		CFLAGS="$save_CFLAGS"
3934		if test x"$can_add_to_cflags" = "xyes"
3935		then
3936		    V_CCOPT="$V_CCOPT -fvisibility=hidden"
3937		fi
3938
3939else
3940
3941		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3942$as_echo "no" >&6; }
3943		CFLAGS="$save_CFLAGS"
3944
3945fi
3946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3947
3948    else
3949	    V_INCLS="$V_INCLS -I/usr/local/include"
3950	    LDFLAGS="$LDFLAGS -L/usr/local/lib"
3951
3952	    case "$host_os" in
3953
3954	    darwin*)
3955		    #
3956		    # This is assumed either to be GCC or clang, both
3957		    # of which use -Werror to force warnings to be errors.
3958		    #
3959		    ac_lbl_cc_force_warning_errors=-Werror
3960
3961		    #
3962		    # Try to have the compiler default to hiding symbols,
3963		    # so that only symbols explicitly exported with
3964		    # PCAP_API will be visible outside (shared) libraries.
3965		    #
3966
3967	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
3968$as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
3969	save_CFLAGS="$CFLAGS"
3970	if expr "x-fvisibility=hidden" : "x-W.*" >/dev/null
3971	then
3972	    CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -fvisibility=hidden"
3973	elif expr "x-fvisibility=hidden" : "x-f.*" >/dev/null
3974	then
3975	    CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3976	elif expr "x-fvisibility=hidden" : "x-m.*" >/dev/null
3977	then
3978	    CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3979	else
3980	    CFLAGS="$CFLAGS -fvisibility=hidden"
3981	fi
3982	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3983/* end confdefs.h.  */
3984
3985int
3986main ()
3987{
3988return 0
3989  ;
3990  return 0;
3991}
3992_ACEOF
3993if ac_fn_c_try_compile "$LINENO"; then :
3994
3995		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3996$as_echo "yes" >&6; }
3997		can_add_to_cflags=yes
3998		#
3999		# The compile supports this; do we have some C code for
4000		# which the warning should *not* appear?
4001		# We test the fourth argument because the third argument
4002		# could contain quotes, breaking the test.
4003		#
4004		if test "x" != "x"
4005		then
4006		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
4007		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5
4008$as_echo_n "checking whether -fvisibility=hidden ... " >&6; }
4009		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4010/* end confdefs.h.  */
4011
4012_ACEOF
4013if ac_fn_c_try_compile "$LINENO"; then :
4014
4015			#
4016			# Not a problem.
4017			#
4018			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4019$as_echo "no" >&6; }
4020
4021else
4022
4023			#
4024			# A problem.
4025			#
4026			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4027$as_echo "yes" >&6; }
4028			can_add_to_cflags=no
4029
4030fi
4031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4032		fi
4033		CFLAGS="$save_CFLAGS"
4034		if test x"$can_add_to_cflags" = "xyes"
4035		then
4036		    V_CCOPT="$V_CCOPT -fvisibility=hidden"
4037		fi
4038
4039else
4040
4041		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4042$as_echo "no" >&6; }
4043		CFLAGS="$save_CFLAGS"
4044
4045fi
4046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4047
4048		    ;;
4049
4050	    hpux*)
4051		    #
4052		    # HP C, which is what we presume we're using, doesn't
4053		    # exit with a non-zero exit status if we hand it an
4054		    # invalid -W flag, can't be forced to do so even with
4055		    # +We, and doesn't handle GCC-style -W flags, so we
4056		    # don't want to try using GCC-style -W flags.
4057		    #
4058		    ac_lbl_cc_dont_try_gcc_dashW=yes
4059		    ;;
4060
4061	    irix*)
4062		    #
4063		    # MIPS C, which is what we presume we're using, doesn't
4064		    # necessarily exit with a non-zero exit status if we
4065		    # hand it an invalid -W flag, can't be forced to do
4066		    # so, and doesn't handle GCC-style -W flags, so we
4067		    # don't want to try using GCC-style -W flags.
4068		    #
4069		    ac_lbl_cc_dont_try_gcc_dashW=yes
4070		    #
4071		    # It also, apparently, defaults to "char" being
4072		    # unsigned, unlike most other C implementations;
4073		    # I suppose we could say "signed char" whenever
4074		    # we want to guarantee a signed "char", but let's
4075		    # just force signed chars.
4076		    #
4077		    # -xansi is normally the default, but the
4078		    # configure script was setting it; perhaps -cckr
4079		    # was the default in the Old Days.  (Then again,
4080		    # that would probably be for backwards compatibility
4081		    # in the days when ANSI C was Shiny and New, i.e.
4082		    # 1989 and the early '90's, so maybe we can just
4083		    # drop support for those compilers.)
4084		    #
4085		    # -g is equivalent to -g2, which turns off
4086		    # optimization; we choose -g3, which generates
4087		    # debugging information but doesn't turn off
4088		    # optimization (even if the optimization would
4089		    # cause inaccuracies in debugging).
4090		    #
4091		    V_CCOPT="$V_CCOPT -xansi -signed -g3"
4092		    ;;
4093
4094	    osf*)
4095		    #
4096		    # Presumed to be DEC OSF/1, Digital UNIX, or
4097		    # Tru64 UNIX.
4098		    #
4099		    # The DEC C compiler, which is what we presume we're
4100		    # using, doesn't exit with a non-zero exit status if we
4101		    # hand it an invalid -W flag, can't be forced to do
4102		    # so, and doesn't handle GCC-style -W flags, so we
4103		    # don't want to try using GCC-style -W flags.
4104		    #
4105		    ac_lbl_cc_dont_try_gcc_dashW=yes
4106		    #
4107		    # -g is equivalent to -g2, which turns off
4108		    # optimization; we choose -g3, which generates
4109		    # debugging information but doesn't turn off
4110		    # optimization (even if the optimization would
4111		    # cause inaccuracies in debugging).
4112		    #
4113		    V_CCOPT="$V_CCOPT -g3"
4114		    ;;
4115
4116	    solaris*)
4117		    #
4118		    # Assumed to be Sun C, which requires -errwarn to force
4119		    # warnings to be treated as errors.
4120		    #
4121		    ac_lbl_cc_force_warning_errors=-errwarn
4122
4123		    #
4124		    # Try to have the compiler default to hiding symbols,
4125		    # so that only symbols explicitly exported with
4126		    # PCAP_API will be visible outside (shared) libraries.
4127		    #
4128
4129	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -xldscope=hidden option" >&5
4130$as_echo_n "checking whether the compiler supports the -xldscope=hidden option... " >&6; }
4131	save_CFLAGS="$CFLAGS"
4132	if expr "x-xldscope=hidden" : "x-W.*" >/dev/null
4133	then
4134	    CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -xldscope=hidden"
4135	elif expr "x-xldscope=hidden" : "x-f.*" >/dev/null
4136	then
4137	    CFLAGS="$CFLAGS -Werror -xldscope=hidden"
4138	elif expr "x-xldscope=hidden" : "x-m.*" >/dev/null
4139	then
4140	    CFLAGS="$CFLAGS -Werror -xldscope=hidden"
4141	else
4142	    CFLAGS="$CFLAGS -xldscope=hidden"
4143	fi
4144	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4145/* end confdefs.h.  */
4146
4147int
4148main ()
4149{
4150return 0
4151  ;
4152  return 0;
4153}
4154_ACEOF
4155if ac_fn_c_try_compile "$LINENO"; then :
4156
4157		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4158$as_echo "yes" >&6; }
4159		can_add_to_cflags=yes
4160		#
4161		# The compile supports this; do we have some C code for
4162		# which the warning should *not* appear?
4163		# We test the fourth argument because the third argument
4164		# could contain quotes, breaking the test.
4165		#
4166		if test "x" != "x"
4167		then
4168		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
4169		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -xldscope=hidden " >&5
4170$as_echo_n "checking whether -xldscope=hidden ... " >&6; }
4171		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4172/* end confdefs.h.  */
4173
4174_ACEOF
4175if ac_fn_c_try_compile "$LINENO"; then :
4176
4177			#
4178			# Not a problem.
4179			#
4180			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4181$as_echo "no" >&6; }
4182
4183else
4184
4185			#
4186			# A problem.
4187			#
4188			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4189$as_echo "yes" >&6; }
4190			can_add_to_cflags=no
4191
4192fi
4193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4194		fi
4195		CFLAGS="$save_CFLAGS"
4196		if test x"$can_add_to_cflags" = "xyes"
4197		then
4198		    V_CCOPT="$V_CCOPT -xldscope=hidden"
4199		fi
4200
4201else
4202
4203		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4204$as_echo "no" >&6; }
4205		CFLAGS="$save_CFLAGS"
4206
4207fi
4208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4209
4210		    ;;
4211
4212	    ultrix*)
4213		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking that Ultrix $CC hacks const in prototypes" >&5
4214$as_echo_n "checking that Ultrix $CC hacks const in prototypes... " >&6; }
4215		    if ${ac_cv_lbl_cc_const_proto+:} false; then :
4216  $as_echo_n "(cached) " >&6
4217else
4218  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4219/* end confdefs.h.  */
4220#include <sys/types.h>
4221int
4222main ()
4223{
4224struct a { int b; };
4225			    void c(const struct a *)
4226  ;
4227  return 0;
4228}
4229_ACEOF
4230if ac_fn_c_try_compile "$LINENO"; then :
4231  ac_cv_lbl_cc_const_proto=yes
4232else
4233  ac_cv_lbl_cc_const_proto=no
4234fi
4235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4236fi
4237
4238		    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_const_proto" >&5
4239$as_echo "$ac_cv_lbl_cc_const_proto" >&6; }
4240		    if test $ac_cv_lbl_cc_const_proto = no ; then
4241
4242$as_echo "#define const /**/" >>confdefs.h
4243
4244		    fi
4245		    ;;
4246	    esac
4247	    V_CCOPT="$V_CCOPT -O"
4248    fi
4249
4250
4251    if test "$GCC" = yes ; then
4252	    #
4253	    # On platforms where we build a shared library:
4254	    #
4255	    #	add options to generate position-independent code,
4256	    #	if necessary (it's the default in AIX and Darwin/macOS);
4257	    #
4258	    #	define option to set the soname of the shared library,
4259	    #	if the OS supports that;
4260	    #
4261	    #	add options to specify, at link time, a directory to
4262	    #	add to the run-time search path, if that's necessary.
4263	    #
4264	    V_SHLIB_CMD="\$(CC)"
4265	    V_SHLIB_OPT="-shared"
4266	    case "$host_os" in
4267
4268	    aix*)
4269		    ;;
4270
4271	    freebsd*|netbsd*|openbsd*|dragonfly*|linux*|osf*|haiku*|midipix*)
4272		    #
4273		    # Platforms where the linker is the GNU linker
4274		    # or accepts command-line arguments like
4275		    # those the GNU linker accepts.
4276		    #
4277		    # Some instruction sets require -fPIC on some
4278		    # operating systems.  Check for them.  If you
4279		    # have a combination that requires it, add it
4280		    # here.
4281		    #
4282		    PIC_OPT=-fpic
4283		    case "$host_cpu" in
4284
4285		    sparc64*)
4286			case "$host_os" in
4287
4288			freebsd*|openbsd*|linux*)
4289			    PIC_OPT=-fPIC
4290			    ;;
4291			esac
4292			;;
4293		    esac
4294		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT $PIC_OPT"
4295		    V_SONAME_OPT="-Wl,-soname,"
4296		    V_RPATH_OPT="-Wl,-rpath,"
4297		    ;;
4298
4299	    hpux*)
4300		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
4301		    #
4302		    # XXX - this assumes GCC is using the HP linker,
4303		    # rather than the GNU linker, and that the "+h"
4304		    # option is used on all HP-UX platforms, both .sl
4305		    # and .so.
4306		    #
4307		    V_SONAME_OPT="-Wl,+h,"
4308		    #
4309		    # By default, directories specified with -L
4310		    # are added to the run-time search path, so
4311		    # we don't add them in pcap-config.
4312		    #
4313		    ;;
4314
4315	    solaris*)
4316		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
4317		    #
4318		    # XXX - this assumes GCC is using the Sun linker,
4319		    # rather than the GNU linker.
4320		    #
4321		    V_SONAME_OPT="-Wl,-h,"
4322		    V_RPATH_OPT="-Wl,-R,"
4323		    ;;
4324	    esac
4325    else
4326	    #
4327	    # Set the appropriate compiler flags and, on platforms
4328	    # where we build a shared library:
4329	    #
4330	    #	add options to generate position-independent code,
4331	    #	if necessary (it's the default in Darwin/macOS);
4332	    #
4333	    #	if we generate ".so" shared libraries, define the
4334	    #	appropriate options for building the shared library;
4335	    #
4336	    #	add options to specify, at link time, a directory to
4337	    #	add to the run-time search path, if that's necessary.
4338	    #
4339	    # Note: spaces after V_SONAME_OPT are significant; on
4340	    # some platforms the soname is passed with a GCC-like
4341	    # "-Wl,-soname,{soname}" option, with the soname part
4342	    # of the option, while on other platforms the C compiler
4343	    # driver takes it as a regular option with the soname
4344	    # following the option.  The same applies to V_RPATH_OPT.
4345	    #
4346	    case "$host_os" in
4347
4348	    aix*)
4349		    V_SHLIB_CMD="\$(CC)"
4350		    V_SHLIB_OPT="-G -bnoentry -bexpall"
4351		    ;;
4352
4353	    freebsd*|netbsd*|openbsd*|dragonfly*|linux*)
4354		    #
4355		    # "cc" is GCC.
4356		    #
4357		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
4358		    V_SHLIB_CMD="\$(CC)"
4359		    V_SHLIB_OPT="-shared"
4360		    V_SONAME_OPT="-Wl,-soname,"
4361		    V_RPATH_OPT="-Wl,-rpath,"
4362		    ;;
4363
4364	    hpux*)
4365		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT +z"
4366		    V_SHLIB_CMD="\$(LD)"
4367		    V_SHLIB_OPT="-b"
4368		    V_SONAME_OPT="+h "
4369		    #
4370		    # By default, directories specified with -L
4371		    # are added to the run-time search path, so
4372		    # we don't add them in pcap-config.
4373		    #
4374		    ;;
4375
4376	    osf*)
4377		    #
4378		    # Presumed to be DEC OSF/1, Digital UNIX, or
4379		    # Tru64 UNIX.
4380		    #
4381		    V_SHLIB_CMD="\$(CC)"
4382		    V_SHLIB_OPT="-shared"
4383		    V_SONAME_OPT="-soname "
4384		    V_RPATH_OPT="-rpath "
4385		    ;;
4386
4387	    solaris*)
4388		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT -Kpic"
4389		    V_SHLIB_CMD="\$(CC)"
4390		    V_SHLIB_OPT="-G"
4391		    V_SONAME_OPT="-h "
4392		    V_RPATH_OPT="-R"
4393		    ;;
4394	    esac
4395    fi
4396
4397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4398$as_echo_n "checking for inline... " >&6; }
4399    save_CFLAGS="$CFLAGS"
4400    CFLAGS="$V_CCOPT"
4401    if ${ac_cv_lbl_inline+:} false; then :
4402  $as_echo_n "(cached) " >&6
4403else
4404
4405	ac_cv_lbl_inline=""
4406	ac_lbl_cc_inline=no
4407	for ac_lbl_inline in inline __inline__ __inline
4408	do
4409	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4410/* end confdefs.h.  */
4411#define inline $ac_lbl_inline
4412		static inline struct iltest *foo(void);
4413		struct iltest {
4414		    int iltest1;
4415		    int iltest2;
4416		};
4417
4418		static inline struct iltest *
4419		foo()
4420		{
4421		    static struct iltest xxx;
4422
4423		    return &xxx;
4424		}
4425int
4426main ()
4427{
4428
4429  ;
4430  return 0;
4431}
4432_ACEOF
4433if ac_fn_c_try_compile "$LINENO"; then :
4434  ac_lbl_cc_inline=yes
4435fi
4436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4437	    if test "$ac_lbl_cc_inline" = yes ; then
4438		break;
4439	    fi
4440	done
4441	if test "$ac_lbl_cc_inline" = yes ; then
4442	    ac_cv_lbl_inline=$ac_lbl_inline
4443	fi
4444fi
4445
4446    CFLAGS="$save_CFLAGS"
4447    if test ! -z "$ac_cv_lbl_inline" ; then
4448	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_inline" >&5
4449$as_echo "$ac_cv_lbl_inline" >&6; }
4450    else
4451	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4452$as_echo "no" >&6; }
4453    fi
4454
4455cat >>confdefs.h <<_ACEOF
4456#define inline $ac_cv_lbl_inline
4457_ACEOF
4458
4459
4460	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_load_n" >&5
4461$as_echo_n "checking for __atomic_load_n... " >&6; }
4462	if ${ac_cv_have___atomic_load_n+:} false; then :
4463  $as_echo_n "(cached) " >&6
4464else
4465
4466# ac_fn_c_try_link LINENO
4467# -----------------------
4468# Try to link conftest.$ac_ext, and return whether this succeeded.
4469ac_fn_c_try_link ()
4470{
4471  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
4472  rm -f conftest.$ac_objext conftest$ac_exeext
4473  if { { ac_try="$ac_link"
4474case "(($ac_try" in
4475  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4476  *) ac_try_echo=$ac_try;;
4477esac
4478eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4479$as_echo "$ac_try_echo"; } >&5
4480  (eval "$ac_link") 2>conftest.err
4481  ac_status=$?
4482  if test -s conftest.err; then
4483    grep -v '^ *+' conftest.err >conftest.er1
4484    cat conftest.er1 >&5
4485    mv -f conftest.er1 conftest.err
4486  fi
4487  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4488  test $ac_status = 0; } && {
4489	 test -z "$ac_c_werror_flag" ||
4490	 test ! -s conftest.err
4491       } && test -s conftest$ac_exeext && {
4492	 test "$cross_compiling" = yes ||
4493	 test -x conftest$ac_exeext
4494       }; then :
4495  ac_retval=0
4496else
4497  $as_echo "$as_me: failed program was:" >&5
4498sed 's/^/| /' conftest.$ac_ext >&5
4499
4500	ac_retval=1
4501fi
4502  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
4503  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
4504  # interfere with the next link command; also delete a directory that is
4505  # left behind by Apple's compiler.  We do this before executing the actions.
4506  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
4507  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
4508  as_fn_set_status $ac_retval
4509
4510} # ac_fn_c_try_link
4511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4512/* end confdefs.h.  */
4513
4514int
4515main ()
4516{
4517
4518		    int i = 17;
4519		    int j;
4520		    j = __atomic_load_n(&i, __ATOMIC_RELAXED);
4521
4522  ;
4523  return 0;
4524}
4525_ACEOF
4526if ac_fn_c_try_link "$LINENO"; then :
4527  ac_have___atomic_load_n=yes
4528else
4529  ac_have___atomic_load_n=no
4530fi
4531rm -f core conftest.err conftest.$ac_objext \
4532    conftest$ac_exeext conftest.$ac_ext
4533fi
4534
4535	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_have___atomic_load_n" >&5
4536$as_echo "$ac_have___atomic_load_n" >&6; }
4537	if test $ac_have___atomic_load_n = yes ; then
4538
4539$as_echo "#define HAVE___ATOMIC_LOAD_N 1" >>confdefs.h
4540
4541	fi
4542
4543	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_store_n" >&5
4544$as_echo_n "checking for __atomic_store_n... " >&6; }
4545	if ${ac_cv_have___atomic_store_n+:} false; then :
4546  $as_echo_n "(cached) " >&6
4547else
4548  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4549/* end confdefs.h.  */
4550
4551int
4552main ()
4553{
4554
4555		    int i;
4556		    __atomic_store_n(&i, 17, __ATOMIC_RELAXED);
4557
4558  ;
4559  return 0;
4560}
4561_ACEOF
4562if ac_fn_c_try_link "$LINENO"; then :
4563  ac_have___atomic_store_n=yes
4564else
4565  ac_have___atomic_store_n=no
4566fi
4567rm -f core conftest.err conftest.$ac_objext \
4568    conftest$ac_exeext conftest.$ac_ext
4569fi
4570
4571	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_have___atomic_store_n" >&5
4572$as_echo "$ac_have___atomic_store_n" >&6; }
4573	if test $ac_have___atomic_store_n = yes ; then
4574
4575$as_echo "#define HAVE___ATOMIC_STORE_N 1" >>confdefs.h
4576
4577	fi
4578
4579#
4580# Try to arrange for large file support.
4581#
4582# Check whether --enable-largefile was given.
4583if test "${enable_largefile+set}" = set; then :
4584  enableval=$enable_largefile;
4585fi
4586
4587if test "$enable_largefile" != no; then
4588
4589  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4590$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4591if ${ac_cv_sys_largefile_CC+:} false; then :
4592  $as_echo_n "(cached) " >&6
4593else
4594  ac_cv_sys_largefile_CC=no
4595     if test "$GCC" != yes; then
4596       ac_save_CC=$CC
4597       while :; do
4598	 # IRIX 6.2 and later do not support large files by default,
4599	 # so use the C compiler's -n32 option if that helps.
4600	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4601/* end confdefs.h.  */
4602#include <sys/types.h>
4603 /* Check that off_t can represent 2**63 - 1 correctly.
4604    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4605    since some C++ compilers masquerading as C compilers
4606    incorrectly reject 9223372036854775807.  */
4607#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
4608  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4609		       && LARGE_OFF_T % 2147483647 == 1)
4610		      ? 1 : -1];
4611int
4612main ()
4613{
4614
4615  ;
4616  return 0;
4617}
4618_ACEOF
4619	 if ac_fn_c_try_compile "$LINENO"; then :
4620  break
4621fi
4622rm -f core conftest.err conftest.$ac_objext
4623	 CC="$CC -n32"
4624	 if ac_fn_c_try_compile "$LINENO"; then :
4625  ac_cv_sys_largefile_CC=' -n32'; break
4626fi
4627rm -f core conftest.err conftest.$ac_objext
4628	 break
4629       done
4630       CC=$ac_save_CC
4631       rm -f conftest.$ac_ext
4632    fi
4633fi
4634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4635$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4636  if test "$ac_cv_sys_largefile_CC" != no; then
4637    CC=$CC$ac_cv_sys_largefile_CC
4638  fi
4639
4640  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4641$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4642if ${ac_cv_sys_file_offset_bits+:} false; then :
4643  $as_echo_n "(cached) " >&6
4644else
4645  while :; do
4646  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4647/* end confdefs.h.  */
4648#include <sys/types.h>
4649 /* Check that off_t can represent 2**63 - 1 correctly.
4650    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4651    since some C++ compilers masquerading as C compilers
4652    incorrectly reject 9223372036854775807.  */
4653#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
4654  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4655		       && LARGE_OFF_T % 2147483647 == 1)
4656		      ? 1 : -1];
4657int
4658main ()
4659{
4660
4661  ;
4662  return 0;
4663}
4664_ACEOF
4665if ac_fn_c_try_compile "$LINENO"; then :
4666  ac_cv_sys_file_offset_bits=no; break
4667fi
4668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4669  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4670/* end confdefs.h.  */
4671#define _FILE_OFFSET_BITS 64
4672#include <sys/types.h>
4673 /* Check that off_t can represent 2**63 - 1 correctly.
4674    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4675    since some C++ compilers masquerading as C compilers
4676    incorrectly reject 9223372036854775807.  */
4677#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
4678  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4679		       && LARGE_OFF_T % 2147483647 == 1)
4680		      ? 1 : -1];
4681int
4682main ()
4683{
4684
4685  ;
4686  return 0;
4687}
4688_ACEOF
4689if ac_fn_c_try_compile "$LINENO"; then :
4690  ac_cv_sys_file_offset_bits=64; break
4691fi
4692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693  ac_cv_sys_file_offset_bits=unknown
4694  break
4695done
4696fi
4697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4698$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4699case $ac_cv_sys_file_offset_bits in #(
4700  no | unknown) ;;
4701  *)
4702cat >>confdefs.h <<_ACEOF
4703#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4704_ACEOF
4705;;
4706esac
4707rm -rf conftest*
4708  if test $ac_cv_sys_file_offset_bits = unknown; then
4709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4710$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4711if ${ac_cv_sys_large_files+:} false; then :
4712  $as_echo_n "(cached) " >&6
4713else
4714  while :; do
4715  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4716/* end confdefs.h.  */
4717#include <sys/types.h>
4718 /* Check that off_t can represent 2**63 - 1 correctly.
4719    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4720    since some C++ compilers masquerading as C compilers
4721    incorrectly reject 9223372036854775807.  */
4722#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
4723  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4724		       && LARGE_OFF_T % 2147483647 == 1)
4725		      ? 1 : -1];
4726int
4727main ()
4728{
4729
4730  ;
4731  return 0;
4732}
4733_ACEOF
4734if ac_fn_c_try_compile "$LINENO"; then :
4735  ac_cv_sys_large_files=no; break
4736fi
4737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4738  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4739/* end confdefs.h.  */
4740#define _LARGE_FILES 1
4741#include <sys/types.h>
4742 /* Check that off_t can represent 2**63 - 1 correctly.
4743    We can't simply define LARGE_OFF_T to be 9223372036854775807,
4744    since some C++ compilers masquerading as C compilers
4745    incorrectly reject 9223372036854775807.  */
4746#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
4747  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4748		       && LARGE_OFF_T % 2147483647 == 1)
4749		      ? 1 : -1];
4750int
4751main ()
4752{
4753
4754  ;
4755  return 0;
4756}
4757_ACEOF
4758if ac_fn_c_try_compile "$LINENO"; then :
4759  ac_cv_sys_large_files=1; break
4760fi
4761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4762  ac_cv_sys_large_files=unknown
4763  break
4764done
4765fi
4766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4767$as_echo "$ac_cv_sys_large_files" >&6; }
4768case $ac_cv_sys_large_files in #(
4769  no | unknown) ;;
4770  *)
4771cat >>confdefs.h <<_ACEOF
4772#define _LARGE_FILES $ac_cv_sys_large_files
4773_ACEOF
4774;;
4775esac
4776rm -rf conftest*
4777  fi
4778
4779
4780fi
4781
4782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
4783$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
4784if ${ac_cv_sys_largefile_source+:} false; then :
4785  $as_echo_n "(cached) " >&6
4786else
4787  while :; do
4788  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4789/* end confdefs.h.  */
4790#include <sys/types.h> /* for off_t */
4791     #include <stdio.h>
4792int
4793main ()
4794{
4795int (*fp) (FILE *, off_t, int) = fseeko;
4796     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
4797  ;
4798  return 0;
4799}
4800_ACEOF
4801if ac_fn_c_try_link "$LINENO"; then :
4802  ac_cv_sys_largefile_source=no; break
4803fi
4804rm -f core conftest.err conftest.$ac_objext \
4805    conftest$ac_exeext conftest.$ac_ext
4806  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4807/* end confdefs.h.  */
4808#define _LARGEFILE_SOURCE 1
4809#include <sys/types.h> /* for off_t */
4810     #include <stdio.h>
4811int
4812main ()
4813{
4814int (*fp) (FILE *, off_t, int) = fseeko;
4815     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
4816  ;
4817  return 0;
4818}
4819_ACEOF
4820if ac_fn_c_try_link "$LINENO"; then :
4821  ac_cv_sys_largefile_source=1; break
4822fi
4823rm -f core conftest.err conftest.$ac_objext \
4824    conftest$ac_exeext conftest.$ac_ext
4825  ac_cv_sys_largefile_source=unknown
4826  break
4827done
4828fi
4829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
4830$as_echo "$ac_cv_sys_largefile_source" >&6; }
4831case $ac_cv_sys_largefile_source in #(
4832  no | unknown) ;;
4833  *)
4834cat >>confdefs.h <<_ACEOF
4835#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
4836_ACEOF
4837;;
4838esac
4839rm -rf conftest*
4840
4841# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
4842# in glibc 2.1.3, but that breaks too many other things.
4843# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
4844if test $ac_cv_sys_largefile_source != unknown; then
4845
4846$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
4847
4848fi
4849
4850
4851ac_ext=c
4852ac_cpp='$CPP $CPPFLAGS'
4853ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4854ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4855ac_compiler_gnu=$ac_cv_c_compiler_gnu
4856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4857$as_echo_n "checking how to run the C preprocessor... " >&6; }
4858# On Suns, sometimes $CPP names a directory.
4859if test -n "$CPP" && test -d "$CPP"; then
4860  CPP=
4861fi
4862if test -z "$CPP"; then
4863  if ${ac_cv_prog_CPP+:} false; then :
4864  $as_echo_n "(cached) " >&6
4865else
4866      # Double quotes because CPP needs to be expanded
4867    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4868    do
4869      ac_preproc_ok=false
4870for ac_c_preproc_warn_flag in '' yes
4871do
4872  # Use a header file that comes with gcc, so configuring glibc
4873  # with a fresh cross-compiler works.
4874  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4875  # <limits.h> exists even on freestanding compilers.
4876  # On the NeXT, cc -E runs the code through the compiler's parser,
4877  # not just through cpp. "Syntax error" is here to catch this case.
4878  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4879/* end confdefs.h.  */
4880#ifdef __STDC__
4881# include <limits.h>
4882#else
4883# include <assert.h>
4884#endif
4885		     Syntax error
4886_ACEOF
4887if ac_fn_c_try_cpp "$LINENO"; then :
4888
4889else
4890  # Broken: fails on valid input.
4891continue
4892fi
4893rm -f conftest.err conftest.i conftest.$ac_ext
4894
4895  # OK, works on sane cases.  Now check whether nonexistent headers
4896  # can be detected and how.
4897  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4898/* end confdefs.h.  */
4899#include <ac_nonexistent.h>
4900_ACEOF
4901if ac_fn_c_try_cpp "$LINENO"; then :
4902  # Broken: success on invalid input.
4903continue
4904else
4905  # Passes both tests.
4906ac_preproc_ok=:
4907break
4908fi
4909rm -f conftest.err conftest.i conftest.$ac_ext
4910
4911done
4912# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4913rm -f conftest.i conftest.err conftest.$ac_ext
4914if $ac_preproc_ok; then :
4915  break
4916fi
4917
4918    done
4919    ac_cv_prog_CPP=$CPP
4920
4921fi
4922  CPP=$ac_cv_prog_CPP
4923else
4924  ac_cv_prog_CPP=$CPP
4925fi
4926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4927$as_echo "$CPP" >&6; }
4928ac_preproc_ok=false
4929for ac_c_preproc_warn_flag in '' yes
4930do
4931  # Use a header file that comes with gcc, so configuring glibc
4932  # with a fresh cross-compiler works.
4933  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4934  # <limits.h> exists even on freestanding compilers.
4935  # On the NeXT, cc -E runs the code through the compiler's parser,
4936  # not just through cpp. "Syntax error" is here to catch this case.
4937  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4938/* end confdefs.h.  */
4939#ifdef __STDC__
4940# include <limits.h>
4941#else
4942# include <assert.h>
4943#endif
4944		     Syntax error
4945_ACEOF
4946if ac_fn_c_try_cpp "$LINENO"; then :
4947
4948else
4949  # Broken: fails on valid input.
4950continue
4951fi
4952rm -f conftest.err conftest.i conftest.$ac_ext
4953
4954  # OK, works on sane cases.  Now check whether nonexistent headers
4955  # can be detected and how.
4956  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4957/* end confdefs.h.  */
4958#include <ac_nonexistent.h>
4959_ACEOF
4960if ac_fn_c_try_cpp "$LINENO"; then :
4961  # Broken: success on invalid input.
4962continue
4963else
4964  # Passes both tests.
4965ac_preproc_ok=:
4966break
4967fi
4968rm -f conftest.err conftest.i conftest.$ac_ext
4969
4970done
4971# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4972rm -f conftest.i conftest.err conftest.$ac_ext
4973if $ac_preproc_ok; then :
4974
4975else
4976  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4978as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4979See \`config.log' for more details" "$LINENO" 5; }
4980fi
4981
4982ac_ext=c
4983ac_cpp='$CPP $CPPFLAGS'
4984ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4985ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4986ac_compiler_gnu=$ac_cv_c_compiler_gnu
4987
4988
4989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4990$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4991if ${ac_cv_path_GREP+:} false; then :
4992  $as_echo_n "(cached) " >&6
4993else
4994  if test -z "$GREP"; then
4995  ac_path_GREP_found=false
4996  # Loop through the user's path and test for each of PROGNAME-LIST
4997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4998for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4999do
5000  IFS=$as_save_IFS
5001  test -z "$as_dir" && as_dir=.
5002    for ac_prog in grep ggrep; do
5003    for ac_exec_ext in '' $ac_executable_extensions; do
5004      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5005      as_fn_executable_p "$ac_path_GREP" || continue
5006# Check for GNU ac_path_GREP and select it if it is found.
5007  # Check for GNU $ac_path_GREP
5008case `"$ac_path_GREP" --version 2>&1` in
5009*GNU*)
5010  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5011*)
5012  ac_count=0
5013  $as_echo_n 0123456789 >"conftest.in"
5014  while :
5015  do
5016    cat "conftest.in" "conftest.in" >"conftest.tmp"
5017    mv "conftest.tmp" "conftest.in"
5018    cp "conftest.in" "conftest.nl"
5019    $as_echo 'GREP' >> "conftest.nl"
5020    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5021    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5022    as_fn_arith $ac_count + 1 && ac_count=$as_val
5023    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5024      # Best one so far, save it but keep looking for a better one
5025      ac_cv_path_GREP="$ac_path_GREP"
5026      ac_path_GREP_max=$ac_count
5027    fi
5028    # 10*(2^10) chars as input seems more than enough
5029    test $ac_count -gt 10 && break
5030  done
5031  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5032esac
5033
5034      $ac_path_GREP_found && break 3
5035    done
5036  done
5037  done
5038IFS=$as_save_IFS
5039  if test -z "$ac_cv_path_GREP"; then
5040    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5041  fi
5042else
5043  ac_cv_path_GREP=$GREP
5044fi
5045
5046fi
5047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5048$as_echo "$ac_cv_path_GREP" >&6; }
5049 GREP="$ac_cv_path_GREP"
5050
5051
5052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5053$as_echo_n "checking for egrep... " >&6; }
5054if ${ac_cv_path_EGREP+:} false; then :
5055  $as_echo_n "(cached) " >&6
5056else
5057  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5058   then ac_cv_path_EGREP="$GREP -E"
5059   else
5060     if test -z "$EGREP"; then
5061  ac_path_EGREP_found=false
5062  # Loop through the user's path and test for each of PROGNAME-LIST
5063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5064for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5065do
5066  IFS=$as_save_IFS
5067  test -z "$as_dir" && as_dir=.
5068    for ac_prog in egrep; do
5069    for ac_exec_ext in '' $ac_executable_extensions; do
5070      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5071      as_fn_executable_p "$ac_path_EGREP" || continue
5072# Check for GNU ac_path_EGREP and select it if it is found.
5073  # Check for GNU $ac_path_EGREP
5074case `"$ac_path_EGREP" --version 2>&1` in
5075*GNU*)
5076  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5077*)
5078  ac_count=0
5079  $as_echo_n 0123456789 >"conftest.in"
5080  while :
5081  do
5082    cat "conftest.in" "conftest.in" >"conftest.tmp"
5083    mv "conftest.tmp" "conftest.in"
5084    cp "conftest.in" "conftest.nl"
5085    $as_echo 'EGREP' >> "conftest.nl"
5086    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5087    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5088    as_fn_arith $ac_count + 1 && ac_count=$as_val
5089    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5090      # Best one so far, save it but keep looking for a better one
5091      ac_cv_path_EGREP="$ac_path_EGREP"
5092      ac_path_EGREP_max=$ac_count
5093    fi
5094    # 10*(2^10) chars as input seems more than enough
5095    test $ac_count -gt 10 && break
5096  done
5097  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5098esac
5099
5100      $ac_path_EGREP_found && break 3
5101    done
5102  done
5103  done
5104IFS=$as_save_IFS
5105  if test -z "$ac_cv_path_EGREP"; then
5106    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5107  fi
5108else
5109  ac_cv_path_EGREP=$EGREP
5110fi
5111
5112   fi
5113fi
5114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5115$as_echo "$ac_cv_path_EGREP" >&6; }
5116 EGREP="$ac_cv_path_EGREP"
5117
5118
5119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5120$as_echo_n "checking for ANSI C header files... " >&6; }
5121if ${ac_cv_header_stdc+:} false; then :
5122  $as_echo_n "(cached) " >&6
5123else
5124  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5125/* end confdefs.h.  */
5126#include <stdlib.h>
5127#include <stdarg.h>
5128#include <string.h>
5129#include <float.h>
5130
5131int
5132main ()
5133{
5134
5135  ;
5136  return 0;
5137}
5138_ACEOF
5139if ac_fn_c_try_compile "$LINENO"; then :
5140  ac_cv_header_stdc=yes
5141else
5142  ac_cv_header_stdc=no
5143fi
5144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5145
5146if test $ac_cv_header_stdc = yes; then
5147  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5148  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5149/* end confdefs.h.  */
5150#include <string.h>
5151
5152_ACEOF
5153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5154  $EGREP "memchr" >/dev/null 2>&1; then :
5155
5156else
5157  ac_cv_header_stdc=no
5158fi
5159rm -f conftest*
5160
5161fi
5162
5163if test $ac_cv_header_stdc = yes; then
5164  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5165  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5166/* end confdefs.h.  */
5167#include <stdlib.h>
5168
5169_ACEOF
5170if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5171  $EGREP "free" >/dev/null 2>&1; then :
5172
5173else
5174  ac_cv_header_stdc=no
5175fi
5176rm -f conftest*
5177
5178fi
5179
5180if test $ac_cv_header_stdc = yes; then
5181  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5182  if test "$cross_compiling" = yes; then :
5183  :
5184else
5185  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5186/* end confdefs.h.  */
5187#include <ctype.h>
5188#include <stdlib.h>
5189#if ((' ' & 0x0FF) == 0x020)
5190# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5191# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5192#else
5193# define ISLOWER(c) \
5194		   (('a' <= (c) && (c) <= 'i') \
5195		     || ('j' <= (c) && (c) <= 'r') \
5196		     || ('s' <= (c) && (c) <= 'z'))
5197# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5198#endif
5199
5200#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5201int
5202main ()
5203{
5204  int i;
5205  for (i = 0; i < 256; i++)
5206    if (XOR (islower (i), ISLOWER (i))
5207	|| toupper (i) != TOUPPER (i))
5208      return 2;
5209  return 0;
5210}
5211_ACEOF
5212if ac_fn_c_try_run "$LINENO"; then :
5213
5214else
5215  ac_cv_header_stdc=no
5216fi
5217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5218  conftest.$ac_objext conftest.beam conftest.$ac_ext
5219fi
5220
5221fi
5222fi
5223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5224$as_echo "$ac_cv_header_stdc" >&6; }
5225if test $ac_cv_header_stdc = yes; then
5226
5227$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5228
5229fi
5230
5231# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5232for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5233		  inttypes.h stdint.h unistd.h
5234do :
5235  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5236ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5237"
5238if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5239  cat >>confdefs.h <<_ACEOF
5240#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5241_ACEOF
5242
5243fi
5244
5245done
5246
5247
5248for ac_header in sys/ioccom.h sys/sockio.h
5249do :
5250  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5251ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5252if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5253  cat >>confdefs.h <<_ACEOF
5254#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5255_ACEOF
5256
5257fi
5258
5259done
5260
5261for ac_header in netpacket/packet.h
5262do :
5263  ac_fn_c_check_header_mongrel "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "$ac_includes_default"
5264if test "x$ac_cv_header_netpacket_packet_h" = xyes; then :
5265  cat >>confdefs.h <<_ACEOF
5266#define HAVE_NETPACKET_PACKET_H 1
5267_ACEOF
5268
5269fi
5270
5271done
5272
5273for ac_header in net/pfvar.h
5274do :
5275  ac_fn_c_check_header_compile "$LINENO" "net/pfvar.h" "ac_cv_header_net_pfvar_h" "#include <sys/types.h>
5276#include <sys/socket.h>
5277#include <net/if.h>
5278"
5279if test "x$ac_cv_header_net_pfvar_h" = xyes; then :
5280  cat >>confdefs.h <<_ACEOF
5281#define HAVE_NET_PFVAR_H 1
5282_ACEOF
5283
5284fi
5285
5286done
5287
5288if test "$ac_cv_header_net_pfvar_h" = yes; then
5289	#
5290	# Check for various PF actions.
5291	#
5292	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether net/pfvar.h defines PF_NAT through PF_NORDR" >&5
5293$as_echo_n "checking whether net/pfvar.h defines PF_NAT through PF_NORDR... " >&6; }
5294	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5295/* end confdefs.h.  */
5296#include <sys/types.h>
5297	    #include <sys/socket.h>
5298	    #include <net/if.h>
5299	    #include <net/pfvar.h>
5300int
5301main ()
5302{
5303return PF_NAT+PF_NONAT+PF_BINAT+PF_NOBINAT+PF_RDR+PF_NORDR;
5304  ;
5305  return 0;
5306}
5307_ACEOF
5308if ac_fn_c_try_compile "$LINENO"; then :
5309
5310		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5311$as_echo "yes" >&6; }
5312
5313$as_echo "#define HAVE_PF_NAT_THROUGH_PF_NORDR 1" >>confdefs.h
5314
5315
5316else
5317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5318$as_echo "no" >&6; }
5319fi
5320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5321fi
5322
5323case "$host_os" in
5324haiku*)
5325	#
5326	# Haiku needs _BSD_SOURCE for the _IO* macros because it doesn't use them.
5327	#
5328	CFLAGS="$CFLAGS -D_BSD_SOURCE"
5329	;;
5330esac
5331
5332if test "$GCC" = yes ; then
5333	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI ioctl definitions" >&5
5334$as_echo_n "checking for ANSI ioctl definitions... " >&6; }
5335	    if ${ac_cv_lbl_gcc_fixincludes+:} false; then :
5336  $as_echo_n "(cached) " >&6
5337else
5338  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5339/* end confdefs.h.  */
5340/*
5341		     * This generates a "duplicate case value" when fixincludes
5342		     * has not be run.
5343		     */
5344#		include <sys/types.h>
5345#		include <sys/time.h>
5346#		include <sys/ioctl.h>
5347#		ifdef HAVE_SYS_IOCCOM_H
5348#		include <sys/ioccom.h>
5349#		endif
5350int
5351main ()
5352{
5353switch (0) {
5354		    case _IO('A', 1):;
5355		    case _IO('B', 1):;
5356		    }
5357  ;
5358  return 0;
5359}
5360_ACEOF
5361if ac_fn_c_try_compile "$LINENO"; then :
5362  ac_cv_lbl_gcc_fixincludes=yes
5363else
5364  ac_cv_lbl_gcc_fixincludes=no
5365fi
5366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5367fi
5368
5369	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_gcc_fixincludes" >&5
5370$as_echo "$ac_cv_lbl_gcc_fixincludes" >&6; }
5371	    if test $ac_cv_lbl_gcc_fixincludes = no ; then
5372		    # Don't cache failure
5373		    unset ac_cv_lbl_gcc_fixincludes
5374		    as_fn_error $? "see the INSTALL for more info" "$LINENO" 5
5375	    fi
5376    fi
5377
5378for ac_func in strerror
5379do :
5380  ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
5381if test "x$ac_cv_func_strerror" = xyes; then :
5382  cat >>confdefs.h <<_ACEOF
5383#define HAVE_STRERROR 1
5384_ACEOF
5385
5386fi
5387done
5388
5389ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
5390if test "x$ac_cv_func_strerror_r" = xyes; then :
5391
5392	#
5393	# We have strerror_r; if we define _GNU_SOURCE, is it a
5394	# POSIX-compliant strerror_r() or a GNU strerror_r()?
5395	#
5396	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r is GNU-style" >&5
5397$as_echo_n "checking whether strerror_r is GNU-style... " >&6; }
5398	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5399/* end confdefs.h.  */
5400
5401		#define _GNU_SOURCE
5402#include <string.h>
5403
5404/* Define it GNU-style; that will cause an error if it's not GNU-style */
5405extern char *strerror_r(int, char *, size_t);
5406
5407int
5408main(void)
5409{
5410	return 0;
5411}
5412
5413
5414_ACEOF
5415if ac_fn_c_try_compile "$LINENO"; then :
5416
5417	        # GNU-style
5418		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5419$as_echo "yes" >&6; }
5420
5421$as_echo "#define HAVE_GNU_STRERROR_R /**/" >>confdefs.h
5422
5423
5424else
5425
5426		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5427$as_echo "no" >&6; }
5428
5429$as_echo "#define HAVE_POSIX_STRERROR_R /**/" >>confdefs.h
5430
5431
5432fi
5433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5434
5435else
5436
5437	#
5438	# We don't have strerror_r; do we have _wcserror_s?
5439	#
5440	for ac_func in _wcserror_s
5441do :
5442  ac_fn_c_check_func "$LINENO" "_wcserror_s" "ac_cv_func__wcserror_s"
5443if test "x$ac_cv_func__wcserror_s" = xyes; then :
5444  cat >>confdefs.h <<_ACEOF
5445#define HAVE__WCSERROR_S 1
5446_ACEOF
5447
5448fi
5449done
5450
5451
5452fi
5453
5454
5455#
5456# Thanks, IBM, for not providing vsyslog() in AIX!
5457#
5458for ac_func in vsyslog
5459do :
5460  ac_fn_c_check_func "$LINENO" "vsyslog" "ac_cv_func_vsyslog"
5461if test "x$ac_cv_func_vsyslog" = xyes; then :
5462  cat >>confdefs.h <<_ACEOF
5463#define HAVE_VSYSLOG 1
5464_ACEOF
5465
5466fi
5467done
5468
5469
5470#
5471# Make sure we have vsnprintf() and snprintf(); we require them.
5472#
5473ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
5474if test "x$ac_cv_func_vsnprintf" = xyes; then :
5475
5476else
5477  as_fn_error $? "vsnprintf() is required but wasn't found" "$LINENO" 5
5478fi
5479
5480ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
5481if test "x$ac_cv_func_snprintf" = xyes; then :
5482
5483else
5484  as_fn_error $? "snprintf() is required but wasn't found" "$LINENO" 5
5485fi
5486
5487
5488needasprintf=no
5489for ac_func in vasprintf asprintf
5490do :
5491  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5492ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5493if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5494  cat >>confdefs.h <<_ACEOF
5495#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5496_ACEOF
5497
5498else
5499  needasprintf=yes
5500fi
5501done
5502
5503if test $needasprintf = yes; then
5504	case " $LIBOBJS " in
5505  *" asprintf.$ac_objext "* ) ;;
5506  *) LIBOBJS="$LIBOBJS asprintf.$ac_objext"
5507 ;;
5508esac
5509
5510fi
5511
5512needstrlcat=no
5513for ac_func in strlcat
5514do :
5515  ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
5516if test "x$ac_cv_func_strlcat" = xyes; then :
5517  cat >>confdefs.h <<_ACEOF
5518#define HAVE_STRLCAT 1
5519_ACEOF
5520
5521else
5522  needstrlcat=yes
5523fi
5524done
5525
5526if test $needstrlcat = yes; then
5527	case " $LIBOBJS " in
5528  *" strlcat.$ac_objext "* ) ;;
5529  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
5530 ;;
5531esac
5532
5533fi
5534
5535needstrlcpy=no
5536for ac_func in strlcpy
5537do :
5538  ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
5539if test "x$ac_cv_func_strlcpy" = xyes; then :
5540  cat >>confdefs.h <<_ACEOF
5541#define HAVE_STRLCPY 1
5542_ACEOF
5543
5544else
5545  needstrlcpy=yes
5546fi
5547done
5548
5549if test $needstrlcpy = yes; then
5550	case " $LIBOBJS " in
5551  *" strlcpy.$ac_objext "* ) ;;
5552  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
5553 ;;
5554esac
5555
5556fi
5557
5558needstrtok_r=no
5559for ac_func in strtok_r
5560do :
5561  ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
5562if test "x$ac_cv_func_strtok_r" = xyes; then :
5563  cat >>confdefs.h <<_ACEOF
5564#define HAVE_STRTOK_R 1
5565_ACEOF
5566
5567else
5568  needstrtok_r=yes
5569fi
5570done
5571
5572if test $needstrtok_r = yes; then
5573	case " $LIBOBJS " in
5574  *" strtok_r.$ac_objext "* ) ;;
5575  *) LIBOBJS="$LIBOBJS strtok_r.$ac_objext"
5576 ;;
5577esac
5578
5579fi
5580
5581#
5582# Do we have ffs(), and is it declared in <strings.h>?
5583#
5584for ac_func in ffs
5585do :
5586  ac_fn_c_check_func "$LINENO" "ffs" "ac_cv_func_ffs"
5587if test "x$ac_cv_func_ffs" = xyes; then :
5588  cat >>confdefs.h <<_ACEOF
5589#define HAVE_FFS 1
5590_ACEOF
5591
5592fi
5593done
5594
5595if test "$ac_cv_func_ffs" = yes; then
5596	#
5597	# We have ffs(); is it declared in <strings.h>?
5598	#
5599	# This test fails if we don't have <strings.h> or if we do
5600	# but it doesn't declare ffs().
5601	#
5602	ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "
5603#include <strings.h>
5604
5605"
5606if test "x$ac_cv_have_decl_ffs" = xyes; then :
5607
5608
5609$as_echo "#define STRINGS_H_DECLARES_FFS /**/" >>confdefs.h
5610
5611
5612fi
5613
5614fi
5615
5616#
5617# Do this before checking for ether_hostton(), as it's a
5618# "getaddrinfo()-ish function".
5619#
5620
5621    #
5622    # Most operating systems have getaddrinfo() in the default searched
5623    # libraries (i.e. libc).  Check there first.
5624    #
5625    ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
5626if test "x$ac_cv_func_getaddrinfo" = xyes; then :
5627
5628else
5629
5630	#
5631	# Not found in the standard system libraries.
5632	# Try libsocket, which requires libnsl.
5633	#
5634	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lsocket" >&5
5635$as_echo_n "checking for getaddrinfo in -lsocket... " >&6; }
5636if ${ac_cv_lib_socket_getaddrinfo+:} false; then :
5637  $as_echo_n "(cached) " >&6
5638else
5639  ac_check_lib_save_LIBS=$LIBS
5640LIBS="-lsocket -lnsl $LIBS"
5641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5642/* end confdefs.h.  */
5643
5644/* Override any GCC internal prototype to avoid an error.
5645   Use char because int might match the return type of a GCC
5646   builtin and then its argument prototype would still apply.  */
5647#ifdef __cplusplus
5648extern "C"
5649#endif
5650char getaddrinfo ();
5651int
5652main ()
5653{
5654return getaddrinfo ();
5655  ;
5656  return 0;
5657}
5658_ACEOF
5659if ac_fn_c_try_link "$LINENO"; then :
5660  ac_cv_lib_socket_getaddrinfo=yes
5661else
5662  ac_cv_lib_socket_getaddrinfo=no
5663fi
5664rm -f core conftest.err conftest.$ac_objext \
5665    conftest$ac_exeext conftest.$ac_ext
5666LIBS=$ac_check_lib_save_LIBS
5667fi
5668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getaddrinfo" >&5
5669$as_echo "$ac_cv_lib_socket_getaddrinfo" >&6; }
5670if test "x$ac_cv_lib_socket_getaddrinfo" = xyes; then :
5671
5672	    #
5673	    # OK, we found it in libsocket.
5674	    #
5675	    LIBS="-lsocket -lnsl $LIBS"
5676
5677else
5678
5679		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lnetwork" >&5
5680$as_echo_n "checking for getaddrinfo in -lnetwork... " >&6; }
5681if ${ac_cv_lib_network_getaddrinfo+:} false; then :
5682  $as_echo_n "(cached) " >&6
5683else
5684  ac_check_lib_save_LIBS=$LIBS
5685LIBS="-lnetwork  $LIBS"
5686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5687/* end confdefs.h.  */
5688
5689/* Override any GCC internal prototype to avoid an error.
5690   Use char because int might match the return type of a GCC
5691   builtin and then its argument prototype would still apply.  */
5692#ifdef __cplusplus
5693extern "C"
5694#endif
5695char getaddrinfo ();
5696int
5697main ()
5698{
5699return getaddrinfo ();
5700  ;
5701  return 0;
5702}
5703_ACEOF
5704if ac_fn_c_try_link "$LINENO"; then :
5705  ac_cv_lib_network_getaddrinfo=yes
5706else
5707  ac_cv_lib_network_getaddrinfo=no
5708fi
5709rm -f core conftest.err conftest.$ac_objext \
5710    conftest$ac_exeext conftest.$ac_ext
5711LIBS=$ac_check_lib_save_LIBS
5712fi
5713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_getaddrinfo" >&5
5714$as_echo "$ac_cv_lib_network_getaddrinfo" >&6; }
5715if test "x$ac_cv_lib_network_getaddrinfo" = xyes; then :
5716
5717		    #
5718		    # OK, we found it in libnetwork on Haiku.
5719		    #
5720		    LIBS="-lnetwork $LIBS"
5721
5722else
5723
5724		    #
5725		    # We didn't find it.
5726		    #
5727		    as_fn_error $? "getaddrinfo is required, but wasn't found" "$LINENO" 5
5728
5729fi
5730
5731
5732fi
5733
5734
5735	#
5736	# OK, do we have recvmsg() in libxnet?
5737	# We also link with libsocket and libnsl.
5738	#
5739	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for recvmsg in -lxnet" >&5
5740$as_echo_n "checking for recvmsg in -lxnet... " >&6; }
5741if ${ac_cv_lib_xnet_recvmsg+:} false; then :
5742  $as_echo_n "(cached) " >&6
5743else
5744  ac_check_lib_save_LIBS=$LIBS
5745LIBS="-lxnet -lsocket -lnsl $LIBS"
5746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5747/* end confdefs.h.  */
5748
5749/* Override any GCC internal prototype to avoid an error.
5750   Use char because int might match the return type of a GCC
5751   builtin and then its argument prototype would still apply.  */
5752#ifdef __cplusplus
5753extern "C"
5754#endif
5755char recvmsg ();
5756int
5757main ()
5758{
5759return recvmsg ();
5760  ;
5761  return 0;
5762}
5763_ACEOF
5764if ac_fn_c_try_link "$LINENO"; then :
5765  ac_cv_lib_xnet_recvmsg=yes
5766else
5767  ac_cv_lib_xnet_recvmsg=no
5768fi
5769rm -f core conftest.err conftest.$ac_objext \
5770    conftest$ac_exeext conftest.$ac_ext
5771LIBS=$ac_check_lib_save_LIBS
5772fi
5773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_recvmsg" >&5
5774$as_echo "$ac_cv_lib_xnet_recvmsg" >&6; }
5775if test "x$ac_cv_lib_xnet_recvmsg" = xyes; then :
5776
5777	    #
5778	    # Yes - link with it as well.
5779	    #
5780	    LIBS="-lxnet $LIBS"
5781
5782fi
5783
5784
5785fi
5786
5787    # DLPI needs putmsg under HPUX so test for -lstr while we're at it
5788    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing putmsg" >&5
5789$as_echo_n "checking for library containing putmsg... " >&6; }
5790if ${ac_cv_search_putmsg+:} false; then :
5791  $as_echo_n "(cached) " >&6
5792else
5793  ac_func_search_save_LIBS=$LIBS
5794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5795/* end confdefs.h.  */
5796
5797/* Override any GCC internal prototype to avoid an error.
5798   Use char because int might match the return type of a GCC
5799   builtin and then its argument prototype would still apply.  */
5800#ifdef __cplusplus
5801extern "C"
5802#endif
5803char putmsg ();
5804int
5805main ()
5806{
5807return putmsg ();
5808  ;
5809  return 0;
5810}
5811_ACEOF
5812for ac_lib in '' str; do
5813  if test -z "$ac_lib"; then
5814    ac_res="none required"
5815  else
5816    ac_res=-l$ac_lib
5817    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
5818  fi
5819  if ac_fn_c_try_link "$LINENO"; then :
5820  ac_cv_search_putmsg=$ac_res
5821fi
5822rm -f core conftest.err conftest.$ac_objext \
5823    conftest$ac_exeext
5824  if ${ac_cv_search_putmsg+:} false; then :
5825  break
5826fi
5827done
5828if ${ac_cv_search_putmsg+:} false; then :
5829
5830else
5831  ac_cv_search_putmsg=no
5832fi
5833rm conftest.$ac_ext
5834LIBS=$ac_func_search_save_LIBS
5835fi
5836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_putmsg" >&5
5837$as_echo "$ac_cv_search_putmsg" >&6; }
5838ac_res=$ac_cv_search_putmsg
5839if test "$ac_res" != no; then :
5840  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5841
5842fi
5843
5844
5845
5846#
5847# Check for reentrant versions of getnetbyname_r(), as provided by
5848# Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!).
5849# If we don't find one, we just use getnetbyname(), which uses
5850# thread-specific data on many platforms, but doesn't use it on
5851# NetBSD or OpenBSD, and may not use it on older versions of other
5852# platforms.
5853#
5854# Only do the check if we have a declaration of getnetbyname_r();
5855# without it, we can't check which API it has.  (We assume that
5856# if there's a declaration, it has a prototype, so that the API
5857# can be checked.)
5858#
5859ac_fn_c_check_decl "$LINENO" "getnetbyname_r" "ac_cv_have_decl_getnetbyname_r" "#include <netdb.h>
5860"
5861if test "x$ac_cv_have_decl_getnetbyname_r" = xyes; then :
5862
5863	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getnetbyname_r()" >&5
5864$as_echo_n "checking for the Linux getnetbyname_r()... " >&6; }
5865	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5866/* end confdefs.h.  */
5867#include <netdb.h>
5868int
5869main ()
5870{
5871
5872		struct netent netent_buf;
5873		char buf[1024];
5874		struct netent *resultp;
5875		int h_errnoval;
5876
5877		return getnetbyname_r((const char *)0, &netent_buf, buf, sizeof buf, &resultp, &h_errnoval);
5878
5879  ;
5880  return 0;
5881}
5882_ACEOF
5883if ac_fn_c_try_link "$LINENO"; then :
5884
5885		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5886$as_echo "yes" >&6; }
5887
5888$as_echo "#define HAVE_LINUX_GETNETBYNAME_R 1" >>confdefs.h
5889
5890
5891else
5892
5893		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5894$as_echo "no" >&6; }
5895
5896		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getnetbyname_r()" >&5
5897$as_echo_n "checking for Solaris/IRIX getnetbyname_r()... " >&6; }
5898		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5899/* end confdefs.h.  */
5900#include <netdb.h>
5901int
5902main ()
5903{
5904
5905			struct netent netent_buf;
5906			char buf[1024];
5907
5908			return getnetbyname_r((const char *)0, &netent_buf, buf, (int)sizeof buf) != NULL;
5909
5910  ;
5911  return 0;
5912}
5913_ACEOF
5914if ac_fn_c_try_link "$LINENO"; then :
5915
5916			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5917$as_echo "yes" >&6; }
5918
5919$as_echo "#define HAVE_SOLARIS_IRIX_GETNETBYNAME_R 1" >>confdefs.h
5920
5921
5922else
5923
5924			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5925$as_echo "no" >&6; }
5926
5927			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX getnetbyname_r()" >&5
5928$as_echo_n "checking for AIX getnetbyname_r()... " >&6; }
5929			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5930/* end confdefs.h.  */
5931#include <netdb.h>
5932int
5933main ()
5934{
5935
5936				struct netent netent_buf;
5937				struct netent_data net_data;
5938
5939				return getnetbyname_r((const char *)0, &netent_buf, &net_data);
5940
5941  ;
5942  return 0;
5943}
5944_ACEOF
5945if ac_fn_c_try_link "$LINENO"; then :
5946
5947				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5948$as_echo "yes" >&6; }
5949
5950$as_echo "#define HAVE_AIX_GETNETBYNAME_R 1" >>confdefs.h
5951
5952
5953else
5954
5955				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5956$as_echo "no" >&6; }
5957
5958fi
5959rm -f core conftest.err conftest.$ac_objext \
5960    conftest$ac_exeext conftest.$ac_ext
5961
5962fi
5963rm -f core conftest.err conftest.$ac_objext \
5964    conftest$ac_exeext conftest.$ac_ext
5965
5966fi
5967rm -f core conftest.err conftest.$ac_objext \
5968    conftest$ac_exeext conftest.$ac_ext
5969
5970fi
5971
5972
5973#
5974# Check for reentrant versions of getprotobyname_r(), as provided by
5975# Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!).
5976# If we don't find one, we just use getprotobyname(), which uses
5977# thread-specific data on many platforms, but doesn't use it on
5978# NetBSD or OpenBSD, and may not use it on older versions of other
5979# platforms.
5980#
5981# Only do the check if we have a declaration of getprotobyname_r();
5982# without it, we can't check which API it has.  (We assume that
5983# if there's a declaration, it has a prototype, so that the API
5984# can be checked.)
5985#
5986ac_fn_c_check_decl "$LINENO" "getprotobyname_r" "ac_cv_have_decl_getprotobyname_r" "#include <netdb.h>
5987"
5988if test "x$ac_cv_have_decl_getprotobyname_r" = xyes; then :
5989
5990	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getprotobyname_r()" >&5
5991$as_echo_n "checking for the Linux getprotobyname_r()... " >&6; }
5992	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5993/* end confdefs.h.  */
5994#include <netdb.h>
5995int
5996main ()
5997{
5998
5999		struct protoent protoent_buf;
6000		char buf[1024];
6001		struct protoent *resultp;
6002
6003		return getprotobyname_r((const char *)0, &protoent_buf, buf, sizeof buf, &resultp);
6004
6005  ;
6006  return 0;
6007}
6008_ACEOF
6009if ac_fn_c_try_link "$LINENO"; then :
6010
6011		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6012$as_echo "yes" >&6; }
6013
6014$as_echo "#define HAVE_LINUX_GETPROTOBYNAME_R 1" >>confdefs.h
6015
6016
6017else
6018
6019		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6020$as_echo "no" >&6; }
6021
6022		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getprotobyname_r()" >&5
6023$as_echo_n "checking for Solaris/IRIX getprotobyname_r()... " >&6; }
6024		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6025/* end confdefs.h.  */
6026#include <netdb.h>
6027int
6028main ()
6029{
6030
6031			struct protoent protoent_buf;
6032			char buf[1024];
6033
6034			return getprotobyname_r((const char *)0, &protoent_buf, buf, (int)sizeof buf) != NULL;
6035
6036  ;
6037  return 0;
6038}
6039_ACEOF
6040if ac_fn_c_try_link "$LINENO"; then :
6041
6042			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6043$as_echo "yes" >&6; }
6044
6045$as_echo "#define HAVE_SOLARIS_IRIX_GETPROTOBYNAME_R 1" >>confdefs.h
6046
6047
6048else
6049
6050			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6051$as_echo "no" >&6; }
6052
6053			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX getprotobyname_r()" >&5
6054$as_echo_n "checking for AIX getprotobyname_r()... " >&6; }
6055			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6056/* end confdefs.h.  */
6057#include <netdb.h>
6058int
6059main ()
6060{
6061
6062				struct protoent protoent_buf;
6063				struct protoent_data proto_data;
6064
6065				return getprotobyname_r((const char *)0, &protoent_buf, &proto_data);
6066
6067  ;
6068  return 0;
6069}
6070_ACEOF
6071if ac_fn_c_try_link "$LINENO"; then :
6072
6073				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6074$as_echo "yes" >&6; }
6075
6076$as_echo "#define HAVE_AIX_GETPROTOBYNAME_R 1" >>confdefs.h
6077
6078
6079else
6080
6081				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6082$as_echo "no" >&6; }
6083
6084fi
6085rm -f core conftest.err conftest.$ac_objext \
6086    conftest$ac_exeext conftest.$ac_ext
6087
6088fi
6089rm -f core conftest.err conftest.$ac_objext \
6090    conftest$ac_exeext conftest.$ac_ext
6091
6092fi
6093rm -f core conftest.err conftest.$ac_objext \
6094    conftest$ac_exeext conftest.$ac_ext
6095
6096fi
6097
6098
6099#
6100# You are in a twisty little maze of UN*Xes, all different.
6101# Some might not have ether_hostton().
6102# Some might have it and declare it in <net/ethernet.h>.
6103# Some might have it and declare it in <netinet/ether.h>
6104# Some might have it and declare it in <sys/ethernet.h>.
6105# Some might have it and declare it in <arpa/inet.h>.
6106# Some might have it and declare it in <netinet/if_ether.h>.
6107# Some might have it and not declare it in any header file.
6108#
6109# Before you is a C compiler.
6110#
6111for ac_func in ether_hostton
6112do :
6113  ac_fn_c_check_func "$LINENO" "ether_hostton" "ac_cv_func_ether_hostton"
6114if test "x$ac_cv_func_ether_hostton" = xyes; then :
6115  cat >>confdefs.h <<_ACEOF
6116#define HAVE_ETHER_HOSTTON 1
6117_ACEOF
6118
6119fi
6120done
6121
6122if test "$ac_cv_func_ether_hostton" = yes; then
6123	#
6124	# OK, we have ether_hostton().  Is it declared in <net/ethernet.h>?
6125	#
6126	# This test fails if we don't have <net/ethernet.h> or if we do
6127	# but it doesn't declare ether_hostton().
6128	#
6129	ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6130#include <net/ethernet.h>
6131
6132"
6133if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6134
6135
6136$as_echo "#define NET_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6137
6138
6139fi
6140
6141	#
6142	# Did that succeed?
6143	#
6144	if test "$ac_cv_have_decl_ether_hostton" != yes; then
6145		#
6146		# No, how about <netinet/ether.h>, as on Linux?
6147		#
6148		# This test fails if we don't have <netinet/ether.h>
6149		# or if we do but it doesn't declare ether_hostton().
6150		#
6151		# Unset ac_cv_have_decl_ether_hostton so we don't
6152		# treat the previous failure as a cached value and
6153		# suppress the next test.
6154		#
6155		unset ac_cv_have_decl_ether_hostton
6156		ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6157#include <netinet/ether.h>
6158
6159"
6160if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6161
6162
6163$as_echo "#define NETINET_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6164
6165
6166fi
6167
6168	fi
6169	#
6170	# Did that succeed?
6171	#
6172	if test "$ac_cv_have_decl_ether_hostton" != yes; then
6173		#
6174		# No, how about <sys/ethernet.h>, as on Solaris 10
6175		# and later?
6176		#
6177		# This test fails if we don't have <sys/ethernet.h>
6178		# or if we do but it doesn't declare ether_hostton().
6179		#
6180		# Unset ac_cv_have_decl_ether_hostton so we don't
6181		# treat the previous failure as a cached value and
6182		# suppress the next test.
6183		#
6184		unset ac_cv_have_decl_ether_hostton
6185		ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6186#include <sys/ethernet.h>
6187
6188"
6189if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6190
6191
6192$as_echo "#define SYS_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6193
6194
6195fi
6196
6197	fi
6198	#
6199	# Did that succeed?
6200	#
6201	if test "$ac_cv_have_decl_ether_hostton" != yes; then
6202		#
6203		# No, how about <arpa/inet.h>, as in AIX?
6204		#
6205		# This test fails if we don't have <arpa/inet.h>
6206		# (if we have ether_hostton(), we should have
6207		# networking, and if we have networking, we should
6208		# have <arapa/inet.h>) or if we do but it doesn't
6209		# declare ether_hostton().
6210		#
6211		# Unset ac_cv_have_decl_ether_hostton so we don't
6212		# treat the previous failure as a cached value and
6213		# suppress the next test.
6214		#
6215		unset ac_cv_have_decl_ether_hostton
6216		ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6217#include <arpa/inet.h>
6218
6219"
6220if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6221
6222
6223$as_echo "#define ARPA_INET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6224
6225
6226fi
6227
6228	fi
6229	#
6230	# Did that succeed?
6231	#
6232	if test "$ac_cv_have_decl_ether_hostton" != yes; then
6233		#
6234		# No, how about <netinet/if_ether.h>?
6235		# On some platforms, it requires <net/if.h> and
6236		# <netinet/in.h>, and we always include it with
6237		# both of them, so test it with both of them.
6238		#
6239		# This test fails if we don't have <netinet/if_ether.h>
6240		# and the headers we include before it, or if we do but
6241		# <netinet/if_ether.h> doesn't declare ether_hostton().
6242		#
6243		# Unset ac_cv_have_decl_ether_hostton so we don't
6244		# treat the previous failure as a cached value and
6245		# suppress the next test.
6246		#
6247		unset ac_cv_have_decl_ether_hostton
6248		ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6249#include <sys/types.h>
6250#include <sys/socket.h>
6251#include <net/if.h>
6252#include <netinet/in.h>
6253#include <netinet/if_ether.h>
6254
6255"
6256if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6257
6258
6259$as_echo "#define NETINET_IF_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6260
6261
6262fi
6263
6264	fi
6265	#
6266	# After all that, is ether_hostton() declared?
6267	#
6268	if test "$ac_cv_have_decl_ether_hostton" = yes; then
6269		#
6270		# Yes.
6271		#
6272
6273$as_echo "#define HAVE_DECL_ETHER_HOSTTON 1" >>confdefs.h
6274
6275        else
6276		#
6277		# No, we'll have to declare it ourselves.
6278		# Do we have "struct ether_addr" if we include
6279		# <netinet/if_ether.h>?
6280		#
6281		ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" "
6282			#include <sys/types.h>
6283			#include <sys/socket.h>
6284			#include <net/if.h>
6285			#include <netinet/in.h>
6286			#include <netinet/if_ether.h>
6287
6288"
6289if test "x$ac_cv_type_struct_ether_addr" = xyes; then :
6290
6291cat >>confdefs.h <<_ACEOF
6292#define HAVE_STRUCT_ETHER_ADDR 1
6293_ACEOF
6294
6295
6296fi
6297
6298	fi
6299fi
6300
6301#
6302# For various things that might use pthreads.
6303#
6304ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
6305if test "x$ac_cv_header_pthread_h" = xyes; then :
6306
6307	#
6308	# OK, we have pthread.h.  Do we have pthread_create in the
6309	# system libraries?
6310	#
6311	ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create"
6312if test "x$ac_cv_func_pthread_create" = xyes; then :
6313
6314		#
6315		# Yes.
6316		#
6317		ac_lbl_have_pthreads="found"
6318
6319else
6320
6321		#
6322		# No - do we have it in -lpthreads?
6323		#
6324		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
6325$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
6326if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
6327  $as_echo_n "(cached) " >&6
6328else
6329  ac_check_lib_save_LIBS=$LIBS
6330LIBS="-lpthreads  $LIBS"
6331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6332/* end confdefs.h.  */
6333
6334/* Override any GCC internal prototype to avoid an error.
6335   Use char because int might match the return type of a GCC
6336   builtin and then its argument prototype would still apply.  */
6337#ifdef __cplusplus
6338extern "C"
6339#endif
6340char pthread_create ();
6341int
6342main ()
6343{
6344return pthread_create ();
6345  ;
6346  return 0;
6347}
6348_ACEOF
6349if ac_fn_c_try_link "$LINENO"; then :
6350  ac_cv_lib_pthreads_pthread_create=yes
6351else
6352  ac_cv_lib_pthreads_pthread_create=no
6353fi
6354rm -f core conftest.err conftest.$ac_objext \
6355    conftest$ac_exeext conftest.$ac_ext
6356LIBS=$ac_check_lib_save_LIBS
6357fi
6358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
6359$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
6360if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
6361
6362			#
6363			# Yes - add -lpthreads.
6364			#
6365			ac_lbl_have_pthreads="found"
6366			PTHREAD_LIBS="$PTHREAD_LIBS -lpthreads"
6367
6368else
6369
6370			#
6371			# No - do we have it in -lpthread?
6372			#
6373			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
6374$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
6375if ${ac_cv_lib_pthread_pthread_create+:} false; then :
6376  $as_echo_n "(cached) " >&6
6377else
6378  ac_check_lib_save_LIBS=$LIBS
6379LIBS="-lpthread  $LIBS"
6380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6381/* end confdefs.h.  */
6382
6383/* Override any GCC internal prototype to avoid an error.
6384   Use char because int might match the return type of a GCC
6385   builtin and then its argument prototype would still apply.  */
6386#ifdef __cplusplus
6387extern "C"
6388#endif
6389char pthread_create ();
6390int
6391main ()
6392{
6393return pthread_create ();
6394  ;
6395  return 0;
6396}
6397_ACEOF
6398if ac_fn_c_try_link "$LINENO"; then :
6399  ac_cv_lib_pthread_pthread_create=yes
6400else
6401  ac_cv_lib_pthread_pthread_create=no
6402fi
6403rm -f core conftest.err conftest.$ac_objext \
6404    conftest$ac_exeext conftest.$ac_ext
6405LIBS=$ac_check_lib_save_LIBS
6406fi
6407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
6408$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
6409if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
6410
6411				#
6412				# Yes - add -lpthread.
6413				#
6414                                ac_lbl_have_pthreads="found"
6415				PTHREAD_LIBS="$PTHREAD_LIBS -lpthread"
6416
6417else
6418
6419				#
6420				# No.
6421				#
6422				ac_lbl_have_pthreads="not found"
6423
6424fi
6425
6426
6427fi
6428
6429
6430fi
6431
6432
6433else
6434
6435	#
6436	# We didn't find pthread.h.
6437	#
6438	ac_lbl_have_pthreads="not found"
6439
6440
6441fi
6442
6443
6444
6445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --disable-protochain option is specified" >&5
6446$as_echo_n "checking if --disable-protochain option is specified... " >&6; }
6447# Check whether --enable-protochain was given.
6448if test "${enable_protochain+set}" = set; then :
6449  enableval=$enable_protochain;
6450fi
6451
6452case "x$enable_protochain" in
6453xyes)	enable_protochain=enabled	;;
6454xno)	enable_protochain=disabled	;;
6455x)	enable_protochain=enabled	;;
6456esac
6457
6458if test "$enable_protochain" = "disabled"; then
6459
6460$as_echo "#define NO_PROTOCHAIN 1" >>confdefs.h
6461
6462fi
6463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_protochain}" >&5
6464$as_echo "${enable_protochain}" >&6; }
6465
6466#
6467# valgrindtest directly uses the native capture mechanism, but
6468# only tests with BPF and PF_PACKET sockets; only enable it if
6469# we have BPF or PF_PACKET sockets.
6470#
6471VALGRINDTEST_SRC=
6472
6473
6474# Check whether --with-pcap was given.
6475if test "${with_pcap+set}" = set; then :
6476  withval=$with_pcap;
6477fi
6478
6479if test ! -z "$with_pcap" ; then
6480	V_PCAP="$withval"
6481else
6482	#
6483	# Check for a bunch of headers for various packet
6484	# capture mechanisms.
6485	#
6486	for ac_header in net/bpf.h
6487do :
6488  ac_fn_c_check_header_mongrel "$LINENO" "net/bpf.h" "ac_cv_header_net_bpf_h" "$ac_includes_default"
6489if test "x$ac_cv_header_net_bpf_h" = xyes; then :
6490  cat >>confdefs.h <<_ACEOF
6491#define HAVE_NET_BPF_H 1
6492_ACEOF
6493
6494fi
6495
6496done
6497
6498	if test "$ac_cv_header_net_bpf_h" = yes; then
6499		#
6500		# Does it define BIOCSETIF?
6501		# I.e., is it a header for an LBL/BSD-style capture
6502		# mechanism, or is it just a header for a BPF filter
6503		# engine?  Some versions of Arch Linux, for example,
6504		# have a net/bpf.h that doesn't define BIOCSETIF;
6505		# as it's a Linux, it should use packet sockets,
6506		# instead.
6507		#
6508		# We need:
6509		#
6510		#  sys/types.h, because FreeBSD 10's net/bpf.h
6511		#  requires that various BSD-style integer types
6512		#  be defined;
6513		#
6514		#  sys/time.h, because AIX 5.2 and 5.3's net/bpf.h
6515		#  doesn't include it but does use struct timeval
6516		#  in ioctl definitions;
6517		#
6518		#  sys/ioctl.h and, if we have it, sys/ioccom.h,
6519		#  because net/bpf.h defines ioctls;
6520		#
6521		#  net/if.h, because it defines some structures
6522		#  used in ioctls defined by net/bpf.h;
6523		#
6524		#  sys/socket.h, because OpenBSD 5.9's net/bpf.h
6525		#  defines some structure fields as being
6526		#  struct sockaddrs;
6527		#
6528		# and net/bpf.h doesn't necessarily include all
6529		# of those headers itself.
6530		#
6531		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if net/bpf.h defines BIOCSETIF" >&5
6532$as_echo_n "checking if net/bpf.h defines BIOCSETIF... " >&6; }
6533		if ${ac_cv_lbl_bpf_h_defines_biocsetif+:} false; then :
6534  $as_echo_n "(cached) " >&6
6535else
6536  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6537/* end confdefs.h.  */
6538
6539#include <sys/types.h>
6540#include <sys/time.h>
6541#include <sys/ioctl.h>
6542#include <sys/socket.h>
6543#ifdef HAVE_SYS_IOCCOM_H
6544#include <sys/ioccom.h>
6545#endif
6546#include <net/bpf.h>
6547#include <net/if.h>
6548
6549int
6550main ()
6551{
6552u_int i = BIOCSETIF;
6553  ;
6554  return 0;
6555}
6556_ACEOF
6557if ac_fn_c_try_compile "$LINENO"; then :
6558  ac_cv_lbl_bpf_h_defines_biocsetif=yes
6559else
6560  ac_cv_lbl_bpf_h_defines_biocsetif=no
6561fi
6562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6563fi
6564
6565		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_bpf_h_defines_biocsetif" >&5
6566$as_echo "$ac_cv_lbl_bpf_h_defines_biocsetif" >&6; }
6567	fi
6568	for ac_header in net/pfilt.h net/enet.h
6569do :
6570  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6571ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6572if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6573  cat >>confdefs.h <<_ACEOF
6574#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6575_ACEOF
6576
6577fi
6578
6579done
6580
6581	for ac_header in net/nit.h sys/net/nit.h
6582do :
6583  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6584ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6585if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6586  cat >>confdefs.h <<_ACEOF
6587#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6588_ACEOF
6589
6590fi
6591
6592done
6593
6594	for ac_header in linux/socket.h net/raw.h sys/dlpi.h
6595do :
6596  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6597ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6598if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6599  cat >>confdefs.h <<_ACEOF
6600#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6601_ACEOF
6602
6603fi
6604
6605done
6606
6607	for ac_header in config/HaikuConfig.h
6608do :
6609  ac_fn_c_check_header_mongrel "$LINENO" "config/HaikuConfig.h" "ac_cv_header_config_HaikuConfig_h" "$ac_includes_default"
6610if test "x$ac_cv_header_config_HaikuConfig_h" = xyes; then :
6611  cat >>confdefs.h <<_ACEOF
6612#define HAVE_CONFIG_HAIKUCONFIG_H 1
6613_ACEOF
6614
6615fi
6616
6617done
6618
6619
6620	if test "$ac_cv_lbl_bpf_h_defines_biocsetif" = yes; then
6621		#
6622		# BPF.
6623		# Check this before DLPI, so that we pick BPF on
6624		# Solaris 11 and later.
6625		#
6626		V_PCAP=bpf
6627
6628		#
6629		# We have BPF, so build valgrindtest with "make test"
6630		# on macOS and FreeBSD (add your OS once there's a
6631		# valgrind for it).
6632		#
6633		case "$host_os" in
6634
6635		freebsd*|darwin*|linux*)
6636			VALGRINDTEST_SRC=valgrindtest.c
6637			;;
6638		esac
6639	elif test "$ac_cv_header_linux_socket_h" = yes; then
6640		#
6641		# No prizes for guessing this one.
6642		#
6643		V_PCAP=linux
6644		VALGRINDTEST_SRC=valgrindtest.c
6645	elif test "$ac_cv_header_net_pfilt_h" = yes; then
6646	        #
6647	        # DEC OSF/1, Digital UNIX, Tru64 UNIX
6648        	#
6649		V_PCAP=pf
6650	elif test "$ac_cv_header_net_enet_h" = yes; then
6651		#
6652		# Stanford Enetfilter.
6653		#
6654		V_PCAP=enet
6655	elif test "$ac_cv_header_net_nit_h" = yes; then
6656		#
6657		# SunOS 4.x STREAMS NIT.
6658		#
6659		V_PCAP=snit
6660	elif test "$ac_cv_header_sys_net_nit_h" = yes; then
6661		#
6662		# Pre-SunOS 4.x non-STREAMS NIT.
6663		#
6664		V_PCAP=nit
6665	elif test "$ac_cv_header_net_raw_h" = yes; then
6666		#
6667		# IRIX snoop.
6668		#
6669		V_PCAP=snoop
6670	elif test "$ac_cv_header_sys_dlpi_h" = yes; then
6671		#
6672		# DLPI on pre-Solaris 11 SunOS 5, HP-UX, possibly others.
6673		#
6674		V_PCAP=dlpi
6675	elif test "$ac_cv_header_config_HaikuConfig_h" = yes; then
6676		#
6677		# Haiku.
6678		#
6679		V_PCAP=haiku
6680	else
6681		#
6682		# Nothing we support.
6683		#
6684		V_PCAP=null
6685		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine packet capture interface" >&5
6686$as_echo "$as_me: WARNING: cannot determine packet capture interface" >&2;}
6687		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: (see the INSTALL doc for more info)" >&5
6688$as_echo "$as_me: WARNING: (see the INSTALL doc for more info)" >&2;}
6689	fi
6690fi
6691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking packet capture type" >&5
6692$as_echo_n "checking packet capture type... " >&6; }
6693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $V_PCAP" >&5
6694$as_echo "$V_PCAP" >&6; }
6695
6696
6697#
6698# Do we have pkg-config?
6699#
6700# Extract the first word of "pkg-config", so it can be a program name with args.
6701set dummy pkg-config; ac_word=$2
6702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6703$as_echo_n "checking for $ac_word... " >&6; }
6704if ${ac_cv_prog_PKGCONFIG+:} false; then :
6705  $as_echo_n "(cached) " >&6
6706else
6707  if test -n "$PKGCONFIG"; then
6708  ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
6709else
6710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6711for as_dir in $PATH
6712do
6713  IFS=$as_save_IFS
6714  test -z "$as_dir" && as_dir=.
6715    for ac_exec_ext in '' $ac_executable_extensions; do
6716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6717    ac_cv_prog_PKGCONFIG="pkg-config"
6718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6719    break 2
6720  fi
6721done
6722  done
6723IFS=$as_save_IFS
6724
6725  test -z "$ac_cv_prog_PKGCONFIG" && ac_cv_prog_PKGCONFIG="no"
6726fi
6727fi
6728PKGCONFIG=$ac_cv_prog_PKGCONFIG
6729if test -n "$PKGCONFIG"; then
6730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
6731$as_echo "$PKGCONFIG" >&6; }
6732else
6733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6734$as_echo "no" >&6; }
6735fi
6736
6737
6738
6739#
6740# Handle each capture type.
6741#
6742case "$V_PCAP" in
6743dlpi)
6744	#
6745	# Checks for some header files.
6746	#
6747	for ac_header in sys/bufmod.h sys/dlpi_ext.h
6748do :
6749  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6750ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6751if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6752  cat >>confdefs.h <<_ACEOF
6753#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6754_ACEOF
6755
6756fi
6757
6758done
6759
6760
6761	#
6762	# Checks to see if Solaris has the public libdlpi(3LIB) library.
6763	# Note: The existence of /usr/include/libdlpi.h does not mean it is the
6764	# public libdlpi(3LIB) version. Before libdlpi was made public, a
6765	# private version also existed, which did not have the same APIs.
6766	# Due to a gcc bug, the default search path for 32-bit libraries does
6767	# not include /lib, we add it explicitly here.
6768	# [http://bugs.opensolaris.org/view_bug.do?bug_id=6619485].
6769	# Also, due to the bug above applications that link to libpcap with
6770	# libdlpi will have to add "-L/lib" option to "configure".
6771	#
6772	save_LDFLAGS="$LDFLAGS"
6773	LDFLAGS="$LIBS -L/lib"
6774	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5
6775$as_echo_n "checking for dlpi_walk in -ldlpi... " >&6; }
6776if ${ac_cv_lib_dlpi_dlpi_walk+:} false; then :
6777  $as_echo_n "(cached) " >&6
6778else
6779  ac_check_lib_save_LIBS=$LIBS
6780LIBS="-ldlpi  $LIBS"
6781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6782/* end confdefs.h.  */
6783
6784/* Override any GCC internal prototype to avoid an error.
6785   Use char because int might match the return type of a GCC
6786   builtin and then its argument prototype would still apply.  */
6787#ifdef __cplusplus
6788extern "C"
6789#endif
6790char dlpi_walk ();
6791int
6792main ()
6793{
6794return dlpi_walk ();
6795  ;
6796  return 0;
6797}
6798_ACEOF
6799if ac_fn_c_try_link "$LINENO"; then :
6800  ac_cv_lib_dlpi_dlpi_walk=yes
6801else
6802  ac_cv_lib_dlpi_dlpi_walk=no
6803fi
6804rm -f core conftest.err conftest.$ac_objext \
6805    conftest$ac_exeext conftest.$ac_ext
6806LIBS=$ac_check_lib_save_LIBS
6807fi
6808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5
6809$as_echo "$ac_cv_lib_dlpi_dlpi_walk" >&6; }
6810if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes; then :
6811
6812			LIBS="-ldlpi $LIBS"
6813			V_PCAP=libdlpi
6814
6815			#
6816			# Capture module plus common code needed for
6817			# common functions used by pcap-[dlpi,libdlpi].c
6818			#
6819			PLATFORM_C_SRC="pcap-libdlpi.c dlpisubs.c"
6820
6821$as_echo "#define HAVE_LIBDLPI 1" >>confdefs.h
6822
6823
6824else
6825
6826			V_PCAP=dlpi
6827
6828			#
6829			# Capture module plus common code needed for
6830			# common functions used by pcap-[dlpi,libdlpi].c
6831			#
6832			PLATFORM_C_SRC="pcap-dlpi.c dlpisubs.c"
6833
6834fi
6835
6836	LDFLAGS="$save_LDFLAGS"
6837
6838	#
6839	# Checks whether <sys/dlpi.h> is usable, to catch weird SCO
6840	# versions of DLPI.
6841	#
6842	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/dlpi.h> is usable" >&5
6843$as_echo_n "checking whether <sys/dlpi.h> is usable... " >&6; }
6844	if ${ac_cv_sys_dlpi_usable+:} false; then :
6845  $as_echo_n "(cached) " >&6
6846else
6847  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6848/* end confdefs.h.  */
6849
6850			#include <sys/types.h>
6851			#include <sys/time.h>
6852			#include <sys/dlpi.h>
6853
6854int
6855main ()
6856{
6857int i = DL_PROMISC_PHYS;
6858  ;
6859  return 0;
6860}
6861_ACEOF
6862if ac_fn_c_try_compile "$LINENO"; then :
6863  ac_cv_sys_dlpi_usable=yes
6864else
6865  ac_cv_sys_dlpi_usable=no
6866fi
6867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6868fi
6869
6870	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_dlpi_usable" >&5
6871$as_echo "$ac_cv_sys_dlpi_usable" >&6; }
6872	if test $ac_cv_sys_dlpi_usable = no ; then
6873		as_fn_error $? "<sys/dlpi.h> is not usable on this system; it probably has a non-standard DLPI" "$LINENO" 5
6874	fi
6875
6876	#
6877	# Check to see if Solaris has the dl_passive_req_t struct defined
6878	# in <sys/dlpi.h>.
6879	# This check is for DLPI support for passive modes.
6880	# See dlpi(7P) for more details.
6881	#
6882	ac_fn_c_check_type "$LINENO" "dl_passive_req_t" "ac_cv_type_dl_passive_req_t" "
6883		#include <sys/types.h>
6884		#include <sys/dlpi.h>
6885
6886"
6887if test "x$ac_cv_type_dl_passive_req_t" = xyes; then :
6888
6889cat >>confdefs.h <<_ACEOF
6890#define HAVE_DL_PASSIVE_REQ_T 1
6891_ACEOF
6892
6893
6894fi
6895
6896	;;
6897
6898enet)
6899	#
6900	# Capture module
6901	#
6902 	PLATFORM_C_SRC="pcap-enet.c"
6903	;;
6904
6905haiku)
6906	#
6907	# Capture module
6908	#
6909 	PLATFORM_CXX_SRC="pcap-haiku.cpp"
6910
6911	#
6912	# Just for the sake of it.
6913	#
6914	for ac_header in net/if.h net/if_dl.h net/if_types.h
6915do :
6916  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6917ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6918if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6919  cat >>confdefs.h <<_ACEOF
6920#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6921_ACEOF
6922
6923fi
6924
6925done
6926
6927	;;
6928
6929linux)
6930	#
6931	# Capture module
6932	#
6933 	PLATFORM_C_SRC="pcap-linux.c"
6934
6935	#
6936	# Do we have the wireless extensions?
6937	#
6938	for ac_header in linux/wireless.h
6939do :
6940  ac_fn_c_check_header_compile "$LINENO" "linux/wireless.h" "ac_cv_header_linux_wireless_h" "
6941#include <sys/socket.h>
6942#include <linux/if.h>
6943#include <linux/types.h>
6944
6945"
6946if test "x$ac_cv_header_linux_wireless_h" = xyes; then :
6947  cat >>confdefs.h <<_ACEOF
6948#define HAVE_LINUX_WIRELESS_H 1
6949_ACEOF
6950
6951fi
6952
6953done
6954
6955
6956	#
6957	# Do we have libnl?
6958	# We only want version 3.  Version 2 was, apparently,
6959	# short-lived, and version 1 is source and binary
6960	# incompatible with version 3, and it appears that,
6961	# these days, everybody's using version 3.  We're
6962	# not supporting older versions of the Linux kernel;
6963	# let's drop support for older versions of libnl, too.
6964	#
6965
6966# Check whether --with-libnl was given.
6967if test "${with_libnl+set}" = set; then :
6968  withval=$with_libnl; with_libnl=$withval
6969else
6970  with_libnl=if_available
6971fi
6972
6973
6974	if test x$with_libnl != xno ; then
6975		if test "x$PKGCONFIG" != "xno"; then
6976			#
6977			# We have pkg-config; see if we have libnl-genl-3.0
6978			# as a package.
6979			#
6980			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnl-genl-3.0 with pkg-config" >&5
6981$as_echo_n "checking for libnl-genl-3.0 with pkg-config... " >&6; }
6982			if "$PKGCONFIG" libnl-genl-3.0; then
6983				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
6984$as_echo "found" >&6; }
6985				pkg_config_found_libnl=yes
6986				libnl_genl_cflags=`"$PKGCONFIG" --cflags libnl-genl-3.0`
6987				V_INCLS="$V_INCLS ${libnl_genl_cflags}"
6988				libnl_genl_libs=`"$PKGCONFIG" --libs libnl-genl-3.0`
6989				LIBS="${libnl_genl_libs} $LIBS"
6990
6991$as_echo "#define HAVE_LIBNL 1" >>confdefs.h
6992
6993			else
6994				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6995$as_echo "not found" >&6; }
6996			fi
6997		fi
6998
6999		if test x$pkg_config_found_libnl != xyes; then
7000			#
7001			# OK, either we don't have pkg-config or there
7002			# wasn't a .pc file for it; Check for it directly.
7003			#
7004			case "$with_libnl" in
7005
7006			yes|if_available)
7007				incdir=-I/usr/include/libnl3
7008				libnldir=
7009				;;
7010
7011			*)
7012				if test -d $withval; then
7013					libnldir=-L${withval}/lib
7014					incdir=-I${withval}/include
7015				fi
7016				;;
7017			esac
7018
7019			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl-3" >&5
7020$as_echo_n "checking for nl_socket_alloc in -lnl-3... " >&6; }
7021if ${ac_cv_lib_nl_3_nl_socket_alloc+:} false; then :
7022  $as_echo_n "(cached) " >&6
7023else
7024  ac_check_lib_save_LIBS=$LIBS
7025LIBS="-lnl-3 ${incdir} ${libnldir} -lnl-genl-3 -lnl-3  $LIBS"
7026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7027/* end confdefs.h.  */
7028
7029/* Override any GCC internal prototype to avoid an error.
7030   Use char because int might match the return type of a GCC
7031   builtin and then its argument prototype would still apply.  */
7032#ifdef __cplusplus
7033extern "C"
7034#endif
7035char nl_socket_alloc ();
7036int
7037main ()
7038{
7039return nl_socket_alloc ();
7040  ;
7041  return 0;
7042}
7043_ACEOF
7044if ac_fn_c_try_link "$LINENO"; then :
7045  ac_cv_lib_nl_3_nl_socket_alloc=yes
7046else
7047  ac_cv_lib_nl_3_nl_socket_alloc=no
7048fi
7049rm -f core conftest.err conftest.$ac_objext \
7050    conftest$ac_exeext conftest.$ac_ext
7051LIBS=$ac_check_lib_save_LIBS
7052fi
7053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_3_nl_socket_alloc" >&5
7054$as_echo "$ac_cv_lib_nl_3_nl_socket_alloc" >&6; }
7055if test "x$ac_cv_lib_nl_3_nl_socket_alloc" = xyes; then :
7056
7057				#
7058				# Yes, we have libnl 3.x.
7059				#
7060				LIBS="${libnldir} -lnl-genl-3 -lnl-3 $LIBS"
7061
7062$as_echo "#define HAVE_LIBNL 1" >>confdefs.h
7063
7064				V_INCLS="$V_INCLS ${incdir}"
7065
7066else
7067
7068				#
7069				# No, we don't have libnl at all.
7070				# Fail if the user explicitly requested
7071				# it.
7072				#
7073				if test x$with_libnl = xyes ; then
7074					as_fn_error $? "libnl support requested but libnl not found" "$LINENO" 5
7075				fi
7076
7077fi
7078
7079		fi
7080	fi
7081
7082	#
7083	# Check to see if the tpacket_auxdata struct has a tp_vlan_tci member.
7084	#
7085	# NOTE: any failure means we conclude that it doesn't have that
7086	# member, so if we don't have tpacket_auxdata, we conclude it
7087	# doesn't have that member (which is OK, as either we won't be
7088	# using code that would use that member, or we wouldn't compile
7089	# in any case).
7090	ac_fn_c_check_member "$LINENO" "struct tpacket_auxdata" "tp_vlan_tci" "ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" "
7091		#include <sys/types.h>
7092		#include <linux/if_packet.h>
7093
7094"
7095if test "x$ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" = xyes; then :
7096
7097cat >>confdefs.h <<_ACEOF
7098#define HAVE_STRUCT_TPACKET_AUXDATA_TP_VLAN_TCI 1
7099_ACEOF
7100
7101
7102fi
7103
7104	;;
7105
7106bpf)
7107	#
7108	# Capture module
7109	#
7110 	PLATFORM_C_SRC="pcap-bpf.c"
7111
7112	#
7113	# Check whether we have the *BSD-style ioctls.
7114	#
7115	for ac_header in net/if_media.h
7116do :
7117  ac_fn_c_check_header_mongrel "$LINENO" "net/if_media.h" "ac_cv_header_net_if_media_h" "$ac_includes_default"
7118if test "x$ac_cv_header_net_if_media_h" = xyes; then :
7119  cat >>confdefs.h <<_ACEOF
7120#define HAVE_NET_IF_MEDIA_H 1
7121_ACEOF
7122
7123fi
7124
7125done
7126
7127
7128	#
7129	# Check whether we have struct BPF_TIMEVAL.
7130	#
7131	ac_fn_c_check_type "$LINENO" "struct BPF_TIMEVAL" "ac_cv_type_struct_BPF_TIMEVAL" "
7132		#include <sys/types.h>
7133		#include <sys/ioctl.h>
7134		#ifdef HAVE_SYS_IOCCOM_H
7135		#include <sys/ioccom.h>
7136		#endif
7137		#include <net/bpf.h>
7138
7139"
7140if test "x$ac_cv_type_struct_BPF_TIMEVAL" = xyes; then :
7141
7142cat >>confdefs.h <<_ACEOF
7143#define HAVE_STRUCT_BPF_TIMEVAL 1
7144_ACEOF
7145
7146
7147fi
7148
7149	;;
7150
7151pf)
7152	#
7153	# Capture module
7154	#
7155 	PLATFORM_C_SRC="pcap-pf.c"
7156	;;
7157
7158snit)
7159	#
7160	# Capture module
7161	#
7162 	PLATFORM_C_SRC="pcap-snit.c"
7163	;;
7164
7165snoop)
7166	#
7167	# Capture module
7168	#
7169 	PLATFORM_C_SRC="pcap-snoop.c"
7170	;;
7171
7172dag)
7173	#
7174	# --with-pcap=dag is the only way to get here, and it means
7175	# "DAG support but nothing else"
7176	#
7177	V_DEFS="$V_DEFS -DDAG_ONLY"
7178	PLATFORM_C_SRC="pcap-dag.c"
7179	xxx_only=yes
7180	;;
7181
7182dpdk)
7183	#
7184	# --with-pcap=dpdk is the only way to get here, and it means
7185	# "DPDK support but nothing else"
7186	#
7187	V_DEFS="$V_DEFS -DDPDK_ONLY"
7188	PLATFORM_C_SRC="pcap-dpdk.c"
7189	xxx_only=yes
7190	;;
7191
7192septel)
7193	#
7194	# --with-pcap=septel is the only way to get here, and it means
7195	# "Septel support but nothing else"
7196	#
7197	V_DEFS="$V_DEFS -DSEPTEL_ONLY"
7198	PLATFORM_C_SRC="pcap-septel.c"
7199	xxx_only=yes
7200	;;
7201
7202snf)
7203	#
7204	# --with-pcap=snf is the only way to get here, and it means
7205	# "SNF support but nothing else"
7206	#
7207	V_DEFS="$V_DEFS -DSNF_ONLY"
7208	PLATFORM_C_SRC="pcap-snf.c"
7209	xxx_only=yes
7210	;;
7211
7212null)
7213	#
7214	# Capture module
7215	#
7216 	PLATFORM_C_SRC="pcap-null.c"
7217	;;
7218
7219*)
7220	as_fn_error $? "$V_PCAP is not a valid pcap type" "$LINENO" 5
7221	;;
7222esac
7223
7224if test "$V_PCAP" != null
7225then
7226	ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
7227if test "x$ac_cv_func_getifaddrs" = xyes; then :
7228
7229		#
7230		# We have "getifaddrs()"; make sure we have <ifaddrs.h>
7231		# as well, just in case some platform is really weird.
7232		#
7233		ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default"
7234if test "x$ac_cv_header_ifaddrs_h" = xyes; then :
7235
7236		    #
7237		    # We have the header, so we use "getifaddrs()" to
7238		    # get the list of interfaces.
7239		    #
7240		    PLATFORM_C_SRC="$PLATFORM_C_SRC fad-getad.c"
7241
7242else
7243
7244		    #
7245		    # We don't have the header - give up.
7246		    # XXX - we could also fall back on some other
7247		    # mechanism, but, for now, this'll catch this
7248		    # problem so that we can at least try to figure
7249		    # out something to do on systems with "getifaddrs()"
7250		    # but without "ifaddrs.h", if there is something
7251		    # we can do on those systems.
7252		    #
7253		    as_fn_error $? "Your system has getifaddrs() but doesn't have a usable <ifaddrs.h>." "$LINENO" 5
7254
7255fi
7256
7257
7258
7259else
7260
7261		#
7262		# Well, we don't have "getifaddrs()", at least not with the
7263		# libraries with which we've decided we need to link
7264		# libpcap with, so we have to use some other mechanism.
7265		#
7266		# Note that this may happen on Solaris, which has
7267		# getifaddrs(), but in -lsocket, not in -lxnet, so we
7268		# won't find it if we link with -lxnet, which we want
7269		# to do for other reasons.
7270		#
7271		# For now, we use either the SIOCGIFCONF ioctl or the
7272		# SIOCGLIFCONF ioctl, preferring the latter if we have
7273		# it; the latter is a Solarisism that first appeared
7274		# in Solaris 8.  (Solaris's getifaddrs() appears to
7275		# be built atop SIOCGLIFCONF; using it directly
7276		# avoids a not-all-that-useful middleman.)
7277		#
7278		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have SIOCGLIFCONF" >&5
7279$as_echo_n "checking whether we have SIOCGLIFCONF... " >&6; }
7280		if ${ac_cv_lbl_have_siocglifconf+:} false; then :
7281  $as_echo_n "(cached) " >&6
7282else
7283  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7284/* end confdefs.h.  */
7285#include <sys/param.h>
7286			#include <sys/file.h>
7287			#include <sys/ioctl.h>
7288			#include <sys/socket.h>
7289			#include <sys/sockio.h>
7290int
7291main ()
7292{
7293ioctl(0, SIOCGLIFCONF, (char *)0);
7294  ;
7295  return 0;
7296}
7297_ACEOF
7298if ac_fn_c_try_compile "$LINENO"; then :
7299  ac_cv_lbl_have_siocglifconf=yes
7300else
7301  ac_cv_lbl_have_siocglifconf=no
7302fi
7303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7304fi
7305
7306		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_have_siocglifconf" >&5
7307$as_echo "$ac_cv_lbl_have_siocglifconf" >&6; }
7308		if test $ac_cv_lbl_have_siocglifconf = yes ; then
7309			PLATFORM_C_SRC="$PLATFORM_C_SRC fad-glifc.c"
7310		else
7311			PLATFORM_C_SRC="$PLATFORM_C_SRC fad-gifc.c"
7312		fi
7313
7314fi
7315
7316fi
7317
7318case "$host_os" in
7319linux*)
7320	for ac_header in linux/net_tstamp.h
7321do :
7322  ac_fn_c_check_header_mongrel "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default"
7323if test "x$ac_cv_header_linux_net_tstamp_h" = xyes; then :
7324  cat >>confdefs.h <<_ACEOF
7325#define HAVE_LINUX_NET_TSTAMP_H 1
7326_ACEOF
7327
7328fi
7329
7330done
7331
7332	;;
7333*)
7334	{ $as_echo "$as_me:${as_lineno-$LINENO}: no hardware timestamp support implemented for $host_os" >&5
7335$as_echo "$as_me: no hardware timestamp support implemented for $host_os" >&6;}
7336	;;
7337esac
7338
7339#
7340# Check for socklen_t.
7341#
7342ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
7343	#include <sys/types.h>
7344	#include <sys/socket.h>
7345
7346"
7347if test "x$ac_cv_type_socklen_t" = xyes; then :
7348
7349cat >>confdefs.h <<_ACEOF
7350#define HAVE_SOCKLEN_T 1
7351_ACEOF
7352
7353
7354fi
7355
7356
7357# Check whether --enable-ipv6 was given.
7358if test "${enable_ipv6+set}" = set; then :
7359  enableval=$enable_ipv6;
7360else
7361  enable_ipv6=yes
7362fi
7363
7364if test "$enable_ipv6" != "no"; then
7365	#
7366	# We've already made sure we have getaddrinfo above in
7367	# AC_LBL_LIBRARY_NET.
7368	#
7369
7370$as_echo "#define INET6 1" >>confdefs.h
7371
7372fi
7373
7374# Check for Endace DAG card support.
7375
7376# Check whether --with-dag was given.
7377if test "${with_dag+set}" = set; then :
7378  withval=$with_dag;
7379	if test "$withval" = no
7380	then
7381		# User doesn't want DAG support.
7382		want_dag=no
7383	elif test "$withval" = yes
7384	then
7385		# User wants DAG support but hasn't specified a directory.
7386		want_dag=yes
7387	else
7388		# User wants DAG support and has specified a directory, so use the provided value.
7389		want_dag=yes
7390		dag_root=$withval
7391	fi
7392
7393else
7394
7395	if test "$V_PCAP" = dag; then
7396		# User requested DAG-only libpcap, so we'd better have
7397		# the DAG API.
7398		want_dag=yes
7399	elif test "xxx_only" = yes; then
7400		# User requested something-else-only pcap, so they don't
7401		# want DAG support.
7402		want_dag=no
7403	else
7404		#
7405		# Use DAG API if present, otherwise don't
7406		#
7407		want_dag=ifpresent
7408	fi
7409
7410fi
7411
7412
7413
7414# Check whether --with-dag-includes was given.
7415if test "${with_dag_includes+set}" = set; then :
7416  withval=$with_dag_includes;
7417	# User wants DAG support and has specified a header directory, so use the provided value.
7418	want_dag=yes
7419	dag_include_dir=$withval
7420
7421fi
7422
7423
7424
7425# Check whether --with-dag-libraries was given.
7426if test "${with_dag_libraries+set}" = set; then :
7427  withval=$with_dag_libraries;
7428	# User wants DAG support and has specified a library directory, so use the provided value.
7429	want_dag=yes
7430	dag_lib_dir=$withval
7431
7432fi
7433
7434
7435if test "$want_dag" != no; then
7436
7437	# If necessary, set default paths for DAG API headers and libraries.
7438	if test -z "$dag_root"; then
7439		dag_root=/usr/local
7440	fi
7441
7442	if test -z "$dag_include_dir"; then
7443		dag_include_dir="$dag_root/include"
7444	fi
7445
7446	if test -z "$dag_lib_dir"; then
7447		dag_lib_dir="$dag_root/lib"
7448		#
7449		# Handle multiarch systems.
7450		#
7451		if test -d "$dag_lib_dir/$host"
7452		then
7453			dag_lib_dir="$dag_lib_dir/$host"
7454		fi
7455	fi
7456
7457	save_CFLAGS="$CFLAGS"
7458	CFLAGS="$CFLAGS -I$dag_include_dir"
7459	for ac_header in dagapi.h
7460do :
7461  ac_fn_c_check_header_mongrel "$LINENO" "dagapi.h" "ac_cv_header_dagapi_h" "$ac_includes_default"
7462if test "x$ac_cv_header_dagapi_h" = xyes; then :
7463  cat >>confdefs.h <<_ACEOF
7464#define HAVE_DAGAPI_H 1
7465_ACEOF
7466
7467fi
7468
7469done
7470
7471
7472	if test "$ac_cv_header_dagapi_h" = yes; then
7473
7474		V_INCLS="$V_INCLS -I$dag_include_dir"
7475
7476		if test $V_PCAP != dag ; then
7477			 MODULE_C_SRC="$MODULE_C_SRC pcap-dag.c"
7478		fi
7479
7480		# Check for various DAG API functions.
7481		# Don't need to save and restore LIBS to prevent -ldag being
7482		# included if there's a found-action (arg 3).
7483		save_LDFLAGS="$LDFLAGS"
7484		LDFLAGS="-L$dag_lib_dir"
7485		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream in -ldag" >&5
7486$as_echo_n "checking for dag_attach_stream in -ldag... " >&6; }
7487if ${ac_cv_lib_dag_dag_attach_stream+:} false; then :
7488  $as_echo_n "(cached) " >&6
7489else
7490  ac_check_lib_save_LIBS=$LIBS
7491LIBS="-ldag  $LIBS"
7492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7493/* end confdefs.h.  */
7494
7495/* Override any GCC internal prototype to avoid an error.
7496   Use char because int might match the return type of a GCC
7497   builtin and then its argument prototype would still apply.  */
7498#ifdef __cplusplus
7499extern "C"
7500#endif
7501char dag_attach_stream ();
7502int
7503main ()
7504{
7505return dag_attach_stream ();
7506  ;
7507  return 0;
7508}
7509_ACEOF
7510if ac_fn_c_try_link "$LINENO"; then :
7511  ac_cv_lib_dag_dag_attach_stream=yes
7512else
7513  ac_cv_lib_dag_dag_attach_stream=no
7514fi
7515rm -f core conftest.err conftest.$ac_objext \
7516    conftest$ac_exeext conftest.$ac_ext
7517LIBS=$ac_check_lib_save_LIBS
7518fi
7519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream" >&5
7520$as_echo "$ac_cv_lib_dag_dag_attach_stream" >&6; }
7521if test "x$ac_cv_lib_dag_dag_attach_stream" = xyes; then :
7522  cat >>confdefs.h <<_ACEOF
7523#define HAVE_LIBDAG 1
7524_ACEOF
7525
7526  LIBS="-ldag $LIBS"
7527
7528else
7529  as_fn_error $? "DAG library lacks streams support" "$LINENO" 5
7530fi
7531
7532		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream64 in -ldag" >&5
7533$as_echo_n "checking for dag_attach_stream64 in -ldag... " >&6; }
7534if ${ac_cv_lib_dag_dag_attach_stream64+:} false; then :
7535  $as_echo_n "(cached) " >&6
7536else
7537  ac_check_lib_save_LIBS=$LIBS
7538LIBS="-ldag  $LIBS"
7539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7540/* end confdefs.h.  */
7541
7542/* Override any GCC internal prototype to avoid an error.
7543   Use char because int might match the return type of a GCC
7544   builtin and then its argument prototype would still apply.  */
7545#ifdef __cplusplus
7546extern "C"
7547#endif
7548char dag_attach_stream64 ();
7549int
7550main ()
7551{
7552return dag_attach_stream64 ();
7553  ;
7554  return 0;
7555}
7556_ACEOF
7557if ac_fn_c_try_link "$LINENO"; then :
7558  ac_cv_lib_dag_dag_attach_stream64=yes
7559else
7560  ac_cv_lib_dag_dag_attach_stream64=no
7561fi
7562rm -f core conftest.err conftest.$ac_objext \
7563    conftest$ac_exeext conftest.$ac_ext
7564LIBS=$ac_check_lib_save_LIBS
7565fi
7566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream64" >&5
7567$as_echo "$ac_cv_lib_dag_dag_attach_stream64" >&6; }
7568if test "x$ac_cv_lib_dag_dag_attach_stream64" = xyes; then :
7569  dag_large_streams="1"
7570else
7571  dag_large_streams="0"
7572fi
7573
7574		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_get_erf_types in -ldag" >&5
7575$as_echo_n "checking for dag_get_erf_types in -ldag... " >&6; }
7576if ${ac_cv_lib_dag_dag_get_erf_types+:} false; then :
7577  $as_echo_n "(cached) " >&6
7578else
7579  ac_check_lib_save_LIBS=$LIBS
7580LIBS="-ldag  $LIBS"
7581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7582/* end confdefs.h.  */
7583
7584/* Override any GCC internal prototype to avoid an error.
7585   Use char because int might match the return type of a GCC
7586   builtin and then its argument prototype would still apply.  */
7587#ifdef __cplusplus
7588extern "C"
7589#endif
7590char dag_get_erf_types ();
7591int
7592main ()
7593{
7594return dag_get_erf_types ();
7595  ;
7596  return 0;
7597}
7598_ACEOF
7599if ac_fn_c_try_link "$LINENO"; then :
7600  ac_cv_lib_dag_dag_get_erf_types=yes
7601else
7602  ac_cv_lib_dag_dag_get_erf_types=no
7603fi
7604rm -f core conftest.err conftest.$ac_objext \
7605    conftest$ac_exeext conftest.$ac_ext
7606LIBS=$ac_check_lib_save_LIBS
7607fi
7608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_erf_types" >&5
7609$as_echo "$ac_cv_lib_dag_dag_get_erf_types" >&6; }
7610if test "x$ac_cv_lib_dag_dag_get_erf_types" = xyes; then :
7611
7612
7613$as_echo "#define HAVE_DAG_GET_ERF_TYPES 1" >>confdefs.h
7614
7615fi
7616
7617		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_get_stream_erf_types in -ldag" >&5
7618$as_echo_n "checking for dag_get_stream_erf_types in -ldag... " >&6; }
7619if ${ac_cv_lib_dag_dag_get_stream_erf_types+:} false; then :
7620  $as_echo_n "(cached) " >&6
7621else
7622  ac_check_lib_save_LIBS=$LIBS
7623LIBS="-ldag  $LIBS"
7624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7625/* end confdefs.h.  */
7626
7627/* Override any GCC internal prototype to avoid an error.
7628   Use char because int might match the return type of a GCC
7629   builtin and then its argument prototype would still apply.  */
7630#ifdef __cplusplus
7631extern "C"
7632#endif
7633char dag_get_stream_erf_types ();
7634int
7635main ()
7636{
7637return dag_get_stream_erf_types ();
7638  ;
7639  return 0;
7640}
7641_ACEOF
7642if ac_fn_c_try_link "$LINENO"; then :
7643  ac_cv_lib_dag_dag_get_stream_erf_types=yes
7644else
7645  ac_cv_lib_dag_dag_get_stream_erf_types=no
7646fi
7647rm -f core conftest.err conftest.$ac_objext \
7648    conftest$ac_exeext conftest.$ac_ext
7649LIBS=$ac_check_lib_save_LIBS
7650fi
7651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_stream_erf_types" >&5
7652$as_echo "$ac_cv_lib_dag_dag_get_stream_erf_types" >&6; }
7653if test "x$ac_cv_lib_dag_dag_get_stream_erf_types" = xyes; then :
7654
7655
7656$as_echo "#define HAVE_DAG_GET_STREAM_ERF_TYPES 1" >>confdefs.h
7657
7658fi
7659
7660
7661		LDFLAGS="$save_LDFLAGS"
7662
7663		#
7664		# We assume that if we have libdag we have libdagconf,
7665		# as they're installed at the same time from the same
7666		# package.
7667		#
7668		LIBS="$LIBS -ldag -ldagconf"
7669		LDFLAGS="$LDFLAGS -L$dag_lib_dir"
7670
7671		if test "$dag_large_streams" = 1; then
7672
7673$as_echo "#define HAVE_DAG_LARGE_STREAMS_API 1" >>confdefs.h
7674
7675			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for vdag_set_device_info in -lvdag" >&5
7676$as_echo_n "checking for vdag_set_device_info in -lvdag... " >&6; }
7677if ${ac_cv_lib_vdag_vdag_set_device_info+:} false; then :
7678  $as_echo_n "(cached) " >&6
7679else
7680  ac_check_lib_save_LIBS=$LIBS
7681LIBS="-lvdag  $LIBS"
7682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7683/* end confdefs.h.  */
7684
7685/* Override any GCC internal prototype to avoid an error.
7686   Use char because int might match the return type of a GCC
7687   builtin and then its argument prototype would still apply.  */
7688#ifdef __cplusplus
7689extern "C"
7690#endif
7691char vdag_set_device_info ();
7692int
7693main ()
7694{
7695return vdag_set_device_info ();
7696  ;
7697  return 0;
7698}
7699_ACEOF
7700if ac_fn_c_try_link "$LINENO"; then :
7701  ac_cv_lib_vdag_vdag_set_device_info=yes
7702else
7703  ac_cv_lib_vdag_vdag_set_device_info=no
7704fi
7705rm -f core conftest.err conftest.$ac_objext \
7706    conftest$ac_exeext conftest.$ac_ext
7707LIBS=$ac_check_lib_save_LIBS
7708fi
7709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vdag_vdag_set_device_info" >&5
7710$as_echo "$ac_cv_lib_vdag_vdag_set_device_info" >&6; }
7711if test "x$ac_cv_lib_vdag_vdag_set_device_info" = xyes; then :
7712  ac_dag_have_vdag="1"
7713else
7714  ac_dag_have_vdag="0"
7715fi
7716
7717			if test "$ac_dag_have_vdag" = 1; then
7718
7719$as_echo "#define HAVE_DAG_VDAG 1" >>confdefs.h
7720
7721				if test "$ac_lbl_have_pthreads" != "found"; then
7722					as_fn_error $? "DAG requires pthreads, but we didn't find them" "$LINENO" 5
7723				fi
7724				LIBS="$LIBS $PTHREAD_LIBS"
7725			fi
7726		fi
7727
7728
7729$as_echo "#define HAVE_DAG_API 1" >>confdefs.h
7730
7731	else
7732
7733		if test "$V_PCAP" = dag; then
7734			# User requested "dag" capture type but we couldn't
7735			# find the DAG API support.
7736			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
7737		fi
7738
7739		if test "$want_dag" = yes; then
7740			# User wanted DAG support but we couldn't find it.
7741			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
7742		fi
7743	fi
7744	CFLAGS="$save_CFLAGS"
7745fi
7746
7747
7748# Check whether --with-septel was given.
7749if test "${with_septel+set}" = set; then :
7750  withval=$with_septel;
7751	if test "$withval" = no
7752	then
7753		want_septel=no
7754	elif test "$withval" = yes
7755	then
7756		want_septel=yes
7757		septel_root=
7758	else
7759		want_septel=yes
7760		septel_root=$withval
7761	fi
7762
7763else
7764
7765	if test "$V_PCAP" = septel; then
7766		# User requested Septel-only libpcap, so we'd better have
7767		# the Septel API.
7768		want_septel=yes
7769	elif test "xxx_only" = yes; then
7770		# User requested something-else-only pcap, so they don't
7771		# want Septel support.
7772		want_septel=no
7773	else
7774		#
7775		# Use Septel API if present, otherwise don't
7776		#
7777		want_septel=ifpresent
7778	fi
7779
7780fi
7781
7782
7783ac_cv_lbl_septel_api=no
7784if test "$with_septel" != no; then
7785
7786	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have Septel API headers" >&5
7787$as_echo_n "checking whether we have Septel API headers... " >&6; }
7788
7789	# If necessary, set default paths for Septel API headers and libraries.
7790	if test -z "$septel_root"; then
7791		septel_root=$srcdir/../septel
7792	fi
7793
7794	septel_tools_dir="$septel_root"
7795	septel_include_dir="$septel_root/INC"
7796
7797	if test -r "$septel_include_dir/msg.h"; then
7798		ac_cv_lbl_septel_api=yes
7799	fi
7800
7801	if test "$ac_cv_lbl_septel_api" = yes; then
7802		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($septel_include_dir)" >&5
7803$as_echo "yes ($septel_include_dir)" >&6; }
7804
7805		V_INCLS="$V_INCLS -I$septel_include_dir"
7806		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"
7807		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"
7808
7809		if test "$V_PCAP" != septel ; then
7810			 MODULE_C_SRC="$MODULE_C_SRC pcap-septel.c"
7811		fi
7812
7813
7814$as_echo "#define HAVE_SEPTEL_API 1" >>confdefs.h
7815
7816	else
7817		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7818$as_echo "no" >&6; }
7819
7820		if test "$V_PCAP" = septel; then
7821			# User requested "septel" capture type but
7822			# we couldn't find the Septel API support.
7823			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
7824		fi
7825
7826		if test "$want_septel" = yes; then
7827			# User wanted Septel support but we couldn't find it.
7828			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
7829		fi
7830	fi
7831fi
7832
7833# Check for Myricom SNF support.
7834
7835# Check whether --with-snf was given.
7836if test "${with_snf+set}" = set; then :
7837  withval=$with_snf;
7838	if test "$withval" = no
7839	then
7840		# User explicitly doesn't want SNF
7841		want_snf=no
7842	elif test "$withval" = yes
7843	then
7844		# User wants SNF support but hasn't specified a directory.
7845		want_snf=yes
7846	else
7847		# User wants SNF support with a specified directory.
7848		want_snf=yes
7849		snf_root=$withval
7850	fi
7851
7852else
7853
7854	if test "$V_PCAP" = snf; then
7855		# User requested Sniffer-only libpcap, so we'd better have
7856		# the Sniffer API.
7857		want_snf=yes
7858	elif test "xxx_only" = yes; then
7859		# User requested something-else-only pcap, so they don't
7860		# want SNF support.
7861		want_snf=no
7862	else
7863		#
7864		# Use Sniffer API if present, otherwise don't
7865		#
7866		want_snf=ifpresent
7867	fi
7868
7869fi
7870
7871
7872
7873# Check whether --with-snf-includes was given.
7874if test "${with_snf_includes+set}" = set; then :
7875  withval=$with_snf_includes;
7876	# User wants SNF with specific header directory
7877	want_snf=yes
7878	snf_include_dir=$withval
7879
7880fi
7881
7882
7883
7884# Check whether --with-snf-libraries was given.
7885if test "${with_snf_libraries+set}" = set; then :
7886  withval=$with_snf_libraries;
7887	# User wants SNF with specific lib directory
7888	want_snf=yes
7889	snf_lib_dir=$withval
7890
7891fi
7892
7893
7894ac_cv_lbl_snf_api=no
7895if test "$with_snf" != no; then
7896
7897	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have Myricom Sniffer API" >&5
7898$as_echo_n "checking whether we have Myricom Sniffer API... " >&6; }
7899
7900	# If necessary, set default paths for Sniffer headers and libraries.
7901	if test -z "$snf_root"; then
7902		snf_root=/opt/snf
7903	fi
7904
7905	if test -z "$snf_include_dir"; then
7906		snf_include_dir="$snf_root/include"
7907	fi
7908
7909	if test -z "$snf_lib_dir"; then
7910		snf_lib_dir="$snf_root/lib"
7911		#
7912		# Handle multiarch systems.
7913		#
7914		if test -d "$snf_lib_dir/$host"
7915		then
7916			snf_lib_dir="$snf_lib_dir/$host"
7917		fi
7918	fi
7919
7920	if test -f "$snf_include_dir/snf.h"; then
7921		# We found a header; make sure we can link with the library
7922		save_LDFLAGS="$LDFLAGS"
7923		LDFLAGS="$LDFLAGS -L$snf_lib_dir"
7924		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for snf_init in -lsnf" >&5
7925$as_echo_n "checking for snf_init in -lsnf... " >&6; }
7926if ${ac_cv_lib_snf_snf_init+:} false; then :
7927  $as_echo_n "(cached) " >&6
7928else
7929  ac_check_lib_save_LIBS=$LIBS
7930LIBS="-lsnf  $LIBS"
7931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7932/* end confdefs.h.  */
7933
7934/* Override any GCC internal prototype to avoid an error.
7935   Use char because int might match the return type of a GCC
7936   builtin and then its argument prototype would still apply.  */
7937#ifdef __cplusplus
7938extern "C"
7939#endif
7940char snf_init ();
7941int
7942main ()
7943{
7944return snf_init ();
7945  ;
7946  return 0;
7947}
7948_ACEOF
7949if ac_fn_c_try_link "$LINENO"; then :
7950  ac_cv_lib_snf_snf_init=yes
7951else
7952  ac_cv_lib_snf_snf_init=no
7953fi
7954rm -f core conftest.err conftest.$ac_objext \
7955    conftest$ac_exeext conftest.$ac_ext
7956LIBS=$ac_check_lib_save_LIBS
7957fi
7958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_snf_snf_init" >&5
7959$as_echo "$ac_cv_lib_snf_snf_init" >&6; }
7960if test "x$ac_cv_lib_snf_snf_init" = xyes; then :
7961  ac_cv_lbl_snf_api="yes"
7962fi
7963
7964		LDFLAGS="$save_LDFLAGS"
7965		if test "$ac_cv_lbl_snf_api" = no; then
7966			as_fn_error $? "SNF API cannot correctly be linked; check config.log" "$LINENO" 5
7967		fi
7968	fi
7969
7970	if test "$ac_cv_lbl_snf_api" = yes; then
7971		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($snf_root)" >&5
7972$as_echo "yes ($snf_root)" >&6; }
7973
7974		V_INCLS="$V_INCLS -I$snf_include_dir"
7975		LIBS="$LIBS -lsnf"
7976		LDFLAGS="$LDFLAGS -L$snf_lib_dir"
7977
7978		if test "$V_PCAP" != snf ; then
7979			MODULE_C_SRC="$MODULE_C_SRC pcap-snf.c"
7980		fi
7981
7982
7983$as_echo "#define HAVE_SNF_API 1" >>confdefs.h
7984
7985	else
7986		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7987$as_echo "no" >&6; }
7988
7989		if test "$want_snf" = yes; then
7990			# User requested "snf" capture type but
7991			# we couldn't find the Sniffer API support.
7992			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
7993		fi
7994
7995		if test "$want_snf" = yes; then
7996			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
7997		fi
7998	fi
7999fi
8000
8001# Check for Riverbed TurboCap support.
8002
8003# Check whether --with-turbocap was given.
8004if test "${with_turbocap+set}" = set; then :
8005  withval=$with_turbocap;
8006	if test "$withval" = no
8007	then
8008		# User explicitly doesn't want TurboCap
8009		want_turbocap=no
8010	elif test "$withval" = yes
8011	then
8012		# User wants TurboCap support but hasn't specified a directory.
8013		want_turbocap=yes
8014	else
8015		# User wants TurboCap support with a specified directory.
8016		want_turbocap=yes
8017		turbocap_root=$withval
8018	fi
8019
8020else
8021
8022	if test "xxx_only" = yes; then
8023		# User requested something-else-only pcap, so they don't
8024		# want TurboCap support.
8025		want_turbocap=no
8026	else
8027		#
8028		# Use TurboCap API if present, otherwise don't
8029		#
8030		want_turbocap=ifpresent
8031	fi
8032
8033fi
8034
8035
8036ac_cv_lbl_turbocap_api=no
8037if test "$want_turbocap" != no; then
8038
8039	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TurboCap is supported" >&5
8040$as_echo_n "checking whether TurboCap is supported... " >&6; }
8041
8042	save_CFLAGS="$CFLAGS"
8043	save_LIBS="$LIBS"
8044	if test ! -z "$turbocap_root"; then
8045		TURBOCAP_CFLAGS="-I$turbocap_root/include"
8046		TURBOCAP_LIBS="-L$turbocap_root/lib"
8047		CFLAGS="$CFLAGS $TURBOCAP_CFLAGS"
8048	fi
8049
8050	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8051/* end confdefs.h.  */
8052
8053	    #include <TcApi.h>
8054
8055int
8056main ()
8057{
8058
8059	    TC_INSTANCE a; TC_PORT b; TC_BOARD c;
8060	    TC_INSTANCE i;
8061	    (void)TcInstanceCreateByName("foo", &i);
8062
8063  ;
8064  return 0;
8065}
8066_ACEOF
8067if ac_fn_c_try_compile "$LINENO"; then :
8068  ac_cv_lbl_turbocap_api=yes
8069fi
8070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8071
8072	CFLAGS="$save_CFLAGS"
8073	if test $ac_cv_lbl_turbocap_api = yes; then
8074		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8075$as_echo "yes" >&6; }
8076
8077		MODULE_C_SRC="$MODULE_C_SRC pcap-tc.c"
8078		V_INCLS="$V_INCLS $TURBOCAP_CFLAGS"
8079		LIBS="$LIBS $TURBOCAP_LIBS -lTcApi -lpthread -lstdc++"
8080
8081
8082$as_echo "#define HAVE_TC_API 1" >>confdefs.h
8083
8084	else
8085		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8086$as_echo "no" >&6; }
8087
8088		if test "$want_turbocap" = yes; then
8089			# User wanted Turbo support but we couldn't find it.
8090			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
8091		fi
8092	fi
8093fi
8094
8095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable remote packet capture" >&5
8096$as_echo_n "checking whether to enable remote packet capture... " >&6; }
8097# Check whether --enable-remote was given.
8098if test "${enable_remote+set}" = set; then :
8099  enableval=$enable_remote;
8100else
8101  enableval=no
8102fi
8103
8104case "$enableval" in
8105yes)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8106$as_echo "yes" >&6; }
8107	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Remote packet capture may expose libpcap-based applications" >&5
8108$as_echo "$as_me: WARNING: Remote packet capture may expose libpcap-based applications" >&2;}
8109	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: to attacks by malicious remote capture servers!" >&5
8110$as_echo "$as_me: WARNING: to attacks by malicious remote capture servers!" >&2;}
8111	#
8112	# rpcapd requires pthreads on UN*X.
8113	#
8114	if test "$ac_lbl_have_pthreads" != "found"; then
8115		as_fn_error $? "rpcapd requires pthreads, but we didn't find them" "$LINENO" 5
8116	fi
8117	#
8118	# It also requires crypt().
8119	# Do we have it in the system libraries?
8120	#
8121	ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
8122if test "x$ac_cv_func_crypt" = xyes; then :
8123
8124else
8125
8126		#
8127		# No.  Do we have it in -lcrypt?
8128		#
8129		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
8130$as_echo_n "checking for crypt in -lcrypt... " >&6; }
8131if ${ac_cv_lib_crypt_crypt+:} false; then :
8132  $as_echo_n "(cached) " >&6
8133else
8134  ac_check_lib_save_LIBS=$LIBS
8135LIBS="-lcrypt  $LIBS"
8136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8137/* end confdefs.h.  */
8138
8139/* Override any GCC internal prototype to avoid an error.
8140   Use char because int might match the return type of a GCC
8141   builtin and then its argument prototype would still apply.  */
8142#ifdef __cplusplus
8143extern "C"
8144#endif
8145char crypt ();
8146int
8147main ()
8148{
8149return crypt ();
8150  ;
8151  return 0;
8152}
8153_ACEOF
8154if ac_fn_c_try_link "$LINENO"; then :
8155  ac_cv_lib_crypt_crypt=yes
8156else
8157  ac_cv_lib_crypt_crypt=no
8158fi
8159rm -f core conftest.err conftest.$ac_objext \
8160    conftest$ac_exeext conftest.$ac_ext
8161LIBS=$ac_check_lib_save_LIBS
8162fi
8163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
8164$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
8165if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
8166
8167			#
8168			# Yes; add -lcrypt to the libraries for rpcapd.
8169			#
8170			RPCAPD_LIBS="$RPCAPD_LIBS -lcrypt"
8171
8172else
8173
8174			as_fn_error $? "rpcapd requires crypt(), but we didn't find it" "$LINENO" 5
8175
8176fi
8177
8178
8179fi
8180
8181
8182	#
8183	# OK, we have crypt().  Do we have getspnam()?
8184	#
8185	for ac_func in getspnam
8186do :
8187  ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
8188if test "x$ac_cv_func_getspnam" = xyes; then :
8189  cat >>confdefs.h <<_ACEOF
8190#define HAVE_GETSPNAM 1
8191_ACEOF
8192
8193fi
8194done
8195
8196
8197	#
8198	# Check for various members of struct msghdr.
8199	#
8200	ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
8201		#include \"ftmacros.h\"
8202		#include <sys/socket.h>
8203
8204"
8205if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then :
8206
8207cat >>confdefs.h <<_ACEOF
8208#define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
8209_ACEOF
8210
8211
8212fi
8213
8214	ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_flags" "ac_cv_member_struct_msghdr_msg_flags" "
8215		#include \"ftmacros.h\"
8216		#include <sys/socket.h>
8217
8218"
8219if test "x$ac_cv_member_struct_msghdr_msg_flags" = xyes; then :
8220
8221cat >>confdefs.h <<_ACEOF
8222#define HAVE_STRUCT_MSGHDR_MSG_FLAGS 1
8223_ACEOF
8224
8225
8226fi
8227
8228
8229	#
8230	# Optionally, we may want to support SSL.
8231	# Check for OpenSSL/libressl.
8232	#
8233	# First, try looking for it as a regular system library.
8234	# Make sure we can find SSL_library_init() using the
8235	# standard headers, just in case we're running a version
8236	# of macOS that ships with the OpenSSL library but not
8237	# the OpenSSL headers, and have also installed another
8238	# version of OpenSSL with headers.
8239	#
8240	save_LIBS="$LIBS"
8241	LIBS="-lssl -lcrypto"
8242	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have a system OpenSSL/libressl that we can use" >&5
8243$as_echo_n "checking whether we have a system OpenSSL/libressl that we can use... " >&6; }
8244	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8245/* end confdefs.h.  */
8246
8247#include <openssl/ssl.h>
8248
8249int
8250main ()
8251{
8252
8253SSL_library_init();
8254return 0;
8255
8256  ;
8257  return 0;
8258}
8259_ACEOF
8260if ac_fn_c_try_link "$LINENO"; then :
8261
8262		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8263$as_echo "yes" >&6; }
8264		HAVE_OPENSSL=yes
8265		OPENSSL_LIBS="-lssl -lcrypto"
8266
8267else
8268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8269$as_echo "no" >&6; }
8270fi
8271rm -f core conftest.err conftest.$ac_objext \
8272    conftest$ac_exeext conftest.$ac_ext
8273	LIBS="$save_LIBS"
8274
8275	#
8276	# If we didn't find it, check for it with pkg-config.
8277	#
8278	if test "x$HAVE_OPENSSL" != "xyes"; then
8279		if test "x$PKGCONFIG" != "xno"; then
8280			#
8281			# We have pkg-config; see if we have OpenSSL/
8282			# libressl installed as a package.
8283			#
8284			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL/libressl with pkg-config" >&5
8285$as_echo_n "checking for OpenSSL/libressl with pkg-config... " >&6; }
8286			if "$PKGCONFIG" openssl; then
8287				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
8288$as_echo "found" >&6; }
8289				HAVE_OPENSSL=yes
8290				OPENSSL_CFLAGS=`"$PKGCONFIG" --cflags openssl`
8291				OPENSSL_LIBS=`"$PKGCONFIG" --libs openssl`
8292			else
8293				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8294$as_echo "not found" >&6; }
8295			fi
8296		fi
8297	fi
8298
8299	#
8300	# If we didn't find it, check for it under /usr/local/opt/openssl;
8301	# that's where Homebrew puts it on macOS.  Feel free to add other
8302	# -L directories as necessary; the "system library" check should
8303	# also handle "add-on library under /usr/local", so that shouldn't
8304	# be necessary here.
8305	#
8306	if test "x$HAVE_OPENSSL" != "xyes"; then
8307		save_CFLAGS="$CFLAGS"
8308		save_LIBS="$LIBS"
8309		CFLAGS="$CFLAGS -L/usr/local/opt/openssl/include"
8310		LIBS="$LIBS -L/usr/local/opt/openssl/lib -lssl -lcrypto"
8311		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have OpenSSL/libressl in /usr/local/opt that we can use" >&5
8312$as_echo_n "checking whether we have OpenSSL/libressl in /usr/local/opt that we can use... " >&6; }
8313		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8314/* end confdefs.h.  */
8315
8316#include <openssl/ssl.h>
8317
8318int
8319main ()
8320{
8321
8322SSL_library_init();
8323return 0;
8324
8325  ;
8326  return 0;
8327}
8328_ACEOF
8329if ac_fn_c_try_link "$LINENO"; then :
8330
8331			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8332$as_echo "yes" >&6; }
8333			HAVE_OPENSSL=yes
8334			OPENSSL_CFLAGS="-I/usr/local/opt/openssl/include"
8335			OPENSSL_LIBS="-L/usr/local/opt/openssl/lib -lssl -lcrypto"
8336
8337else
8338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8339$as_echo "no" >&6; }
8340fi
8341rm -f core conftest.err conftest.$ac_objext \
8342    conftest$ac_exeext conftest.$ac_ext
8343		CFLAGS="$save_CFLAGS"
8344		LIBS="$save_LIBS"
8345	fi
8346
8347	#
8348	# OK, did we find it?
8349	#
8350	if test "x$HAVE_OPENSSL" = "xyes"; then
8351
8352$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
8353
8354		CFLAGS="$CFLAGS $OPENSSL_CFLAGS"
8355		LIBS="$LIBS $OPENSSL_LIBS"
8356	else
8357		{ $as_echo "$as_me:${as_lineno-$LINENO}: OpenSSL not found" >&5
8358$as_echo "$as_me: OpenSSL not found" >&6;}
8359	fi
8360
8361
8362$as_echo "#define ENABLE_REMOTE /**/" >>confdefs.h
8363
8364	REMOTE_C_SRC="$REMOTE_C_SRC pcap-new.c pcap-rpcap.c rpcap-protocol.c sockutils.c sslutils.c"
8365	BUILD_RPCAPD=build-rpcapd
8366	INSTALL_RPCAPD=install-rpcapd
8367	;;
8368*)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8369$as_echo "no" >&6; }
8370	;;
8371esac
8372
8373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build optimizer debugging code" >&5
8374$as_echo_n "checking whether to build optimizer debugging code... " >&6; }
8375# Check whether --enable-optimizer-dbg was given.
8376if test "${enable_optimizer_dbg+set}" = set; then :
8377  enableval=$enable_optimizer_dbg;
8378fi
8379
8380if test "$enable_optimizer_dbg" = "yes"; then
8381
8382$as_echo "#define BDEBUG 1" >>confdefs.h
8383
8384fi
8385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_optimizer_dbg-no}" >&5
8386$as_echo "${enable_optimizer_dbg-no}" >&6; }
8387
8388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build parser debugging code" >&5
8389$as_echo_n "checking whether to build parser debugging code... " >&6; }
8390# Check whether --enable-yydebug was given.
8391if test "${enable_yydebug+set}" = set; then :
8392  enableval=$enable_yydebug;
8393fi
8394
8395if test "$enable_yydebug" = "yes"; then
8396
8397$as_echo "#define YYDEBUG 1" >>confdefs.h
8398
8399fi
8400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_yydebug-no}" >&5
8401$as_echo "${enable_yydebug-no}" >&6; }
8402
8403#
8404# Look for {f}lex.
8405#
8406for ac_prog in flex lex
8407do
8408  # Extract the first word of "$ac_prog", so it can be a program name with args.
8409set dummy $ac_prog; ac_word=$2
8410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8411$as_echo_n "checking for $ac_word... " >&6; }
8412if ${ac_cv_prog_LEX+:} false; then :
8413  $as_echo_n "(cached) " >&6
8414else
8415  if test -n "$LEX"; then
8416  ac_cv_prog_LEX="$LEX" # Let the user override the test.
8417else
8418as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8419for as_dir in $PATH
8420do
8421  IFS=$as_save_IFS
8422  test -z "$as_dir" && as_dir=.
8423    for ac_exec_ext in '' $ac_executable_extensions; do
8424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8425    ac_cv_prog_LEX="$ac_prog"
8426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8427    break 2
8428  fi
8429done
8430  done
8431IFS=$as_save_IFS
8432
8433fi
8434fi
8435LEX=$ac_cv_prog_LEX
8436if test -n "$LEX"; then
8437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
8438$as_echo "$LEX" >&6; }
8439else
8440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8441$as_echo "no" >&6; }
8442fi
8443
8444
8445  test -n "$LEX" && break
8446done
8447test -n "$LEX" || LEX=":"
8448
8449if test "x$LEX" != "x:"; then
8450  cat >conftest.l <<_ACEOF
8451%%
8452a { ECHO; }
8453b { REJECT; }
8454c { yymore (); }
8455d { yyless (1); }
8456e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
8457    yyless ((input () != 0)); }
8458f { unput (yytext[0]); }
8459. { BEGIN INITIAL; }
8460%%
8461#ifdef YYTEXT_POINTER
8462extern char *yytext;
8463#endif
8464int
8465main (void)
8466{
8467  return ! yylex () + ! yywrap ();
8468}
8469_ACEOF
8470{ { ac_try="$LEX conftest.l"
8471case "(($ac_try" in
8472  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8473  *) ac_try_echo=$ac_try;;
8474esac
8475eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
8476$as_echo "$ac_try_echo"; } >&5
8477  (eval "$LEX conftest.l") 2>&5
8478  ac_status=$?
8479  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8480  test $ac_status = 0; }
8481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
8482$as_echo_n "checking lex output file root... " >&6; }
8483if ${ac_cv_prog_lex_root+:} false; then :
8484  $as_echo_n "(cached) " >&6
8485else
8486
8487if test -f lex.yy.c; then
8488  ac_cv_prog_lex_root=lex.yy
8489elif test -f lexyy.c; then
8490  ac_cv_prog_lex_root=lexyy
8491else
8492  as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
8493fi
8494fi
8495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
8496$as_echo "$ac_cv_prog_lex_root" >&6; }
8497LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
8498
8499if test -z "${LEXLIB+set}"; then
8500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
8501$as_echo_n "checking lex library... " >&6; }
8502if ${ac_cv_lib_lex+:} false; then :
8503  $as_echo_n "(cached) " >&6
8504else
8505
8506    ac_save_LIBS=$LIBS
8507    ac_cv_lib_lex='none needed'
8508    for ac_lib in '' -lfl -ll; do
8509      LIBS="$ac_lib $ac_save_LIBS"
8510      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8511/* end confdefs.h.  */
8512`cat $LEX_OUTPUT_ROOT.c`
8513_ACEOF
8514if ac_fn_c_try_link "$LINENO"; then :
8515  ac_cv_lib_lex=$ac_lib
8516fi
8517rm -f core conftest.err conftest.$ac_objext \
8518    conftest$ac_exeext conftest.$ac_ext
8519      test "$ac_cv_lib_lex" != 'none needed' && break
8520    done
8521    LIBS=$ac_save_LIBS
8522
8523fi
8524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
8525$as_echo "$ac_cv_lib_lex" >&6; }
8526  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
8527fi
8528
8529
8530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
8531$as_echo_n "checking whether yytext is a pointer... " >&6; }
8532if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
8533  $as_echo_n "(cached) " >&6
8534else
8535  # POSIX says lex can declare yytext either as a pointer or an array; the
8536# default is implementation-dependent.  Figure out which it is, since
8537# not all implementations provide the %pointer and %array declarations.
8538ac_cv_prog_lex_yytext_pointer=no
8539ac_save_LIBS=$LIBS
8540LIBS="$LEXLIB $ac_save_LIBS"
8541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8542/* end confdefs.h.  */
8543
8544  #define YYTEXT_POINTER 1
8545`cat $LEX_OUTPUT_ROOT.c`
8546_ACEOF
8547if ac_fn_c_try_link "$LINENO"; then :
8548  ac_cv_prog_lex_yytext_pointer=yes
8549fi
8550rm -f core conftest.err conftest.$ac_objext \
8551    conftest$ac_exeext conftest.$ac_ext
8552LIBS=$ac_save_LIBS
8553
8554fi
8555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
8556$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
8557if test $ac_cv_prog_lex_yytext_pointer = yes; then
8558
8559$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
8560
8561fi
8562rm -f conftest.l $LEX_OUTPUT_ROOT.c
8563
8564fi
8565if test "$LEX" = ":"; then
8566	as_fn_error $? "Neither flex nor lex was found." "$LINENO" 5
8567fi
8568
8569#
8570# Make sure {f}lex supports the -P, --header-file, and --nounput flags
8571# and supports processing our scanner.l.
8572#
8573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable lex" >&5
8574$as_echo_n "checking for capable lex... " >&6; }
8575if ${tcpdump_cv_capable_lex+:} false; then :
8576  $as_echo_n "(cached) " >&6
8577else
8578  if $LEX -P pcap_ --header-file=/dev/null --nounput -t $srcdir/scanner.l > /dev/null 2>&1; then
8579	    tcpdump_cv_capable_lex=yes
8580	else
8581	    tcpdump_cv_capable_lex=insufficient
8582	fi
8583fi
8584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_lex" >&5
8585$as_echo "$tcpdump_cv_capable_lex" >&6; }
8586if test $tcpdump_cv_capable_lex = insufficient ; then
8587	as_fn_error $? "$LEX is insufficient to compile libpcap.
8588 libpcap requires Flex 2.5.31 or later, or a compatible version of lex." "$LINENO" 5
8589fi
8590
8591#
8592# Look for yacc/bison/byacc.
8593# If it's Bison, we do not want -y, as 1) we will be using -o to cause
8594# the output for XXX.y to be written to XXX.c and 2) we don't want
8595# it to issue warnings about stuff not supported by POSIX YACC - we
8596# want to use that stuff, and don't care whether plain YACC supports
8597# it or not, we require either Bison or Berkeley YACC.
8598#
8599BISON_BYACC=""
8600#
8601# Look for Bison.
8602#
8603for ac_prog in bison
8604do
8605  # Extract the first word of "$ac_prog", so it can be a program name with args.
8606set dummy $ac_prog; ac_word=$2
8607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8608$as_echo_n "checking for $ac_word... " >&6; }
8609if ${ac_cv_prog_BISON_BYACC+:} false; then :
8610  $as_echo_n "(cached) " >&6
8611else
8612  if test -n "$BISON_BYACC"; then
8613  ac_cv_prog_BISON_BYACC="$BISON_BYACC" # Let the user override the test.
8614else
8615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8616for as_dir in $PATH
8617do
8618  IFS=$as_save_IFS
8619  test -z "$as_dir" && as_dir=.
8620    for ac_exec_ext in '' $ac_executable_extensions; do
8621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8622    ac_cv_prog_BISON_BYACC="$ac_prog"
8623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8624    break 2
8625  fi
8626done
8627  done
8628IFS=$as_save_IFS
8629
8630fi
8631fi
8632BISON_BYACC=$ac_cv_prog_BISON_BYACC
8633if test -n "$BISON_BYACC"; then
8634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON_BYACC" >&5
8635$as_echo "$BISON_BYACC" >&6; }
8636else
8637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8638$as_echo "no" >&6; }
8639fi
8640
8641
8642  test -n "$BISON_BYACC" && break
8643done
8644
8645if test x"$BISON_BYACC" != x; then
8646	#
8647	# We found Bison.
8648	#
8649	# Bison prior to 2.4(.1) doesn't support "%define api.pure", so use
8650	# "%pure-parser".
8651	#
8652	bison_major_version=`$BISON_BYACC -V | sed -n 's/.* \([1-9][0-9]*\)\.[0-9][0-9.]*/\1/p'`
8653	bison_minor_version=`$BISON_BYACC -V | sed -n 's/.* [1-9][0-9]*\.\([0-9]+\).*/\1/p'`
8654	if test "$bison_major_version" -lt 2 -o \
8655	    \( "$bison_major_version" -eq 2 -a "$bison_major_version" -lt 4 \)
8656	then
8657		REENTRANT_PARSER="%pure-parser"
8658	else
8659		REENTRANT_PARSER="%define api.pure"
8660	fi
8661else
8662	#
8663	# We didn't find Bison; check for Berkeley YACC, under the
8664	# names byacc and yacc.
8665	#
8666	for ac_prog in byacc yacc
8667do
8668  # Extract the first word of "$ac_prog", so it can be a program name with args.
8669set dummy $ac_prog; ac_word=$2
8670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8671$as_echo_n "checking for $ac_word... " >&6; }
8672if ${ac_cv_prog_BISON_BYACC+:} false; then :
8673  $as_echo_n "(cached) " >&6
8674else
8675  if test -n "$BISON_BYACC"; then
8676  ac_cv_prog_BISON_BYACC="$BISON_BYACC" # Let the user override the test.
8677else
8678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8679for as_dir in $PATH
8680do
8681  IFS=$as_save_IFS
8682  test -z "$as_dir" && as_dir=.
8683    for ac_exec_ext in '' $ac_executable_extensions; do
8684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8685    ac_cv_prog_BISON_BYACC="$ac_prog"
8686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8687    break 2
8688  fi
8689done
8690  done
8691IFS=$as_save_IFS
8692
8693fi
8694fi
8695BISON_BYACC=$ac_cv_prog_BISON_BYACC
8696if test -n "$BISON_BYACC"; then
8697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON_BYACC" >&5
8698$as_echo "$BISON_BYACC" >&6; }
8699else
8700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8701$as_echo "no" >&6; }
8702fi
8703
8704
8705  test -n "$BISON_BYACC" && break
8706done
8707
8708	if test x"$BISON_BYACC" != x; then
8709		#
8710		# Make sure this is Berkeley YACC, not AT&T YACC;
8711		# the latter doesn't support reentrant parsers.
8712		# Run it with "-V"; that succeeds and reports the
8713		# version number with Berkeley YACC, but will
8714		# (probably) fail with various vendor flavors
8715		# of AT&T YACC.
8716		#
8717		# Hopefully this also eliminates any versions
8718		# of Berkeley YACC that don't support reentrant
8719		# parsers, if there are any.
8720		#
8721		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable yacc" >&5
8722$as_echo_n "checking for capable yacc... " >&6; }
8723if ${tcpdump_cv_capable_yacc+:} false; then :
8724  $as_echo_n "(cached) " >&6
8725else
8726  if $BISON_BYACC -V >/dev/null 2>&1; then
8727			tcpdump_cv_capable_yacc=yes
8728		    else
8729			tcpdump_cv_capable_yacc=insufficient
8730		    fi
8731fi
8732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_yacc" >&5
8733$as_echo "$tcpdump_cv_capable_yacc" >&6; }
8734		if test $tcpdump_cv_capable_yacc = insufficient ; then
8735		    as_fn_error $? "$YACC is insufficient to compile libpcap.
8736 libpcap requires Bison, a newer version of Berkeley YACC with support
8737 for reentrant parsers, or another YACC compatible with them." "$LINENO" 5
8738		fi
8739	else
8740		#
8741		# OK, we found neither byacc nor yacc.
8742		#
8743		as_fn_error $? "Neither bison, byacc, nor yacc was found.
8744 libpcap requires Bison, a newer version of Berkeley YACC with support
8745 for reentrant parsers, or another YACC compatible with them." "$LINENO" 5
8746	fi
8747
8748	#
8749	# Berkeley YACC doesn't support "%define api.pure", so use
8750	# "%pure-parser".
8751	#
8752	REENTRANT_PARSER="%pure-parser"
8753fi
8754
8755
8756
8757#
8758# Do various checks for various OSes and versions of those OSes.
8759#
8760# Assume, by default, no support for shared libraries and V7/BSD
8761# convention for man pages (devices in section 4, file formats in
8762# section 5, miscellaneous info in section 7, administrative commands
8763# and daemons in section 8).  Individual cases can override this.
8764#
8765DYEXT="none"
8766MAN_DEVICES=4
8767MAN_FILE_FORMATS=5
8768MAN_MISC_INFO=7
8769MAN_ADMIN_COMMANDS=8
8770case "$host_os" in
8771
8772aix*)
8773
8774$as_echo "#define _SUN 1" >>confdefs.h
8775
8776
8777	#
8778	# AIX makes it fun to build shared and static libraries,
8779	# because they're *both* ".a" archive libraries.  We
8780	# build the static library for the benefit of the traditional
8781	# scheme of building libpcap and tcpdump in subdirectories of
8782	# the same directory, with tcpdump statically linked with the
8783	# libpcap in question, but we also build a shared library as
8784	# "libpcap.shareda" and install *it*, rather than the static
8785	# library, as "libpcap.a".
8786	#
8787	DYEXT="shareda"
8788
8789	case "$V_PCAP" in
8790
8791	dlpi)
8792		#
8793		# If we're using DLPI, applications will need to
8794		# use /lib/pse.exp if present, as we use the
8795		# STREAMS routines.
8796		#
8797		pseexe="/lib/pse.exp"
8798		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pseexe" >&5
8799$as_echo_n "checking for $pseexe... " >&6; }
8800		if test -f $pseexe ; then
8801			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8802$as_echo "yes" >&6; }
8803			LIBS="-I:$pseexe"
8804		fi
8805		;;
8806
8807	bpf)
8808		#
8809		# If we're using BPF, we need "-lodm" and "-lcfg", as
8810		# we use them to load the BPF module.
8811		#
8812		LIBS="-lodm -lcfg"
8813		;;
8814	esac
8815	;;
8816
8817darwin*)
8818	DYEXT="dylib"
8819	V_CCOPT="$V_CCOPT -fno-common"
8820	# Check whether --enable-universal was given.
8821if test "${enable_universal+set}" = set; then :
8822  enableval=$enable_universal;
8823fi
8824
8825	if test "$enable_universal" != "no"; then
8826		case "$host_os" in
8827
8828		darwin[0-7].*)
8829			#
8830			# Pre-Tiger.  Build only for 32-bit PowerPC; no
8831			# need for any special compiler or linker flags.
8832			#
8833			;;
8834
8835		darwin8.[0123]|darwin8.[0123].*)
8836			#
8837			# Tiger, prior to Intel support.  Build
8838			# libraries and executables for 32-bit PowerPC
8839			# and 64-bit PowerPC, with 32-bit PowerPC first.
8840			# (I'm guessing that's what Apple does.)
8841			#
8842			# (The double brackets are needed because
8843			# autotools/m4 use brackets as a quoting
8844			# character; the double brackets turn into
8845			# single brackets in the generated configure
8846			# file.)
8847			#
8848			V_LIB_CCOPT_FAT="-arch ppc -arch ppc64"
8849			V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64"
8850			V_PROG_CCOPT_FAT="-arch ppc -arch ppc64"
8851			V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64"
8852			;;
8853
8854		darwin8.[456]|darwin.[456].*)
8855			#
8856			# Tiger, subsequent to Intel support but prior
8857			# to x86-64 support.  Build libraries and
8858			# executables for 32-bit PowerPC, 64-bit
8859			# PowerPC, and 32-bit x86, with 32-bit PowerPC
8860			# first.  (I'm guessing that's what Apple does.)
8861			#
8862			# (The double brackets are needed because
8863			# autotools/m4 use brackets as a quoting
8864			# character; the double brackets turn into
8865			# single brackets in the generated configure
8866			# file.)
8867			#
8868			V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386"
8869			V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386"
8870			V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386"
8871			V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386"
8872			;;
8873
8874		darwin8.*)
8875			#
8876			# All other Tiger, so subsequent to x86-64
8877			# support.  Build libraries and executables for
8878			# 32-bit PowerPC, 64-bit PowerPC, 32-bit x86,
8879			# and x86-64, with 32-bit PowerPC first.  (I'm
8880			# guessing that's what Apple does.)
8881			#
8882			V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8883			V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8884			V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8885			V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8886			;;
8887
8888		darwin9.*)
8889			#
8890			# Leopard.  Build libraries for 32-bit PowerPC,
8891			# 64-bit PowerPC, 32-bit x86, and x86-64, with
8892			# 32-bit PowerPC first, and build executables
8893			# for 32-bit x86 and 32-bit PowerPC, with 32-bit
8894			# x86 first.  (That's what Apple does.)
8895			#
8896			V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8897			V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
8898			V_PROG_CCOPT_FAT="-arch i386 -arch ppc"
8899			V_PROG_LDFLAGS_FAT="-arch i386 -arch ppc"
8900			;;
8901
8902		darwin10.*)
8903			#
8904			# Snow Leopard.  Build libraries for x86-64,
8905			# 32-bit x86, and 32-bit PowerPC, with x86-64
8906			# first, and build executables for x86-64 and
8907			# 32-bit x86, with x86-64 first.  (That's what
8908			# Apple does, even though Snow Leopard doesn't
8909			# run on PPC, so PPC libpcap runs under Rosetta,
8910			# and Rosetta doesn't support BPF ioctls, so PPC
8911			# programs can't do live captures.)
8912			#
8913			V_LIB_CCOPT_FAT="-arch x86_64 -arch i386 -arch ppc"
8914			V_LIB_LDFLAGS_FAT="-arch x86_64 -arch i386 -arch ppc"
8915			V_PROG_CCOPT_FAT="-arch x86_64 -arch i386"
8916			V_PROG_LDFLAGS_FAT="-arch x86_64 -arch i386"
8917			;;
8918
8919		darwin*)
8920			#
8921			# Post-Snow Leopard.  Build libraries for x86-64
8922			# and 32-bit x86, with x86-64 first, and build
8923			# executables only for x86-64.  (That's what
8924			# Apple does.)  This requires no special flags
8925			# for programs.
8926			# XXX - update if and when Apple drops support
8927			# for 32-bit x86 code and if and when Apple adds
8928			# ARM-based Macs.  (You're on your own for iOS
8929			# etc.)
8930			#
8931			# XXX - check whether we *can* build for
8932			# i386 and, if not, suggest that the user
8933			# install the /usr/include headers if they
8934			# want to build fat.
8935			#
8936			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether building for 32-bit x86 is supported" >&5
8937$as_echo_n "checking whether building for 32-bit x86 is supported... " >&6; }
8938			save_CFLAGS="$CFLAGS"
8939			CFLAGS="$CFLAGS -arch i386"
8940			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8941/* end confdefs.h.  */
8942
8943int
8944main ()
8945{
8946return 0;
8947  ;
8948  return 0;
8949}
8950_ACEOF
8951if ac_fn_c_try_link "$LINENO"; then :
8952
8953				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8954$as_echo "yes" >&6; }
8955				V_LIB_CCOPT_FAT="-arch x86_64"
8956				V_LIB_LDFLAGS_FAT="-arch x86_64"
8957
8958				#
8959				# OpenSSL installation on macOS seems
8960				# to install only the libs for 64-bit
8961				# x86 - at least that's what Brew does:
8962				# only configure 32-bit builds if we
8963				# don't have OpenSSL.
8964				#
8965				if test "$HAVE_OPENSSL" != yes; then
8966					V_LIB_CCOPT_FAT="$V_LIB_CCOPT_FAT -arch i386"
8967					V_LIB_LDFLAGS_FAT="$V_LIB_LDFLAGS_FAT -arch i386"
8968				fi
8969
8970else
8971
8972				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8973$as_echo "no" >&6; }
8974				V_LIB_CCOPT_FAT="-arch x86_64"
8975				V_LIB_LDFLAGS_FAT="-arch x86_64"
8976				case "$host_os" in
8977
8978				darwin18.*)
8979					#
8980					# Mojave; you need to install the
8981					# /usr/include headers to get
8982					# 32-bit x86 builds to work.
8983					#
8984					{ $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
8985$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;}
8986					;;
8987
8988				*)
8989					#
8990					# Pre-Mojave; the command-line
8991					# tools should be sufficient to
8992					# enable 32-bit x86 builds.
8993					#
8994					{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools" >&5
8995$as_echo "$as_me: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools" >&2;}
8996					;;
8997				esac
8998
8999fi
9000rm -f core conftest.err conftest.$ac_objext \
9001    conftest$ac_exeext conftest.$ac_ext
9002			CFLAGS="$save_CFLAGS"
9003			;;
9004		esac
9005	fi
9006	;;
9007
9008hpux9*)
9009
9010$as_echo "#define HAVE_HPUX9 1" >>confdefs.h
9011
9012
9013	#
9014	# Use System V conventions for man pages.
9015	#
9016	MAN_ADMIN_COMMANDS=1m
9017	MAN_FILE_FORMATS=4
9018	MAN_MISC_INFO=5
9019	;;
9020
9021hpux10.0*)
9022
9023	#
9024	# Use System V conventions for man pages.
9025	#
9026	MAN_ADMIN_COMMANDS=1m
9027	MAN_FILE_FORMATS=4
9028	MAN_MISC_INFO=5
9029	;;
9030
9031hpux10.1*)
9032
9033	#
9034	# Use System V conventions for man pages.
9035	#
9036	MAN_ADMIN_COMMANDS=1m
9037	MAN_FILE_FORMATS=4
9038	MAN_MISC_INFO=5
9039	;;
9040
9041hpux*)
9042
9043$as_echo "#define HAVE_HPUX10_20_OR_LATER 1" >>confdefs.h
9044
9045	if test "`uname -m`" = "ia64"; then
9046		DYEXT="so"
9047	else
9048		DYEXT="sl"
9049	fi
9050
9051	#
9052	# "-b" builds a shared library; "+h" sets the soname.
9053	#
9054	SHLIB_OPT="-b"
9055	SONAME_OPT="+h"
9056
9057	#
9058	# Use System V conventions for man pages.
9059	#
9060	MAN_FILE_FORMATS=4
9061	MAN_MISC_INFO=5
9062	;;
9063
9064irix*)
9065	#
9066	# Use IRIX conventions for man pages; they're the same as the
9067	# System V conventions, except that they use section 8 for
9068	# administrative commands and daemons.
9069	#
9070	MAN_FILE_FORMATS=4
9071	MAN_MISC_INFO=5
9072	;;
9073
9074linux*|freebsd*|netbsd*|openbsd*|dragonfly*|kfreebsd*|gnu*|haiku*|midipix*)
9075	DYEXT="so"
9076
9077	#
9078	# Compiler assumed to be GCC; run-time linker may require a -R
9079	# flag.
9080	#
9081	if test "$libdir" != "/usr/lib"; then
9082		V_RFLAGS=-Wl,-R$libdir
9083	fi
9084	;;
9085
9086osf*)
9087	DYEXT="so"
9088
9089	#
9090	# DEC OSF/1, a/k/a Digial UNIX, a/k/a Tru64 UNIX.
9091	# Use Tru64 UNIX conventions for man pages; they're the same as
9092	# the System V conventions except that they use section 8 for
9093	# administrative commands and daemons.
9094	#
9095	MAN_FILE_FORMATS=4
9096	MAN_MISC_INFO=5
9097	MAN_DEVICES=7
9098	;;
9099
9100sinix*)
9101	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if SINIX compiler defines sinix" >&5
9102$as_echo_n "checking if SINIX compiler defines sinix... " >&6; }
9103	if ${ac_cv_cc_sinix_defined+:} false; then :
9104  $as_echo_n "(cached) " >&6
9105else
9106  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9107/* end confdefs.h.  */
9108
9109int
9110main ()
9111{
9112int i = sinix;
9113  ;
9114  return 0;
9115}
9116_ACEOF
9117if ac_fn_c_try_compile "$LINENO"; then :
9118  ac_cv_cc_sinix_defined=yes
9119else
9120  ac_cv_cc_sinix_defined=no
9121fi
9122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9123fi
9124
9125	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_sinix_defined" >&5
9126$as_echo "$ac_cv_cc_sinix_defined" >&6; }
9127	    if test $ac_cv_cc_sinix_defined = no ; then
9128
9129$as_echo "#define sinix 1" >>confdefs.h
9130
9131	    fi
9132	;;
9133
9134solaris*)
9135
9136$as_echo "#define HAVE_SOLARIS 1" >>confdefs.h
9137
9138
9139	DYEXT="so"
9140
9141	#
9142	# Make sure errno is thread-safe, in case we're called in
9143	# a multithreaded program.  We don't guarantee that two
9144	# threads can use the *same* pcap_t safely, but the
9145	# current version does guarantee that you can use different
9146	# pcap_t's in different threads, and even that pcap_compile()
9147	# is thread-safe (it wasn't thread-safe in some older versions).
9148	#
9149	V_CCOPT="$V_CCOPT -D_TS_ERRNO"
9150
9151	case "`uname -r`" in
9152
9153	5.12)
9154		;;
9155
9156	*)
9157		#
9158		# Use System V conventions for man pages.
9159		#
9160		MAN_ADMIN_COMMANDS=1m
9161		MAN_FILE_FORMATS=4
9162		MAN_MISC_INFO=5
9163		MAN_DEVICES=7D
9164	esac
9165	;;
9166esac
9167
9168# Check whether --enable-shared was given.
9169if test "${enable_shared+set}" = set; then :
9170  enableval=$enable_shared;
9171fi
9172
9173test "x$enable_shared" = "xno" && DYEXT="none"
9174
9175if test -n "$ac_tool_prefix"; then
9176  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9177set dummy ${ac_tool_prefix}ranlib; ac_word=$2
9178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9179$as_echo_n "checking for $ac_word... " >&6; }
9180if ${ac_cv_prog_RANLIB+:} false; then :
9181  $as_echo_n "(cached) " >&6
9182else
9183  if test -n "$RANLIB"; then
9184  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9185else
9186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9187for as_dir in $PATH
9188do
9189  IFS=$as_save_IFS
9190  test -z "$as_dir" && as_dir=.
9191    for ac_exec_ext in '' $ac_executable_extensions; do
9192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9193    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
9194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9195    break 2
9196  fi
9197done
9198  done
9199IFS=$as_save_IFS
9200
9201fi
9202fi
9203RANLIB=$ac_cv_prog_RANLIB
9204if test -n "$RANLIB"; then
9205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9206$as_echo "$RANLIB" >&6; }
9207else
9208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9209$as_echo "no" >&6; }
9210fi
9211
9212
9213fi
9214if test -z "$ac_cv_prog_RANLIB"; then
9215  ac_ct_RANLIB=$RANLIB
9216  # Extract the first word of "ranlib", so it can be a program name with args.
9217set dummy ranlib; ac_word=$2
9218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9219$as_echo_n "checking for $ac_word... " >&6; }
9220if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
9221  $as_echo_n "(cached) " >&6
9222else
9223  if test -n "$ac_ct_RANLIB"; then
9224  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9225else
9226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9227for as_dir in $PATH
9228do
9229  IFS=$as_save_IFS
9230  test -z "$as_dir" && as_dir=.
9231    for ac_exec_ext in '' $ac_executable_extensions; do
9232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9233    ac_cv_prog_ac_ct_RANLIB="ranlib"
9234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9235    break 2
9236  fi
9237done
9238  done
9239IFS=$as_save_IFS
9240
9241fi
9242fi
9243ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9244if test -n "$ac_ct_RANLIB"; then
9245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9246$as_echo "$ac_ct_RANLIB" >&6; }
9247else
9248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9249$as_echo "no" >&6; }
9250fi
9251
9252  if test "x$ac_ct_RANLIB" = x; then
9253    RANLIB=":"
9254  else
9255    case $cross_compiling:$ac_tool_warned in
9256yes:)
9257{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9258$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9259ac_tool_warned=yes ;;
9260esac
9261    RANLIB=$ac_ct_RANLIB
9262  fi
9263else
9264  RANLIB="$ac_cv_prog_RANLIB"
9265fi
9266
9267if test -n "$ac_tool_prefix"; then
9268  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9269set dummy ${ac_tool_prefix}ar; ac_word=$2
9270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9271$as_echo_n "checking for $ac_word... " >&6; }
9272if ${ac_cv_prog_AR+:} false; then :
9273  $as_echo_n "(cached) " >&6
9274else
9275  if test -n "$AR"; then
9276  ac_cv_prog_AR="$AR" # Let the user override the test.
9277else
9278as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9279for as_dir in $PATH
9280do
9281  IFS=$as_save_IFS
9282  test -z "$as_dir" && as_dir=.
9283    for ac_exec_ext in '' $ac_executable_extensions; do
9284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9285    ac_cv_prog_AR="${ac_tool_prefix}ar"
9286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9287    break 2
9288  fi
9289done
9290  done
9291IFS=$as_save_IFS
9292
9293fi
9294fi
9295AR=$ac_cv_prog_AR
9296if test -n "$AR"; then
9297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9298$as_echo "$AR" >&6; }
9299else
9300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9301$as_echo "no" >&6; }
9302fi
9303
9304
9305fi
9306if test -z "$ac_cv_prog_AR"; then
9307  ac_ct_AR=$AR
9308  # Extract the first word of "ar", so it can be a program name with args.
9309set dummy ar; ac_word=$2
9310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9311$as_echo_n "checking for $ac_word... " >&6; }
9312if ${ac_cv_prog_ac_ct_AR+:} false; then :
9313  $as_echo_n "(cached) " >&6
9314else
9315  if test -n "$ac_ct_AR"; then
9316  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9317else
9318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9319for as_dir in $PATH
9320do
9321  IFS=$as_save_IFS
9322  test -z "$as_dir" && as_dir=.
9323    for ac_exec_ext in '' $ac_executable_extensions; do
9324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9325    ac_cv_prog_ac_ct_AR="ar"
9326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9327    break 2
9328  fi
9329done
9330  done
9331IFS=$as_save_IFS
9332
9333fi
9334fi
9335ac_ct_AR=$ac_cv_prog_ac_ct_AR
9336if test -n "$ac_ct_AR"; then
9337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9338$as_echo "$ac_ct_AR" >&6; }
9339else
9340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9341$as_echo "no" >&6; }
9342fi
9343
9344  if test "x$ac_ct_AR" = x; then
9345    AR=""
9346  else
9347    case $cross_compiling:$ac_tool_warned in
9348yes:)
9349{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9350$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9351ac_tool_warned=yes ;;
9352esac
9353    AR=$ac_ct_AR
9354  fi
9355else
9356  AR="$ac_cv_prog_AR"
9357fi
9358
9359
9360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
9361$as_echo_n "checking whether ln -s works... " >&6; }
9362LN_S=$as_ln_s
9363if test "$LN_S" = "ln -s"; then
9364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9365$as_echo "yes" >&6; }
9366else
9367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
9368$as_echo "no, using $LN_S" >&6; }
9369fi
9370
9371
9372
9373rm -f os-proto.h
9374    if test "${LBL_CFLAGS+set}" = set; then
9375	    V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
9376    fi
9377    if test -f .devel ; then
9378	    #
9379	    # Skip all the warning option stuff on some compilers.
9380	    #
9381	    if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
9382
9383	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler fails when given an unknown warning option" >&5
9384$as_echo_n "checking whether the compiler fails when given an unknown warning option... " >&6; }
9385	save_CFLAGS="$CFLAGS"
9386	CFLAGS="$CFLAGS -Wxyzzy-this-will-never-succeed-xyzzy"
9387	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9388/* end confdefs.h.  */
9389
9390int
9391main ()
9392{
9393return 0
9394  ;
9395  return 0;
9396}
9397_ACEOF
9398if ac_fn_c_try_compile "$LINENO"; then :
9399
9400		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9401$as_echo "no" >&6; }
9402		#
9403		# We're assuming this is clang, where
9404		# -Werror=unknown-warning-option is the appropriate
9405		# option to force the compiler to fail.
9406		#
9407		ac_lbl_unknown_warning_option_error="-Werror=unknown-warning-option"
9408
9409else
9410
9411		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9412$as_echo "yes" >&6; }
9413
9414fi
9415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9416	CFLAGS="$save_CFLAGS"
9417
9418
9419	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -W option" >&5
9420$as_echo_n "checking whether the compiler supports the -W option... " >&6; }
9421	save_CFLAGS="$CFLAGS"
9422	if expr "x-W" : "x-W.*" >/dev/null
9423	then
9424	    CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -W"
9425	elif expr "x-W" : "x-f.*" >/dev/null
9426	then
9427	    CFLAGS="$CFLAGS -Werror -W"
9428	elif expr "x-W" : "x-m.*" >/dev/null
9429	then
9430	    CFLAGS="$CFLAGS -Werror -W"
9431	else
9432	    CFLAGS="$CFLAGS -W"
9433	fi
9434	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9435/* end confdefs.h.  */
9436
9437int
9438main ()
9439{
9440return 0
9441  ;
9442  return 0;
9443}
9444_ACEOF
9445if ac_fn_c_try_compile "$LINENO"; then :
9446
9447		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9448$as_echo "yes" >&6; }
9449		can_add_to_cflags=yes
9450		#
9451		# The compile supports this; do we have some C code for
9452		# which the warning should *not* appear?
9453		# We test the fourth argument because the third argument
9454		# could contain quotes, breaking the test.
9455		#
9456		if test "x" != "x"
9457		then
9458		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9459		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -W " >&5
9460$as_echo_n "checking whether -W ... " >&6; }
9461		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9462/* end confdefs.h.  */
9463
9464_ACEOF
9465if ac_fn_c_try_compile "$LINENO"; then :
9466
9467			#
9468			# Not a problem.
9469			#
9470			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9471$as_echo "no" >&6; }
9472
9473else
9474
9475			#
9476			# A problem.
9477			#
9478			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9479$as_echo "yes" >&6; }
9480			can_add_to_cflags=no
9481
9482fi
9483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9484		fi
9485		CFLAGS="$save_CFLAGS"
9486		if test x"$can_add_to_cflags" = "xyes"
9487		then
9488		    V_CCOPT="$V_CCOPT -W"
9489		fi
9490
9491else
9492
9493		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9494$as_echo "no" >&6; }
9495		CFLAGS="$save_CFLAGS"
9496
9497fi
9498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9499
9500
9501	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5
9502$as_echo_n "checking whether the compiler supports the -Wall option... " >&6; }
9503	save_CFLAGS="$CFLAGS"
9504	if expr "x-Wall" : "x-W.*" >/dev/null
9505	then
9506	    CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wall"
9507	elif expr "x-Wall" : "x-f.*" >/dev/null
9508	then
9509	    CFLAGS="$CFLAGS -Werror -Wall"
9510	elif expr "x-Wall" : "x-m.*" >/dev/null
9511	then
9512	    CFLAGS="$CFLAGS -Werror -Wall"
9513	else
9514	    CFLAGS="$CFLAGS -Wall"
9515	fi
9516	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9517/* end confdefs.h.  */
9518
9519int
9520main ()
9521{
9522return 0
9523  ;
9524  return 0;
9525}
9526_ACEOF
9527if ac_fn_c_try_compile "$LINENO"; then :
9528
9529		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9530$as_echo "yes" >&6; }
9531		can_add_to_cflags=yes
9532		#
9533		# The compile supports this; do we have some C code for
9534		# which the warning should *not* appear?
9535		# We test the fourth argument because the third argument
9536		# could contain quotes, breaking the test.
9537		#
9538		if test "x" != "x"
9539		then
9540		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9541		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wall " >&5
9542$as_echo_n "checking whether -Wall ... " >&6; }
9543		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9544/* end confdefs.h.  */
9545
9546_ACEOF
9547if ac_fn_c_try_compile "$LINENO"; then :
9548
9549			#
9550			# Not a problem.
9551			#
9552			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9553$as_echo "no" >&6; }
9554
9555else
9556
9557			#
9558			# A problem.
9559			#
9560			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9561$as_echo "yes" >&6; }
9562			can_add_to_cflags=no
9563
9564fi
9565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9566		fi
9567		CFLAGS="$save_CFLAGS"
9568		if test x"$can_add_to_cflags" = "xyes"
9569		then
9570		    V_CCOPT="$V_CCOPT -Wall"
9571		fi
9572
9573else
9574
9575		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9576$as_echo "no" >&6; }
9577		CFLAGS="$save_CFLAGS"
9578
9579fi
9580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9581
9582
9583	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcomma option" >&5
9584$as_echo_n "checking whether the compiler supports the -Wcomma option... " >&6; }
9585	save_CFLAGS="$CFLAGS"
9586	if expr "x-Wcomma" : "x-W.*" >/dev/null
9587	then
9588	    CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wcomma"
9589	elif expr "x-Wcomma" : "x-f.*" >/dev/null
9590	then
9591	    CFLAGS="$CFLAGS -Werror -Wcomma"
9592	elif expr "x-Wcomma" : "x-m.*" >/dev/null
9593	then
9594	    CFLAGS="$CFLAGS -Werror -Wcomma"
9595	else
9596	    CFLAGS="$CFLAGS -Wcomma"
9597	fi
9598	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9599/* end confdefs.h.  */
9600
9601int
9602main ()
9603{
9604return 0
9605  ;
9606  return 0;
9607}
9608_ACEOF
9609if ac_fn_c_try_compile "$LINENO"; then :
9610
9611		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9612$as_echo "yes" >&6; }
9613		can_add_to_cflags=yes
9614		#
9615		# The compile supports this; do we have some C code for
9616		# which the warning should *not* appear?
9617		# We test the fourth argument because the third argument
9618		# could contain quotes, breaking the test.
9619		#
9620		if test "x" != "x"
9621		then
9622		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9623		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wcomma " >&5
9624$as_echo_n "checking whether -Wcomma ... " >&6; }
9625		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9626/* end confdefs.h.  */
9627
9628_ACEOF
9629if ac_fn_c_try_compile "$LINENO"; then :
9630
9631			#
9632			# Not a problem.
9633			#
9634			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9635$as_echo "no" >&6; }
9636
9637else
9638
9639			#
9640			# A problem.
9641			#
9642			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9643$as_echo "yes" >&6; }
9644			can_add_to_cflags=no
9645
9646fi
9647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9648		fi
9649		CFLAGS="$save_CFLAGS"
9650		if test x"$can_add_to_cflags" = "xyes"
9651		then
9652		    V_CCOPT="$V_CCOPT -Wcomma"
9653		fi
9654
9655else
9656
9657		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9658$as_echo "no" >&6; }
9659		CFLAGS="$save_CFLAGS"
9660
9661fi
9662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9663
9664
9665	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wdocumentation option" >&5
9666$as_echo_n "checking whether the compiler supports the -Wdocumentation option... " >&6; }
9667	save_CFLAGS="$CFLAGS"
9668	if expr "x-Wdocumentation" : "x-W.*" >/dev/null
9669	then
9670	    CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wdocumentation"
9671	elif expr "x-Wdocumentation" : "x-f.*" >/dev/null
9672	then
9673	    CFLAGS="$CFLAGS -Werror -Wdocumentation"
9674	elif expr "x-Wdocumentation" : "x-m.*" >/dev/null
9675	then
9676	    CFLAGS="$CFLAGS -Werror -Wdocumentation"
9677	else
9678	    CFLAGS="$CFLAGS -Wdocumentation"
9679	fi
9680	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9681/* end confdefs.h.  */
9682
9683int
9684main ()
9685{
9686return 0
9687  ;
9688  return 0;
9689}
9690_ACEOF
9691if ac_fn_c_try_compile "$LINENO"; then :
9692
9693		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9694$as_echo "yes" >&6; }
9695		can_add_to_cflags=yes
9696		#
9697		# The compile supports this; do we have some C code for
9698		# which the warning should *not* appear?
9699		# We test the fourth argument because the third argument
9700		# could contain quotes, breaking the test.
9701		#
9702		if test "x" != "x"
9703		then
9704		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9705		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wdocumentation " >&5
9706$as_echo_n "checking whether -Wdocumentation ... " >&6; }
9707		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9708/* end confdefs.h.  */
9709
9710_ACEOF
9711if ac_fn_c_try_compile "$LINENO"; then :
9712
9713			#
9714			# Not a problem.
9715			#
9716			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9717$as_echo "no" >&6; }
9718
9719else
9720
9721			#
9722			# A problem.
9723			#
9724			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9725$as_echo "yes" >&6; }
9726			can_add_to_cflags=no
9727
9728fi
9729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9730		fi
9731		CFLAGS="$save_CFLAGS"
9732		if test x"$can_add_to_cflags" = "xyes"
9733		then
9734		    V_CCOPT="$V_CCOPT -Wdocumentation"
9735		fi
9736
9737else
9738
9739		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9740$as_echo "no" >&6; }
9741		CFLAGS="$save_CFLAGS"
9742
9743fi
9744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9745
9746
9747	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wformat-nonliteral option" >&5
9748$as_echo_n "checking whether the compiler supports the -Wformat-nonliteral option... " >&6; }
9749	save_CFLAGS="$CFLAGS"
9750	if expr "x-Wformat-nonliteral" : "x-W.*" >/dev/null
9751	then
9752	    CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wformat-nonliteral"
9753	elif expr "x-Wformat-nonliteral" : "x-f.*" >/dev/null
9754	then
9755	    CFLAGS="$CFLAGS -Werror -Wformat-nonliteral"
9756	elif expr "x-Wformat-nonliteral" : "x-m.*" >/dev/null
9757	then
9758	    CFLAGS="$CFLAGS -Werror -Wformat-nonliteral"
9759	else
9760	    CFLAGS="$CFLAGS -Wformat-nonliteral"
9761	fi
9762	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9763/* end confdefs.h.  */
9764
9765int
9766main ()
9767{
9768return 0
9769  ;
9770  return 0;
9771}
9772_ACEOF
9773if ac_fn_c_try_compile "$LINENO"; then :
9774
9775		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9776$as_echo "yes" >&6; }
9777		can_add_to_cflags=yes
9778		#
9779		# The compile supports this; do we have some C code for
9780		# which the warning should *not* appear?
9781		# We test the fourth argument because the third argument
9782		# could contain quotes, breaking the test.
9783		#
9784		if test "x" != "x"
9785		then
9786		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9787		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wformat-nonliteral " >&5
9788$as_echo_n "checking whether -Wformat-nonliteral ... " >&6; }
9789		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9790/* end confdefs.h.  */
9791
9792_ACEOF
9793if ac_fn_c_try_compile "$LINENO"; then :
9794
9795			#
9796			# Not a problem.
9797			#
9798			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9799$as_echo "no" >&6; }
9800
9801else
9802
9803			#
9804			# A problem.
9805			#
9806			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9807$as_echo "yes" >&6; }
9808			can_add_to_cflags=no
9809
9810fi
9811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9812		fi
9813		CFLAGS="$save_CFLAGS"
9814		if test x"$can_add_to_cflags" = "xyes"
9815		then
9816		    V_CCOPT="$V_CCOPT -Wformat-nonliteral"
9817		fi
9818
9819else
9820
9821		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9822$as_echo "no" >&6; }
9823		CFLAGS="$save_CFLAGS"
9824
9825fi
9826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9827
9828
9829	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-noreturn option" >&5
9830$as_echo_n "checking whether the compiler supports the -Wmissing-noreturn option... " >&6; }
9831	save_CFLAGS="$CFLAGS"
9832	if expr "x-Wmissing-noreturn" : "x-W.*" >/dev/null
9833	then
9834	    CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-noreturn"
9835	elif expr "x-Wmissing-noreturn" : "x-f.*" >/dev/null
9836	then
9837	    CFLAGS="$CFLAGS -Werror -Wmissing-noreturn"
9838	elif expr "x-Wmissing-noreturn" : "x-m.*" >/dev/null
9839	then
9840	    CFLAGS="$CFLAGS -Werror -Wmissing-noreturn"
9841	else
9842	    CFLAGS="$CFLAGS -Wmissing-noreturn"
9843	fi
9844	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9845/* end confdefs.h.  */
9846
9847int
9848main ()
9849{
9850return 0
9851  ;
9852  return 0;
9853}
9854_ACEOF
9855if ac_fn_c_try_compile "$LINENO"; then :
9856
9857		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9858$as_echo "yes" >&6; }
9859		can_add_to_cflags=yes
9860		#
9861		# The compile supports this; do we have some C code for
9862		# which the warning should *not* appear?
9863		# We test the fourth argument because the third argument
9864		# could contain quotes, breaking the test.
9865		#
9866		if test "x" != "x"
9867		then
9868		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9869		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-noreturn " >&5
9870$as_echo_n "checking whether -Wmissing-noreturn ... " >&6; }
9871		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9872/* end confdefs.h.  */
9873
9874_ACEOF
9875if ac_fn_c_try_compile "$LINENO"; then :
9876
9877			#
9878			# Not a problem.
9879			#
9880			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9881$as_echo "no" >&6; }
9882
9883else
9884
9885			#
9886			# A problem.
9887			#
9888			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9889$as_echo "yes" >&6; }
9890			can_add_to_cflags=no
9891
9892fi
9893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9894		fi
9895		CFLAGS="$save_CFLAGS"
9896		if test x"$can_add_to_cflags" = "xyes"
9897		then
9898		    V_CCOPT="$V_CCOPT -Wmissing-noreturn"
9899		fi
9900
9901else
9902
9903		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9904$as_echo "no" >&6; }
9905		CFLAGS="$save_CFLAGS"
9906
9907fi
9908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9909
9910
9911	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5
9912$as_echo_n "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
9913	save_CFLAGS="$CFLAGS"
9914	if expr "x-Wmissing-prototypes" : "x-W.*" >/dev/null
9915	then
9916	    CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-prototypes"
9917	elif expr "x-Wmissing-prototypes" : "x-f.*" >/dev/null
9918	then
9919	    CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
9920	elif expr "x-Wmissing-prototypes" : "x-m.*" >/dev/null
9921	then
9922	    CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
9923	else
9924	    CFLAGS="$CFLAGS -Wmissing-prototypes"
9925	fi
9926	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9927/* end confdefs.h.  */
9928
9929int
9930main ()
9931{
9932return 0
9933  ;
9934  return 0;
9935}
9936_ACEOF
9937if ac_fn_c_try_compile "$LINENO"; then :
9938
9939		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9940$as_echo "yes" >&6; }
9941		can_add_to_cflags=yes
9942		#
9943		# The compile supports this; do we have some C code for
9944		# which the warning should *not* appear?
9945		# We test the fourth argument because the third argument
9946		# could contain quotes, breaking the test.
9947		#
9948		if test "x" != "x"
9949		then
9950		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9951		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-prototypes " >&5
9952$as_echo_n "checking whether -Wmissing-prototypes ... " >&6; }
9953		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9954/* end confdefs.h.  */
9955
9956_ACEOF
9957if ac_fn_c_try_compile "$LINENO"; then :
9958
9959			#
9960			# Not a problem.
9961			#
9962			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9963$as_echo "no" >&6; }
9964
9965else
9966
9967			#
9968			# A problem.
9969			#
9970			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9971$as_echo "yes" >&6; }
9972			can_add_to_cflags=no
9973
9974fi
9975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9976		fi
9977		CFLAGS="$save_CFLAGS"
9978		if test x"$can_add_to_cflags" = "xyes"
9979		then
9980		    V_CCOPT="$V_CCOPT -Wmissing-prototypes"
9981		fi
9982
9983else
9984
9985		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9986$as_echo "no" >&6; }
9987		CFLAGS="$save_CFLAGS"
9988
9989fi
9990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9991
9992
9993	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-variable-declarations option" >&5
9994$as_echo_n "checking whether the compiler supports the -Wmissing-variable-declarations option... " >&6; }
9995	save_CFLAGS="$CFLAGS"
9996	if expr "x-Wmissing-variable-declarations" : "x-W.*" >/dev/null
9997	then
9998	    CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-variable-declarations"
9999	elif expr "x-Wmissing-variable-declarations" : "x-f.*" >/dev/null
10000	then
10001	    CFLAGS="$CFLAGS -Werror -Wmissing-variable-declarations"
10002	elif expr "x-Wmissing-variable-declarations" : "x-m.*" >/dev/null
10003	then
10004	    CFLAGS="$CFLAGS -Werror -Wmissing-variable-declarations"
10005	else
10006	    CFLAGS="$CFLAGS -Wmissing-variable-declarations"
10007	fi
10008	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10009/* end confdefs.h.  */
10010
10011int
10012main ()
10013{
10014return 0
10015  ;
10016  return 0;
10017}
10018_ACEOF
10019if ac_fn_c_try_compile "$LINENO"; then :
10020
10021		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10022$as_echo "yes" >&6; }
10023		can_add_to_cflags=yes
10024		#
10025		# The compile supports this; do we have some C code for
10026		# which the warning should *not* appear?
10027		# We test the fourth argument because the third argument
10028		# could contain quotes, breaking the test.
10029		#
10030		if test "x" != "x"
10031		then
10032		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10033		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-variable-declarations " >&5
10034$as_echo_n "checking whether -Wmissing-variable-declarations ... " >&6; }
10035		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10036/* end confdefs.h.  */
10037
10038_ACEOF
10039if ac_fn_c_try_compile "$LINENO"; then :
10040
10041			#
10042			# Not a problem.
10043			#
10044			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10045$as_echo "no" >&6; }
10046
10047else
10048
10049			#
10050			# A problem.
10051			#
10052			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10053$as_echo "yes" >&6; }
10054			can_add_to_cflags=no
10055
10056fi
10057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10058		fi
10059		CFLAGS="$save_CFLAGS"
10060		if test x"$can_add_to_cflags" = "xyes"
10061		then
10062		    V_CCOPT="$V_CCOPT -Wmissing-variable-declarations"
10063		fi
10064
10065else
10066
10067		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10068$as_echo "no" >&6; }
10069		CFLAGS="$save_CFLAGS"
10070
10071fi
10072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10073
10074
10075	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-arith option" >&5
10076$as_echo_n "checking whether the compiler supports the -Wpointer-arith option... " >&6; }
10077	save_CFLAGS="$CFLAGS"
10078	if expr "x-Wpointer-arith" : "x-W.*" >/dev/null
10079	then
10080	    CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpointer-arith"
10081	elif expr "x-Wpointer-arith" : "x-f.*" >/dev/null
10082	then
10083	    CFLAGS="$CFLAGS -Werror -Wpointer-arith"
10084	elif expr "x-Wpointer-arith" : "x-m.*" >/dev/null
10085	then
10086	    CFLAGS="$CFLAGS -Werror -Wpointer-arith"
10087	else
10088	    CFLAGS="$CFLAGS -Wpointer-arith"
10089	fi
10090	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10091/* end confdefs.h.  */
10092
10093int
10094main ()
10095{
10096return 0
10097  ;
10098  return 0;
10099}
10100_ACEOF
10101if ac_fn_c_try_compile "$LINENO"; then :
10102
10103		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10104$as_echo "yes" >&6; }
10105		can_add_to_cflags=yes
10106		#
10107		# The compile supports this; do we have some C code for
10108		# which the warning should *not* appear?
10109		# We test the fourth argument because the third argument
10110		# could contain quotes, breaking the test.
10111		#
10112		if test "x" != "x"
10113		then
10114		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10115		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wpointer-arith " >&5
10116$as_echo_n "checking whether -Wpointer-arith ... " >&6; }
10117		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10118/* end confdefs.h.  */
10119
10120_ACEOF
10121if ac_fn_c_try_compile "$LINENO"; then :
10122
10123			#
10124			# Not a problem.
10125			#
10126			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10127$as_echo "no" >&6; }
10128
10129else
10130
10131			#
10132			# A problem.
10133			#
10134			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10135$as_echo "yes" >&6; }
10136			can_add_to_cflags=no
10137
10138fi
10139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10140		fi
10141		CFLAGS="$save_CFLAGS"
10142		if test x"$can_add_to_cflags" = "xyes"
10143		then
10144		    V_CCOPT="$V_CCOPT -Wpointer-arith"
10145		fi
10146
10147else
10148
10149		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10150$as_echo "no" >&6; }
10151		CFLAGS="$save_CFLAGS"
10152
10153fi
10154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10155
10156
10157	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-sign option" >&5
10158$as_echo_n "checking whether the compiler supports the -Wpointer-sign option... " >&6; }
10159	save_CFLAGS="$CFLAGS"
10160	if expr "x-Wpointer-sign" : "x-W.*" >/dev/null
10161	then
10162	    CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpointer-sign"
10163	elif expr "x-Wpointer-sign" : "x-f.*" >/dev/null
10164	then
10165	    CFLAGS="$CFLAGS -Werror -Wpointer-sign"
10166	elif expr "x-Wpointer-sign" : "x-m.*" >/dev/null
10167	then
10168	    CFLAGS="$CFLAGS -Werror -Wpointer-sign"
10169	else
10170	    CFLAGS="$CFLAGS -Wpointer-sign"
10171	fi
10172	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10173/* end confdefs.h.  */
10174
10175int
10176main ()
10177{
10178return 0
10179  ;
10180  return 0;
10181}
10182_ACEOF
10183if ac_fn_c_try_compile "$LINENO"; then :
10184
10185		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10186$as_echo "yes" >&6; }
10187		can_add_to_cflags=yes
10188		#
10189		# The compile supports this; do we have some C code for
10190		# which the warning should *not* appear?
10191		# We test the fourth argument because the third argument
10192		# could contain quotes, breaking the test.
10193		#
10194		if test "x" != "x"
10195		then
10196		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10197		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wpointer-sign " >&5
10198$as_echo_n "checking whether -Wpointer-sign ... " >&6; }
10199		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10200/* end confdefs.h.  */
10201
10202_ACEOF
10203if ac_fn_c_try_compile "$LINENO"; then :
10204
10205			#
10206			# Not a problem.
10207			#
10208			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10209$as_echo "no" >&6; }
10210
10211else
10212
10213			#
10214			# A problem.
10215			#
10216			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10217$as_echo "yes" >&6; }
10218			can_add_to_cflags=no
10219
10220fi
10221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10222		fi
10223		CFLAGS="$save_CFLAGS"
10224		if test x"$can_add_to_cflags" = "xyes"
10225		then
10226		    V_CCOPT="$V_CCOPT -Wpointer-sign"
10227		fi
10228
10229else
10230
10231		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10232$as_echo "no" >&6; }
10233		CFLAGS="$save_CFLAGS"
10234
10235fi
10236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10237
10238
10239	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshadow option" >&5
10240$as_echo_n "checking whether the compiler supports the -Wshadow option... " >&6; }
10241	save_CFLAGS="$CFLAGS"
10242	if expr "x-Wshadow" : "x-W.*" >/dev/null
10243	then
10244	    CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wshadow"
10245	elif expr "x-Wshadow" : "x-f.*" >/dev/null
10246	then
10247	    CFLAGS="$CFLAGS -Werror -Wshadow"
10248	elif expr "x-Wshadow" : "x-m.*" >/dev/null
10249	then
10250	    CFLAGS="$CFLAGS -Werror -Wshadow"
10251	else
10252	    CFLAGS="$CFLAGS -Wshadow"
10253	fi
10254	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10255/* end confdefs.h.  */
10256
10257int
10258main ()
10259{
10260return 0
10261  ;
10262  return 0;
10263}
10264_ACEOF
10265if ac_fn_c_try_compile "$LINENO"; then :
10266
10267		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10268$as_echo "yes" >&6; }
10269		can_add_to_cflags=yes
10270		#
10271		# The compile supports this; do we have some C code for
10272		# which the warning should *not* appear?
10273		# We test the fourth argument because the third argument
10274		# could contain quotes, breaking the test.
10275		#
10276		if test "x" != "x"
10277		then
10278		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10279		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wshadow " >&5
10280$as_echo_n "checking whether -Wshadow ... " >&6; }
10281		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10282/* end confdefs.h.  */
10283
10284_ACEOF
10285if ac_fn_c_try_compile "$LINENO"; then :
10286
10287			#
10288			# Not a problem.
10289			#
10290			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10291$as_echo "no" >&6; }
10292
10293else
10294
10295			#
10296			# A problem.
10297			#
10298			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10299$as_echo "yes" >&6; }
10300			can_add_to_cflags=no
10301
10302fi
10303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10304		fi
10305		CFLAGS="$save_CFLAGS"
10306		if test x"$can_add_to_cflags" = "xyes"
10307		then
10308		    V_CCOPT="$V_CCOPT -Wshadow"
10309		fi
10310
10311else
10312
10313		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10314$as_echo "no" >&6; }
10315		CFLAGS="$save_CFLAGS"
10316
10317fi
10318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10319
10320
10321	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wsign-compare option" >&5
10322$as_echo_n "checking whether the compiler supports the -Wsign-compare option... " >&6; }
10323	save_CFLAGS="$CFLAGS"
10324	if expr "x-Wsign-compare" : "x-W.*" >/dev/null
10325	then
10326	    CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wsign-compare"
10327	elif expr "x-Wsign-compare" : "x-f.*" >/dev/null
10328	then
10329	    CFLAGS="$CFLAGS -Werror -Wsign-compare"
10330	elif expr "x-Wsign-compare" : "x-m.*" >/dev/null
10331	then
10332	    CFLAGS="$CFLAGS -Werror -Wsign-compare"
10333	else
10334	    CFLAGS="$CFLAGS -Wsign-compare"
10335	fi
10336	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10337/* end confdefs.h.  */
10338
10339int
10340main ()
10341{
10342return 0
10343  ;
10344  return 0;
10345}
10346_ACEOF
10347if ac_fn_c_try_compile "$LINENO"; then :
10348
10349		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10350$as_echo "yes" >&6; }
10351		can_add_to_cflags=yes
10352		#
10353		# The compile supports this; do we have some C code for
10354		# which the warning should *not* appear?
10355		# We test the fourth argument because the third argument
10356		# could contain quotes, breaking the test.
10357		#
10358		if test "x" != "x"
10359		then
10360		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10361		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wsign-compare " >&5
10362$as_echo_n "checking whether -Wsign-compare ... " >&6; }
10363		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10364/* end confdefs.h.  */
10365
10366_ACEOF
10367if ac_fn_c_try_compile "$LINENO"; then :
10368
10369			#
10370			# Not a problem.
10371			#
10372			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10373$as_echo "no" >&6; }
10374
10375else
10376
10377			#
10378			# A problem.
10379			#
10380			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10381$as_echo "yes" >&6; }
10382			can_add_to_cflags=no
10383
10384fi
10385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10386		fi
10387		CFLAGS="$save_CFLAGS"
10388		if test x"$can_add_to_cflags" = "xyes"
10389		then
10390		    V_CCOPT="$V_CCOPT -Wsign-compare"
10391		fi
10392
10393else
10394
10395		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10396$as_echo "no" >&6; }
10397		CFLAGS="$save_CFLAGS"
10398
10399fi
10400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10401
10402
10403	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5
10404$as_echo_n "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; }
10405	save_CFLAGS="$CFLAGS"
10406	if expr "x-Wstrict-prototypes" : "x-W.*" >/dev/null
10407	then
10408	    CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wstrict-prototypes"
10409	elif expr "x-Wstrict-prototypes" : "x-f.*" >/dev/null
10410	then
10411	    CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
10412	elif expr "x-Wstrict-prototypes" : "x-m.*" >/dev/null
10413	then
10414	    CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
10415	else
10416	    CFLAGS="$CFLAGS -Wstrict-prototypes"
10417	fi
10418	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10419/* end confdefs.h.  */
10420
10421int
10422main ()
10423{
10424return 0
10425  ;
10426  return 0;
10427}
10428_ACEOF
10429if ac_fn_c_try_compile "$LINENO"; then :
10430
10431		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10432$as_echo "yes" >&6; }
10433		can_add_to_cflags=yes
10434		#
10435		# The compile supports this; do we have some C code for
10436		# which the warning should *not* appear?
10437		# We test the fourth argument because the third argument
10438		# could contain quotes, breaking the test.
10439		#
10440		if test "x" != "x"
10441		then
10442		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10443		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wstrict-prototypes " >&5
10444$as_echo_n "checking whether -Wstrict-prototypes ... " >&6; }
10445		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10446/* end confdefs.h.  */
10447
10448_ACEOF
10449if ac_fn_c_try_compile "$LINENO"; then :
10450
10451			#
10452			# Not a problem.
10453			#
10454			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10455$as_echo "no" >&6; }
10456
10457else
10458
10459			#
10460			# A problem.
10461			#
10462			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10463$as_echo "yes" >&6; }
10464			can_add_to_cflags=no
10465
10466fi
10467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10468		fi
10469		CFLAGS="$save_CFLAGS"
10470		if test x"$can_add_to_cflags" = "xyes"
10471		then
10472		    V_CCOPT="$V_CCOPT -Wstrict-prototypes"
10473		fi
10474
10475else
10476
10477		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10478$as_echo "no" >&6; }
10479		CFLAGS="$save_CFLAGS"
10480
10481fi
10482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10483
10484
10485	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunused-parameter option" >&5
10486$as_echo_n "checking whether the compiler supports the -Wunused-parameter option... " >&6; }
10487	save_CFLAGS="$CFLAGS"
10488	if expr "x-Wunused-parameter" : "x-W.*" >/dev/null
10489	then
10490	    CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wunused-parameter"
10491	elif expr "x-Wunused-parameter" : "x-f.*" >/dev/null
10492	then
10493	    CFLAGS="$CFLAGS -Werror -Wunused-parameter"
10494	elif expr "x-Wunused-parameter" : "x-m.*" >/dev/null
10495	then
10496	    CFLAGS="$CFLAGS -Werror -Wunused-parameter"
10497	else
10498	    CFLAGS="$CFLAGS -Wunused-parameter"
10499	fi
10500	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10501/* end confdefs.h.  */
10502
10503int
10504main ()
10505{
10506return 0
10507  ;
10508  return 0;
10509}
10510_ACEOF
10511if ac_fn_c_try_compile "$LINENO"; then :
10512
10513		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10514$as_echo "yes" >&6; }
10515		can_add_to_cflags=yes
10516		#
10517		# The compile supports this; do we have some C code for
10518		# which the warning should *not* appear?
10519		# We test the fourth argument because the third argument
10520		# could contain quotes, breaking the test.
10521		#
10522		if test "x" != "x"
10523		then
10524		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10525		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wunused-parameter " >&5
10526$as_echo_n "checking whether -Wunused-parameter ... " >&6; }
10527		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10528/* end confdefs.h.  */
10529
10530_ACEOF
10531if ac_fn_c_try_compile "$LINENO"; then :
10532
10533			#
10534			# Not a problem.
10535			#
10536			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10537$as_echo "no" >&6; }
10538
10539else
10540
10541			#
10542			# A problem.
10543			#
10544			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10545$as_echo "yes" >&6; }
10546			can_add_to_cflags=no
10547
10548fi
10549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10550		fi
10551		CFLAGS="$save_CFLAGS"
10552		if test x"$can_add_to_cflags" = "xyes"
10553		then
10554		    V_CCOPT="$V_CCOPT -Wunused-parameter"
10555		fi
10556
10557else
10558
10559		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10560$as_echo "no" >&6; }
10561		CFLAGS="$save_CFLAGS"
10562
10563fi
10564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10565
10566
10567	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wused-but-marked-unused option" >&5
10568$as_echo_n "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; }
10569	save_CFLAGS="$CFLAGS"
10570	if expr "x-Wused-but-marked-unused" : "x-W.*" >/dev/null
10571	then
10572	    CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wused-but-marked-unused"
10573	elif expr "x-Wused-but-marked-unused" : "x-f.*" >/dev/null
10574	then
10575	    CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
10576	elif expr "x-Wused-but-marked-unused" : "x-m.*" >/dev/null
10577	then
10578	    CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
10579	else
10580	    CFLAGS="$CFLAGS -Wused-but-marked-unused"
10581	fi
10582	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10583/* end confdefs.h.  */
10584
10585int
10586main ()
10587{
10588return 0
10589  ;
10590  return 0;
10591}
10592_ACEOF
10593if ac_fn_c_try_compile "$LINENO"; then :
10594
10595		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10596$as_echo "yes" >&6; }
10597		can_add_to_cflags=yes
10598		#
10599		# The compile supports this; do we have some C code for
10600		# which the warning should *not* appear?
10601		# We test the fourth argument because the third argument
10602		# could contain quotes, breaking the test.
10603		#
10604		if test "x" != "x"
10605		then
10606		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10607		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wused-but-marked-unused " >&5
10608$as_echo_n "checking whether -Wused-but-marked-unused ... " >&6; }
10609		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10610/* end confdefs.h.  */
10611
10612_ACEOF
10613if ac_fn_c_try_compile "$LINENO"; then :
10614
10615			#
10616			# Not a problem.
10617			#
10618			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10619$as_echo "no" >&6; }
10620
10621else
10622
10623			#
10624			# A problem.
10625			#
10626			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10627$as_echo "yes" >&6; }
10628			can_add_to_cflags=no
10629
10630fi
10631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10632		fi
10633		CFLAGS="$save_CFLAGS"
10634		if test x"$can_add_to_cflags" = "xyes"
10635		then
10636		    V_CCOPT="$V_CCOPT -Wused-but-marked-unused"
10637		fi
10638
10639else
10640
10641		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10642$as_echo "no" >&6; }
10643		CFLAGS="$save_CFLAGS"
10644
10645fi
10646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10647
10648		    # Warns about safeguards added in case the enums are
10649		    # extended
10650		    # AC_LBL_CHECK_COMPILER_OPT(V_CCOPT, -Wcovered-switch-default)
10651		    #
10652		    # This can cause problems with ntohs(), ntohl(),
10653		    # htons(), and htonl() on some platforms, such
10654		    # as OpenBSD 6.3 with Clang 5.0.1.  I guess the
10655		    # problem is that the macro that ultimately does
10656		    # the byte-swapping involves a conditional
10657		    # expression that tests whether the value being
10658		    # swapped is a compile-time constant or not,
10659		    # using __builtin_constant_p(), and, depending
10660		    # on whether it is, does a compile-time swap or
10661		    # a run-time swap; perhaps the compiler always
10662		    # considers one of the two results of the
10663		    # conditional expressin is never evaluated,
10664		    # because the conditional check is done at
10665		    # compile time, and thus always says "that
10666		    # expression is never executed".
10667		    #
10668		    # (Perhaps there should be a way of flagging
10669		    # an expression that you *want* evaluated at
10670		    # compile time, so that the compiler 1) warns
10671		    # if it *can't* be evaluated at compile time
10672		    # and 2) *doesn't* warn that the true or false
10673		    # branch will never be reached.)
10674		    #
10675
10676	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunreachable-code option" >&5
10677$as_echo_n "checking whether the compiler supports the -Wunreachable-code option... " >&6; }
10678	save_CFLAGS="$CFLAGS"
10679	if expr "x-Wunreachable-code" : "x-W.*" >/dev/null
10680	then
10681	    CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wunreachable-code"
10682	elif expr "x-Wunreachable-code" : "x-f.*" >/dev/null
10683	then
10684	    CFLAGS="$CFLAGS -Werror -Wunreachable-code"
10685	elif expr "x-Wunreachable-code" : "x-m.*" >/dev/null
10686	then
10687	    CFLAGS="$CFLAGS -Werror -Wunreachable-code"
10688	else
10689	    CFLAGS="$CFLAGS -Wunreachable-code"
10690	fi
10691	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10692/* end confdefs.h.  */
10693
10694int
10695main ()
10696{
10697return 0
10698  ;
10699  return 0;
10700}
10701_ACEOF
10702if ac_fn_c_try_compile "$LINENO"; then :
10703
10704		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10705$as_echo "yes" >&6; }
10706		can_add_to_cflags=yes
10707		#
10708		# The compile supports this; do we have some C code for
10709		# which the warning should *not* appear?
10710		# We test the fourth argument because the third argument
10711		# could contain quotes, breaking the test.
10712		#
10713		if test "xgenerates warnings from ntohs()" != "x"
10714		then
10715		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10716		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wunreachable-code generates warnings from ntohs()" >&5
10717$as_echo_n "checking whether -Wunreachable-code generates warnings from ntohs()... " >&6; }
10718		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10719/* end confdefs.h.  */
10720#include <arpa/inet.h>
10721
10722unsigned short
10723testme(unsigned short a)
10724{
10725	return ntohs(a);
10726}
10727
10728_ACEOF
10729if ac_fn_c_try_compile "$LINENO"; then :
10730
10731			#
10732			# Not a problem.
10733			#
10734			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10735$as_echo "no" >&6; }
10736
10737else
10738
10739			#
10740			# A problem.
10741			#
10742			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10743$as_echo "yes" >&6; }
10744			can_add_to_cflags=no
10745
10746fi
10747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10748		fi
10749		CFLAGS="$save_CFLAGS"
10750		if test x"$can_add_to_cflags" = "xyes"
10751		then
10752		    V_CCOPT="$V_CCOPT -Wunreachable-code"
10753		fi
10754
10755else
10756
10757		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10758$as_echo "no" >&6; }
10759		CFLAGS="$save_CFLAGS"
10760
10761fi
10762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10763
10764
10765	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshorten-64-to-32 option" >&5
10766$as_echo_n "checking whether the compiler supports the -Wshorten-64-to-32 option... " >&6; }
10767	save_CFLAGS="$CFLAGS"
10768	if expr "x-Wshorten-64-to-32" : "x-W.*" >/dev/null
10769	then
10770	    CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wshorten-64-to-32"
10771	elif expr "x-Wshorten-64-to-32" : "x-f.*" >/dev/null
10772	then
10773	    CFLAGS="$CFLAGS -Werror -Wshorten-64-to-32"
10774	elif expr "x-Wshorten-64-to-32" : "x-m.*" >/dev/null
10775	then
10776	    CFLAGS="$CFLAGS -Werror -Wshorten-64-to-32"
10777	else
10778	    CFLAGS="$CFLAGS -Wshorten-64-to-32"
10779	fi
10780	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10781/* end confdefs.h.  */
10782
10783int
10784main ()
10785{
10786return 0
10787  ;
10788  return 0;
10789}
10790_ACEOF
10791if ac_fn_c_try_compile "$LINENO"; then :
10792
10793		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10794$as_echo "yes" >&6; }
10795		can_add_to_cflags=yes
10796		#
10797		# The compile supports this; do we have some C code for
10798		# which the warning should *not* appear?
10799		# We test the fourth argument because the third argument
10800		# could contain quotes, breaking the test.
10801		#
10802		if test "x" != "x"
10803		then
10804		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10805		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wshorten-64-to-32 " >&5
10806$as_echo_n "checking whether -Wshorten-64-to-32 ... " >&6; }
10807		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10808/* end confdefs.h.  */
10809
10810_ACEOF
10811if ac_fn_c_try_compile "$LINENO"; then :
10812
10813			#
10814			# Not a problem.
10815			#
10816			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10817$as_echo "no" >&6; }
10818
10819else
10820
10821			#
10822			# A problem.
10823			#
10824			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10825$as_echo "yes" >&6; }
10826			can_add_to_cflags=no
10827
10828fi
10829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10830		fi
10831		CFLAGS="$save_CFLAGS"
10832		if test x"$can_add_to_cflags" = "xyes"
10833		then
10834		    V_CCOPT="$V_CCOPT -Wshorten-64-to-32"
10835		fi
10836
10837else
10838
10839		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10840$as_echo "no" >&6; }
10841		CFLAGS="$save_CFLAGS"
10842
10843fi
10844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10845
10846	    fi
10847
10848	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5
10849$as_echo_n "checking whether the compiler supports generating dependencies... " >&6; }
10850	if test "$GCC" = yes ; then
10851		#
10852		# GCC, or a compiler deemed to be GCC by AC_PROG_CC (even
10853		# though it's not); we assume that, in this case, the flag
10854		# would be -M.
10855		#
10856		ac_lbl_dependency_flag="-M"
10857	else
10858		#
10859		# Not GCC or a compiler deemed to be GCC; what platform is
10860		# this?  (We're assuming that if the compiler isn't GCC
10861		# it's the compiler from the vendor of the OS; that won't
10862		# necessarily be true for x86 platforms, where it might be
10863		# the Intel C compiler.)
10864		#
10865		case "$host_os" in
10866
10867		irix*|osf*|darwin*)
10868			#
10869			# MIPS C for IRIX, DEC C, and clang all use -M.
10870			#
10871			ac_lbl_dependency_flag="-M"
10872			;;
10873
10874		solaris*)
10875			#
10876			# Sun C uses -xM.
10877			#
10878			ac_lbl_dependency_flag="-xM"
10879			;;
10880
10881		hpux*)
10882			#
10883			# HP's older C compilers don't support this.
10884			# HP's newer C compilers support this with
10885			# either +M or +Make; the older compilers
10886			# interpret +M as something completely
10887			# different, so we use +Make so we don't
10888			# think it works with the older compilers.
10889			#
10890			ac_lbl_dependency_flag="+Make"
10891			;;
10892
10893		*)
10894			#
10895			# Not one of the above; assume no support for
10896			# generating dependencies.
10897			#
10898			ac_lbl_dependency_flag=""
10899			;;
10900		esac
10901	fi
10902
10903	#
10904	# Is ac_lbl_dependency_flag defined and, if so, does the compiler
10905	# complain about it?
10906	#
10907	# Note: clang doesn't seem to exit with an error status when handed
10908	# an unknown non-warning error, even if you pass it
10909	# -Werror=unknown-warning-option.  However, it always supports
10910	# -M, so the fact that this test always succeeds with clang
10911	# isn't an issue.
10912	#
10913	if test ! -z "$ac_lbl_dependency_flag"; then
10914		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10915/* end confdefs.h.  */
10916int main(void) { return 0; }
10917_ACEOF
10918		if { { $as_echo "$as_me:${as_lineno-$LINENO}: eval \"\$CC \$ac_lbl_dependency_flag conftest.c >/dev/null 2>&1\""; } >&5
10919  (eval "$CC $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1") 2>&5
10920  ac_status=$?
10921  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10922  test $ac_status = 0; }; then
10923			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5
10924$as_echo "yes, with $ac_lbl_dependency_flag" >&6; }
10925			DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
10926			MKDEP='${top_srcdir}/mkdep'
10927		else
10928			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10929$as_echo "no" >&6; }
10930			#
10931			# We can't run mkdep, so have "make depend" do
10932			# nothing.
10933			#
10934			MKDEP='${top_srcdir}/nomkdep'
10935		fi
10936		rm -rf conftest*
10937	else
10938		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10939$as_echo "no" >&6; }
10940		#
10941		# We can't run mkdep, so have "make depend" do
10942		# nothing.
10943		#
10944		MKDEP='${top_srcdir}/nomkdep'
10945	fi
10946
10947
10948
10949	    #
10950	    # We used to set -n32 for IRIX 6 when not using GCC (presumed
10951	    # to mean that we're using MIPS C or MIPSpro C); it specified
10952	    # the "new" faster 32-bit ABI, introduced in IRIX 6.2.  I'm
10953	    # not sure why that would be something to do *only* with a
10954	    # .devel file; why should the ABI for which we produce code
10955	    # depend on .devel?
10956	    #
10957	    os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
10958	    name="lbl/os-$os.h"
10959	    if test -f $name ; then
10960		    ln -s $name os-proto.h
10961
10962$as_echo "#define HAVE_OS_PROTO_H 1" >>confdefs.h
10963
10964	    else
10965		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find $name" >&5
10966$as_echo "$as_me: WARNING: can't find $name" >&2;}
10967	    fi
10968    fi
10969
10970#
10971# Check to see if the sockaddr struct has the 4.4 BSD sa_len member.
10972#
10973ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "
10974	#include <sys/types.h>
10975	#include <sys/socket.h>
10976
10977"
10978if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
10979
10980cat >>confdefs.h <<_ACEOF
10981#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
10982_ACEOF
10983
10984
10985fi
10986
10987
10988#
10989# Check to see if there's a sockaddr_storage structure.
10990#
10991ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
10992	#include <sys/types.h>
10993	#include <sys/socket.h>
10994
10995"
10996if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
10997
10998cat >>confdefs.h <<_ACEOF
10999#define HAVE_STRUCT_SOCKADDR_STORAGE 1
11000_ACEOF
11001
11002
11003fi
11004
11005
11006#
11007# Check to see if the dl_hp_ppa_info_t struct has the HP-UX 11.00
11008# dl_module_id_1 member.
11009#
11010# NOTE: any failure means we conclude that it doesn't have that member,
11011# so if we don't have DLPI, don't have a <sys/dlpi_ext.h> header, or
11012# have one that doesn't declare a dl_hp_ppa_info_t type, we conclude
11013# it doesn't have that member (which is OK, as either we won't be
11014# using code that would use that member, or we wouldn't compile in
11015# any case).
11016#
11017ac_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" "
11018	#include <sys/types.h>
11019	#include <sys/dlpi.h>
11020	#include <sys/dlpi_ext.h>
11021
11022"
11023if test "x$ac_cv_member_dl_hp_ppa_info_t_dl_module_id_1" = xyes; then :
11024
11025cat >>confdefs.h <<_ACEOF
11026#define HAVE_DL_HP_PPA_INFO_T_DL_MODULE_ID_1 1
11027_ACEOF
11028
11029
11030fi
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064#
11065# Various Linux-specific mechanisms.
11066#
11067# Check whether --enable-usb was given.
11068if test "${enable_usb+set}" = set; then :
11069  enableval=$enable_usb;
11070else
11071  enable_usb=yes
11072fi
11073
11074
11075#
11076# If somebody requested an XXX-only pcap, that doesn't include
11077# additional mechanisms.
11078#
11079if test "xxx_only" != yes; then
11080  case "$host_os" in
11081  linux*)
11082        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux usbmon USB sniffing support" >&5
11083$as_echo_n "checking for Linux usbmon USB sniffing support... " >&6; }
11084    if test "x$enable_usb" != "xno" ; then
11085
11086$as_echo "#define PCAP_SUPPORT_LINUX_USBMON 1" >>confdefs.h
11087
11088      MODULE_C_SRC="$MODULE_C_SRC pcap-usb-linux.c"
11089      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11090$as_echo "yes" >&6; }
11091      ac_usb_dev_name=`udevinfo -q name -p /sys/class/usb_device/usbmon 2>/dev/null`
11092      if test $? -ne 0 ; then
11093        ac_usb_dev_name="usbmon"
11094      fi
11095
11096cat >>confdefs.h <<_ACEOF
11097#define LINUX_USB_MON_DEV "/dev/$ac_usb_dev_name"
11098_ACEOF
11099
11100      { $as_echo "$as_me:${as_lineno-$LINENO}: Device for USB sniffing is /dev/$ac_usb_dev_name" >&5
11101$as_echo "$as_me: Device for USB sniffing is /dev/$ac_usb_dev_name" >&6;}
11102      #
11103      # Do we have a version of <linux/compiler.h> available?
11104      # If so, we might need it for <linux/usbdevice_fs.h>.
11105      #
11106      for ac_header in linux/compiler.h
11107do :
11108  ac_fn_c_check_header_mongrel "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default"
11109if test "x$ac_cv_header_linux_compiler_h" = xyes; then :
11110  cat >>confdefs.h <<_ACEOF
11111#define HAVE_LINUX_COMPILER_H 1
11112_ACEOF
11113
11114fi
11115
11116done
11117
11118      if test "$ac_cv_header_linux_compiler_h" = yes; then
11119        #
11120        # Yes - include it when testing for <linux/usbdevice_fs.h>.
11121        #
11122        for ac_header in linux/usbdevice_fs.h
11123do :
11124  ac_fn_c_check_header_compile "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "#include <linux/compiler.h>
11125"
11126if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then :
11127  cat >>confdefs.h <<_ACEOF
11128#define HAVE_LINUX_USBDEVICE_FS_H 1
11129_ACEOF
11130
11131fi
11132
11133done
11134
11135      else
11136        for ac_header in linux/usbdevice_fs.h
11137do :
11138  ac_fn_c_check_header_mongrel "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "$ac_includes_default"
11139if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then :
11140  cat >>confdefs.h <<_ACEOF
11141#define HAVE_LINUX_USBDEVICE_FS_H 1
11142_ACEOF
11143
11144fi
11145
11146done
11147
11148      fi
11149      if test "$ac_cv_header_linux_usbdevice_fs_h" = yes; then
11150        #
11151        # OK, does it define bRequestType?  Older versions of the kernel
11152        # define fields with names like "requesttype, "request", and
11153        # "value", rather than "bRequestType", "bRequest", and
11154        # "wValue".
11155        #
11156        ac_fn_c_check_member "$LINENO" "struct usbdevfs_ctrltransfer" "bRequestType" "ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" "
11157            $ac_includes_default
11158            #ifdef HAVE_LINUX_COMPILER_H
11159            #include <linux/compiler.h>
11160            #endif
11161            #include <linux/usbdevice_fs.h>
11162
11163"
11164if test "x$ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" = xyes; then :
11165
11166cat >>confdefs.h <<_ACEOF
11167#define HAVE_STRUCT_USBDEVFS_CTRLTRANSFER_BREQUESTTYPE 1
11168_ACEOF
11169
11170
11171fi
11172
11173      fi
11174    else
11175      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11176$as_echo "no" >&6; }
11177    fi
11178
11179    #
11180    # Life's too short to deal with trying to get this to compile
11181    # if you don't get the right types defined with
11182    # __KERNEL_STRICT_NAMES getting defined by some other include.
11183    #
11184    # Check whether the includes Just Work.  If not, don't turn on
11185    # netfilter support.
11186    #
11187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netfilter support" >&5
11188$as_echo_n "checking whether we can compile the netfilter support... " >&6; }
11189    if ${ac_cv_netfilter_can_compile+:} false; then :
11190  $as_echo_n "(cached) " >&6
11191else
11192  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11193/* end confdefs.h.  */
11194
11195$ac_includes_default
11196#include <sys/socket.h>
11197#include <netinet/in.h>
11198#include <linux/types.h>
11199
11200#include <linux/netlink.h>
11201#include <linux/netfilter.h>
11202#include <linux/netfilter/nfnetlink.h>
11203#include <linux/netfilter/nfnetlink_log.h>
11204#include <linux/netfilter/nfnetlink_queue.h>
11205int
11206main ()
11207{
11208
11209  ;
11210  return 0;
11211}
11212_ACEOF
11213if ac_fn_c_try_compile "$LINENO"; then :
11214  ac_cv_netfilter_can_compile=yes
11215else
11216  ac_cv_netfilter_can_compile=no
11217fi
11218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11219fi
11220
11221    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_netfilter_can_compile" >&5
11222$as_echo "$ac_cv_netfilter_can_compile" >&6; }
11223    if test $ac_cv_netfilter_can_compile = yes ; then
11224
11225$as_echo "#define PCAP_SUPPORT_NETFILTER 1" >>confdefs.h
11226
11227      MODULE_C_SRC="$MODULE_C_SRC pcap-netfilter-linux.c"
11228    fi
11229    ;;
11230  esac
11231fi
11232
11233
11234
11235# Check whether --enable-netmap was given.
11236if test "${enable_netmap+set}" = set; then :
11237  enableval=$enable_netmap;
11238else
11239  enable_netmap=yes
11240fi
11241
11242
11243if test "x$enable_netmap" != "xno" ; then
11244	#
11245	# Check whether net/netmap_user.h is usable if NETMAP_WITH_LIBS is
11246	# defined; it's not usable on DragonFly BSD 4.6 if NETMAP_WITH_LIBS
11247	# is defined, for example, as it includes a non-existent malloc.h
11248	# header.
11249	#
11250	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netmap support" >&5
11251$as_echo_n "checking whether we can compile the netmap support... " >&6; }
11252	if ${ac_cv_net_netmap_user_can_compile+:} false; then :
11253  $as_echo_n "(cached) " >&6
11254else
11255  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11256/* end confdefs.h.  */
11257
11258$ac_includes_default
11259#define NETMAP_WITH_LIBS
11260#include <net/netmap_user.h>
11261int
11262main ()
11263{
11264
11265  ;
11266  return 0;
11267}
11268_ACEOF
11269if ac_fn_c_try_compile "$LINENO"; then :
11270  ac_cv_net_netmap_user_can_compile=yes
11271else
11272  ac_cv_net_netmap_user_can_compile=no
11273fi
11274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11275fi
11276
11277	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_net_netmap_user_can_compile" >&5
11278$as_echo "$ac_cv_net_netmap_user_can_compile" >&6; }
11279	if test $ac_cv_net_netmap_user_can_compile = yes ; then
11280
11281$as_echo "#define PCAP_SUPPORT_NETMAP 1" >>confdefs.h
11282
11283	    MODULE_C_SRC="$MODULE_C_SRC pcap-netmap.c"
11284	fi
11285
11286fi
11287
11288# Check for DPDK support.
11289
11290# Check whether --with-dpdk was given.
11291if test "${with_dpdk+set}" = set; then :
11292  withval=$with_dpdk;
11293	if test "$withval" = no
11294	then
11295		# User doesn't want DPDK support.
11296		want_dpdk=no
11297	elif test "$withval" = yes
11298	then
11299		# User wants DPDK support but hasn't specified a directory.
11300		want_dpdk=yes
11301	else
11302		# User wants DPDK support and has specified a directory,
11303		# so use the provided value.
11304		want_dpdk=yes
11305		dpdk_dir=$withval
11306	fi
11307
11308else
11309
11310	if test "$V_PCAP" = dpdk; then
11311		# User requested DPDK-only libpcap, so we'd better have
11312		# the DPDK API.
11313		want_dpdk=yes
11314	elif test "xxx_only" = yes; then
11315		# User requested something-else-only pcap, so they don't
11316		# want DPDK support.
11317		want_dpdk=no
11318	else
11319		#
11320		# Use DPDK API if present, otherwise don't
11321		#
11322		want_dpdk=ifpresent
11323	fi
11324
11325fi
11326
11327
11328if test "$want_dpdk" != no; then
11329	if test "x$PKGCONFIG" != "xno"
11330	then
11331		#
11332		# We have pkg-config; see if we have DPDK installed
11333		# as a package.
11334		#
11335		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DPDK with pkg-config" >&5
11336$as_echo_n "checking for DPDK with pkg-config... " >&6; }
11337		if "$PKGCONFIG" libdpdk
11338		then
11339			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
11340$as_echo "found" >&6; }
11341			found_dpdk_with_pkg_config=yes
11342			DPDK_CFLAGS=`"$PKGCONFIG" --cflags libdpdk`
11343			DPDK_LDFLAGS=`"$PKGCONFIG" --libs libdpdk`
11344		else
11345			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11346$as_echo "not found" >&6; }
11347		fi
11348	fi
11349
11350	#
11351	# If we didn't find it with pkg-config, try checking for
11352	# it manually.
11353	#
11354	if test "x$found_dpdk_with_pkg_config" != "xyes"
11355	then
11356		if test -z "$dpdk_dir"; then
11357			#
11358			# The user didn't specify a directory containing
11359			# the DPDK headers and libraries.  If we find
11360			# a /usr/local/include/dpdk directory, assume
11361			# it's /usr/local, otherwise assume it's /usr.
11362			#
11363			if test -d "/usr/local/include/dpdk"; then
11364				dpdk_dir="/usr/local"
11365			else
11366				dpdk_dir="/usr"
11367			fi
11368		fi
11369		#
11370		# The convention appears to be that 1) there's a "dpdk"
11371		# subdirectory of the include directory, containing DPDK
11372		# headers (at least in the installation on Ubuntu with
11373		# the system DPDK packages) and 2) includes of DPDK
11374		# headers don't use "dpdk/{header}" (at least from the
11375		# way the DPDK documentation is written).
11376		#
11377		# So we add "/dpdk" to the include directory, and always
11378		# add that to the list of include directories to search.
11379		#
11380		dpdk_inc_dir="$dpdk_dir/include/dpdk"
11381		dpdk_inc_flags="-I$dpdk_inc_dir"
11382		dpdk_lib_dir="$dpdk_dir/lib"
11383		#
11384		# Handle multiarch systems.
11385		#
11386		# Step 1: run the C compiler with the -dumpmachine option;
11387		# if it succeeds, the output would be the multiarch directory
11388		# name if your system has multiarch directories.
11389		#
11390		multiarch_dir=`$CC -dumpmachine 2>/dev/null`
11391		if test ! -z "$multiarch_dir"
11392		then
11393			#
11394			# OK, we have a multiarch directory.
11395			#
11396			# Now deal with includes.  On Ubuntu 20.04, for
11397			# example, we have /usr/include/dpdk *and*
11398			# /usr/include/$multiarch_dir/dpdk, and must
11399			# search both.
11400			#
11401			if test -d "$dpdk_dir/include/$multiarch_dir/dpdk"
11402			then
11403				dpdk_inc_flags="-I$dpdk_dir/include/$multiarch_dir/dpdk $dpdk_inc_flags"
11404			fi
11405
11406			#
11407			# Now deal with libraries.
11408			#
11409			if test -d "$dpdk_lib_dir/$multiarch_dir"
11410			then
11411				dpdk_lib_dir="$dpdk_lib_dir/$multiarch_dir"
11412			fi
11413		fi
11414		DPDK_MACHINE_CFLAGS="-march=native"
11415		DPDK_CFLAGS="$DPDK_MACHINE_CFLAGS $dpdk_inc_flags"
11416		DPDK_LDFLAGS="-L$dpdk_lib_dir -ldpdk -lrt -lm -lnuma -ldl -pthread"
11417	fi
11418
11419	save_CFLAGS="$CFLAGS"
11420	save_LIBS="$LIBS"
11421	save_LDFLAGS="$LDFLAGS"
11422	CFLAGS="$CFLAGS $DPDK_CFLAGS"
11423	LIBS="$LIBS $DPDK_LDFLAGS"
11424	LDFLAGS="$LDFLAGS $DPDK_LDFLAGS"
11425
11426	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the DPDK support" >&5
11427$as_echo_n "checking whether we can compile the DPDK support... " >&6; }
11428	if ${ac_cv_dpdk_can_compile+:} false; then :
11429  $as_echo_n "(cached) " >&6
11430else
11431  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11432/* end confdefs.h.  */
11433
11434$ac_includes_default
11435#include <rte_common.h>
11436int
11437main ()
11438{
11439
11440  ;
11441  return 0;
11442}
11443_ACEOF
11444if ac_fn_c_try_compile "$LINENO"; then :
11445  ac_cv_dpdk_can_compile=yes
11446else
11447  ac_cv_dpdk_can_compile=no
11448fi
11449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11450fi
11451
11452	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dpdk_can_compile" >&5
11453$as_echo "$ac_cv_dpdk_can_compile" >&6; }
11454
11455	#
11456	# We include rte_bus.h, and older versions of DPDK
11457	# didn't have it, so check for it.
11458	#
11459	if test "$ac_cv_dpdk_can_compile" = yes; then
11460		#
11461		# This runs the preprocessor, so make sure it
11462		# looks in the DPDK directories.  Instead of
11463		# including dpdk/XXX.h, we include just XXX.h
11464		# and assume DPDK_CFLAGS is the directory
11465		# containing the DPDK headers (that's how
11466		# pkg-config sets it, at least on Ubuntu),
11467		# so just looking under /usr/include won't
11468		# find it.
11469		#
11470		save_CPPFLAGS="$CPPFLAGS"
11471		CPPFLAGS="$CPPFLAGS $DPDK_CFLAGS"
11472		ac_fn_c_check_header_mongrel "$LINENO" "rte_bus.h" "ac_cv_header_rte_bus_h" "$ac_includes_default"
11473if test "x$ac_cv_header_rte_bus_h" = xyes; then :
11474
11475fi
11476
11477
11478		CPPFLAGS="$save_CPPFLAGS"
11479	fi
11480
11481	#
11482	# We call rte_eth_dev_count_avail(), and older versions
11483	# of DPDK didn't have it, so check for it.
11484	#
11485	if test "$ac_cv_header_rte_bus_h" = yes; then
11486		ac_fn_c_check_func "$LINENO" "rte_eth_dev_count_avail" "ac_cv_func_rte_eth_dev_count_avail"
11487if test "x$ac_cv_func_rte_eth_dev_count_avail" = xyes; then :
11488
11489fi
11490
11491	fi
11492
11493	CFLAGS="$save_CFLAGS"
11494	LIBS="$save_LIBS"
11495	LDFLAGS="$save_LDFLAGS"
11496
11497	if test "$ac_cv_func_rte_eth_dev_count_avail" = yes; then
11498		CFLAGS="$CFLAGS $DPDK_CFLAGS"
11499		LIBS="$LIBS $DPDK_LDFLAGS"
11500		LDFLAGS="$LDFLAGS $DPDK_LDFLAGS"
11501		V_INCLS="$V_INCLS $DPDK_CFLAGS"
11502
11503$as_echo "#define PCAP_SUPPORT_DPDK 1" >>confdefs.h
11504
11505		if test $V_PCAP != dpdk ; then
11506			MODULE_C_SRC="$MODULE_C_SRC pcap-dpdk.c"
11507		fi
11508
11509		#
11510		# Check whether the rte_ether.h file defines
11511		# struct ether_addr or struct rte_ether_addr.
11512		#
11513		# ("API compatibility?  That's for losers!")
11514		#
11515		ac_fn_c_check_type "$LINENO" "struct rte_ether_addr" "ac_cv_type_struct_rte_ether_addr" "
11516			#include <rte_ether.h>
11517
11518"
11519if test "x$ac_cv_type_struct_rte_ether_addr" = xyes; then :
11520
11521cat >>confdefs.h <<_ACEOF
11522#define HAVE_STRUCT_RTE_ETHER_ADDR 1
11523_ACEOF
11524
11525
11526fi
11527
11528	else
11529		if test "$V_PCAP" = dpdk; then
11530			# User requested DPDK-only capture support, but
11531			# we couldn't the DPDK API support at all, or we
11532			# found it but it wasn't a sufficiently recent
11533			# version.
11534			if test "$ac_cv_dpdk_can_compile" != yes; then
11535				#
11536				# Couldn't even find the headers.
11537				#
11538				as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but the DPDK headers weren't found at $dpdk_inc_dir: make sure the DPDK support is installed, specify a different path or paths if necessary, or don't request DPDK support" "$LINENO" 5
11539			else
11540				#
11541				# Found the headers, but we couldn't find
11542				# rte_bus.h or rte_eth_dev_count_avail(),
11543				# we don't have a sufficiently recent
11544				# version of DPDK.
11545				#
11546				as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but we require DPDK 18.x or later; install a newer version of DPDK, or don't request DPDK support" "$LINENO" 5
11547			fi
11548		fi
11549
11550		if test "$want_dpdk" = yes; then
11551			# User requested DPDK-only capture support, but
11552			# we couldn't the DPDK API support at all, or we
11553			# found it but it wasn't a sufficiently recent
11554			# version.
11555			if test "$ac_cv_dpdk_can_compile" != yes; then
11556				#
11557				# Couldn't even find the headers.
11558				#
11559				as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but the DPDK headers weren't found at $dpdk_inc_dir: make sure the DPDK support is installed, specify a different path or paths if necessary, or don't request DPDK support" "$LINENO" 5
11560			else
11561				#
11562				# Found the headers, but we couldn't find
11563				# rte_bus.h or rte_eth_dev_count_avail(),
11564				# we don't have a sufficiently recent
11565				# version of DPDK.
11566				#
11567				as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but we require DPDK 18.x or later: install a newer version of DPDK, or don't request DPDK support" "$LINENO" 5
11568			fi
11569		fi
11570	fi
11571fi
11572
11573
11574# Check whether --enable-bluetooth was given.
11575if test "${enable_bluetooth+set}" = set; then :
11576  enableval=$enable_bluetooth;
11577else
11578  enable_bluetooth=ifsupportavailable
11579fi
11580
11581
11582if test "xxx_only" = yes; then
11583	# User requested something-else-only pcap, so they don't
11584	# want Bluetooth support.
11585	enable_bluetooth=no
11586fi
11587
11588if test "x$enable_bluetooth" != "xno" ; then
11589		case "$host_os" in
11590	linux*)
11591		ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
11592if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
11593
11594			#
11595			# We have bluetooth.h, so we support Bluetooth
11596			# sniffing.
11597			#
11598
11599$as_echo "#define PCAP_SUPPORT_BT 1" >>confdefs.h
11600
11601			MODULE_C_SRC="$MODULE_C_SRC pcap-bt-linux.c"
11602			{ $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is supported" >&5
11603$as_echo "$as_me: Bluetooth sniffing is supported" >&6;}
11604			ac_lbl_bluetooth_available=yes
11605
11606			#
11607			# OK, does struct sockaddr_hci have an hci_channel
11608			# member?
11609			#
11610			ac_fn_c_check_member "$LINENO" "struct sockaddr_hci" "hci_channel" "ac_cv_member_struct_sockaddr_hci_hci_channel" "
11611				#include <bluetooth/bluetooth.h>
11612				#include <bluetooth/hci.h>
11613
11614"
11615if test "x$ac_cv_member_struct_sockaddr_hci_hci_channel" = xyes; then :
11616
11617cat >>confdefs.h <<_ACEOF
11618#define HAVE_STRUCT_SOCKADDR_HCI_HCI_CHANNEL 1
11619_ACEOF
11620
11621
11622				#
11623				# Yes; is HCI_CHANNEL_MONITOR defined?
11624				#
11625				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if HCI_CHANNEL_MONITOR is defined" >&5
11626$as_echo_n "checking if HCI_CHANNEL_MONITOR is defined... " >&6; }
11627				if ${ac_cv_lbl_hci_channel_monitor_is_defined+:} false; then :
11628  $as_echo_n "(cached) " >&6
11629else
11630  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11631/* end confdefs.h.  */
11632
11633					    #include <bluetooth/bluetooth.h>
11634					    #include <bluetooth/hci.h>
11635
11636int
11637main ()
11638{
11639
11640					    u_int i = HCI_CHANNEL_MONITOR;
11641
11642  ;
11643  return 0;
11644}
11645_ACEOF
11646if ac_fn_c_try_compile "$LINENO"; then :
11647
11648					    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11649$as_echo "yes" >&6; }
11650
11651$as_echo "#define PCAP_SUPPORT_BT_MONITOR /**/" >>confdefs.h
11652
11653					    MODULE_C_SRC="$MODULE_C_SRC pcap-bt-monitor-linux.c"
11654
11655else
11656
11657					    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11658$as_echo "no" >&6; }
11659
11660fi
11661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11662fi
11663
11664
11665fi
11666
11667
11668else
11669
11670			#
11671			# We don't have bluetooth.h, so we don't support
11672			# Bluetooth sniffing.
11673			#
11674			if test "x$enable_bluetooth" = "xyes" ; then
11675				as_fn_error $? "Bluetooth sniffing is not supported; install bluez-lib devel to enable it" "$LINENO" 5
11676			else
11677				{ $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&5
11678$as_echo "$as_me: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&6;}
11679			fi
11680
11681fi
11682
11683
11684		;;
11685	*)
11686		if test "x$enable_bluetooth" = "xyes" ; then
11687			as_fn_error $? "no Bluetooth sniffing support implemented for $host_os" "$LINENO" 5
11688		else
11689			{ $as_echo "$as_me:${as_lineno-$LINENO}: no Bluetooth sniffing support implemented for $host_os" >&5
11690$as_echo "$as_me: no Bluetooth sniffing support implemented for $host_os" >&6;}
11691		fi
11692		;;
11693	esac
11694
11695fi
11696
11697# Check whether --enable-dbus was given.
11698if test "${enable_dbus+set}" = set; then :
11699  enableval=$enable_dbus;
11700else
11701  enable_dbus=ifavailable
11702fi
11703
11704
11705if test "xxx_only" = yes; then
11706	# User requested something-else-only pcap, so they don't
11707	# want D-Bus support.
11708	enable_dbus=no
11709fi
11710
11711if test "x$enable_dbus" != "xno"; then
11712	if test "x$enable_dbus" = "xyes"; then
11713		case "$host_os" in
11714
11715		darwin*)
11716			#
11717			# We don't support D-Bus sniffing on macOS; see
11718			#
11719			# https://bugs.freedesktop.org/show_bug.cgi?id=74029
11720			#
11721			# The user requested it, so fail.
11722			#
11723			as_fn_error $? "Due to freedesktop.org bug 74029, D-Bus capture support is not available on macOS" "$LINENO" 5
11724		esac
11725	else
11726		case "$host_os" in
11727
11728		darwin*)
11729			#
11730			# We don't support D-Bus sniffing on macOS; see
11731			#
11732			# https://bugs.freedesktop.org/show_bug.cgi?id=74029
11733			#
11734			# The user dind't explicitly request it, so just
11735			# silently refuse to enable it.
11736			#
11737			enable_dbus="no"
11738			;;
11739		esac
11740	fi
11741fi
11742
11743if test "x$enable_dbus" != "xno"; then
11744	if test "x$PKGCONFIG" != "xno"; then
11745		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for D-Bus" >&5
11746$as_echo_n "checking for D-Bus... " >&6; }
11747		if "$PKGCONFIG" dbus-1; then
11748			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11749$as_echo "yes" >&6; }
11750			DBUS_CFLAGS=`"$PKGCONFIG" --cflags dbus-1`
11751			DBUS_LIBS=`"$PKGCONFIG" --libs dbus-1`
11752			save_CFLAGS="$CFLAGS"
11753			save_LIBS="$LIBS"
11754			CFLAGS="$CFLAGS $DBUS_CFLAGS"
11755			LIBS="$LIBS $DBUS_LIBS"
11756			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D-Bus library defines dbus_connection_read_write" >&5
11757$as_echo_n "checking whether the D-Bus library defines dbus_connection_read_write... " >&6; }
11758			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11759/* end confdefs.h.  */
11760#include <string.h>
11761
11762			     #include <time.h>
11763			     #include <sys/time.h>
11764
11765			     #include <dbus/dbus.h>
11766int
11767main ()
11768{
11769return dbus_connection_read_write(NULL, 0);
11770  ;
11771  return 0;
11772}
11773_ACEOF
11774if ac_fn_c_try_link "$LINENO"; then :
11775
11776				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11777$as_echo "yes" >&6; }
11778
11779$as_echo "#define PCAP_SUPPORT_DBUS 1" >>confdefs.h
11780
11781				MODULE_C_SRC="$MODULE_C_SRC pcap-dbus.c"
11782				V_INCLS="$V_INCLS $DBUS_CFLAGS"
11783
11784else
11785
11786				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11787$as_echo "no" >&6; }
11788				if test "x$enable_dbus" = "xyes"; then
11789				    as_fn_error $? "--enable-dbus was given, but the D-Bus library doesn't define dbus_connection_read_write()" "$LINENO" 5
11790				fi
11791				LIBS="$save_LIBS"
11792
11793fi
11794rm -f core conftest.err conftest.$ac_objext \
11795    conftest$ac_exeext conftest.$ac_ext
11796			CFLAGS="$save_CFLAGS"
11797		else
11798			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11799$as_echo "no" >&6; }
11800			if test "x$enable_dbus" = "xyes"; then
11801				as_fn_error $? "--enable-dbus was given, but the dbus-1 package is not installed" "$LINENO" 5
11802			fi
11803		fi
11804	fi
11805
11806fi
11807
11808# Check whether --enable-rdma was given.
11809if test "${enable_rdma+set}" = set; then :
11810  enableval=$enable_rdma;
11811else
11812  enable_rdma=ifavailable
11813fi
11814
11815
11816if test "xxx_only" = yes; then
11817	# User requested something-else-only pcap, so they don't
11818	# want RDMA support.
11819	enable_rdma=no
11820fi
11821
11822if test "x$enable_rdma" != "xno"; then
11823	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibv_get_device_list in -libverbs" >&5
11824$as_echo_n "checking for ibv_get_device_list in -libverbs... " >&6; }
11825if ${ac_cv_lib_ibverbs_ibv_get_device_list+:} false; then :
11826  $as_echo_n "(cached) " >&6
11827else
11828  ac_check_lib_save_LIBS=$LIBS
11829LIBS="-libverbs  $LIBS"
11830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11831/* end confdefs.h.  */
11832
11833/* Override any GCC internal prototype to avoid an error.
11834   Use char because int might match the return type of a GCC
11835   builtin and then its argument prototype would still apply.  */
11836#ifdef __cplusplus
11837extern "C"
11838#endif
11839char ibv_get_device_list ();
11840int
11841main ()
11842{
11843return ibv_get_device_list ();
11844  ;
11845  return 0;
11846}
11847_ACEOF
11848if ac_fn_c_try_link "$LINENO"; then :
11849  ac_cv_lib_ibverbs_ibv_get_device_list=yes
11850else
11851  ac_cv_lib_ibverbs_ibv_get_device_list=no
11852fi
11853rm -f core conftest.err conftest.$ac_objext \
11854    conftest$ac_exeext conftest.$ac_ext
11855LIBS=$ac_check_lib_save_LIBS
11856fi
11857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ibverbs_ibv_get_device_list" >&5
11858$as_echo "$ac_cv_lib_ibverbs_ibv_get_device_list" >&6; }
11859if test "x$ac_cv_lib_ibverbs_ibv_get_device_list" = xyes; then :
11860
11861		ac_fn_c_check_header_mongrel "$LINENO" "infiniband/verbs.h" "ac_cv_header_infiniband_verbs_h" "$ac_includes_default"
11862if test "x$ac_cv_header_infiniband_verbs_h" = xyes; then :
11863
11864			#
11865			# ibv_create_flow may be defined as a static inline
11866			# function in infiniband/verbs.h, so we can't
11867			# use AC_CHECK_LIB.
11868			#
11869			# Too bad autoconf has no AC_SYMBOL_EXISTS()
11870			# macro that works like CMake's check_symbol_exists()
11871			# function, to check do a compile check like
11872			# this (they do a clever trick to avoid having
11873			# to know the function's signature).
11874			#
11875			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libibverbs defines ibv_create_flow" >&5
11876$as_echo_n "checking whether libibverbs defines ibv_create_flow... " >&6; }
11877			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11878/* end confdefs.h.  */
11879
11880					#include <infiniband/verbs.h>
11881
11882int
11883main ()
11884{
11885
11886					(void) ibv_create_flow((struct ibv_qp *) NULL,
11887							       (struct ibv_flow_attr *) NULL);
11888
11889  ;
11890  return 0;
11891}
11892_ACEOF
11893if ac_fn_c_try_link "$LINENO"; then :
11894
11895					{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11896$as_echo "yes" >&6; }
11897
11898$as_echo "#define PCAP_SUPPORT_RDMASNIFF /**/" >>confdefs.h
11899
11900					MODULE_C_SRC="$MODULE_C_SRC pcap-rdmasniff.c"
11901					LIBS="-libverbs $LIBS"
11902
11903else
11904
11905					{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11906$as_echo "no" >&6; }
11907
11908
11909fi
11910rm -f core conftest.err conftest.$ac_objext \
11911    conftest$ac_exeext conftest.$ac_ext
11912
11913fi
11914
11915
11916
11917fi
11918
11919
11920fi
11921
11922# Find a good install program.  We prefer a C program (faster),
11923# so one script is as good as another.  But avoid the broken or
11924# incompatible versions:
11925# SysV /etc/install, /usr/sbin/install
11926# SunOS /usr/etc/install
11927# IRIX /sbin/install
11928# AIX /bin/install
11929# AmigaOS /C/install, which installs bootblocks on floppy discs
11930# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
11931# AFS /usr/afsws/bin/install, which mishandles nonexistent args
11932# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
11933# OS/2's system install, which has a completely different semantic
11934# ./install, which can be erroneously created by make from ./install.sh.
11935# Reject install programs that cannot install multiple files.
11936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
11937$as_echo_n "checking for a BSD-compatible install... " >&6; }
11938if test -z "$INSTALL"; then
11939if ${ac_cv_path_install+:} false; then :
11940  $as_echo_n "(cached) " >&6
11941else
11942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11943for as_dir in $PATH
11944do
11945  IFS=$as_save_IFS
11946  test -z "$as_dir" && as_dir=.
11947    # Account for people who put trailing slashes in PATH elements.
11948case $as_dir/ in #((
11949  ./ | .// | /[cC]/* | \
11950  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
11951  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
11952  /usr/ucb/* ) ;;
11953  *)
11954    # OSF1 and SCO ODT 3.0 have their own names for install.
11955    # Don't use installbsd from OSF since it installs stuff as root
11956    # by default.
11957    for ac_prog in ginstall scoinst install; do
11958      for ac_exec_ext in '' $ac_executable_extensions; do
11959	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
11960	  if test $ac_prog = install &&
11961	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
11962	    # AIX install.  It has an incompatible calling convention.
11963	    :
11964	  elif test $ac_prog = install &&
11965	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
11966	    # program-specific install script used by HP pwplus--don't use.
11967	    :
11968	  else
11969	    rm -rf conftest.one conftest.two conftest.dir
11970	    echo one > conftest.one
11971	    echo two > conftest.two
11972	    mkdir conftest.dir
11973	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
11974	      test -s conftest.one && test -s conftest.two &&
11975	      test -s conftest.dir/conftest.one &&
11976	      test -s conftest.dir/conftest.two
11977	    then
11978	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
11979	      break 3
11980	    fi
11981	  fi
11982	fi
11983      done
11984    done
11985    ;;
11986esac
11987
11988  done
11989IFS=$as_save_IFS
11990
11991rm -rf conftest.one conftest.two conftest.dir
11992
11993fi
11994  if test "${ac_cv_path_install+set}" = set; then
11995    INSTALL=$ac_cv_path_install
11996  else
11997    # As a last resort, use the slow shell script.  Don't cache a
11998    # value for INSTALL within a source directory, because that will
11999    # break other packages using the cache if that directory is
12000    # removed, or if the value is a relative name.
12001    INSTALL=$ac_install_sh
12002  fi
12003fi
12004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
12005$as_echo "$INSTALL" >&6; }
12006
12007# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
12008# It thinks the first close brace ends the variable substitution.
12009test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
12010
12011test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
12012
12013test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
12014
12015
12016ac_config_headers="$ac_config_headers config.h"
12017
12018
12019ac_config_commands="$ac_config_commands default-1"
12020
12021ac_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"
12022
12023cat >confcache <<\_ACEOF
12024# This file is a shell script that caches the results of configure
12025# tests run on this system so they can be shared between configure
12026# scripts and configure runs, see configure's option --config-cache.
12027# It is not useful on other systems.  If it contains results you don't
12028# want to keep, you may remove or edit it.
12029#
12030# config.status only pays attention to the cache file if you give it
12031# the --recheck option to rerun configure.
12032#
12033# `ac_cv_env_foo' variables (set or unset) will be overridden when
12034# loading this file, other *unset* `ac_cv_foo' will be assigned the
12035# following values.
12036
12037_ACEOF
12038
12039# The following way of writing the cache mishandles newlines in values,
12040# but we know of no workaround that is simple, portable, and efficient.
12041# So, we kill variables containing newlines.
12042# Ultrix sh set writes to stderr and can't be redirected directly,
12043# and sets the high bit in the cache file unless we assign to the vars.
12044(
12045  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
12046    eval ac_val=\$$ac_var
12047    case $ac_val in #(
12048    *${as_nl}*)
12049      case $ac_var in #(
12050      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
12051$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
12052      esac
12053      case $ac_var in #(
12054      _ | IFS | as_nl) ;; #(
12055      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
12056      *) { eval $ac_var=; unset $ac_var;} ;;
12057      esac ;;
12058    esac
12059  done
12060
12061  (set) 2>&1 |
12062    case $as_nl`(ac_space=' '; set) 2>&1` in #(
12063    *${as_nl}ac_space=\ *)
12064      # `set' does not quote correctly, so add quotes: double-quote
12065      # substitution turns \\\\ into \\, and sed turns \\ into \.
12066      sed -n \
12067	"s/'/'\\\\''/g;
12068	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12069      ;; #(
12070    *)
12071      # `set' quotes correctly as required by POSIX, so do not add quotes.
12072      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
12073      ;;
12074    esac |
12075    sort
12076) |
12077  sed '
12078     /^ac_cv_env_/b end
12079     t clear
12080     :clear
12081     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12082     t end
12083     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12084     :end' >>confcache
12085if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
12086  if test -w "$cache_file"; then
12087    if test "x$cache_file" != "x/dev/null"; then
12088      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
12089$as_echo "$as_me: updating cache $cache_file" >&6;}
12090      if test ! -f "$cache_file" || test -h "$cache_file"; then
12091	cat confcache >"$cache_file"
12092      else
12093        case $cache_file in #(
12094        */* | ?:*)
12095	  mv -f confcache "$cache_file"$$ &&
12096	  mv -f "$cache_file"$$ "$cache_file" ;; #(
12097        *)
12098	  mv -f confcache "$cache_file" ;;
12099	esac
12100      fi
12101    fi
12102  else
12103    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
12104$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
12105  fi
12106fi
12107rm -f confcache
12108
12109test "x$prefix" = xNONE && prefix=$ac_default_prefix
12110# Let make expand exec_prefix.
12111test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12112
12113DEFS=-DHAVE_CONFIG_H
12114
12115ac_libobjs=
12116ac_ltlibobjs=
12117U=
12118for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
12119  # 1. Remove the extension, and $U if already installed.
12120  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
12121  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
12122  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
12123  #    will be set to the directory where LIBOBJS objects are built.
12124  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
12125  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
12126done
12127LIBOBJS=$ac_libobjs
12128
12129LTLIBOBJS=$ac_ltlibobjs
12130
12131
12132
12133: "${CONFIG_STATUS=./config.status}"
12134ac_write_fail=0
12135ac_clean_files_save=$ac_clean_files
12136ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12137{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
12138$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
12139as_write_fail=0
12140cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
12141#! $SHELL
12142# Generated by $as_me.
12143# Run this file to recreate the current configuration.
12144# Compiler output produced by configure, useful for debugging
12145# configure, is in config.log if it exists.
12146
12147debug=false
12148ac_cs_recheck=false
12149ac_cs_silent=false
12150
12151SHELL=\${CONFIG_SHELL-$SHELL}
12152export SHELL
12153_ASEOF
12154cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
12155## -------------------- ##
12156## M4sh Initialization. ##
12157## -------------------- ##
12158
12159# Be more Bourne compatible
12160DUALCASE=1; export DUALCASE # for MKS sh
12161if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
12162  emulate sh
12163  NULLCMD=:
12164  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
12165  # is contrary to our usage.  Disable this feature.
12166  alias -g '${1+"$@"}'='"$@"'
12167  setopt NO_GLOB_SUBST
12168else
12169  case `(set -o) 2>/dev/null` in #(
12170  *posix*) :
12171    set -o posix ;; #(
12172  *) :
12173     ;;
12174esac
12175fi
12176
12177
12178as_nl='
12179'
12180export as_nl
12181# Printing a long string crashes Solaris 7 /usr/bin/printf.
12182as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
12183as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
12184as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
12185# Prefer a ksh shell builtin over an external printf program on Solaris,
12186# but without wasting forks for bash or zsh.
12187if test -z "$BASH_VERSION$ZSH_VERSION" \
12188    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
12189  as_echo='print -r --'
12190  as_echo_n='print -rn --'
12191elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
12192  as_echo='printf %s\n'
12193  as_echo_n='printf %s'
12194else
12195  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
12196    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
12197    as_echo_n='/usr/ucb/echo -n'
12198  else
12199    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
12200    as_echo_n_body='eval
12201      arg=$1;
12202      case $arg in #(
12203      *"$as_nl"*)
12204	expr "X$arg" : "X\\(.*\\)$as_nl";
12205	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
12206      esac;
12207      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
12208    '
12209    export as_echo_n_body
12210    as_echo_n='sh -c $as_echo_n_body as_echo'
12211  fi
12212  export as_echo_body
12213  as_echo='sh -c $as_echo_body as_echo'
12214fi
12215
12216# The user is always right.
12217if test "${PATH_SEPARATOR+set}" != set; then
12218  PATH_SEPARATOR=:
12219  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
12220    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
12221      PATH_SEPARATOR=';'
12222  }
12223fi
12224
12225
12226# IFS
12227# We need space, tab and new line, in precisely that order.  Quoting is
12228# there to prevent editors from complaining about space-tab.
12229# (If _AS_PATH_WALK were called with IFS unset, it would disable word
12230# splitting by setting IFS to empty value.)
12231IFS=" ""	$as_nl"
12232
12233# Find who we are.  Look in the path if we contain no directory separator.
12234as_myself=
12235case $0 in #((
12236  *[\\/]* ) as_myself=$0 ;;
12237  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12238for as_dir in $PATH
12239do
12240  IFS=$as_save_IFS
12241  test -z "$as_dir" && as_dir=.
12242    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
12243  done
12244IFS=$as_save_IFS
12245
12246     ;;
12247esac
12248# We did not find ourselves, most probably we were run as `sh COMMAND'
12249# in which case we are not to be found in the path.
12250if test "x$as_myself" = x; then
12251  as_myself=$0
12252fi
12253if test ! -f "$as_myself"; then
12254  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
12255  exit 1
12256fi
12257
12258# Unset variables that we do not need and which cause bugs (e.g. in
12259# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
12260# suppresses any "Segmentation fault" message there.  '((' could
12261# trigger a bug in pdksh 5.2.14.
12262for as_var in BASH_ENV ENV MAIL MAILPATH
12263do eval test x\${$as_var+set} = xset \
12264  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
12265done
12266PS1='$ '
12267PS2='> '
12268PS4='+ '
12269
12270# NLS nuisances.
12271LC_ALL=C
12272export LC_ALL
12273LANGUAGE=C
12274export LANGUAGE
12275
12276# CDPATH.
12277(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
12278
12279
12280# as_fn_error STATUS ERROR [LINENO LOG_FD]
12281# ----------------------------------------
12282# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
12283# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
12284# script with STATUS, using 1 if that was 0.
12285as_fn_error ()
12286{
12287  as_status=$1; test $as_status -eq 0 && as_status=1
12288  if test "$4"; then
12289    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
12290    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
12291  fi
12292  $as_echo "$as_me: error: $2" >&2
12293  as_fn_exit $as_status
12294} # as_fn_error
12295
12296
12297# as_fn_set_status STATUS
12298# -----------------------
12299# Set $? to STATUS, without forking.
12300as_fn_set_status ()
12301{
12302  return $1
12303} # as_fn_set_status
12304
12305# as_fn_exit STATUS
12306# -----------------
12307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
12308as_fn_exit ()
12309{
12310  set +e
12311  as_fn_set_status $1
12312  exit $1
12313} # as_fn_exit
12314
12315# as_fn_unset VAR
12316# ---------------
12317# Portably unset VAR.
12318as_fn_unset ()
12319{
12320  { eval $1=; unset $1;}
12321}
12322as_unset=as_fn_unset
12323# as_fn_append VAR VALUE
12324# ----------------------
12325# Append the text in VALUE to the end of the definition contained in VAR. Take
12326# advantage of any shell optimizations that allow amortized linear growth over
12327# repeated appends, instead of the typical quadratic growth present in naive
12328# implementations.
12329if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
12330  eval 'as_fn_append ()
12331  {
12332    eval $1+=\$2
12333  }'
12334else
12335  as_fn_append ()
12336  {
12337    eval $1=\$$1\$2
12338  }
12339fi # as_fn_append
12340
12341# as_fn_arith ARG...
12342# ------------------
12343# Perform arithmetic evaluation on the ARGs, and store the result in the
12344# global $as_val. Take advantage of shells that can avoid forks. The arguments
12345# must be portable across $(()) and expr.
12346if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
12347  eval 'as_fn_arith ()
12348  {
12349    as_val=$(( $* ))
12350  }'
12351else
12352  as_fn_arith ()
12353  {
12354    as_val=`expr "$@" || test $? -eq 1`
12355  }
12356fi # as_fn_arith
12357
12358
12359if expr a : '\(a\)' >/dev/null 2>&1 &&
12360   test "X`expr 00001 : '.*\(...\)'`" = X001; then
12361  as_expr=expr
12362else
12363  as_expr=false
12364fi
12365
12366if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
12367  as_basename=basename
12368else
12369  as_basename=false
12370fi
12371
12372if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
12373  as_dirname=dirname
12374else
12375  as_dirname=false
12376fi
12377
12378as_me=`$as_basename -- "$0" ||
12379$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
12380	 X"$0" : 'X\(//\)$' \| \
12381	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
12382$as_echo X/"$0" |
12383    sed '/^.*\/\([^/][^/]*\)\/*$/{
12384	    s//\1/
12385	    q
12386	  }
12387	  /^X\/\(\/\/\)$/{
12388	    s//\1/
12389	    q
12390	  }
12391	  /^X\/\(\/\).*/{
12392	    s//\1/
12393	    q
12394	  }
12395	  s/.*/./; q'`
12396
12397# Avoid depending upon Character Ranges.
12398as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12399as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
12400as_cr_Letters=$as_cr_letters$as_cr_LETTERS
12401as_cr_digits='0123456789'
12402as_cr_alnum=$as_cr_Letters$as_cr_digits
12403
12404ECHO_C= ECHO_N= ECHO_T=
12405case `echo -n x` in #(((((
12406-n*)
12407  case `echo 'xy\c'` in
12408  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
12409  xy)  ECHO_C='\c';;
12410  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
12411       ECHO_T='	';;
12412  esac;;
12413*)
12414  ECHO_N='-n';;
12415esac
12416
12417rm -f conf$$ conf$$.exe conf$$.file
12418if test -d conf$$.dir; then
12419  rm -f conf$$.dir/conf$$.file
12420else
12421  rm -f conf$$.dir
12422  mkdir conf$$.dir 2>/dev/null
12423fi
12424if (echo >conf$$.file) 2>/dev/null; then
12425  if ln -s conf$$.file conf$$ 2>/dev/null; then
12426    as_ln_s='ln -s'
12427    # ... but there are two gotchas:
12428    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
12429    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
12430    # In both cases, we have to default to `cp -pR'.
12431    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
12432      as_ln_s='cp -pR'
12433  elif ln conf$$.file conf$$ 2>/dev/null; then
12434    as_ln_s=ln
12435  else
12436    as_ln_s='cp -pR'
12437  fi
12438else
12439  as_ln_s='cp -pR'
12440fi
12441rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
12442rmdir conf$$.dir 2>/dev/null
12443
12444
12445# as_fn_mkdir_p
12446# -------------
12447# Create "$as_dir" as a directory, including parents if necessary.
12448as_fn_mkdir_p ()
12449{
12450
12451  case $as_dir in #(
12452  -*) as_dir=./$as_dir;;
12453  esac
12454  test -d "$as_dir" || eval $as_mkdir_p || {
12455    as_dirs=
12456    while :; do
12457      case $as_dir in #(
12458      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
12459      *) as_qdir=$as_dir;;
12460      esac
12461      as_dirs="'$as_qdir' $as_dirs"
12462      as_dir=`$as_dirname -- "$as_dir" ||
12463$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12464	 X"$as_dir" : 'X\(//\)[^/]' \| \
12465	 X"$as_dir" : 'X\(//\)$' \| \
12466	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
12467$as_echo X"$as_dir" |
12468    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12469	    s//\1/
12470	    q
12471	  }
12472	  /^X\(\/\/\)[^/].*/{
12473	    s//\1/
12474	    q
12475	  }
12476	  /^X\(\/\/\)$/{
12477	    s//\1/
12478	    q
12479	  }
12480	  /^X\(\/\).*/{
12481	    s//\1/
12482	    q
12483	  }
12484	  s/.*/./; q'`
12485      test -d "$as_dir" && break
12486    done
12487    test -z "$as_dirs" || eval "mkdir $as_dirs"
12488  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
12489
12490
12491} # as_fn_mkdir_p
12492if mkdir -p . 2>/dev/null; then
12493  as_mkdir_p='mkdir -p "$as_dir"'
12494else
12495  test -d ./-p && rmdir ./-p
12496  as_mkdir_p=false
12497fi
12498
12499
12500# as_fn_executable_p FILE
12501# -----------------------
12502# Test if FILE is an executable regular file.
12503as_fn_executable_p ()
12504{
12505  test -f "$1" && test -x "$1"
12506} # as_fn_executable_p
12507as_test_x='test -x'
12508as_executable_p=as_fn_executable_p
12509
12510# Sed expression to map a string onto a valid CPP name.
12511as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
12512
12513# Sed expression to map a string onto a valid variable name.
12514as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
12515
12516
12517exec 6>&1
12518## ----------------------------------- ##
12519## Main body of $CONFIG_STATUS script. ##
12520## ----------------------------------- ##
12521_ASEOF
12522test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
12523
12524cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12525# Save the log message, to keep $0 and so on meaningful, and to
12526# report actual input values of CONFIG_FILES etc. instead of their
12527# values after options handling.
12528ac_log="
12529This file was extended by pcap $as_me 1.10.1, which was
12530generated by GNU Autoconf 2.69.  Invocation command line was
12531
12532  CONFIG_FILES    = $CONFIG_FILES
12533  CONFIG_HEADERS  = $CONFIG_HEADERS
12534  CONFIG_LINKS    = $CONFIG_LINKS
12535  CONFIG_COMMANDS = $CONFIG_COMMANDS
12536  $ $0 $@
12537
12538on `(hostname || uname -n) 2>/dev/null | sed 1q`
12539"
12540
12541_ACEOF
12542
12543case $ac_config_files in *"
12544"*) set x $ac_config_files; shift; ac_config_files=$*;;
12545esac
12546
12547case $ac_config_headers in *"
12548"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
12549esac
12550
12551
12552cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12553# Files that config.status was made for.
12554config_files="$ac_config_files"
12555config_headers="$ac_config_headers"
12556config_commands="$ac_config_commands"
12557
12558_ACEOF
12559
12560cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12561ac_cs_usage="\
12562\`$as_me' instantiates files and other configuration actions
12563from templates according to the current configuration.  Unless the files
12564and actions are specified as TAGs, all are instantiated by default.
12565
12566Usage: $0 [OPTION]... [TAG]...
12567
12568  -h, --help       print this help, then exit
12569  -V, --version    print version number and configuration settings, then exit
12570      --config     print configuration, then exit
12571  -q, --quiet, --silent
12572                   do not print progress messages
12573  -d, --debug      don't remove temporary files
12574      --recheck    update $as_me by reconfiguring in the same conditions
12575      --file=FILE[:TEMPLATE]
12576                   instantiate the configuration file FILE
12577      --header=FILE[:TEMPLATE]
12578                   instantiate the configuration header FILE
12579
12580Configuration files:
12581$config_files
12582
12583Configuration headers:
12584$config_headers
12585
12586Configuration commands:
12587$config_commands
12588
12589Report bugs to the package provider."
12590
12591_ACEOF
12592cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12593ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
12594ac_cs_version="\\
12595pcap config.status 1.10.1
12596configured by $0, generated by GNU Autoconf 2.69,
12597  with options \\"\$ac_cs_config\\"
12598
12599Copyright (C) 2012 Free Software Foundation, Inc.
12600This config.status script is free software; the Free Software Foundation
12601gives unlimited permission to copy, distribute and modify it."
12602
12603ac_pwd='$ac_pwd'
12604srcdir='$srcdir'
12605INSTALL='$INSTALL'
12606test -n "\$AWK" || AWK=awk
12607_ACEOF
12608
12609cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12610# The default lists apply if the user does not specify any file.
12611ac_need_defaults=:
12612while test $# != 0
12613do
12614  case $1 in
12615  --*=?*)
12616    ac_option=`expr "X$1" : 'X\([^=]*\)='`
12617    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
12618    ac_shift=:
12619    ;;
12620  --*=)
12621    ac_option=`expr "X$1" : 'X\([^=]*\)='`
12622    ac_optarg=
12623    ac_shift=:
12624    ;;
12625  *)
12626    ac_option=$1
12627    ac_optarg=$2
12628    ac_shift=shift
12629    ;;
12630  esac
12631
12632  case $ac_option in
12633  # Handling of the options.
12634  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12635    ac_cs_recheck=: ;;
12636  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
12637    $as_echo "$ac_cs_version"; exit ;;
12638  --config | --confi | --conf | --con | --co | --c )
12639    $as_echo "$ac_cs_config"; exit ;;
12640  --debug | --debu | --deb | --de | --d | -d )
12641    debug=: ;;
12642  --file | --fil | --fi | --f )
12643    $ac_shift
12644    case $ac_optarg in
12645    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
12646    '') as_fn_error $? "missing file argument" ;;
12647    esac
12648    as_fn_append CONFIG_FILES " '$ac_optarg'"
12649    ac_need_defaults=false;;
12650  --header | --heade | --head | --hea )
12651    $ac_shift
12652    case $ac_optarg in
12653    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
12654    esac
12655    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
12656    ac_need_defaults=false;;
12657  --he | --h)
12658    # Conflict between --help and --header
12659    as_fn_error $? "ambiguous option: \`$1'
12660Try \`$0 --help' for more information.";;
12661  --help | --hel | -h )
12662    $as_echo "$ac_cs_usage"; exit ;;
12663  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
12664  | -silent | --silent | --silen | --sile | --sil | --si | --s)
12665    ac_cs_silent=: ;;
12666
12667  # This is an error.
12668  -*) as_fn_error $? "unrecognized option: \`$1'
12669Try \`$0 --help' for more information." ;;
12670
12671  *) as_fn_append ac_config_targets " $1"
12672     ac_need_defaults=false ;;
12673
12674  esac
12675  shift
12676done
12677
12678ac_configure_extra_args=
12679
12680if $ac_cs_silent; then
12681  exec 6>/dev/null
12682  ac_configure_extra_args="$ac_configure_extra_args --silent"
12683fi
12684
12685_ACEOF
12686cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12687if \$ac_cs_recheck; then
12688  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
12689  shift
12690  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
12691  CONFIG_SHELL='$SHELL'
12692  export CONFIG_SHELL
12693  exec "\$@"
12694fi
12695
12696_ACEOF
12697cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12698exec 5>>config.log
12699{
12700  echo
12701  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
12702## Running $as_me. ##
12703_ASBOX
12704  $as_echo "$ac_log"
12705} >&5
12706
12707_ACEOF
12708cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12709#
12710# INIT-COMMANDS
12711#
12712
12713
12714_ACEOF
12715
12716cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12717
12718# Handling of arguments.
12719for ac_config_target in $ac_config_targets
12720do
12721  case $ac_config_target in
12722    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
12723    "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
12724    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12725    "grammar.y") CONFIG_FILES="$CONFIG_FILES grammar.y" ;;
12726    "pcap-filter.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-filter.manmisc" ;;
12727    "pcap-linktype.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-linktype.manmisc" ;;
12728    "pcap-tstamp.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-tstamp.manmisc" ;;
12729    "pcap-savefile.manfile") CONFIG_FILES="$CONFIG_FILES pcap-savefile.manfile" ;;
12730    "pcap.3pcap") CONFIG_FILES="$CONFIG_FILES pcap.3pcap" ;;
12731    "pcap_compile.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_compile.3pcap" ;;
12732    "pcap_datalink.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_datalink.3pcap" ;;
12733    "pcap_dump_open.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_dump_open.3pcap" ;;
12734    "pcap_get_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_get_tstamp_precision.3pcap" ;;
12735    "pcap_list_datalinks.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_datalinks.3pcap" ;;
12736    "pcap_list_tstamp_types.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_tstamp_types.3pcap" ;;
12737    "pcap_open_dead.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_dead.3pcap" ;;
12738    "pcap_open_offline.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_offline.3pcap" ;;
12739    "pcap_set_immediate_mode.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_immediate_mode.3pcap" ;;
12740    "pcap_set_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_precision.3pcap" ;;
12741    "pcap_set_tstamp_type.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_type.3pcap" ;;
12742    "rpcapd/Makefile") CONFIG_FILES="$CONFIG_FILES rpcapd/Makefile" ;;
12743    "rpcapd/rpcapd.manadmin") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd.manadmin" ;;
12744    "rpcapd/rpcapd-config.manfile") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd-config.manfile" ;;
12745    "testprogs/Makefile") CONFIG_FILES="$CONFIG_FILES testprogs/Makefile" ;;
12746
12747  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
12748  esac
12749done
12750
12751
12752# If the user did not use the arguments to specify the items to instantiate,
12753# then the envvar interface is used.  Set only those that are not.
12754# We use the long form for the default assignment because of an extremely
12755# bizarre bug on SunOS 4.1.3.
12756if $ac_need_defaults; then
12757  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12758  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12759  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
12760fi
12761
12762# Have a temporary directory for convenience.  Make it in the build tree
12763# simply because there is no reason against having it here, and in addition,
12764# creating and moving files from /tmp can sometimes cause problems.
12765# Hook for its removal unless debugging.
12766# Note that there is a small window in which the directory will not be cleaned:
12767# after its creation but before its name has been assigned to `$tmp'.
12768$debug ||
12769{
12770  tmp= ac_tmp=
12771  trap 'exit_status=$?
12772  : "${ac_tmp:=$tmp}"
12773  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
12774' 0
12775  trap 'as_fn_exit 1' 1 2 13 15
12776}
12777# Create a (secure) tmp directory for tmp files.
12778
12779{
12780  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
12781  test -d "$tmp"
12782}  ||
12783{
12784  tmp=./conf$$-$RANDOM
12785  (umask 077 && mkdir "$tmp")
12786} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
12787ac_tmp=$tmp
12788
12789# Set up the scripts for CONFIG_FILES section.
12790# No need to generate them if there are no CONFIG_FILES.
12791# This happens for instance with `./config.status config.h'.
12792if test -n "$CONFIG_FILES"; then
12793
12794
12795ac_cr=`echo X | tr X '\015'`
12796# On cygwin, bash can eat \r inside `` if the user requested igncr.
12797# But we know of no other shell where ac_cr would be empty at this
12798# point, so we can use a bashism as a fallback.
12799if test "x$ac_cr" = x; then
12800  eval ac_cr=\$\'\\r\'
12801fi
12802ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
12803if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
12804  ac_cs_awk_cr='\\r'
12805else
12806  ac_cs_awk_cr=$ac_cr
12807fi
12808
12809echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
12810_ACEOF
12811
12812
12813{
12814  echo "cat >conf$$subs.awk <<_ACEOF" &&
12815  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
12816  echo "_ACEOF"
12817} >conf$$subs.sh ||
12818  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
12819ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
12820ac_delim='%!_!# '
12821for ac_last_try in false false false false false :; do
12822  . ./conf$$subs.sh ||
12823    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
12824
12825  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
12826  if test $ac_delim_n = $ac_delim_num; then
12827    break
12828  elif $ac_last_try; then
12829    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
12830  else
12831    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
12832  fi
12833done
12834rm -f conf$$subs.sh
12835
12836cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12837cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
12838_ACEOF
12839sed -n '
12840h
12841s/^/S["/; s/!.*/"]=/
12842p
12843g
12844s/^[^!]*!//
12845:repl
12846t repl
12847s/'"$ac_delim"'$//
12848t delim
12849:nl
12850h
12851s/\(.\{148\}\)..*/\1/
12852t more1
12853s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
12854p
12855n
12856b repl
12857:more1
12858s/["\\]/\\&/g; s/^/"/; s/$/"\\/
12859p
12860g
12861s/.\{148\}//
12862t nl
12863:delim
12864h
12865s/\(.\{148\}\)..*/\1/
12866t more2
12867s/["\\]/\\&/g; s/^/"/; s/$/"/
12868p
12869b
12870:more2
12871s/["\\]/\\&/g; s/^/"/; s/$/"\\/
12872p
12873g
12874s/.\{148\}//
12875t delim
12876' <conf$$subs.awk | sed '
12877/^[^""]/{
12878  N
12879  s/\n//
12880}
12881' >>$CONFIG_STATUS || ac_write_fail=1
12882rm -f conf$$subs.awk
12883cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12884_ACAWK
12885cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
12886  for (key in S) S_is_set[key] = 1
12887  FS = ""
12888
12889}
12890{
12891  line = $ 0
12892  nfields = split(line, field, "@")
12893  substed = 0
12894  len = length(field[1])
12895  for (i = 2; i < nfields; i++) {
12896    key = field[i]
12897    keylen = length(key)
12898    if (S_is_set[key]) {
12899      value = S[key]
12900      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
12901      len += length(value) + length(field[++i])
12902      substed = 1
12903    } else
12904      len += 1 + keylen
12905  }
12906
12907  print line
12908}
12909
12910_ACAWK
12911_ACEOF
12912cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12913if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
12914  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
12915else
12916  cat
12917fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
12918  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
12919_ACEOF
12920
12921# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
12922# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
12923# trailing colons and then remove the whole line if VPATH becomes empty
12924# (actually we leave an empty line to preserve line numbers).
12925if test "x$srcdir" = x.; then
12926  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
12927h
12928s///
12929s/^/:/
12930s/[	 ]*$/:/
12931s/:\$(srcdir):/:/g
12932s/:\${srcdir}:/:/g
12933s/:@srcdir@:/:/g
12934s/^:*//
12935s/:*$//
12936x
12937s/\(=[	 ]*\).*/\1/
12938G
12939s/\n//
12940s/^[^=]*=[	 ]*$//
12941}'
12942fi
12943
12944cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12945fi # test -n "$CONFIG_FILES"
12946
12947# Set up the scripts for CONFIG_HEADERS section.
12948# No need to generate them if there are no CONFIG_HEADERS.
12949# This happens for instance with `./config.status Makefile'.
12950if test -n "$CONFIG_HEADERS"; then
12951cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
12952BEGIN {
12953_ACEOF
12954
12955# Transform confdefs.h into an awk script `defines.awk', embedded as
12956# here-document in config.status, that substitutes the proper values into
12957# config.h.in to produce config.h.
12958
12959# Create a delimiter string that does not exist in confdefs.h, to ease
12960# handling of long lines.
12961ac_delim='%!_!# '
12962for ac_last_try in false false :; do
12963  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
12964  if test -z "$ac_tt"; then
12965    break
12966  elif $ac_last_try; then
12967    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
12968  else
12969    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
12970  fi
12971done
12972
12973# For the awk script, D is an array of macro values keyed by name,
12974# likewise P contains macro parameters if any.  Preserve backslash
12975# newline sequences.
12976
12977ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
12978sed -n '
12979s/.\{148\}/&'"$ac_delim"'/g
12980t rset
12981:rset
12982s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
12983t def
12984d
12985:def
12986s/\\$//
12987t bsnl
12988s/["\\]/\\&/g
12989s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
12990D["\1"]=" \3"/p
12991s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
12992d
12993:bsnl
12994s/["\\]/\\&/g
12995s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
12996D["\1"]=" \3\\\\\\n"\\/p
12997t cont
12998s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
12999t cont
13000d
13001:cont
13002n
13003s/.\{148\}/&'"$ac_delim"'/g
13004t clear
13005:clear
13006s/\\$//
13007t bsnlc
13008s/["\\]/\\&/g; s/^/"/; s/$/"/p
13009d
13010:bsnlc
13011s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
13012b cont
13013' <confdefs.h | sed '
13014s/'"$ac_delim"'/"\\\
13015"/g' >>$CONFIG_STATUS || ac_write_fail=1
13016
13017cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13018  for (key in D) D_is_set[key] = 1
13019  FS = ""
13020}
13021/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
13022  line = \$ 0
13023  split(line, arg, " ")
13024  if (arg[1] == "#") {
13025    defundef = arg[2]
13026    mac1 = arg[3]
13027  } else {
13028    defundef = substr(arg[1], 2)
13029    mac1 = arg[2]
13030  }
13031  split(mac1, mac2, "(") #)
13032  macro = mac2[1]
13033  prefix = substr(line, 1, index(line, defundef) - 1)
13034  if (D_is_set[macro]) {
13035    # Preserve the white space surrounding the "#".
13036    print prefix "define", macro P[macro] D[macro]
13037    next
13038  } else {
13039    # Replace #undef with comments.  This is necessary, for example,
13040    # in the case of _POSIX_SOURCE, which is predefined and required
13041    # on some systems where configure will not decide to define it.
13042    if (defundef == "undef") {
13043      print "/*", prefix defundef, macro, "*/"
13044      next
13045    }
13046  }
13047}
13048{ print }
13049_ACAWK
13050_ACEOF
13051cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13052  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
13053fi # test -n "$CONFIG_HEADERS"
13054
13055
13056eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
13057shift
13058for ac_tag
13059do
13060  case $ac_tag in
13061  :[FHLC]) ac_mode=$ac_tag; continue;;
13062  esac
13063  case $ac_mode$ac_tag in
13064  :[FHL]*:*);;
13065  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
13066  :[FH]-) ac_tag=-:-;;
13067  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
13068  esac
13069  ac_save_IFS=$IFS
13070  IFS=:
13071  set x $ac_tag
13072  IFS=$ac_save_IFS
13073  shift
13074  ac_file=$1
13075  shift
13076
13077  case $ac_mode in
13078  :L) ac_source=$1;;
13079  :[FH])
13080    ac_file_inputs=
13081    for ac_f
13082    do
13083      case $ac_f in
13084      -) ac_f="$ac_tmp/stdin";;
13085      *) # Look for the file first in the build tree, then in the source tree
13086	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
13087	 # because $ac_f cannot contain `:'.
13088	 test -f "$ac_f" ||
13089	   case $ac_f in
13090	   [\\/$]*) false;;
13091	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
13092	   esac ||
13093	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
13094      esac
13095      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
13096      as_fn_append ac_file_inputs " '$ac_f'"
13097    done
13098
13099    # Let's still pretend it is `configure' which instantiates (i.e., don't
13100    # use $as_me), people would be surprised to read:
13101    #    /* config.h.  Generated by config.status.  */
13102    configure_input='Generated from '`
13103	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
13104	`' by configure.'
13105    if test x"$ac_file" != x-; then
13106      configure_input="$ac_file.  $configure_input"
13107      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
13108$as_echo "$as_me: creating $ac_file" >&6;}
13109    fi
13110    # Neutralize special characters interpreted by sed in replacement strings.
13111    case $configure_input in #(
13112    *\&* | *\|* | *\\* )
13113       ac_sed_conf_input=`$as_echo "$configure_input" |
13114       sed 's/[\\\\&|]/\\\\&/g'`;; #(
13115    *) ac_sed_conf_input=$configure_input;;
13116    esac
13117
13118    case $ac_tag in
13119    *:-:* | *:-) cat >"$ac_tmp/stdin" \
13120      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
13121    esac
13122    ;;
13123  esac
13124
13125  ac_dir=`$as_dirname -- "$ac_file" ||
13126$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13127	 X"$ac_file" : 'X\(//\)[^/]' \| \
13128	 X"$ac_file" : 'X\(//\)$' \| \
13129	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
13130$as_echo X"$ac_file" |
13131    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13132	    s//\1/
13133	    q
13134	  }
13135	  /^X\(\/\/\)[^/].*/{
13136	    s//\1/
13137	    q
13138	  }
13139	  /^X\(\/\/\)$/{
13140	    s//\1/
13141	    q
13142	  }
13143	  /^X\(\/\).*/{
13144	    s//\1/
13145	    q
13146	  }
13147	  s/.*/./; q'`
13148  as_dir="$ac_dir"; as_fn_mkdir_p
13149  ac_builddir=.
13150
13151case "$ac_dir" in
13152.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
13153*)
13154  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
13155  # A ".." for each directory in $ac_dir_suffix.
13156  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
13157  case $ac_top_builddir_sub in
13158  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
13159  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
13160  esac ;;
13161esac
13162ac_abs_top_builddir=$ac_pwd
13163ac_abs_builddir=$ac_pwd$ac_dir_suffix
13164# for backward compatibility:
13165ac_top_builddir=$ac_top_build_prefix
13166
13167case $srcdir in
13168  .)  # We are building in place.
13169    ac_srcdir=.
13170    ac_top_srcdir=$ac_top_builddir_sub
13171    ac_abs_top_srcdir=$ac_pwd ;;
13172  [\\/]* | ?:[\\/]* )  # Absolute name.
13173    ac_srcdir=$srcdir$ac_dir_suffix;
13174    ac_top_srcdir=$srcdir
13175    ac_abs_top_srcdir=$srcdir ;;
13176  *) # Relative name.
13177    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
13178    ac_top_srcdir=$ac_top_build_prefix$srcdir
13179    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
13180esac
13181ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
13182
13183
13184  case $ac_mode in
13185  :F)
13186  #
13187  # CONFIG_FILE
13188  #
13189
13190  case $INSTALL in
13191  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
13192  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
13193  esac
13194_ACEOF
13195
13196cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13197# If the template does not know about datarootdir, expand it.
13198# FIXME: This hack should be removed a few years after 2.60.
13199ac_datarootdir_hack=; ac_datarootdir_seen=
13200ac_sed_dataroot='
13201/datarootdir/ {
13202  p
13203  q
13204}
13205/@datadir@/p
13206/@docdir@/p
13207/@infodir@/p
13208/@localedir@/p
13209/@mandir@/p'
13210case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
13211*datarootdir*) ac_datarootdir_seen=yes;;
13212*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
13213  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
13214$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
13215_ACEOF
13216cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13217  ac_datarootdir_hack='
13218  s&@datadir@&$datadir&g
13219  s&@docdir@&$docdir&g
13220  s&@infodir@&$infodir&g
13221  s&@localedir@&$localedir&g
13222  s&@mandir@&$mandir&g
13223  s&\\\${datarootdir}&$datarootdir&g' ;;
13224esac
13225_ACEOF
13226
13227# Neutralize VPATH when `$srcdir' = `.'.
13228# Shell code in configure.ac might set extrasub.
13229# FIXME: do we really want to maintain this feature?
13230cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13231ac_sed_extra="$ac_vpsub
13232$extrasub
13233_ACEOF
13234cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13235:t
13236/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13237s|@configure_input@|$ac_sed_conf_input|;t t
13238s&@top_builddir@&$ac_top_builddir_sub&;t t
13239s&@top_build_prefix@&$ac_top_build_prefix&;t t
13240s&@srcdir@&$ac_srcdir&;t t
13241s&@abs_srcdir@&$ac_abs_srcdir&;t t
13242s&@top_srcdir@&$ac_top_srcdir&;t t
13243s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
13244s&@builddir@&$ac_builddir&;t t
13245s&@abs_builddir@&$ac_abs_builddir&;t t
13246s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
13247s&@INSTALL@&$ac_INSTALL&;t t
13248$ac_datarootdir_hack
13249"
13250eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
13251  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13252
13253test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
13254  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
13255  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
13256      "$ac_tmp/out"`; test -z "$ac_out"; } &&
13257  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13258which seems to be undefined.  Please make sure it is defined" >&5
13259$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
13260which seems to be undefined.  Please make sure it is defined" >&2;}
13261
13262  rm -f "$ac_tmp/stdin"
13263  case $ac_file in
13264  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
13265  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
13266  esac \
13267  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13268 ;;
13269  :H)
13270  #
13271  # CONFIG_HEADER
13272  #
13273  if test x"$ac_file" != x-; then
13274    {
13275      $as_echo "/* $configure_input  */" \
13276      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
13277    } >"$ac_tmp/config.h" \
13278      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13279    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
13280      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
13281$as_echo "$as_me: $ac_file is unchanged" >&6;}
13282    else
13283      rm -f "$ac_file"
13284      mv "$ac_tmp/config.h" "$ac_file" \
13285	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
13286    fi
13287  else
13288    $as_echo "/* $configure_input  */" \
13289      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
13290      || as_fn_error $? "could not create -" "$LINENO" 5
13291  fi
13292 ;;
13293
13294  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
13295$as_echo "$as_me: executing $ac_file commands" >&6;}
13296 ;;
13297  esac
13298
13299
13300  case $ac_file$ac_mode in
13301    "default-1":C) if test -f .devel; then
13302	echo timestamp > stamp-h
13303	cat $srcdir/Makefile-devel-adds >> Makefile
13304	make depend
13305fi ;;
13306
13307  esac
13308done # for ac_tag
13309
13310
13311as_fn_exit 0
13312_ACEOF
13313ac_clean_files=$ac_clean_files_save
13314
13315test $ac_write_fail = 0 ||
13316  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
13317
13318
13319# configure is writing to config.log, and then calls config.status.
13320# config.status does its own redirection, appending to config.log.
13321# Unfortunately, on DOS this fails, as config.log is still kept open
13322# by configure, so config.status won't be able to write to it; its
13323# output is simply discarded.  So we exec the FD to /dev/null,
13324# effectively closing config.log, so it can be properly (re)opened and
13325# appended to by config.status.  When coming back to configure, we
13326# need to make the FD available again.
13327if test "$no_create" != yes; then
13328  ac_cs_success=:
13329  ac_config_status_args=
13330  test "$silent" = yes &&
13331    ac_config_status_args="$ac_config_status_args --quiet"
13332  exec 5>/dev/null
13333  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
13334  exec 5>>config.log
13335  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13336  # would make configure fail if this is the last instruction.
13337  $ac_cs_success || as_fn_exit 1
13338fi
13339if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
13340  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
13341$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
13342fi
13343
13344exit 0
13345