diff -uNrd csircd-1.14.dist/Makefile.in csircd-1.14/Makefile.in
--- csircd-1.14.dist/Makefile.in	2003-04-23 03:00:29.000000000 -0400
+++ csircd-1.14/Makefile.in	2003-04-27 08:49:43.000000000 -0400
@@ -83,14 +83,14 @@
 all: ${ALL}
 
 csircd.so:	${OBJS.csircd.so} @LIBCA@
-	ld -G ${OBJS.$@} @LIBCA@ -o $@
+#	ld -G ${OBJS.$@} @LIBCA@ -o $@
+	${CC} -shared -fPIC -DPIC ${OBJS.$@} @LIBS@ -o $@
 
 ${PROGS} ${UTILS}:
 	${CC} -o $@ ${OBJS.$@} ${LFLAGS}
 
 csircd:   @IRCDSO@ ${OBJS.csircd} ${AINC} ${CINC} Makefile
 
-
 .c.o:
 	${CC} ${CFLAGS} -c $< -o $@
 
@@ -138,14 +138,14 @@
 	@if [ ! -d ${CHROOT}${etcdir} ] ; then					\
 		umask 22 && mkdir -p ${CHROOT}${etcdir} ;							\
 	fi
-	@if [ -f ${CHROOT}${bindir}/csircd ] ; then						\
-		rm -f ${CHROOT}${bindir}/csircd.old ;						\
-		mv ${CHROOT}${bindir}/csircd ${CHROOT}${bindir}/csircd.old ;			\
-		echo '- Backing up ${CHROOT}${bindir}/csircd to csircd.old' ;				\
+	@if [ -f ${CHROOT}${bindir}/csircd@EXEEXT@ ] ; then						\
+		rm -f ${CHROOT}${bindir}/csircd@EXEEXT@.old ;						\
+		mv ${CHROOT}${bindir}/csircd@EXEEXT@ ${CHROOT}${bindir}/csircd@EXEEXT@.old ;			\
+		echo '- Backing up ${CHROOT}${bindir}/csircd@EXEEXT@ to csircd@EXEEXT@.old' ;				\
 	fi
-	@cp csircd ${CHROOT}${bindir}/.
-	@echo '- Installed ${CHROOT}${bindir}/csircd'
-	@chmod 755 ${CHROOT}${bindir}/csircd
+	@cp csircd@EXEEXT@ ${CHROOT}${bindir}/.
+	@echo '- Installed ${CHROOT}${bindir}/csircd@EXEEXT@'
+	@chmod 755 ${CHROOT}${bindir}/csircd@EXEEXT@
 	@if [ -f csircd.so ] ; then										\
 		if [ -f ${CHROOT}${libdir}/csircd.so ] ; then				\
 			rm -f ${CHROOT}${libdir}/csircd.so.old ;				\
@@ -163,7 +163,7 @@
 	@echo 'Done.'
 
 clean:
