File: configure.ac

package info (click to toggle)
monopd 0.10.2-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,008 kB
  • sloc: cpp: 6,263; sh: 837; makefile: 35
file content (57 lines) | stat: -rw-r--r-- 1,904 bytes parent folder | download | duplicates (3)
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
# Process this file with autoconf to produce a configure script.
AC_INIT(configure.ac)
AM_INIT_AUTOMAKE(monopd, 0.10.2)
AM_CONFIG_HEADER(config.h)
AC_LANG(C++)

# Checks for programs.
AC_ISC_POSIX
AC_SUBST(CFLAGS,$CFLAGS)
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_SUBST(CXXFLAGS,$CFLAGS)
AC_PROG_CXX

# Checks for libraries.

# Checks for header files.
AC_CHECK_HEADER([cmath], [], [AC_MSG_ERROR([Your STL doesn't come with cmath, upgrade your libstdc++.])])
AC_CHECK_HEADER([muParser.h], [], [AC_MSG_ERROR([Please install libmuparser >= 2.0.0 from http://muparser.beltoforion.de/])])
AC_CHECK_HEADER([utf8.h], [], [AC_MSG_ERROR([Please install UTF8-CPP library from http://utfcpp.sourceforge.net/])])

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.

# Check whether to enable systemd startup notification.
# This requires libsystemd-daemon.
AC_ARG_WITH([systemd-daemon], AS_HELP_STRING([--with-systemd-daemon],
            [Add support for systemd startup notification (default is autodetected)]),
            [USE_SYSTEMD_DAEMON=$withval], [USE_SYSTEMD_DAEMON=auto])
AS_IF([test "x$USE_SYSTEMD_DAEMON" != "xno"], [
    PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd],
        [AC_DEFINE(USE_SYSTEMD_DAEMON, 1, [Use systemd startup notification])],
        [PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon],
            [AC_DEFINE(USE_SYSTEMD_DAEMON, 1, [Use systemd startup notification])],
            [AS_IF([test "x$USE_SYSTEMD_DAEMON" = "xyes"],
                [AC_MSG_ERROR([systemd startup notification support requested, but libsystemd-daemon not found.])]
            )]
        )]
    )
])

if test "x$GCC" = "xyes"; then  \
     CFLAGS+=" -Wall -Wextra";  \
     CXXFLAGS+=" -Wall -Wextra";  \
fi

AC_OUTPUT([
  Makefile
  conf/Makefile
  doc/Makefile
  doc/api/Makefile
  doc/systemd/Makefile
  games/Makefile
  src/Makefile
])