[Snort-users] Re: [snort] SNORT 1.6.2.2 on Solaris 2.6

Fyodor fygrave at ...121...
Sat Jul 29 04:17:35 EDT 2000


More investigation on this problem showed up that the actual problem on
solaris+gcc is not because some include dirs are missed, but because you
additionally specify -I/usr/include path to it (which is standard include
anyway). This things pops up (in my case) because pcap headers live
there. I think the extra verification of pcap includes path should be
enough to fix the problem. 

BTW, Marty, folks, any thoughts on synchronizing `fixes' of snort 1.6.3
release with current tree. Some of them silently appeared in 1.6.3 release
but still aint in current.. umm.. :)


 patch bellow:

diff -u snort-1.6.3.orig/configure snort-1.6.3/configure
--- snort-1.6.3.orig/configure	Sat Jul 29 14:33:39 2000
+++ snort-1.6.3/configure	Sat Jul 29 15:12:12 2000
@@ -2208,13 +2208,15 @@
       exit
 else
       PCAP_H=`echo $PCAP_H | sed 's/\/pcap\.h//'`
+   if test "${PCAP_H}" != "/usr/include"; then
       CPPFLAGS="${CPPFLAGS} -I${PCAP_H}"
+   fi
 fi
 
 # Extract the first word of "libpcap.a", so it can be a program name with args.
 set dummy libpcap.a; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2218: checking for $ac_word" >&5
+echo "configure:2220: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PCAP_LIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2262,7 +2264,7 @@
 
 LPCAP=""
 echo $ac_n "checking for pcap_datalink in -lpcap""... $ac_c" 1>&6
-echo "configure:2266: checking for pcap_datalink in -lpcap" >&5
+echo "configure:2268: checking for pcap_datalink in -lpcap" >&5
 ac_lib_var=`echo pcap'_'pcap_datalink | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2270,7 +2272,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lpcap  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2274 "configure"
+#line 2276 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2281,7 +2283,7 @@
 pcap_datalink()
 ; return 0; }
 EOF
