diff options
author | 2008-07-20 16:09:31 +0000 | |
---|---|---|
committer | 2008-07-20 16:09:31 +0000 | |
commit | 7ac6fbca3d3500ecbf0f9e891e622a9820bafbcc (patch) | |
tree | 2a2d8f8b5d9eb5be5fd6fb178753b0e5f09b4fa3 /net-analyzer/nagios-plugins/files | |
parent | Update 3dgamers mirror listing. (diff) | |
download | gentoo-2-7ac6fbca3d3500ecbf0f9e891e622a9820bafbcc.tar.gz gentoo-2-7ac6fbca3d3500ecbf0f9e891e622a9820bafbcc.tar.bz2 gentoo-2-7ac6fbca3d3500ecbf0f9e891e622a9820bafbcc.zip |
Fix building with newer postgres-packages, #230167
(Portage version: 2.2_rc1/cvs/Linux 2.6.25-gentoo-r6 x86_64)
Diffstat (limited to 'net-analyzer/nagios-plugins/files')
-rw-r--r-- | net-analyzer/nagios-plugins/files/nagios-plugins-1.4.12-pgsqlconfigure.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/net-analyzer/nagios-plugins/files/nagios-plugins-1.4.12-pgsqlconfigure.patch b/net-analyzer/nagios-plugins/files/nagios-plugins-1.4.12-pgsqlconfigure.patch new file mode 100644 index 000000000000..e5e713db2128 --- /dev/null +++ b/net-analyzer/nagios-plugins/files/nagios-plugins-1.4.12-pgsqlconfigure.patch @@ -0,0 +1,69 @@ +diff -Naur nagios-plugins-1.4.12.orig/configure.in nagios-plugins-1.4.12/configure.in +--- nagios-plugins-1.4.12.orig/configure.in 2008-05-28 00:01:05.000000000 +0200 ++++ nagios-plugins-1.4.12/configure.in 2008-07-20 18:02:42.000000000 +0200 +@@ -182,27 +182,34 @@ + PGSQL=$withval,) + AC_CHECK_LIB(crypt,main) + if test "$ac_cv_lib_crypt_main" = "yes" -a "x$PGSQL" != "xno"; then +- if test -n "$PGSQL"; then +- LDFLAGS="$LDFLAGS -L$PGSQL/lib" +- CPPFLAGS="$CPPFLAGS -I$PGSQL/include" ++ if test -x $with_pgsql/bin/pg_config ; then ++ np_pg_config="$with_pgsql/bin/pg_config" + fi +- AC_CHECK_LIB(pq,PQsetdbLogin,,,-lcrypt) +- if test "$ac_cv_lib_pq_PQsetdbLogin" = "yes"; then +- AC_CHECK_HEADERS(pgsql/libpq-fe.h) +- AC_CHECK_HEADERS(postgresql/libpq-fe.h) +- AC_CHECK_HEADERS(libpq-fe.h) +- if [[ -n "$PGSQL" -a "$ac_cv_header_libpq_fe_h" = "yes" ]]; then +- PGLIBS="-L$PGSQL/lib -lpq -lcrypt" +- PGINCLUDE="-I$PGSQL/include" +- elif test "$ac_cv_header_pgsql_libpq_fe_h" = "yes"; then +- PGLIBS="-lpq -lcrypt" +- PGINCLUDE="-I/usr/include/pgsql" +- elif test "$ac_cv_header_postgresql_libpq_fe_h" = "yes"; then +- PGLIBS="-L$PGSQL/lib -lpq -lcrypt" +- PGINCLUDE="-I/usr/include/postgresql" +- elif test "$ac_cv_header_libpq_fe_h" = "yes"; then +- PGLIBS="-L$PGSQL/lib -lpq -lcrypt" +- PGINCLUDE="-I$PGSQL/include" ++ if test -z "$np_pg_config"; then ++ with_pgsql="no" ++ else ++ if test -n "$PGSQL"; then ++ LDFLAGS="$LDFLAGS -L`$np_pg_config --libdir`" ++ CPPFLAGS="$CPPFLAGS -I`$np_pg_config --includedir`" ++ fi ++ AC_CHECK_LIB(pq,PQsetdbLogin,,,-lcrypt) ++ if test "$ac_cv_lib_pq_PQsetdbLogin" = "yes"; then ++ AC_CHECK_HEADERS(pgsql/libpq-fe.h) ++ AC_CHECK_HEADERS(postgresql/libpq-fe.h) ++ AC_CHECK_HEADERS(libpq-fe.h) ++ if [[ -n "$PGSQL" -a "$ac_cv_header_libpq_fe_h" = "yes" ]]; then ++ PGLIBS="-L`$np_pg_config --libdir` -lpq -lcrypt" ++ PGINCLUDE="-I`$np_pg_config --includedir`" ++ elif test "$ac_cv_header_pgsql_libpq_fe_h" = "yes"; then ++ PGLIBS="-lpq -lcrypt" ++ PGINCLUDE="-I`$np_pg_config --includedir`" ++ elif test "$ac_cv_header_postgresql_libpq_fe_h" = "yes"; then ++ PGLIBS="-L`$np_pg_config --libdir` -lpq -lcrypt" ++ PGINCLUDE="-I`$np_pg_config --includedir`" ++ elif test "$ac_cv_header_libpq_fe_h" = "yes"; then ++ PGLIBS="-L`$np_pg_config --libdir` -lpq -lcrypt" ++ PGINCLUDE="-I`$np_pg_config --includedir`" ++ fi + fi + if test -z "$PGINCLUDE"; then + AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)]) +@@ -212,10 +219,6 @@ + AC_SUBST(PGINCLUDE) + EXTRAS="$EXTRAS check_pgsql" + fi +- else +- AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)]) +- AC_MSG_WARN([LIBS="$LIBS" CPPFLAGS="$CPPFLAGS"]) +- AC_MSG_WARN([install PostgreSQL libs to compile this plugin (see REQUIREMENTS).]) + fi + else + AC_MSG_WARN([Skipping PostgreSQL plugin (check_pgsql)]) |