-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
70 lines (55 loc) · 1.85 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
68
69
70
# autoconf initialization (mandatory) including information about the project
AC_INIT([ACME TEST],
[1.0.0],
[acme_test],
[])
# keep libtool macros in config directory.
AC_CONFIG_MACRO_DIR([config])
# specify config directory as the place where automake will look for various helper scripts
AC_CONFIG_AUX_DIR([config])
# check for autoconf API version >= 2.68
AC_PREREQ([2.68])
# automake initialization (mandatory) including a check for automake API version >= 1.11.1
AM_INIT_AUTOMAKE([1.11.1 tar-ustar])
# check for libtool API version >= 2.4
LT_PREREQ([2.4])
# use the C++ compiler for the following checks
AC_LANG([C++])
# libtool initialization, turn off shared library
#LT_INIT([disable-shared])
AM_DISABLE_SHARED
LT_INIT()
# copyright
AC_COPYRIGHT(See COPYRIGHT in top-level directory)
# generate header files
#AC_CONFIG_HEADERS([src/include/hellow_conf.h])
# check for C++ preprocessor and compiler (might change the compiler flags)
AC_PROG_CXXCPP
AC_PROG_CXX
AC_PROG_INSTALL
################################################################################
# Debug Options
################################################################################
AC_MSG_CHECKING([whether to build with debug information])
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],
[enable debug data generation (def=no)])],
[debugit="$enableval"],
[debugit=no])
AC_MSG_RESULT([$debugit])
if test x"$debugit" = x"yes"; then
AC_DEFINE([DEBUG],[],[Debug Mode])
CXXFLAGS="$CXXFLAGS -g -O0"
AM_SILENT_RULES(no)
else
AC_DEFINE([NDEBUG],[],[No-debug Mode])
CXXFLAGS="$CXXFLAGS -O2"
AM_SILENT_RULES(yes)
fi
# files to generate via autotools
AC_CONFIG_FILES([Makefile
src/Makefile
test/Makefile])
# generates the Makefiles etc. for the build
AC_OUTPUT