aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2014-08-08 22:20:48 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2014-08-08 22:20:48 +0000
commitf831fabcad550115c2e83260cdf0894773692502 (patch)
tree561ce7a4309a36383a35ac0ac6bc504079a2ac99 /configure.ac
parentb67016043fe41bfe3832384a1fb7503ef2220364 (diff)
downloadgnunet-f831fabcad550115c2e83260cdf0894773692502.tar.gz
gnunet-f831fabcad550115c2e83260cdf0894773692502.zip
Include libpq-fe.h instead of postgres/libpq-fe.h.
Also add a macro for checking libpq from Autoconf macro archives.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac34
1 files changed, 5 insertions, 29 deletions
diff --git a/configure.ac b/configure.ac
index 6eb0d0375..cefc48243 100644
--- a/configure.ac
+++ b/configure.ac
@@ -666,35 +666,11 @@ AC_SUBST(SQLITE_LDFLAGS)
666 666
667# test for postgres 667# test for postgres
668postgres=false 668postgres=false
669AC_MSG_CHECKING(for postgres) 669AX_LIB_POSTGRESQL([])
670AC_ARG_WITH(postgres, 670if test "$found_postgresql" = "yes"; then
671 [ --with-postgres=PFX base of postgres installation], 671 postgres=true
672 [AC_MSG_RESULT("$with_postgres") 672fi
673 case $with_postgres in 673AM_CONDITIONAL(HAVE_POSTGRESQL, test x$postgres = xtrue)
674 no)
675 ;;
676 yes)
677 AC_CHECK_HEADERS(postgresql/libpq-fe.h,
678 postgres=true)
679 ;;
680 *)
681 LDFLAGS="-L$with_postgres/lib $LDFLAGS"
682 CPPFLAGS="-I$with_postgres/include $CPPFLAGS"
683 AC_CHECK_HEADERS(postgresql/libpq-fe.h,
684 EXT_LIB_PATH="-L$with_postgres/lib $EXT_LIB_PATH"
685 POSTGRES_LDFLAGS="-L$with_postgres/lib"
686 POSTGRES_CPPFLAGS="-I$with_postgres/include"
687 postgres=true)
688 LDFLAGS=$SAVE_LDFLAGS
689 CPPFLAGS=$SAVE_CPPFLAGS
690 ;;
691 esac
692 ],
693 [AC_MSG_RESULT([--with-postgres not specified])
694 AC_CHECK_HEADERS(postgresql/libpq-fe.h, postgres=true)])
695AM_CONDITIONAL(HAVE_POSTGRES, test x$postgres = xtrue)
696AC_SUBST(POSTGRES_CPPFLAGS)
697AC_SUBST(POSTGRES_LDFLAGS)
698 674
699# test for zlib 675# test for zlib
700SAVE_LDFLAGS=$LDFLAGS 676SAVE_LDFLAGS=$LDFLAGS