Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:rmax
jabberd
jabberd-libpq.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File jabberd-libpq.patch of Package jabberd
--- configure.ac.orig +++ configure.ac @@ -525,6 +525,15 @@ if test "x-$enable_pgsql" != "x-no" ; th PGSQL_PREFIX=/usr fi + PKG_CHECK_MODULES(PGSQL, libpq,[ + have_pgsql=yes + AC_MSG_CHECKING(PostgresSQL libraries) + AC_MSG_RESULT("$PGSQL_LIBS") + AC_MSG_CHECKING(pgsql includes) + AC_MSG_RESULT("$PGSQL_CFLAGS") + AC_DEFINE([STORAGE_POSTGRES],[1],[Define to 1 if you want to use PostgreSQL for storage.]) + ],[ + AC_PATH_PROG(pgconfig,pg_config,,[$PGSQL_PREFIX/bin:$PATH]) if test [ -z "$pgconfig" ] then @@ -542,7 +551,7 @@ if test "x-$enable_pgsql" != "x-no" ; th have_pgsql=yes AC_DEFINE([STORAGE_POSTGRES],[1],[Define to 1 if you want to use PostgreSQL for storage.]) - fi + fi]) fi AC_SUBST(PGSQL_CFLAGS) AC_SUBST(PGSQL_LIBS) --- configure.orig +++ configure @@ -17251,6 +17251,136 @@ if test "x-$enable_pgsql" != "x-no" ; th PGSQL_PREFIX=/usr fi + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpq" >&5 +$as_echo_n "checking for libpq... " >&6; } + +if test -n "$PGSQL_CFLAGS"; then + pkg_cv_PGSQL_CFLAGS="$PGSQL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpq\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libpq") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PGSQL_CFLAGS=`$PKG_CONFIG --cflags "libpq" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$PGSQL_LIBS"; then + pkg_cv_PGSQL_LIBS="$PGSQL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpq\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libpq") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PGSQL_LIBS=`$PKG_CONFIG --libs "libpq" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + PGSQL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpq" 2>&1` + else + PGSQL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpq" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$PGSQL_PKG_ERRORS" >&5 + + + + # Extract the first word of "pg_config", so it can be a program name with args. +set dummy pg_config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_pgconfig+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $pgconfig in + [\\/]* | ?:[\\/]*) + ac_cv_path_pgconfig="$pgconfig" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PGSQL_PREFIX/bin:$PATH" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_pgconfig="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +pgconfig=$ac_cv_path_pgconfig +if test -n "$pgconfig"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgconfig" >&5 +$as_echo "$pgconfig" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test -z "$pgconfig" + then + as_fn_error $? "pg_config executable not found: PostgreSQL 8.0 or greater is required." "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking PostgresSQL libraries" >&5 +$as_echo_n "checking PostgresSQL libraries... " >&6; } + PGSQL_LIBDIR=`$pgconfig --libdir` + PGSQL_LIBS="-L$PGSQL_LIBDIR -lpq" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$PGSQL_LIBS\"" >&5 +$as_echo "\"$PGSQL_LIBS\"" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pgsql includes" >&5 +$as_echo_n "checking pgsql includes... " >&6; } + PGSQL_INCLUDE=`$pgconfig --includedir` + PGSQL_CFLAGS="-I$PGSQL_INCLUDE" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$PGSQL_CFLAGS\"" >&5 +$as_echo "\"$PGSQL_CFLAGS\"" >&6; } + + have_pgsql=yes + +$as_echo "#define STORAGE_POSTGRES 1" >>confdefs.h + + fi +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + + # Extract the first word of "pg_config", so it can be a program name with args. set dummy pg_config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -17315,6 +17445,26 @@ $as_echo "\"$PGSQL_CFLAGS\"" >&6; } $as_echo "#define STORAGE_POSTGRES 1" >>confdefs.h fi +else + PGSQL_CFLAGS=$pkg_cv_PGSQL_CFLAGS + PGSQL_LIBS=$pkg_cv_PGSQL_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + + have_pgsql=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: checking PostgresSQL libraries" >&5 +$as_echo_n "checking PostgresSQL libraries... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$PGSQL_LIBS\"" >&5 +$as_echo "\"$PGSQL_LIBS\"" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pgsql includes" >&5 +$as_echo_n "checking pgsql includes... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$PGSQL_CFLAGS\"" >&5 +$as_echo "\"$PGSQL_CFLAGS\"" >&6; } + +$as_echo "#define STORAGE_POSTGRES 1" >>confdefs.h + + +fi fi
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