AC_PREFIX_DEFAULT($HOME/ircd)
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADER(include/setup.h)
+
AC_CONFIG_SUBDIRS([librb])
AC_CONFIG_AUX_DIR([libltdl/config])
build_ltdl=$with_included_ltdl
AM_CONDITIONAL([BUILD_LTDL], [test x"$build_ltdl" = x"yes"])
+case "$host_os" in
+*cygwin*)
+ AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system])
+ AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
+ ;;
+*mingw*)
+ AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
+ AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
+ AC_CHECK_HEADER(winsock2.h, , [AC_MSG_ERROR([** MinGW and no winsock2.h. I give up.])])
+ LIBS="$LIBS -lws2_32 -liphlpapi"
+ is_mingw="yes"
+ ;;
+*)
+ ;;
+esac
+
+AM_CONDITIONAL([MINGW], [test "$is_mingw" = "yes"])
+
if test "$ac_cv_c_compiler_gnu" = yes; then
IRC_CFLAGS="$IRC_CFLAGS -O0 -Wall"
fi
dnl Networking Functions
dnl ====================
-AC_SEARCH_LIBS(socket, socket, , [AC_MSG_ERROR([You have no socket()! Aborting.])])
+AC_SEARCH_LIBS(socket, [socket ws2_32], , [AC_MSG_ERROR([You have no socket()! Aborting.])])
dnl SunOS/Solaris required libnsl for inet_ntoa()
if test x"$SUN" = xyes; then
AC_DEFINE(CUSTOM_BRANDING, 1, [Define if custom branding is enabled.])
fi
+dnl **********************************************************************
+dnl Enable oper chghost
+dnl **********************************************************************
+
+AC_ARG_ENABLE(oper-chghost,
+AC_HELP_STRING([--enable-oper-chghost],[Enable opers to use the CHGHOST command]),
+[operchghost=$enableval],[operchghost=no])
+
+if test "$operchghost" = yes; then
+ AC_DEFINE(ENABLE_OPER_CHGHOST, 1, [Define this to enable opers to use the CHGHOST command.])
+fi
+
dnl Debug-related options
dnl =====================