X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=configure;h=941d3e9da7c9256b2297cf0477811c5a70b04000;hb=a9682a795a548eee1db19f424f1cb1ef236538dd;hp=f15498b9ede0ab0df2626804fbddce7b793500b4;hpb=fb947d5615d96922efac7ecda941caab77dceb0f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/configure b/configure index f15498b9e..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,14 +394,21 @@ 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" FLAGS="-fPIC -frtti -O3" + MAKEPROG="gmake" ;; (*) LDLIBS="-ldl" FLAGS="-fPIC -frtti -O3" + MAKEPROG="make" ;; esac @@ -397,7 +434,7 @@ if [ "$YN" != "n" ] ; then echo -e "\033[1;32mCompiling...\033[0;37m" echo "" cd $ME - make + $MAKEPROG echo "" echo "Done!" echo ""