-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.ac
67 lines (50 loc) · 1.79 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
# AC_CONFIG_MACRO_DIR needs >=2.58
AC_PREREQ([2.58])
# initialize configure
AC_INIT([hep-ga], [0.0.1.9999], [https://github.com/cschwan/hep-ga/issues],
[hep-ga], [https://github.com/cschwan/hep-ga])
# put autotools files into a separate directory
AC_CONFIG_AUX_DIR([build-aux])
# initialize automake
AM_INIT_AUTOMAKE([foreign -Wall dist-bzip2 no-dist-gzip nostdinc 1.11])
# put aclocal macros into m4
AC_CONFIG_MACRO_DIR([m4])
# C++ is our language
AC_LANG([C++])
# check for C++11 conforming compiler (autoconf-archive macro)
AX_CXX_COMPILE_STDCXX([14], [noext], [mandatory])
# point to a source file in order to let ./configure find itself
AC_CONFIG_SRCDIR([include/hep/ga.hpp])
# do not pollute command line with compiler definitions but instead write them
# into the specified header
AC_CONFIG_HEADERS([config.hpp])
# needed for linking
AC_PROG_RANLIB
AM_PROG_AR
AC_ARG_ENABLE([examples], AS_HELP_STRING([--enable-examples],
[Enable building of example programs]))
AM_CONDITIONAL([HAVE_EXAMPLES], [test "x$enable_examples" = "xyes"])
# add possibility to generate API documentation with Doxygen
AC_ARG_ENABLE([doxygen], AS_HELP_STRING([--enable-doxygen],
[Enable generation of Doxygen documentation]))
# variable pointing to the doxygen binary
AC_ARG_VAR([DOXYGEN], [Doxygen documentation generator])
# check for the doxygen binary
AS_IF([test "x$enable_doxygen" = "xyes"], [
AC_CHECK_PROGS([DOXYGEN], [doxygen])
AS_IF([test -z "$DOXYGEN"],
AC_MSG_ERROR([Doxygen not found but requested]))
])
# if doxygen is requested, define HAVE_DOXYGEN and configure Doxyfile.in
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
# configure Makefiles and Doxyfile
AC_CONFIG_FILES([
Makefile
doc/Doxyfile
doc/Makefile
examples/Makefile
include/Makefile
tests/Makefile
])
# write configure script
AC_OUTPUT