--- contrib/sample/Makefile.in.orig	2009-02-21 05:14:32.000000000 +0100
+++ contrib/sample/Makefile.in	2009-02-21 05:14:45.000000000 +0100
@@ -298,7 +298,7 @@
 AUTOMAKE_OPTIONS = $(top_builddir)/lib/ansi2knr
 sample_SOURCES = main.c
 INCLUDES = -I. -I.. -I$(top_builddir) -I$(top_srcdir)/intl -I$(top_srcdir)/lib
-sample_LDADD = $(top_builddir)/lib/liba2ps.la @LIBINTL@ -lm
+sample_LDADD = -lm $(top_builddir)/lib/liba2ps.la @LIBINTL@
 all: all-am
 
 .SUFFIXES:
