patch by bangert to fix build with --as-needed. sent upstream at http://varnish.projects.linpro.no/ticket/486 diff -Naur varnish-2.0.4/lib/libvarnish/Makefile.am varnish-2.0.4.new/lib/libvarnish/Makefile.am --- varnish-2.0.4/lib/libvarnish/Makefile.am 2009-04-01 15:35:14.000000000 +0200 +++ varnish-2.0.4.new/lib/libvarnish/Makefile.am 2009-04-07 21:55:06.000000000 +0200 @@ -29,7 +29,7 @@ vss.c \ vtmpfile.c -libvarnish_la_LIBADD = ${RT_LIBS} ${NET_LIBS} ${LIBM} +libvarnish_la_LIBADD = $(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la ${RT_LIBS} ${NET_LIBS} ${LIBM} if ENABLE_TESTS diff -Naur varnish-2.0.4/lib/Makefile.am varnish-2.0.4.new/lib/Makefile.am --- varnish-2.0.4/lib/Makefile.am 2009-04-01 15:35:14.000000000 +0200 +++ varnish-2.0.4.new/lib/Makefile.am 2009-04-07 21:57:40.000000000 +0200 @@ -1,15 +1,15 @@ # $Id: varnish-2.0.4-link-order.patch,v 1.1 2009/04/13 09:54:47 bangert Exp $ SUBDIRS = \ + libvarnishcompat \ libvarnish \ libvarnishapi \ - libvarnishcompat \ libvcl \ @JEMALLOC_SUBDIR@ DIST_SUBDIRS = \ + libvarnishcompat \ libvarnish \ libvarnishapi \ - libvarnishcompat \ libvcl \ libjemalloc