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

334 lines
7.4 KiB
Text
Raw Normal View History

# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
AC_INIT()
AC_CONFIG_AUX_DIR(autotools)
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_HEADER([include/config.h])
AC_CONFIG_HEADER([lib/gdbm/autoconf.h])
AC_PREFIX_DEFAULT(~/NeoStats3.0)
AC_CACHE_LOAD
#Standard Defines for autoconf here
x_maj=3
x_min='0'
x_rev="prealpha3-dev"
x_package='NeoStats'
MODULES="connectserv hostserv loveserv moraleserv statserv ircdauth extauth"
#dont edit anything after this line!
x_version=$x_maj.$x_min.$x_rev
AM_INIT_AUTOMAKE($x_package, $x_version)
AM_MAINTAINER_MODE
AC_DEFINE_UNQUOTED(MAJOR, $x_maj, "Major Version Number")
AC_DEFINE_UNQUOTED(MINOR, $x_min, "Minor Version Number")
AC_DEFINE_UNQUOTED(REV, $x_rev, "Revision Version Number")
AC_DEFINE_UNQUOTED(VERSION, $x_version, "Full Version")
AC_LIBTOOL_DLOPEN
dnl AC_DISABLE_SHARED
2004-07-20 11:55:27 +00:00
dnl AC_LIBTOOL_WIN32_DLL
dnl AC_LIBLTDL_CONVENIENCE
# Checks for programs.
AC_PROG_CC
AC_PROG_LIBTOOL
2004-06-01 02:26:49 +00:00
AC_PROG_YACC
AC_PROG_LEX
AC_PATH_PROG( SED, sed, , $PATH:/usr/bin:/usr/local/bin)
# Checks for libraries.
2004-09-29 10:33:54 +00:00
# AC_LIB_LTDL
AC_CHECK_LIB(dl, dlopen)
AC_REPLACE_FUNCS(getopt)
AC_CHECK_MEMBERS([struct stat.st_blksize])
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(
sys/types.h \
sys/time.h \
sys/select.h \
sys/socket.h \
unistd.h \
malloc.h \
2004-08-24 19:14:09 +00:00
assert.h \
ctype.h \
errno.h \
2004-09-02 13:29:31 +00:00
stddef.h \
2004-08-24 18:54:28 +00:00
stdio.h \
stdlib.h \
2004-08-24 18:54:28 +00:00
stdarg.h \
arpa/inet.h \
net/if.h \
netinet/in.h \
netdb.h \
sys/sockio.h \
sys/stat.h \
sys/param.h \
2004-08-24 18:54:28 +00:00
sys/resource.h \
termios.h \
termio.h \
sgtty.h \
fcntl.h \
dlfcn.h \
alloca.h \
winsock.h \
time.h \
io.h \
pwd.h \
utime.h \
2004-06-01 09:22:43 +00:00
limits.h \
sys/utime.h \
sys/poll.h \
setjmp.h \
string.h \
sys/file.h \
memory.y,
dnl to do if not found
[],
dnl to do if found
[],
dnl default includes
[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
]
)
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
AC_C_VOLATILE
AC_CHECK_SIZEOF(off_t)
AC_CHECK_TYPE(long long,
[AC_DEFINE(HAVE_LONGLONG, 1, [if your compiler supports 'long long'])])
# check for ssize_t
AC_CHECK_TYPE(ssize_t, ,
AC_DEFINE(ssize_t, int, [the signed version of size_t]))
TYPE_SOCKLEN_T
TYPE_IN_ADDR_T
AC_FUNC_SELECT_ARGTYPES
AC_CHECK_FUNCS( socket \
select \
strdup \
strstr \
strtok_r \
strftime \
uname \
strcasecmp \
stricmp \
strcmpi \
gethostbyaddr \
gettimeofday \
inet_addr \
inet_ntoa \
inet_pton \
2004-08-04 19:13:02 +00:00
inet_ntop \
tcsetattr \
tcgetattr \
perror \
closesocket \
siginterrupt \
sigaction \
signal \
getpass_r \
strlcat \
getpwuid \
geteuid \
dlopen \
utime \
sigsetjmp \
2004-06-01 09:22:43 +00:00
memmove \
bcopy \
strerror \
poll \
rename \
ftruncate \
flock \
fsync,
dnl if found
[],
dnl if not found, $ac_func is the name we check for
func="$ac_func"
AC_MSG_CHECKING([deeper for $func])
AC_TRY_LINK( [],
[ $func ();],
AC_MSG_RESULT(yes!)
eval "ac_cv_func_$func=yes"
def=`echo "HAVE_$func" | tr 'a-z' 'A-Z'`
AC_DEFINE_UNQUOTED($def, 1, [If you have $func]),
AC_MSG_RESULT(but still no)
)
)
ADNS_C_GCCATTRIB
# Checks for library functions.
AC_REPLACE_FNMATCH
AC_FUNC_FORK
AC_PROG_GCC_TRADITIONAL
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_FUNC_STRFTIME
AC_FUNC_STRNLEN
AC_FUNC_STRTOD
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(strnlen strlcpy strlcat strndup)
dnl backtrace is used for segv reporting
AC_CHECK_FUNC(backtrace,
[AC_DEFINE(HAVE_BACKTRACE, 1, 'backtrace function available')
LIBS="-g $LIBS"]
)
dnl **** Check for underscore on external symbols ****
AC_CACHE_CHECK(whether external symbols need an underscore prefix,
ac_cv_c_extern_prefix,
[saved_libs=$LIBS
LIBS="conftest_asm.s $LIBS"
cat > conftest_asm.s <<EOF
.globl _ac_test
_ac_test:
.long 0
EOF
AC_TRY_LINK([extern int ac_test;],[if (ac_test) return 1],
ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no")
LIBS=$saved_libs])
if test "$ac_cv_c_extern_prefix" = "yes"
then
AC_DEFINE(NEED_UNDERSCORE_PREFIX, 1, "Our Platfrom requires Underscores")
fi
dnl check for berkeley db support
AC_CHECK_HEADER(db.h, AC_DEFINE(HAVE_DB_H, 1, [Define to 1 if you have the <db.h> header file.])
AC_CHECK_LIB(db, db_create, LIBDB="-ldb"))
2004-04-23 23:32:05 +00:00
dnl check if we are running with Debug....
AC_MSG_CHECKING(Whether to Enable Debuging...)
AC_ARG_ENABLE(debug,
2004-06-01 10:06:19 +00:00
[ --enable-debug - Enable Debuging],
2004-04-23 23:32:05 +00:00
[ case "$enableval" in
yes)
AC_DEFINE(DEBUG, 1, 'Enable Debugging')
CFLAGS="$CFLAGS -ggdb -Wall -DCURLDEBUG"
2004-04-23 23:32:05 +00:00
AC_MSG_RESULT(yes - Watch your Log Files)
;;
*)
CFLAGS="$CFLAGS -DNDEBUG"
AC_MSG_RESULT(no)
;;
esac],
CFLAGS="$CFLAGS -DNDEBUG"
AC_MSG_RESULT(no)
)
2004-06-01 09:22:43 +00:00
AC_MSG_CHECKING(To Enable AutoTools Debug Mode?)
2004-06-01 10:06:19 +00:00
AC_ARG_ENABLE(autodebug, [ --enable-autodebug - Enable AutoTools Debug],
2004-06-01 09:22:43 +00:00
[ case "$enableval" in
yes)
AC_MSG_RESULT(yes)
;;
*)
AC_MSG_RESULT(no)
AX_MAINTAINER_MODE_AUTO_SILENT
;;
esac],
AC_MSG_RESULT(no)
AX_MAINTAINER_MODE_AUTO_SILENT
)
2002-11-18 13:57:54 +00:00
AC_MSG_CHECKING(To Enable Raw command?)
2004-06-01 10:06:19 +00:00
AC_ARG_ENABLE(raw, [ --enable-raw - Enable Raw command],
2002-11-18 13:57:54 +00:00
[ 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)
)
AC_MSG_CHECKING(The Modules that will be automatically compiled)
AC_MSG_RESULT($MODULES)
2000-02-29 10:21:48 +00:00
AC_MSG_CHECKING(The additional modules to compile?)
2004-06-01 10:06:19 +00:00
AC_ARG_WITH(modules, [ --with-modules - Additional Modules to compile],
MODULES="$MODULES $withval"
AC_MSG_RESULT($withval),
AC_MSG_RESULT("None"))
dnl Set NEO_PREFIX in config.h.
if test "x${prefix}" = "xNONE"; then
AC_DEFINE_UNQUOTED(NEO_PREFIX, "${ac_default_prefix}", "Installation Prefix")
else
AC_DEFINE_UNQUOTED(NEO_PREFIX, "${prefix}", "Installation Prefix")
fi
2000-02-29 10:21:48 +00:00
AX_PATH_LIB_PCRE
AX_PATH_LIB_CURL
AC_DEFINE_UNQUOTED(NS_HOST, "$host_os", "Operating System Host")
2005-02-06 04:02:20 +00:00
wi_ARG_DISABLE_CCDV
wi_PROG_CCDV
2004-03-17 21:06:48 +00:00
AC_SUBST(PROTOCOL)
AC_SUBST(SED)
2004-06-01 10:06:19 +00:00
AC_SUBST(LIBTOOL_DEPS)
AC_SUBST(MODULES)
2004-08-12 03:12:27 +00:00
AC_SUBST(LIBDB)
AC_SUBST(CCDV)
2004-07-20 11:55:27 +00:00
AC_CONFIG_FILES([Makefile
include/Makefile
src/Makefile
src/protocol/Makefile
2004-09-22 20:51:37 +00:00
src/dbm/Makefile
2004-07-20 11:55:27 +00:00
lib/Makefile
lib/curl/Makefile
lib/adns/Makefile
lib/pcre/Makefile
lib/rta/Makefile
2004-07-20 11:55:27 +00:00
modules/Makefile
modules/connectserv/Makefile
modules/extauth/Makefile
modules/hostserv/Makefile
modules/ircdauth/Makefile
modules/loveserv/Makefile
modules/moraleserv/Makefile
modules/statserv/Makefile
neostats])
AC_CACHE_SAVE
AC_OUTPUT