This repository has been archived on 2025-02-12. You can view files and clone it, but cannot push or open issues or pull requests.
NeoStats/configure.in

478 lines
12 KiB
Text
Raw Normal View History

2000-02-29 10:21:48 +00:00
dnl Process this file with autoconf to produce a configure script.
AC_INIT(dl.c)
AC_CONFIG_HEADER(config.h)
2000-02-29 10:21:48 +00:00
PACKAGE=NeoStats
AC_DEFINE(MAJOR, 2)
AC_DEFINE(MINOR, 5)
AC_DEFINE(REV, 11)
VERSION=2.5.11
AC_PREFIX_DEFAULT(~/NeoStats)
CFLAGS="$CFLAGS -O2 -g"
2000-02-29 10:21:48 +00:00
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
2000-02-29 10:21:48 +00:00
2002-08-16 16:37:41 +00:00
AC_PROG_CPP
AC_PROG_RANLIB
2000-02-29 10:21:48 +00:00
dnl Checks for libraries.
dnl Replace `main' with a function in -ldl:
2002-03-06 13:25:51 +00:00
AC_CHECK_LIB(dl, dlopen)
2000-02-29 10:21:48 +00:00
2002-08-16 16:37:41 +00:00
ADNS_C_GETFUNC(socket,socket)
ADNS_C_GETFUNC(inet_ntoa,nsl)
AC_CHECK_FUNC(backtrace,
[AC_DEFINE(HAVE_BACKTRACE, 1, 'backtrace function available')
LIBS="-g $LIBS"]
)
2000-02-29 10:21:48 +00:00
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(sys/time.h unistd.h limits.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
dnl Checks for library functions.
AC_FUNC_FNMATCH
AC_TYPE_SIGNAL
AC_FUNC_STRFTIME
AC_CHECK_FUNCS(strlcpy strlcat strnlen)
AC_CHECK_FUNCS(socket strdup)
AC_CHECK_FUNCS(bcopy memmove strerror)
2000-02-29 10:21:48 +00:00
2002-08-16 16:37:41 +00:00
ADNS_C_GETFUNC(inet_aton,resolv,[
LIBS="-lresolv $LIBS";
AC_MSG_WARN([inet_aton is in libresolv, urgh. Must use -lresolv.])
])
DPKG_CACHED_TRY_COMPILE(inlines,dpkg_cv_c_inline,,
[} inline int foo (int x) {],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_INLINE),
AC_MSG_RESULT(no))
ADNS_C_GCCATTRIB
AC_CHECK_HEADERS(sys/select.h)
AC_MSG_CHECKING(for INADDR_LOOPBACK)
AC_CACHE_VAL(adns_cv_decl_inaddrloopback,[
AC_TRY_COMPILE([
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
],[
INADDR_LOOPBACK;
],
adns_cv_decl_inaddrloopback=yes,
adns_cv_decl_inaddrloopback=no)])
if test "$adns_cv_decl_inaddrloopback" = yes; then
AC_MSG_RESULT(found)
else
AC_MSG_RESULT([not in standard headers, urgh...])
AC_CHECK_HEADER(rpc/types.h,[
AC_DEFINE(HAVEUSE_RPCTYPES_H)
],[
AC_MSG_ERROR([cannot find INADDR_LOOPBACK or rpc/types.h])
])
fi
2000-02-29 10:21:48 +00:00
PCRE_MAJOR=4
PCRE_MINOR=3
PCRE_DATE=21-May-2003
PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR}
dnl Default values for miscellaneous macros
AC_DEFINE(POSIX_MALLOC_THRESHOLD,10)
2000-02-29 10:21:48 +00:00
dnl check if we are running with Debug....
AC_MSG_CHECKING(Whether to Enable Debuging...)
AC_ARG_ENABLE(debug,
[ --enable-debug - Enable Debuging],
[ case "$enableval" in
yes)
AC_DEFINE(DEBUG, 1, 'Enable Debugging')
CFLAGS="$CFLAGS -ggdb -Wall"
2000-02-29 10:21:48 +00:00
AC_MSG_RESULT(yes - Watch your Log Files)
;;
*)
CFLAGS="$CFLAGS -DNDEBUG"
2000-02-29 10:21:48 +00:00
AC_MSG_RESULT(no)
;;
esac],
CFLAGS="$CFLAGS -DNDEBUG"
2000-02-29 10:21:48 +00:00
AC_MSG_RESULT(no)
)
dnl check to see if we should enable Unreal IRCD Support
2003-11-28 22:33:35 +00:00
AC_MSG_CHECKING(Whether to Enable Unreal 3.1.x IRCD Support...)
AC_ARG_ENABLE(unreal, [ --enable-unreal31 - enable Unreal 3.1.x IRCD Support],
2000-02-29 10:21:48 +00:00
[ case "$enableval" in
yes)
AC_DEFINE(UNREAL, 1, 'Enable Unreal 3.1.x Support')
IRCD_FILES_SRC="Unreal.c"
IRCD_FILES_OBJS="Unreal.o"
AC_MSG_RESULT(yes)
;;
*)
AC_MSG_RESULT(no)
;;
esac],
AC_MSG_RESULT(no))
2003-11-28 22:33:35 +00:00
AC_MSG_CHECKING(Whether to Enable Unreal 3.2.x IRCD Support...)
AC_ARG_ENABLE(unreal32, [ --enable-unreal32 - enable Unreal 3.2.x IRCD Support],
[ case "$enableval" in
yes)
AC_DEFINE(UNREAL, 1, 'Enable Unreal 3.1.x Support')
AC_DEFINE(UNREAL32, 1, 'Enable Unreal 3.2.x Support')
IRCD_FILES_SRC="Unreal.c"
IRCD_FILES_OBJS="Unreal.o"
2000-02-29 10:21:48 +00:00
AC_MSG_RESULT(yes)
;;
*)
AC_MSG_RESULT(no)
;;
esac],
AC_MSG_RESULT(no))
dnl check to see if we should enable Ultimate IRCD Support
AC_MSG_CHECKING(Whether to Enable Ultimate 2.x.x IRCD Support...)
AC_ARG_ENABLE(ultimate2, [ --enable-ultimate2 - enable Ultimate 2.x.x IRCD Support],
[ case "$enableval" in
yes)
AC_DEFINE(ULTIMATE, 1, 'Enable Ultimate Support')
IRCD_FILES_SRC="Ultimate.c"
IRCD_FILES_OBJS="Ultimate.o"
AC_MSG_RESULT(yes)
;;
*)
AC_MSG_RESULT(no)
;;
esac],
AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(Whether to Enable Ultimate 3.x.x IRCD Support...)
AC_ARG_ENABLE(ultimate3, [ --enable-ultimate3 - enable Ultimate 3.x.x IRCD Support],
[ case "$enableval" in
yes)
AC_DEFINE(ULTIMATE, 1, 'Enable Ultimate 2.x.x Support')
AC_DEFINE(ULTIMATE3, 1, "Enable Ultimate 3.x.x Support')
IRCD_FILES_SRC="Ultimate.c"
IRCD_FILES_OBJS="Ultimate.o"
AC_MSG_RESULT(yes)
;;
*)
AC_MSG_RESULT(no)
;;
esac],
AC_MSG_RESULT(no)
)
2002-07-30 06:11:23 +00:00
AC_MSG_CHECKING(Whether to Enable Hybrid 7.x.x IRCD Support...)
AC_ARG_ENABLE(hybrid7, [ --enable-hybrid7 - enable Hybrid7 IRCD Support],
[ case "$enableval" in
yes)
AC_DEFINE(HYBRID7, 1, 'Enable hybrid7 IRCD support')
IRCD_FILES_SRC="hybrid7.c"
IRCD_FILES_OBJS="hybrid7.o"
AC_MSG_RESULT(yes)
;;
*)
AC_MSG_RESULT(no)
;;
esac],
AC_MSG_RESULT(no)
)
2002-10-13 06:57:43 +00:00
AC_MSG_CHECKING(Whether to Enable NeoIRCd IRCD Support...)
AC_ARG_ENABLE(neoircd, [ --enable-neoircd - enable NeoIRCd IRCD Support],
[ case "$enableval" in
yes)
AC_DEFINE(NEOIRCD, 1, 'Enable NeoIRCd IRCD support')
IRCD_FILES_SRC="neoircd.c"
IRCD_FILES_OBJS="neoircd.o"
AC_MSG_RESULT(yes)
;;
*)
AC_MSG_RESULT(no)
;;
esac],
AC_MSG_RESULT(no)
)
2002-07-30 06:11:23 +00:00
dnl check to see if we should enable Quantum IRCD Support
AC_MSG_CHECKING(Whether to Enable Quantum IRCD Support...)
AC_ARG_ENABLE(quantum, [ --enable-quantum - enable Quantum IRCD Support],
[ case "$enableval" in
yes)
AC_DEFINE(QUANTUM, 1, 'Enable Quantum Support')
IRCD_FILES_SRC="QuantumIRCd.c"
IRCD_FILES_OBJS="QuantumIRCd.o"
AC_MSG_RESULT(yes)
;;
*)
AC_MSG_RESULT(no)
;;
esac],
AC_MSG_RESULT(no))
dnl check to see if we should enable Mystic IRCD Support
AC_MSG_CHECKING(Whether to Enable Mystic IRCD Support...)
AC_ARG_ENABLE(mystic, [ --enable-mystic - enable Mystic IRCD Support],
[ case "$enableval" in
yes)
AC_DEFINE(MYSTIC, 1, 'Enable Mystic Support')
2003-07-01 12:02:33 +00:00
IRCD_FILES_SRC="mystic.c"
IRCD_FILES_OBJS="mystic.o"
AC_MSG_RESULT(yes)
;;
*)
AC_MSG_RESULT(no)
;;
esac],
AC_MSG_RESULT(no))
dnl check to see if we should enable Bahamut IRCD Support
AC_MSG_CHECKING(Whether to Enable Bahamut IRCD Support...)
AC_ARG_ENABLE(bahamut, [ --enable-bahamut - enable Bahamut IRCD Support],
[ case "$enableval" in
yes)
AC_DEFINE(BAHAMUT, 1, 'Enable Bahamut Support')
IRCD_FILES_SRC="Bahamut.c"
IRCD_FILES_OBJS="Bahamut.o"
AC_MSG_RESULT(yes)
;;
*)
AC_MSG_RESULT(no)
;;
esac],
AC_MSG_RESULT(no))
dnl check to see if we should enable IRCu IRCD Support
AC_MSG_CHECKING(Whether to Enable IRCu IRCD Support...)
AC_ARG_ENABLE(ircu, [ --enable-ircu - enable IRCu IRCD Support],
[ case "$enableval" in
yes)
2003-10-17 11:11:13 +00:00
dnl AC_MSG_ERROR('Sorry IRCu support isnt complete yet')
AC_DEFINE(IRCU, 1, 'Enable IRCu Support')
IRCD_FILES_SRC="Ircu.c"
IRCD_FILES_OBJS="Ircu.o"
AC_MSG_RESULT(yes)
;;
*)
AC_MSG_RESULT(no)
;;
esac],
AC_MSG_RESULT(no))
dnl check to see if we should enable liquid IRCD Support
AC_MSG_CHECKING(Whether to Enable Liquid IRCD Support...)
AC_ARG_ENABLE(liquid, [ --enable-liquid - enable Liquid IRCD Support],
[ case "$enableval" in
yes)
AC_DEFINE(LIQUID, 1, 'Enable Liquid IRCd Support')
IRCD_FILES_SRC="liquidircd.c"
IRCD_FILES_OBJS="liquidircd.o"
AC_MSG_RESULT(yes)
;;
*)
AC_MSG_RESULT(no)
;;
esac],
AC_MSG_RESULT(no)
)
do_serviceroots=no
AC_MSG_CHECKING(A compatible IRCD is specified)
case "$IRCD_FILES_SRC" in
"Ultimate.c")
AC_MSG_RESULT(yes)
;;
"Unreal.c")
AC_MSG_RESULT(yes)
;;
2002-07-30 06:11:23 +00:00
"hybrid7.c")
AC_MSG_RESULT(yes)
2003-07-15 09:16:15 +00:00
AC_MSG_CHECKING(Auto-Enabling ServiceRoots Authentication Module)
do_serviceroots=yes
2003-07-15 09:16:15 +00:00
AC_DEFINE(EXTAUTH, 1, 'Use IRCD Authentication')
EXTAUTH_SRC="$EXTAUTH_SRC serviceroots.c"
EXTAUTH_OBJS="$EXTAUTH_OBJS serviceroots.o"
MODULES="$MODULES extauth"
AC_MSG_RESULT(OK)
;;
2003-07-01 12:02:33 +00:00
"mystic.c")
AC_MSG_RESULT(yes)
;;
"QuantumIRCd.c")
AC_MSG_RESULT(yes)
;;
"Bahamut.c")
AC_MSG_RESULT(yes)
;;
"Ircu.c")
AC_MSG_RESULT(yes)
2002-07-30 06:11:23 +00:00
;;
2002-10-13 06:57:43 +00:00
"neoircd.c")
AC_MSG_RESULT(yes)
;;
"liquidircd.c")
AC_MSG_RESULT(yes)
;;
*)
2002-07-30 06:11:23 +00:00
AC_MSG_RESULT(no)
AC_MSG_ERROR('You must define a IRCD to use. See ./configure --help for more information')
;;
esac
if test "$do_serviceroots" = no; then
dnl check to see what type of authentication to use
AC_MSG_CHECKING(What type of Authentication to use...)
AC_ARG_ENABLE(auth, [ --enable-auth=TYPE - what type of Authentication to use. See Readme File],
[ case "$enableval" in
sr)
AC_DEFINE(EXTAUTH, 1, 'Use IRCD Authentication')
EXTAUTH_SRC="$EXTAUTH_SRC serviceroots.c"
EXTAUTH_OBJS="$EXTAUTH_OBJS serviceroots.o"
AC_MSG_RESULT(External)
MODULES="$MODULES extauth"
;;
*)
AC_MSG_RESULT(IRCD)
;;
esac],
AC_MSG_RESULT(IRCD)
)
fi
2000-02-29 10:21:48 +00:00
2002-11-18 13:57:54 +00:00
AC_MSG_CHECKING(To Enable Raw command?)
AC_ARG_ENABLE(raw, [ --enable-raw - Enable Raw command],
[ case "$enableval" in
yes)
AC_DEFINE(USE_RAW, 1, 'Use Raw command')
AC_MSG_RESULT(yes)
;;
*)
AC_MSG_RESULT(no)
;;
esac],
AC_MSG_RESULT(no)
)
dnl Lets see what Modules to Compile
AC_MSG_CHECKING(Any other modules to compile?)
AC_ARG_ENABLE(modules, [ --enable-modules="MODULES" - space seperated list of modules to compile],
AC_MSG_RESULT($enableval)
MODULES="$MODULES $enableval",
AC_MSG_RESULT(none)
)
configtool=no
AC_MSG_CHECKING(Enable Building of ConfigTool?)
AC_ARG_ENABLE(configtool,
[--enable-configtool - Enable building of the configtool program (Needs X windows)],
[if test "$enableval" = yes; then configtool=yes; else configtool=no; fi])
if test "$configtool" = yes; then
AC_MSG_RESULT(Yes.... Testing for Dependancies!)
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
if test "$GTK_CONFIG" = no; then
AC_MSG_WARN([Cannot find GTK+, configtool will not be built])
else
AC_MSG_CHECKING([GTK version (need at least 1.2.0)])
gtk_version=`$GTK_CONFIG --version`
gtk_maj_ver=`echo $gtk_version | cut -f 1 -d .`
gtk_min_ver=`echo $gtk_version | cut -f 2 -d .`
gtk_sub_ver=`echo $gtk_version | cut -f 3 -d .`
AC_MSG_RESULT(${gtk_maj_ver}.${gtk_min_ver}.${gtk_sub_ver})
if test $gtk_maj_ver -lt 1 -o $gtk_min_ver -lt 2; then
configtool=no
AC_MSG_WARN([GTK+ version is too old, configtool will not be built])
fi
fi
else
AC_MSG_RESULT(no)
fi
if test "$configtool" = yes; then
build_configtool=configtool
else
build_configtool=
fi
AC_SUBST(build_configtool)
2000-04-08 12:40:07 +00:00
2000-02-29 10:21:48 +00:00
AC_MSG_CHECKING(Your Current Bank Balance)
AC_MSG_RESULT(Thats Impressive!!!)
AC_MSG_CHECKING(The Modules that will be compiled)
AC_MSG_RESULT($MODULES)
2000-02-29 10:21:48 +00:00
AC_SUBST(DIRINST)
AC_SUBST(CFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(LINK_SIZE)
AC_SUBST(MATCH_LIMIT)
AC_SUBST(NEWLINE)
AC_SUBST(PCRE_MAJOR)
AC_SUBST(PCRE_MINOR)
AC_SUBST(PCRE_DATE)
AC_SUBST(PCRE_VERSION)
AC_SUBST(PCRE_LIB_VERSION)
AC_SUBST(PCRE_POSIXLIB_VERSION)
AC_DEFINE(POSIX_MALLOC_THRESHOLD,10)
AC_SUBST(POSIX_MALLOC_THRESHOLD)
AC_SUBST(UTF8)
2000-02-29 10:21:48 +00:00
AC_SUBST(IRCD_FILES_SRC)
AC_SUBST(IRCD_FILES_OBJS)
2000-02-29 10:21:48 +00:00
AC_SUBST(MODULES)
2002-03-06 13:25:51 +00:00
AC_SUBST(LIBS)
2002-03-18 05:46:15 +00:00
AC_SUBST(EXTAUTH_SRC)
AC_SUBST(EXTAUTH_OBJS)
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
2002-12-14 09:06:45 +00:00
AC_CONFIG_HEADER(adns/config.h)
AC_CONFIG_HEADER(pcre/config.h)
AC_OUTPUT(Makefile.inc Makefile tools/Makefile pcre/Makefile pcre.h:pcre/pcre.in)
NEO_SUBDIR_CONFIG(curl, [--disable-thread --disable-ipv6 --enable-nonblocking])
echo "(*----------------------------------------------------------*)"
echo "(| Important Instructions |)"
echo "(*----------------------------------------------------------*)"
echo "(| if you just typed ./configure and didnt read the README |)"
echo "(| NeoStats may not be configured correctly |)"
echo "(| We Suggest you at least type ./configure --help |)"
echo "(| To see available options and read the Readme file for |)"
echo "(| further information on that option |)"
echo "(*----------------------------------------------------------*)"
echo "(| For Support please visit: |)"
echo "(| IRC: /server irc.irc-chat.net |)"
echo "(| #neostats channel |)"
2003-05-28 14:33:19 +00:00
echo "(| WWW: http://www.neostats.net/boards/ |)"
echo "(*----------------------------------------------------------*)"
echo "(| Now that Configure is complete, just type 'make' to |)"
echo "(| compile the program |)"
echo "(*----------------------------------------------------------*)"
read -p "Press Enter Key to Read the Release Notes"
clear
2003-05-28 14:33:19 +00:00
more ./RELNOTES