summaryrefslogtreecommitdiffstats
path: root/configure.ac
blob: c7c69c61a7d5cd32bbb4d4f2cb4b7694e6671bdf (plain)
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
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.61)
AC_INIT(mad, 0.1, matthias@gamezock.de)
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_SRCDIR([src/mad.cpp])
AC_CONFIG_HEADERS([config.h])

AM_INIT_AUTOMAKE(mad, 0.1)
AM_MAINTAINER_MODE

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET

ORIG_LIBS=$LIBS

LT_CONFIG_LTDL_DIR([libltdl])
LT_INIT([dlopen])
LTDL_INIT([recursive])
AC_SUBST(LIBLTDL)

# Checks for libraries.
PKG_CHECK_MODULES(GnuTLS, gnutls, , AC_MSG_ERROR(Test for GnuTLS failed.))
PKG_CHECK_MODULES(sigc, sigc++-2.0, , AC_MSG_ERROR(Test for SigC++ 2.0 failed.))

CPPFLAGS='-I${top_srcdir}'"/src $GnuTLS_CFLAGS $sigc_CFLAGS $INCLTDL $CPPFLAGS"

AC_CHECK_LIB(gssapi_krb5, gss_init_sec_context, AC_SUBST(GSSAPI_LIBS, -lgssapi_krb5), AC_CHECK_LIB(gssapi, gss_init_sec_context, GSSAPI_LIBS=-lgssapi, AC_MSG_ERROR(Test for GSSAPI library failed.)))
AC_CHECK_LIB(readline, readline, AC_SUBST(READLINE_LIBS, -lreadline), AC_MSG_ERROR(Test for GNU readline library failed.))

LIBS=$ORIG_LIBS 

# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([argz.h arpa/inet.h fcntl.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/socket.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T

# Checks for library functions.
AC_FUNC_MALLOC
AC_HEADER_STDC
AC_FUNC_REALLOC
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([dup2 gethostname memmove memset socket strcasecmp strchr strdup strerror strrchr strtol])

AC_CONFIG_FILES([
  Makefile
  libltdl/Makefile
  src/Makefile
  src/Client/Makefile
  src/Client/Requests/Makefile
  src/Common/Makefile
  src/Common/Backends/Makefile
  src/Common/Requests/Makefile
  src/Common/RequestHandlers/Makefile
  src/Core/Makefile
  src/Core/Backends/Makefile
  src/Core/Requests/Makefile
  src/Core/RequestHandlers/Makefile
  src/Daemon/Makefile
  src/Daemon/Backends/Makefile
  src/Daemon/Requests/Makefile
  src/Daemon/RequestHandlers/Makefile
  src/Net/Makefile
  src/Net/Packets/Makefile
  src/modules/Makefile
])

AC_OUTPUT