-echo "OS=$OS" > $CONFFILE
-echo "STG_TIME=yes" >> $CONFFILE
-echo "DIR_BUILD=$BUILD_DIR" >> $CONFFILE
-echo "DIR_LIB=\$(DIR_BUILD)/../../lib" >> $CONFFILE
-echo "DIR_LIBSRC=\$(DIR_BUILD)/../../stglibs" >> $CONFFILE
-echo "DIR_INCLUDE=\$(DIR_BUILD)/../../include" >> $CONFFILE
-echo "DIR_MOD=\$(DIR_BUILD)/modules" >> $CONFFILE
-echo "DIR_PLUGINS=\$(DIR_BUILD)/plugins" >> $CONFFILE
-echo "ARCH=$ARCH" >> $CONFFILE
-echo "CHECK_EXPAT=$CHECK_EXPAT" >> $CONFFILE
-echo "CHECK_FBCLIENT=$CHECK_FBCLIENT" >> $CONFFILE
-echo "CHECK_MYSQLCLIENT=$CHECK_MYSQLCLIENT" >> $CONFFILE
-echo "CHECK_PQ=$CHECK_PQ" >> $CONFFILE
-echo "CHECK_XMLRPC=$CHECK_XMLRPC" >> $CONFFILE
-echo "DEFS=$DEFS" >> $CONFFILE
-echo -n "STG_LIBS=" >> $CONFFILE
+if [ "$CHECK_NFNETLINK" = "yes" -a "$CHECK_NFQ" = "yes" ]
+then
+ PLUGINS="$PLUGINS
+ capture/nfqueue"
+fi
+
+if [ "$CHECK_YAJL" = "yes" -a "$CHECK_BOOST_SCOPED_PTR" = "yes" ]
+then
+ PLUGINS="$PLUGINS
+ other/radius"
+ STG_LIBS="$STG_LIBS
+ json.lib"
+fi
+
+printf "OS=$OS\n" > $CONFFILE
+printf "STG_TIME=yes\n" >> $CONFFILE
+printf "DEBUG=$DEBUG\n" >> $CONFFILE
+printf "DIR_BUILD=$BUILD_DIR\n" >> $CONFFILE
+printf "DIR_LIB=\$(DIR_BUILD)/../../lib\n" >> $CONFFILE
+printf "DIR_LIBSRC=\$(DIR_BUILD)/../../stglibs\n" >> $CONFFILE
+printf "DIR_INCLUDE=\$(DIR_BUILD)/../../include\n" >> $CONFFILE
+printf "DIR_MOD=\$(DIR_BUILD)/modules\n" >> $CONFFILE
+printf "DIR_PLUGINS=\$(DIR_BUILD)/plugins\n" >> $CONFFILE
+printf "ARCH=$ARCH\n" >> $CONFFILE
+printf "CHECK_EXPAT=$CHECK_EXPAT\n" >> $CONFFILE
+printf "CHECK_FBCLIENT=$CHECK_FBCLIENT\n" >> $CONFFILE
+if [ "$CHECK_FBCLIENT" = "yes" ]
+then
+ printf "FB_CFLAGS=$FB_CFLAGS\n" >> $CONFFILE
+ printf "FB_LDFLAGS=$FB_LDFLAGS\n" >> $CONFFILE
+fi
+printf "CHECK_MYSQLCLIENT=$CHECK_MYSQLCLIENT\n" >> $CONFFILE
+if [ "$CHECK_MYSQLCLIENT" = "yes" ]
+then
+ printf "MYSQL_CFLAGS=$MYSQL_CFLAGS\n" >> $CONFFILE
+ printf "MYSQL_LDFLAGS=$MYSQL_LDFLAGS\n" >> $CONFFILE
+fi
+printf "CHECK_PQ=$CHECK_PQ\n" >> $CONFFILE
+if [ "$CHECK_PQ" = "yes" ]
+then
+ printf "PG_CFLAGS=$PG_CFLAGS\n" >> $CONFFILE
+ printf "PG_LDFLAGS=$PG_LDFLAGS\n" >> $CONFFILE
+fi
+printf "CHECK_XMLRPC=$CHECK_XMLRPC\n" >> $CONFFILE
+if [ "$CHECK_XMLRPC" = "yes" ]
+then
+ printf "XMLRPC_CFLAGS=$XMLRPC_CFLAGS\n" >> $CONFFILE
+ printf "XMLRPC_LDFLAGS=$XMLRPC_LDFLAGS\n" >> $CONFFILE
+fi
+printf "CHECK_NFNETLINK=$CHECK_NFNETLINK\n" >> $CONFFILE
+if [ "$CHECK_NFNETLINK" = "yes" ]
+then
+ printf "NETLINK_LDFLAGS=$NETLINK_LDFLAGS\n" >> $CONFFILE
+fi
+printf "CHECK_NFQ=$CHECK_NFQ\n" >> $CONFFILE
+if [ "$CHECK_NFQ" = "yes" ]
+then
+ printf "NFQ_LDFLAGS=$NFQ_LDFLAGS\n" >> $CONFFILE
+fi
+printf "DEFS=$DEFS\n" >> $CONFFILE
+printf "STG_LIBS=" >> $CONFFILE