forked from libspatialindex/libspatialindex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
86 lines (67 loc) · 2.46 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
# -*- 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], [8])
m4_define([sidx_version_micro], [6])
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
AC_CONFIG_MACRO_DIR([m4])
debug_default="no"
CFLAGS="-Wall -Wno-long-long -pedantic $CFLAGS"
CXXFLAGS="-Wall -Wno-long-long -pedantic -std=c++98 $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, [
#ifndef ANDROID
LIBS="$LIBS -lpthread"
#endif])
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])])
AC_CHECK_HEADERS(features.h)
#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 memset memcpy bcopy srand48])
AM_CONDITIONAL([RAND_IS_CONFIG], [test "x$HAVE_SRAND48" = xtrue])
AC_CONFIG_FILES([ Makefile
include/Makefile
src/Makefile
src/libspatialindex.pc
src/capi/Makefile
src/spatialindex/Makefile
src/storagemanager/Makefile
src/rtree/Makefile
src/mvrtree/Makefile
src/tprtree/Makefile
src/tools/Makefile
test/Makefile
test/geometry/Makefile
test/rtree/Makefile
test/mvrtree/Makefile
test/tprtree/Makefile
test/gtest/Makefile])
AC_CONFIG_SUBDIRS([test/gtest/gtest-1.7.0/])
AC_OUTPUT