Make the Zebra dissector, and a routine it uses, static, as they're not
[obnox/wireshark/wip.git] / libpcap-0.4.HPUX.HPUXPAC.patch
1 diff -c ../libpcap-0.4.HPUX/aclocal.m4 ./aclocal.m4
2 *** ../libpcap-0.4.HPUX/aclocal.m4      Fri Jun 12 03:45:15 1998
3 --- ./aclocal.m4        Sat Aug 12 23:38:08 2000
4 ***************
5 *** 415,420 ****
6 --- 415,454 ----
7       fi])
8   
9   dnl
10 + dnl Checks to see if the dl_hp_ppa_info_t struct has the HP-UX 11.00
11 + dnl dl_module_id_1 member
12 + dnl
13 + dnl usage:
14 + dnl
15 + dnl   AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1
16 + dnl
17 + dnl results:
18 + dnl
19 + dnl   HAVE_HP_PPA_INFO_T_DL_MODULE_ID_1 (defined)
20 + dnl
21 + dnl NOTE: any compile failure means we conclude that it doesn't have
22 + dnl that member, so if we don't have DLPI, don't have a <sys/dlpi_ext.h>
23 + dnl header, or have one that doesn't declare a dl_hp_ppa_info_t type,
24 + dnl we conclude it doesn't have that member (which is OK, as either we
25 + dnl won't be using code that would use that member, or we wouldn't
26 + dnl compile in any case).
27 + dnl
28 + AC_DEFUN(AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1,
29 +     [AC_MSG_CHECKING(if dl_hp_ppa_info_t struct has dl_module_id_1 member)
30 +     AC_CACHE_VAL(ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1,
31 +       AC_TRY_COMPILE([
32 + #     include <sys/types.h>
33 + #     include <sys/dlpi.h>
34 + #     include <sys/dlpi_ext.h>],
35 +       [u_int i = sizeof(((dl_hp_ppa_info_t *)0)->dl_module_id_1)],
36 +       ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1=yes,
37 +       ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1=no))
38 +     AC_MSG_RESULT($ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1)
39 +     if test $ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1 = yes ; then
40 +           AC_DEFINE(HAVE_HP_PPA_INFO_T_DL_MODULE_ID_1)
41 +     fi])
42
43 + dnl
44   dnl Checks to see if -R is used
45   dnl
46   dnl usage:
47 diff -c ../libpcap-0.4.HPUX/configure ./configure
48 *** ../libpcap-0.4.HPUX/configure       Fri Feb 11 07:04:51 2000
49 --- ./configure Sat Aug 12 23:43:23 2000
50 ***************
51 *** 1,7 ****
52   #! /bin/sh
53   
54   # Guess values for system-dependent variables and create Makefiles.
55 ! # Generated automatically using autoconf version 2.12 
56   # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
57   #
58   # This configure script is free software; the Free Software Foundation
59 --- 1,7 ----
60   #! /bin/sh
61   
62   # Guess values for system-dependent variables and create Makefiles.
63 ! # Generated automatically using autoconf version 2.13 
64   # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
65   #
66   # This configure script is free software; the Free Software Foundation
67 ***************
68 *** 63,68 ****
69 --- 63,69 ----
70   # Initialize some other variables.
71   subdirs=
72   MFLAGS= MAKEFLAGS=
73 + SHELL=${CONFIG_SHELL-/bin/sh}
74   # Maximum number of lines to put in a shell here document.
75   ac_max_here_lines=12
76   
77 ***************
78 *** 346,352 ****
79       verbose=yes ;;
80   
81     -version | --version | --versio | --versi | --vers)
82 !     echo "configure generated by autoconf version 2.12"
83       exit 0 ;;
84   
85     -with-* | --with-*)
86 --- 347,353 ----
87       verbose=yes ;;
88   
89     -version | --version | --versio | --versi | --vers)
90 !     echo "configure generated by autoconf version 2.13"
91       exit 0 ;;
92   
93     -with-* | --with-*)
94 ***************
95 *** 516,524 ****
96   # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
97   ac_cpp='$CPP $CPPFLAGS'
98   ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
99 ! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
100   cross_compiling=$ac_cv_prog_cc_cross
101   
102   if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
103     # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
104     if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
105 --- 517,527 ----
106   # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
107   ac_cpp='$CPP $CPPFLAGS'
108   ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
109 ! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
110   cross_compiling=$ac_cv_prog_cc_cross
111   
112 + ac_exeext=
113 + ac_objext=o
114   if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
115     # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
116     if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
117 ***************
118 *** 575,607 ****
119   
120   
121   # Make sure we can run config.sub.
122 ! if $ac_config_sub sun4 >/dev/null 2>&1; then :
123   else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
124   fi
125   
126   echo $ac_n "checking host system type""... $ac_c" 1>&6
127 ! echo "configure:578: checking host system type" >&5
128   
129   host_alias=$host
130   case "$host_alias" in
131   NONE)
132     case $nonopt in
133     NONE)
134 !     if host_alias=`$ac_config_guess`; then :
135       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
136       fi ;;
137     *) host_alias=$nonopt ;;
138     esac ;;
139   esac
140   
141 ! host=`$ac_config_sub $host_alias`
142   host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
143   host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
144   host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
145   echo "$ac_t""$host" 1>&6
146   
147   echo $ac_n "checking target system type""... $ac_c" 1>&6
148 ! echo "configure:599: checking target system type" >&5
149   
150   target_alias=$target
151   case "$target_alias" in
152 --- 578,610 ----
153   
154   
155   # Make sure we can run config.sub.
156 ! if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
157   else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
158   fi
159   
160   echo $ac_n "checking host system type""... $ac_c" 1>&6
161 ! echo "configure:581: checking host system type" >&5
162   
163   host_alias=$host
164   case "$host_alias" in
165   NONE)
166     case $nonopt in
167     NONE)
168 !     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
169       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
170       fi ;;
171     *) host_alias=$nonopt ;;
172     esac ;;
173   esac
174   
175 ! host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
176   host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
177   host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
178   host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
179   echo "$ac_t""$host" 1>&6
180   
181   echo $ac_n "checking target system type""... $ac_c" 1>&6
182 ! echo "configure:602: checking target system type" >&5
183   
184   target_alias=$target
185   case "$target_alias" in
186 ***************
187 *** 612,625 ****
188     esac ;;
189   esac
190   
191 ! target=`$ac_config_sub $target_alias`
192   target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
193   target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
194   target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
195   echo "$ac_t""$target" 1>&6
196   
197   echo $ac_n "checking build system type""... $ac_c" 1>&6
198 ! echo "configure:617: checking build system type" >&5
199   
200   build_alias=$build
201   case "$build_alias" in
202 --- 615,628 ----
203     esac ;;
204   esac
205   
206 ! target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
207   target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
208   target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
209   target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
210   echo "$ac_t""$target" 1>&6
211   
212   echo $ac_n "checking build system type""... $ac_c" 1>&6
213 ! echo "configure:620: checking build system type" >&5
214   
215   build_alias=$build
216   case "$build_alias" in
217 ***************
218 *** 630,636 ****
219     esac ;;
220   esac
221   
222 ! build=`$ac_config_sub $build_alias`
223   build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
224   build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
225   build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
226 --- 633,639 ----
227     esac ;;
228   esac
229   
230 ! build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
231   build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
232   build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
233   build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
234 ***************
235 *** 673,687 ****
236                     # Extract the first word of "shlicc2", so it can be a program name with args.
237   set dummy shlicc2; ac_word=$2
238   echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
239 ! echo "configure:671: checking for $ac_word" >&5
240   if eval "test \"`echo '$''{'ac_cv_prog_SHLICC2'+set}'`\" = set"; then
241     echo $ac_n "(cached) $ac_c" 1>&6
242   else
243     if test -n "$SHLICC2"; then
244     ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test.
245   else
246 !   IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
247 !   for ac_dir in $PATH; do
248       test -z "$ac_dir" && ac_dir=.
249       if test -f $ac_dir/$ac_word; then
250         ac_cv_prog_SHLICC2="yes"
251 --- 676,691 ----
252                     # Extract the first word of "shlicc2", so it can be a program name with args.
253   set dummy shlicc2; ac_word=$2
254   echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
255 ! echo "configure:674: checking for $ac_word" >&5
256   if eval "test \"`echo '$''{'ac_cv_prog_SHLICC2'+set}'`\" = set"; then
257     echo $ac_n "(cached) $ac_c" 1>&6
258   else
259     if test -n "$SHLICC2"; then
260     ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test.
261   else
262 !   IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS=":"
263 !   ac_dummy="$PATH"
264 !   for ac_dir in $ac_dummy; do
265       test -z "$ac_dir" && ac_dir=.
266       if test -f $ac_dir/$ac_word; then
267         ac_cv_prog_SHLICC2="yes"
268 ***************
269 *** 713,727 ****
270       # Extract the first word of "gcc", so it can be a program name with args.
271   set dummy gcc; ac_word=$2
272   echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
273 ! echo "configure:711: checking for $ac_word" >&5
274   if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
275     echo $ac_n "(cached) $ac_c" 1>&6
276   else
277     if test -n "$CC"; then
278     ac_cv_prog_CC="$CC" # Let the user override the test.
279   else
280 !   IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
281 !   for ac_dir in $PATH; do
282       test -z "$ac_dir" && ac_dir=.
283       if test -f $ac_dir/$ac_word; then
284         ac_cv_prog_CC="gcc"
285 --- 717,732 ----
286       # Extract the first word of "gcc", so it can be a program name with args.
287   set dummy gcc; ac_word=$2
288   echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
289 ! echo "configure:715: checking for $ac_word" >&5
290   if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
291     echo $ac_n "(cached) $ac_c" 1>&6
292   else
293     if test -n "$CC"; then
294     ac_cv_prog_CC="$CC" # Let the user override the test.
295   else
296 !   IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS=":"
297 !   ac_dummy="$PATH"
298 !   for ac_dir in $ac_dummy; do
299       test -z "$ac_dir" && ac_dir=.
300       if test -f $ac_dir/$ac_word; then
301         ac_cv_prog_CC="gcc"
302 ***************
303 *** 742,757 ****
304     # Extract the first word of "cc", so it can be a program name with args.
305   set dummy cc; ac_word=$2
306   echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
307 ! echo "configure:740: checking for $ac_word" >&5
308   if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
309     echo $ac_n "(cached) $ac_c" 1>&6
310   else
311     if test -n "$CC"; then
312     ac_cv_prog_CC="$CC" # Let the user override the test.
313   else
314 !   IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
315     ac_prog_rejected=no
316 !   for ac_dir in $PATH; do
317       test -z "$ac_dir" && ac_dir=.
318       if test -f $ac_dir/$ac_word; then
319         if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
320 --- 747,763 ----
321     # Extract the first word of "cc", so it can be a program name with args.
322   set dummy cc; ac_word=$2
323   echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
324 ! echo "configure:745: checking for $ac_word" >&5
325   if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
326     echo $ac_n "(cached) $ac_c" 1>&6
327   else
328     if test -n "$CC"; then
329     ac_cv_prog_CC="$CC" # Let the user override the test.
330   else
331 !   IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS=":"
332     ac_prog_rejected=no
333 !   ac_dummy="$PATH"
334 !   for ac_dir in $ac_dummy; do
335       test -z "$ac_dir" && ac_dir=.
336       if test -f $ac_dir/$ac_word; then
337         if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
338 ***************
339 *** 786,810 ****
340     echo "$ac_t""no" 1>&6
341   fi
342   
343     test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
344   fi
345   
346   echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
347 ! echo "configure:788: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
348   
349   ac_ext=c
350   # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
351   ac_cpp='$CPP $CPPFLAGS'
352   ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
353 ! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
354   cross_compiling=$ac_cv_prog_cc_cross
355   
356 ! cat > conftest.$ac_ext <<EOF
357 ! #line 798 "configure"
358   #include "confdefs.h"
359   main(){return(0);}
360   EOF
361 ! if { (eval echo configure:802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
362     ac_cv_prog_cc_works=yes
363     # If we can't run a trivial program, we are probably using a cross compiler.
364     if (./conftest; exit) 2>/dev/null; then
365 --- 792,852 ----
366     echo "$ac_t""no" 1>&6
367   fi
368   
369 +   if test -z "$CC"; then
370 +     case "`uname -s`" in
371 +     *win32* | *WIN32*)
372 +       # Extract the first word of "cl", so it can be a program name with args.
373 + set dummy cl; ac_word=$2
374 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
375 + echo "configure:796: checking for $ac_word" >&5
376 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
377 +   echo $ac_n "(cached) $ac_c" 1>&6
378 + else
379 +   if test -n "$CC"; then
380 +   ac_cv_prog_CC="$CC" # Let the user override the test.
381 + else
382 +   IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS=":"
383 +   ac_dummy="$PATH"
384 +   for ac_dir in $ac_dummy; do
385 +     test -z "$ac_dir" && ac_dir=.
386 +     if test -f $ac_dir/$ac_word; then
387 +       ac_cv_prog_CC="cl"
388 +       break
389 +     fi
390 +   done
391 +   IFS="$ac_save_ifs"
392 + fi
393 + fi
394 + CC="$ac_cv_prog_CC"
395 + if test -n "$CC"; then
396 +   echo "$ac_t""$CC" 1>&6
397 + else
398 +   echo "$ac_t""no" 1>&6
399 + fi
400 +  ;;
401 +     esac
402 +   fi
403     test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
404   fi
405   
406   echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
407 ! echo "configure:828: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
408   
409   ac_ext=c
410   # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
411   ac_cpp='$CPP $CPPFLAGS'
412   ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
413 ! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
414   cross_compiling=$ac_cv_prog_cc_cross
415   
416 ! cat > conftest.$ac_ext << EOF
417
418 ! #line 839 "configure"
419   #include "confdefs.h"
420
421   main(){return(0);}
422   EOF
423 ! if { (eval echo configure:844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
424     ac_cv_prog_cc_works=yes
425     # If we can't run a trivial program, we are probably using a cross compiler.
426     if (./conftest; exit) 2>/dev/null; then
427 ***************
428 *** 818,835 ****
429     ac_cv_prog_cc_works=no
430   fi
431   rm -fr conftest*
432   
433   echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
434   if test $ac_cv_prog_cc_works = no; then
435     { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
436   fi
437   echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
438 ! echo "configure:822: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
439   echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
440   cross_compiling=$ac_cv_prog_cc_cross
441   
442   echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
443 ! echo "configure:827: checking whether we are using GNU C" >&5
444   if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
445     echo $ac_n "(cached) $ac_c" 1>&6
446   else
447 --- 860,883 ----
448     ac_cv_prog_cc_works=no
449   fi
450   rm -fr conftest*
451 + ac_ext=c
452 + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
453 + ac_cpp='$CPP $CPPFLAGS'
454 + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
455 + ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
456 + cross_compiling=$ac_cv_prog_cc_cross
457   
458   echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
459   if test $ac_cv_prog_cc_works = no; then
460     { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
461   fi
462   echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
463 ! echo "configure:870: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
464   echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
465   cross_compiling=$ac_cv_prog_cc_cross
466   
467   echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
468 ! echo "configure:875: checking whether we are using GNU C" >&5
469   if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
470     echo $ac_n "(cached) $ac_c" 1>&6
471   else
472 ***************
473 *** 838,844 ****
474     yes;
475   #endif
476   EOF
477 ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
478     ac_cv_prog_gcc=yes
479   else
480     ac_cv_prog_gcc=no
481 --- 886,892 ----
482     yes;
483   #endif
484   EOF
485 ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
486     ac_cv_prog_gcc=yes
487   else
488     ac_cv_prog_gcc=no
489 ***************
490 *** 849,859 ****
491   
492   if test $ac_cv_prog_gcc = yes; then
493     GCC=yes
494 !   ac_test_CFLAGS="${CFLAGS+set}"
495 !   ac_save_CFLAGS="$CFLAGS"
496 !   CFLAGS=
497 !   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
498 ! echo "configure:851: checking whether ${CC-cc} accepts -g" >&5
499   if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
500     echo $ac_n "(cached) $ac_c" 1>&6
501   else
502 --- 897,911 ----
503   
504   if test $ac_cv_prog_gcc = yes; then
505     GCC=yes
506 ! else
507 !   GCC=
508 ! fi
509
510 ! ac_test_CFLAGS="${CFLAGS+set}"
511 ! ac_save_CFLAGS="$CFLAGS"
512 ! CFLAGS=
513 ! echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
514 ! echo "configure:903: checking whether ${CC-cc} accepts -g" >&5
515   if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
516     echo $ac_n "(cached) $ac_c" 1>&6
517   else
518 ***************
519 *** 868,883 ****
520   fi
521   
522   echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
523 !   if test "$ac_test_CFLAGS" = set; then
524 !     CFLAGS="$ac_save_CFLAGS"
525 !   elif test $ac_cv_prog_cc_g = yes; then
526       CFLAGS="-g -O2"
527     else
528 !     CFLAGS="-O2"
529     fi
530   else
531 !   GCC=
532 !   test "${CFLAGS+set}" = set || CFLAGS="-g"
533   fi
534   
535       if test "$GCC" = yes ; then
536 --- 920,939 ----
537   fi
538   
539   echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
540 ! if test "$ac_test_CFLAGS" = set; then
541 !   CFLAGS="$ac_save_CFLAGS"
542 ! elif test $ac_cv_prog_cc_g = yes; then
543 !   if test "$GCC" = yes; then
544       CFLAGS="-g -O2"
545     else
546 !     CFLAGS="-g"
547     fi
548   else
549 !   if test "$GCC" = yes; then
550 !     CFLAGS="-O2"
551 !   else
552 !     CFLAGS=
553 !   fi
554   fi
555   
556       if test "$GCC" = yes ; then
557 ***************
558 *** 886,892 ****
559                     V_CCOPT="-O2"
560             else
561                     echo $ac_n "checking gcc version""... $ac_c" 1>&6
562 ! echo "configure:884: checking gcc version" >&5
563                     if eval "test \"`echo '$''{'ac_cv_lbl_gcc_vers'+set}'`\" = set"; then
564     echo $ac_n "(cached) $ac_c" 1>&6
565   else
566 --- 942,948 ----
567                     V_CCOPT="-O2"
568             else
569                     echo $ac_n "checking gcc version""... $ac_c" 1>&6
570 ! echo "configure:940: checking gcc version" >&5
571                     if eval "test \"`echo '$''{'ac_cv_lbl_gcc_vers'+set}'`\" = set"; then
572     echo $ac_n "(cached) $ac_c" 1>&6
573   else
574 ***************
575 *** 904,922 ****
576             fi
577       else
578             echo $ac_n "checking that $CC handles ansi prototypes""... $ac_c" 1>&6
579 ! echo "configure:902: checking that $CC handles ansi prototypes" >&5
580             if eval "test \"`echo '$''{'ac_cv_lbl_cc_ansi_prototypes'+set}'`\" = set"; then
581     echo $ac_n "(cached) $ac_c" 1>&6
582   else
583     cat > conftest.$ac_ext <<EOF
584 ! #line 907 "configure"
585   #include "confdefs.h"
586   #include <sys/types.h>
587   int main() {
588   int frob(int, char *)
589   ; return 0; }
590   EOF
591 ! if { (eval echo configure:914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
592     rm -rf conftest*
593     ac_cv_lbl_cc_ansi_prototypes=yes
594   else
595 --- 960,978 ----
596             fi
597       else
598             echo $ac_n "checking that $CC handles ansi prototypes""... $ac_c" 1>&6
599 ! echo "configure:958: checking that $CC handles ansi prototypes" >&5
600             if eval "test \"`echo '$''{'ac_cv_lbl_cc_ansi_prototypes'+set}'`\" = set"; then
601     echo $ac_n "(cached) $ac_c" 1>&6
602   else
603     cat > conftest.$ac_ext <<EOF
604 ! #line 963 "configure"
605   #include "confdefs.h"
606   #include <sys/types.h>
607   int main() {
608   int frob(int, char *)
609   ; return 0; }
610   EOF
611 ! if { (eval echo configure:970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
612     rm -rf conftest*
613     ac_cv_lbl_cc_ansi_prototypes=yes
614   else
615 ***************
616 *** 934,954 ****
617   
618                     hpux*)
619                             echo $ac_n "checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)""... $ac_c" 1>&6
620 ! echo "configure:932: checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)" >&5
621                             savedcflags="$CFLAGS"
622                             CFLAGS="-Aa -D_HPUX_SOURCE $CFLAGS"
623                             if eval "test \"`echo '$''{'ac_cv_lbl_cc_hpux_cc_aa'+set}'`\" = set"; then
624     echo $ac_n "(cached) $ac_c" 1>&6
625   else
626     cat > conftest.$ac_ext <<EOF
627 ! #line 939 "configure"
628   #include "confdefs.h"
629   #include <sys/types.h>
630   int main() {
631   int frob(int, char *)
632   ; return 0; }
633   EOF
634 ! if { (eval echo configure:946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
635     rm -rf conftest*
636     ac_cv_lbl_cc_hpux_cc_aa=yes
637   else
638 --- 990,1010 ----
639   
640                     hpux*)
641                             echo $ac_n "checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)""... $ac_c" 1>&6
642 ! echo "configure:988: checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)" >&5
643                             savedcflags="$CFLAGS"
644                             CFLAGS="-Aa -D_HPUX_SOURCE $CFLAGS"
645                             if eval "test \"`echo '$''{'ac_cv_lbl_cc_hpux_cc_aa'+set}'`\" = set"; then
646     echo $ac_n "(cached) $ac_c" 1>&6
647   else
648     cat > conftest.$ac_ext <<EOF
649 ! #line 995 "configure"
650   #include "confdefs.h"
651   #include <sys/types.h>
652   int main() {
653   int frob(int, char *)
654   ; return 0; }
655   EOF
656 ! if { (eval echo configure:1002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
657     rm -rf conftest*
658     ac_cv_lbl_cc_hpux_cc_aa=yes
659   else
660 ***************
661 *** 991,1002 ****
662   
663             ultrix*)
664                     echo $ac_n "checking that Ultrix $CC hacks const in prototypes""... $ac_c" 1>&6
665 ! echo "configure:990: checking that Ultrix $CC hacks const in prototypes" >&5
666                     if eval "test \"`echo '$''{'ac_cv_lbl_cc_const_proto'+set}'`\" = set"; then
667     echo $ac_n "(cached) $ac_c" 1>&6
668   else
669     cat > conftest.$ac_ext <<EOF
670 ! #line 995 "configure"
671   #include "confdefs.h"
672   #include <sys/types.h>
673   int main() {
674 --- 1047,1058 ----
675   
676             ultrix*)
677                     echo $ac_n "checking that Ultrix $CC hacks const in prototypes""... $ac_c" 1>&6
678 ! echo "configure:1046: checking that Ultrix $CC hacks const in prototypes" >&5
679                     if eval "test \"`echo '$''{'ac_cv_lbl_cc_const_proto'+set}'`\" = set"; then
680     echo $ac_n "(cached) $ac_c" 1>&6
681   else
682     cat > conftest.$ac_ext <<EOF
683 ! #line 1051 "configure"
684   #include "confdefs.h"
685   #include <sys/types.h>
686   int main() {
687 ***************
688 *** 1004,1010 ****
689                             void c(const struct a *)
690   ; return 0; }
691   EOF
692 ! if { (eval echo configure:1003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
693     rm -rf conftest*
694     ac_cv_lbl_cc_const_proto=yes
695   else
696 --- 1060,1066 ----
697                             void c(const struct a *)
698   ; return 0; }
699   EOF
700 ! if { (eval echo configure:1059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
701     rm -rf conftest*
702     ac_cv_lbl_cc_const_proto=yes
703   else
704 ***************
705 *** 1029,1035 ****
706   
707   
708   echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
709 ! echo "configure:1028: checking how to run the C preprocessor" >&5
710   # On Suns, sometimes $CPP names a directory.
711   if test -n "$CPP" && test -d "$CPP"; then
712     CPP=
713 --- 1085,1091 ----
714   
715   
716   echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
717 ! echo "configure:1084: checking how to run the C preprocessor" >&5
718   # On Suns, sometimes $CPP names a directory.
719   if test -n "$CPP" && test -d "$CPP"; then
720     CPP=
721 ***************
722 *** 1044,1057 ****
723     # On the NeXT, cc -E runs the code through the compiler's parser,
724     # not just through cpp.
725     cat > conftest.$ac_ext <<EOF
726 ! #line 1043 "configure"
727   #include "confdefs.h"
728   #include <assert.h>
729   Syntax Error
730   EOF
731   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
732 ! { (eval echo configure:1049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
733 ! ac_err=`grep -v '^ *+' conftest.out`
734   if test -z "$ac_err"; then
735     :
736   else
737 --- 1100,1113 ----
738     # On the NeXT, cc -E runs the code through the compiler's parser,
739     # not just through cpp.
740     cat > conftest.$ac_ext <<EOF
741 ! #line 1099 "configure"
742   #include "confdefs.h"
743   #include <assert.h>
744   Syntax Error
745   EOF
746   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
747 ! { (eval echo configure:1105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
748 ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
749   if test -z "$ac_err"; then
750     :
751   else
752 ***************
753 *** 1061,1074 ****
754     rm -rf conftest*
755     CPP="${CC-cc} -E -traditional-cpp"
756     cat > conftest.$ac_ext <<EOF
757 ! #line 1060 "configure"
758   #include "confdefs.h"
759   #include <assert.h>
760   Syntax Error
761   EOF
762   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
763 ! { (eval echo configure:1066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
764 ! ac_err=`grep -v '^ *+' conftest.out`
765   if test -z "$ac_err"; then
766     :
767   else
768 --- 1117,1147 ----
769     rm -rf conftest*
770     CPP="${CC-cc} -E -traditional-cpp"
771     cat > conftest.$ac_ext <<EOF
772 ! #line 1116 "configure"
773 ! #include "confdefs.h"
774 ! #include <assert.h>
775 ! Syntax Error
776 ! EOF
777 ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
778 ! { (eval echo configure:1122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
779 ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
780 ! if test -z "$ac_err"; then
781 !   :
782 ! else
783 !   echo "$ac_err" >&5
784 !   echo "configure: failed program was:" >&5
785 !   cat conftest.$ac_ext >&5
786 !   rm -rf conftest*
787 !   CPP="${CC-cc} -nologo -E"
788 !   cat > conftest.$ac_ext <<EOF
789 ! #line 1133 "configure"
790   #include "confdefs.h"
791   #include <assert.h>
792   Syntax Error
793   EOF
794   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
795 ! { (eval echo configure:1139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
796 ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
797   if test -z "$ac_err"; then
798     :
799   else
800 ***************
801 *** 1081,1086 ****
802 --- 1154,1161 ----
803   rm -f conftest*
804   fi
805   rm -f conftest*
806 + fi
807 + rm -f conftest*
808     ac_cv_prog_CPP="$CPP"
809   fi
810     CPP="$ac_cv_prog_CPP"
811 ***************
812 *** 1093,1110 ****
813   do
814   ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
815   echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
816 ! echo "configure:1092: checking for $ac_hdr" >&5
817   if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
818     echo $ac_n "(cached) $ac_c" 1>&6
819   else
820     cat > conftest.$ac_ext <<EOF
821 ! #line 1097 "configure"
822   #include "confdefs.h"
823   #include <$ac_hdr>
824   EOF
825   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
826 ! { (eval echo configure:1102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
827 ! ac_err=`grep -v '^ *+' conftest.out`
828   if test -z "$ac_err"; then
829     rm -rf conftest*
830     eval "ac_cv_header_$ac_safe=yes"
831 --- 1168,1185 ----
832   do
833   ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
834   echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
835 ! echo "configure:1167: checking for $ac_hdr" >&5
836   if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
837     echo $ac_n "(cached) $ac_c" 1>&6
838   else
839     cat > conftest.$ac_ext <<EOF
840 ! #line 1172 "configure"
841   #include "confdefs.h"
842   #include <$ac_hdr>
843   EOF
844   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
845 ! { (eval echo configure:1177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
846 ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
847   if test -z "$ac_err"; then
848     rm -rf conftest*
849     eval "ac_cv_header_$ac_safe=yes"
850 ***************
851 *** 1132,1143 ****
852   
853   if test "$GCC" = yes ; then
854             echo $ac_n "checking for ANSI ioctl definitions""... $ac_c" 1>&6
855 ! echo "configure:1131: checking for ANSI ioctl definitions" >&5
856             if eval "test \"`echo '$''{'ac_cv_lbl_gcc_fixincludes'+set}'`\" = set"; then
857     echo $ac_n "(cached) $ac_c" 1>&6
858   else
859     cat > conftest.$ac_ext <<EOF
860 ! #line 1136 "configure"
861   #include "confdefs.h"
862   /*
863                      * This generates a "duplicate case value" when fixincludes
864 --- 1207,1218 ----
865   
866   if test "$GCC" = yes ; then
867             echo $ac_n "checking for ANSI ioctl definitions""... $ac_c" 1>&6
868 ! echo "configure:1206: checking for ANSI ioctl definitions" >&5
869             if eval "test \"`echo '$''{'ac_cv_lbl_gcc_fixincludes'+set}'`\" = set"; then
870     echo $ac_n "(cached) $ac_c" 1>&6
871   else
872     cat > conftest.$ac_ext <<EOF
873 ! #line 1211 "configure"
874   #include "confdefs.h"
875   /*
876                      * This generates a "duplicate case value" when fixincludes
877 ***************
878 *** 1156,1162 ****
879                     }
880   ; return 0; }
881   EOF
882 ! if { (eval echo configure:1155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
883     rm -rf conftest*
884     ac_cv_lbl_gcc_fixincludes=yes
885   else
886 --- 1231,1237 ----
887                     }
888   ; return 0; }
889   EOF
890 ! if { (eval echo configure:1230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
891     rm -rf conftest*
892     ac_cv_lbl_gcc_fixincludes=yes
893   else
894 ***************
895 *** 1179,1190 ****
896   for ac_func in ether_hostton strerror
897   do
898   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
899 ! echo "configure:1178: checking for $ac_func" >&5
900   if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
901     echo $ac_n "(cached) $ac_c" 1>&6
902   else
903     cat > conftest.$ac_ext <<EOF
904 ! #line 1183 "configure"
905   #include "confdefs.h"
906   /* System header to define __stub macros and hopefully few prototypes,
907       which can conflict with char $ac_func(); below.  */
908 --- 1254,1265 ----
909   for ac_func in ether_hostton strerror
910   do
911   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
912 ! echo "configure:1253: checking for $ac_func" >&5
913   if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
914     echo $ac_n "(cached) $ac_c" 1>&6
915   else
916     cat > conftest.$ac_ext <<EOF
917 ! #line 1258 "configure"
918   #include "confdefs.h"
919   /* System header to define __stub macros and hopefully few prototypes,
920       which can conflict with char $ac_func(); below.  */
921 ***************
922 *** 1207,1213 ****
923   
924   ; return 0; }
925   EOF
926 ! if { (eval echo configure:1206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
927     rm -rf conftest*
928     eval "ac_cv_func_$ac_func=yes"
929   else
930 --- 1282,1288 ----
931   
932   ; return 0; }
933   EOF
934 ! if { (eval echo configure:1281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
935     rm -rf conftest*
936     eval "ac_cv_func_$ac_func=yes"
937   else
938 ***************
939 *** 1239,1245 ****
940   fi
941   
942   echo $ac_n "checking packet capture type""... $ac_c" 1>&6
943 ! echo "configure:1238: checking packet capture type" >&5
944   if test ! -z "$with_pcap" ; then
945         V_PCAP="$withval"
946   elif test -r /dev/bpf0 ; then
947 --- 1314,1320 ----
948   fi
949   
950   echo $ac_n "checking packet capture type""... $ac_c" 1>&6
951 ! echo "configure:1313: checking packet capture type" >&5
952   if test ! -z "$with_pcap" ; then
953         V_PCAP="$withval"
954   elif test -r /dev/bpf0 ; then
955 ***************
956 *** 1276,1293 ****
957   do
958   ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
959   echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
960 ! echo "configure:1275: checking for $ac_hdr" >&5
961   if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
962     echo $ac_n "(cached) $ac_c" 1>&6
963   else
964     cat > conftest.$ac_ext <<EOF
965 ! #line 1280 "configure"
966   #include "confdefs.h"
967   #include <$ac_hdr>
968   EOF
969   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
970 ! { (eval echo configure:1285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
971 ! ac_err=`grep -v '^ *+' conftest.out`
972   if test -z "$ac_err"; then
973     rm -rf conftest*
974     eval "ac_cv_header_$ac_safe=yes"
975 --- 1351,1368 ----
976   do
977   ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
978   echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
979 ! echo "configure:1350: checking for $ac_hdr" >&5
980   if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
981     echo $ac_n "(cached) $ac_c" 1>&6
982   else
983     cat > conftest.$ac_ext <<EOF
984 ! #line 1355 "configure"
985   #include "confdefs.h"
986   #include <$ac_hdr>
987   EOF
988   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
989 ! { (eval echo configure:1360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
990 ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
991   if test -z "$ac_err"; then
992     rm -rf conftest*
993     eval "ac_cv_header_$ac_safe=yes"
994 ***************
995 *** 1313,1319 ****
996   done
997   
998         echo $ac_n "checking for /dev/dlpi device""... $ac_c" 1>&6
999 ! echo "configure:1312: checking for /dev/dlpi device" >&5
1000         if test -c /dev/dlpi ; then
1001                 echo "$ac_t""yes" 1>&6
1002                 cat >> confdefs.h <<\EOF
1003 --- 1388,1394 ----
1004   done
1005   
1006         echo $ac_n "checking for /dev/dlpi device""... $ac_c" 1>&6
1007 ! echo "configure:1387: checking for /dev/dlpi device" >&5
1008         if test -c /dev/dlpi ; then
1009                 echo "$ac_t""yes" 1>&6
1010                 cat >> confdefs.h <<\EOF
1011 ***************
1012 *** 1324,1330 ****
1013                 echo "$ac_t""no" 1>&6
1014                 dir="/dev/dlpi"
1015                 echo $ac_n "checking for $dir directory""... $ac_c" 1>&6
1016 ! echo "configure:1323: checking for $dir directory" >&5
1017                 if test -d $dir ; then
1018                         echo "$ac_t""yes" 1>&6
1019                         cat >> confdefs.h <<EOF
1020 --- 1399,1405 ----
1021                 echo "$ac_t""no" 1>&6
1022                 dir="/dev/dlpi"
1023                 echo $ac_n "checking for $dir directory""... $ac_c" 1>&6
1024 ! echo "configure:1398: checking for $dir directory" >&5
1025                 if test -d $dir ; then
1026                         echo "$ac_t""yes" 1>&6
1027                         cat >> confdefs.h <<EOF
1028 ***************
1029 *** 1342,1359 ****
1030   do
1031   ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1032   echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1033 ! echo "configure:1341: checking for $ac_hdr" >&5
1034   if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1035     echo $ac_n "(cached) $ac_c" 1>&6
1036   else
1037     cat > conftest.$ac_ext <<EOF
1038 ! #line 1346 "configure"
1039   #include "confdefs.h"
1040   #include <$ac_hdr>
1041   EOF
1042   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1043 ! { (eval echo configure:1351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1044 ! ac_err=`grep -v '^ *+' conftest.out`
1045   if test -z "$ac_err"; then
1046     rm -rf conftest*
1047     eval "ac_cv_header_$ac_safe=yes"
1048 --- 1417,1434 ----
1049   do
1050   ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1051   echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1052 ! echo "configure:1416: checking for $ac_hdr" >&5
1053   if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1054     echo $ac_n "(cached) $ac_c" 1>&6
1055   else
1056     cat > conftest.$ac_ext <<EOF
1057 ! #line 1421 "configure"
1058   #include "confdefs.h"
1059   #include <$ac_hdr>
1060   EOF
1061   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1062 ! { (eval echo configure:1426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1063 ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1064   if test -z "$ac_err"; then
1065     rm -rf conftest*
1066     eval "ac_cv_header_$ac_safe=yes"
1067 ***************
1068 *** 1379,1385 ****
1069   done
1070   
1071         echo $ac_n "checking Linux kernel version""... $ac_c" 1>&6
1072 ! echo "configure:1378: checking Linux kernel version" >&5
1073         if eval "test \"`echo '$''{'ac_cv_linux_vers'+set}'`\" = set"; then
1074     echo $ac_n "(cached) $ac_c" 1>&6
1075   else
1076 --- 1454,1460 ----
1077   done
1078   
1079         echo $ac_n "checking Linux kernel version""... $ac_c" 1>&6
1080 ! echo "configure:1453: checking Linux kernel version" >&5
1081         if eval "test \"`echo '$''{'ac_cv_linux_vers'+set}'`\" = set"; then
1082     echo $ac_n "(cached) $ac_c" 1>&6
1083   else
1084 ***************
1085 *** 1420,1434 ****
1086   # Extract the first word of "$ac_prog", so it can be a program name with args.
1087   set dummy $ac_prog; ac_word=$2
1088   echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1089 ! echo "configure:1419: checking for $ac_word" >&5
1090   if eval "test \"`echo '$''{'ac_cv_prog_V_LEX'+set}'`\" = set"; then
1091     echo $ac_n "(cached) $ac_c" 1>&6
1092   else
1093     if test -n "$V_LEX"; then
1094     ac_cv_prog_V_LEX="$V_LEX" # Let the user override the test.
1095   else
1096 !   IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1097 !   for ac_dir in $PATH; do
1098       test -z "$ac_dir" && ac_dir=.
1099       if test -f $ac_dir/$ac_word; then
1100         ac_cv_prog_V_LEX="$ac_prog"
1101 --- 1495,1510 ----
1102   # Extract the first word of "$ac_prog", so it can be a program name with args.
1103   set dummy $ac_prog; ac_word=$2
1104   echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1105 ! echo "configure:1494: checking for $ac_word" >&5
1106   if eval "test \"`echo '$''{'ac_cv_prog_V_LEX'+set}'`\" = set"; then
1107     echo $ac_n "(cached) $ac_c" 1>&6
1108   else
1109     if test -n "$V_LEX"; then
1110     ac_cv_prog_V_LEX="$V_LEX" # Let the user override the test.
1111   else
1112 !   IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS=":"
1113 !   ac_dummy="$PATH"
1114 !   for ac_dir in $ac_dummy; do
1115       test -z "$ac_dir" && ac_dir=.
1116       if test -f $ac_dir/$ac_word; then
1117         ac_cv_prog_V_LEX="$ac_prog"
1118 ***************
1119 *** 1453,1459 ****
1120       if test "$V_LEX" = flex ; then
1121             # The -V flag was added in 2.4
1122             echo $ac_n "checking for flex 2.4 or higher""... $ac_c" 1>&6
1123 ! echo "configure:1452: checking for flex 2.4 or higher" >&5
1124             if eval "test \"`echo '$''{'ac_cv_lbl_flex_v24'+set}'`\" = set"; then
1125     echo $ac_n "(cached) $ac_c" 1>&6
1126   else
1127 --- 1529,1535 ----
1128       if test "$V_LEX" = flex ; then
1129             # The -V flag was added in 2.4
1130             echo $ac_n "checking for flex 2.4 or higher""... $ac_c" 1>&6
1131 ! echo "configure:1528: checking for flex 2.4 or higher" >&5
1132             if eval "test \"`echo '$''{'ac_cv_lbl_flex_v24'+set}'`\" = set"; then
1133     echo $ac_n "(cached) $ac_c" 1>&6
1134   else
1135 ***************
1136 *** 1479,1493 ****
1137   # Extract the first word of "$ac_prog", so it can be a program name with args.
1138   set dummy $ac_prog; ac_word=$2
1139   echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1140 ! echo "configure:1478: checking for $ac_word" >&5
1141   if eval "test \"`echo '$''{'ac_cv_prog_V_YACC'+set}'`\" = set"; then
1142     echo $ac_n "(cached) $ac_c" 1>&6
1143   else
1144     if test -n "$V_YACC"; then
1145     ac_cv_prog_V_YACC="$V_YACC" # Let the user override the test.
1146   else
1147 !   IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1148 !   for ac_dir in $PATH; do
1149       test -z "$ac_dir" && ac_dir=.
1150       if test -f $ac_dir/$ac_word; then
1151         ac_cv_prog_V_YACC="$ac_prog"
1152 --- 1555,1570 ----
1153   # Extract the first word of "$ac_prog", so it can be a program name with args.
1154   set dummy $ac_prog; ac_word=$2
1155   echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1156 ! echo "configure:1554: checking for $ac_word" >&5
1157   if eval "test \"`echo '$''{'ac_cv_prog_V_YACC'+set}'`\" = set"; then
1158     echo $ac_n "(cached) $ac_c" 1>&6
1159   else
1160     if test -n "$V_YACC"; then
1161     ac_cv_prog_V_YACC="$V_YACC" # Let the user override the test.
1162   else
1163 !   IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS=":"
1164 !   ac_dummy="$PATH"
1165 !   for ac_dir in $ac_dummy; do
1166       test -z "$ac_dir" && ac_dir=.
1167       if test -f $ac_dir/$ac_word; then
1168         ac_cv_prog_V_YACC="$ac_prog"
1169 ***************
1170 *** 1553,1571 ****
1171   
1172   sinix*)
1173         echo $ac_n "checking if SINIX compiler defines sinix""... $ac_c" 1>&6
1174 ! echo "configure:1552: checking if SINIX compiler defines sinix" >&5
1175         if eval "test \"`echo '$''{'ac_cv_cc_sinix_defined'+set}'`\" = set"; then
1176     echo $ac_n "(cached) $ac_c" 1>&6
1177   else
1178     cat > conftest.$ac_ext <<EOF
1179 ! #line 1557 "configure"
1180   #include "confdefs.h"
1181   
1182   int main() {
1183   int i = sinix;
1184   ; return 0; }
1185   EOF
1186 ! if { (eval echo configure:1564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1187     rm -rf conftest*
1188     ac_cv_cc_sinix_defined=yes
1189   else
1190 --- 1630,1648 ----
1191   
1192   sinix*)
1193         echo $ac_n "checking if SINIX compiler defines sinix""... $ac_c" 1>&6
1194 ! echo "configure:1629: checking if SINIX compiler defines sinix" >&5
1195         if eval "test \"`echo '$''{'ac_cv_cc_sinix_defined'+set}'`\" = set"; then
1196     echo $ac_n "(cached) $ac_c" 1>&6
1197   else
1198     cat > conftest.$ac_ext <<EOF
1199 ! #line 1634 "configure"
1200   #include "confdefs.h"
1201   
1202   int main() {
1203   int i = sinix;
1204   ; return 0; }
1205   EOF
1206 ! if { (eval echo configure:1641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1207     rm -rf conftest*
1208     ac_cv_cc_sinix_defined=yes
1209   else
1210 ***************
1211 *** 1603,1617 ****
1212   # Extract the first word of "$ac_prog", so it can be a program name with args.
1213   set dummy $ac_prog; ac_word=$2
1214   echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1215 ! echo "configure:1602: checking for $ac_word" >&5
1216   if eval "test \"`echo '$''{'ac_cv_prog_V_RANLIB'+set}'`\" = set"; then
1217     echo $ac_n "(cached) $ac_c" 1>&6
1218   else
1219     if test -n "$V_RANLIB"; then
1220     ac_cv_prog_V_RANLIB="$V_RANLIB" # Let the user override the test.
1221   else
1222 !   IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1223 !   for ac_dir in $PATH; do
1224       test -z "$ac_dir" && ac_dir=.
1225       if test -f $ac_dir/$ac_word; then
1226         ac_cv_prog_V_RANLIB="$ac_prog"
1227 --- 1680,1695 ----
1228   # Extract the first word of "$ac_prog", so it can be a program name with args.
1229   set dummy $ac_prog; ac_word=$2
1230   echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1231 ! echo "configure:1679: checking for $ac_word" >&5
1232   if eval "test \"`echo '$''{'ac_cv_prog_V_RANLIB'+set}'`\" = set"; then
1233     echo $ac_n "(cached) $ac_c" 1>&6
1234   else
1235     if test -n "$V_RANLIB"; then
1236     ac_cv_prog_V_RANLIB="$V_RANLIB" # Let the user override the test.
1237   else
1238 !   IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS=":"
1239 !   ac_dummy="$PATH"
1240 !   for ac_dir in $ac_dummy; do
1241       test -z "$ac_dir" && ac_dir=.
1242       if test -f $ac_dir/$ac_word; then
1243         ac_cv_prog_V_RANLIB="$ac_prog"
1244 ***************
1245 *** 1673,1684 ****
1246       fi
1247   
1248   echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
1249 ! echo "configure:1672: checking if sockaddr struct has sa_len member" >&5
1250       if eval "test \"`echo '$''{'ac_cv_lbl_sockaddr_has_sa_len'+set}'`\" = set"; then
1251     echo $ac_n "(cached) $ac_c" 1>&6
1252   else
1253     cat > conftest.$ac_ext <<EOF
1254 ! #line 1677 "configure"
1255   #include "confdefs.h"
1256   
1257   #     include <sys/types.h>
1258 --- 1751,1762 ----
1259       fi
1260   
1261   echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
1262 ! echo "configure:1750: checking if sockaddr struct has sa_len member" >&5
1263       if eval "test \"`echo '$''{'ac_cv_lbl_sockaddr_has_sa_len'+set}'`\" = set"; then
1264     echo $ac_n "(cached) $ac_c" 1>&6
1265   else
1266     cat > conftest.$ac_ext <<EOF
1267 ! #line 1755 "configure"
1268   #include "confdefs.h"
1269   
1270   #     include <sys/types.h>
1271 ***************
1272 *** 1687,1693 ****
1273   u_int i = sizeof(((struct sockaddr *)0)->sa_len)
1274   ; return 0; }
1275   EOF
1276 ! if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1277     rm -rf conftest*
1278     ac_cv_lbl_sockaddr_has_sa_len=yes
1279   else
1280 --- 1765,1771 ----
1281   u_int i = sizeof(((struct sockaddr *)0)->sa_len)
1282   ; return 0; }
1283   EOF
1284 ! if { (eval echo configure:1764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1285     rm -rf conftest*
1286     ac_cv_lbl_sockaddr_has_sa_len=yes
1287   else
1288 ***************
1289 *** 1707,1714 ****
1290   
1291       fi
1292   
1293   echo $ac_n "checking if unaligned accesses fail""... $ac_c" 1>&6
1294 ! echo "configure:1707: checking if unaligned accesses fail" >&5
1295       if eval "test \"`echo '$''{'ac_cv_lbl_unaligned_fail'+set}'`\" = set"; then
1296     echo $ac_n "(cached) $ac_c" 1>&6
1297   else
1298 --- 1785,1828 ----
1299   
1300       fi
1301   
1302 + echo $ac_n "checking if dl_hp_ppa_info_t struct has dl_module_id_1 member""... $ac_c" 1>&6
1303 + echo "configure:1785: checking if dl_hp_ppa_info_t struct has dl_module_id_1 member" >&5
1304 +     if eval "test \"`echo '$''{'ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1'+set}'`\" = set"; then
1305 +   echo $ac_n "(cached) $ac_c" 1>&6
1306 + else
1307 +   cat > conftest.$ac_ext <<EOF
1308 + #line 1790 "configure"
1309 + #include "confdefs.h"
1310
1311 + #     include <sys/types.h>
1312 + #     include <sys/dlpi.h>
1313 + #     include <sys/dlpi_ext.h>
1314 + int main() {
1315 + u_int i = sizeof(((dl_hp_ppa_info_t *)0)->dl_module_id_1)
1316 + ; return 0; }
1317 + EOF
1318 + if { (eval echo configure:1800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1319 +   rm -rf conftest*
1320 +   ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1=yes
1321 + else
1322 +   echo "configure: failed program was:" >&5
1323 +   cat conftest.$ac_ext >&5
1324 +   rm -rf conftest*
1325 +   ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1=no
1326 + fi
1327 + rm -f conftest*
1328 + fi
1329
1330 +     echo "$ac_t""$ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1" 1>&6
1331 +     if test $ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1 = yes ; then
1332 +           cat >> confdefs.h <<\EOF
1333 + #define HAVE_HP_PPA_INFO_T_DL_MODULE_ID_1 1
1334 + EOF
1335
1336 +     fi
1337
1338   echo $ac_n "checking if unaligned accesses fail""... $ac_c" 1>&6
1339 ! echo "configure:1821: checking if unaligned accesses fail" >&5
1340       if eval "test \"`echo '$''{'ac_cv_lbl_unaligned_fail'+set}'`\" = set"; then
1341     echo $ac_n "(cached) $ac_c" 1>&6
1342   else
1343 ***************
1344 *** 1800,1827 ****
1345   # SunOS /usr/etc/install
1346   # IRIX /sbin/install
1347   # AIX /bin/install
1348   # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1349   # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1350   # ./install, which can be erroneously created by make from ./install.sh.
1351   echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1352 ! echo "configure:1803: checking for a BSD compatible install" >&5
1353   if test -z "$INSTALL"; then
1354   if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1355     echo $ac_n "(cached) $ac_c" 1>&6
1356   else
1357 !     IFS="${IFS=       }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1358     for ac_dir in $PATH; do
1359       # Account for people who put trailing slashes in PATH elements.
1360       case "$ac_dir/" in
1361       /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1362       *)
1363         # OSF1 and SCO ODT 3.0 have their own names for install.
1364 !       for ac_prog in ginstall installbsd scoinst install; do
1365           if test -f $ac_dir/$ac_prog; then
1366           if test $ac_prog = install &&
1367               grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1368             # AIX install.  It has an incompatible calling convention.
1369 -           # OSF/1 installbsd also uses dspmsg, but is usable.
1370             :
1371           else
1372             ac_cv_path_install="$ac_dir/$ac_prog -c"
1373 --- 1914,1943 ----
1374   # SunOS /usr/etc/install
1375   # IRIX /sbin/install
1376   # AIX /bin/install
1377 + # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1378   # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1379   # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1380   # ./install, which can be erroneously created by make from ./install.sh.
1381   echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1382 ! echo "configure:1918: checking for a BSD compatible install" >&5
1383   if test -z "$INSTALL"; then
1384   if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1385     echo $ac_n "(cached) $ac_c" 1>&6
1386   else
1387 !     IFS="${IFS=       }"; ac_save_IFS="$IFS"; IFS=":"
1388     for ac_dir in $PATH; do
1389       # Account for people who put trailing slashes in PATH elements.
1390       case "$ac_dir/" in
1391       /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1392       *)
1393         # OSF1 and SCO ODT 3.0 have their own names for install.
1394 !       # Don't use installbsd from OSF since it installs stuff as root
1395 !       # by default.
1396 !       for ac_prog in ginstall scoinst install; do
1397           if test -f $ac_dir/$ac_prog; then
1398           if test $ac_prog = install &&
1399               grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1400             # AIX install.  It has an incompatible calling convention.
1401             :
1402           else
1403             ac_cv_path_install="$ac_dir/$ac_prog -c"
1404 ***************
1405 *** 1851,1856 ****
1406 --- 1967,1974 ----
1407   # It thinks the first close brace ends the variable substitution.
1408   test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1409   
1410 + test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1411
1412   test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1413   
1414   
1415 ***************
1416 *** 1877,1883 ****
1417   # Ultrix sh set writes to stderr and can't be redirected directly,
1418   # and sets the high bit in the cache file unless we assign to the vars.
1419   (set) 2>&1 |
1420 !   case `(ac_space=' '; set) 2>&1` in
1421     *ac_space=\ *)
1422       # `set' does not quote correctly, so add quotes (double-quote substitution
1423       # turns \\\\ into \\, and sed turns \\ into \).
1424 --- 1995,2001 ----
1425   # Ultrix sh set writes to stderr and can't be redirected directly,
1426   # and sets the high bit in the cache file unless we assign to the vars.
1427   (set) 2>&1 |
1428 !   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1429     *ac_space=\ *)
1430       # `set' does not quote correctly, so add quotes (double-quote substitution
1431       # turns \\\\ into \\, and sed turns \\ into \).
1432 ***************
1433 *** 1956,1962 ****
1434       echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1435       exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1436     -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1437 !     echo "$CONFIG_STATUS generated by autoconf version 2.12"
1438       exit 0 ;;
1439     -help | --help | --hel | --he | --h)
1440       echo "\$ac_cs_usage"; exit 0 ;;
1441 --- 2074,2080 ----
1442       echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1443       exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1444     -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1445 !     echo "$CONFIG_STATUS generated by autoconf version 2.13"
1446       exit 0 ;;
1447     -help | --help | --hel | --he | --h)
1448       echo "\$ac_cs_usage"; exit 0 ;;
1449 ***************
1450 *** 1976,1984 ****
1451 --- 2094,2104 ----
1452    s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1453   $ac_vpsub
1454   $extrasub
1455 + s%@SHELL@%$SHELL%g
1456   s%@CFLAGS@%$CFLAGS%g
1457   s%@CPPFLAGS@%$CPPFLAGS%g
1458   s%@CXXFLAGS@%$CXXFLAGS%g
1459 + s%@FFLAGS@%$FFLAGS%g
1460   s%@DEFS@%$DEFS%g
1461   s%@LDFLAGS@%$LDFLAGS%g
1462   s%@LIBS@%$LIBS%g
1463 ***************
1464 *** 2022,2027 ****
1465 --- 2142,2148 ----
1466   s%@V_INCLS@%$V_INCLS%g
1467   s%@V_PCAP@%$V_PCAP%g
1468   s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1469 + s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
1470   s%@INSTALL_DATA@%$INSTALL_DATA%g
1471   
1472   CEOF
1473 diff -c ../libpcap-0.4.HPUX/configure.in ./configure.in
1474 *** ../libpcap-0.4.HPUX/configure.in    Sun Jul 27 22:16:22 1997
1475 --- ./configure.in      Sat Aug 12 23:38:08 2000
1476 ***************
1477 *** 154,159 ****
1478 --- 154,161 ----
1479   
1480   AC_LBL_SOCKADDR_SA_LEN
1481   
1482 + AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1
1483
1484   AC_LBL_UNALIGNED_ACCESS
1485   
1486   if test "${srcdir}" = "." ; then
1487 diff -c ../libpcap-0.4.HPUX/pcap-dlpi.c ./pcap-dlpi.c
1488 *** ../libpcap-0.4.HPUX/pcap-dlpi.c     Wed Oct 15 21:59:34 1997
1489 --- ./pcap-dlpi.c       Sat Aug 12 23:39:39 2000
1490 ***************
1491 *** 246,255 ****
1492         }
1493         memset(p, 0, sizeof(*p));
1494   
1495         /*
1496 !       ** Determine device and ppa
1497         */
1498 !       cp = strpbrk(device, "0123456789");
1499         if (cp == NULL) {
1500                 sprintf(ebuf, "%s missing unit number", device);
1501                 goto bad;
1502 --- 246,266 ----
1503         }
1504         memset(p, 0, sizeof(*p));
1505   
1506 + #ifdef HAVE_DEV_DLPI
1507         /*
1508 !       ** Remove any "/dev/" on the front of the device.
1509         */
1510 !       cp = strrchr(device, '/');
1511 !       if (cp == NULL)
1512 !               cp = device;
1513 !       else
1514 !               cp++;
1515 !       strcpy(dname, cp);
1516
1517 !       /*
1518 !        * Split the name into a device type and a unit number.
1519 !        */
1520 !       cp = strpbrk(dname, "0123456789");
1521         if (cp == NULL) {
1522                 sprintf(ebuf, "%s missing unit number", device);
1523                 goto bad;
1524 ***************
1525 *** 259,281 ****
1526                 sprintf(ebuf, "%s bad unit number", device);
1527                 goto bad;
1528         }
1529   
1530 !       if (*device == '/')
1531 !               strcpy(dname, device);
1532 !       else
1533 !               sprintf(dname, "%s/%s", PCAP_DEV_PREFIX, device);
1534 ! #ifdef HAVE_DEV_DLPI
1535 !       /* Map network device to /dev/dlpi unit */
1536         cp = "/dev/dlpi";
1537         if ((p->fd = open(cp, O_RDWR)) < 0) {
1538                 sprintf(ebuf, "%s: %s", cp, pcap_strerror(errno));
1539                 goto bad;
1540         }
1541 !       /* Map network interface to /dev/dlpi unit */
1542         ppa = get_dlpi_ppa(p->fd, dname, ppa, ebuf);
1543         if (ppa < 0)
1544                 goto bad;
1545   #else
1546         /* Try device without unit number */
1547         strcpy(dname2, dname);
1548         cp = strchr(dname, *cp);
1549 --- 270,321 ----
1550                 sprintf(ebuf, "%s bad unit number", device);
1551                 goto bad;
1552         }
1553 +       *cp = '\0';
1554   
1555 !       /*
1556 !        * Use "/dev/dlpi" as the device.
1557 !        *
1558 !        * XXX - HP's DLPI Programmer's Guide for HP-UX 11.00 says that
1559 !        * the "dl_mjr_num" field is for the "major number of interface
1560 !        * driver"; that's the major of "/dev/dlpi" on the system on
1561 !        * which I tried this, but there may be DLPI devices that
1562 !        * use a different driver, in which case we may need to
1563 !        * search "/dev" for the appropriate device with that major
1564 !        * device number, rather than hardwiring "/dev/dlpi".
1565 !        */
1566         cp = "/dev/dlpi";
1567         if ((p->fd = open(cp, O_RDWR)) < 0) {
1568                 sprintf(ebuf, "%s: %s", cp, pcap_strerror(errno));
1569                 goto bad;
1570         }
1571
1572 !       /*
1573 !        * Get a table of all PPAs for that device, and search that
1574 !        * table for the specified device type name and unit number.
1575 !        */
1576         ppa = get_dlpi_ppa(p->fd, dname, ppa, ebuf);
1577         if (ppa < 0)
1578                 goto bad;
1579   #else
1580 +       /*
1581 +       ** Determine device and ppa
1582 +       */
1583 +       cp = strpbrk(device, "0123456789");
1584 +       if (cp == NULL) {
1585 +               sprintf(ebuf, "%s missing unit number", device);
1586 +               goto bad;
1587 +       }
1588 +       ppa = strtol(cp, &eos, 10);
1589 +       if (*eos != '\0') {
1590 +               sprintf(ebuf, "%s bad unit number", device);
1591 +               goto bad;
1592 +       }
1593
1594 +       if (*device == '/')
1595 +               strcpy(dname, device);
1596 +       else
1597 +               sprintf(dname, "%s/%s", PCAP_DEV_PREFIX, device);
1598
1599         /* Try device without unit number */
1600         strcpy(dname2, dname);
1601         cp = strchr(dname, *cp);
1602 ***************
1603 *** 391,397 ****
1604                 break;
1605   
1606         default:
1607 !               sprintf(ebuf, "unknown mac type 0x%lu", infop->dl_mac_type);
1608                 goto bad;
1609         }
1610   
1611 --- 431,438 ----
1612                 break;
1613   
1614         default:
1615 !               sprintf(ebuf, "unknown mac type 0x%lu",
1616 !                   (unsigned long)infop->dl_mac_type);
1617                 goto bad;
1618         }
1619   
1620 ***************
1621 *** 709,737 ****
1622   
1623   #ifdef DL_HP_PPA_ACK_OBS
1624   /*
1625 !  * Under HP-UX 10, we can ask for the ppa
1626    */
1627   
1628   
1629 ! /* Determine ppa number that specifies ifname */
1630   static int
1631   get_dlpi_ppa(register int fd, register const char *device, register int unit,
1632       register char *ebuf)
1633   {
1634         register dl_hp_ppa_ack_t *ap;
1635 !       register dl_hp_ppa_info_t *ip;
1636         register int i;
1637         register u_long majdev;
1638 -       dl_hp_ppa_req_t req;
1639         struct stat statbuf;
1640         bpf_u_int32 buf[MAXDLBUF];
1641   
1642 -       if (stat(device, &statbuf) < 0) {
1643 -               sprintf(ebuf, "stat: %s: %s", device, pcap_strerror(errno));
1644 -               return (-1);
1645 -       }
1646 -       majdev = major(statbuf.st_rdev);
1647
1648         memset((char *)&req, 0, sizeof(req));
1649         req.dl_primitive = DL_HP_PPA_REQ;
1650   
1651 --- 750,806 ----
1652   
1653   #ifdef DL_HP_PPA_ACK_OBS
1654   /*
1655 !  * Under HP-UX 10 and HP-UX 11, we can ask for the ppa
1656    */
1657   
1658   
1659 ! /*
1660 !  * Determine ppa number that specifies ifname.
1661 !  *
1662 !  * If the "dl_hp_ppa_info_t" doesn't have a "dl_module_id_1" member,
1663 !  * the code that's used here is the old code for HP-UX 10.x.
1664 !  *
1665 !  * However, HP-UX 10.20, at least, appears to have such a member
1666 !  * in its "dl_hp_ppa_info_t" structure, so the new code is used.
1667 !  * The new code didn't work on an old 10.20 system on which Rick
1668 !  * Jones of HP tried it, but with later patches installed, it
1669 !  * worked - it appears that the older system had those members but
1670 !  * didn't put anything in them, so, if the search by name fails, we
1671 !  * do the old search.
1672 !  *
1673 !  * Rick suggests that making sure your system is "up on the latest
1674 !  * lancommon/DLPI/driver patches" is probably a good idea; it'd fix
1675 !  * that problem, as well as allowing libpcap to see packets sent
1676 !  * from the system on which the libpcap application is being run.
1677 !  * (On 10.20, in addition to getting the latest patches, you need
1678 !  * to turn the kernel "lanc_outbound_promisc_flag" flag on with ADB;
1679 !  * a posting to "comp.sys.hp.hpux" at
1680 !  *
1681 !  *    http://www.deja.com/[ST_rn=ps]/getdoc.xp?AN=558092266
1682 !  *
1683 !  * says that, to see the machine's outgoing traffic, you'd need to
1684 !  * apply the right patches to your system, and also set that variable
1685 !  * with:
1686 !  
1687 ! echo 'lanc_outbound_promisc_flag/W1' | /usr/bin/adb -w /stand/vmunix /dev/kmem
1688
1689 !  * which could be put in, for example, "/sbin/init.d/lan".
1690 !  *
1691 !  * Setting the variable is not necessary on HP-UX 11.x.
1692 !  */
1693   static int
1694   get_dlpi_ppa(register int fd, register const char *device, register int unit,
1695       register char *ebuf)
1696   {
1697         register dl_hp_ppa_ack_t *ap;
1698 !       register dl_hp_ppa_info_t *ipstart, *ip;
1699         register int i;
1700 +       char dname[100];
1701         register u_long majdev;
1702         struct stat statbuf;
1703 +       dl_hp_ppa_req_t req;
1704         bpf_u_int32 buf[MAXDLBUF];
1705   
1706         memset((char *)&req, 0, sizeof(req));
1707         req.dl_primitive = DL_HP_PPA_REQ;
1708   
1709 ***************
1710 *** 741,760 ****
1711                 return (-1);
1712   
1713         ap = (dl_hp_ppa_ack_t *)buf;
1714 !       ip = (dl_hp_ppa_info_t *)((u_char *)ap + ap->dl_offset);
1715   
1716 !         for(i = 0; i < ap->dl_count; i++) {
1717 !                 if (ip->dl_mjr_num == majdev && ip->dl_instance_num == unit)
1718 !                         break;
1719   
1720 !                 ip = (dl_hp_ppa_info_t *)((u_char *)ip + ip->dl_next_offset);
1721 !         }
1722           if (i == ap->dl_count) {
1723 !                 sprintf(ebuf, "can't find PPA for %s", device);
1724                 return (-1);
1725           }
1726           if (ip->dl_hdw_state == HDW_DEAD) {
1727 !                 sprintf(ebuf, "%s: hardware state: DOWN\n", device);
1728                 return (-1);
1729           }
1730           return ((int)ip->dl_ppa);
1731 --- 810,887 ----
1732                 return (-1);
1733   
1734         ap = (dl_hp_ppa_ack_t *)buf;
1735 !       ipstart = (dl_hp_ppa_info_t *)((u_char *)ap + ap->dl_offset);
1736 !       ip = ipstart;
1737   
1738 ! #ifdef HAVE_HP_PPA_INFO_T_DL_MODULE_ID_1
1739 !       /*
1740 !        * The "dl_hp_ppa_info_t" structure has a "dl_module_id_1"
1741 !        * member that should, in theory, contain the part of the
1742 !        * name for the device that comes before the unit number,
1743 !        * and should also have a "dl_module_id_2" member that may
1744 !        * contain an alternate name (e.g., I think Ethernet devices
1745 !        * have both "lan", for "lanN", and "snap", for "snapN", with
1746 !        * the former being for Ethernet packets and the latter being
1747 !        * for 802.3/802.2 packets).
1748 !        *
1749 !        * Search for the device that has the specified name and
1750 !        * instance number.
1751 !        */
1752 !       for (i = 0; i < ap->dl_count; i++) {
1753 !               if ((strcmp(ip->dl_module_id_1, device) == 0 ||
1754 !                    strcmp(ip->dl_module_id_2, device) == 0) &&
1755 !                   ip->dl_instance_num == unit)
1756 !                       break;
1757   
1758 !               ip = (dl_hp_ppa_info_t *)((u_char *)ipstart + ip->dl_next_offset);
1759 !       }
1760 ! #else
1761 !       /*
1762 !        * We don't have that member, so the search is impossible; make it
1763 !        * look as if the search failed.
1764 !        */
1765 !       i = ap->dl_count;
1766 ! #endif
1767
1768 !       if (i == ap->dl_count) {
1769 !               /*
1770 !                * Well, we didn't, or can't, find the device by name.
1771 !                *
1772 !                * HP-UX 10.20, whilst it has "dl_module_id_1" and
1773 !                * "dl_module_id_2" fields in the "dl_hp_ppa_info_t",
1774 !                * doesn't seem to fill them in unless the system is
1775 !                * at a reasonably up-to-date patch level.
1776 !                *
1777 !                * Older HP-UX 10.x systems might not have those fields
1778 !                * at all.
1779 !                *
1780 !                * Therefore, we'll search for the entry with the major
1781 !                * device number of a device with the name "/dev/<dev><unit>",
1782 !                * if such a device exists, as the old code did.
1783 !                */
1784 !               sprintf(dname, "/dev/%s%d", device, unit);
1785 !               if (stat(dname, &statbuf) < 0) {
1786 !                       sprintf(ebuf, "stat: %s: %s", dname, pcap_strerror(errno));
1787 !                       return (-1);
1788 !               }
1789 !               majdev = major(statbuf.st_rdev);
1790
1791 !               ip = ipstart;
1792
1793 !               for (i = 0; i < ap->dl_count; i++) {
1794 !                       if (ip->dl_mjr_num == majdev &&
1795 !                           ip->dl_instance_num == unit)
1796 !                               break;
1797
1798 !                       ip = (dl_hp_ppa_info_t *)((u_char *)ipstart + ip->dl_next_offset);
1799 !               }
1800 !       }
1801           if (i == ap->dl_count) {
1802 !                 sprintf(ebuf, "can't find /dev/dlpi PPA for %s%d", device, unit);
1803                 return (-1);
1804           }
1805           if (ip->dl_hdw_state == HDW_DEAD) {
1806 !                 sprintf(ebuf, "%s%d: hardware state: DOWN\n", device, unit);
1807                 return (-1);
1808           }
1809           return ((int)ip->dl_ppa);
1810 ***************
1811 *** 783,789 ****
1812         register int kd;
1813         void *addr;
1814         struct ifnet ifnet;
1815 !       char if_name[sizeof(ifnet.if_name)], tifname[32];
1816   
1817         cp = strrchr(ifname, '/');
1818         if (cp != NULL)
1819 --- 910,916 ----
1820         register int kd;
1821         void *addr;
1822         struct ifnet ifnet;
1823 !       char if_name[sizeof(ifnet.if_name) + 1];
1824   
1825         cp = strrchr(ifname, '/');
1826         if (cp != NULL)
1827 ***************
1828 *** 811,823 ****
1829                 if (dlpi_kread(kd, (off_t)addr,
1830                     &ifnet, sizeof(ifnet), ebuf) < 0 ||
1831                     dlpi_kread(kd, (off_t)ifnet.if_name,
1832 !                   if_name, sizeof(if_name), ebuf) < 0) {
1833                         (void)close(kd);
1834                         return (-1);
1835                 }
1836 !               sprintf(tifname, "%.*s%d",
1837 !                   (int)sizeof(if_name), if_name, ifnet.if_unit);
1838 !               if (strcmp(tifname, ifname) == 0)
1839                         return (ifnet.if_index);
1840         }
1841   
1842 --- 938,949 ----
1843                 if (dlpi_kread(kd, (off_t)addr,
1844                     &ifnet, sizeof(ifnet), ebuf) < 0 ||
1845                     dlpi_kread(kd, (off_t)ifnet.if_name,
1846 !                   if_name, sizeof(ifnet.if_name), ebuf) < 0) {
1847                         (void)close(kd);
1848                         return (-1);
1849                 }
1850 !               if_name[sizeof(ifnet.if_name)] = '\0';
1851 !               if (strcmp(if_name, ifname) == 0 && ifnet.if_unit == unit)
1852                         return (ifnet.if_index);
1853         }
1854