-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconfigure.ac
148 lines (118 loc) · 3.65 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
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# -*- Autoconf -*-
# $Id$
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(stx-exparser, 0.7)
AC_CONFIG_SRCDIR([libstx-exparser/ExpressionParser.cc])
AC_CONFIG_AUX_DIR(scripts)
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
# enable full optimization by configure switch
AC_ARG_ENABLE(optimize,
AS_HELP_STRING([--enable-optimize],
[Build with full optimization @<:@default=no@:>@]),
[ case "${enableval}" in
yes)
CFLAGS="$CFLAGS -O3 -DNDEBUG";
CXXFLAGS="$CXXFLAGS -O3 -DNDEBUG";
;;
no) ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-optimize) ;;
esac ],
[ optimize=false ])
# set debug info flag if no optimization flags are set.
if test "$CFLAGS" == ""; then
CFLAGS="-g"
fi
if test "$CXXFLAGS" == ""; then
CXXFLAGS="-g"
fi
AC_ARG_ENABLE(gcov,
AS_HELP_STRING([--enable-gcov],
[enable test coverage with gcov @<:@default=no@:>@]),
[case "${enableval}" in
yes) gcov=true ;;
no) gcov=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-gcov]) ;;
esac],
[gcov=false])
AM_CONDITIONAL(GCOV, test x"$gcov" = "xtrue")
if test x"$gcov" = "xtrue"; then
CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
fi
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_LIBTOOL
AC_LANG([C++])
# Checks for libraries.
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDC
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_FUNC_STRTOD
AC_CHECK_FUNCS([pow sqrt strcasecmp strtol strtoul strtoull])
# Boost Base autoconf check
AX_BOOST_BASE([1.33.0])
# check for Boost.Spirit
AC_CHECK_HEADER([boost/spirit/core.hpp], [],
AC_MSG_ERROR([
*** could not find the boost headers ***
*** install the libboost-dev package (http://www.boost.org) ***]))
AC_CHECK_HEADER([boost/spirit/phoenix.hpp], [],
AC_MSG_ERROR([
*** could not find the boost headers ***
*** install the libboost-dev package (http://www.boost.org) ***]))
# check whether cppunit is available
AM_PATH_CPPUNIT(1.10.0)
AM_CONDITIONAL(HAVE_CPPUNIT, test x$CPPUNIT_CONFIG != xno)
if test x$CPPUNIT_CONFIG == xno; then
AC_MSG_WARN([
cppunit does not seem to be installed on your system.
The testsuite will not be built!
])
fi
# Check for wxWidgets 2.6.0 or later
AM_OPTIONS_WXCONFIG
AM_PATH_WXCONFIG(2.6.0, wxWin=1)
AM_CONDITIONAL(HAVE_WXWIDGETS, test "$wxWin" == 1)
if test "$wxWin" != 1; then
AC_MSG_WARN([
wxWidgets does not seem to be installed on your system.
The wxParserDemo will not be built!
If you think wxWidgets >= 2.6.0 is installed,
please check that wx-config is in path, the directory
where wxWidgets libraries are installed (returned by
'wx-config --libs' command) is in LD_LIBRARY_PATH or
equivalent variable.
])
fi
# Win32 tools to add icons to the demo program
case "${host}" in
*-*-cygwin* | *-*-mingw32*)
AC_CHECK_TOOL(RESCOMP, windres)
;;
esac
AM_CONDITIONAL(GOT_RESCOMP, test x$RESCOMP != x)
# Check for SWIG
AC_PROG_SWIG(1.3.29)
SWIG_ENABLE_CXX
AC_CHECK_PROG(PERL,perl,perl)
AM_CONDITIONAL(HAVE_SWIG, test x"$SWIG_LIB" != x)
# Checks for library functions.
AC_CONFIG_FILES([Makefile
stx-exparser.pc
libstx-exparser/Makefile
testsuite/Makefile
wxparserdemo/Makefile
perl-binding/Makefile
examples/Makefile
examples/simple/Makefile
examples/csvfilter/Makefile
examples/csvtool/Makefile])
AC_OUTPUT