Add --with-freetype

Defaults to auto.
diff --git a/configure.ac b/configure.ac
index 4fb4243..fbe76c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -247,7 +247,17 @@
 
 dnl ==========================================================================
 
-PKG_CHECK_MODULES(FREETYPE, freetype2 >= 2.3.8, have_freetype=true, have_freetype=false)
+AC_ARG_WITH(freetype,
+	[AS_HELP_STRING([--with-freetype=@<:@yes/no/auto@:>@],
+			[Use the FreeType library @<:@default=auto@:>@])],,
+	[with_freetype=auto])
+have_freetype=false
+if test "x$with_freetype" = "xyes" -o "x$with_freetype" = "xauto"; then
+	PKG_CHECK_MODULES(FREETYPE, freetype2 >= 2.3.8, have_freetype=true)
+fi
+if test "x$with_freetype" = "xyes" -a "x$have_freetype" != "xtrue"; then
+	AC_MSG_ERROR([FreeType support requested but libfreetype2 not found])
+fi
 if $have_freetype; then
 	AC_DEFINE(HAVE_FREETYPE, 1, [Have FreeType 2 library])
 	_save_libs="$LIBS"