Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:Update
collectd
avoid-pg-config.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File avoid-pg-config.patch of Package collectd
Index: collectd-5.10.0/configure.ac =================================================================== --- collectd-5.10.0.orig/configure.ac +++ collectd-5.10.0/configure.ac @@ -4402,18 +4402,10 @@ AC_SUBST([PERL_LIBS]) # }}} # --with-libpq {{{ -with_pg_config="pg_config" AC_ARG_WITH([libpq], - [AS_HELP_STRING([--with-libpq@<:@=PREFIX@:>@], [Path to libpq.])], + [AS_HELP_STRING([--with-libpq], [Build using pgsql])], [ - if test "x$withval" = "xno" || test "x$withval" = "xyes"; then - with_libpq="$withval" - else - if test -f "$withval" && test -x "$withval"; then - with_pg_config="$withval" - else if test -x "$withval/bin/pg_config"; then - with_pg_config="$withval/bin/pg_config" - fi; fi + if test "x$withval" != "xno" || test "x$withval" != "xyes"; then with_libpq="yes" fi ], @@ -4421,66 +4413,42 @@ AC_ARG_WITH([libpq], ) if test "x$with_libpq" = "xyes"; then - with_libpq_includedir=`$with_pg_config --includedir 2> /dev/null` - pg_config_status=$? - - if test $pg_config_status -eq 0; then - if test -n "$with_libpq_includedir"; then - for dir in $with_libpq_includedir; do - with_libpq_cppflags="$with_libpq_cppflags -I$dir" - done - fi - else - AC_MSG_WARN([$with_pg_config returned with status $pg_config_status]) + $PKG_CONFIG --exists 'libpq' 2>/dev/null + if test $? -ne 0; then + with_libpq="no (pkg-config doesn't know libpq)" fi - - SAVE_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $with_libpq_cppflags" - - AC_CHECK_HEADERS([libpq-fe.h], - [with_libpq="yes"], - [with_libpq="no (libpq-fe.h not found)"] - ) - - CPPFLAGS="$SAVE_CPPFLAGS" fi if test "x$with_libpq" = "xyes"; then - with_libpq_libdir=`$with_pg_config --libdir 2> /dev/null` - pg_config_status=$? - - if test $pg_config_status -eq 0 - then - if test -n "$with_libpq_libdir"; then - for dir in $with_libpq_libdir; do - with_libpq_ldflags="$with_libpq_ldflags -L$dir" - done - fi - else - AC_MSG_WARN([$with_pg_config returned with status $pg_config_status]) - fi + with_libpq_cflags="`$PKG_CONFIG --cflags libpq`" + with_libpq_ldflags="`$PKG_CONFIG --libs-only-L libpq`" + with_libpq_libs="`$PKG_CONFIG --libs libpq`" +fi - SAVE_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $with_libpq_ldflags" +if test "x$with_libpq" = "xyes"; then + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $with_libpq_cflags" - AC_CHECK_LIB([pq], [PQserverVersion], - [with_libpq="yes"], - [with_libpq="no (symbol 'PQserverVersion' not found)"]) + # Look for libpq-fe.h + AC_CHECK_HEADERS([libpq-fe.h pgsql/libpq-fe.h], + [with_libpq="yes"], + [with_libpq="no (libpq-fe.h not found)"] + ) - LDFLAGS="$SAVE_LDFLAGS" + CPPFLAGS="$SAVE_CPPFLAGS" fi if test "x$with_libpq" = "xyes"; then - BUILD_WITH_LIBPQ_CPPFLAGS="$with_libpq_cppflags" + BUILD_WITH_LIBPQ_CPPFLAGS="$with_libpq_cflags" BUILD_WITH_LIBPQ_LDFLAGS="$with_libpq_ldflags" - BUILD_WITH_LIBPQ_LIBS="-lpq" + BUILD_WITH_LIBPQ_LIBS="$with_libpq_libs" fi AC_SUBST([BUILD_WITH_LIBPQ_CPPFLAGS]) -AC_SUBST([BUILD_WITH_LIBPQ_LDFLAGS]) AC_SUBST([BUILD_WITH_LIBPQ_LIBS]) # }}} + # --with-libpqos {{{ AC_ARG_WITH([libpqos], [AS_HELP_STRING([--with-libpqos@<:@=PREFIX@:>@], [Path to libpqos.])],
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor