X-Git-Url: http://www.andromeda.nl/gitweb/?p=gnucomo.git;a=blobdiff_plain;f=configure.in;h=f7ee27b7480a626b4d6424495c1ca3cac39f283e;hp=2206fba45f7a0ac315b3d2e57746dfc3d434a120;hb=ee198da02877cf3afeec618db265a132e97d0439;hpb=fb3ef40fde8ca526d0fab890c5e8edbd0312652a diff --git a/configure.in b/configure.in index 2206fba..f7ee27b 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(src/gcm_input/message.h) -AM_INIT_AUTOMAKE(GnuCoMo, 0.0.9) +AM_INIT_AUTOMAKE(GnuCoMo, 0.0.10) dnl Checks for programs. @@ -41,6 +41,30 @@ AC_CHECK_LIB(AXE, main, , AC_MSG_ERROR(AXE Library is not installed)) #AC_CHECK_LIB(pthread, pthread_create) AC_CHECK_LIB(xml2, xmlParseFile) +# PostgreSQL includes and libraries +with_postgres_include="-I/usr/include/pqxx" +AC_MSG_NOTICE([using PostgreSQL headers at $with_postgres_include]) +with_postgres_lib="-lpqxx -lpq" +AC_MSG_NOTICE([using PostgreSQL libraries at $with_postgres_lib]) + +AC_SUBST(with_postgres_lib) +AC_SUBST(with_postgres_include) +POSTGRES_LIB="${with_postgres_lib}" +AC_SUBST(POSTGRES_LIB) +POSTGRES_INCLUDE="${with_postgres_include}" +AC_SUBST(POSTGRES_INCLUDE) + + +# Checks for libraries. +AC_CHECK_LIB([pq], [PQexec], [], [AC_MSG_ERROR([Failed to find a suitable libpq. + +PostgreSQL's libpq needs to be installed. +Perhaps you need to specify --with-postgres-lib? +])], -L${with_postgres_lib}) + + +CXXFLAGS="$CXXFLAGS $POSTGRES_INCLUDE" +LIBS="$LIBS $POSTGRES_LIB" # # There is no convenient way to detect libpqxx, so we'll @@ -48,7 +72,6 @@ AC_CHECK_LIB(xml2, xmlParseFile) CXXFLAGS="$CXXFLAGS -I/usr/local/pqxx/include" LIBS="$LIBS -L/usr/local/pqxx/lib -lpqxx" -AC_HAVE_LIBRARY(pq) dnl Checks for header files. AC_HEADER_DIRENT @@ -66,4 +89,4 @@ dnl Edit this to be your web server's document root DocumentRoot=/var/www/html #AC_OUTPUT(Makefile src/Makefile src/lib/Makefile src/gcm_input/Makefile src/web/Makefile) -AC_OUTPUT(Makefile src/Makefile src/lib/Makefile src/gcm_input/Makefile) +AC_OUTPUT(Makefile src/Makefile src/lib/Makefile src/gcm_input/Makefile test/Makefile)