diff configure.ac @ 17816:e6317049225b

build: Remove FreeType and Fontconfig CPPFLAGS from XTRA_CXXFLAGS. * build-aux/common.mk: New alias FONTCONFIG_CPPFLAGS for FONTCONFIG_CFLAGS. Add FONTCONFIG_CFLAGS to build variables. New alias FT2_CPPFLAGS for FT2_CFLAGS * configure.ac: Don't add FT2_CFLAGS and FONTCONFIG_CFLAGS to XTRA_CXXFLAGS variable. * libinterp/Makefile.am: Add FT2_CPPFLAGS and FONTCONFIG_CPPFLAGS to rule that creates *.df file from *.cc file. * libinterp/corefcn/module.mk: Add FT2_CPPFLAGS and FONTCONFIG_CPPFLAGS to corefcn convenience library CPPFLAGS. * libinterp/corefcn/toplev.cc: Add new FONTCONFIG_CFLAGS to OCTAVE_CONF variable. * libinterp/dldfcn/module-files: Add FT2_CPPFLAGS and FONTCONFIG_CPPFLAGS to __init_gnuplot__.cc build. This is required because of #include "graphics.h". * libinterp/oct-conf.in.h: Add new FONTCONFIG_CFLAGS to OCTAVE_CONF variable.
author Rik <rik@octave.org>
date Thu, 31 Oct 2013 13:13:25 -0700
parents 06a850f83dd4
children af924e6572cb
line wrap: on
line diff
--- a/configure.ac	Thu Oct 31 20:56:37 2013 +0100
+++ b/configure.ac	Thu Oct 31 13:13:25 2013 -0700
@@ -953,9 +953,9 @@
   ## packages add extra flags that are useful when building
   ## Graphics/ImageMagick++ extentions.  These extra flags break the
   ## Octave build. 
+  MAGICK_CPPFLAGS=`$PKG_CONFIG --cflags-only-I $magick++`
   MAGICK_LDFLAGS=`$PKG_CONFIG --libs-only-L $magick++`
   MAGICK_LIBS=`$PKG_CONFIG --libs-only-l $magick++`
-  MAGICK_CPPFLAGS=`$PKG_CONFIG --cflags-only-I $magick++`
 
   warn_magick="$magick++ library fails tests.  The imread function for reading image files will not be fully functional."
 
@@ -1072,25 +1072,24 @@
 
   PKG_CHECK_MODULES([FT2], [freetype2], [
     min_ft2_version=9.03
-    AC_MSG_CHECKING([for FreeType -- version >= $min_ft2_version])
+    AC_MSG_CHECKING([for FreeType2 version >= $min_ft2_version])
     $PKG_CONFIG freetype2 --atleast-version=$min_ft2_version
     ac_status=$?
     if test $ac_status = 0; then
       AC_MSG_RESULT(yes)
       AC_DEFINE(HAVE_FREETYPE, 1, [Define to 1 if you have Freetype library.])
-      XTRA_CXXFLAGS="$XTRA_CXXFLAGS $FT2_CFLAGS"
       save_LIBS="$LIBS"
       LIBS="$FT2_LIBS $LIBS"
       AC_CHECK_FUNCS([FT_Reference_Face])
       LIBS="$save_LIBS"
     else
       AC_MSG_RESULT(no)
-      warn_freetype="FreeType library not found.  Native graphics will be disabled."
+      warn_freetype="FreeType library >= 9.03 not found.  Native graphics will be disabled."
     fi])
 
   if test -n "$warn_freetype"; then
+    native_graphics=no
     OCTAVE_CONFIGURE_WARNING([warn_freetype])
-    native_graphics=no
   fi
 
   ## Check for fontconfig library
@@ -1100,7 +1099,6 @@
     PKG_CHECK_MODULES(FONTCONFIG, [fontconfig],
       [have_fontconfig=yes
        OPENGL_LIBS="$FONTCONFIG_LIBS $OPENGL_LIBS"
-       XTRA_CXXFLAGS="$XTRA_CXXFLAGS $FONTCONFIG_CFLAGS"
        AC_DEFINE(HAVE_FONTCONFIG, 1, [Define to 1 if fontconfig is present.])],
       [have_fontconfig=no
        warn_fontconfig="Fontconfig library not found.  Native graphics will be disabled."])