+# -- Definitionen --
+
+AC_DEFINE_UNQUOTED(TARGET_CPU, "$target_cpu" )
+AC_DEFINE_UNQUOTED(TARGET_VENDOR, "$target_vendor" )
+AC_DEFINE_UNQUOTED(TARGET_OS, "$target_os" )
+
+# -- Variablen --
+
+if test "$GCC" = "yes"; then
+ the_CFLAGS="-Wmissing-declarations -Wpointer-arith -Wstrict-prototypes"
+ ansi=" -ansi"
+ pedantic=" -pedantic"
+
+ $CC --version | grep 20020420 >/dev/null 2>&1
+ if test $? -eq 0; then
+ # Mac OS X (and Darwin?) ship with a slightly broken
+ # prerelease of GCC 3.1 which don't like -pedantic:
+ AC_MSG_RESULT([detected broken GNU C compiler, disabling "-pedantic"])
+ pedantic=""
+ fi
+
+ $CC --version | grep 20030304 >/dev/null 2>&1
+ if test $? -eq 0; then
+ # Mac OS X 10.3 (and Darwin 7.0?) have a strange gcc (or
+ # system header files?) which produces lots of errors when
+ # using -ansi; so we don't =:-)
+ AC_MSG_RESULT([detected broken GNU C compiler, disabling "-ansi"])
+ ansi=""
+ fi
+
+ uname | grep "CYGWIN" >/dev/null 2>&1
+ if test $? -eq 0; then
+ # The include files of Cygwin don't like -ansi,
+ # so we disable it:
+ AC_MSG_RESULT([detected Cygwin, disabling "-ansi"])
+ ansi=""
+ fi
+
+ add_CFLAGS="-pipe -Wall -W${ansi}${pedantic} $CFLAGS $CFLAGS_ADD"
+else
+ the_CFLAGS="$CFLAGS"
+ add_CFLAGS="$CFLAGS_ADD"
+fi
+
+CFLAGS="$the_CFLAGS $add_CFLAGS $add_DEFINES -DSYSCONFDIR='\"\$(sysconfdir)\"'"
+
+# -- Ausgabe der Dateien --
+
+AC_OUTPUT([ \
+ Makefile \
+ doc/Makefile \
+ src/Makefile \
+ src/portab/Makefile \
+ src/tool/Makefile \
+ src/ngircd/Makefile \
+ src/testsuite/Makefile \
+ man/Makefile \
+ contrib/Makefile \
+ contrib/Debian/Makefile \
+])
+
+# -- Result --
+
+echo
+echo "ngIRCd has been configured with the following options:"
+echo
+
+# Someone please show me a better way :) [borrowed by OpenSSH]
+B=`eval echo ${bindir}` ; B=`eval echo ${B}`
+S=`eval echo ${sbindir}` ; S=`eval echo ${S}`
+C=`eval echo ${sysconfdir}` ; C=`eval echo ${C}`
+M=`eval echo ${mandir}` ; M=`eval echo ${M}`
+D=`eval echo ${datadir}/doc/${PACKAGE}` ; D=`eval echo ${D}`
+
+echo " Host: ${host}"
+echo " Compiler: ${CC}"
+echo " Compiler flags: ${the_CFLAGS}"
+test -n "$add_CFLAGS" && echo " ${add_CFLAGS}"
+test -n "$add_DEFINES" && echo " ${add_DEFINES}"
+test -n "$CPPFLAGS" && echo " Preprocessor flags: ${CPPFLAGS}"
+test -n "$LDFLAGS" && echo " Linker flags: ${LDFLAGS}"
+test -n "$LIBS" && echo " Libraries: ${LIBS}"
+echo
+echo " 'ngircd' binary: $S"
+echo " Configuration file: $C"
+echo " Manual pages: $M"
+echo " Documentation: $D"
+echo
+
+echo $ECHO_N " Syslog support: $ECHO_C"
+test "$x_syslog_on" = "yes" \
+ && echo $ECHO_N "yes $ECHO_C" \
+ || echo $ECHO_N "no $ECHO_C"
+echo $ECHO_N " Enable debug code: $ECHO_C"
+test "$x_debug_on" = "yes" \
+ && echo "yes" \
+ || echo "no"
+
+echo $ECHO_N " zlib compression: $ECHO_C"
+test "$x_zlib_on" = "yes" \
+ && echo $ECHO_N "yes $ECHO_C" \
+ || echo $ECHO_N "no $ECHO_C"
+echo $ECHO_N " IRC sniffer: $ECHO_C"
+test "$x_sniffer_on" = "yes" \
+ && echo "yes" \
+ || echo "no"
+
+echo $ECHO_N " Use TCP Wrappers: $ECHO_C"
+test "$x_tcpwrap_on" = "yes" \
+ && echo $ECHO_N "yes $ECHO_C" \
+ || echo $ECHO_N "no $ECHO_C"
+echo $ECHO_N " Strict RFC mode: $ECHO_C"
+test "$x_strict_rfc_on" = "yes" \
+ && echo "yes" \
+ || echo "no"
+
+echo $ECHO_N " Rendezvous support: $ECHO_C"
+test "$x_rendezvous_on" = "yes" \
+ && echo $ECHO_N "yes $ECHO_C" \
+ || echo $ECHO_N "no $ECHO_C"
+echo $ECHO_N " IRC+ protocol: $ECHO_C"
+test "$x_ircplus_on" = "yes" \
+ && echo "yes" \
+ || echo "no"
+
+echo $ECHO_N " IDENT support: $ECHO_C"
+test "$x_identauth_on" = "yes" \
+ && echo $ECHO_N "yes $ECHO_C" \
+ || echo $ECHO_N "no $ECHO_C"