-
Notifications
You must be signed in to change notification settings - Fork 9
/
cit_spatialdata.m4
40 lines (33 loc) · 1.35 KB
/
cit_spatialdata.m4
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
# -*- Autoconf -*-
# ======================================================================
# Autoconf macros for spatialdata.
# ======================================================================
# ----------------------------------------------------------------------
# CIT_SPATIALDATA_HEADER
# ----------------------------------------------------------------------
AC_DEFUN([CIT_SPATIALDATA_HEADER], [
AC_LANG(C++)
AC_CHECK_HEADER([spatialdata/spatialdb/SpatialDB.hh], [], [
AC_MSG_ERROR([SpatialDB header not found; try CPPFLAGS="-I<Spatialdata include dir>"])
])dnl
])dnl CIT_SPATIALDATA_HEADER
# ----------------------------------------------------------------------
# CIT_SPATIALDATA_LIB
# ----------------------------------------------------------------------
AC_DEFUN([CIT_SPATIALDATA_LIB], [
cit_save_libs=$LIBS
LIBS="-lspatialdata"
AC_LANG(C++)
AC_REQUIRE_CPP
AC_MSG_CHECKING([for SimpleDB in -lspatialdata])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[#include <spatialdata/spatialdb/SpatialDB.hh>]
[#include <spatialdata/spatialdb/SimpleDB.hh>]],
[[spatialdata::spatialdb::SimpleDB db;]])],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
AC_MSG_ERROR([Spatialdata library not found; try LDFLAGS="-L<Spatialdata lib dir>"])
])dnl
LIBS=$cit_save_libs
])dnl CIT_SPATIALDATA_LIB
dnl end of file