-	rm -rf ${ALL} ${OBJS} confparse/conftest confparse/*.a core csircd.pid csircd.so csircd.so.old
+	rm -rf ${ALL} ${OBJS} confparse/conftest confparse/*.a core csircd.pid csircd.so csircd.so.old csircd@EXEEXT@
 
 distclean:	clean
 	rm -f config.log config.cache config.status include/setup.h Makefile confparse/Makefile
Binary files csircd-1.14.dist/a.exe and csircd-1.14/a.exe differ
diff -uNrd csircd-1.14.dist/configure csircd-1.14/configure
--- csircd-1.14.dist/configure	2003-03-17 03:53:22.000000000 -0500
+++ csircd-1.14/configure	2003-04-27 08:34:09.000000000 -0400
@@ -579,252 +579,10 @@
 
 
 
-
-# Check whether --with-network or --without-network was given.
-if test "${with_network+set}" = set; then
-  withval="$with_network"
-  :
-fi
-
-if test "x$with_network" != "x" ; then
-	NETWORK_NAME="$with_network"
-fi
-
-# Check whether --with-chrootdir or --without-chrootdir was given.
-if test "${with_chrootdir+set}" = set; then
-  withval="$with_chrootdir"
-  :
-fi
-
-if test "x$with_chrootdir" != "x" ; then
-	chrootdir="$with_chrootdir"
-else
-	pre=$prefix
-	if test "X$pre" = "XNONE" ; then
-		pre=/usr/local
-	fi
-	
-	if test "X$pre" = "X/usr" -o "X$pre" = "X/usr/local" ; then
-		chrootdir='${prefix}/chroots/csircd'
-	else
-		chrootdir='${prefix}/chroot'
-	fi
-fi
-
-# Check whether --with-nicklen or --without-nicklen was given.
-if test "${with_nicklen+set}" = set; then
-  withval="$with_nicklen"
-  :
-fi
-
-if test "x$with_nicklen" != "x" ; then
-	DEFAULTMAXNICKLEN=$with_nicklen
-fi
-
-# Check whether --with-userlen or --without-userlen was given.
-if test "${with_userlen+set}" = set; then
-  withval="$with_userlen"
-  :
-fi
-
-if test "x$with_userlen" != "x" ; then
-	DEFAULTMAXUSERLEN=$with_userlen
-fi
-
-# Check whether --with-hostlen or --without-hostlen was given.
-if test "${with_hostlen+set}" = set; then
-  withval="$with_hostlen"
-  :
-fi
-
-if test "x$with_hostlen" != "x" ; then
-	DEFAULTMAXHOSTLEN=$with_hostlen
-fi
-
-# Check whether --with-reallen or --without-reallen was given.
-if test "${with_reallen+set}" = set; then
-  withval="$with_reallen"
-  :
-fi
-
-if test "x$with_reallen" != "x" ; then
-	DEFAULTMAXREALLEN=$with_reallen
-fi
-
-# Check whether --with-channellen or --without-channellen was given.
-if test "${with_channellen+set}" = set; then
-  withval="$with_channellen"
-  :
-fi
-
-if test "x$with_channellen" != "x" ; then
-	DEFAULTMAXCHANNELLEN=$with_channellen
-fi
-
-# Check whether --with-topiclen or --without-topiclen was given.
-if test "${with_topiclen+set}" = set; then
-  withval="$with_topiclen"
-  :
-fi
-
-if test "x$with_topiclen" != "x" ; then
-	DEFAULTMAXTOPICLEN=$with_topiclen
-fi
-
-# Check whether --with-quitlen or --without-quitlen was given.
-if test "${with_quitlen+set}" = set; then
-  withval="$with_quitlen"
-  :
-fi
-
-if test "x$with_quitlen" != "x" ; then
-	DEFAULTMAXQUITLEN=$with_quitlen
-fi
-
-# Check whether --with-awaylen or --without-awaylen was given.
-if test "${with_awaylen+set}" = set; then
-  withval="$with_awaylen"
-  :
-fi
-
-if test "x$with_awaylen" != "x" ; then
-	DEFAULTMAXAWAYLEN=$with_awaylen
-fi
-
-# Check whether --with-kicklen or --without-kicklen was given.
-if test "${with_kicklen+set}" = set; then
-  withval="$with_kicklen"
-  :
-fi
-
-if test "x$with_kicklen" != "x" ; then
-	DEFAULTMAXKICKLEN=$with_kicklen
-fi
-
-# Check whether --with-killlen or --without-killlen was given.
-if test "${with_killlen+set}" = set; then
-  withval="$with_killlen"
-  :
-fi
-
-if test "x$with_killlen" != "x" ; then
-	DEFAULTMAXKILLLEN=$with_killlen
-fi
-
-# Check whether --with-maxbans or --without-maxbans was given.
-if test "${with_maxbans+set}" = set; then
-  withval="$with_maxbans"
-  :
-fi
-
-if test "x$with_maxbans" != "x" ; then
-	DEFAULTMAXBANS=$with_maxbans
-fi
-
-# Check whether --with-maxchannels or --without-maxchannels was given.
-if test "${with_maxchannels+set}" = set; then
-  withval="$with_maxchannels"
-  :
-fi
-
-if test "x$with_maxchannels" != "x" ; then
-	DEFAULTMAXCHANNELSPERUSER=$with_maxchannels
-fi
-
-# Check whether --with-maxmodeparams or --without-maxmodeparams was given.
-if test "${with_maxmodeparams+set}" = set; then
-  withval="$with_maxmodeparams"
-  :
-fi
-
-if test "x$with_maxmodeparams" != "x" ; then
-	DEFAULTMAXMODEPARAMS=$with_maxmodeparams
-fi
-
-# Check whether --with-maxtargets or --without-maxtargets was given.
-if test "${with_maxtargets+set}" = set; then
-  withval="$with_maxtargets"
-  :
-fi
-
-if test "x$with_maxtargets" != "x" ; then
-	DEFAULTMAXTARGETS=$with_maxtargets
-fi
-
-# Check whether --with-classlen or --without-classlen was given.
-if test "${with_classlen+set}" = set; then
-  withval="$with_classlen"
-  :
-fi
-
-if test "x$with_classlen" != "x" ; then
-	MAXCLASSNAME=$with_maxchannels
-fi
-
-# Check whether --with-votes or --without-votes was given.
-if test "${with_votes+set}" = set; then
-  withval="$with_votes"
-  :
-fi
-
-if test "x$with_votes" != "x" ; then
-	DEFAULT_GLINE_VOTES_NEEDED=$with_votes
-fi
-
-# Check whether --with-triggered-timeout or --without-triggered-timeout was given.
-if test "${with_triggered_timeout+set}" = set; then
-  withval="$with_triggered_timeout"
-  :
-fi
-
-if test "x$with_triggered_timeout" != "x" ; then
-	DEFAULT_GLINE_TRIGGERED_TIMEOUT=$with_triggered_timeout
-fi
-
-# Check whether --with-untriggered-timeout or --without-untriggered-timeout was given.
-if test "${with_untriggered_timeout+set}" = set; then
-  withval="$with_untriggered_timeout"
-  :
-fi
-
-if test "x$with_untriggered_timeout" != "x" ; then
-	DEFAULT_GLINE_UNTRIGGERED_TIMEOUT=$with_untriggered_timeout
-fi
-
-# Check whether --with-queuesize or --without-queuesize was given.
-if test "${with_queuesize+set}" = set; then
-  withval="$with_queuesize"
-  :
-fi
-
-if test "x$with_queuesize" != "x" ; then
-	QUEUE_SIZE=$with_queuesize
-fi
-
-# Check whether --with-queueflags or --without-queueflags was given.
-if test "${with_queueflags+set}" = set; then
-  withval="$with_queueflags"
-  :
-fi
-
-if test "x$with_queueflags" != "x" ; then
-	QUEUEINIT_FLAGS=$with_queueflags
-fi
-
-# Check whether --enable-opasswd-crypt or --disable-opasswd-crypt was given.
-if test "${enable_opasswd_crypt+set}" = set; then
-  enableval="$enable_opasswd_crypt"
-  :
-fi
-
-if test "x$enable_opasswd_crypt" = "xno" ; then
-	CRYPT_OPER_PASSWORD=0
-fi
-
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:828: checking for $ac_word" >&5
+echo "configure:586: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -854,7 +612,7 @@
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:858: checking for $ac_word" >&5
+echo "configure:616: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -905,7 +663,7 @@
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:909: checking for $ac_word" >&5
+echo "configure:667: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -937,7 +695,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:941: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:699: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -948,12 +706,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 952 "configure"
+#line 710 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -979,12 +737,12 @@
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:983: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:741: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:988: checking whether we are using GNU C" >&5
+echo "configure:746: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -993,7 +751,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -1012,7 +770,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1016: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:774: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1044,7 +802,7 @@
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1048: checking how to run the C preprocessor" >&5
+echo "configure:806: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1059,13 +817,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1063 "configure"
+#line 821 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1076,13 +834,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1080 "configure"
+#line 838 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1093,13 +851,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1097 "configure"
+#line 855 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1124,9 +882,9 @@
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:1128: checking for AIX" >&5
+echo "configure:886: checking for AIX" >&5
 cat > conftest.$ac_ext <<EOF
-#line 1130 "configure"
+#line 888 "configure"
 #include "confdefs.h"
 #ifdef _AIX
   yes
@@ -1148,7 +906,7 @@
 
 
 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:1152: checking for POSIXized ISC" >&5
+echo "configure:910: checking for POSIXized ISC" >&5
 if test -d /etc/conf/kconfig.d &&
   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
 then
@@ -1170,13 +928,13 @@
 
 if test $ac_cv_prog_gcc = yes; then
     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:1174: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:932: checking whether ${CC-cc} needs -traditional" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
     ac_pattern="Autoconf.*'x'"
   cat > conftest.$ac_ext <<EOF
-#line 1180 "configure"
+#line 938 "configure"
 #include "confdefs.h"
 #include <sgtty.h>
 Autoconf TIOCGETP
@@ -1194,7 +952,7 @@
 
   if test $ac_cv_prog_gcc_traditional = no; then
     cat > conftest.$ac_ext <<EOF
-#line 1198 "configure"
+#line 956 "configure"
 #include "confdefs.h"
 #include <termio.h>
 Autoconf TCGETA
@@ -1217,13 +975,351 @@
 
 
 if test $ac_cv_prog_gcc = yes; then
-	if test $ac_cv_prog_cc_g = yes; then
-		CFLAGS="-Wall -g -O2"
+        if test $ac_cv_prog_cc_g = yes; then
+                CFLAGS="-Wall -g -O2"
+        else
+                CFLAGS="-Wall -O2"
+        fi
+else
+        CFLAGS="-O"
+fi
+
+echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+echo "configure:989: checking for Cygwin environment" >&5
+if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 994 "configure"
+#include "confdefs.h"
+
+int main() {
+
+#ifndef __CYGWIN__
+#define __CYGWIN__ __CYGWIN32__
+#endif
+return __CYGWIN__;
+; return 0; }
+EOF
+if { (eval echo configure:1005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_cygwin=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_cygwin=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_cygwin" 1>&6
+CYGWIN=
+test "$ac_cv_cygwin" = yes && CYGWIN=yes
+echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
+echo "configure:1022: checking for mingw32 environment" >&5
+if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1027 "configure"
+#include "confdefs.h"
+
+int main() {
+return __MINGW32__;
+; return 0; }
+EOF
+if { (eval echo configure:1034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_mingw32=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_mingw32=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_mingw32" 1>&6
+MINGW32=
+test "$ac_cv_mingw32" = yes && MINGW32=yes
+
+
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:1053: checking for executable suffix" >&5
+if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
+  ac_cv_exeext=.exe
+else
+  rm -f conftest*
+  echo 'int main () { return 0; }' > conftest.$ac_ext
+  ac_cv_exeext=
+  if { (eval echo configure:1063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+    for file in conftest.*; do
+      case $file in
+      *.c | *.o | *.obj) ;;
+      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
+      esac
+    done
+  else
+    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+  fi
+  rm -f conftest*
+  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
+fi
+fi
+
+EXEEXT=""
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
+
+
+
+# Check whether --with-network or --without-network was given.
+if test "${with_network+set}" = set; then
+  withval="$with_network"
+  :
+fi
+
+if test "x$with_network" != "x" ; then
+	NETWORK_NAME="$with_network"
+fi
+
+# Check whether --with-chrootdir or --without-chrootdir was given.
+if test "${with_chrootdir+set}" = set; then
+  withval="$with_chrootdir"
+  :
+fi
+
+if test "x$with_chrootdir" != "x" ; then
+	chrootdir="$with_chrootdir"
+else
+	pre=$prefix
+	if test "X$pre" = "XNONE" ; then
+		pre=/usr/local
+	fi
+	
+	if test "X$pre" = "X/usr" -o "X$pre" = "X/usr/local" ; then
+		chrootdir='${prefix}/chroots/csircd'
 	else
-		CFLAGS="-Wall -O2"
+		chrootdir='${prefix}/chroot'
 	fi
-else
-	CFLAGS="-O"
+fi
+
+# Check whether --with-nicklen or --without-nicklen was given.
+if test "${with_nicklen+set}" = set; then
+  withval="$with_nicklen"
+  :
+fi
+
+if test "x$with_nicklen" != "x" ; then
+	DEFAULTMAXNICKLEN=$with_nicklen
+fi
+
+# Check whether --with-userlen or --without-userlen was given.
+if test "${with_userlen+set}" = set; then
+  withval="$with_userlen"
+  :
+fi
+
+if test "x$with_userlen" != "x" ; then
+	DEFAULTMAXUSERLEN=$with_userlen
+fi
+
+# Check whether --with-hostlen or --without-hostlen was given.
+if test "${with_hostlen+set}" = set; then
+  withval="$with_hostlen"
+  :
+fi
+
+if test "x$with_hostlen" != "x" ; then
+	DEFAULTMAXHOSTLEN=$with_hostlen
+fi
+
+# Check whether --with-reallen or --without-reallen was given.
+if test "${with_reallen+set}" = set; then
+  withval="$with_reallen"
+  :
+fi
+
+if test "x$with_reallen" != "x" ; then
+	DEFAULTMAXREALLEN=$with_reallen
+fi
+
+# Check whether --with-channellen or --without-channellen was given.
+if test "${with_channellen+set}" = set; then
+  withval="$with_channellen"
+  :
+fi
+
+if test "x$with_channellen" != "x" ; then
+	DEFAULTMAXCHANNELLEN=$with_channellen
+fi
+
+# Check whether --with-topiclen or --without-topiclen was given.
+if test "${with_topiclen+set}" = set; then
+  withval="$with_topiclen"
+  :
+fi
+
+if test "x$with_topiclen" != "x" ; then
+	DEFAULTMAXTOPICLEN=$with_topiclen
+fi
+
+# Check whether --with-quitlen or --without-quitlen was given.
+if test "${with_quitlen+set}" = set; then
+  withval="$with_quitlen"
+  :
+fi
+
+if test "x$with_quitlen" != "x" ; then
+	DEFAULTMAXQUITLEN=$with_quitlen
+fi
+
+# Check whether --with-awaylen or --without-awaylen was given.
+if test "${with_awaylen+set}" = set; then
+  withval="$with_awaylen"
+  :
+fi
+
+if test "x$with_awaylen" != "x" ; then
+	DEFAULTMAXAWAYLEN=$with_awaylen
+fi
+
+# Check whether --with-kicklen or --without-kicklen was given.
+if test "${with_kicklen+set}" = set; then
+  withval="$with_kicklen"
+  :
+fi
+
+if test "x$with_kicklen" != "x" ; then
+	DEFAULTMAXKICKLEN=$with_kicklen
+fi
+
+# Check whether --with-killlen or --without-killlen was given.
+if test "${with_killlen+set}" = set; then
+  withval="$with_killlen"
+  :
+fi
+
+if test "x$with_killlen" != "x" ; then
+	DEFAULTMAXKILLLEN=$with_killlen
+fi
+
+# Check whether --with-maxbans or --without-maxbans was given.
+if test "${with_maxbans+set}" = set; then
+  withval="$with_maxbans"
+  :
+fi
+
+if test "x$with_maxbans" != "x" ; then
+	DEFAULTMAXBANS=$with_maxbans
+fi
+
+# Check whether --with-maxchannels or --without-maxchannels was given.
+if test "${with_maxchannels+set}" = set; then
+  withval="$with_maxchannels"
+  :
+fi
+
+if test "x$with_maxchannels" != "x" ; then
+	DEFAULTMAXCHANNELSPERUSER=$with_maxchannels
+fi
+
+# Check whether --with-maxmodeparams or --without-maxmodeparams was given.
+if test "${with_maxmodeparams+set}" = set; then
+  withval="$with_maxmodeparams"
+  :
+fi
+
+if test "x$with_maxmodeparams" != "x" ; then
+	DEFAULTMAXMODEPARAMS=$with_maxmodeparams
+fi
+
+# Check whether --with-maxtargets or --without-maxtargets was given.
+if test "${with_maxtargets+set}" = set; then
+  withval="$with_maxtargets"
+  :
+fi
+
+if test "x$with_maxtargets" != "x" ; then
+	DEFAULTMAXTARGETS=$with_maxtargets
+fi
+
+# Check whether --with-classlen or --without-classlen was given.
+if test "${with_classlen+set}" = set; then
+  withval="$with_classlen"
+  :
+fi
+
+if test "x$with_classlen" != "x" ; then
+	MAXCLASSNAME=$with_maxchannels
+fi
+
+# Check whether --with-votes or --without-votes was given.
+if test "${with_votes+set}" = set; then
+  withval="$with_votes"
+  :
+fi
+
+if test "x$with_votes" != "x" ; then
+	DEFAULT_GLINE_VOTES_NEEDED=$with_votes
+fi
+
+# Check whether --with-triggered-timeout or --without-triggered-timeout was given.
+if test "${with_triggered_timeout+set}" = set; then
+  withval="$with_triggered_timeout"
+  :
+fi
+
+if test "x$with_triggered_timeout" != "x" ; then
+	DEFAULT_GLINE_TRIGGERED_TIMEOUT=$with_triggered_timeout
+fi
+
+# Check whether --with-untriggered-timeout or --without-untriggered-timeout was given.
+if test "${with_untriggered_timeout+set}" = set; then
+  withval="$with_untriggered_timeout"
+  :
+fi
+
+if test "x$with_untriggered_timeout" != "x" ; then
+	DEFAULT_GLINE_UNTRIGGERED_TIMEOUT=$with_untriggered_timeout
+fi
+
+# Check whether --with-queuesize or --without-queuesize was given.
+if test "${with_queuesize+set}" = set; then
+  withval="$with_queuesize"
+  :
+fi
+
+if test "x$with_queuesize" != "x" ; then
+	QUEUE_SIZE=$with_queuesize
+fi
+
+# Check whether --with-queueflags or --without-queueflags was given.
+if test "${with_queueflags+set}" = set; then
+  withval="$with_queueflags"
+  :
+fi
+
+if test "x$with_queueflags" != "x" ; then
+	QUEUEINIT_FLAGS=$with_queueflags
+fi
+
+# Check whether --enable-opasswd-crypt or --disable-opasswd-crypt was given.
+if test "${enable_opasswd_crypt+set}" = set; then
+  enableval="$enable_opasswd_crypt"
+  :
+fi
+
+if test "x$enable_opasswd_crypt" = "xno" ; then
+	CRYPT_OPER_PASSWORD=0
 fi
 
 for ac_prog in sum cksum
@@ -1231,7 +1327,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1235: checking for $ac_word" >&5
+echo "configure:1331: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SUM'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1272,17 +1368,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1276: checking for $ac_hdr" >&5
+echo "configure:1372: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1281 "configure"
+#line 1377 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1310,7 +1406,7 @@
 
 
 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:1314: checking for crypt in -lcrypt" >&5
+echo "configure:1410: checking for crypt in -lcrypt" >&5
 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1318,7 +1414,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lcrypt  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1322 "configure"
+#line 1418 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1329,7 +1425,7 @@
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:1333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1357,7 +1453,7 @@
 fi
 
 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:1361: checking for socket in -lsocket" >&5
+echo "configure:1457: checking for socket in -lsocket" >&5
 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1365,7 +1461,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1369 "configure"
+#line 1465 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1376,7 +1472,7 @@
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:1380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1404,7 +1500,7 @@
 fi
 
 echo $ac_n "checking for socket in -lnsl""... $ac_c" 1>&6
-echo "configure:1408: checking for socket in -lnsl" >&5
+echo "configure:1504: checking for socket in -lnsl" >&5
 ac_lib_var=`echo nsl'_'socket | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1412,7 +1508,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1416 "configure"
+#line 1512 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1423,7 +1519,7 @@
 socket()
 ; return 0; }
 EOF
-if { (eval echo configure:1427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1451,7 +1547,7 @@
 fi
 
 echo $ac_n "checking for res_mkquery in -lresolv""... $ac_c" 1>&6
-echo "configure:1455: checking for res_mkquery in -lresolv" >&5
+echo "configure:1551: checking for res_mkquery in -lresolv" >&5
 ac_lib_var=`echo resolv'_'res_mkquery | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1459,7 +1555,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1463 "configure"
+#line 1559 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1470,7 +1566,7 @@
 res_mkquery()
 ; return 0; }
 EOF
-if { (eval echo configure:1474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1498,7 +1594,7 @@
 fi
 
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:1502: checking for dlopen in -ldl" >&5
+echo "configure:1598: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1506,7 +1602,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1510 "configure"
+#line 1606 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1517,7 +1613,7 @@
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:1521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1546,12 +1642,12 @@
 
 
 echo $ac_n "checking for getpagesize""... $ac_c" 1>&6
-echo "configure:1550: checking for getpagesize" >&5
+echo "configure:1646: checking for getpagesize" >&5
 if eval "test \"`echo '$''{'ac_cv_func_getpagesize'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1555 "configure"
+#line 1651 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char getpagesize(); below.  */
@@ -1574,7 +1670,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_getpagesize=yes"
 else
