diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2014-08-08 22:20:48 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2014-08-08 22:20:48 +0000 |
commit | f831fabcad550115c2e83260cdf0894773692502 (patch) | |
tree | 561ce7a4309a36383a35ac0ac6bc504079a2ac99 /configure.ac | |
parent | b67016043fe41bfe3832384a1fb7503ef2220364 (diff) | |
download | gnunet-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.ac | 34 |
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 |
668 | postgres=false | 668 | postgres=false |
669 | AC_MSG_CHECKING(for postgres) | 669 | AX_LIB_POSTGRESQL([]) |
670 | AC_ARG_WITH(postgres, | 670 | if test "$found_postgresql" = "yes"; then |
671 | [ --with-postgres=PFX base of postgres installation], | 671 | postgres=true |
672 | [AC_MSG_RESULT("$with_postgres") | 672 | fi |
673 | case $with_postgres in | 673 | AM_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)]) | ||
695 | AM_CONDITIONAL(HAVE_POSTGRES, test x$postgres = xtrue) | ||
696 | AC_SUBST(POSTGRES_CPPFLAGS) | ||
697 | AC_SUBST(POSTGRES_LDFLAGS) | ||
698 | 674 | ||
699 | # test for zlib | 675 | # test for zlib |
700 | SAVE_LDFLAGS=$LDFLAGS | 676 | SAVE_LDFLAGS=$LDFLAGS |