diff -Naur a/Makefile.global.in b/Makefile.global.in --- a/Makefile.global.in 2011-07-11 17:19:57.000000000 -0400 +++ b/Makefile.global.in 2011-08-08 18:28:58.654658951 -0400 @@ -85,7 +85,7 @@ subdir=$(slony_subdir) override CPPFLAGS := -I${pgincludedir} -I${pgincludeserverdir} $(CPPFLAGS) -LDFLAGS = -L${pglibdir} -L${pgpkglibdir} -lpq @NLSLIB@ +override LDFLAGS += -L${pglibdir} -L${pgpkglibdir} -lpq @NLSLIB@ ifeq ($(GCC), yes) CFLAGS += -Wall -Wmissing-prototypes -Wmissing-declarations diff -Naur a/makefiles/Makefile.linux b/makefiles/Makefile.linux --- a/makefiles/Makefile.linux 2011-07-11 17:19:57.000000000 -0400 +++ b/makefiles/Makefile.linux 2011-08-09 07:52:47.071130982 -0400 @@ -12,9 +12,9 @@ endif %.so: %.o - $(CC) -shared -o $@ $< + $(CC) $(LDFLAGS) -shared -o $@ $< %.o: %.c - $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -c -o $@ $< -sqlmansect = 7 \ No newline at end of file +sqlmansect = 7