--- configure.in.orig	2014-09-05 08:05:27.000000000 -0700
+++ configure.in	2023-06-19 20:59:54.000000000 -0700
@@ -68,14 +68,14 @@ if test "$have_pangoft2" = "true"; then
   dnl On Solaris with Forte C, at least, need to link app/dia with -lfreetype.
   dnl It's not enough that -lpangoft2 implicitly pulls it in.
   have_freetype=false
-  AC_CHECK_LIB(freetype,FT_Init_FreeType,have_freetype=true,have_freetype=false,`freetype-config --libs`)
+  AC_CHECK_LIB(freetype,FT_Init_FreeType,have_freetype=true,have_freetype=false,`pkg-config freetype2 --libs`)
   if test "$have_freetype" = "true"; then
     dnl Need 2.0.9, as a bug was fixed for us there.
-    dnl However, freetype-config doesn't give a meaningful version, so we must
+    dnl However, pkg-config freetype2 doesn't give a meaningful version, so we must
     dnl do it like this.
     AC_MSG_CHECKING([if FreeType version is 2.0.9 or higher])
     old_CPPFLAGS="$CPPFLAGS"
-    CPPFLAGS="$CPPFLAGS `freetype-config --cflags`"
+    CPPFLAGS="$CPPFLAGS `pkg-config freetype2 --cflags`"
     AC_TRY_CPP([#include <ft2build.h>
 #include FT_FREETYPE_H
 #if (FREETYPE_MAJOR*1000+FREETYPE_MINOR)*1000+FREETYPE_PATCH < 2000009
@@ -83,9 +83,9 @@ if test "$have_pangoft2" = "true"; then
 #endif
 ],
         [AC_MSG_RESULT(yes)
-	 FREETYPE_LIBS=`freetype-config --libs`
+	 FREETYPE_LIBS=`pkg-config freetype2 --libs`
 	 AC_SUBST(FREETYPE_LIBS)
-	 FREETYPE_CFLAGS=`freetype-config --cflags`
+	 FREETYPE_CFLAGS=`pkg-config freetype2 --cflags`
 	 AC_SUBST(FREETYPE_CFLAGS)
 	 GTK_MODULES="$GTK_MODULES pangoft2"
 	 AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library])]
@@ -307,9 +307,6 @@ dnl INTLOBJS doesn't seem to always get 
 dnl idempotent
 AC_SUBST(INTLOBJS)
 
-localedir='${prefix}/${DATADIRNAME}/locale'
-AC_SUBST(localedir)
-
 dnl
 dnl Locate the gnome-xml library
 dnl
@@ -326,7 +323,7 @@ if test $found_libxml = false; then
     if test "$vers" -ge 2003009; then
       AC_MSG_RESULT(found)
       found_libxml=true
-      XML_LIBS="`$XML2_CONFIG --libs`"
+      XML_LIBS="`$XML2_CONFIG --libs --dynamic`"
       XML_CFLAGS="`$XML2_CONFIG --cflags`"
 
       if test "$enable_gnome_print" = "yes"; then
@@ -540,8 +537,8 @@ if test "x$with_hardbooks" = "xno"; then
   AM_CONDITIONAL(WITH_PSDOC, test "xno" != "xno")
 else
   AM_CONDITIONAL(WITH_HTMLDOC, test "x$xsltproc" != "xno")
-  AM_CONDITIONAL(WITH_PDFDOC, test "x$dblatex" != "xno")
-  AM_CONDITIONAL(WITH_PSDOC, test "x$dblatex" != "xno")
+  AM_CONDITIONAL(WITH_PDFDOC, test "xno" != "xno")
+  AM_CONDITIONAL(WITH_PSDOC, test "xno" != "xno")
   if test "x$dblatex" != "xno" ; then
     hardbook_ok=yes
   else 
