[Bug 4995] Check for fontforge >= 20060406 as earlier versions fail to build our fonts with catastrophic results.

Sam Dennis samuel.howard.dennis at gmail.com
Fri Sep 29 16:36:05 CDT 2006


 aclocal.m4   |   16 ++++++++++++++++
 configure.ac |    6 +++++-
 2 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index 82fb19d..1059b6e 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -137,3 +137,19 @@ dnl Usage: WINE_CONFIG_EXTRA_DIR(dirname
 dnl
 AC_DEFUN([WINE_CONFIG_EXTRA_DIR],
 [AC_CONFIG_COMMANDS([$1],[test -d "$1" || (AC_MSG_NOTICE([creating
$1]) && mkdir "$1")])])
+
+dnl **** Check for package with minimum version ****
+dnl
+dnl Usage: PKG_CHECK_MINVER(package, version)
+dnl
+dnl A more functional version of this should probably be added to pkg.m4
+dnl
+AC_DEFUN([PKG_CHECK_MINVER],
+[AC_MSG_CHECKING([for $1 >= $2])
+if AC_TRY_COMMAND([${PKG_CONFIG} --atleast-version $2 $1]); then
+	AC_MSG_RESULT([yes])
+	true
+else
+	AC_MSG_RESULT([no])
+	false
+fi])
diff --git a/configure.ac b/configure.ac
index d85752b..09e1620 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,8 +121,12 @@ AC_SUBST(LINT)
 AC_SUBST(LINTFLAGS)

 dnl Check for various programs
-AC_CHECK_PROGS(FONTFORGE, fontforge, false)
 AC_CHECK_PROGS(PKG_CONFIG, pkg-config, false)
+if PKG_CHECK_MINVER(fontforge, 20060406); then
+	AC_CHECK_PROGS(FONTFORGE, fontforge, false)
+else
+	FONTFORGE=false
+fi

 case $host_cpu in
   *i[[3456789]]86*)
-- 
1.4.1.1



More information about the wine-patches mailing list