-if { (eval echo configure:2285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2332,17 +2334,17 @@
 
 ac_safe=`echo "$INCVAL/mysql.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $INCVAL/mysql.h""... $ac_c" 1>&6
-echo "configure:2336: checking for $INCVAL/mysql.h" >&5
+echo "configure:2338: checking for $INCVAL/mysql.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2341 "configure"
+#line 2343 "configure"
 #include "confdefs.h"
 #include <$INCVAL/mysql.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2375,7 +2377,7 @@
 
    LDFLAGS="${LDFLAGS} -L${LIBVAL}"
    echo $ac_n "checking for mysql_init in -lmysqlclient""... $ac_c" 1>&6
-echo "configure:2379: checking for mysql_init in -lmysqlclient" >&5
+echo "configure:2381: checking for mysql_init in -lmysqlclient" >&5
 ac_lib_var=`echo mysqlclient'_'mysql_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2383,7 +2385,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lmysqlclient  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2387 "configure"
+#line 2389 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2394,7 +2396,7 @@
 mysql_init()
 ; return 0; }
 EOF
-if { (eval echo configure:2398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2447,17 +2449,17 @@
 
 ac_safe=`echo "$INCVAL/sql.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $INCVAL/sql.h""... $ac_c" 1>&6
-echo "configure:2451: checking for $INCVAL/sql.h" >&5
+echo "configure:2453: checking for $INCVAL/sql.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2456 "configure"
+#line 2458 "configure"
 #include "confdefs.h"
 #include <$INCVAL/sql.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2482,17 +2484,17 @@
 if test "$ODINC" = "yes"; then
    ac_safe=`echo "$INCVAL/sqlext.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $INCVAL/sqlext.h""... $ac_c" 1>&6
-echo "configure:2486: checking for $INCVAL/sqlext.h" >&5
+echo "configure:2488: checking for $INCVAL/sqlext.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2491 "configure"
+#line 2493 "configure"
 #include "confdefs.h"
 #include <$INCVAL/sqlext.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2517,17 +2519,17 @@
    if test "$ODINC" = "yes"; then
       ac_safe=`echo "$INCVAL/sqltypes.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $INCVAL/sqltypes.h""... $ac_c" 1>&6
-echo "configure:2521: checking for $INCVAL/sqltypes.h" >&5
+echo "configure:2523: checking for $INCVAL/sqltypes.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2526 "configure"
+#line 2528 "configure"
 #include "confdefs.h"
 #include <$INCVAL/sqltypes.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2559,7 +2561,7 @@
 
          LDFLAGS="${LDFLAGS} -L${LIBVAL}"
          echo $ac_n "checking for SQLConnect in -lodbc""... $ac_c" 1>&6
-echo "configure:2563: checking for SQLConnect in -lodbc" >&5
+echo "configure:2565: checking for SQLConnect in -lodbc" >&5
 ac_lib_var=`echo odbc'_'SQLConnect | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2567,7 +2569,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lodbc  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2571 "configure"
+#line 2573 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2578,7 +2580,7 @@
 SQLConnect()
 ; return 0; }
 EOF
-if { (eval echo configure:2582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2640,17 +2642,17 @@
 
 ac_safe=`echo "$INCVAL/libpq-fe.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $INCVAL/libpq-fe.h""... $ac_c" 1>&6
-echo "configure:2644: checking for $INCVAL/libpq-fe.h" >&5
+echo "configure:2646: checking for $INCVAL/libpq-fe.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2649 "configure"
+#line 2651 "configure"
 #include "confdefs.h"
 #include <$INCVAL/libpq-fe.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2683,7 +2685,7 @@
 
    LDFLAGS="${LDFLAGS} -L${LIBVAL}"
    echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
-echo "configure:2687: checking for PQconnectdb in -lpq" >&5
+echo "configure:2689: checking for PQconnectdb in -lpq" >&5
 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2691,7 +2693,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lpq  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2695 "configure"
+#line 2697 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2702,7 +2704,7 @@
 PQconnectdb()
 ; return 0; }
 EOF
-if { (eval echo configure:2706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2769,12 +2771,12 @@
 
 if test "$tru64_types" = "yes"; then
 	echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2773: checking for ANSI C header files" >&5
+echo "configure:2775: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2778 "configure"
+#line 2780 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -2782,7 +2784,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2799,7 +2801,7 @@
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 2803 "configure"
+#line 2805 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -2817,7 +2819,7 @@
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 2821 "configure"
+#line 2823 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -2838,7 +2840,7 @@
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 2842 "configure"
+#line 2844 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2849,7 +2851,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:2853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -2873,12 +2875,12 @@
 fi
 
 echo $ac_n "checking for u_int8_t""... $ac_c" 1>&6
-echo "configure:2877: checking for u_int8_t" >&5
+echo "configure:2879: checking for u_int8_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_u_int8_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2882 "configure"
+#line 2884 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -2906,12 +2908,12 @@
 fi
 
 	echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6
-echo "configure:2910: checking for u_int16_t" >&5
+echo "configure:2912: checking for u_int16_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_u_int16_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2915 "configure"
+#line 2917 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -2939,12 +2941,12 @@
 fi
 
 	echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
-echo "configure:2943: checking for u_int32_t" >&5
+echo "configure:2945: checking for u_int32_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2948 "configure"
+#line 2950 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -2974,12 +2976,12 @@
 else
 	if test "$broken_types" = "yes"; then
 		echo $ac_n "checking for u_int8_t""... $ac_c" 1>&6
-echo "configure:2978: checking for u_int8_t" >&5
+echo "configure:2980: checking for u_int8_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_u_int8_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2983 "configure"
+#line 2985 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3007,12 +3009,12 @@
 fi
 
 		echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6
-echo "configure:3011: checking for u_int16_t" >&5
+echo "configure:3013: checking for u_int16_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_u_int16_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3016 "configure"
+#line 3018 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3040,12 +3042,12 @@
 fi
 
 		echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
-echo "configure:3044: checking for u_int32_t" >&5
+echo "configure:3046: checking for u_int32_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3049 "configure"
+#line 3051 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3074,12 +3076,12 @@
 
 	else
 		echo $ac_n "checking for u_int8_t""... $ac_c" 1>&6
-echo "configure:3078: checking for u_int8_t" >&5
+echo "configure:3080: checking for u_int8_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_u_int8_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3083 "configure"
+#line 3085 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3107,12 +3109,12 @@
 fi
 
 		echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6
-echo "configure:3111: checking for u_int16_t" >&5
+echo "configure:3113: checking for u_int16_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_u_int16_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3116 "configure"
+#line 3118 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3140,12 +3142,12 @@
 fi
 
 		echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
-echo "configure:3144: checking for u_int32_t" >&5
+echo "configure:3146: checking for u_int32_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3149 "configure"
+#line 3151 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3187,7 +3189,7 @@
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:3191: checking for a BSD compatible install" >&5
+echo "configure:3193: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
diff -u snort-1.6.3.orig/configure.in snort-1.6.3/configure.in
--- snort-1.6.3.orig/configure.in	Sat Jul 29 14:33:39 2000
+++ snort-1.6.3/configure.in	Sat Jul 29 15:05:27 2000
@@ -192,7 +192,9 @@
       exit
 else
       PCAP_H=`echo $PCAP_H | sed 's/\/pcap\.h//'`
+   if test "${PCAP_H}" != "/usr/include"; then
       CPPFLAGS="${CPPFLAGS} -I${PCAP_H}"
+   fi
 fi
 
 AC_PATH_PROG(PCAP_LIB, libpcap.a, [no], "$with_libpcap_libraries:$prefix/lib:$prefix/lib/pcap:/usr/lib:/usr/lib/pcap:/usr/local/lib:/usr/local/lib/pcap")





More information about the Snort-users mailing list