@@ -1595,12 +1691,12 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for sysconf""... $ac_c" 1>&6
-echo "configure:1599: checking for sysconf" >&5
+echo "configure:1695: checking for sysconf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_sysconf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1604 "configure"
+#line 1700 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char sysconf(); below.  */
@@ -1623,7 +1719,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_sysconf=yes"
 else
@@ -1648,12 +1744,12 @@
 fi
 
 echo $ac_n "checking for poll""... $ac_c" 1>&6
-echo "configure:1652: checking for poll" >&5
+echo "configure:1748: checking for poll" >&5
 if eval "test \"`echo '$''{'ac_cv_func_poll'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1657 "configure"
+#line 1753 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char poll(); below.  */
@@ -1676,7 +1772,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_poll=yes"
 else
@@ -1699,12 +1795,12 @@
 fi
 
 echo $ac_n "checking for dn_skipname""... $ac_c" 1>&6
-echo "configure:1703: checking for dn_skipname" >&5
+echo "configure:1799: checking for dn_skipname" >&5
 if eval "test \"`echo '$''{'ac_cv_func_dn_skipname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1708 "configure"
+#line 1804 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dn_skipname(); below.  */
@@ -1727,7 +1823,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_dn_skipname=yes"
 else
@@ -1751,12 +1847,12 @@
 fi
 
 echo $ac_n "checking for mmap""... $ac_c" 1>&6
