I think PGXS is, what I've been looking for.
My Makefile looks like this:
PROGRAM = test
DATA = test.c
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
The file test.c only includes the postgres.h, but I get this error, when compiling:
/usr/bin/ld: cannot find -lxslt
/usr/bin/ld: cannot find -lxml2
/usr/bin/ld: cannot find -lpam
/usr/bin/ld: cannot find -ledit
collect2: ld returned 1 exit status
make: *** [test] Error 1
Does anyone have an idea?
Janek Sendrowski