Permalink
Browse files

create a globale configure/make

- move the configure from nominatim out and add checks for all dependencies
- bring module under automake control
- add osm2pgsql as a submodule, configure and build with the others
  • Loading branch information...
1 parent 43ce82d commit de46b621869b3cec48efdb6520ec29177f267869 @lonvia lonvia committed Jun 15, 2012
View
@@ -0,0 +1,4 @@
+[submodule "osm2pgsql"]
+ path = osm2pgsql
+ url = https://github.com/openstreetmap/osm2pgsql.git
+ ignore = all
View
No changes.
View
No changes.
View
@@ -0,0 +1,6 @@
+ACLOCAL_AMFLAGS = -I osm2pgsql/m4
+
+SUBDIRS = osm2pgsql module nominatim
+
+install:
+ @echo Nominatim needs to be executed directly from this directory. No install necessary.
View
0 NEWS
No changes.
View
0 README
No changes.
View
@@ -0,0 +1,2 @@
+#!/bin/sh
+autoreconf -vfi
View
@@ -0,0 +1,65 @@
+AC_INIT(Nominatim,1.9.9)
+
+dnl Required autoconf version
+AC_PREREQ(2.61)
+
+AM_INIT_AUTOMAKE([1.9.6 dist-bzip2 std-options check-news])
+
+dnl Additional macro definitions are in here
+AC_CONFIG_MACRO_DIR([osm2pgsql/m4])
+
+dnl Generate configuration header file
+AC_CONFIG_HEADER(nominatim/config.h)
+
+
+dnl Find C compiler
+AC_PROG_CC
+
+dnl Find C++ compiler
+AC_PROG_CXX
+
+dnl pthread
+AX_PTHREAD([], [AC_MSG_ERROR([pthread library required])])
+
+dnl check for zlib library
+AX_CHECK_ZLIB
+
+dnl Check for Geos library
+AX_LIB_GEOS
+if test "x$GEOS_VERSION" = "x"
+then
+ AC_MSG_ERROR([required library not found]);
+fi
+
+dnl Check for Proj library
+AX_LIB_PROJ
+if test "$HAVE_PROJ" = "no"
+then
+ AC_MSG_ERROR([required library not found]);
+fi
+
+
+dnl Check for PostgresSQL client library
+AX_LIB_POSTGRESQL(8.4)
+if test "x$POSTGRESQL_VERSION" = "x"
+then
+ AC_MSG_ERROR([postgresql client library not found])
+fi
+if test ! -f "$POSTGRESQL_PGXS"
+then
+ AC_MSG_ERROR([postgresql server development library not found])
+fi
+
+dnl Check for bzip2 library
+AX_LIB_BZIP2
+if test "$HAVE_BZIP2" = "no"
+then
+ AC_MSG_ERROR([required library not found]);
+fi
+
+dnl Check for libxml2 library
+AM_PATH_XML2
+
+AC_CONFIG_SUBDIRS([osm2pgsql])
+
+AC_OUTPUT(Makefile nominatim/Makefile module/Makefile)
View
@@ -1,6 +1,9 @@
MODULES = nominatim
-PGXS := $(shell pg_config --pgxs)
+PGXS := /usr/lib/postgresql/9.1/lib/pgxs/src/makefiles/pgxs.mk
include $(PGXS)
all:
chmod 755 nominatim.so
+
+install:
+ @echo Library does not need to be installed.
View
@@ -0,0 +1,9 @@
+MODULES = nominatim
+PGXS := @POSTGRESQL_PGXS@
+include $(PGXS)
+
+all:
+ chmod 755 nominatim.so
+
+install:
+ @echo Library does not need to be installed.
View
@@ -0,0 +1,9 @@
+bin_PROGRAMS = nominatim
+
+nominatim_SOURCES = export.c geometry.cpp import.c index.c input.c nominatim.c postgresql.c sprompt.c
+
+AM_CFLAGS = @PTHREAD_CFLAGS@ @POSTGRESQL_CFLAGS@ @XML_CPPFLAGS@ @BZIP2_CFLAGS@ @GEOS_CFLAGS@ @PROJ_CFLAGS@ -DVERSION='"@PACKAGE_VERSION@"'
+AM_CPPFLAGS = @PTHREAD_CFLAGS@ @POSTGRESQL_CFLAGS@ @XML_CPPFLAGS@ @BZIP2_CFLAGS@ @GEOS_CFLAGS@ @PROJ_CFLAGS@
+
+AM_LDFLAGS = @PTHREAD_CFLAGS@ @POSTGRESQL_LDFLAGS@ @POSTGRESQL_LIBS@ @XML_LIBS@ @BZIP2_LDFLAGS@ @BZIP2_LIBS@ @GEOS_LDFLAGS@ @GEOS_LIBS@ @PROJ_LDFLAGS@ @PROJ_LIBS@ -lz
+
Oops, something went wrong.

0 comments on commit de46b62

Please sign in to comment.