- AC_CHECK_HEADER(libxml/parser.h)
- case "$ac_cv_header_libxml_parser_h" in
- no)
- CPPFLAGS="$saved_CPPFLAGS"
- LIBS="$saved_LIBS"
- xml2=no
- ;;
- yes)
- AC_CHECK_FUNCS(xmlInitParser)
- case "$ac_cv_func_xmlInitParser" in
- no)
- CPPFLAGS="$saved_CPPFLAGS"
- LIBS="$saved_LIBS"
- xml2=no
- ;;
- yes)
- HAVE_XML2=1
- AC_SUBST(HAVE_XML2)
- AC_DEFINE_UNQUOTED(HAVE_XML2,$HAVE_XML2)
- expat=no
+AC_ARG_ENABLE(libxml2, [ --enable-libxml2 Use libxml2 instead of Expat])
+
+PKG_PROG_PKG_CONFIG
+
+if test "$enable_libxml2" = "yes" -o "$expat" = "no"; then
+ PKG_CHECK_MODULES([LIBXML2], [libxml-2.0 >= 2.6])
+ AC_DEFINE_UNQUOTED(ENABLE_LIBXML2,1,[Use libxml2 instead of Expat])
+
+ AC_SUBST(LIBXML2_CFLAGS)
+ AC_SUBST(LIBXML2_LIBS)
+fi
+
+#
+# Set default font directory
+#
+
+AC_ARG_WITH(default-fonts, [ --with-default-fonts=DIR Use fonts from DIR when config is busted], default_fonts="$withval", default_fonts=yes)
+
+case "$default_fonts" in
+yes)
+ if test "$os_win32" = "yes"; then
+ FC_DEFAULT_FONTS="WINDOWSFONTDIR"
+ AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "WINDOWSFONTDIR",
+ [Windows font directory])
+ else
+ FC_DEFAULT_FONTS="/usr/share/fonts"
+ AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "/usr/share/fonts",
+ [System font directory])
+ fi
+ ;;
+*)
+ FC_DEFAULT_FONTS="$default_fonts"
+ AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "$default_fonts",
+ [System font directory])
+ ;;
+esac
+
+AC_SUBST(FC_DEFAULT_FONTS)
+
+#
+# Add more fonts if available. By default, add only the directories
+# with outline fonts; those with bitmaps can be added as desired in
+# local.conf or ~/.fonts.conf
+#
+AC_ARG_WITH(add-fonts, [ --with-add-fonts=DIR1,DIR2,...Find additional fonts in DIR1,DIR2,... ], add_fonts="$withval", add_fonts=yes)
+
+case "$add_fonts" in
+yes)
+ FC_ADD_FONTS=""
+ for dir in /usr/X11R6/lib/X11 /usr/X11/lib/X11 /usr/lib/X11; do
+ case x"$FC_ADD_FONTS" in
+ x)
+ sub="$dir/fonts"
+ if test -d "$sub"; then
+ case x$FC_ADD_FONTS in
+ x)
+ FC_ADD_FONTS="$sub"
+ ;;
+ *)
+ FC_ADD_FONTS="$FC_ADD_FONTS,$sub"
+ ;;
+ esac
+ fi