# pg_config --includedir /usr/include but all the include files are located under /usr/include/postgresql/ using dev-db/postgresql-7.4.3 compiled with: -doc -java +libg++ +nls +pam +perl -pg-hier -pg-intdatetime -pg-vacuumdelay +python +readline +ssl -tcltk +zlib
notice that pg_config is non-standard : it outputs just the dir without the compiler flag. second thing, the curlpit here is the "install-all-headers", if that is used pg_config's output MUST be changed accordingly (it installs more headers, with sub-directories) I suggest using a gentoo-specific patch for it (trivial), and raising this upsteam. Do you have a contact within the pgsql people?
Created attachment 34801 [details, diff] postgresql-7.4.3-pg_config.patch
pg_config is set configure flags when it's installed. the problem is arguments for configure. i've just fixed postgresql-7.3.6-r2/postgresql-7.4.3-r1. thank you for reporting.
Slightly different problem with postgresql-7.4.6 `pgconfig --includedir` works but `pgconfig --includedir-server` does not: startide seth> pg_config --includedir /usr/include/postgresql/pgsql startide seth> pg_config --includedir-server /usr/include/postgresql/pgsql/server The actual retail server directory is /usr/include/postgresql/server startide seth> pg_config --configure '--prefix=/usr' '--mandir=/usr/share/man' '--host=i686-pc-linux-gnu' '--docdir=/usr/share/doc/postgresql-7.4.6' '--libdir=/usr/lib' '--includedir=/usr/include/postgresql/pgsql' '--enable-depend' '--with-gnu-ld' '--with-maxbackends=1024' '--with-tcl' '--with-python' '--with-perl' '--with-java' '--with-openssl' '--enable-nls' '--with-CXX' '--with-pam' 'CC=gcc' 'CFLAGS=-O2 -march=pentium3 -fomit-frame-pointer' 'host_alias=i686-pc-linux-gnu'
closing this zombie. (no update in 2 years)