2012-03-07 15:37:43 +00:00
|
|
|
AC_INIT([wMUD], [0.1.0])
|
|
|
|
AC_CONFIG_HEADER([config.h])
|
|
|
|
AC_CONFIG_SRCDIR([configure.ac])
|
2012-03-24 22:52:36 +00:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2012-03-07 15:37:43 +00:00
|
|
|
|
2013-11-22 18:27:59 +00:00
|
|
|
AM_INIT_AUTOMAKE
|
2012-08-25 20:14:03 +00:00
|
|
|
LT_INIT
|
2012-03-07 15:37:43 +00:00
|
|
|
|
|
|
|
AC_PROG_CC
|
2012-05-19 10:40:07 +00:00
|
|
|
AC_PROG_LIBTOOL
|
2012-03-10 17:23:17 +00:00
|
|
|
PKG_PROG_PKG_CONFIG
|
2012-03-07 15:37:43 +00:00
|
|
|
|
2012-03-23 10:04:53 +00:00
|
|
|
AC_CHECK_HEADERS([crypt.h])
|
|
|
|
AC_SEARCH_LIBS([crypt], [crypt])
|
|
|
|
AC_CHECK_FUNC([crypt], ac_have_crypt=yes, ac_have_crypt=no)
|
|
|
|
if test "$ac_have_crypt" != "yes"; then
|
2016-07-04 13:21:42 +00:00
|
|
|
echo "The crypt() function call can not be found."
|
|
|
|
exit 1
|
2012-03-23 10:04:53 +00:00
|
|
|
fi
|
|
|
|
|
2016-07-04 13:21:42 +00:00
|
|
|
AC_ARG_ENABLE(
|
|
|
|
[debug],
|
|
|
|
AS_HELP_STRING(
|
|
|
|
[--enable-debug],
|
|
|
|
[Enable debugging support (default: disabled)]),
|
|
|
|
[enable_debug=yes; CFLAGS="$CFLAGS -g -Wall"],
|
|
|
|
[enable_debug=no])
|
2012-03-10 17:24:23 +00:00
|
|
|
AM_CONDITIONAL([ENABLE_DEBUG], [test "$enable_debug" = "yes"])
|
2016-07-04 13:21:42 +00:00
|
|
|
|
2012-03-10 17:24:23 +00:00
|
|
|
if test "$enable_debug" = "yes"; then
|
2016-07-04 13:21:42 +00:00
|
|
|
AC_DEFINE([DEBUG], [1], [Define to compile with debugging support])
|
2012-03-10 17:24:23 +00:00
|
|
|
fi
|
|
|
|
|
2013-11-26 10:22:19 +00:00
|
|
|
AC_DEFINE([WMUD_TICK_LENGTH], [500], [Length of a game tick, in milliseconds])
|
|
|
|
AC_DEFINE([WMUD_HEARTBEAT_LENGTH], [30], [Length of a heartbeat, in ticks])
|
2016-07-04 13:21:42 +00:00
|
|
|
AC_DEFINE([WMUD_MAINTENANCE_TIME],
|
|
|
|
[600],
|
|
|
|
[Time between maintenance runs, in seconds])
|
2013-11-26 10:22:19 +00:00
|
|
|
|
2012-03-24 22:52:36 +00:00
|
|
|
m4_ifdef([GTK_DOC_CHECK], [
|
|
|
|
GTK_DOC_CHECK([1.14], [--flavour no-tmpl])
|
|
|
|
],[
|
|
|
|
AM_CONDITIONAL([ENABLE_GTK_DOC], false)
|
|
|
|
])
|
|
|
|
|
2016-07-04 13:21:42 +00:00
|
|
|
AC_ARG_ENABLE(
|
|
|
|
[memcached],
|
|
|
|
AS_HELP_STRING(
|
|
|
|
[--disable-memcached],
|
|
|
|
[Disable Memcached support (default: enabled)]),
|
|
|
|
[],
|
|
|
|
[enable_memcached=yes])
|
2012-03-07 15:37:43 +00:00
|
|
|
AM_CONDITIONAL([ENABLE_MEMCACHED], [test "$enable_memcached" = "yes"])
|
2016-07-04 13:21:42 +00:00
|
|
|
|
2012-03-07 15:37:43 +00:00
|
|
|
if test "$enable_memcached" = "yes"; then
|
2016-07-04 13:21:42 +00:00
|
|
|
PKG_CHECK_MODULES([MEMCACHED], libmemcached);
|
|
|
|
AC_DEFINE([ENABLE_MEMCACHED],
|
|
|
|
[1],
|
|
|
|
[Define to compile with Memcached support])
|
2012-03-07 15:37:43 +00:00
|
|
|
fi
|
|
|
|
|
2016-07-04 13:21:42 +00:00
|
|
|
AC_DEFINE([DEFAULT_PORT],
|
|
|
|
[4000],
|
|
|
|
[The default port number if not specified in the config file])
|
|
|
|
AC_DEFINE([MAX_RECV_LEN],
|
|
|
|
[1024],
|
|
|
|
[The maximum length of the recv() queue in bytes])
|
2012-03-22 11:21:05 +00:00
|
|
|
|
2012-03-08 16:39:45 +00:00
|
|
|
PKG_CHECK_MODULES([GIO], gio-2.0)
|
2012-03-07 15:37:43 +00:00
|
|
|
PKG_CHECK_MODULES([GLIB], glib-2.0)
|
2012-03-12 12:54:38 +00:00
|
|
|
PKG_CHECK_MODULES([GTHREAD], gthread-2.0)
|
2013-06-18 14:42:14 +00:00
|
|
|
PKG_CHECK_MODULES([GDA], libgda-5.0)
|
2012-05-18 07:41:30 +00:00
|
|
|
PKG_CHECK_MODULES([CURL], libcurl)
|
|
|
|
LIBCURL_CHECK_CONFIG
|
|
|
|
if test "$libcurl_protocol_SMTP" != "yes"; then
|
2016-07-04 13:21:42 +00:00
|
|
|
echo "Your libCURL installation does not support the SMTP protocol."
|
|
|
|
exit 1
|
2012-05-18 07:41:30 +00:00
|
|
|
fi
|
2012-03-07 15:37:43 +00:00
|
|
|
|
2013-01-06 13:52:12 +00:00
|
|
|
AM_PATH_GLIB_2_0
|
|
|
|
|
2016-07-04 13:21:42 +00:00
|
|
|
AC_OUTPUT(
|
|
|
|
Makefile
|
|
|
|
wmud/Makefile
|
|
|
|
docs/reference/wmud/Makefile
|
|
|
|
create-world.sh
|
|
|
|
drop-world.sh
|
|
|
|
)
|