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`])
6 dnl Required autoconf version
9 AM_INIT_AUTOMAKE([1.9.6 dist-bzip2 std-options check-news])
11 dnl Additional macro definitions are in here
12 m4_include([m4/ax_lib_postgresql_svr.m4])
13 AC_CONFIG_MACRO_DIR([osm2pgsql/m4])
15 dnl Generate configuration header file
16 AC_CONFIG_HEADER(nominatim/config.h)
26 AX_PTHREAD([], [AC_MSG_ERROR([pthread library required])])
28 dnl Check for Geos library
30 if test "x$GEOS_VERSION" = "x"
32 AC_MSG_ERROR([required library not found]);
35 dnl Check for Proj library
37 if test "$HAVE_PROJ" = "no"
39 AC_MSG_ERROR([required library not found]);
43 dnl Check for PostgresSQL client library
44 AX_LIB_POSTGRESQL(9.0)
45 if test "x$POSTGRESQL_VERSION" = "x"
47 AC_MSG_ERROR([postgresql client library not found])
49 AX_LIB_POSTGRESQL_SVR(9.0)
50 if test ! -f "$POSTGRESQL_PGXS"
52 AC_MSG_ERROR([postgresql server development library not found])
55 dnl Check for bzip2 library
57 if test "$HAVE_BZIP2" = "no"
59 AC_MSG_ERROR([required library not found]);
62 dnl Check for libxml2 library
65 AC_CONFIG_SUBDIRS([osm2pgsql])
67 AC_OUTPUT(Makefile nominatim/Makefile module/Makefile)