-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.ac
71 lines (58 loc) · 2.2 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 -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
m4_define([sidx_version_major], [1])
m4_define([sidx_version_minor], [5])
m4_define([sidx_version_micro], [0])
m4_define([sidx_version],
[sidx_version_major.sidx_version_minor.sidx_version_micro])
AC_INIT([spatialindex], [sidx_version], [[email protected]], [spatialindex-src])
AC_CANONICAL_BUILD
debug_default="no"
CXXFLAGS="$CXXFLAGS"
# Checks for programs.
AC_PROG_CXX
AC_PROG_CXXCPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
AM_INIT_AUTOMAKE([dist-bzip2 subdir-objects])
# Checks for header files.
AC_CHECK_HEADERS(fcntl.h,, [AC_MSG_ERROR([cannot find fcntl.h, bailing out])])
AC_CHECK_HEADERS(unistd.h,, [AC_MSG_ERROR([cannot find unistd.h, bailing out])])
AC_CHECK_HEADERS(sys/types.h,, [AC_MSG_ERROR([cannot find sys/types.h, bailing out])])
AC_CHECK_HEADERS(sys/stat.h,, [AC_MSG_ERROR([cannot find sys/stat.h, bailing out])])
AC_CHECK_HEADERS(pthread.h, [LIBS="$LIBS -lpthread"])
AC_CHECK_HEADERS(sys/resource.h,, [AC_MSG_ERROR([cannot find sys/resource.h, bailing out])])
AC_CHECK_HEADERS(sys/time.h,, [AC_MSG_ERROR([cannot find sys/time.h, bailing out])])
AC_CHECK_HEADERS(stdint.h,, [AC_MSG_ERROR([cannot find stdint.h, bailing out])])
#MH_CXX_HEADER_TOOLS
LIBS="$LIBS"
AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes] turn on debugging [default=$debug_default]],, enable_debug=$debug_default)
if test "x$enable_debug" = "xyes"; then
CXXFLAGS="$CXXFLAGS -g -DDEBUG"
AC_MSG_RESULT(checking wether debug information is enabled... yes)
else
CXXFLAGS="$CXXFLAGS -O2 -DNDEBUG"
AC_MSG_RESULT(checking wether debug information is enabled... no)
fi
# Checks for library functions.
AC_CHECK_FUNCS([gettimeofday bzero memset memcpy bcopy])
AC_CONFIG_FILES([ Makefile
include/Makefile
include/capi/Makefile
include/tools/Makefile
src/Makefile
src/capi/Makefile
src/spatialindex/Makefile
src/storagemanager/Makefile
src/rtree/Makefile
src/mvrtree/Makefile
src/tprtree/Makefile
src/tools/Makefile
regressiontest/Makefile
regressiontest/rtree/Makefile
regressiontest/mvrtree/Makefile
regressiontest/tprtree/Makefile])
AC_OUTPUT