Attached is a small patch.
Fix:
Somewhere between graphviz-2.8 and graphviz-2.12 the handling
of installed vs. bundled libgd was modified.
Adapt contrib/diffimg/Makefile.am to the new WITH_LIBGD vs. WITH_MYLIBGD semantics.
diff -ur graphviz-2.12.orig/contrib/diffimg/Makefile.am graphviz-2.12/contrib/diffimg/Makefile.am
--- graphviz-2.12.orig/contrib/diffimg/Makefile.am 2006-06-27 14:29:56.000000000 +0200
+++ graphviz-2.12/contrib/diffimg/Makefile.am 2007-03-16 11:58:12.000000000 +0100
@@ -12,11 +12,14 @@
diffimg_SOURCES = diffimg.c
if WITH_LIBGD
-diffimg_LDADD = $(top_builddir)/lib/gd/libgvgd_C.la
+if WITH_MYLIBGD
+diffimg_LDADD =
+ $(top_builddir)/lib/gd/libgvgd_C.la
@FC_LIBS@ @FT_LIBS@ @JPEG_LIBS@ @PNG_LIBS@ @Z_LIBS@ @MATH_LIBS@
else
diffimg_LDADD = @GD_LIBS@
endif
+endif
GRAPH = "digraph G { hello -> world }"