mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-18 14:30:41 +01:00
build system: make postgres module use pkg_config
This is the recommended method and we use pkg_config in any case. With the old method, postgres server-development packages needed to be installed just to build the client, which was neither intuitive nor clean.
This commit is contained in:
parent
aa0f2d6cfc
commit
312ba4e3b9
38
configure.ac
38
configure.ac
@ -814,24 +814,26 @@ AC_ARG_ENABLE(pgsql,
|
||||
[enable_pgsql=no]
|
||||
)
|
||||
if test "x$enable_pgsql" = "xyes"; then
|
||||
AC_CHECK_PROG(
|
||||
[PG_CONFIG],
|
||||
[pg_config],
|
||||
[pg_config],
|
||||
[no],,,
|
||||
)
|
||||
if test "x${PG_CONFIG}" = "xno"; then
|
||||
AC_MSG_FAILURE([pg_config not found])
|
||||
fi
|
||||
AC_CHECK_LIB(
|
||||
[pq],
|
||||
[PQconnectdb],
|
||||
[PGSQL_CFLAGS="-I`$PG_CONFIG --includedir`"
|
||||
PGSQL_LIBS="-L`$PG_CONFIG --libdir` -lpq"
|
||||
],
|
||||
[AC_MSG_FAILURE([PgSQL library is missing])],
|
||||
[-L`$PG_CONFIG --libdir`]
|
||||
)
|
||||
PKG_CHECK_MODULES([PGSQL], [libpq],, [
|
||||
AC_CHECK_PROG(
|
||||
[PG_CONFIG],
|
||||
[pg_config],
|
||||
[pg_config],
|
||||
[no],,,
|
||||
)
|
||||
if test "x${PG_CONFIG}" = "xno"; then
|
||||
AC_MSG_FAILURE([pg_config not found])
|
||||
fi
|
||||
AC_CHECK_LIB(
|
||||
[pq],
|
||||
[PQconnectdb],
|
||||
[PGSQL_CFLAGS="-I`$PG_CONFIG --includedir`"
|
||||
PGSQL_LIBS="-L`$PG_CONFIG --libdir` -lpq"
|
||||
],
|
||||
[AC_MSG_FAILURE([PgSQL library is missing])],
|
||||
[-L`$PG_CONFIG --libdir`]
|
||||
)
|
||||
])
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_PGSQL, test x$enable_pgsql = xyes)
|
||||
AC_SUBST(PGSQL_CFLAGS)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user