$NetBSD: patch-ab,v 1.2 2000/07/19 21:42:12 jlam Exp $

--- configure.in.orig	Wed Feb 17 23:58:02 1999
+++ configure.in	Wed Jul 19 17:36:22 2000
@@ -54,6 +54,11 @@
 fi
 AC_SUBST(XX_CFLAGS)
 
+AC_ARG_ENABLE(
+ tools,
+ [  --enable-tools                   Build VFlib tools],
+ build_tools=yes,
+ build_tools=no)
 
 AC_SUBST(freetype_includedir)
 AC_SUBST(freetype_libdir)
@@ -75,10 +80,10 @@
 AC_ARG_WITH(
  freetype-libdir,
  [  --with-freetype-libdir=DIR       FreeType library files are in DIR],
- if test "${withval}" = yes; then withval=""; fi;
+ [if test "${withval}" = yes; then withval=""; fi;
  if test "${withval}" = ""; 
  then freetype_libdir=""
- else freetype_libdir=-L${withval}; fi)
+ else freetype_libdir="-Wl,-R${withval} -L${withval}"; fi])
 if test -n "$freetype_lib" ; then
   echo "Enabled the TrueType font driver"; 
   OLD_CPPFLAGS=${CPPFLAGS}; OLD_LIBS=${LIBS}
@@ -117,6 +122,7 @@
 AC_CONFIG_HEADER(src/with.h src/config.h)
 AC_OUTPUT(Makefile make-sub src/Makefile tools/Imakefile)
 
+if test "$build_tools" = "yes" ; then
 if test -d /usr/openwin ; then \
 	(cd tools; \
 	 OPENWINHOME=/usr/openwin; \
@@ -124,6 +130,7 @@
      	 xmkmf;)  \
 else \
 	(cd tools; xmkmf -a) \
+fi
 fi
 
 dnl EOF
