Index: configure
--- configure.orig	2015-04-20 04:26:29.000000000 +0200
+++ configure	2015-04-28 19:59:59.152158450 +0200
@@ -2906,8 +2906,8 @@
 
 
 
-CFLAGS="-O2 -Wall -D_GNU_SOURCE -D_REENTRANT"
-LIBS="-pthread"
+CFLAGS="$CFLAGS -D_GNU_SOURCE -D_REENTRANT"
+LIBS="$LIBS -pthread"
 
 # Checks for programs.
 ac_ext=c
@@ -5083,7 +5083,7 @@
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $LIBS"
+LIBS="$LIBS -lpthread"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -5118,7 +5118,7 @@
 #define HAVE_LIBPTHREAD 1
 _ACEOF
 
-  LIBS="-lpthread $LIBS"
+  LIBS="$LIBS -lpthread"
 
 else
   as_fn_error $? "POSIX thread support not installed" "$LINENO" 5
@@ -6018,13 +6018,13 @@
 
 
 if test "$prefix" = "NONE"; then prefix=""; fi
-eval CONFIG_FILE="${sysconfdir}/smc-milter.conf"
-eval USERS_FILE="${sysconfdir}/smc-milter.users"
-eval HOSTS_FILE="${sysconfdir}/smc-milter.hosts"
-eval SOCKET_FILE="${localstatedir}/lib/smc-milter/smc-milter.sock"
-eval CACHE_FILE="${localstatedir}/lib/smc-milter/smc-milter.dat"
-eval PID_FILE="${localstatedir}/run/smc-milter/smc-milter.pid"
-eval TMP_FILE="${localstatedir}/tmp/smc-file.XXXXXX"
+eval CONFIG_FILE="${sysconfdir}/milter-smc.conf"
+eval USERS_FILE="${sysconfdir}/milter-smc.users"
+eval HOSTS_FILE="${sysconfdir}/milter-smc.hosts"
+eval SOCKET_FILE="${localstatedir}/milter-smc.sock"
+eval CACHE_FILE="${localstatedir}/milter-smc.dat"
+eval PID_FILE="${localstatedir}/milter-smc.pid"
+eval TMP_FILE="${localstatedir}/milter-smc.tmp.XXXXXX"
 eval CLAMD_SOCKET_FILE="/var/lib/clamav/clamd.socket"
 
 
