~flameeyes/gearmand/gentoo-fixes

Viewing all changes in revision 352.

  • Committer: Diego Pettenò
  • Date: 2010-04-08 01:08:39 UTC
  • Revision ID: flameeyes@gentoo.org-20100408010839-pcc4vqw5ups3qxhh
Fix PostgreSQL queue manager building on Gentoo and other platforms.

When the includes are installed in non-standard positions, and especially
when libpq-fe.h is available without -I directives, but pg_config_manual.h
isn't, you cannot rely on just finding one to get the other.

What you have to do in this case is use the pg_config script shipped with
PostgreSQL to get the right include directory, and use the simple basename
for the include headers.

Also, on modern (glibc-2.10) systems, using simply pg_config_manual.h
without pg_config.h or without adding further checks in configure, the
build will fail with this error:

In file included from libgearman-server/queue_libpq.c:19:
/usr/include/postgresql-8.4/pg_config_manual.h:128:5: error: "HAVE_DECL_POSIX_FADVISE" is not defined
make[1]: *** [libgearman-server/libgearman_server_libgearman_server_la-queue_libpq.lo] Error 1

So include the PostgreSQL headers first thing, undefine package-specific
entries, and proceed.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: