Index: trunk/configure.ac
===================================================================
--- trunk/configure.ac	(revision 127)
+++ trunk/configure.ac	(revision 129)
@@ -13,5 +13,5 @@
 dnl start
 dnl
-AM_INIT_AUTOMAKE(samhain, 2.3.8)
+AM_INIT_AUTOMAKE(samhain, 2.3.7)
 AC_CANONICAL_HOST
 
@@ -746,4 +746,72 @@
 )
 
+
+dnl
+dnl  NETWORK OPTIONS
+dnl
+AC_ARG_ENABLE(network,
+        [  --enable-network=[[client|server]]	compile client or server [[no]]],
+        [
+        if test "x$enable_network" = xclient; then
+                mytclient="-DSH_WITH_CLIENT"
+		yulectl_prg=
+                setpwd_prg="samhain_setpwd"
+                sh_main_prg="samhain"
+		if test "x${sh_have_gmp}" = xyes
+		then
+			LIBS="-lgmp $LIBS"
+		fi
+dnl		AC_CHECK_HEADER(sys/capability.h, 
+dnl				[AC_CHECK_LIB(cap, cap_get_proc,,sh_use_lcaps="no")],
+dnl				[sh_use_lcaps="no"])
+	elif test "x$enable_network" = xserver; then
+                mytclient="-DSH_WITH_SERVER"
+		yulectl_prg="yulectl"
+                setpwd_prg="samhain_setpwd"
+                sh_main_prg="yule"
+		if test "x${sh_have_gmp}" = xyes
+		then
+			LIBS="-lgmp $LIBS"
+		fi
+		sh_use_lcaps="undef"
+        elif test "x$enable_network" = xno; then
+                mytclient="-DSH_STANDALONE"
+		yulectl_prg=
+                setpwd_prg=
+                sh_main_prg="samhain"
+dnl		AC_CHECK_HEADER(sys/capability.h, 
+dnl				[AC_CHECK_LIB(cap, cap_get_proc,,sh_use_lcaps="no")],
+dnl				[sh_use_lcaps="no"])
+	else
+		AC_MSG_ERROR([--enable-network=WHAT: WHAT must be client, server, or no])
+        fi
+        ],
+        [
+        mytclient="-DSH_STANDALONE"
+	setpwd_prg=
+	yulectl_prg=
+	sh_main_prg="samhain"
+dnl	AC_CHECK_HEADER(sys/capability.h, 
+dnl			[AC_CHECK_LIB(cap, cap_get_proc,,sh_use_lcaps="no")],
+dnl			[sh_use_lcaps="no"])
+        ],
+)
+
+if test x"${mytclient}" = x-DSH_STANDALONE -o x"${mytclient}" = x-DSH_WITH_CLIENT;
+then
+	ACX_PTHREAD
+	CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+	LIBS="$PTHREAD_LIBS $LIBS"
+	CC="$PTHREAD_CC"
+fi
+	
+AC_SUBST(setpwd_prg)
+AC_SUBST(yulectl_prg)
+AC_SUBST(sh_main_prg)
+AC_SUBST(mytclient)
+
+# needed for the rpm spec
+clmytclient=`echo ${mytclient} | sed s%\-%%`
+AC_SUBST(clmytclient)
 
 AC_ARG_ENABLE(static,
@@ -1427,65 +1495,4 @@
 
 
-dnl
-dnl  NETWORK OPTIONS
-dnl
-
-
-AC_ARG_ENABLE(network,
-        [  --enable-network=[[client|server]]	compile client or server [[no]]],
-        [
-        if test "x$enable_network" = xclient; then
-                mytclient="-DSH_WITH_CLIENT"
-		yulectl_prg=
-                setpwd_prg="samhain_setpwd"
-                sh_main_prg="samhain"
-		if test "x${sh_have_gmp}" = xyes
-		then
-			LIBS="-lgmp $LIBS"
-		fi
-dnl		AC_CHECK_HEADER(sys/capability.h, 
-dnl				[AC_CHECK_LIB(cap, cap_get_proc,,sh_use_lcaps="no")],
-dnl				[sh_use_lcaps="no"])
-	elif test "x$enable_network" = xserver; then
-                mytclient="-DSH_WITH_SERVER"
-		yulectl_prg="yulectl"
-                setpwd_prg="samhain_setpwd"
-                sh_main_prg="yule"
-		if test "x${sh_have_gmp}" = xyes
-		then
-			LIBS="-lgmp $LIBS"
-		fi
-		sh_use_lcaps="undef"
-        elif test "x$enable_network" = xno; then
-                mytclient="-DSH_STANDALONE"
-		yulectl_prg=
-                setpwd_prg=
-                sh_main_prg="samhain"
-dnl		AC_CHECK_HEADER(sys/capability.h, 
-dnl				[AC_CHECK_LIB(cap, cap_get_proc,,sh_use_lcaps="no")],
-dnl				[sh_use_lcaps="no"])
-	else
-		AC_MSG_ERROR([--enable-network=WHAT: WHAT must be client, server, or no])
-        fi
-        ],
-        [
-        mytclient="-DSH_STANDALONE"
-	setpwd_prg=
-	yulectl_prg=
-	sh_main_prg="samhain"
-dnl	AC_CHECK_HEADER(sys/capability.h, 
-dnl			[AC_CHECK_LIB(cap, cap_get_proc,,sh_use_lcaps="no")],
-dnl			[sh_use_lcaps="no"])
-        ],
-)
-AC_SUBST(setpwd_prg)
-AC_SUBST(yulectl_prg)
-AC_SUBST(sh_main_prg)
-AC_SUBST(mytclient)
-
-# needed for the rpm spec
-clmytclient=`echo ${mytclient} | sed s%\-%%`
-AC_SUBST(clmytclient)
-
 AC_ARG_ENABLE(udp,
         [  --enable-udp			server can listen on port 514/udp [[no]]],
