Put the contents of each CIC range parameter in a REG_REQ in its own tree
[obnox/wireshark/wip.git] / configure.in
index 3a72f3163cd1735fd50b30756055f616466dc214..33f77298e228b9776395e37476453814f519cdcb 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 #
-AC_PREREQ(2.52)
+AC_PREREQ(2.60)
 
 dnl Check for CPU / vendor / OS
 dnl The user is encouraged to use either `AC_CANONICAL_BUILD', or
@@ -12,13 +12,14 @@ dnl AC_CANONICAL_HOST
 dnl AC_CANONICAL_BUILD
 dnl AC_CANONICAL_TARGET
 
-AC_INIT(wireshark, 1.0.99)
+AC_INIT(wireshark, 1.1.2)
 AM_INIT_AUTOMAKE([1.9 tar-ustar])
 
 AM_DISABLE_STATIC
 
 dnl Checks for programs.
 AC_PROG_CC
+AM_PROG_CC_C_O
 AC_PROG_CPP
 dnl Work around libtool bug (fixed in the version 1.5a?)
 AC_DEFUN([AC_PROVIDE_AC_LIBTOOL_DLOPEN], )
@@ -447,6 +448,30 @@ darwin*)
 esac
 AC_SUBST(FRAMEWORKS)
 
+#
+# If using $prefix we add "$prefix/include" to the include search path
+# and "$prefix/lib" to the library search path.
+#
+if test "x$prefix" != "x" ; then
+       AC_MSG_CHECKING(whether to use $prefix for headers and libraries)
+       if test -d $prefix/include ; then
+               AC_MSG_RESULT(yes)
+               #
+               # Arrange that we search for header files in "$prefix/include", as
+               # various packages we use may have been installed under "$prefix/include".
+               #
+               CFLAGS="$CFLAGS -I$prefix/include"
+               CPPFLAGS="$CPPFLAGS -I$prefix/include"
+
+               #
+               # Arrange that we search for libraries in "$prefix/lib".
+               #
+               AC_WIRESHARK_ADD_DASH_L(LDFLAGS, $prefix/lib)
+       else
+               AC_MSG_RESULT(no)
+       fi
+fi
+
 dnl Look in /usr/local for header files and libraries ?
 dnl XXX FIXME don't include /usr/local if it is already in the system
 dnl search path as this causes gcc 3.2 on Linux to complain about a change
@@ -604,7 +629,7 @@ if test "$GTK_OK" = "no" ; then
        wireshark_bin=""
        wireshark_man=""
        # Honor GLIB_CFLAGS
-       AM_PATH_GLIB_2_0(2.4.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib 2.0 or later distribution not found.), gmodule)
+       AM_PATH_GLIB_2_0(2.4.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib 2.4 or later distribution not found.), gmodule)
 
 else
        wireshark_bin="wireshark\$(EXEEXT)"
@@ -650,6 +675,30 @@ else
   have_plugins=no
 fi
 
+dnl IGE Mac integration check
+AC_MSG_CHECKING(whether to use IGE Mac integration functions)
+
+AC_ARG_WITH(ige-mac-integration,
+  AC_HELP_STRING( [--with-ige-mac-integration],
+                  [use IGE Mac integration. (@<:@default=yes, if supported in GTK+@:>@]),
+[
+    if test $withval = no
+    then
+        want_ige_mac_integration=no
+    else
+        want_ige_mac_integration=yes
+    fi
+],[
+    want_ige_mac_integration=yes
+])
+if test "x$want_ige_mac_integration" = "xno" -o "x$no_gtk" = "xyes" ; then
+    AC_MSG_RESULT(no)
+else
+    AC_MSG_RESULT(yes)
+    AC_WIRESHARK_IGE_MAC_INTEGRATION_CHECK
+fi
+
+
 AC_SUBST(wireshark_bin)
 AC_SUBST(wireshark_man)
 
@@ -1129,9 +1178,6 @@ AC_CHECK_HEADERS(sys/ioctl.h sys/param.h sys/socket.h sys/sockio.h sys/stat.h sy
 AC_CHECK_HEADERS(netinet/in.h)
 AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h)
 
-dnl iconv check
-AM_ICONV
-
 dnl SSL Check
 SSL_LIBS=''
 AC_MSG_CHECKING(whether to use SSL library)
@@ -1197,6 +1243,31 @@ else
 fi
 
 
+dnl c-ares Check
+C_ARES_LIBS=''
+AC_MSG_CHECKING(whether to use the c-ares library if available)
+
+AC_ARG_WITH(c-ares,
+  AC_HELP_STRING( [--with-c-ares@<:@=DIR@:>@],
+                  [use c-ares (located in directory DIR, if supplied). Supersedes --with-adns.   @<:@default=yes, if present@:>@]),
+[
+if   test "x$withval" = "xno";  then
+       want_c_ares=no
+elif test "x$withval" = "xyes"; then
+       want_c_ares=yes
+elif test -d "$withval"; then
+       want_c_ares=yes
+       AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
+fi
+])
+if test "x$want_c_ares" = "xno" ; then
+       AC_MSG_RESULT(no)
+else
+       AC_MSG_RESULT(yes)
+       AC_WIRESHARK_C_ARES_CHECK
+fi
+AC_SUBST(C_ARES_LIBS)
+
 dnl ADNS Check
 ADNS_LIBS=''
 AC_MSG_CHECKING(whether to use the GNU ADNS library if available)
@@ -1214,7 +1285,7 @@ elif test -d "$withval"; then
        AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
 fi
 ])
-if test "x$with_adns" = "xno" ; then
+if test "x$want_adns" = "xno" -o "x$have_good_c_ares" = "xyes" ; then
        AC_MSG_RESULT(no)
 else
        AC_MSG_RESULT(yes)
@@ -1300,17 +1371,23 @@ fi
 AC_SUBST(MKSTEMP_C)
 AC_SUBST(MKSTEMP_O)
 
-AC_CHECK_FUNC(inet_aton,
-  [INET_ATON_O=""
-   INET_ATON_LO=""],
-  [INET_ATON_O="inet_aton.o"
-   INET_ATON_LO="inet_aton.lo"
-])
-if test "$ac_cv_func_inet_aton" = no ; then
+#
+# XXX - if inet_aton isn't found, the build fails, with a complaint from
+# libtool about inet_aton.lo not being a valid libtool object.  We
+# probably have to handle it - and all the other replacement functions that
+# get built into libwireshark - differently.
+#
+AC_SEARCH_LIBS(inet_aton, [socket nsl], have_inet_aton=yes,
+    have_inet_aton=no)
+if test "$have_inet_aton" = no; then
   INET_ATON_C="inet_aton.c"
   INET_ATON_O="inet_aton.o"
   INET_ATON_LO="inet_aton.lo"
   AC_DEFINE(NEED_INET_ATON_H, 1, [Define if inet/aton.h needs to be included])
+else
+  INET_ATON_C=""
+  INET_ATON_O=""
+  INET_ATON_LO=""
 fi
 AC_SUBST(INET_ATON_C)
 AC_SUBST(INET_ATON_O)
@@ -1476,6 +1553,7 @@ AC_OUTPUT(
   asn1/ess/Makefile
   asn1/ftam/Makefile
   asn1/gnm/Makefile
+  asn1/goose/Makefile
   asn1/gsmmap/Makefile
   asn1/h225/Makefile
   asn1/h235/Makefile
@@ -1642,6 +1720,12 @@ else
        krb5_message="yes ($ac_krb5_version)"
 fi
 
+if test "x$have_good_c_ares" = "xyes" ; then
+       c_ares_message="yes"
+else
+       c_ares_message="no"
+fi
+
 if test "x$have_good_adns" = "xyes" ; then
        adns_message="yes"
 else
@@ -1678,6 +1762,7 @@ echo "                   Use pcap library : $want_pcap"
 echo "                   Use zlib library : $zlib_message"
 echo "                   Use pcre library : $pcre_message"
 echo "               Use kerberos library : $krb5_message"
+echo "                 Use c-ares library : $c_ares_message"
 echo "               Use GNU ADNS library : $adns_message"
 echo "                Use SMI MIB library : $libsmi_message"
 echo "             Use GNU crypto library : $gcrypt_message"