--- gdraw/Makefile.dynamic.in.orig	Mon Nov  3 20:35:29 2003
+++ gdraw/Makefile.dynamic.in	Sun Feb  8 22:05:21 2004
@@ -3,6 +3,7 @@
 top_builddir = ..
 VPATH = @srcdir@
 prefix = @prefix@
+exec_prefix = @exec_prefix@
 bindir = @bindir@
 libdir = @libdir@
 
@@ -34,11 +35,11 @@
 Incs = -I$(top_srcdir)/inc -I/usr/pkg/include -I/usr/pkg/include/giflib
 WFLAGS = -Wmissing-prototypes -Wunused -Wimplicit -Wreturn-type -Wparentheses \
 	-Wformat -Wchar-subscripts 
-CFLAGS = @CFLAGS@ $(Incs) $(WFLAGS) $(X_CFLAGS) -DNOTHREADS @DEFS@ -DLIBDIR='"$(libdir)"'
+CFLAGS = @CPPFLAGS@ @CFLAGS@ $(Incs) $(WFLAGS) $(X_CFLAGS) -DNOTHREADS @DEFS@ -DLIBDIR='"$(libdir)"'
 
 ../libgdraw.la: $(libgdraw_OBJECTS)
 	$(LIBTOOL) $(CC) $(CFLAGS) -o ../libgdraw.la $(libgdraw_OBJECTS) \
-	    $(STATIC_LIBS) \
+	    $(STATIC_LIBS) @LDFLAGS@ \
 	    -rpath $(libdir) -version-info $(GD_VERSION):$(GD_REVISION):$(GD_AGE)
 
 %.lo: %.c
