-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfigure.in
100 lines (84 loc) · 2.57 KB
/
configure.in
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
88
89
90
91
92
93
94
95
96
97
98
99
100
AC_INIT(LiftingWaveletTransform,0.0.0,[[email protected]],[LiftingWaveletTransform],[http://www.sanger.ac.uk])
AC_CANONICAL_SYSTEM
AC_PROG_LIBTOOL
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(LiftingWaveletTransform,0.0.0)
AC_CONFIG_MACRO_DIR([m4])
CFLAGS_SAVE="${CFLAGS}"
CFLAGS=""
AC_PROG_CC
CFLAGS="${CFLAGS_SAVE}"
CXXFLAGS_SAVE="${CXXFLAGS}"
CXXFLAGS=""
AC_PROG_CXX
CXXFLAGS="${CXXFLAGS_SAVE}"
AC_LANG_PUSH([C++])
AC_HEADER_STDC
AC_LANG_POP
if test "${CXX}" = "g++" ; then
CPPFLAGS="${CPPFLAGS} -W -Wall"
fi
if test "${CXX}" = "cl.exe" ; then
CXXFLAGS="${CXXFLAGS} -EHsc -Gr"
CPPFLAGS="${CPPFLAGS} -W1" # -Wall
fi
AC_LANG_PUSH([C++])
CXXFLAGS_SAVE="${CXXFLAGS}"
CXXFLAGS="-std=c++0x"
AC_MSG_CHECKING([whether the C++ compiler supports the -std=c++0x flag])
AC_TRY_COMPILE([#include <cstdint>],[],[nullx=yes],[nullx=no])
AC_MSG_RESULT([${nullx}])
CXXFLAGS="${CXXFLAGS_SAVE}"
AC_LANG_POP
if test "$nullx" != "yes" ; then
AC_MSG_ERROR([The C++ compiler does not support the -std=c++0x flag.])
fi
CXXFLAGS="${CXXFLAGS} -std=c++0x"
AC_ARG_ENABLE(optimization,
AS_HELP_STRING([--enable-optimization],[use compiler optimization (default yes)]),
[optimization=${enableval}],[optimization=yes])
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],[use compiler debug flags (default no)]),
[debug=${enableval}],[debug=no])
AC_ARG_ENABLE(profile,
AS_HELP_STRING([--enable-profile],[use compiler profiling flags (default no)]),
[profile=${enableval}],[profile=no])
AC_ARG_ENABLE(fast,
AS_HELP_STRING([--enable-fast],[disable evaluation of assertions (default no)]),
[fast=${enableval}],[fast=no])
if test "${fast}" = "yes" ; then
CPPFLAGS="${CPPFLAGS} -DNDEBUG"
fi
if test "${debug}" = "yes" ; then
CXXFLAGS="${CXXFLAGS} -g -O0 -rdynamic"
CFLAGS="${CFLAGS} -g -O0 -rdynamic"
openmp="no"
else
if test "${profile}" = "yes" ; then
CXXFLAGS="${CXXFLAGS} -g -pg -rdynamic"
CFLAGS="${CFLAGS} -g -pg -rdynamic"
else
if test "${optimization}" = "yes" ; then
case ${CXX} in
g++)
CXXFLAGS="${CXXFLAGS} -O3 -rdynamic"
CFLAGS="${CFLAGS} -O3 -rdynamic"
;;
*-mingw32msvc-g++)
CXXFLAGS="${CXXFLAGS} -O3 -rdynamic"
CFLAGS="${CFLAGS} -O3 -rdynamic"
;;
cl.exe)
CXXFLAGS="${CXXFLAGS} -O2 -Ob2 -Ot -Oy"
;;
esac
fi
fi
fi
PACKAGE_NAME=${PACKAGE}
PACKAGE_VERSION=${VERSION}
LIFTINGWAVELETTRANSFORMCXXFLAGS="-std=c++0x"
AC_SUBST([PACKAGE_NAME])
AC_SUBST([PACKAGE_VERSION])
AC_SUBST([LIFTINGWAVELETTRANSFORMCXXFLAGS])
AC_OUTPUT(Makefile src/Makefile liftingwavelettransform.pc)