1 # $Id: configure.in,v 1.42 1999/09/01 22:59:48 guy Exp $
2 dnl Process this file with autoconf to produce a configure script.
5 AM_INIT_AUTOMAKE(ethereal, 0.7.3)
7 dnl Check for CPU / vendor / OS
10 dnl Checks for programs.
16 AC_PATH_PROG(PERL_PATH, perl)
17 AC_PATH_PROG(LEX, flex)
23 # If we're running gcc, add '-Wall' to CFLAGS.
24 AC_MSG_CHECKING(to see if we can add '-Wall' to CFLAGS)
25 if test x$GCC != x ; then
26 CFLAGS="-Wall $CFLAGS"
32 CFLAGS="$CFLAGS -Iwiretap"
34 # Create DATAFILE_DIR #define for config.h
35 DATAFILE_DIR=$sysconfdir
37 test "x$prefix" = xNONE && prefix=$ac_default_prefix
38 test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
39 eval echo "$DATAFILE_DIR"
41 AC_DEFINE_UNQUOTED(DATAFILE_DIR,"$DATAFILE_DIR")
42 AC_SUBST(DATAFILE_DIR)
44 # If we're running Solaris, and LD_LIBRARY_PATH is defined, add it as a
48 AC_MSG_CHECKING(for LD_LIBRARY_PATH, since you appear to be running Solaris)
49 if test x$LD_LIBRARY_PATH != x ; then
50 LIBS="$LIBS -R$LD_LIBRARY_PATH"
51 AC_MSG_RESULT(yes -- added LD_LIBRARY_PATH to run-time linker path)
53 AC_MSG_RESULT(no -- this may be a problem in a few seconds)
59 AM_PATH_GTK(1.2.0, CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS",
60 AC_MSG_ERROR(GTK+ distribution not found.))
64 [ --enable-pcap use libpcap for packet capturing. [default=yes]],,enable_pcap=yes)
66 AC_MSG_CHECKING(whether to use libpcap for packet capture)
67 if test "x$enable_pcap" = "xno" ; then
71 AC_ETHEREAL_PCAP_CHECK
76 [ --enable-ipv6 use ipv6 name resolution, if available. [default=yes]],,enable_ipv6=yes)
78 AC_MSG_CHECKING(whether to enable ipv6 name resolution if available)
79 if test "x$enable_ipv6" = "xno" ; then
83 AC_ETHEREAL_IPV6_STACK
87 dnl Checks for header files.
89 AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h stdarg.h netdb.h)
90 AC_CHECK_HEADERS(sys/stat.h sys/sockio.h sys/types.h netinet/in.h sys/socket.h net/if.h)
94 [ --enable-snmp use SNMP library, if available. [default=yes]],,enable_snmp=yes)
98 AC_MSG_CHECKING(whether to use SNMP library if available)
99 if test "x$enable_snmp" = "xno" ; then
103 AC_ETHEREAL_UCDSNMP_CHECK
104 AC_CHECK_HEADERS(ucd-snmp/snmp.h snmp/snmp.h)
105 AC_CHECK_LIB(snmp, asn_parse_header,
114 dnl Checks for typedefs, structures, and compiler characteristics.
117 # We need to know whether "struct sockaddr" has an "sa_len" member
118 # for get_interface_list().
120 AC_ETHEREAL_STRUCT_SA_LEN
122 # We must know our byte order
125 dnl Checks for library functions.
126 AC_PROG_GCC_TRADITIONAL
127 AC_CHECK_FUNC(socket,, AC_MSG_ERROR(Function 'socket' not found.))
129 # If there's a system out there that has snprintf and _doesn't_ have vsnprintf,
130 # then this won't work.
133 AC_CHECK_FUNC(snprintf, SNPRINTF_O="",
134 SNPRINTF_O="snprintf.o" [AC_DEFINE(NEED_SNPRINTF_H)])
135 if test "$ac_cv_func_snprintf" = no ; then
136 SNPRINTF_C="snprintf.c"
137 SNPRINTF_O="snprintf.o"
142 AC_CHECK_FUNC(strerror, STRERROR_O="",
143 STRERROR_O="strerror.o" [AC_DEFINE(NEED_STRERROR_H)])
144 if test "$ac_cv_func_strerror" = no ; then
145 STRERROR_C="strerror.c"
146 STRERROR_O="strerror.o"
151 dnl blank for now, but will be used in future
154 AM_CONFIG_HEADER(config.h)
155 AC_CONFIG_SUBDIRS(wiretap)
156 AC_OUTPUT(Makefile ethereal.spec doc/Makefile doc/dfilter2pod gtk/Makefile,
157 [chmod +x doc/dfilter2pod])