-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconfigure.ac
55 lines (43 loc) · 1.63 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.63])
AC_INIT([libgamearchive], [2.0],
[https://github.com/Malvineous/libgamearchive/issues],
[], [http://www.shikadi.net/camoto])
AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip])
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_LANG(C++)
# Overarching version of all libraries (used for installation dir)
AC_SUBST(camoto_release, camoto-2.0)
AC_PROG_CXX
AC_PROG_LIBTOOL
AX_CXX_COMPILE_STDCXX_11(noext, mandatory)
AX_BOOST_BASE([1.59], [], [AC_MSG_ERROR([Could not find Boost])])
AX_BOOST_SYSTEM
AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_UNIT_TEST_FRAMEWORK
PKG_CHECK_MODULES([libgamecommon], [libgamecommon >= 2])
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],[enable extra debugging output]))
dnl Check for --enable-debug and add appropriate flags for gcc
if test "x$enable_debug" = "xyes";
then
# Add gdb info (-g), disable any default optimisation
AC_SUBST(DEBUG_CXXFLAGS, "-O0 -g")
# Add DEBUG define
AC_DEFINE([DEBUG], [1], [Define to include extra debugging output])
fi
dnl Check whether xmlto exists for manpage generation
AC_CHECK_PROG(XMLTO_CHECK,xmlto,yes)
if test x"$XMLTO_CHECK" != x"yes"; then
AC_MSG_ERROR([xmlto not found - see <https://fedorahosted.org/xmlto/>.])
fi
case "$host_os" in
*mingw*)
# Must specify this parameter when compiling for Windows
LDFLAGS="$LDFLAGS -no-undefined"
;;
esac
AM_SILENT_RULES([yes])
AC_OUTPUT(Makefile src/Makefile include/Makefile include/camoto/Makefile examples/Makefile tests/Makefile doc/Makefile $PACKAGE.pc)