]> git.openstreetmap.org Git - nominatim.git/blob - configure.ac
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / configure.ac
1 AC_INIT(Nominatim,2.5)
2 if git rev-parse HEAD 2>/dev/null >/dev/null; then
3     AC_SUBST([PACKAGE_VERSION], [$PACKAGE_VERSION-git-`git rev-parse --short HEAD`])
4 fi
5
6 dnl Required autoconf version
7 AC_PREREQ(2.61)
8
9 AM_INIT_AUTOMAKE([1.9.6 dist-bzip2 std-options check-news])
10
11 dnl Additional macro definitions are in here
12 m4_include([m4/ax_lib_postgresql_svr.m4])
13 AC_CONFIG_MACRO_DIR([osm2pgsql/m4])
14
15 dnl Generate configuration header file
16 AC_CONFIG_HEADER(nominatim/config.h)
17
18
19 dnl Find C compiler
20 AC_PROG_CC
21
22 dnl Find C++ compiler
23 AC_PROG_CXX
24
25 dnl pthread
26 AX_PTHREAD([], [AC_MSG_ERROR([pthread library required])])
27
28 dnl Check for Geos library
29 AX_LIB_GEOS
30 if test "x$GEOS_VERSION" = "x" 
31 then
32   AC_MSG_ERROR([required library not found]);
33 fi
34
35 dnl Check for Proj library
36 AX_LIB_PROJ
37 if test "$HAVE_PROJ" = "no" 
38 then
39   AC_MSG_ERROR([required library not found]);
40 fi
41
42
43 dnl Check for PostgresSQL client library
44 AX_LIB_POSTGRESQL(9.0)
45 if test "x$POSTGRESQL_VERSION" = "x"
46 then
47     AC_MSG_ERROR([postgresql client library not found])
48 fi
49 AX_LIB_POSTGRESQL_SVR(9.0)
50 if test ! -f "$POSTGRESQL_PGXS"
51 then
52     AC_MSG_ERROR([postgresql server development library not found])
53 fi
54
55 dnl Check for bzip2 library
56 AX_LIB_BZIP2
57 if test "$HAVE_BZIP2" = "no" 
58 then
59   AC_MSG_ERROR([required library not found]);
60 fi
61
62 dnl Check for libxml2 library
63 AM_PATH_XML2
64
65 AC_CONFIG_SUBDIRS([osm2pgsql])
66
67 AC_OUTPUT(Makefile nominatim/Makefile module/Makefile)