X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=configure;h=941d3e9da7c9256b2297cf0477811c5a70b04000;hb=b45997b5d2b8f095d0ce00949b27854af1f86ac4;hp=af9f2695048d6c28d405d7ba32766c99691ed8e6;hpb=b69251eb99e2b8cf7cac567bafd912b6cece7364;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/configure b/configure index af9f26950..941d3e9da 100755 --- a/configure +++ b/configure @@ -7,15 +7,8 @@ # # $Id$ # -# Some shell code based on the configure script of IRC Services. -# IRC Services is copyright (c) 1996-2002 Andrew Church. -# E-mail: -# -# ######################################## -# echo -e "\033[1;37mtest\033[0;37m" - echo "Configuring default values..." ME=`pwd` @@ -28,6 +21,7 @@ NICK_LENGT=32 CHAN_LENGT=64 MAX_CHANNE=20 MAXI_MODES=20 +OSNAME=`(uname -s) 2>/dev/null` || OSNAME="unknown" if [ -z $MAX_CLIENT_T ] ; then MAX_CLIENT_T=1024 @@ -43,7 +37,43 @@ if [ -e ".config.cache" -a -z "$CLEAN" ] ; then . .config.cache fi -OSNAME=`(uname -s) 2>/dev/null` || OSNAME="unknown" +if [ "$1" = "-update" -o "$2" = "-update" ] ; then + # They wanna update their Makefile.. good for 'em + # Make sure .config.cache exists + if [ ! -e ".config.cache" ] ; then + echo "You have not run ./configure before. Please do this before trying to run the update script." + exit 0 + fi + # Right, load the cache values + . .config.cache + # Check for modules + + case "$OSNAME" in + (FreeBSD) + LDLIBS="-Ldl" + FLAGS="-fPIC -frtti -O3" + MAKEPROG="gmake" + ;; + (*) + LDLIBS="-ldl" + FLAGS="-fPIC -frtti -O3" + MAKEPROG="make" + ;; + esac + + MODULES="" + for module in src/modules/*.cpp ; do + mod=`echo $module | sed 's/.cpp/.so/' | sed 's/src\/modules\///'` + MODULES="$MODULES $mod" + done + + # Write the new makefile. + . .Makefile.inc + echo "Complete." + exit 1; +fi + + if [ -z $MAX_CLIENT ] ; then MAX_CLIENT=$MAX_CLIENT_T fi @@ -364,6 +394,11 @@ touch include/inspircd_config.h echo "Preparing Variables for the Makefile" +if [ "$CONFIG_DIR" != "$ME/conf" ] ; then + COPY_CONF=1 +fi + + case "$OSNAME" in (FreeBSD) LDLIBS="-Ldl"