forked from TempusMUD/Tempuscode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.ac
More file actions
72 lines (61 loc) · 2.08 KB
/
configure.ac
File metadata and controls
72 lines (61 loc) · 2.08 KB
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
AC_PREREQ([2.67])
AC_INIT([tempusmud],[1.0],[azimuth@tempusmud.com])
AC_CONFIG_SRCDIR([src/clan/clan.c])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([subdir-objects])
# Enable or disable debugging
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
[enable verbose debugging @<:@default=yes@:>@]),
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac],
[debug=true])
AM_CONDITIONAL(DEBUG, test x"$debug" = "xtrue")
# Enable or disable ipv6
AC_ARG_ENABLE(ipv6,
AS_HELP_STRING([--enable-ipv6],
[enable ipv6 support @<:@default=yes@:>@]),
[case "${enableval}" in
yes) ipv6_support=true ;;
no) ipv6_support=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-ipv6]) ;;
esac],
[ipv6_support=true])
AM_CONDITIONAL(IPV6_SUPPORT, test x"$ipv6_support" = "xtrue")
# Set default CFLAGS to empty
: ${CFLAGS=""}
# Checks for programs.
AC_PROG_CC
AC_PROG_CC_C99
# Checks for libraries.
AX_LIB_POSTGRESQL
PKG_CHECK_MODULES([GLIB], [glib-2.0])
PKG_CHECK_MODULES([XML], [libxml-2.0])
PKG_CHECK_MODULES([CHECK], [check])
AC_CHECK_LIB([rt], [clock_gettime])
AC_CHECK_LIB([crypt], [crypt])
AC_CHECK_LIB([m], [ceilf])
# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([fcntl.h limits.h malloc.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_C_RESTRICT
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
AM_PROG_CC_C_O
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_MKTIME
AC_FUNC_REALLOC
AC_CHECK_FUNCS([bzero gethostbyaddr gettimeofday isascii memmove memset mkdir select socket strcasecmp strchr strdup strerror strncasecmp strpbrk strspn strstr strtol])
AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile])
AC_OUTPUT