-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.ac
88 lines (75 loc) · 2.28 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
AC_INIT([wMUD], [0.1.0])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE
LT_INIT
AC_PROG_CC
AC_PROG_LIBTOOL
PKG_PROG_PKG_CONFIG
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
echo "The crypt() function call can not be found."
exit 1
fi
AC_ARG_ENABLE(
[debug],
AS_HELP_STRING(
[--enable-debug],
[Enable debugging support (default: disabled)]),
[enable_debug=yes; CFLAGS="$CFLAGS -g -Wall"],
[enable_debug=no])
AM_CONDITIONAL([ENABLE_DEBUG], [test "$enable_debug" = "yes"])
if test "$enable_debug" = "yes"; then
AC_DEFINE([DEBUG], [1], [Define to compile with debugging support])
fi
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])
AC_DEFINE([WMUD_MAINTENANCE_TIME],
[600],
[Time between maintenance runs, in seconds])
m4_ifdef([GTK_DOC_CHECK], [
GTK_DOC_CHECK([1.14], [--flavour no-tmpl])
],[
AM_CONDITIONAL([ENABLE_GTK_DOC], false)
])
AC_ARG_ENABLE(
[memcached],
AS_HELP_STRING(
[--disable-memcached],
[Disable Memcached support (default: enabled)]),
[],
[enable_memcached=yes])
AM_CONDITIONAL([ENABLE_MEMCACHED], [test "$enable_memcached" = "yes"])
if test "$enable_memcached" = "yes"; then
PKG_CHECK_MODULES([MEMCACHED], libmemcached);
AC_DEFINE([ENABLE_MEMCACHED],
[1],
[Define to compile with Memcached support])
fi
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])
PKG_CHECK_MODULES([GIO], gio-2.0)
PKG_CHECK_MODULES([GLIB], glib-2.0)
PKG_CHECK_MODULES([GTHREAD], gthread-2.0)
PKG_CHECK_MODULES([GDA], libgda-5.0)
PKG_CHECK_MODULES([CURL], libcurl)
LIBCURL_CHECK_CONFIG
if test "$libcurl_protocol_SMTP" != "yes"; then
echo "Your libCURL installation does not support the SMTP protocol."
exit 1
fi
AM_PATH_GLIB_2_0
AC_OUTPUT(
Makefile
wmud/Makefile
docs/reference/wmud/Makefile
create-world.sh
drop-world.sh
)