Index: /trunk/configure.ac
===================================================================
--- /trunk/configure.ac	(revision 123)
+++ /trunk/configure.ac	(revision 124)
@@ -13,5 +13,5 @@
 dnl start
 dnl
-AM_INIT_AUTOMAKE(samhain, 2.3.6)
+AM_INIT_AUTOMAKE(samhain, 2.3.7)
 AC_CANONICAL_HOST
 
@@ -747,4 +747,65 @@
 
 
+AC_ARG_ENABLE(static,
+        [  --enable-static		enable static linking (recommended) [[no]]],
+        [
+        if test x$enable_static = xyes; then
+		if test x"$mynetbsd" = xyes
+		then
+		  tmp_LIBS=`echo $LIBS | sed 's%\-lresolv%%' `
+		  LIBS="${tmp_LIBS}"
+		fi
+		AC_DEFINE(SH_COMPILE_STATIC, 1, [Define if compiling static])
+                if test "x$GCC" = "xyes"; then
+                        LDFLAGS="$LDFLAGS -static"
+                else
+                   case "$host_os" in
+
+                        *aix*)
+                                LDFLAGS="$LDFLAGS -bnso -bI:/lib/syscalls.exp"
+                                ;;
+
+                        *hpux*)
+                                LDFLAGS="$LDFLAGS -Wl,-a,archive"
+                                ;;
+
+                        *osf*)
+                                LDFLAGS="$LDFLAGS -non_shared"
+                                ;;
+
+                        *irix*)
+                                LDFLAGS="$LDFLAGS -non_shared"
+                                ;;
+
+                        *sco*)
+                                LDFLAGS="$LDFLAGS -dn"
+                                ;;
+
+                        *sun*)
+                                LDFLAGS="$LDFLAGS -Bstatic"
+                                ;;
+
+                        *solaris*)
+                                LDFLAGS="$LDFLAGS -Bstatic"
+                                ;;
+
+                        *)
+                        echo "***********************************************"
+                        echo "*"
+                        echo "* Don't know how to enable static linking"
+                        echo "* with your compiler. Please set the environment"
+                        echo "* variable LDFLAGS to:"
+                        echo "*     ${LDFLAGS}   + the static linking flag"
+                        echo "* and run configure again"
+                        echo "*"
+                        echo "***********************************************"
+                        ;;
+
+                   esac
+                fi
+        fi
+        ]
+)
+
 #
 # this is from the snort configure.in
@@ -810,10 +871,10 @@
 	       ],
 	       [
-		AC_MSG_ERROR([Could not find libprelude.])
+		AC_MSG_ERROR([Could not find libprelude (if you are using --enable-static, the static library libprelude.a might be missing).])
 	       ])
 	       ;;
 	       esac
 	     else
-	       AC_MSG_ERROR([Could not find libprelude.])
+	       AC_MSG_ERROR([Could not find libprelude-config.])
 	     fi
 	fi
@@ -822,87 +883,4 @@
 		AC_MSG_RESULT(no)
 	]
-)
-
-dnl     AC_MSG_CHECKING(whether to use prelude)
-dnl     AC_ARG_WITH(prelude,  
-dnl	[  --with-prelude       Prelude IDS support [[no]]],
-dnl	[
-dnl	if test "x${withval}" = "xno"; then
-dnl	    AC_MSG_RESULT(no)
-dnl	else
-dnl	  AC_CHECK_PROG(HAVE_PRELUDE_CONFIG, libprelude-config, yes, no)
-dnl	  if test "$HAVE_PRELUDE_CONFIG" = "yes"; then
-dnl		sh_prelude_libs=`libprelude-config --libs | sed 's,\(.*\)\( -L.* -lprelude$\),\2 \1,'`
-dnl		sh_prelude_cflags=`libprelude-config --cflags`
-dnl		LIBS="$LIBS ${sh_prelude_libs}"
-dnl		CFLAGS="$CFLAGS ${sh_prelude_cflags}"
-dnl		AC_DEFINE(HAVE_LIBPRELUDE,1,[Have libprelude])
-dnl	  else
-dnl	     AC_MSG_ERROR([Could not find libprelude-config. Did you specify a valid path?])
-dnl	  fi
-dnl     fi
-dnl	],
-dnl	AC_MSG_RESULT(no)
-dnl     )
-
-AC_ARG_ENABLE(static,
-        [  --enable-static		enable static linking (recommended) [[no]]],
-        [
-        if test x$enable_static = xyes; then
-		if test x"$mynetbsd" = xyes
-		then
-		  tmp_LIBS=`echo $LIBS | sed 's%\-lresolv%%' `
-		  LIBS="${tmp_LIBS}"
-		fi
-		AC_DEFINE(SH_COMPILE_STATIC, 1, [Define if compiling static])
-                if test "x$GCC" = "xyes"; then
-                        LDFLAGS="$LDFLAGS -static"
-                else
-                   case "$host_os" in
-
-                        *aix*)
-                                LDFLAGS="$LDFLAGS -bnso -bI:/lib/syscalls.exp"
-                                ;;
-
-                        *hpux*)
-                                LDFLAGS="$LDFLAGS -Wl,-a,archive"
-                                ;;
-
-                        *osf*)
-                                LDFLAGS="$LDFLAGS -non_shared"
-                                ;;
-
-                        *irix*)
-                                LDFLAGS="$LDFLAGS -non_shared"
-                                ;;
-
-                        *sco*)
-                                LDFLAGS="$LDFLAGS -dn"
-                                ;;
-
-                        *sun*)
-                                LDFLAGS="$LDFLAGS -Bstatic"
-                                ;;
-
-                        *solaris*)
-                                LDFLAGS="$LDFLAGS -Bstatic"
-                                ;;
-
-                        *)
-                        echo "***********************************************"
-                        echo "*"
-                        echo "* Don't know how to enable static linking"
-                        echo "* with your compiler. Please set the environment"
-                        echo "* variable LDFLAGS to:"
-                        echo "*     ${LDFLAGS}   + the static linking flag"
-                        echo "* and run configure again"
-                        echo "*"
-                        echo "***********************************************"
-                        ;;
-
-                   esac
-                fi
-        fi
-        ]
 )
 
Index: /trunk/docs/Changelog
===================================================================
--- /trunk/docs/Changelog	(revision 123)
+++ /trunk/docs/Changelog	(revision 124)
@@ -1,3 +1,7 @@
-2.3.6:
+2.3.7:
+	* configure.ac: fix incorrect order of with-prelude, enable-static
+	  (libprelude test was always without -static)
+
+2.3.6 (06-09-2007):
 	* added yuleadmin.pl script contributed by Riccardo Murri
 	* fix compile error with -f-stack-protector on some systems (reported
@@ -20,5 +24,5 @@
 	* sh_gpg.c, sh_userfiles.c: use sh_getpwnam et al. wrappers
 
-2.3.5:
+2.3.5 (20-06-2007):
 	* sh_portcheck.c: try to tear down connections more gracefully
 	  (request by S. Petersen)
