-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
95 lines (77 loc) · 2.67 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
#
AC_PREREQ(2.69)
AC_INIT([gama], [1.18b], [[email protected]])
AC_CONFIG_SRCDIR([lib/gnu_gama/version.cpp])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_AUX_DIR([scripts/config.aux])
AM_INIT_AUTOMAKE
AM_SILENT_RULES([yes])
# Checks for programs.
AC_PROG_AWK
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_SUBST([CXXFLAGS],["$CXXFLAGS -std=c++11 -Wall"])
AM_CONDITIONAL([GNU_GAMA_LOCAL_TEST_SQLITE_READER], [false])
AM_CONDITIONAL([GNU_GAMA_LOCAL_TEST_EXPAT_1_1], [false])
# Checks for libraries libexpat1-dev, libsqlite3-dev
AC_CHECK_LIB([expat], [XML_ParserCreate])
if test "x$ac_cv_lib_expat_XML_ParserCreate" != "xyes"; then
AC_MSG_WARN([Build with local copy of expat 1.1 XML parser])
AM_CONDITIONAL([GNU_GAMA_LOCAL_TEST_EXPAT_1_1], [true])
AC_DEFINE([GNU_gama_expat_1_1],1,
[Optional support for expat 1.1 from local sources])
CPPFLAGS="${CPPFLAGS} -DGNU_gama_expat_1_1"
else
AC_CHECK_HEADER(expat.h, , [AC_MSG_ERROR(
[Cannot find expat.h ... please install libexpat1-dev] )])
fi
AC_CHECK_LIB([sqlite3], [sqlite3_open])
if test "x$ac_cv_lib_sqlite3_sqlite3_open" = "xyes"; then
AM_CONDITIONAL([GNU_GAMA_LOCAL_TEST_SQLITE_READER], [true])
AC_DEFINE([GNU_GAMA_LOCAL_SQLITE_READER],1,
[Conditional support for sqlite3 databases])
CPPFLAGS="${CPPFLAGS} -DGNU_GAMA_LOCAL_SQLITE_READER"
fi
# Check for xmllint
AC_CHECK_PROG(GNU_GAMA_LOCAL_TEST_XMLLINT, xmllint, yes, no)
AM_CONDITIONAL([GNU_GAMA_LOCAL_TEST_XMLLINT],
[test "x$GNU_GAMA_LOCAL_TEST_XMLLINT" = "xyes"])
if test "x$GNU_GAMA_LOCAL_TEST_XMLLINT" != "xyes"; then
AC_MSG_WARN([*** xmllint not found, XML files will not be validated])
fi
# Checks for header files.
AC_HEADER_STDC
# AC_CHECK_HEADER(expat.h, , [AC_MSG_ERROR(
# [Cannot find expat.h ... please install libexpat1-dev] )])
# Checks for typedefs, structures, and compiler characteristics.
# AC_HEADER_STAT
# AC_HEADER_STDBOOL
# AC_C_CONST
# AC_C_INLINE
# AC_TYPE_OFF_T
# AC_TYPE_SIZE_T
# Checks for library functions.
# AC_FUNC_ERROR_AT_LINE
# AC_FUNC_MALLOC
# AC_FUNC_MEMCMP
# AC_FUNC_MMAP
# AC_FUNC_REALLOC
# AC_FUNC_SETVBUF_REVERSED
# AC_CHECK_FUNCS([memmove memset munmap pow sqrt])
AC_OUTPUT([Makefile
lib/Makefile
bin/Makefile
scripts/Makefile
doc/Makefile
xml/Makefile
tests/Makefile
tests/gama-local/Makefile
tests/gama-local/input/Makefile
tests/gama-local/scripts/Makefile
])