summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure25
1 files changed, 23 insertions, 2 deletions
diff --git a/configure b/configure
index 19701c3e1..827e41bfa 100755
--- a/configure
+++ b/configure
@@ -72,8 +72,16 @@ if [ "$PERL" = "" ] ; then
exit
fi
+if [ "$1" = "-clean" -o "$2" = "-clean" ] ; then
+ CLEAN="1"
+fi
+
+if [ -e "config.cache" -a -z "$CLEAN" ] ; then
+ . config.cache
+fi
+
+OSNAME=`(uname -s) 2>/dev/null` || OSNAME="unknown"
-OSNAME=`(uname -s) 2>/dev/null` || OSNAME="unknown"
c=""
n=""
@@ -254,8 +262,21 @@ echo -e "\033[0;37mMax nickname length:\033[1;32m\t\t$NICK_LENGT"
echo -e "\033[0;37mMax channel length:\033[1;32m\t\t$CHAN_LENGT"
echo -e "\033[0;37mMax mode length:\033[1;32m\t\t$MAXI_MODES"
echo -e "\033[0;37m"
-echo "Writing include/inspircd_config.h ..."
+echo "Writing cache file for future ./configures ..."
+if [ -e "config.cache" ] ; then
+ rm config.cache
+fi
+echo "CONFIG_DIR=\"$CONFIG_DIR\"" >> config.cache
+echo "MODULE_DIR=\"$MODULE_DIR\"" >> config.cache
+echo "MAX_CLIENT=\"$MAX_CLIENT\"" >> config.cache
+echo "MAX_CHANNE=\"$MAX_CHANNE\"" >> config.cache
+echo "NICK_LENGT=\"$NICK_LENGT\"" >> config.cache
+echo "MAXI_MODES=\"$MAXI_MODES\"" >> config.cache
+
+
+
+echo "Writing include/inspircd_config.h ..."
echo "/* Auto generated by configure, do not modify! */" >include/inspircd_config.h
echo "" >>include/inspircd_config.h