Alexandre Julliard : configure: Make the lack of FreeType an error, and add a --without option for it.

Alexandre Julliard julliard at winehq.org
Wed May 21 16:31:55 CDT 2008


Module: wine
Branch: master
Commit: a20c0e124bb3292ef2a35081af7cfea8fa21954b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a20c0e124bb3292ef2a35081af7cfea8fa21954b

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed May 21 14:55:53 2008 +0200

configure: Make the lack of FreeType an error, and add a --without option for it.

---

 configure    |   31 ++++++++++++++++++++++---------
 configure.ac |   13 ++++---------
 2 files changed, 26 insertions(+), 18 deletions(-)

diff --git a/configure b/configure
index 26899f1..071e566 100755
--- a/configure
+++ b/configure
@@ -1387,6 +1387,7 @@ Optional Packages:
   --without-curses        do not use (n)curses
   --without-esd           do not use the EsounD sound support
   --without-fontconfig    do not use fontconfig
+  --without-freetype      do not use the FreeType library
   --without-gphoto        do not use gphoto (Digital Camera support)
   --without-glu           do not use the GLU library
   --without-hal           do not use HAL (dynamic device support)
@@ -1967,6 +1968,12 @@ if test "${with_fontconfig+set}" = set; then
 fi
 
 
+# Check whether --with-freetype was given.
+if test "${with_freetype+set}" = set; then
+  withval=$with_freetype;
+fi
+
+
 # Check whether --with-gphoto was given.
 if test "${with_gphoto+set}" = set; then
   withval=$with_gphoto;
@@ -13866,7 +13873,7 @@ fi
 done
 test -n "$ft_devel" || ft_devel="false"
 
-if test "$ft_devel" != "false"
+if test "$ft_devel" != "false" -a "x$with_freetype" != "xno"
 then
     ac_freetype_libs=`$ft_devel --libs`
     ac_freetype_incl=`$ft_devel --cflags`
@@ -14245,19 +14252,25 @@ _ACEOF
 
             FREETYPEINCL="$ac_freetype_incl"
 
+            FONTSSUBDIRS="fonts"
+
 	fi
     fi
 fi
-
-if test "x$FREETYPELIBS" = "x"
-then
-    wine_warnings="$wine_warnings|FreeType development files not found.
-Fonts will not be built. Dialog text may be invisible or unaligned."
-else
-  FONTSSUBDIRS="fonts"
-
+if test "x$FREETYPELIBS" = "x"; then
+  case "x$with_freetype" in
+  xno) ;;
+  *)   { { echo "$as_me:$LINENO: error: FreeType development files not found.
+Fonts will not be built. Dialog text may be invisible or unaligned.
+Use the --without-freetype option if you really want this." >&5
+echo "$as_me: error: FreeType development files not found.
+Fonts will not be built. Dialog text may be invisible or unaligned.
+Use the --without-freetype option if you really want this." >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
 fi
 
+
 { echo "$as_me:$LINENO: checking for parport header/ppdev.h" >&5
 echo $ECHO_N "checking for parport header/ppdev.h... $ECHO_C" >&6; }
 if test "${ac_cv_c_ppdev+set}" = set; then
diff --git a/configure.ac b/configure.ac
index 942d989..e3028bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,7 @@ AC_ARG_WITH(curses,    AS_HELP_STRING([--without-curses],[do not use (n)curses])
 AC_ARG_WITH(esd,       AS_HELP_STRING([--without-esd],[do not use the EsounD sound support]))
 AC_ARG_WITH(fontconfig,AS_HELP_STRING([--without-fontconfig],[do not use fontconfig]),
             [if test "x$withval" = "xno"; then ac_cv_header_fontconfig_fontconfig_h=no; fi])
+AC_ARG_WITH(freetype,  AS_HELP_STRING([--without-freetype],[do not use the FreeType library]))
 AC_ARG_WITH(gphoto,    AS_HELP_STRING([--without-gphoto],[do not use gphoto (Digital Camera support)]))
 AC_ARG_WITH(glu,       AS_HELP_STRING([--without-glu],[do not use the GLU library]),
             [if test "x$withval" = "xno"; then ac_cv_header_GL_glu_h=no; fi])
@@ -974,7 +975,7 @@ WINE_NOTICE_WITH(ldap,[test "x$LDAPLIBS" = "x"],
 
 dnl **** Check for FreeType 2 ****
 AC_CHECK_PROGS(ft_devel,[freetype-config freetype2-config],false)
-if test "$ft_devel" != "false"
+if test "$ft_devel" != "false" -a "x$with_freetype" != "xno"
 then
     ac_freetype_libs=`$ft_devel --libs`
     ac_freetype_incl=`$ft_devel --cflags`
@@ -1014,18 +1015,12 @@ then
 	    AC_DEFINE(HAVE_FREETYPE, 1, [Define if FreeType 2 is installed])
             AC_SUBST(FREETYPELIBS,"$ac_freetype_libs")
             AC_SUBST(FREETYPEINCL,"$ac_freetype_incl")
+            AC_SUBST(FONTSSUBDIRS,"fonts")
 	fi
     fi
 fi
-
-dnl Only build the fonts dir if we have freetype
-if test "x$FREETYPELIBS" = "x"
-then
-    WINE_WARNING([FreeType development files not found.
+WINE_ERROR_WITH(freetype,[test "x$FREETYPELIBS" = "x"],[FreeType development files not found.
 Fonts will not be built. Dialog text may be invisible or unaligned.])
-else
-  AC_SUBST(FONTSSUBDIRS,"fonts")
-fi
 
 dnl **** Check for parport (currently Linux only) ****
 AC_CACHE_CHECK([for parport header/ppdev.h], ac_cv_c_ppdev,




More information about the wine-cvs mailing list