[prev in list] [next in list] [prev in thread] [next in thread] 

List:       snort-devel
Subject:    [Snort-devel] Patch for minor autojunk.sh/configure wart.
From:       Erik de Castro Lopo <erikd+snort () sensorynetworks ! com>
Date:       2003-12-31 0:57:00
Message-ID: 20031231115700.0689e3b6.erikd+snort () sensorynetworks ! com
[Download RAW message or body]

Hi all,

Currently, when snort is checked out from CVS and the autojunk.sh script
is run, later versions of autoconf (2.50 and later) produce warning
messages about the usage of acconfig.h being deprecated:

    WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
    WARNING: and `config.h.top', to define templates for `config.h.in'
    WARNING: is deprecated and discouraged.

Removing acconfig.h and running autojunk.sh produces other warnings
from autoheader. The problem is that autoheader requires all variables
to be defined using the three argument version of AC_DEFINE macro at 
least once.

The following patch (against 2.1 CVS version) for snort's configure.in
allows the removal of acconfig.h and prevents the warnings from 
autoheader.

Cheers,
Erik
---------------------------------------------------------------------------
diff -u -r1.129 configure.in
--- configure.in	17 Dec 2003 21:25:13 -0000	1.129
+++ configure.in	31 Dec 2003 00:55:33 -0000
@@ -1,4 +1,5 @@
-# $Id: configure.in,v 1.129 2003/12/17 21:25:13 jh8 Exp $ 
+# $Id: configure.in,v 1.129 2003/12/17 21:25:13 jh8 Exp $
+AC_PREREQ(2.50) 
 AC_INIT(src/snort.c)
 AM_CONFIG_HEADER(config.h)
 # When changing the snort version, please also update the VERSION
@@ -40,8 +41,8 @@
 
 case "$host" in
   *-openbsd2.6|*-openbsd2.5|*-openbsd2.4|*-openbsd2.3*)
-    AC_DEFINE(OPENBSD)
-    AC_DEFINE(BROKEN_SIOCGIFMTU)
+    AC_DEFINE(OPENBSD,,[Define if OPENBSD])
+    AC_DEFINE(BROKEN_SIOCGIFMTU,,[Define if BROKEN_SIOCGIFMTU])
 
     ;;
   *-openbsd*)
@@ -49,7 +50,7 @@
 
     ;;
   *-sgi-irix5*)
-    AC_DEFINE(IRIX)
+    AC_DEFINE(IRIX,,[Define if IRIX])
     no_libsocket=yes
     no_libnsl=yes
     if test -z "$GCC"; then
@@ -69,41 +70,41 @@
     extra_incl=-I/usr/local/include
     ;;
   *-solaris*)
-    AC_DEFINE(SOLARIS)
+    AC_DEFINE(SOLARIS,,[Define if SOLARIS])
     CPPFLAGS="${CPPFLAGS} -DBSD_COMP"
     ;;
   *-sunos*)
-    AC_DEFINE(SUNOS)
+    AC_DEFINE(SUNOS,,[Define if SUNOS])
     sunos4=yes
     ;;
   *-linux*)
     linux=yes
-    AC_DEFINE(LINUX)
-    AC_DEFINE(PCAP_TIMEOUT_IGNORED)  # libpcap doesn't even LOOK at
-                                     # the timeout you give it under Linux
+    AC_DEFINE(LINUX,,[Define if LINUX])
+    # libpcap doesn't even LOOK at the timeout you give it under Linux
+	AC_DEFINE(PCAP_TIMEOUT_IGNORED,,[Define if PCAP_TIMEOUT_IGNORED])
     AC_SUBST(extra_incl)
     extra_incl=-I/usr/include/pcap
     ;;
   *-hpux10*)
-    AC_DEFINE(HPUX)
+    AC_DEFINE(HPUX,,[Define if HPUX])
     AC_DEFINE(WORDS_BIGENDIAN)
     AC_SUBST(extra_incl)
     extra_incl=-I/usr/local/include
     ;;
 
   *-freebsd*)
-    AC_DEFINE(FREEBSD)
+    AC_DEFINE(FREEBSD,,[Define if FREEBSD])
 
     ;;
   *-bsdi*)
-    AC_DEFINE(BSDI)
+    AC_DEFINE(BSDI,,[Define if BSDI])
     ;;
   *-aix*)
-    AC_DEFINE(AIX)
+    AC_DEFINE(AIX,,[Define if AIX])
      broken_types=yes
     ;;
   *-osf4*)
-    AC_DEFINE(OSF1)
+    AC_DEFINE(OSF1,,[Define if OSF1])
     tru64_types=yes
     ;;
   *-osf5.1*)
@@ -115,7 +116,7 @@
     ;;
 # it is actually <platform>-apple-darwin1.2 or <platform>-apple-rhapsody5.x but lets \
                stick with this for the moment    
   *-apple*)
-    AC_DEFINE(MACOS)
+    AC_DEFINE(MACOS,,[Define if MACOS])
     AC_DEFINE(BROKEN_SIOCGIFMTU)
     LDFLAGS="${LDFLAGS} -L/sw/lib"
     extra_incl=-I/sw/include
@@ -124,7 +125,7 @@
 # any sparc platform has to have this one defined.
 AC_MSG_CHECKING(for sparc alignment)
 if eval "echo $host_cpu|grep -i sparc >/dev/null"; then
-     AC_DEFINE(WORDS_MUSTALIGN)
+     AC_DEFINE(WORDS_MUSTALIGN,,[Define if WORDS_MUSTALIGN])
      AC_MSG_RESULT(yes)
 else
      AC_MSG_RESULT(no)
@@ -224,7 +225,8 @@
 
 AC_TRY_COMPILE([
 #include <stdio.h>
-],[char *foo; foo = sys_errlist[0];], AC_DEFINE(ERRLIST_PREDEFINED))
+],[char *foo; foo = sys_errlist[0];], 
+AC_DEFINE(ERRLIST_PREDEFINED,,[Define if ERRLIST_PREDEFINED]))
 
 AC_MSG_CHECKING(for __FUNCTION__)
 AC_TRY_COMPILE([
---------------------------------------------------------------------------

-- 
------------------------------------------------------
[N] Erik de Castro Lopo, Senior Computer Engineer
[E] erik.de.castro.lopo@sensorynetworks.com
[W] http://www.sensorynetworks.com
[T] +61 2 83022726 
[F] +61 2 94750316 
[A] L4/140 William St, East Sydney NSW 2011, Australia
------------------------------------------------------


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Snort-devel mailing list
Snort-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/snort-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic