forked from Mirrors/freeswitch
[build] fix libpq configure check to use flags from autoconf/pkg-config
This commit is contained in:
parent
8045c96458
commit
16a4c21af7
|
@ -699,7 +699,13 @@ AC_DEFINE_UNQUOTED([POSTGRESQL_MAJOR_VERSION], ${POSTGRESQL_MAJOR_VERSION}, [Spe
|
|||
AC_DEFINE_UNQUOTED([POSTGRESQL_MINOR_VERSION], ${POSTGRESQL_MINOR_VERSION}, [Specifies the version of PostgreSQL we are linking against])
|
||||
AC_DEFINE_UNQUOTED([POSTGRESQL_PATCH_VERSION], ${POSTGRESQL_PATCH_VERSION}, [Specifies the version of PostgreSQL we are linking against])
|
||||
have_libpq=no
|
||||
save_LIBS="${LIBS}"
|
||||
save_CPPFLAGS="${CPPFLAGS}"
|
||||
LIBS="${POSTGRESQL_LDFLAGS}"
|
||||
CPPFLAGS="${POSTGRESQL_CFLAGS}"
|
||||
AC_CHECK_LIB([pq], [PQgetvalue], [have_libpq="yes"])
|
||||
LIBS="${save_LIBS}"
|
||||
CPPFLAGS="${save_CPPFLAGS}"
|
||||
AM_CONDITIONAL([HAVE_PGSQL],[test "${have_libpq}" = "yes"])
|
||||
AC_SUBST([POSTGRESQL_CFLAGS], [$POSTGRESQL_CFLAGS])
|
||||
AC_SUBST([POSTGRESQL_LDFLAGS], [$POSTGRESQL_LDFLAGS])
|
||||
|
|
Loading…
Reference in New Issue