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 AC_CONFIG_MACRO_DIR([osm2pgsql/m4])
 
  14 dnl Generate configuration header file
 
  15 AC_CONFIG_HEADER(nominatim/config.h)
 
  25 AX_PTHREAD([], [AC_MSG_ERROR([pthread library required])])
 
  27 dnl Check for Geos library
 
  29 if test "x$GEOS_VERSION" = "x" 
 
  31   AC_MSG_ERROR([required library not found]);
 
  34 dnl Check for Proj library
 
  36 if test "$HAVE_PROJ" = "no" 
 
  38   AC_MSG_ERROR([required library not found]);
 
  42 dnl Check for PostgresSQL client library
 
  43 AX_LIB_POSTGRESQL(9.0)
 
  44 if test "x$POSTGRESQL_VERSION" = "x"
 
  46     AC_MSG_ERROR([postgresql client library not found])
 
  48 if test ! -f "$POSTGRESQL_PGXS"
 
  50     AC_MSG_ERROR([postgresql server development library not found])
 
  53 dnl Check for bzip2 library
 
  55 if test "$HAVE_BZIP2" = "no" 
 
  57   AC_MSG_ERROR([required library not found]);
 
  60 dnl Check for libxml2 library
 
  63 AC_CONFIG_SUBDIRS([osm2pgsql])
 
  65 AC_OUTPUT(Makefile nominatim/Makefile module/Makefile)