-echo "configure:1755: checking for mmap" >&5
+echo "configure:1851: checking for mmap" >&5
 if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1760 "configure"
+#line 1856 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char mmap(); below.  */
@@ -1779,7 +1875,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_mmap=yes"
 else
@@ -1802,12 +1898,12 @@
 fi
 
 echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6
-echo "configure:1806: checking for vsnprintf" >&5
+echo "configure:1902: checking for vsnprintf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1811 "configure"
+#line 1907 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vsnprintf(); below.  */
@@ -1830,7 +1926,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_vsnprintf=yes"
 else
@@ -1854,12 +1950,12 @@
 
 
 echo $ac_n "checking for working dlopen""... $ac_c" 1>&6
-echo "configure:1858: checking for working dlopen" >&5
+echo "configure:1954: checking for working dlopen" >&5
 	if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1863 "configure"
+#line 1959 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -1874,7 +1970,7 @@
 }
 
 EOF
-if { (eval echo configure:1878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   IRCDSO="csircd.so"
 cat >> confdefs.h <<\EOF
@@ -1894,12 +1990,12 @@
 
 
 echo $ac_n "checking for linux""... $ac_c" 1>&6
-echo "configure:1898: checking for linux" >&5
+echo "configure:1994: checking for linux" >&5
 	if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1903 "configure"
+#line 1999 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -1914,7 +2010,7 @@
 }
 
 EOF
-if { (eval echo configure:1918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   LIBCA="/usr/lib/libc.a"
 echo "$ac_t""yes" 1>&6
@@ -1934,12 +2030,12 @@
 
 
 echo $ac_n "checking for strerror""... $ac_c" 1>&6
-echo "configure:1938: checking for strerror" >&5
+echo "configure:2034: checking for strerror" >&5
 if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1943 "configure"
+#line 2039 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char strerror(); below.  */
@@ -1962,7 +2058,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_strerror=yes"
 else
@@ -1983,12 +2079,12 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for sys_errlist declaration""... $ac_c" 1>&6
-echo "configure:1987: checking for sys_errlist declaration" >&5
+echo "configure:2083: checking for sys_errlist declaration" >&5
 	if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1992 "configure"
+#line 2088 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -2001,7 +2097,7 @@
 }
 
 EOF
-if { (eval echo configure:2005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   cat >> confdefs.h <<\EOF
 #define SYS_ERRLIST_DECLARED 1
@@ -2020,12 +2116,12 @@
 
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2024: checking return type of signal handlers" >&5
+echo "configure:2120: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2029 "configure"
+#line 2125 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -2042,7 +2138,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:2046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -2229,6 +2325,7 @@
 s%@mandir@%$mandir%g
 s%@CC@%$CC%g
 s%@CPP@%$CPP%g
+s%@EXEEXT@%$EXEEXT%g
 s%@SUM@%$SUM%g
 s%@LIBCA@%$LIBCA%g
 s%@IRCDSO@%$IRCDSO%g
diff -uNrd csircd-1.14.dist/configure.in csircd-1.14/configure.in
--- csircd-1.14.dist/configure.in	2003-03-17 03:53:22.000000000 -0500
+++ csircd-1.14/configure.in	2003-04-27 08:33:42.000000000 -0400
@@ -15,6 +15,24 @@
 AC_INIT(source/ircdcore.c)
 AC_CONFIG_HEADER(include/setup.h:include/setup.h.in)
 
+AC_PROG_CC
+AC_PROG_CPP
+AC_AIX
+AC_ISC_POSIX
+AC_PROG_GCC_TRADITIONAL
+
+if test $ac_cv_prog_gcc = yes; then
+        if test $ac_cv_prog_cc_g = yes; then
+                CFLAGS="-Wall -g -O2"
+        else
+                CFLAGS="-Wall -O2"
+        fi
+else
+        CFLAGS="-O"
+fi
+
+AC_EXEEXT
+
 dnl
 dnl special csircd settings
 dnl
@@ -175,22 +193,6 @@
 	CRYPT_OPER_PASSWORD=0
 fi
 
-AC_PROG_CC
-AC_PROG_CPP
-AC_AIX
-AC_ISC_POSIX
-AC_PROG_GCC_TRADITIONAL
-
-if test $ac_cv_prog_gcc = yes; then
-	if test $ac_cv_prog_cc_g = yes; then
-		CFLAGS="-Wall -g -O2"
-	else
-		CFLAGS="-Wall -O2"
-	fi
-else
-	CFLAGS="-O"
-fi
-
 AC_PATH_PROGS(SUM, sum cksum, true, /usr/ucb:$PATH)
 
 AC_CHECK_HEADERS(crypt.h stropts.h time.h sys/time.h sys/ioctl.h sys/filio.h)
