--- configure.orig	2007-03-11 09:18:22 UTC
+++ configure
@@ -537,7 +537,7 @@ fi
 
 
 
-CFLAGS="-g -I.  -I/usr/local/include"
+CFLAGS="${CFLAGS} -I.  -I/usr/local/include"
       # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
@@ -975,7 +975,7 @@ fi
 done
 
       # Check whether --enable-mysql or --disable-mysql was given.
-if test "${enable_mysql+set}" = set; then
+if test "${enable_mysql}" = "yes"; then
   enableval="$enable_mysql"
   
 	for ac_hdr in mysql/mysql.h
@@ -1066,15 +1066,13 @@ done
 #define _mysql_ 1
 EOF
 
-	 LDFLAGS="-L/usr/local/lib -L/usr/local/lib/mysql"
-	 LIBS="-lpcap -liconv -lmysqlclient"
+	 LIBS="${LIBS} -L/usr/local/lib -L/usr/local/lib/mysql -lpcap -liconv -lmysqlclient"
 	libexecdir="hash.o main.o nstrstr.o msn.o sniff.o db.o conf.o miscutil.o "
 
 else
   
 	echo "$ac_t""disabled" 1>&6
-	 LDFLAGS="-L/usr/local/lib"
-	 LIBS="-lpcap -liconv" 
+	 LIBS="${LIBS} -L/usr/local/lib -lpcap -liconv" 
 	libexecdir="hash.o main.o nstrstr.o msn.o sniff.o " 
 
 fi