]> The Tcpdump Group git mirrors - libpcap/blob - configure.in
From Patrick Marie <[email protected]>: add support for port ranges
[libpcap] / configure.in
1 dnl @(#) $Header: /tcpdump/master/libpcap/configure.in,v 1.122 2005-04-19 00:49:37 guy Exp $ (LBL)
2 dnl
3 dnl Copyright (c) 1994, 1995, 1996, 1997
4 dnl The Regents of the University of California. All rights reserved.
5 dnl
6 dnl Process this file with autoconf to produce a configure script.
7 dnl
8
9 AC_REVISION($Revision: 1.122 $)
10 AC_PREREQ(2.50)
11 AC_INIT(pcap.c)
12
13 AC_CANONICAL_SYSTEM
14
15 AC_LBL_C_INIT(V_CCOPT, V_INCLS, V_LIBS)
16 AC_LBL_C_INLINE
17 AC_C___ATTRIBUTE__
18
19 AC_LBL_CHECK_TYPE(u_int8_t, u_char)
20 AC_LBL_CHECK_TYPE(u_int16_t, u_short)
21 AC_LBL_CHECK_TYPE(u_int32_t, u_int)
22
23 dnl
24 dnl libpcap doesn't itself use <sys/ioccom.h>; however, the test program
25 dnl in "AC_LBL_FIXINCLUDES" in "aclocal.m4" uses it, so we have to
26 dnl test for it and set "HAVE_SYS_IOCCOM_H" if we have it, otherwise
27 dnl "AC_LBL_FIXINCLUDES" won't work on some platforms such as Solaris.
28 dnl
29 AC_CHECK_HEADERS(sys/ioccom.h sys/sockio.h limits.h)
30 AC_CHECK_HEADERS(netinet/if_ether.h, , , [#include <sys/types.h>
31 #include <sys/socket.h>])
32 if test "$ac_cv_header_netinet_if_ether_h" != yes; then
33 #
34 # The simple test didn't work.
35 # Do we need to include <net/if.h> first?
36 # Unset ac_cv_header_netinet_if_ether_h so we don't
37 # treat the previous failure as a cached value and
38 # suppress the next test.
39 #
40 AC_MSG_NOTICE([Rechecking with some additional includes])
41 unset ac_cv_header_netinet_if_ether_h
42 AC_CHECK_HEADERS(netinet/if_ether.h, , , [#include <sys/types.h>
43 #include <sys/socket.h>
44 #include <netinet/in.h>
45 struct mbuf;
46 struct rtentry;
47 #include <net/if.h>])
48 fi
49
50 AC_LBL_FIXINCLUDES
51
52 AC_CHECK_FUNCS(strerror strlcpy)
53
54 needsnprintf=no
55 AC_CHECK_FUNCS(vsnprintf snprintf,,
56 [needsnprintf=yes])
57 if test $needsnprintf = yes; then
58 AC_LIBOBJ(snprintf)
59 fi
60
61 #
62 # Do this before checking for ether_hostton(), as it's a
63 # "gethostbyname() -ish function".
64 #
65 AC_LBL_LIBRARY_NET
66
67 #
68 # You are in a twisty little maze of UN*Xes, all different.
69 # Some might not have ether_hostton().
70 # Some might have it, but not declare it in any header file.
71 # Some might have it, but declare it in <netinet/if_ether.h>.
72 # Some might have it, but declare it in <netinet/ether.h>
73 # (And some might have it but document it as something declared in
74 # <netinet/ethernet.h>, although <netinet/if_ether.h> appears to work.)
75 #
76 # Before you is a C compiler.
77 #
78 AC_CHECK_FUNCS(ether_hostton)
79 if test "$ac_cv_func_ether_hostton" = yes; then
80 #
81 # OK, we have ether_hostton(). Do we have <netinet/if_ether.h>?
82 #
83 if test "$ac_cv_header_netinet_if_ether_h" = yes; then
84 #
85 # Yes. Does it declare ether_hostton()?
86 #
87 AC_CHECK_DECLS(ether_hostton,
88 [
89 AC_DEFINE(NETINET_IF_ETHER_H_DECLARES_ETHER_HOSTTON,,
90 [Define to 1 if netinet/if_ether.h declares `ether_hostton'])
91 ],,
92 [
93 #include <sys/types.h>
94 #include <sys/socket.h>
95 #include <netinet/in.h>
96 #include <arpa/inet.h>
97 struct mbuf;
98 struct rtentry;
99 #include <net/if.h>
100 #include <netinet/if_ether.h>
101 ])
102 fi
103 #
104 # Did that succeed?
105 #
106 if test "$ac_cv_have_decl_ether_hostton" != yes; then
107 #
108 # No, how about <netinet/ether.h>, as on Linux?
109 #
110 AC_CHECK_HEADERS(netinet/ether.h)
111 if test "$ac_cv_header_netinet_ether_h" = yes; then
112 #
113 # We have it - does it declare ether_hostton()?
114 # Unset ac_cv_have_decl_ether_hostton so we don't
115 # treat the previous failure as a cached value and
116 # suppress the next test.
117 #
118 unset ac_cv_have_decl_ether_hostton
119 AC_CHECK_DECLS(ether_hostton,
120 [
121 AC_DEFINE(NETINET_ETHER_H_DECLARES_ETHER_HOSTTON,,
122 [Define to 1 if netinet/ether.h declares `ether_hostton'])
123 ],,
124 [
125 #include <netinet/ether.h>
126 ])
127 fi
128 fi
129 fi
130
131 dnl to pacify those who hate protochain insn
132 AC_MSG_CHECKING(if --disable-protochain option is specified)
133 AC_ARG_ENABLE(protochain, [ --disable-protochain disable \"protochain\" insn])
134 case "x$enable_protochain" in
135 xyes) enable_protochain=enabled ;;
136 xno) enable_protochain=disabled ;;
137 x) enable_protochain=enabled ;;
138 esac
139
140 if test "$enable_protochain" = "disabled"; then
141 AC_DEFINE(NO_PROTOCHAIN,1,[do not use protochain])
142 fi
143 AC_MSG_RESULT(${enable_protochain})
144
145 dnl
146 dnl Not all versions of test support -c (character special) but it's a
147 dnl better way of testing since the device might be protected. So we
148 dnl check in our normal order using -r and then check the for the /dev
149 dnl guys again using -c.
150 dnl
151 dnl XXX This could be done for cross-compiling, but for now it's not.
152 dnl
153 if test -z "$with_pcap" && test "$cross_compiling" = yes; then
154 AC_MSG_ERROR(pcap type not determined when cross-compiling; use --with-pcap=...)
155 fi
156 AC_ARG_WITH(pcap, [ --with-pcap=TYPE use packet capture TYPE])
157 AC_MSG_CHECKING(packet capture type)
158 if test ! -z "$with_pcap" ; then
159 V_PCAP="$withval"
160 elif test -r /dev/bpf0 ; then
161 V_PCAP=bpf
162 elif test -r /usr/include/net/pfilt.h ; then
163 V_PCAP=pf
164 elif test -r /dev/enet ; then
165 V_PCAP=enet
166 elif test -r /dev/nit ; then
167 V_PCAP=snit
168 elif test -r /usr/include/sys/net/nit.h ; then
169 V_PCAP=nit
170 elif test -r /usr/include/linux/socket.h ; then
171 V_PCAP=linux
172 elif test -r /usr/include/net/raw.h ; then
173 V_PCAP=snoop
174 elif test -r /usr/include/odmi.h ; then
175 #
176 # On AIX, the BPF devices might not yet be present - they're
177 # created the first time libpcap runs after booting.
178 # We check for odmi.h instead.
179 #
180 V_PCAP=bpf
181 elif test -r /usr/include/sys/dlpi.h ; then
182 V_PCAP=dlpi
183 elif test -c /dev/bpf0 ; then # check again in case not readable
184 V_PCAP=bpf
185 elif test -c /dev/enet ; then # check again in case not readable
186 V_PCAP=enet
187 elif test -c /dev/nit ; then # check again in case not readable
188 V_PCAP=snit
189 else
190 V_PCAP=null
191 fi
192 AC_MSG_RESULT($V_PCAP)
193
194 dnl
195 dnl Now figure out how we get a list of interfaces and addresses,
196 dnl if we support capturing. Don't bother if we don't support
197 dnl capturing.
198 dnl
199 if test "$V_PCAP" = null
200 then
201 #
202 # We can't capture, so we can't open any capture
203 # devices, so we won't return any interfaces.
204 #
205 V_FINDALLDEVS=null
206 else
207 AC_CHECK_FUNC(getifaddrs,[
208 #
209 # We have "getifaddrs()"; make sure we have <ifaddrs.h>
210 # as well, just in case some platform is really weird.
211 #
212 AC_CHECK_HEADER(ifaddrs.h,[
213 #
214 # We have the header, so we use "getifaddrs()" to
215 # get the list of interfaces.
216 #
217 V_FINDALLDEVS=getad
218 ],[
219 #
220 # We don't have the header - give up.
221 # XXX - we could also fall back on some other
222 # mechanism, but, for now, this'll catch this
223 # problem so that we can at least try to figure
224 # out something to do on systems with "getifaddrs()"
225 # but without "ifaddrs.h", if there is something
226 # we can do on those systems.
227 #
228 AC_MSG_ERROR([Your system has getifaddrs() but doesn't have a usable <ifaddrs.h>.])
229 ])
230 ],[
231 #
232 # Well, we don't have "getifaddrs()", so we have to use
233 # some other mechanism; determine what that mechanism is.
234 #
235 # The first thing we use is the type of capture mechanism,
236 # which is somewhat of a proxy for the OS we're using.
237 #
238 case "$V_PCAP" in
239
240 dlpi)
241 #
242 # This might be Solaris 8 or later, with
243 # SIOCGLIFCONF, or it might be some other OS
244 # or some older version of Solaris, with
245 # just SIOCGIFCONF.
246 #
247 AC_MSG_CHECKING(whether we have SIOCGLIFCONF)
248 AC_CACHE_VAL(ac_cv_lbl_have_siocglifconf,
249 AC_TRY_COMPILE(
250 [#include <sys/param.h>
251 #include <sys/file.h>
252 #include <sys/ioctl.h>
253 #include <sys/socket.h>
254 #include <sys/sockio.h>],
255 [ioctl(0, SIOCGLIFCONF, (char *)0);],
256 ac_cv_lbl_have_siocglifconf=yes,
257 ac_cv_lbl_have_siocglifconf=no))
258 AC_MSG_RESULT($ac_cv_lbl_have_siocglifconf)
259 if test $ac_cv_lbl_have_siocglifconf = yes ; then
260 V_FINDALLDEVS=glifc
261 else
262 V_FINDALLDEVS=gifc
263 fi
264 ;;
265
266 *)
267 #
268 # Assume we just have SIOCGIFCONF.
269 # (XXX - on at least later Linux kernels, there's
270 # another mechanism, and we should be using that
271 # instead.)
272 #
273 V_FINDALLDEVS=gifc
274 ;;
275 esac])
276 fi
277
278 AC_MSG_CHECKING(if --enable-ipv6 option is specified)
279 AC_ARG_ENABLE(ipv6, [ --enable-ipv6 build IPv6-capable version])
280 if test "$enable_ipv6" = "yes"; then
281 AC_DEFINE(INET6,1,[IPv6])
282 fi
283 AC_MSG_RESULT(${enable_ipv6-no})
284
285 AC_MSG_CHECKING(whether to build optimizer debugging code)
286 AC_ARG_ENABLE(optimizer-dbg, [ --enable-optimizer-dbg build optimizer debugging code])
287 if test "$enable_optimizer_dbg" = "yes"; then
288 AC_DEFINE(BDEBUG,1,[Enable optimizer debugging])
289 fi
290 AC_MSG_RESULT(${enable_optimizer_dbg-no})
291
292 AC_MSG_CHECKING(whether to build parser debugging code)
293 AC_ARG_ENABLE(yydebug, [ --enable-yydebug build parser debugging code])
294 if test "$enable_yydebug" = "yes"; then
295 AC_DEFINE(YYDEBUG,1,[Enable parser debugging])
296 fi
297 AC_MSG_RESULT(${enable_yydebug-no})
298
299 case "$V_PCAP" in
300
301 dlpi)
302 AC_CHECK_HEADERS(sys/bufmod.h sys/dlpi_ext.h)
303 AC_MSG_CHECKING(for /dev/dlpi device)
304 if test -c /dev/dlpi ; then
305 AC_MSG_RESULT(yes)
306 AC_DEFINE(HAVE_DEV_DLPI, 1, [define if you have a /dev/dlpi])
307 else
308 AC_MSG_RESULT(no)
309 dir="/dev/dlpi"
310 AC_MSG_CHECKING(for $dir directory)
311 if test -d $dir ; then
312 AC_MSG_RESULT(yes)
313 AC_DEFINE_UNQUOTED(PCAP_DEV_PREFIX, "$dir", [/dev/dlpi directory])
314 else
315 AC_MSG_RESULT(no)
316 fi
317 fi
318 ;;
319
320 linux)
321 AC_MSG_CHECKING(Linux kernel version)
322 if test "$cross_compiling" = yes; then
323 AC_CACHE_VAL(ac_cv_linux_vers,
324 ac_cv_linux_vers=unknown)
325 else
326 AC_CACHE_VAL(ac_cv_linux_vers,
327 ac_cv_linux_vers=`uname -r 2>&1 | \
328 sed -n -e '$s/.* //' -e '$s/\..*//p'`)
329 fi
330 AC_MSG_RESULT($ac_cv_linux_vers)
331 if test $ac_cv_linux_vers = unknown ; then
332 AC_MSG_ERROR(cannot determine linux version when cross-compiling)
333 fi
334 if test $ac_cv_linux_vers -lt 2 ; then
335 AC_MSG_ERROR(version 2 or higher required; see the INSTALL doc for more info)
336 fi
337 AC_LBL_TPACKET_STATS
338 ;;
339
340 dag)
341 V_DEFS="$V_DEFS -DDAG_ONLY"
342 ;;
343
344 null)
345 AC_MSG_WARN(cannot determine packet capture interface)
346 AC_MSG_WARN((see the INSTALL doc for more info))
347 ;;
348
349 esac
350
351 AC_MSG_CHECKING(whether we have /proc/net/dev)
352 if test -r /proc/net/dev ; then
353 ac_cv_lbl_proc_net_dev=yes
354 else
355 ac_cv_lbl_proc_net_dev=no
356 fi
357 if test $ac_cv_lbl_proc_net_dev = yes; then
358 AC_DEFINE(HAVE_PROC_NET_DEV, 1, [define if you have a /proc/net/dev])
359 fi
360 AC_MSG_RESULT($ac_cv_lbl_proc_net_dev)
361
362 # Check for Endace DAG card support.
363 AC_ARG_WITH([dag], [ --with-dag[[=DIR]] include Endace DAG support ("yes", "no" or DIR; default="yes" on BSD and Linux if present)],
364 [
365 if test "$withval" = no
366 then
367 # User doesn't want DAG support.
368 want_dag=no
369 elif test "$withval" = yes
370 then
371 # User wants DAG support but hasn't specified a directory.
372 want_dag=yes
373 else
374 # User wants DAG support and has specified a directory, so use the provided value.
375 want_dag=yes
376 dag_root=$withval
377 fi
378 ],[
379 #
380 # Use DAG API if present, otherwise don't
381 #
382 want_dag=ifpresent
383 ])
384
385 AC_ARG_WITH([dag-includes], [ --with-dag-includes=DIR Endace DAG include directory],
386 [
387 # User wants DAG support and has specified a header directory, so use the provided value.
388 want_dag=yes
389 dag_include_dir=$withval
390 ],[])
391
392 AC_ARG_WITH([dag-libraries], [ --with-dag-libraries=DIR Endace DAG library directory],
393 [
394 # User wants DAG support and has specified a library directory, so use the provided value.
395 want_dag=yes
396 dag_lib_dir=$withval
397 ],[])
398
399 case "$V_PCAP" in
400 linux|bpf|dag)
401 #
402 # We support the DAG API on Linux or BSD, or if we're building a
403 # DAG-only libpcap.
404 #
405 ;;
406 *)
407 #
408 # If the user explicitly requested DAG, tell them it's not
409 # supported.
410 #
411 # If they expressed no preference, don't include it.
412 #
413 if test $want_dag = yes; then
414 AC_MSG_ERROR([DAG support is only available with 'linux' 'bpf' and 'dag' packet capture types])
415 elif test $want_dag = yes; then
416 want_dag=no
417 fi
418 ;;
419 esac
420
421 ac_cv_lbl_dag_api=no
422 if test "$want_dag" != no; then
423
424 AC_MSG_CHECKING([whether we have DAG API headers])
425
426 # If necessary, set default paths for DAG API headers and libraries.
427 if test -z "$dag_root"; then
428 dag_root=/usr/local
429 fi
430
431 if test -z "$dag_include_dir"; then
432 dag_include_dir="$dag_root/include"
433 fi
434
435 if test -z "$dag_lib_dir"; then
436 dag_lib_dir="$dag_root/lib"
437 fi
438
439 if test -z "$dag_tools_dir"; then
440 dag_tools_dir="$dag_root/tools"
441 fi
442
443 if test -r $dag_include_dir/dagapi.h; then
444 ac_cv_lbl_dag_api=yes
445 fi
446 AC_MSG_RESULT([$ac_cv_lbl_dag_api ($dag_include_dir)])
447 fi
448
449 if test $ac_cv_lbl_dag_api = yes; then
450
451 AC_MSG_CHECKING([dagapi.o])
452 dagapi_obj=no
453 if test -r $dag_tools_dir/dagapi.o; then
454
455 # 2.4.x.
456 dagapi_obj=$dag_tools_dir/dagapi.o
457
458 elif test -r $dag_lib_dir/dagapi.o; then
459
460 # 2.5.x.
461 dagapi_obj=$dag_lib_dir/dagapi.o
462
463 elif test -r $dag_lib_dir/libdag.a; then
464
465 # 2.5.x.
466 ar x $dag_lib_dir/libdag.a dagapi.o
467 if test -r ./dagapi.o; then
468 dagapi_obj=./dagapi.o
469 fi
470 fi
471
472 if test $dagapi_obj = no; then
473 AC_MSG_RESULT([no (checked $dag_lib_dir $dag_tools_dir $dag_lib_dir/libdag.a)])
474 ac_cv_lbl_dag_api=no
475 else
476 AC_MSG_RESULT([yes ($dagapi_obj)])
477 fi
478 fi
479
480 if test $ac_cv_lbl_dag_api = yes; then
481
482 AC_MSG_CHECKING([dagopts.o])
483 dagopts_obj=no
484 if test -r $dag_tools_dir/dagopts.o; then
485
486 # 2.4.x.
487 dagopts_obj=$dag_tools_dir/dagopts.o
488
489 elif test -r $dag_lib_dir/dagopts.o; then
490
491 # 2.5.x.
492 dagopts_obj=$dag_lib_dir/dagopts.o
493
494 elif test -r $dag_lib_dir/libdag.a; then
495
496 # 2.5.x.
497 ar x $dag_lib_dir/libdag.a dagopts.o
498 if test -r ./dagopts.o; then
499 dagopts_obj=./dagopts.o
500 fi
501 fi
502
503 if test $dagopts_obj = no; then
504 AC_MSG_RESULT([no (checked $dag_lib_dir $dag_tools_dir $dag_lib_dir/libdag.a)])
505 ac_cv_lbl_dag_api=no
506 else
507 AC_MSG_RESULT([yes ($dagopts_obj)])
508 fi
509 fi
510
511 if test $ac_cv_lbl_dag_api = yes; then
512
513 # Under 2.5.x only we need to add dagreg.o.
514 if test -r $dag_include_dir/dagreg.h; then
515
516 AC_MSG_CHECKING([dagreg.o])
517 dagreg_obj=no
518 if test -r $dag_lib_dir/dagreg.o; then
519
520 # Object file is ready and waiting.
521 dagreg_obj=$dag_lib_dir/dagreg.o
522
523 elif test -r $dag_lib_dir/libdag.a; then
524
525 # Extract from libdag.a.
526 ar x $dag_lib_dir/libdag.a dagreg.o
527 if test -r ./dagreg.o; then
528 dagreg_obj=./dagreg.o
529 fi
530 fi
531
532 if test $dagreg_obj = no; then
533 AC_MSG_RESULT([no (checked $dag_lib_dir $dag_lib_dir/libdag.a)])
534 ac_cv_lbl_dag_api=no
535 else
536 AC_MSG_RESULT([yes ($dagreg_obj)])
537 fi
538 fi
539 fi
540
541 if test $ac_cv_lbl_dag_api = yes; then
542
543 V_INCLS="$V_INCLS -I$dag_include_dir"
544 V_LIBS="$V_LIBS $dagapi_obj $dagopts_obj $dagreg_obj"
545 if test $V_PCAP != dag ; then
546 SSRC="pcap-dag.c"
547 fi
548
549 # See if we can find a general version string.
550 # Don't need to save and restore LIBS to prevent -ldag being included if there's a found-action (arg 3).
551 saved_ldflags=$LDFLAGS
552 LDFLAGS="-L$dag_lib_dir"
553 AC_CHECK_LIB([dag], [dag_attach_stream], [dag_version="2.5.x"], [dag_version="2.4.x"])
554 LDFLAGS=$saved_ldflags
555
556 # See if we can find a specific version string.
557 AC_MSG_CHECKING([the DAG API version])
558 if test -r "$dag_root/VERSION"; then
559 dag_version="`cat $dag_root/VERSION`"
560 fi
561 AC_MSG_RESULT([$dag_version])
562 AC_DEFINE(HAVE_DAG_API, 1, [define if you have the DAG API])
563 fi
564
565 if test $ac_cv_lbl_dag_api = no; then
566 if test "$want_dag" = yes; then
567 # User wanted DAG support but we couldn't find it.
568 AC_MSG_ERROR([DAG API requested, but not found at $dag_root: use --without-dag])
569 fi
570
571 if test "$V_PCAP" = dag; then
572 # User requested "dag" capture type but the DAG API wasn't found.
573 AC_MSG_ERROR([Specifying the capture type as "dag" requires the DAG API to be present; use the --with-dag options to specify the location. (Try "./configure --help" for more information.)])
574 fi
575 fi
576
577
578 AC_LBL_LEX_AND_YACC(V_LEX, V_YACC, pcap_)
579 if test "$V_LEX" = lex ; then
580 # Some versions of lex can't handle the definitions section of scanner.l .
581 # Try lexing it and complain if it can't deal.
582 AC_CACHE_CHECK([for capable lex], tcpdump_cv_capable_lex,
583 if lex -t scanner.l > /dev/null 2>&1; then
584 tcpdump_cv_capable_lex=yes
585 else
586 tcpdump_cv_capable_lex=insufficient
587 fi)
588 if test $tcpdump_cv_capable_lex = insufficient ; then
589 AC_MSG_ERROR([Your operating system's lex is insufficient to compile
590 libpcap. flex is a lex replacement that has many advantages, including
591 being able to compile libpcap. For more information, see
592 http://www.gnu.org/software/flex/flex.html .])
593 fi
594 fi
595
596 DYEXT="so"
597 case "$host_os" in
598
599 aix*)
600 dnl Workaround to enable certain features
601 AC_DEFINE(_SUN,1,[define on AIX to get certain functions])
602 ;;
603
604 hpux9*)
605 AC_DEFINE(HAVE_HPUX9,1,[on HP-UX 9.x])
606 ;;
607
608 hpux10.0*)
609 ;;
610
611 hpux10.1*)
612 ;;
613
614 hpux*)
615 dnl HPUX 10.20 and above is similar to HPUX 9, but
616 dnl not the same....
617 dnl
618 dnl XXX - DYEXT should be set to "sl" if this is building
619 dnl for 32-bit PA-RISC, but should be left as "so" for
620 dnl 64-bit PA-RISC or, I suspect, IA-64.
621 AC_DEFINE(HAVE_HPUX10_20_OR_LATER,1,[on HP-UX 10.20 or later])
622 ;;
623
624 sinix*)
625 AC_MSG_CHECKING(if SINIX compiler defines sinix)
626 AC_CACHE_VAL(ac_cv_cc_sinix_defined,
627 AC_TRY_COMPILE(
628 [],
629 [int i = sinix;],
630 ac_cv_cc_sinix_defined=yes,
631 ac_cv_cc_sinix_defined=no))
632 AC_MSG_RESULT($ac_cv_cc_sinix_defined)
633 if test $ac_cv_cc_sinix_defined = no ; then
634 AC_DEFINE(sinix,1,[on sinix])
635 fi
636 ;;
637
638 solaris*)
639 AC_DEFINE(HAVE_SOLARIS,1,[On solaris])
640 ;;
641
642 darwin*)
643 DYEXT="dylib"
644 V_CCOPT="$V_CCOPT -fno-common"
645 ;;
646 esac
647
648 AC_PROG_RANLIB
649
650 AC_LBL_DEVEL(V_CCOPT)
651
652 AC_LBL_SOCKADDR_SA_LEN
653
654 AC_LBL_SOCKADDR_STORAGE
655
656 AC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1
657
658 AC_LBL_UNALIGNED_ACCESS
659
660 #
661 # Makefile.in includes rules to generate version.h, so we assume
662 # that it will be generated if autoconf is used.
663 #
664 AC_DEFINE(HAVE_VERSION_H, 1, [define if version.h is generated in the build procedure])
665
666 rm -f net
667 ln -s ${srcdir}/bpf/net net
668
669 AC_SUBST(V_CCOPT)
670 AC_SUBST(V_DEFS)
671 AC_SUBST(V_INCLS)
672 AC_SUBST(V_LIBS)
673 AC_SUBST(V_LEX)
674 AC_SUBST(V_PCAP)
675 AC_SUBST(V_FINDALLDEVS)
676 AC_SUBST(V_RANLIB)
677 AC_SUBST(V_YACC)
678 AC_SUBST(SSRC)
679 AC_SUBST(DYEXT)
680
681 AC_PROG_INSTALL
682
683 AC_CONFIG_HEADER(config.h)
684
685 AC_OUTPUT(Makefile)
686
687 if test -f .devel ; then
688 make depend
689 fi
690 exit 0