[gs-cvs] rev 8303 - trunk/gs/src

giles at ghostscript.com giles at ghostscript.com
Fri Oct 19 17:37:20 PDT 2007


Author: giles
Date: 2007-10-19 17:37:19 -0700 (Fri, 19 Oct 2007)
New Revision: 8303

Modified:
   trunk/gs/src/configure.ac
Log:
Look for fontconfig even if pkg-config doesn't find it.

DETAILS:

Like the comment says, pkg-config isn't universally installed,
so we should not depend on it. If pkg-config isn't available
or doesn't find fontconfig, check for the library and headers
it in the standard locations.


Modified: trunk/gs/src/configure.ac
===================================================================
--- trunk/gs/src/configure.ac	2007-10-18 18:58:54 UTC (rev 8302)
+++ trunk/gs/src/configure.ac	2007-10-20 00:37:19 UTC (rev 8303)
@@ -1,4 +1,4 @@
-dnl  Copyright (C) 2001-2006 Artifex Software, Inc.
+dnl  Copyright (C) 2001-2007 Artifex Software, Inc.
 dnl  All Rights Reserved.
 
 dnl  This software is provided AS-IS with no warranty, either express or
@@ -185,7 +185,7 @@
 	AC_PATH_PROG(PKGCONFIG, pkg-config)
 
 	if test "x$PKGCONFIG" != x; then
-		AC_MSG_CHECKING(for fontconfig)
+		AC_MSG_CHECKING(for fontconfig with pkg-config)
 		if $PKGCONFIG --exists fontconfig; then
 			AC_MSG_RESULT(yes)
 			CFLAGS="$CFLAGS `$PKGCONFIG --cflags fontconfig`"
@@ -195,6 +195,14 @@
 			AC_MSG_RESULT(no)
 		fi
 	fi
+	if test -z "$HAVE_FONTCONFIG"; then
+		AC_CHECK_LIB([fontconfig], [FcInitLoadConfigAndFonts], [
+		  AC_CHECK_HEADER([fontconfig/fontconfig.h], [
+		    FONTCONFIG_LIBS="-lfontconfg"
+		    HAVE_FONTCONFIG="-DHAVE_FONTCONFIG"
+		  ])
+		])
+	fi
 fi
 AC_SUBST(HAVE_FONTCONFIG)
 AC_SUBST(FONTCONFIG_LIBS)



More information about the gs-cvs mailing list