< prev index next >

make/autoconf/lib-freetype.m4

Print this page




  75 
  76 ################################################################################
  77 # Setup freetype (The FreeType2 font rendering library)
  78 ################################################################################
  79 AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
  80 [
  81   AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype],
  82       [specify whether to use 'system' or 'bundled' freetype. Other values are errors.
  83        The selected option applies to both build time and run time.
  84        The default behaviour can be platform dependent.
  85        If using 'system' and either the include files or libraries cannot be
  86        located automatically, then additionally specify both using
  87        --with-freetype-include and --with-freetype-lib.])])
  88   AC_ARG_WITH(freetype-include, [AS_HELP_STRING([--with-freetype-include],
  89       [specify directory for the freetype include files])])
  90   AC_ARG_WITH(freetype-lib, [AS_HELP_STRING([--with-freetype-lib],
  91       [specify directory for the freetype library])])
  92 
  93   # This setup is to verify access to system installed freetype header and libraries.
  94   # On Windows and MacOS this does not apply and using these options will report an error.
  95   # On other platforms (Linux, Solaris), they will default to using
  96   # the system libraries. If they are found automatically, nothing need be done.
  97   # If they are not found, the configure "--with-freetype-*" options may be used to fix that.
  98   # If the preference is to bundle on these platforms then use --with-freetype=bundled
  99   FREETYPE_BASE_NAME=freetype
 100   FREETYPE_CFLAGS=
 101   FREETYPE_LIBS=
 102 
 103   if (test "x$with_freetype_include" = "x"  && test "x$with_freetype_lib" != "x") || \
 104      (test "x$with_freetype_include" != "x"  && test "x$with_freetype_lib" = "x"); then
 105        AC_MSG_ERROR(['must specify both or neither of --with-freetype-include and --with-freetype-lib])
 106   fi
 107 
 108   FREETYPE_TO_USE=bundled
 109   if (test "x$OPENJDK_TARGET_OS" != "xwindows" && test "x$OPENJDK_TARGET_OS" != "xmacosx" \
 110       && test "x$OPENJDK_TARGET_OS" != "xaix"); then
 111     FREETYPE_TO_USE=system
 112   fi
 113   if (test "x$with_freetype" != "x"); then
 114     if (test "x$with_freetype" = "xsystem"); then
 115       FREETYPE_TO_USE=system
 116     elif (test "x$with_freetype" = "xbundled"); then
 117       FREETYPE_TO_USE=bundled
 118       if (test "x$with_freetype_include" != "x"  || test "x$with_freetype_lib" != "x"); then
 119         AC_MSG_ERROR(['bundled' cannot be specified with --with-freetype-include and --with-freetype-lib])
 120       fi
 121     else
 122        AC_MSG_ERROR(['valid values for --with-freetype are 'system' and 'bundled'])
 123     fi
 124   fi
 125 
 126   if (test "x$with_freetype_include" != "x"  && test "x$with_freetype_lib" != "x"); then 
 127       FREETYPE_TO_USE=system
 128   fi
 129 
 130   if (test "x$FREETYPE_TO_USE" = "xsystem") && \
 131      (test "x$OPENJDK_TARGET_OS" = "xwindows" || test "x$OPENJDK_TARGET_OS" = "xmacosx"); then
 132        AC_MSG_ERROR([Only bundled freetype can be specified on Mac and Windows])
 133   fi
 134 
 135   if (test "x$with_freetype_include" != "x"); then
 136     POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
 137   fi
 138   if (test "x$with_freetype_lib" != "x"); then
 139     POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"




  75 
  76 ################################################################################
  77 # Setup freetype (The FreeType2 font rendering library)
  78 ################################################################################
  79 AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
  80 [
  81   AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype],
  82       [specify whether to use 'system' or 'bundled' freetype. Other values are errors.
  83        The selected option applies to both build time and run time.
  84        The default behaviour can be platform dependent.
  85        If using 'system' and either the include files or libraries cannot be
  86        located automatically, then additionally specify both using
  87        --with-freetype-include and --with-freetype-lib.])])
  88   AC_ARG_WITH(freetype-include, [AS_HELP_STRING([--with-freetype-include],
  89       [specify directory for the freetype include files])])
  90   AC_ARG_WITH(freetype-lib, [AS_HELP_STRING([--with-freetype-lib],
  91       [specify directory for the freetype library])])
  92 
  93   # This setup is to verify access to system installed freetype header and libraries.
  94   # On Windows and MacOS this does not apply and using these options will report an error.
  95   # On other platforms (Linux, Solaris, and perhaps AIX), they will default to using
  96   # the system libraries. If they are found automatically, nothing need be done.
  97   # If they are not found, the configure "--with-freetype-*" options may be used to fix that.
  98   # If the preference is to bundle on these platforms then use --with-freetype=bundled
  99   FREETYPE_BASE_NAME=freetype
 100   FREETYPE_CFLAGS=
 101   FREETYPE_LIBS=
 102 
 103   if (test "x$with_freetype_include" = "x"  && test "x$with_freetype_lib" != "x") || \
 104      (test "x$with_freetype_include" != "x"  && test "x$with_freetype_lib" = "x"); then
 105        AC_MSG_ERROR(['must specify both or neither of --with_freetype_include and --with_freetype_lib])
 106   fi
 107 
 108   FREETYPE_TO_USE=bundled
 109   if (test "x$OPENJDK_TARGET_OS" != "xwindows" && test "x$OPENJDK_TARGET_OS" != "xmacosx"); then

 110     FREETYPE_TO_USE=system
 111   fi
 112   if (test "x$with_freetype" != "x"); then
 113     if (test "x$with_freetype" = "xsystem"); then
 114       FREETYPE_TO_USE=system
 115     elif (test "x$with_freetype" = "xbundled"); then
 116       FREETYPE_TO_USE=bundled
 117       if (test "x$with_freetype_include" != "x"  || test "x$with_freetype_lib" != "x"); then
 118         AC_MSG_ERROR(['bundled' cannot be specified with --with_freetype_include and --with_freetype_lib])
 119       fi
 120     else
 121        AC_MSG_ERROR(['valid values for --with-freetype are 'system' and 'bundled'])
 122     fi
 123   fi
 124 
 125   if (test "x$with_freetype_include" != "x"  && test "x$with_freetype_lib" != "x"); then 
 126       FREETYPE_TO_USE=system
 127   fi
 128 
 129   if (test "x$FREETYPE_TO_USE" = "xsystem") && \
 130      (test "x$OPENJDK_TARGET_OS" = "xwindows" || test "x$OPENJDK_TARGET_OS" = "xmacosx"); then
 131        AC_MSG_ERROR([Only bundled freetype can be specified on Mac and Windows])
 132   fi
 133 
 134   if (test "x$with_freetype_include" != "x"); then
 135     POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
 136   fi
 137   if (test "x$with_freetype_lib" != "x"); then
 138     POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"


< prev index next >