Properly fix PostgreSQL detection.
This commit is contained in:
parent
c63caa73f0
commit
81ef033641
@ -2,12 +2,118 @@ Index: build/dbd.m4
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- build/dbd.m4 (revision 672960)
|
--- build/dbd.m4 (revision 672960)
|
||||||
+++ build/dbd.m4 (working copy)
|
+++ build/dbd.m4 (working copy)
|
||||||
@@ -35,7 +35,7 @@
|
@@ -35,16 +35,32 @@
|
||||||
if test "x$PGSQL_CONFIG" != 'x'; then
|
if test "x$PGSQL_CONFIG" != 'x'; then
|
||||||
pgsql_CPPFLAGS="-I`$PGSQL_CONFIG --includedir`"
|
pgsql_CPPFLAGS="-I`$PGSQL_CONFIG --includedir`"
|
||||||
pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir`"
|
pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir`"
|
||||||
- pgsql_LIBS="`$PGSQL_CONFIG --libs`"
|
- pgsql_LIBS="`$PGSQL_CONFIG --libs`"
|
||||||
+ pgsql_LIBS=""
|
|
||||||
|
|
||||||
APR_ADDTO(CPPFLAGS, [$pgsql_CPPFLAGS])
|
APR_ADDTO(CPPFLAGS, [$pgsql_CPPFLAGS])
|
||||||
APR_ADDTO(LDFLAGS, [$pgsql_LDFLAGS])
|
APR_ADDTO(LDFLAGS, [$pgsql_LDFLAGS])
|
||||||
|
- APR_ADDTO(LIBS, [$pgsql_LIBS])
|
||||||
|
fi
|
||||||
|
|
||||||
|
- AC_CHECK_HEADERS(libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
|
||||||
|
+ AC_CHECK_HEADERS(libpq-fe.h, [
|
||||||
|
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1],[
|
||||||
|
+ if test "x$PGSQL_CONFIG" != 'x'; then
|
||||||
|
+ unset ac_cv_lib_pq_PQsendQueryPrepared
|
||||||
|
+ pgsql_LIBS="`$PGSQL_CONFIG --libs`"
|
||||||
|
+ APR_ADDTO(LIBS, [$pgsql_LIBS])
|
||||||
|
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1])
|
||||||
|
+ fi
|
||||||
|
+ ])
|
||||||
|
+ ])
|
||||||
|
if test "$apu_have_pgsql" = "0"; then
|
||||||
|
- AC_CHECK_HEADERS(postgresql/libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
|
||||||
|
+ AC_CHECK_HEADERS(postgresql/libpq-fe.h, [
|
||||||
|
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1],[
|
||||||
|
+ if test "x$PGSQL_CONFIG" != 'x'; then
|
||||||
|
+ unset ac_cv_lib_pq_PQsendQueryPrepared
|
||||||
|
+ pgsql_LIBS="`$PGSQL_CONFIG --libs`"
|
||||||
|
+ APR_ADDTO(LIBS, [$pgsql_LIBS])
|
||||||
|
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1])
|
||||||
|
+ fi
|
||||||
|
+ ])
|
||||||
|
+ ])
|
||||||
|
fi
|
||||||
|
if test "$apu_have_pgsql" != "0" && test "x$PGSQL_CONFIG" != 'x'; then
|
||||||
|
APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$pgsql_CPPFLAGS])
|
||||||
|
@@ -56,7 +72,6 @@
|
||||||
|
if test "x$PGSQL_CONFIG" != 'x'; then
|
||||||
|
pgsql_CPPFLAGS="-I`$PGSQL_CONFIG --includedir`"
|
||||||
|
pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir`"
|
||||||
|
- pgsql_LIBS="`$PGSQL_CONFIG --libs`"
|
||||||
|
else
|
||||||
|
pgsql_CPPFLAGS="-I$withval/include"
|
||||||
|
pgsql_LDFLAGS="-L$withval/lib "
|
||||||
|
@@ -64,12 +79,29 @@
|
||||||
|
|
||||||
|
APR_ADDTO(CPPFLAGS, [$pgsql_CPPFLAGS])
|
||||||
|
APR_ADDTO(LDFLAGS, [$pgsql_LDFLAGS])
|
||||||
|
- APR_ADDTO(LIBS, [$pgsql_LIBS])
|
||||||
|
|
||||||
|
AC_MSG_NOTICE(checking for pgsql in $withval)
|
||||||
|
- AC_CHECK_HEADERS(libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
|
||||||
|
+ AC_CHECK_HEADERS(libpq-fe.h, [
|
||||||
|
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1],[
|
||||||
|
+ if test "x$PGSQL_CONFIG" != 'x'; then
|
||||||
|
+ unset ac_cv_lib_pq_PQsendQueryPrepared
|
||||||
|
+ pgsql_LIBS="`$PGSQL_CONFIG --libs`"
|
||||||
|
+ APR_ADDTO(LIBS, [$pgsql_LIBS])
|
||||||
|
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1])
|
||||||
|
+ fi
|
||||||
|
+ ])
|
||||||
|
+ ])
|
||||||
|
if test "$apu_have_pgsql" != "1"; then
|
||||||
|
- AC_CHECK_HEADERS(postgresql/libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
|
||||||
|
+ AC_CHECK_HEADERS(postgresql/libpq-fe.h, [
|
||||||
|
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1],[
|
||||||
|
+ if test "x$PGSQL_CONFIG" != 'x'; then
|
||||||
|
+ unset ac_cv_lib_pq_PQsendQueryPrepared
|
||||||
|
+ pgsql_LIBS="`$PGSQL_CONFIG --libs`"
|
||||||
|
+ APR_ADDTO(LIBS, [$pgsql_LIBS])
|
||||||
|
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1])
|
||||||
|
+ fi
|
||||||
|
+ ])
|
||||||
|
+ ])
|
||||||
|
fi
|
||||||
|
if test "$apu_have_pgsql" != "0"; then
|
||||||
|
APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$pgsql_CPPFLAGS])
|
||||||
|
@@ -80,16 +112,32 @@
|
||||||
|
if test "x$PGSQL_CONFIG" != 'x'; then
|
||||||
|
pgsql_CPPFLAGS="-I`$PGSQL_CONFIG --includedir`"
|
||||||
|
pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir`"
|
||||||
|
- pgsql_LIBS="`$PGSQL_CONFIG --libs`"
|
||||||
|
|
||||||
|
APR_ADDTO(CPPFLAGS, [$pgsql_CPPFLAGS])
|
||||||
|
APR_ADDTO(LDFLAGS, [$pgsql_LDFLAGS])
|
||||||
|
- APR_ADDTO(LIBS, [$pgsql_LIBS])
|
||||||
|
fi
|
||||||
|
|
||||||
|
- AC_CHECK_HEADERS(libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
|
||||||
|
+ AC_CHECK_HEADERS(libpq-fe.h, [
|
||||||
|
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1],[
|
||||||
|
+ if test "x$PGSQL_CONFIG" != 'x'; then
|
||||||
|
+ unset ac_cv_lib_pq_PQsendQueryPrepared
|
||||||
|
+ pgsql_LIBS="`$PGSQL_CONFIG --libs`"
|
||||||
|
+ APR_ADDTO(LIBS, [$pgsql_LIBS])
|
||||||
|
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1])
|
||||||
|
+ fi
|
||||||
|
+ ])
|
||||||
|
+ ])
|
||||||
|
if test "$apu_have_pgsql" = "0"; then
|
||||||
|
- AC_CHECK_HEADERS(postgresql/libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
|
||||||
|
+ AC_CHECK_HEADERS(postgresql/libpq-fe.h, [
|
||||||
|
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1],[
|
||||||
|
+ if test "x$PGSQL_CONFIG" != 'x'; then
|
||||||
|
+ unset ac_cv_lib_pq_PQsendQueryPrepared
|
||||||
|
+ pgsql_LIBS="`$PGSQL_CONFIG --libs`"
|
||||||
|
+ APR_ADDTO(LIBS, [$pgsql_LIBS])
|
||||||
|
+ AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1])
|
||||||
|
+ fi
|
||||||
|
+ ])
|
||||||
|
+ ])
|
||||||
|
fi
|
||||||
|
if test "$apu_have_pgsql" != "0" && test "x$PGSQL_CONFIG" != 'x'; then
|
||||||
|
APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$pgsql_CPPFLAGS])
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
Summary: Apache Portable Runtime Utility library
|
Summary: Apache Portable Runtime Utility library
|
||||||
Name: apr-util
|
Name: apr-util
|
||||||
Version: 1.3.2
|
Version: 1.3.2
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://apr.apache.org/
|
URL: http://apr.apache.org/
|
||||||
@ -183,6 +183,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_libdir}/pkgconfig/*.pc
|
%{_libdir}/pkgconfig/*.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 2 2008 Bojan Smojver <bojan@rexursive.com> - 1.3.2-4
|
||||||
|
- properly fix PostgreSQL detection
|
||||||
|
|
||||||
* Wed Jul 2 2008 Bojan Smojver <bojan@rexursive.com> - 1.3.2-3
|
* Wed Jul 2 2008 Bojan Smojver <bojan@rexursive.com> - 1.3.2-3
|
||||||
- revert build dependencies, change from -2 didn't help
|
- revert build dependencies, change from -2 didn't help
|
||||||
- add apr-util-1.3.2-pgsql.patch (remove pgsql_LIBS during detection)
|
- add apr-util-1.3.2-pgsql.patch (remove pgsql_LIBS during detection)
|
||||||
|
Loading…
Reference in New Issue
Block a user