Fix missing comment
[obnox/wireshark/wip.git] / configure.in
index 47a713b0cd1737322b66f42fb64f56400b7e7c11..b9c8eafb14d409efb3eef1c2a8e851a5886d413e 100644 (file)
@@ -2,17 +2,28 @@
 #
 AC_PREREQ(2.60)
 
+AC_INIT(wireshark, 1.3.2)
+
 dnl Check for CPU / vendor / OS
 dnl The user is encouraged to use either `AC_CANONICAL_BUILD', or
 dnl `AC_CANONICAL_HOST', or `AC_CANONICAL_TARGET', depending on the
 dnl needs.  Using `AC_CANONICAL_TARGET' is enough to run the two other
 dnl macros.
+dnl
+dnl As nothing in the Wireshark is itself a build tool (we are not,
+dnl for example, a compiler that generates machine code), we probably
+dnl don't need AC_CANONICAL_TARGET, so, in theory, we should be able
+dnl to use AC_CANONICAL_BUILD and AC_CANONICAL_HOST - or perhaps just
+dnl AC_CANONICAL_HOST - instead.  Note that we do have tools, such as
+dnl lemon, that need to be built for the build machine, not for the
+dnl host machine, so we might need both.
+dnl
+dnl This has to be done *after* AC_INIT, otherwise autogen.sh fails.
 
-dnl AC_CANONICAL_HOST
 dnl AC_CANONICAL_BUILD
-dnl AC_CANONICAL_TARGET
+dnl AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
 
-AC_INIT(wireshark, 1.3.0)
 AM_INIT_AUTOMAKE([1.9 tar-ustar])
 
 AM_DISABLE_STATIC
@@ -244,6 +255,8 @@ AC_ARG_ENABLE(extra-gcc-checks,
                AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wpragmas)
                AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wredundant-decls)
                AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wvla)
+               AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wc++-compat)
+               AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wjump-misses-init)
                #
                # epan/dissectors/packet-ncp2222.inc blocks this one
                # for now.
@@ -272,6 +285,9 @@ AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wcast-align)
 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wformat-security)
 
 AC_WIRESHARK_GCC_LDFLAGS_CHECK([-Wl,--as-needed])
+# AC_WIRESHARK_GCC_LDFLAGS_CHECK([-flto])
+# AC_WIRESHARK_GCC_LDFLAGS_CHECK([-fwhopr])
+# AC_WIRESHARK_GCC_LDFLAGS_CHECK([-fwhole-program])
 
 #
 # If we're running gcc add '-D_U_="__attribute__((unused))"' to CFLAGS as well,
@@ -1421,13 +1437,15 @@ AC_PROG_GCC_TRADITIONAL
 
 GETOPT_C=""
 GETOPT_O=""
-AC_CHECK_FUNC(getopt, GETOPT_O="",
-  [GETOPT_O="getopt.o"
-   AC_DEFINE(NEED_GETOPT_H, 1, [Define if getopt.h needs to be included])
-])
+AC_CHECK_FUNC(getopt,
+  [GETOPT_O=""
+   AC_DEFINE(HAVE_GETOPT_H, 1, [Define to 1 if you have the <getopt.h> header file.])
+  ],
+  GETOPT_O="wsgetopt.o"
+)
 if test "$ac_cv_func_getopt" = no ; then
-  GETOPT_C="getopt.c"
-  GETOPT_O="getopt.o"
+  GETOPT_C="wsgetopt.c"
+  GETOPT_O="wsgetopt.o"
 fi
 AC_SUBST(GETOPT_C)
 AC_SUBST(GETOPT_O)
@@ -1613,6 +1631,18 @@ then
 fi
 AC_SUBST(ENABLE_STATIC)
 
+AC_ARG_ENABLE(new-packet-list,
+  AC_HELP_STRING( [--enable-new-packet-list],
+                  [use new packet list feature.  @<:@default=yes@:>@]),
+                  new_packet_list=$enableval,new_packet_list=yes)
+AC_MSG_CHECKING(if new packet list is used);
+if test "x$new_packet_list" = "xyes" ; then
+       AC_MSG_RESULT(yes)
+       CFLAGS=" -DNEW_PACKET_LIST $CFLAGS"
+else
+       AC_MSG_RESULT(no)
+fi
+
 dnl Save the cacheable configure results to config.cache before recursing
 AC_CACHE_SAVE
 
@@ -1627,11 +1657,13 @@ AC_OUTPUT(
   asn1/acp133/Makefile
   asn1/acse/Makefile
   asn1/ansi_map/Makefile
-  asn1/ansi-tcap/Makefile
+  asn1/ansi_tcap/Makefile
   asn1/camel/Makefile
   asn1/cdt/Makefile
   asn1/charging_ase/Makefile
   asn1/cmip/Makefile
+  asn1/cmp/Makefile
+  asn1/crmf/Makefile
   asn1/cms/Makefile
   asn1/dap/Makefile
   asn1/disp/Makefile
@@ -1641,7 +1673,7 @@ AC_OUTPUT(
   asn1/ftam/Makefile
   asn1/gnm/Makefile
   asn1/goose/Makefile
-  asn1/gsmmap/Makefile
+  asn1/gsm_map/Makefile
   asn1/h225/Makefile
   asn1/h235/Makefile
   asn1/h245/Makefile
@@ -1655,13 +1687,13 @@ AC_OUTPUT(
   asn1/h501/Makefile
   asn1/inap/Makefile
   asn1/ldap/Makefile
-  asn1/logotype-cert-extn/Makefile
+  asn1/logotypecertextn/Makefile
   asn1/lte-rrc/Makefile
   asn1/mms/Makefile
   asn1/mpeg-audio/Makefile
   asn1/mpeg-pes/Makefile
   asn1/nbap/Makefile
-  asn1/ns-cert-exts/Makefile
+  asn1/ns_cert_exts/Makefile
   asn1/ocsp/Makefile
   asn1/p7/Makefile
   asn1/pcap/Makefile
@@ -1670,8 +1702,6 @@ AC_OUTPUT(
   asn1/pkinit/Makefile
   asn1/pkix1explicit/Makefile
   asn1/pkix1implicit/Makefile
-  asn1/pkixcmp/Makefile
-  asn1/pkixcrmf/Makefile
   asn1/pkixproxy/Makefile
   asn1/pkixqualified/Makefile
   asn1/pkixtsp/Makefile