  if ENABLE_STATIC
  xtables_multi_CFLAGS  += -DALL_INCLUSIVE
  endif
-@@ -14,22 +15,25 @@ if ENABLE_IPV4
+@@ -16,23 +17,26 @@ if ENABLE_IPV4
  xtables_multi_SOURCES += iptables-save.c iptables-restore.c \
                           iptables-standalone.c iptables.c
  xtables_multi_CFLAGS  += -DENABLE_IPV4
 -xtables_multi_LDADD   += ../libiptc/libip4tc.la ../extensions/libext4.a
-+xtables_multi_LDADD   += ${top_builddir}/libiptc/libip4tc.la
-+xtables_multi_LDFLAGS += -liptext4
++xtables_multi_LDADD   += ../libiptc/libip4tc.la
++xtables_multi_LDFLAGS += -L${top_builddir}/extensions -liptext4
  endif
  if ENABLE_IPV6
  xtables_multi_SOURCES += ip6tables-save.c ip6tables-restore.c \
                            ip6tables-standalone.c ip6tables.c
  xtables_multi_CFLAGS  += -DENABLE_IPV6
 -xtables_multi_LDADD   += ../libiptc/libip6tc.la ../extensions/libext6.a
-+xtables_multi_LDADD   += ${top_builddir}/libiptc/libip6tc.la
-+xtables_multi_LDFLAGS += -liptext6
++xtables_multi_LDADD   += ../libiptc/libip6tc.la
++xtables_multi_LDFLAGS += -L${top_builddir}/extensions -liptext6
  endif
  xtables_multi_SOURCES += xshared.c
 -xtables_multi_LDADD   += ../libxtables/libxtables.la -lm

Index: iptables-1.6.0/extensions/GNUmakefile.in
===================================================================
--- iptables-1.6.0.orig/extensions/GNUmakefile.in
+++ iptables-1.6.0/extensions/GNUmakefile.in
@@ -49,11 +49,33 @@ pfb_build_mod := $(filter-out @blacklist
 pfa_build_mod := $(filter-out @blacklist_modules@ @blacklist_a_modules@,${pfa_build_mod})
 pf4_build_mod := $(filter-out @blacklist_modules@ @blacklist_4_modules@,${pf4_build_mod})
 pf6_build_mod := $(filter-out @blacklist_modules@ @blacklist_6_modules@,${pf6_build_mod})

 
 -include .*.d
 
@@ -101,7 +123,7 @@ init%.o: init%.c
 #	Shared libraries
 #
 lib%.so: lib%.oo
