├── configure.win ├── .Rbuildignore ├── cleanup ├── .gitignore ├── inst ├── fonts │ ├── webfonts.bz2 │ ├── LiberationMono-Bold.ttf │ ├── LiberationMono-Italic.ttf │ ├── LiberationSans-Bold.ttf │ ├── LiberationSans-Italic.ttf │ ├── LiberationSerif-Bold.ttf │ ├── LiberationMono-Regular.ttf │ ├── LiberationSans-Regular.ttf │ ├── LiberationSerif-Italic.ttf │ ├── LiberationSerif-Regular.ttf │ ├── LiberationMono-BoldItalic.ttf │ ├── LiberationSans-BoldItalic.ttf │ ├── LiberationSerif-BoldItalic.ttf │ ├── AUTHORS │ └── License.txt ├── COPYRIGHTS ├── AUTHORS └── NEWS.Rd ├── src ├── sysfonts-win.def ├── Makevars.in ├── register_routines.c ├── sysfonts.h ├── Makevars.ucrt ├── Makevars.win ├── sysfonts.c └── font_name.c ├── R ├── zzz.R ├── deprecate.R ├── google.R └── font.R ├── NAMESPACE ├── sysfonts.Rproj ├── DESCRIPTION ├── man ├── font_files.Rd ├── font_families.Rd ├── font_info_google.Rd ├── font_families_google.Rd ├── font_paths.Rd ├── font_add_google.Rd └── font_add.Rd ├── configure.ac └── configure /configure.win: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^.*\.Rproj$ 2 | ^\.Rproj\.user$ 3 | -------------------------------------------------------------------------------- /cleanup: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm -f config.* src/Makevars 4 | 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.a 3 | *.so 4 | *.dll 5 | .Rproj.user 6 | .Rhistory 7 | .RData 8 | -------------------------------------------------------------------------------- /inst/fonts/webfonts.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yixuan/sysfonts/HEAD/inst/fonts/webfonts.bz2 -------------------------------------------------------------------------------- /inst/fonts/LiberationMono-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yixuan/sysfonts/HEAD/inst/fonts/LiberationMono-Bold.ttf -------------------------------------------------------------------------------- /inst/fonts/LiberationMono-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yixuan/sysfonts/HEAD/inst/fonts/LiberationMono-Italic.ttf -------------------------------------------------------------------------------- /inst/fonts/LiberationSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yixuan/sysfonts/HEAD/inst/fonts/LiberationSans-Bold.ttf -------------------------------------------------------------------------------- /inst/fonts/LiberationSans-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yixuan/sysfonts/HEAD/inst/fonts/LiberationSans-Italic.ttf -------------------------------------------------------------------------------- /inst/fonts/LiberationSerif-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yixuan/sysfonts/HEAD/inst/fonts/LiberationSerif-Bold.ttf -------------------------------------------------------------------------------- /inst/fonts/LiberationMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yixuan/sysfonts/HEAD/inst/fonts/LiberationMono-Regular.ttf -------------------------------------------------------------------------------- /inst/fonts/LiberationSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yixuan/sysfonts/HEAD/inst/fonts/LiberationSans-Regular.ttf -------------------------------------------------------------------------------- /inst/fonts/LiberationSerif-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yixuan/sysfonts/HEAD/inst/fonts/LiberationSerif-Italic.ttf -------------------------------------------------------------------------------- /inst/fonts/LiberationSerif-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yixuan/sysfonts/HEAD/inst/fonts/LiberationSerif-Regular.ttf -------------------------------------------------------------------------------- /src/sysfonts-win.def: -------------------------------------------------------------------------------- 1 | LIBRARY sysfonts.dll 2 | EXPORTS 3 | load_font 4 | clean_font 5 | font_name 6 | R_init_sysfonts 7 | -------------------------------------------------------------------------------- /inst/COPYRIGHTS: -------------------------------------------------------------------------------- 1 | The Liberation Fonts included in the fonts/ subdirectory are under 2 | Copyright © 2007-2011 Red Hat, Inc. 3 | 4 | -------------------------------------------------------------------------------- /inst/fonts/LiberationMono-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yixuan/sysfonts/HEAD/inst/fonts/LiberationMono-BoldItalic.ttf -------------------------------------------------------------------------------- /inst/fonts/LiberationSans-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yixuan/sysfonts/HEAD/inst/fonts/LiberationSans-BoldItalic.ttf -------------------------------------------------------------------------------- /inst/fonts/LiberationSerif-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yixuan/sysfonts/HEAD/inst/fonts/LiberationSerif-BoldItalic.ttf -------------------------------------------------------------------------------- /src/Makevars.in: -------------------------------------------------------------------------------- 1 | PKG_CPPFLAGS = @SYSFONTS_CPPFLAGS@ 2 | PKG_LIBS = @SYSFONTS_LIBS@ 3 | 4 | 5 | .PHONY: all clean 6 | 7 | all: $(SHLIB) 8 | 9 | clean: 10 | $(RM) *.o 11 | $(RM) *.dll 12 | $(RM) *.so 13 | $(RM) *.dylib 14 | 15 | -------------------------------------------------------------------------------- /inst/AUTHORS: -------------------------------------------------------------------------------- 1 | The Liberation Fonts included in the fonts/ subdirectory were developed by 2 | Caius Chance 3 | Denis Jacquerye 4 | Herbert Duerr 5 | Pravin Satpute 6 | Steve Matteson 7 | Mark Webbink 8 | 9 | Other part of this package was written by Yixuan Qiu. 10 | -------------------------------------------------------------------------------- /R/zzz.R: -------------------------------------------------------------------------------- 1 | .onLoad = function(libname, pkgname) { 2 | # library.dynam("sysfonts", pkgname, libname) 3 | add_default_font_paths() 4 | add_default_fonts() 5 | } 6 | 7 | .onUnload = function(libpath) { 8 | clean_fonts() 9 | library.dynam.unload("sysfonts", libpath) 10 | } 11 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | useDynLib(sysfonts, .registration = TRUE) 2 | export(font_paths, font_families, font_files, font_add) 3 | export(font_add_google, font_families_google, font_info_google) 4 | 5 | # Back-compatibility 6 | export(font.paths, font.families, font.files, font.add) 7 | export(font.add.google, font.families.google) 8 | -------------------------------------------------------------------------------- /sysfonts.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 4 10 | Encoding: UTF-8 11 | 12 | RnwWeave: knitr 13 | LaTeX: XeLaTeX 14 | 15 | BuildType: Package 16 | PackageInstallArgs: --no-multiarch --with-keep.source 17 | PackageRoxygenize: rd,collate 18 | -------------------------------------------------------------------------------- /src/register_routines.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "sysfonts.h" 5 | 6 | static R_CallMethodDef call_methods[] = { 7 | {"load_font", (DL_FUNC) &load_font, 1}, 8 | {"clean_font", (DL_FUNC) &clean_font, 1}, 9 | {"font_name", (DL_FUNC) &font_name, 1}, 10 | {NULL, NULL, 0} 11 | }; 12 | 13 | void R_init_sysfonts(DllInfo* info) 14 | { 15 | R_registerRoutines(info, NULL, call_methods, NULL, NULL); 16 | R_useDynamicSymbols(info, FALSE); 17 | } 18 | -------------------------------------------------------------------------------- /src/sysfonts.h: -------------------------------------------------------------------------------- 1 | #ifndef SYSFONTS_H_INCLUDED 2 | #define SYSFONTS_H_INCLUDED 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | #include FT_FREETYPE_H 10 | #include FT_SFNT_NAMES_H 11 | #include FT_TRUETYPE_IDS_H 12 | 13 | typedef struct fontDesc { 14 | FT_Library library; 15 | FT_Face face; 16 | } FontDesc; 17 | 18 | SEXP load_font (SEXP font_path); 19 | SEXP clean_font (SEXP font_desc_ptr); 20 | SEXP font_name (SEXP font_path); 21 | 22 | #endif /* SYSFONTS_H_INCLUDED */ 23 | -------------------------------------------------------------------------------- /src/Makevars.ucrt: -------------------------------------------------------------------------------- 1 | ifeq (,$(shell pkg-config --version 2>/dev/null)) 2 | PKG_CPPFLAGS = -I$(R_TOOLS_SOFT)/include/freetype2 3 | LIBBROTLI = $(or $(and $(wildcard $(R_TOOLS_SOFT)/lib/libbrotlidec.a),-lbrotlidec -lbrotlicommon),) 4 | PKG_LIBS = -lfreetype $(LIBBROTLI) -lharfbuzz -lfreetype -lpng -lz -lbz2 5 | else 6 | PKG_LIBS = $(shell pkg-config --libs freetype2) 7 | PKG_CPPFLAGS = $(shell pkg-config --cflags freetype2) 8 | 9 | # work-around for freetype2 pkg-config file in Rtools43 10 | PKG_CPPFLAGS += -I$(R_TOOLS_SOFT)/include/freetype2 11 | endif 12 | -------------------------------------------------------------------------------- /src/Makevars.win: -------------------------------------------------------------------------------- 1 | PKG_CPPFLAGS = -I./include -I./include/freetype 2 | PKG_LIBS = -L.${R_ARCH} -lfreetype -lpng -lz 3 | 4 | 5 | .PHONY: all deps clean 6 | 7 | all: deps $(SHLIB) 8 | 9 | deps: sysfonts-dep-win-biarch.tar.gz 10 | tar xzf sysfonts-dep-win-biarch.tar.gz 11 | 12 | sysfonts-dep-win-biarch.tar.gz: 13 | ${R_HOME}/bin$(R_ARCH_BIN)/Rscript -e "u = 'https://raw.githubusercontent.com/yixuan/sysfonts-dep/master/sysfonts-dep-win-biarch.tar.gz'; utils::download.file(u, basename(u), mode = 'wb')" 14 | 15 | clean: 16 | $(RM) *.o 17 | $(RM) *.dll 18 | $(RM) *.so 19 | $(RM) *.dylib 20 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: sysfonts 2 | Type: Package 3 | Title: Loading Fonts into R 4 | Version: 0.8.9 5 | Date: 2024-03-02 6 | Author: Yixuan Qiu and authors/contributors of the 7 | included fonts. See file AUTHORS for details. 8 | Maintainer: Yixuan Qiu 9 | Description: Loading system fonts and Google Fonts 10 | into R, in order to 11 | support other packages such as 'R2SWF' and 'showtext'. 12 | Suggests: curl, jsonlite 13 | Copyright: see file COPYRIGHTS 14 | SystemRequirements: zlib, libpng, FreeType 15 | URL: https://github.com/yixuan/sysfonts 16 | BugReports: https://github.com/yixuan/sysfonts/issues 17 | License: GPL-2 18 | RoxygenNote: 7.3.1 19 | Encoding: UTF-8 20 | -------------------------------------------------------------------------------- /inst/fonts/AUTHORS: -------------------------------------------------------------------------------- 1 | AUTHORS 2 | 3 | Current Contributors (sorted alphabetically): 4 | 5 | - Caius 'kaio' Chance 6 | Project Owner (2010) 7 | Red Hat, Inc. 8 | 9 | - Denis Jacquerye 10 | Project Contributor 11 | 12 | - Herbert Duerr 13 | Narrow Fonts Contributor 14 | Oracle, Inc. 15 | 16 | - Pravin Satpute 17 | Project Owner (Current) 18 | Red Hat, Inc. 19 | 20 | Previous Contributors 21 | 22 | - Steve Matteson 23 | Original Designer (support period expired) 24 | Ascender, Inc. 25 | 26 | - Mark Webbink 27 | Release coordinator, Red Hat Inc. 28 | -------------------------------------------------------------------------------- /R/deprecate.R: -------------------------------------------------------------------------------- 1 | # We want to warn users that the new function naming should be used instead of 2 | # the old one, so we issue a message when users call a deprecated function. 3 | # However, this may be too annoying, so we print the message only once for 4 | # each function. 5 | # The idea is that we use an environment to record whether the user has been 6 | # warned on a function. 7 | 8 | .warned_list = new.env() 9 | 10 | deprecate_message_once = function(old_fun, new_fun) 11 | { 12 | msg = sprintf("'%s' is now renamed to '%s' 13 | The old version still works, but consider using the new function in future code", 14 | old_fun, new_fun) 15 | 16 | warned = exists(old_fun, envir = .warned_list) 17 | if(!warned) 18 | { 19 | message(msg) 20 | assign(old_fun, TRUE, envir = .warned_list) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /man/font_files.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/font.R 3 | \name{font_files} 4 | \alias{font_files} 5 | \alias{font.files} 6 | \title{List Font Files Available in the Search Paths} 7 | \usage{ 8 | font_files() 9 | 10 | font.files() 11 | } 12 | \value{ 13 | A data frame containing the following information of the font files: 14 | \item{path}{The directory that the font file is located in.} 15 | \item{file}{File name of the font.} 16 | \item{family}{Family name.} 17 | \item{face}{Font face.} 18 | \item{version}{Version of the font.} 19 | \item{ps_name}{PostScript font name.} 20 | } 21 | \description{ 22 | The two versions of this function are equivalent, but the 23 | "underscore" naming is preferred. 24 | 25 | This function lists font files in the search path that can be 26 | loaded by \code{\link{font_add}()}. 27 | Currently supported formats include TrueType fonts(*.ttf, *.ttc) and OpenType fonts(*.otf). 28 | } 29 | \examples{ 30 | \dontrun{ 31 | font_files() 32 | } 33 | 34 | } 35 | \seealso{ 36 | \code{\link{font_paths}()}, \code{\link{font_add}()} 37 | } 38 | \author{ 39 | Yixuan Qiu <\url{https://statr.me/}> 40 | } 41 | -------------------------------------------------------------------------------- /man/font_families.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/font.R 3 | \name{font_families} 4 | \alias{font_families} 5 | \alias{font.families} 6 | \title{List Font Families Loaded by 'sysfonts'} 7 | \usage{ 8 | font_families() 9 | 10 | font.families() 11 | } 12 | \value{ 13 | A character vector of available font family names. 14 | } 15 | \description{ 16 | The two versions of this function are equivalent, but the 17 | "underscore" naming is preferred. 18 | 19 | This function lists font families currently available that can be 20 | used by \pkg{R2SWF} and \pkg{showtext} packages. 21 | } 22 | \details{ 23 | By default there are three font families loaded automatically, 24 | i.e., "sans", "serif" and "mono". If one wants to use other fonts, 25 | \code{\link{font_add}()} needs to be called 26 | to register new fonts by specifying a family name and corresponding 27 | font files. See \code{\link{font_add}()} for details about 28 | the meaning of "family name" in this context, as well as 29 | a complete example of registering and using a new font. 30 | } 31 | \examples{ 32 | font_families() 33 | 34 | } 35 | \seealso{ 36 | \code{\link{font_add}()} 37 | } 38 | \author{ 39 | Yixuan Qiu <\url{https://statr.me/}> 40 | } 41 | -------------------------------------------------------------------------------- /man/font_info_google.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/google.R 3 | \name{font_info_google} 4 | \alias{font_info_google} 5 | \title{Display Information of Available Google Fonts} 6 | \usage{ 7 | font_info_google(db_cache = TRUE, handle = curl::new_handle()) 8 | } 9 | \arguments{ 10 | \item{db_cache}{whether to obtain font metadata from a cache site. Using cache 11 | is typically faster, but not as update-to-date as using the official 12 | API. If \code{db_cache} is set to \code{FALSE}, then metadata 13 | are retrieved from the Google Fonts API.} 14 | 15 | \item{handle}{a curl handle object passed to \code{curl::curl_download()} and 16 | \code{curl::curl_fetch_memory()}.} 17 | } 18 | \value{ 19 | A data frame containing metadata of Google Fonts. 20 | } 21 | \description{ 22 | This function returns a data frame that contains the metadata of 23 | font families available in Google Fonts, for example the family name, 24 | available font face variants, the version number, etc. When running this 25 | function for the first time, it may take a few seconds to fetch the 26 | database. This function requires the \pkg{jsonlite} and \pkg{curl} packages. 27 | } 28 | \examples{ 29 | \dontrun{ 30 | font_info_google() 31 | } 32 | 33 | } 34 | \seealso{ 35 | \code{\link{font_families_google}()} 36 | } 37 | \author{ 38 | Yixuan Qiu <\url{https://statr.me/}> 39 | } 40 | -------------------------------------------------------------------------------- /man/font_families_google.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/google.R 3 | \name{font_families_google} 4 | \alias{font_families_google} 5 | \alias{font.families.google} 6 | \title{List Font Families Available in Google Fonts} 7 | \usage{ 8 | font_families_google(db_cache = TRUE, handle = curl::new_handle()) 9 | 10 | font.families.google() 11 | } 12 | \arguments{ 13 | \item{db_cache}{whether to obtain font metadata from a cache site. Using cache 14 | is typically faster, but not as update-to-date as using the official 15 | API. If \code{db_cache} is set to \code{FALSE}, then metadata 16 | are retrieved from the Google Fonts API.} 17 | 18 | \item{handle}{a curl handle object passed to \code{curl::curl_download()} and 19 | \code{curl::curl_fetch_memory()}.} 20 | } 21 | \value{ 22 | A character vector of available font family names in Google Fonts. 23 | } 24 | \description{ 25 | The two versions of this function are equivalent, but the 26 | "underscore" naming is preferred. 27 | 28 | This function lists family names of the fonts that are currently 29 | available in Google Fonts. When running this function for the first time, 30 | it may take a few seconds to fetch the font information database. 31 | This function requires the \pkg{jsonlite} and \pkg{curl} packages. 32 | } 33 | \examples{ 34 | \dontrun{ 35 | font_families_google() 36 | } 37 | 38 | } 39 | \seealso{ 40 | \code{\link{font_add_google}()} 41 | } 42 | \author{ 43 | Yixuan Qiu <\url{https://statr.me/}> 44 | } 45 | -------------------------------------------------------------------------------- /man/font_paths.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/font.R 3 | \name{font_paths} 4 | \alias{font_paths} 5 | \alias{font.paths} 6 | \title{Get/Set Font Search Paths} 7 | \usage{ 8 | font_paths(new) 9 | 10 | font.paths(new) 11 | } 12 | \arguments{ 13 | \item{new}{a character vector indicating the search paths to be 14 | prepended. If the argument is missing, the function will 15 | return the current search paths.} 16 | } 17 | \value{ 18 | The updated search paths. 19 | } 20 | \description{ 21 | The two versions of this function are equivalent, but the 22 | "underscore" naming is preferred. 23 | 24 | This function gets/sets the search paths for font files. 25 | See \code{\link{font_add}()} for details about how \pkg{sysfonts} looks for 26 | font files. There is also a complete example showing the usage of these 27 | functions in the help page of \code{\link{font_add}()}. 28 | } 29 | \details{ 30 | Default search paths will be assigned when package is loaded: 31 | \itemize{ 32 | \item For Windows, it is \code{\%windir\%\\Fonts}, usually expanded 33 | into \code{C:\\Windows\\Fonts} 34 | 35 | \item For Mac OS, default paths are \code{/Library/Fonts} 36 | and \code{~/Library/Fonts} and their subdirectories 37 | 38 | \item For Linux and other Unix-like OS, \code{/usr/share/fonts}, 39 | \code{/usr/local/share/fonts}, \code{~/.fonts}, 40 | \code{~/.local/share/fonts}, and their subdirectories 41 | } 42 | } 43 | \author{ 44 | Yixuan Qiu <\url{https://statr.me/}> 45 | } 46 | -------------------------------------------------------------------------------- /src/sysfonts.c: -------------------------------------------------------------------------------- 1 | #include "sysfonts.h" 2 | 3 | SEXP load_font(SEXP font_path) 4 | { 5 | const char* file_path = CHAR(STRING_ELT(font_path, 0)); 6 | FontDesc* font = (FontDesc*) calloc(1, sizeof(FontDesc)); 7 | SEXP font_desc_ptr; 8 | FT_Error err; 9 | 10 | err = FT_Init_FreeType(&(font->library)); 11 | if(err) 12 | { 13 | if(font) free(font); 14 | Rf_error("freetype: unable to initialize freetype, error code %d", err); 15 | } 16 | err = FT_New_Face(font->library, file_path, 0, &(font->face)); 17 | if(err) 18 | { 19 | if(font->library) FT_Done_FreeType(font->library); 20 | if(font) free(font); 21 | switch(err) 22 | { 23 | case 0x01: 24 | Rf_error("freetype: cannot open resource, error code %d", err); 25 | break; 26 | case 0x02: 27 | Rf_error("freetype: unknown file format, error code %d", err); 28 | break; 29 | case 0x03: 30 | Rf_error("freetype: broken file, error code %d", err); 31 | break; 32 | default: 33 | Rf_error("freetype: unable to load font file, error code %d", err); 34 | break; 35 | } 36 | } 37 | 38 | font_desc_ptr = R_MakeExternalPtr(font, R_NilValue, R_NilValue); 39 | 40 | return font_desc_ptr; 41 | } 42 | 43 | SEXP clean_font(SEXP font_desc_ptr) 44 | { 45 | FontDesc* font = (FontDesc*) R_ExternalPtrAddr(font_desc_ptr); 46 | 47 | if(!font) return R_NilValue; 48 | 49 | if(font->face) FT_Done_Face(font->face); 50 | if(font->library) FT_Done_FreeType(font->library); 51 | if(font) free(font); 52 | 53 | return R_NilValue; 54 | } 55 | -------------------------------------------------------------------------------- /man/font_add_google.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/google.R 3 | \name{font_add_google} 4 | \alias{font_add_google} 5 | \alias{font.add.google} 6 | \title{Load Google Fonts into 'sysfonts'} 7 | \usage{ 8 | font_add_google( 9 | name, 10 | family = name, 11 | regular.wt = 400, 12 | bold.wt = 700, 13 | repo = "http://fonts.gstatic.com/", 14 | db_cache = TRUE, 15 | handle = curl::new_handle() 16 | ) 17 | 18 | font.add.google( 19 | name, 20 | family = name, 21 | regular.wt = 400, 22 | bold.wt = 700, 23 | repo = "http://fonts.gstatic.com/", 24 | handle = curl::new_handle() 25 | ) 26 | } 27 | \arguments{ 28 | \item{name}{name of the font that will be searched in Google Fonts} 29 | 30 | \item{family}{specifies the family name of this font in R. This can be any string, 31 | not necessarily the same as \code{name}. The value of this parameter 32 | will be used in R plotting functions. See the example code below.} 33 | 34 | \item{regular.wt}{font weight for the regular font face, usually 400} 35 | 36 | \item{bold.wt}{font weight for the bold font face, usually 700} 37 | 38 | \item{repo}{the site that hosts the font files. Default is the official 39 | repository \code{http://fonts.gstatic.com/} provided by 40 | Google Fonts.} 41 | 42 | \item{db_cache}{whether to obtain font metadata from a cache site. Using cache 43 | is typically faster, but not as update-to-date as using the official 44 | API. If \code{db_cache} is set to \code{FALSE}, then metadata 45 | are retrieved from the Google Fonts API.} 46 | 47 | \item{handle}{a curl handle object passed to \code{curl::curl_download()}.} 48 | } 49 | \description{ 50 | The two versions of this function are equivalent, but the 51 | "underscore" naming is preferred. 52 | 53 | This function will search the Google Fonts repository 54 | (\url{https://fonts.google.com/}) for a specified 55 | family name, download the proper font files, and then add them to \pkg{sysfonts}. 56 | This function requires the \pkg{jsonlite} and \pkg{curl} packages. 57 | } 58 | \details{ 59 | There are thousands of open source fonts in the Google Fonts 60 | repository (\url{https://fonts.google.com/}). 61 | This function will try to search the font family specified 62 | by the \code{name} argument, and then automatically 63 | download the font files for all possible font faces 64 | ("regular", "bold", "italic" and "bold italic", 65 | but no"symbol"). 66 | If fonts are found and downloaded successfully, they will be 67 | also added to \pkg{sysfonts} with the given family name. 68 | } 69 | \examples{ 70 | \dontrun{ 71 | font_add_google("Alegreya Sans", "aleg") 72 | 73 | if(require(showtext)) 74 | { 75 | wd = setwd(tempdir()) 76 | pdf("google-fonts-ex.pdf") 77 | showtext_begin() 78 | 79 | par(family = "aleg") 80 | plot(0:5,0:5, type="n") 81 | text(1:4, 1:4, "Alegreya Sans", font=1:4, cex = 2) 82 | 83 | showtext_end() 84 | dev.off() 85 | setwd(wd) 86 | } 87 | 88 | } 89 | } 90 | \seealso{ 91 | \code{\link{font_families_google}()} 92 | } 93 | \author{ 94 | Yixuan Qiu <\url{https://statr.me/}> 95 | } 96 | -------------------------------------------------------------------------------- /inst/fonts/License.txt: -------------------------------------------------------------------------------- 1 | LICENSE AGREEMENT AND LIMITED PRODUCT WARRANTY 2 | LIBERATION FONT SOFTWARE 3 | 4 | This agreement governs the use of the Software and any updates to the Software, regardless of the delivery mechanism. Subject to the following terms, Red Hat, Inc. ("Red Hat") grants to the user ("Client") a license to this work pursuant to the GNU General Public License v.2 with the exceptions set forth below and such other terms as are set forth in this End User License Agreement. 5 | 6 | 1. The Software and License Exception. LIBERATION font software (the "Software") consists of TrueType-OpenType formatted font software for rendering LIBERATION typefaces in sans-serif, serif, and monospaced character styles. You are licensed to use, modify, copy, and distribute the Software pursuant to the GNU General Public License v.2 with the following exceptions: 7 | 8 | (a) As a special exception, if you create a document which uses this font, and embed this font or unaltered portions of this font into the document, this font does not by itself cause the resulting document to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the document might be covered by the GNU General Public License. If you modify this font, you may extend this exception to your version of the font, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. 9 | 10 | (b) As a further exception, any distribution of the object code of the Software in a physical product must provide you the right to access and modify the source code for the Software and to reinstall that modified version of the Software in object code form on the same physical product on which you received it. 11 | 12 | 2. Intellectual Property Rights. The Software and each of its components, including the source code, documentation, appearance, structure and organization are owned by Red Hat and others and are protected under copyright and other laws. Title to the Software and any component, or to any copy, modification, or merged portion shall remain with the aforementioned, subject to the applicable license. The "LIBERATION" trademark is a trademark of Red Hat, Inc. in the U.S. and other countries. This agreement does not permit Client to distribute modified versions of the Software using Red Hat's trademarks. If Client makes a redistribution of a modified version of the Software, then Client must modify the files names to remove any reference to the Red Hat trademarks and must not use the Red Hat trademarks in any way to reference or promote the modified Software. 13 | 14 | 3. Limited Warranty. To the maximum extent permitted under applicable law, the Software is provided and licensed "as is" without warranty of any kind, expressed or implied, including the implied warranties of merchantability, non-infringement or fitness for a particular purpose. Red Hat does not warrant that the functions contained in the Software will meet Client's requirements or that the operation of the Software will be entirely error free or appear precisely as described in the accompanying documentation. 15 | 16 | 4. Limitation of Remedies and Liability. To the maximum extent permitted by applicable law, Red Hat or any Red Hat authorized dealer will not be liable to Client for any incidental or consequential damages, including lost profits or lost savings arising out of the use or inability to use the Software, even if Red Hat or such dealer has been advised of the possibility of such damages. 17 | 18 | 5. General. If any provision of this agreement is held to be unenforceable, that shall not affect the enforceability of the remaining provisions. This agreement shall be governed by the laws of the State of North Carolina and of the United States, without regard to any conflict of laws provisions, except that the United Nations Convention on the International Sale of Goods shall not apply. 19 | Copyright © 2007-2011 Red Hat, Inc. All rights reserved. LIBERATION is a trademark of Red Hat, Inc. 20 | -------------------------------------------------------------------------------- /man/font_add.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/font.R 3 | \name{font_add} 4 | \alias{font_add} 5 | \alias{font.add} 6 | \title{Add New Font Families to 'sysfonts'} 7 | \usage{ 8 | font_add( 9 | family, 10 | regular, 11 | bold = NULL, 12 | italic = NULL, 13 | bolditalic = NULL, 14 | symbol = NULL 15 | ) 16 | 17 | font.add( 18 | family, 19 | regular, 20 | bold = NULL, 21 | italic = NULL, 22 | bolditalic = NULL, 23 | symbol = NULL 24 | ) 25 | } 26 | \arguments{ 27 | \item{family}{a character string of maximum 200-byte size, 28 | indicating the family name of the font. 29 | See "Details" for further explanation.} 30 | 31 | \item{regular}{path of the font file for "regular" font face. 32 | This argument must be specified as a character string 33 | and cannot be missing.} 34 | 35 | \item{bold}{path of the font file for "bold" font face. 36 | If it is \code{NULL}, the function will use the value of 37 | argument \code{regular}.} 38 | 39 | \item{italic, bolditalic, symbol}{ditto} 40 | } 41 | \value{ 42 | A character vector (invisible) of currently available 43 | font family names. 44 | } 45 | \description{ 46 | The two versions of this function are equivalent, but the 47 | "underscore" naming is preferred. 48 | 49 | This function registers new font families that can be used by package 50 | \pkg{showtext} and the SWF device in package \pkg{R2SWF}. 51 | Currently supported formats include but not limited to 52 | TrueType fonts(*.ttf, *.ttc) and OpenType fonts(*.otf). 53 | } 54 | \details{ 55 | In R graphics device, there are two parameters combined together 56 | to select a font to show text. \code{par("family")} is a character 57 | string giving a name to a \strong{series} of font faces. Here 58 | \strong{series} implies that there may be different fonts with the 59 | same family name, and actually they are distinguished by the parameter 60 | \code{par("font")}, indicating whether it is regular, bold, or italic, 61 | etc. In R, \code{par("font")} is an integer from 1 to 5 representing 62 | regular, bold, italic, bold italic, and symbol, respectively. 63 | 64 | In \pkg{sysfonts} package, there are three default font families, sans, serif, and mono, 65 | each with five font faces as mentioned above. If one wants 66 | to use other font families, the function \code{font_add()} needs to be called 67 | to register new fonts. Note that the \code{family} argument in this function can be 68 | an arbitrary string that does not need to be the real font name. The specified 69 | family name will be used in functions like \code{par(family = "myfont")} 70 | and \code{text("Some text", family = "myfont")}. The \strong{Examples} section 71 | shows a complete demonstration of the usage. 72 | 73 | To find the font file of argument \code{regular} (and the same for 74 | other font faces), this function will first check the existence 75 | of the specified path. If not found, file will be searched in the 76 | directories returned by \code{\link{font_paths}()} in turn. If the 77 | file cannot be found in any of the locations, 78 | an error will be issued. 79 | } 80 | \examples{ 81 | \dontrun{ 82 | ## Example: download the font file of WenQuanYi Micro Hei, 83 | ## add it to SWF device, and use it to draw text in swf(). 84 | ## WenQuanYi Micro Hei is an open source and high quality 85 | ## Chinese (and CJKV) font. 86 | 87 | wd = setwd(tempdir()) 88 | ft.url = "http://sourceforge.net/projects/wqy/files/wqy-microhei" 89 | ft.url = paste(ft.url, "0.2.0-beta/wqy-microhei-0.2.0-beta.tar.gz", 90 | sep = "/") 91 | download.file(ft.url, basename(ft.url)) 92 | 93 | ## Extract and add the directory to search path 94 | untar(basename(ft.url), compressed = "gzip") 95 | font_paths("wqy-microhei") 96 | 97 | ## Register this font file and assign the family name "wqy" 98 | ## Other font faces will be the same with regular by default 99 | font_add("wqy", regular = "wqy-microhei.ttc") 100 | 101 | ## A more concise way to add font is to give the path directly, 102 | ## without calling font_paths() 103 | # font_add("wqy", "wqy-microhei/wqy-microhei.ttc") 104 | 105 | ## List available font families 106 | font_families() 107 | 108 | if(require(R2SWF)) 109 | { 110 | ## Now it shows that we can use the family "wqy" in swf() 111 | swf("testfont.swf") 112 | 113 | ## Select font family globally 114 | op = par(family = "serif", font.lab = 2) 115 | ## Inline selecting font 116 | plot(1, type = "n") 117 | text(1, 1, intToUtf8(c(20013, 25991)), family = "wqy", font = 1, cex = 2) 118 | 119 | dev.off() 120 | swf2html("testfont.swf") 121 | } 122 | 123 | setwd(wd) 124 | 125 | } 126 | } 127 | \seealso{ 128 | See \code{\link[graphics]{par}()} for explanation of 129 | the parameters \code{family} and \code{font}. 130 | } 131 | \author{ 132 | Yixuan Qiu <\url{https://statr.me/}> 133 | } 134 | -------------------------------------------------------------------------------- /src/font_name.c: -------------------------------------------------------------------------------- 1 | #include "sysfonts.h" 2 | #include 3 | 4 | /* Font names may use different languages and encodings. For simplicity 5 | * we only consider names in English with an ASCII/UTF-16BE encoding. 6 | * 7 | * Return value: 0 - English name in ASCII 8 | * 1 - English name in UTF-16BE 9 | * <0 - others 10 | */ 11 | char font_name_enc(FT_UShort platform_id, FT_UShort encoding_id, FT_UShort language_id) 12 | { 13 | if((language_id != TT_MAC_LANGID_ENGLISH) && 14 | (language_id != TT_MS_LANGID_ENGLISH_UNITED_STATES)) 15 | return -1; 16 | 17 | if(platform_id == TT_PLATFORM_APPLE_UNICODE) 18 | return 1; 19 | 20 | if((platform_id == TT_PLATFORM_MACINTOSH) && 21 | (encoding_id == TT_MAC_ID_ROMAN)) 22 | return 0; 23 | 24 | if((platform_id == TT_PLATFORM_MICROSOFT) && 25 | (encoding_id == TT_MS_ID_UNICODE_CS)) 26 | return 1; 27 | 28 | return -1; 29 | } 30 | 31 | SEXP font_name(SEXP font_path) 32 | { 33 | const char* file_path = CHAR(STRING_ELT(font_path, 0)); 34 | FontDesc font; 35 | FT_Error err; 36 | FT_UInt num_entries, i, j; 37 | FT_SfntName name_table; 38 | char name_enc; 39 | void* riconv; 40 | size_t in_str_size, out_str_size; 41 | const char* in_str; 42 | char *out_str, *out_str_start; 43 | SEXP res; 44 | 45 | /* Result: a length-four string vector */ 46 | /* family, face, version, ps_name */ 47 | PROTECT(res = Rf_allocVector(STRSXP, 4)); 48 | 49 | /* Initialize FreeType library */ 50 | err = FT_Init_FreeType(&(font.library)); 51 | if(err) 52 | { 53 | UNPROTECT(1); 54 | return res; 55 | } 56 | /* Open font face */ 57 | err = FT_New_Face(font.library, file_path, 0, &(font.face)); 58 | if(err) 59 | { 60 | if(font.library) FT_Done_FreeType(font.library); 61 | UNPROTECT(1); 62 | return res; 63 | } 64 | 65 | /* Get the number of name entries in the font */ 66 | num_entries = FT_Get_Sfnt_Name_Count(font.face); 67 | for(i = 0; i < num_entries; i++) 68 | { 69 | /* Get the name entry */ 70 | err = FT_Get_Sfnt_Name(font.face, i, &name_table); 71 | if(err) 72 | continue; 73 | /* Only extract English names */ 74 | name_enc = font_name_enc(name_table.platform_id, 75 | name_table.encoding_id, 76 | name_table.language_id); 77 | if(name_enc < 0) 78 | continue; 79 | 80 | /* Map the entry ID to the index in the result */ 81 | j = 99; 82 | switch(name_table.name_id) 83 | { 84 | case TT_NAME_ID_FONT_FAMILY: 85 | j = 0; 86 | break; 87 | case TT_NAME_ID_FONT_SUBFAMILY: 88 | j = 1; 89 | break; 90 | case TT_NAME_ID_VERSION_STRING: 91 | j = 2; 92 | break; 93 | case TT_NAME_ID_PS_NAME: 94 | j = 3; 95 | break; 96 | } 97 | 98 | if(j < 4) 99 | { 100 | /* Rprintf("str_len0 = %d, enc_id = %d, plat_id = %d\n", 101 | name_table.string_len, name_table.encoding_id, name_table.platform_id); */ 102 | 103 | /* If encoding is ASCII, we can directly write it to R */ 104 | if(name_enc == 0) 105 | { 106 | SET_STRING_ELT( 107 | res, 108 | j, 109 | Rf_mkCharLen((char*) name_table.string, name_table.string_len) 110 | ); 111 | } else { 112 | /* Otherwise, the name is encoded in UTF-16BE, with each character 113 | * occupying two bytes, and we need to convert it to UTF-8 114 | */ 115 | in_str = (const char*) name_table.string; 116 | in_str_size = out_str_size = name_table.string_len; 117 | out_str = (char*) calloc(out_str_size, sizeof(char)); 118 | out_str_start = out_str; 119 | 120 | riconv = Riconv_open("UTF-8", "UTF-16BE"); 121 | err = (FT_Error) Riconv(riconv, &in_str, &in_str_size, &out_str, &out_str_size); 122 | Riconv_close(riconv); 123 | 124 | if(!err) 125 | { 126 | SET_STRING_ELT( 127 | res, 128 | j, 129 | Rf_mkCharLenCE(out_str_start, (int) (out_str - out_str_start), CE_UTF8) 130 | ); 131 | } 132 | 133 | free(out_str_start); 134 | } 135 | } 136 | } 137 | 138 | /* Free resources */ 139 | if(font.face) FT_Done_Face(font.face); 140 | if(font.library) FT_Done_FreeType(font.library); 141 | 142 | UNPROTECT(1); 143 | return res; 144 | } 145 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | AC_INIT(sysfonts, 0.8, yixuan.qiu@cos.name) 2 | 3 | # Find R_HOME and set CC/CFLAGS/CPPFLAGS 4 | : ${R_HOME=`R RHOME`} 5 | if test -z "${R_HOME}"; then 6 | echo "could not determine R_HOME" 7 | exit 1 8 | fi 9 | CC=`"${R_HOME}/bin/R" CMD config CC` 10 | CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS` 11 | CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS` 12 | 13 | # Checks for programs. 14 | AC_PROG_CC 15 | 16 | # Checks for pkg-config 17 | AC_PATH_PROG([PKGCONF], [pkg-config], [], [$PATH:/usr/bin:/usr/local/bin:/opt/bin:/opt/homebrew/bin]) 18 | 19 | # If pkg-config is available, use it to find needed libraries 20 | if test -n "${PKGCONF}"; then 21 | # Check zlib 22 | AC_MSG_CHECKING([whether pkg-config could find zlib]) 23 | if "${PKGCONF}" --exists zlib; then 24 | AC_MSG_RESULT([yes]) 25 | ZLIB_CPPFLAGS=`"${PKGCONF}" --cflags zlib` 26 | ZLIB_LIBS=`"${PKGCONF}" --libs zlib` 27 | else 28 | AC_MSG_RESULT([no]) 29 | fi 30 | # Check libpng 31 | AC_MSG_CHECKING([whether pkg-config could find libpng]) 32 | if "${PKGCONF}" --exists libpng; then 33 | AC_MSG_RESULT([yes]) 34 | LIBPNG_CPPFLAGS=`"${PKGCONF}" --cflags libpng` 35 | LIBPNG_LIBS=`"${PKGCONF}" --libs libpng` 36 | else 37 | AC_MSG_RESULT([no]) 38 | fi 39 | # Check freetype2 40 | AC_MSG_CHECKING([whether pkg-config could find freetype2]) 41 | if "${PKGCONF}" --exists freetype2; then 42 | AC_MSG_RESULT([yes]) 43 | FT_CPPFLAGS=`"${PKGCONF}" --cflags freetype2` 44 | FT_LIBS=`"${PKGCONF}" --libs freetype2` 45 | else 46 | AC_MSG_RESULT([no]) 47 | fi 48 | fi 49 | 50 | # If pkg-config is not found, or if some library is not detected 51 | # by pkg-config, try to check them directly 52 | 53 | # Check zlib 54 | if test -z "${ZLIB_LIBS}"; then 55 | AC_CHECK_LIB([z], [deflate], [ZLIB_LIBS=-lz], [ZLIB_LIBS=]) 56 | if test -z "${ZLIB_LIBS}"; then 57 | echo "" 58 | echo "****************************************************" 59 | echo "Error: zlib not found" 60 | echo "If you have not installed zlib, you can download" 61 | echo "the source code from http://www.zlib.net/" 62 | echo "" 63 | echo "In Debian/Ubuntu-like systems, you can use" 64 | echo ' "sudo apt-get install zlib1g-dev"' 65 | echo "to install zlib" 66 | echo "" 67 | echo "For rpm-based systems, try" 68 | echo ' "sudo yum install zlib-devel"' 69 | echo "****************************************************" 70 | echo "" 71 | exit 1 72 | fi 73 | fi 74 | 75 | # Check libpng 76 | if test -z "${LIBPNG_LIBS}"; then 77 | AC_CHECK_LIB([png], [png_init_io], [LIBPNG_LIBS=-lpng], [LIBPNG_LIBS=]) 78 | if test -z "${LIBPNG_LIBS}"; then 79 | echo "" 80 | echo "****************************************************" 81 | echo "Error: libpng not found." 82 | echo "If you have not installed libpng, you can download" 83 | echo "the source code from http://www.libpng.org/" 84 | echo "" 85 | echo "In Debian/Ubuntu-like systems, you can use" 86 | echo ' "sudo apt-get install libpng12-dev"' 87 | echo "to install libpng" 88 | echo "" 89 | echo "For rpm-based systems, try" 90 | echo ' "sudo yum install libpng-devel"' 91 | echo "****************************************************" 92 | echo "" 93 | exit 1 94 | fi 95 | fi 96 | 97 | ## Check freetype 98 | if test -z "${FT_LIBS}"; then 99 | AC_CHECK_PROG([HAVE_FREETYPE_CONFIG], [freetype-config], [yes], [no]) 100 | if test [ "x$HAVE_FREETYPE_CONFIG" = "xyes" ]; then 101 | FT_CPPFLAGS="`freetype-config --cflags`" 102 | FT_LIBS="`freetype-config --libs`" 103 | else 104 | echo "" 105 | echo "****************************************************" 106 | echo "Error: freetype-config not found." 107 | echo "Please install FreeType with freetype-config script." 108 | echo "If you have not installed FreeType, you can" 109 | echo "download the source code from http://freetype.org/" 110 | echo "" 111 | echo "In Debian/Ubuntu-like systems, you can use" 112 | echo ' "sudo apt-get install libfreetype6-dev"' 113 | echo "to install FreeType" 114 | echo "" 115 | echo "For rpm-based systems, try" 116 | echo ' "sudo yum install freetype-devel"' 117 | echo "****************************************************" 118 | echo "" 119 | exit 1 120 | fi 121 | fi 122 | 123 | # Additional check for linking 124 | CPPFLAGS="$CPPFLAGS ${FT_CPPFLAGS}" 125 | LIBS0="$LIBS" 126 | LIBS="$LIBS0 ${FT_LIBS}" 127 | AC_MSG_CHECKING([whether freetype2 flags work]) 128 | AC_LINK_IFELSE([AC_LANG_CALL([], [FT_Init_FreeType])], AC_MSG_RESULT([yes]), [ 129 | AC_MSG_RESULT([no]) 130 | AC_MSG_CHECKING([whether --static helps]) 131 | FT_LIBS=`"${PKGCONF}" --libs --static freetype2` 132 | LIBS="$LIBS0 ${FT_LIBS}" 133 | AC_LINK_IFELSE([AC_LANG_CALL([], [FT_Init_FreeType])], AC_MSG_RESULT([yes]), [ 134 | AC_MSG_RESULT([no]) 135 | AC_MSG_ERROR([Cannot get FreeType to work, check config.log for details.]) 136 | ]) 137 | ]) 138 | 139 | SYSFONTS_CPPFLAGS="${FT_CPPFLAGS} ${LIBPNG_CPPFLAGS} ${ZLIB_CPPFLAGS}" 140 | SYSFONTS_LIBS="${FT_LIBS} ${LIBPNG_LIBS} ${ZLIB_LIBS}" 141 | 142 | AC_SUBST(SYSFONTS_CPPFLAGS) 143 | AC_SUBST(SYSFONTS_LIBS) 144 | AC_CONFIG_FILES([src/Makevars]) 145 | AC_OUTPUT 146 | 147 | -------------------------------------------------------------------------------- /inst/NEWS.Rd: -------------------------------------------------------------------------------- 1 | \name{NEWS} 2 | \title{News for Package "sysfonts"} 3 | 4 | \section{Changes in sysfonts version 0.8.9}{ 5 | \subsection{NEW FEATURES}{ 6 | \itemize{ 7 | \item Updated Google Fonts database. 8 | } 9 | } 10 | \subsection{BUG FIXES}{ 11 | \itemize{ 12 | \item Updated the linking on Windows for upcoming version of Rtools, 13 | thanks to Tomas Kalibera. 14 | } 15 | } 16 | } 17 | 18 | \section{Changes in sysfonts version 0.8.8}{ 19 | \subsection{BUG FIXES}{ 20 | \itemize{ 21 | \item \code{font_add()} now gives a warning if the parameters are not 22 | length-one vectors. 23 | \item C functions are now called using registered native symbols. 24 | } 25 | } 26 | } 27 | 28 | \section{Changes in sysfonts version 0.8.7}{ 29 | \subsection{NEW FEATURES}{ 30 | \itemize{ 31 | \item Updated Google Fonts database. 32 | } 33 | } 34 | \subsection{BUG FIXES}{ 35 | \itemize{ 36 | \item Updated the documentation for \code{font_add_google()}. 37 | \item Fixed the bug that \code{db_cache = FALSE} is not effective in 38 | the second call of \code{font_add_google()}. 39 | } 40 | } 41 | } 42 | 43 | \section{Changes in sysfonts version 0.8.6}{ 44 | \subsection{BUG FIXES}{ 45 | \itemize{ 46 | \item Supported UCRT on Windows, thanks to Tomas Kalibera and Uwe Ligges. 47 | } 48 | } 49 | } 50 | 51 | \section{Changes in sysfonts version 0.8.5}{ 52 | \subsection{BUG FIXES}{ 53 | \itemize{ 54 | \item Fixed the configure script, thanks to Prof. Brian Ripley. 55 | \item Fixed compiler warnings. 56 | } 57 | } 58 | } 59 | 60 | \section{Changes in sysfonts version 0.8.4}{ 61 | \subsection{NEW FEATURES}{ 62 | \itemize{ 63 | \item Updated Google Fonts database. 64 | } 65 | } 66 | \subsection{BUG FIXES}{ 67 | \itemize{ 68 | \item Added a new search path in the configure script 69 | (\href{https://github.com/yixuan/sysfonts/issues/17}{#17}). 70 | } 71 | } 72 | } 73 | 74 | \section{Changes in sysfonts version 0.8.3}{ 75 | \subsection{BUG FIXES}{ 76 | \itemize{ 77 | \item Fixed a string comparison issue in the configure script 78 | (\href{https://github.com/yixuan/sysfonts/issues/14}{#14}). 79 | } 80 | } 81 | } 82 | 83 | \section{Changes in sysfonts version 0.8.2}{ 84 | \subsection{NEW FEATURES}{ 85 | \itemize{ 86 | \item Added a new system font path for macOS, suggested by Athanasia Mowinckel 87 | (\href{https://github.com/yixuan/sysfonts/issues/13}{#13}). 88 | \item Updated Google Fonts database. 89 | } 90 | } 91 | } 92 | 93 | \section{Changes in sysfonts version 0.8.1}{ 94 | \subsection{NEW FEATURES}{ 95 | \itemize{ 96 | \item Updated Google Fonts database. 97 | } 98 | } 99 | \subsection{BUG FIXES}{ 100 | \itemize{ 101 | \item Updated the download method for installation on Windows. 102 | } 103 | } 104 | } 105 | 106 | \section{Changes in sysfonts version 0.8}{ 107 | \subsection{NEW FEATURES}{ 108 | \itemize{ 109 | \item Now \code{font_files()} can report more information of the fonts, for 110 | example the family name, font face, version, and PostScript font name, 111 | suggested by pull request 112 | \href{https://github.com/eddelbuettel/binb/pull/7}{#7} of the \pkg{binb} 113 | package. 114 | \item Updated Google Fonts database. 115 | } 116 | } 117 | } 118 | 119 | \section{Changes in sysfonts version 0.7.3}{ 120 | \subsection{NEW FEATURES}{ 121 | \itemize{ 122 | \item Added function \code{font_info_google()} to retrieve metadata of 123 | Google Fonts (\href{https://github.com/yixuan/sysfonts/issues/7}{#7}), 124 | thanks to 125 | \href{https://github.com/camille-s}{@camille-s}. 126 | \item Added an argument \code{db_cache} to \code{font_info_google()}, 127 | \code{font_families_google()}, and \code{font_add_google()} to force 128 | using Google Fonts API to retrieve font metadata, suggested by 129 | issue \href{https://github.com/yixuan/showtext/issues/23}{#23} of the 130 | \pkg{showtext} package. 131 | \item Updated Google Fonts database. 132 | } 133 | } 134 | } 135 | 136 | \section{Changes in sysfonts version 0.7.2}{ 137 | \subsection{NEW FEATURES}{ 138 | \itemize{ 139 | \item Updated Google Fonts database. 140 | } 141 | } 142 | \subsection{BUG FIXES}{ 143 | \itemize{ 144 | \item Fixed installation problems on Windows. 145 | } 146 | } 147 | } 148 | 149 | \section{Changes in sysfonts version 0.7.1}{ 150 | \subsection{BUG FIXES}{ 151 | \itemize{ 152 | \item Fixed the use of one deprecated function. 153 | } 154 | } 155 | } 156 | 157 | \section{Changes in sysfonts version 0.7}{ 158 | \subsection{API CHANGES}{ 159 | \itemize{ 160 | \item All previous API functions now have aliases replacing the dots 161 | with underscores in the function names, for example \code{font_add()} 162 | is equivalent to \code{font.add()}. 163 | \item The "underscore" naming is preferred, and the "dot" version will be 164 | gradually deprecated. 165 | 166 | } 167 | } 168 | \subsection{NEW FEATURES}{ 169 | \itemize{ 170 | \item Added a "\code{handle}" parameter to \code{font_add_google()} in 171 | order to support proxies 172 | (\href{https://github.com/yixuan/sysfonts/pull/4}{#4}), thanks to 173 | \href{https://github.com/Sdurier}{@Sdurier}. 174 | } 175 | } 176 | } 177 | 178 | \section{Changes in sysfonts version 0.6}{ 179 | \subsection{NEW FEATURES}{ 180 | \itemize{ 181 | \item Updated the included Liberation fonts to version 1.07.4. 182 | \item Updated Google Fonts database. 183 | \item \pkg{sysfonts} now uses the \pkg{curl} package to fetch Google Fonts files. 184 | \item \code{font.add()} now supports tilde path expansion, 185 | for example \code{font.add("xkcd", "~/xkcd.ttf")} 186 | (\href{https://github.com/yixuan/sysfonts/issues/1}{#1}), 187 | thanks to \href{https://github.com/r2evans}{@r2evans}. 188 | } 189 | } 190 | \subsection{BUG FIXES}{ 191 | \itemize{ 192 | \item Added a 'cleanup' script per CRAN policies. 193 | \item Registered native routines per CRAN policies. 194 | } 195 | } 196 | } 197 | 198 | 199 | \section{Changes in sysfonts version 0.5}{ 200 | \subsection{BUG FIXES}{ 201 | \itemize{ 202 | \item More robust way to fetch font list. 203 | } 204 | } 205 | } 206 | 207 | \section{Changes in sysfonts version 0.4}{ 208 | \subsection{BUG FIXES}{ 209 | \itemize{ 210 | \item Fixed a problem reported by Philippe Massicotte involving 211 | incomplete downloading of font files. 212 | } 213 | } 214 | } 215 | 216 | \section{Changes in sysfonts version 0.3}{ 217 | \subsection{NEW FEATURES}{ 218 | \itemize{ 219 | \item No longer prints message at start-up. 220 | \item Now has faster loading of Google Fonts list. 221 | } 222 | } 223 | } 224 | 225 | \section{Changes in sysfonts version 0.2}{ 226 | \subsection{NEW FEATURES}{ 227 | \itemize{ 228 | \item \pkg{sysfonts} can now add fonts from Google Fonts 229 | (\url{https://fonts.google.com/}). 230 | } 231 | } 232 | } 233 | 234 | \section{Changes in sysfonts version 0.1}{ 235 | \subsection{NEW FEATURES}{ 236 | \itemize{ 237 | \item Initial release. 238 | } 239 | } 240 | } 241 | -------------------------------------------------------------------------------- /R/google.R: -------------------------------------------------------------------------------- 1 | ## Object to store the Google Fonts database 2 | .pkg.env$.google.db = NULL 3 | 4 | google_font_db = function(db_cache = TRUE, handle = curl::new_handle()) 5 | { 6 | ## We need to use packages jsonlite and curl here 7 | 8 | ## If database already exists and db_cache = TRUE, return it 9 | if(!is.null(.pkg.env$.google.db) && db_cache) 10 | return(.pkg.env$.google.db) 11 | 12 | ## Else, download it 13 | 14 | ## Download the font database either from Google or from my own site 15 | db = paste(tempfile(), ".bz2", sep = "") 16 | db = tryCatch( 17 | 18 | ## First try to download the database 19 | { 20 | if(!db_cache) 21 | { 22 | # Fetch font database from Google API, 23 | # slow and relying on curl, but most up-to-date 24 | baseurl = "https://www.googleapis.com/webfonts/v1/webfonts" 25 | key = "AIzaSyDilHY_z1p7WltVNj5gOEHVHD3AIpW8R4o" 26 | apiurl = sprintf("%s?key=%s", baseurl, key) 27 | ret = curl::curl_fetch_memory(apiurl, handle = handle) 28 | # Write the content to a temporary file 29 | webfonts = rawToChar(ret$content) 30 | bz2 = bzfile(db, "wb") 31 | write(webfonts, bz2) 32 | close(bz2) 33 | } else { 34 | # Download from my own site, faster but not as up-to-date as Google 35 | curl::curl_download("https://statr.me/files/webfonts.bz2", db, 36 | quiet = TRUE, mode = "wb", handle = handle) 37 | } 38 | 39 | db 40 | }, 41 | 42 | ## If not successful, use the built-in one 43 | error = function(e) { 44 | system.file("fonts", "webfonts.bz2", package = "sysfonts") 45 | } 46 | 47 | ) 48 | 49 | con = bzfile(db, "rb") 50 | font_list = readLines(con) 51 | close(con) 52 | res = jsonlite::fromJSON(font_list, FALSE) 53 | .pkg.env$.google.db = res 54 | 55 | res 56 | } 57 | 58 | #' Display Information of Available Google Fonts 59 | #' 60 | #' This function returns a data frame that contains the metadata of 61 | #' font families available in Google Fonts, for example the family name, 62 | #' available font face variants, the version number, etc. When running this 63 | #' function for the first time, it may take a few seconds to fetch the 64 | #' database. This function requires the \pkg{jsonlite} and \pkg{curl} packages. 65 | #' 66 | #' @param db_cache whether to obtain font metadata from a cache site. Using cache 67 | #' is typically faster, but not as update-to-date as using the official 68 | #' API. If \code{db_cache} is set to \code{FALSE}, then metadata 69 | #' are retrieved from the Google Fonts API. 70 | #' @param handle a curl handle object passed to \code{curl::curl_download()} and 71 | #' \code{curl::curl_fetch_memory()}. 72 | #' 73 | #' @return A data frame containing metadata of Google Fonts. 74 | #' 75 | #' @seealso \code{\link{font_families_google}()} 76 | #' 77 | #' @export 78 | #' 79 | #' @author Yixuan Qiu <\url{https://statr.me/}> 80 | #' 81 | #' @examples \dontrun{ 82 | #' font_info_google() 83 | #' } 84 | #' 85 | font_info_google = function(db_cache = TRUE, handle = curl::new_handle()) 86 | { 87 | # db is a list parsed from JSON 88 | db = google_font_db(db_cache, handle) 89 | # Convert to a readable data frame 90 | to_df = function(item) 91 | { 92 | data.frame( 93 | family = item$family, 94 | category = item$category, 95 | num_variants = length(item$variants), 96 | variants = paste(item$variants, collapse = ", "), 97 | num_subsets = length(item$subsets), 98 | subsets = paste(item$subsets, collapse = ", "), 99 | version = item$version, 100 | lastModified = item$lastModified, 101 | stringsAsFactors = FALSE 102 | ) 103 | } 104 | font_df = lapply(db[[2]], to_df) 105 | do.call(rbind, font_df) 106 | } 107 | 108 | search_db = function(family, db_cache, handle) 109 | { 110 | gflist = font_info_google(db_cache, handle) 111 | 112 | gffamily = gflist$family 113 | ind = grep(sprintf("^%s$", family), gffamily, ignore.case = TRUE) 114 | if(!length(ind)) 115 | { 116 | ind = grep(family, gffamily, ignore.case = TRUE) 117 | if(length(ind)) 118 | { 119 | cat("Do you mean one of the following font(s)?\n") 120 | cat(paste(" ", gffamily[ind], collapse = "\n"), "\n") 121 | } 122 | stop("font not found") 123 | } 124 | 125 | ind 126 | } 127 | 128 | # Download font file and return the path of destination 129 | download_font_file = function(url, repo = "http://fonts.gstatic.com/", handle = curl::new_handle()) 130 | { 131 | ## We need to use curl package here 132 | 133 | dest = file.path(tempdir(), basename(url)) 134 | 135 | if(repo != "http://fonts.gstatic.com/") 136 | { 137 | url_repo = gsub("http://fonts.gstatic.com/", repo, url) 138 | tryCatch( 139 | 140 | ## Try the user-specified repository 141 | { 142 | curl::curl_download(url_repo, dest, handle = handle) 143 | }, 144 | 145 | ## If not successful, use the default one 146 | error = function(e) { 147 | message("font not found in the user-provided repo, try default repo...") 148 | curl::curl_download(url, dest, handle = handle) 149 | } 150 | 151 | ) 152 | } else { 153 | curl::curl_download(url, dest, handle = handle) 154 | } 155 | 156 | dest 157 | } 158 | 159 | 160 | 161 | #' List Font Families Available in Google Fonts 162 | #' 163 | #' @description The two versions of this function are equivalent, but the 164 | #' "underscore" naming is preferred. 165 | #' 166 | #' This function lists family names of the fonts that are currently 167 | #' available in Google Fonts. When running this function for the first time, 168 | #' it may take a few seconds to fetch the font information database. 169 | #' This function requires the \pkg{jsonlite} and \pkg{curl} packages. 170 | #' 171 | #' @param db_cache whether to obtain font metadata from a cache site. Using cache 172 | #' is typically faster, but not as update-to-date as using the official 173 | #' API. If \code{db_cache} is set to \code{FALSE}, then metadata 174 | #' are retrieved from the Google Fonts API. 175 | #' @param handle a curl handle object passed to \code{curl::curl_download()} and 176 | #' \code{curl::curl_fetch_memory()}. 177 | #' 178 | #' @return A character vector of available font family names in Google Fonts. 179 | #' 180 | #' @seealso \code{\link{font_add_google}()} 181 | #' 182 | #' @export 183 | #' 184 | #' @author Yixuan Qiu <\url{https://statr.me/}> 185 | #' 186 | #' @examples \dontrun{ 187 | #' font_families_google() 188 | #' } 189 | #' 190 | font_families_google = function(db_cache = TRUE, handle = curl::new_handle()) 191 | { 192 | font_info_google(db_cache, handle)$family 193 | } 194 | 195 | #' @rdname font_families_google 196 | #' @export 197 | font.families.google = function() 198 | { 199 | deprecate_message_once("font.families.google()", "font_families_google()") 200 | font_families_google() 201 | } 202 | 203 | #' Load Google Fonts into 'sysfonts' 204 | #' 205 | #' @description The two versions of this function are equivalent, but the 206 | #' "underscore" naming is preferred. 207 | #' 208 | #' This function will search the Google Fonts repository 209 | #' (\url{https://fonts.google.com/}) for a specified 210 | #' family name, download the proper font files, and then add them to \pkg{sysfonts}. 211 | #' This function requires the \pkg{jsonlite} and \pkg{curl} packages. 212 | #' 213 | #' @param name name of the font that will be searched in Google Fonts 214 | #' @param family specifies the family name of this font in R. This can be any string, 215 | #' not necessarily the same as \code{name}. The value of this parameter 216 | #' will be used in R plotting functions. See the example code below. 217 | #' @param regular.wt font weight for the regular font face, usually 400 218 | #' @param bold.wt font weight for the bold font face, usually 700 219 | #' @param repo the site that hosts the font files. Default is the official 220 | #' repository \code{http://fonts.gstatic.com/} provided by 221 | #' Google Fonts. 222 | #' @param db_cache whether to obtain font metadata from a cache site. Using cache 223 | #' is typically faster, but not as update-to-date as using the official 224 | #' API. If \code{db_cache} is set to \code{FALSE}, then metadata 225 | #' are retrieved from the Google Fonts API. 226 | #' @param handle a curl handle object passed to \code{curl::curl_download()}. 227 | #' 228 | #' @details There are thousands of open source fonts in the Google Fonts 229 | #' repository (\url{https://fonts.google.com/}). 230 | #' This function will try to search the font family specified 231 | #' by the \code{name} argument, and then automatically 232 | #' download the font files for all possible font faces 233 | #' ("regular", "bold", "italic" and "bold italic", 234 | #' but no"symbol"). 235 | #' If fonts are found and downloaded successfully, they will be 236 | #' also added to \pkg{sysfonts} with the given family name. 237 | #' 238 | #' @export 239 | #' 240 | #' @seealso \code{\link{font_families_google}()} 241 | #' 242 | #' @author Yixuan Qiu <\url{https://statr.me/}> 243 | #' 244 | #' @examples \dontrun{ 245 | #' font_add_google("Alegreya Sans", "aleg") 246 | #' 247 | #' if(require(showtext)) 248 | #' { 249 | #' wd = setwd(tempdir()) 250 | #' pdf("google-fonts-ex.pdf") 251 | #' showtext_begin() 252 | #' 253 | #' par(family = "aleg") 254 | #' plot(0:5,0:5, type="n") 255 | #' text(1:4, 1:4, "Alegreya Sans", font=1:4, cex = 2) 256 | #' 257 | #' showtext_end() 258 | #' dev.off() 259 | #' setwd(wd) 260 | #' } 261 | #' 262 | #' } 263 | font_add_google = function(name, family = name, regular.wt = 400, 264 | bold.wt = 700, repo = "http://fonts.gstatic.com/", 265 | db_cache = TRUE, handle = curl::new_handle()) 266 | { 267 | name = as.character(name)[1] 268 | family = as.character(family)[1] 269 | repo = as.character(repo)[1] 270 | 271 | db = google_font_db(db_cache, handle) 272 | # Use db_cache = TRUE since the database has already been updated in google_font_db() 273 | ind = search_db(name, db_cache = TRUE, handle = handle) 274 | font = db[[2]][[ind]] 275 | 276 | ## Names of type variants to search in the db 277 | ## e.g., "regular", "700", "italic", 700italic", etc. 278 | regular = as.character(regular.wt) 279 | bold = as.character(bold.wt) 280 | italic = paste(regular, "italic", sep = "") 281 | bolditalic = paste(bold, "italic", sep = "") 282 | if(regular.wt == 400) 283 | { 284 | regular = "regular" 285 | italic = "italic" 286 | } 287 | 288 | ## Download regular font face 289 | r.url = font$files[[regular]] 290 | if(is.null(r.url)) 291 | stop(sprintf("regular (weight=%d) variant of '%s' font not found", regular.wt, name)) 292 | r.file = download_font_file(r.url, repo, handle = handle) 293 | 294 | ## Download bold font face 295 | b.url = font$files[[bold]] 296 | b.file = if(is.null(b.url)) NULL else download_font_file(b.url, repo, handle = handle) 297 | 298 | ## Download italic font face 299 | i.url = font$files[[italic]] 300 | i.file = if(is.null(i.url)) NULL else download_font_file(i.url, repo, handle = handle) 301 | 302 | ## Download bold-italic font face 303 | bi.url = font$files[[bolditalic]] 304 | bi.file = if(is.null(bi.url)) NULL else download_font_file(bi.url, repo, handle = handle) 305 | 306 | font_add(family, r.file, b.file, i.file, bi.file) 307 | } 308 | 309 | #' @rdname font_add_google 310 | #' @export 311 | font.add.google = function(name, family = name, regular.wt = 400, 312 | bold.wt = 700, repo = "http://fonts.gstatic.com/", 313 | handle = curl::new_handle()) 314 | { 315 | deprecate_message_once("font.add.google()", "font_add_google()") 316 | font_add_google(name, family, regular.wt, bold.wt, repo = repo, handle = handle) 317 | } 318 | -------------------------------------------------------------------------------- /R/font.R: -------------------------------------------------------------------------------- 1 | # Environment to store several important variables 2 | # Note that the name of this variable should not be changed, 3 | # since showtext relies on the name to find this variable. 4 | .pkg.env = new.env() 5 | 6 | # Current font list, a list of pointers to freetype structures 7 | # The name of this variable should not be changed, since showtext 8 | # relies on the name to find this variable. 9 | .pkg.env$.font.list = list() 10 | 11 | # All fonts previously added, used to free memories when exiting 12 | .pkg.env$.font.list.all = list() 13 | 14 | # Font search path 15 | .pkg.env$.font.path = character(0) 16 | 17 | # Add default font search paths 18 | add_default_font_paths = function() 19 | { 20 | if(.Platform$OS.type == "windows") { 21 | path = normalizePath(file.path(Sys.getenv("windir"), "Fonts")) 22 | } else if(.Platform$OS.type == "unix") { 23 | if(Sys.info()["sysname"] == "Darwin") 24 | { 25 | path = list.dirs(c("/System/Library/Fonts", 26 | "/Library/Fonts", 27 | "~/Library/Fonts")) 28 | } else { 29 | path = list.dirs(c("/usr/share/fonts", 30 | "/usr/local/share/fonts", 31 | "~/.fonts", 32 | "~/.local/share/fonts")) 33 | } 34 | } else stop("unknown OS type") 35 | 36 | .pkg.env$.font.path = path 37 | } 38 | 39 | #' Get/Set Font Search Paths 40 | #' 41 | #' @description The two versions of this function are equivalent, but the 42 | #' "underscore" naming is preferred. 43 | #' 44 | #' This function gets/sets the search paths for font files. 45 | #' See \code{\link{font_add}()} for details about how \pkg{sysfonts} looks for 46 | #' font files. There is also a complete example showing the usage of these 47 | #' functions in the help page of \code{\link{font_add}()}. 48 | #' 49 | #' @param new a character vector indicating the search paths to be 50 | #' prepended. If the argument is missing, the function will 51 | #' return the current search paths. 52 | #' @return The updated search paths. 53 | #' 54 | #' @details Default search paths will be assigned when package is loaded: 55 | #' \itemize{ 56 | #' \item For Windows, it is \code{\%windir\%\\Fonts}, usually expanded 57 | #' into \code{C:\\Windows\\Fonts} 58 | #' 59 | #' \item For Mac OS, default paths are \code{/Library/Fonts} 60 | #' and \code{~/Library/Fonts} and their subdirectories 61 | #' 62 | #' \item For Linux and other Unix-like OS, \code{/usr/share/fonts}, 63 | #' \code{/usr/local/share/fonts}, \code{~/.fonts}, 64 | #' \code{~/.local/share/fonts}, and their subdirectories 65 | #' } 66 | #' 67 | #' @export 68 | #' 69 | #' @author Yixuan Qiu <\url{https://statr.me/}> 70 | font_paths = function(new) 71 | { 72 | if(!missing(new)) 73 | { 74 | new = path.expand(new) 75 | paths = unique(normalizePath(c(new, .pkg.env$.font.path))) 76 | .pkg.env$.font.path = paths 77 | } 78 | 79 | .pkg.env$.font.path 80 | } 81 | 82 | #' @rdname font_paths 83 | #' @export 84 | font.paths = function(new) 85 | { 86 | deprecate_message_once("fond.paths()", "font_paths()") 87 | font_paths(new) 88 | } 89 | 90 | #' List Font Families Loaded by 'sysfonts' 91 | #' 92 | #' @description The two versions of this function are equivalent, but the 93 | #' "underscore" naming is preferred. 94 | #' 95 | #' This function lists font families currently available that can be 96 | #' used by \pkg{R2SWF} and \pkg{showtext} packages. 97 | #' 98 | #' @return A character vector of available font family names. 99 | #' 100 | #' @details By default there are three font families loaded automatically, 101 | #' i.e., "sans", "serif" and "mono". If one wants to use other fonts, 102 | #' \code{\link{font_add}()} needs to be called 103 | #' to register new fonts by specifying a family name and corresponding 104 | #' font files. See \code{\link{font_add}()} for details about 105 | #' the meaning of "family name" in this context, as well as 106 | #' a complete example of registering and using a new font. 107 | #' 108 | #' @seealso \code{\link{font_add}()} 109 | #' 110 | #' @export 111 | #' 112 | #' @author Yixuan Qiu <\url{https://statr.me/}> 113 | #' 114 | #' @examples font_families() 115 | #' 116 | font_families = function() 117 | { 118 | names(.pkg.env$.font.list) 119 | } 120 | 121 | #' @rdname font_families 122 | #' @export 123 | font.families = function() 124 | { 125 | deprecate_message_once("font.families()", "font_families()") 126 | font_families() 127 | } 128 | 129 | #' List Font Files Available in the Search Paths 130 | #' 131 | #' @description The two versions of this function are equivalent, but the 132 | #' "underscore" naming is preferred. 133 | #' 134 | #' This function lists font files in the search path that can be 135 | #' loaded by \code{\link{font_add}()}. 136 | #' Currently supported formats include TrueType fonts(*.ttf, *.ttc) and OpenType fonts(*.otf). 137 | #' 138 | #' @return A data frame containing the following information of the font files: 139 | #' \item{path}{The directory that the font file is located in.} 140 | #' \item{file}{File name of the font.} 141 | #' \item{family}{Family name.} 142 | #' \item{face}{Font face.} 143 | #' \item{version}{Version of the font.} 144 | #' \item{ps_name}{PostScript font name.} 145 | #' 146 | #' @seealso \code{\link{font_paths}()}, \code{\link{font_add}()} 147 | #' 148 | #' @export 149 | #' 150 | #' @author Yixuan Qiu <\url{https://statr.me/}> 151 | #' 152 | #' @examples \dontrun{ 153 | #' font_files() 154 | #' } 155 | #' 156 | font_files = function() 157 | { 158 | files = list.files(font_paths(), "\\.tt[cf]$|\\.otf$", full.names = TRUE, 159 | ignore.case = TRUE) 160 | fnames = sapply(files, function(f) .Call(font_name, f), USE.NAMES = FALSE) 161 | data.frame( 162 | path = dirname(files), 163 | file = basename(files), 164 | family = fnames[1, ], 165 | face = fnames[2, ], 166 | version = fnames[3, ], 167 | ps_name = fnames[4, ], 168 | stringsAsFactors = FALSE 169 | ) 170 | } 171 | 172 | #' @rdname font_files 173 | #' @export 174 | font.files = function() 175 | { 176 | deprecate_message_once("font.files()", "font_files()") 177 | font_files() 178 | } 179 | 180 | # Check whether a specified path points to a font file 181 | check_font_path = function(path, type) 182 | { 183 | # Sanity check 184 | if(length(path) != 1) 185 | { 186 | warning(sprintf("'%s' should be a length-one vector, using the first element", type)) 187 | path = as.character(path[1]) 188 | } 189 | 190 | # If it really exists 191 | if(file.exists(path) && !file.info(path)$isdir) 192 | return(normalizePath(path)) 193 | 194 | # If it doesn't exist, search the file in the search paths 195 | filename = basename(path) 196 | search_paths = font_paths() 197 | found = FALSE 198 | for(dir in search_paths) 199 | { 200 | path = file.path(dir, filename) 201 | if(file.exists(path) && !file.info(path)$isdir) 202 | { 203 | found = TRUE 204 | break 205 | } 206 | } 207 | if(!found) stop(sprintf("font file not found for '%s' type", type)) 208 | 209 | normalizePath(path) 210 | } 211 | 212 | #' Add New Font Families to 'sysfonts' 213 | #' 214 | #' @description The two versions of this function are equivalent, but the 215 | #' "underscore" naming is preferred. 216 | #' 217 | #' This function registers new font families that can be used by package 218 | #' \pkg{showtext} and the SWF device in package \pkg{R2SWF}. 219 | #' Currently supported formats include but not limited to 220 | #' TrueType fonts(*.ttf, *.ttc) and OpenType fonts(*.otf). 221 | #' 222 | #' @param family a character string of maximum 200-byte size, 223 | #' indicating the family name of the font. 224 | #' See "Details" for further explanation. 225 | #' @param regular path of the font file for "regular" font face. 226 | #' This argument must be specified as a character string 227 | #' and cannot be missing. 228 | #' @param bold path of the font file for "bold" font face. 229 | #' If it is \code{NULL}, the function will use the value of 230 | #' argument \code{regular}. 231 | #' @param italic,bolditalic,symbol ditto 232 | #' 233 | #' @return A character vector (invisible) of currently available 234 | #' font family names. 235 | #' 236 | #' @details In R graphics device, there are two parameters combined together 237 | #' to select a font to show text. \code{par("family")} is a character 238 | #' string giving a name to a \strong{series} of font faces. Here 239 | #' \strong{series} implies that there may be different fonts with the 240 | #' same family name, and actually they are distinguished by the parameter 241 | #' \code{par("font")}, indicating whether it is regular, bold, or italic, 242 | #' etc. In R, \code{par("font")} is an integer from 1 to 5 representing 243 | #' regular, bold, italic, bold italic, and symbol, respectively. 244 | #' 245 | #' In \pkg{sysfonts} package, there are three default font families, sans, serif, and mono, 246 | #' each with five font faces as mentioned above. If one wants 247 | #' to use other font families, the function \code{font_add()} needs to be called 248 | #' to register new fonts. Note that the \code{family} argument in this function can be 249 | #' an arbitrary string that does not need to be the real font name. The specified 250 | #' family name will be used in functions like \code{par(family = "myfont")} 251 | #' and \code{text("Some text", family = "myfont")}. The \strong{Examples} section 252 | #' shows a complete demonstration of the usage. 253 | #' 254 | #' To find the font file of argument \code{regular} (and the same for 255 | #' other font faces), this function will first check the existence 256 | #' of the specified path. If not found, file will be searched in the 257 | #' directories returned by \code{\link{font_paths}()} in turn. If the 258 | #' file cannot be found in any of the locations, 259 | #' an error will be issued. 260 | #' 261 | #' @seealso See \code{\link[graphics]{par}()} for explanation of 262 | #' the parameters \code{family} and \code{font}. 263 | #' 264 | #' @export 265 | #' 266 | #' @author Yixuan Qiu <\url{https://statr.me/}> 267 | #' 268 | #' @examples \dontrun{ 269 | #' ## Example: download the font file of WenQuanYi Micro Hei, 270 | #' ## add it to SWF device, and use it to draw text in swf(). 271 | #' ## WenQuanYi Micro Hei is an open source and high quality 272 | #' ## Chinese (and CJKV) font. 273 | #' 274 | #' wd = setwd(tempdir()) 275 | #' ft.url = "http://sourceforge.net/projects/wqy/files/wqy-microhei" 276 | #' ft.url = paste(ft.url, "0.2.0-beta/wqy-microhei-0.2.0-beta.tar.gz", 277 | #' sep = "/") 278 | #' download.file(ft.url, basename(ft.url)) 279 | #' 280 | #' ## Extract and add the directory to search path 281 | #' untar(basename(ft.url), compressed = "gzip") 282 | #' font_paths("wqy-microhei") 283 | #' 284 | #' ## Register this font file and assign the family name "wqy" 285 | #' ## Other font faces will be the same with regular by default 286 | #' font_add("wqy", regular = "wqy-microhei.ttc") 287 | #' 288 | #' ## A more concise way to add font is to give the path directly, 289 | #' ## without calling font_paths() 290 | #' # font_add("wqy", "wqy-microhei/wqy-microhei.ttc") 291 | #' 292 | #' ## List available font families 293 | #' font_families() 294 | #' 295 | #' if(require(R2SWF)) 296 | #' { 297 | #' ## Now it shows that we can use the family "wqy" in swf() 298 | #' swf("testfont.swf") 299 | #' 300 | #' ## Select font family globally 301 | #' op = par(family = "serif", font.lab = 2) 302 | #' ## Inline selecting font 303 | #' plot(1, type = "n") 304 | #' text(1, 1, intToUtf8(c(20013, 25991)), family = "wqy", font = 1, cex = 2) 305 | #' 306 | #' dev.off() 307 | #' swf2html("testfont.swf") 308 | #' } 309 | #' 310 | #' setwd(wd) 311 | #' 312 | #' } 313 | font_add = function(family, 314 | regular, 315 | bold = NULL, 316 | italic = NULL, 317 | bolditalic = NULL, 318 | symbol = NULL) 319 | { 320 | family = as.character(family)[1] 321 | 322 | # Shouldn't modify default fonts 323 | if((family %in% c("sans", "serif", "mono")) && 324 | (all(c("sans", "serif", "mono") %in% font_families()))) 325 | stop("default font families ('sans', 'serif', 'mono') cannot be modified") 326 | 327 | # The maximum length for font family name is 200 bytes 328 | if(nchar(family, type = "bytes") > 200) 329 | stop("family name is too long (max 200 bytes)") 330 | 331 | r = .Call("load_font", check_font_path(regular, "regular")) 332 | 333 | # If other font faces are not specified, use the regular one 334 | b = if(is.null(bold)) r 335 | else .Call(load_font, check_font_path(bold, "bold")) 336 | 337 | i = if(is.null(italic)) r 338 | else .Call(load_font, check_font_path(italic, "italic")) 339 | 340 | bi = if(is.null(bolditalic)) r 341 | else .Call(load_font, check_font_path(bolditalic, "bolditalic")) 342 | 343 | s = if(is.null(symbol)) r 344 | else .Call(load_font, check_font_path(symbol, "symbol")) 345 | 346 | lst = .pkg.env$.font.list 347 | new_family = list(regular = r, bold = b, italic = i, bolditalic = bi, symbol = s) 348 | lst[[family]] = new_family 349 | .pkg.env$.font.list = lst 350 | .pkg.env$.font.list.all = c(.pkg.env$.font.list.all, new_family) 351 | 352 | invisible(font_families()) 353 | } 354 | 355 | #' @rdname font_add 356 | #' @export 357 | font.add = function(family, 358 | regular, 359 | bold = NULL, 360 | italic = NULL, 361 | bolditalic = NULL, 362 | symbol = NULL) 363 | { 364 | deprecate_message_once("font.add()", "font_add()") 365 | font_add(family, regular, bold, italic, bolditalic, symbol) 366 | } 367 | 368 | # Use font_add() to add default fonts 369 | add_default_fonts = function() 370 | { 371 | # packageStartupMessage("Loading fonts...") 372 | 373 | default_fonts_path = function(family, face) 374 | { 375 | system.file("fonts", sprintf("Liberation%s-%s.ttf", family, face), 376 | package = "sysfonts") 377 | } 378 | 379 | sans.r = default_fonts_path("Sans", "Regular") 380 | sans.b = default_fonts_path("Sans", "Bold") 381 | sans.i = default_fonts_path("Sans", "Italic") 382 | sans.bi = default_fonts_path("Sans", "BoldItalic") 383 | 384 | serif.r = default_fonts_path("Serif", "Regular") 385 | serif.b = default_fonts_path("Serif", "Bold") 386 | serif.i = default_fonts_path("Serif", "Italic") 387 | serif.bi = default_fonts_path("Serif", "BoldItalic") 388 | 389 | mono.r = default_fonts_path("Mono", "Regular") 390 | mono.b = default_fonts_path("Mono", "Bold") 391 | mono.i = default_fonts_path("Mono", "Italic") 392 | mono.bi = default_fonts_path("Mono", "BoldItalic") 393 | 394 | font_add("sans", sans.r, sans.b, sans.i, sans.bi, NULL) 395 | font_add("serif", serif.r, serif.b, serif.i, serif.bi, NULL) 396 | font_add("mono", mono.r, mono.b, mono.i, mono.bi, NULL) 397 | 398 | # We do some "hacks" here. For default families(sans, serif, mono), 399 | # we want to set their symbol fonts to be serif-italic 400 | lst = .pkg.env$.font.list 401 | lst[["sans"]][["symbol"]] = lst[["serif"]][["italic"]] 402 | lst[["serif"]][["symbol"]] = lst[["serif"]][["italic"]] 403 | lst[["mono"]][["symbol"]] = lst[["serif"]][["italic"]] 404 | .pkg.env$.font.list = lst 405 | 406 | # packageStartupMessage("Loading fonts finished") 407 | 408 | invisible(NULL) 409 | } 410 | 411 | # Free memories when exiting 412 | clean_fonts = function() 413 | { 414 | lst = unique(unlist(.pkg.env$.font.list.all)) 415 | for(i in seq_along(lst)) 416 | { 417 | .Call(clean_font, lst[[i]]) 418 | } 419 | .pkg.env$.font.list = list() 420 | .pkg.env$.font.list.all = list() 421 | gc() 422 | invisible(NULL) 423 | } 424 | -------------------------------------------------------------------------------- /configure: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Guess values for system-dependent variables and create Makefiles. 3 | # Generated by GNU Autoconf 2.69 for sysfonts 0.8. 4 | # 5 | # Report bugs to . 6 | # 7 | # 8 | # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. 9 | # 10 | # 11 | # This configure script is free software; the Free Software Foundation 12 | # gives unlimited permission to copy, distribute and modify it. 13 | ## -------------------- ## 14 | ## M4sh Initialization. ## 15 | ## -------------------- ## 16 | 17 | # Be more Bourne compatible 18 | DUALCASE=1; export DUALCASE # for MKS sh 19 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 20 | emulate sh 21 | NULLCMD=: 22 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 23 | # is contrary to our usage. Disable this feature. 24 | alias -g '${1+"$@"}'='"$@"' 25 | setopt NO_GLOB_SUBST 26 | else 27 | case `(set -o) 2>/dev/null` in #( 28 | *posix*) : 29 | set -o posix ;; #( 30 | *) : 31 | ;; 32 | esac 33 | fi 34 | 35 | 36 | as_nl=' 37 | ' 38 | export as_nl 39 | # Printing a long string crashes Solaris 7 /usr/bin/printf. 40 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 41 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 42 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 43 | # Prefer a ksh shell builtin over an external printf program on Solaris, 44 | # but without wasting forks for bash or zsh. 45 | if test -z "$BASH_VERSION$ZSH_VERSION" \ 46 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 47 | as_echo='print -r --' 48 | as_echo_n='print -rn --' 49 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 50 | as_echo='printf %s\n' 51 | as_echo_n='printf %s' 52 | else 53 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 54 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 55 | as_echo_n='/usr/ucb/echo -n' 56 | else 57 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 58 | as_echo_n_body='eval 59 | arg=$1; 60 | case $arg in #( 61 | *"$as_nl"*) 62 | expr "X$arg" : "X\\(.*\\)$as_nl"; 63 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 64 | esac; 65 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 66 | ' 67 | export as_echo_n_body 68 | as_echo_n='sh -c $as_echo_n_body as_echo' 69 | fi 70 | export as_echo_body 71 | as_echo='sh -c $as_echo_body as_echo' 72 | fi 73 | 74 | # The user is always right. 75 | if test "${PATH_SEPARATOR+set}" != set; then 76 | PATH_SEPARATOR=: 77 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 78 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 79 | PATH_SEPARATOR=';' 80 | } 81 | fi 82 | 83 | 84 | # IFS 85 | # We need space, tab and new line, in precisely that order. Quoting is 86 | # there to prevent editors from complaining about space-tab. 87 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word 88 | # splitting by setting IFS to empty value.) 89 | IFS=" "" $as_nl" 90 | 91 | # Find who we are. Look in the path if we contain no directory separator. 92 | as_myself= 93 | case $0 in #(( 94 | *[\\/]* ) as_myself=$0 ;; 95 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 96 | for as_dir in $PATH 97 | do 98 | IFS=$as_save_IFS 99 | test -z "$as_dir" && as_dir=. 100 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 101 | done 102 | IFS=$as_save_IFS 103 | 104 | ;; 105 | esac 106 | # We did not find ourselves, most probably we were run as `sh COMMAND' 107 | # in which case we are not to be found in the path. 108 | if test "x$as_myself" = x; then 109 | as_myself=$0 110 | fi 111 | if test ! -f "$as_myself"; then 112 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 113 | exit 1 114 | fi 115 | 116 | # Unset variables that we do not need and which cause bugs (e.g. in 117 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 118 | # suppresses any "Segmentation fault" message there. '((' could 119 | # trigger a bug in pdksh 5.2.14. 120 | for as_var in BASH_ENV ENV MAIL MAILPATH 121 | do eval test x\${$as_var+set} = xset \ 122 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 123 | done 124 | PS1='$ ' 125 | PS2='> ' 126 | PS4='+ ' 127 | 128 | # NLS nuisances. 129 | LC_ALL=C 130 | export LC_ALL 131 | LANGUAGE=C 132 | export LANGUAGE 133 | 134 | # CDPATH. 135 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 136 | 137 | # Use a proper internal environment variable to ensure we don't fall 138 | # into an infinite loop, continuously re-executing ourselves. 139 | if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then 140 | _as_can_reexec=no; export _as_can_reexec; 141 | # We cannot yet assume a decent shell, so we have to provide a 142 | # neutralization value for shells without unset; and this also 143 | # works around shells that cannot unset nonexistent variables. 144 | # Preserve -v and -x to the replacement shell. 145 | BASH_ENV=/dev/null 146 | ENV=/dev/null 147 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 148 | case $- in # (((( 149 | *v*x* | *x*v* ) as_opts=-vx ;; 150 | *v* ) as_opts=-v ;; 151 | *x* ) as_opts=-x ;; 152 | * ) as_opts= ;; 153 | esac 154 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} 155 | # Admittedly, this is quite paranoid, since all the known shells bail 156 | # out after a failed `exec'. 157 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 158 | as_fn_exit 255 159 | fi 160 | # We don't want this to propagate to other subprocesses. 161 | { _as_can_reexec=; unset _as_can_reexec;} 162 | if test "x$CONFIG_SHELL" = x; then 163 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : 164 | emulate sh 165 | NULLCMD=: 166 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which 167 | # is contrary to our usage. Disable this feature. 168 | alias -g '\${1+\"\$@\"}'='\"\$@\"' 169 | setopt NO_GLOB_SUBST 170 | else 171 | case \`(set -o) 2>/dev/null\` in #( 172 | *posix*) : 173 | set -o posix ;; #( 174 | *) : 175 | ;; 176 | esac 177 | fi 178 | " 179 | as_required="as_fn_return () { (exit \$1); } 180 | as_fn_success () { as_fn_return 0; } 181 | as_fn_failure () { as_fn_return 1; } 182 | as_fn_ret_success () { return 0; } 183 | as_fn_ret_failure () { return 1; } 184 | 185 | exitcode=0 186 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } 187 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } 188 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } 189 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } 190 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : 191 | 192 | else 193 | exitcode=1; echo positional parameters were not saved. 194 | fi 195 | test x\$exitcode = x0 || exit 1 196 | test -x / || exit 1" 197 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO 198 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO 199 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && 200 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" 201 | if (eval "$as_required") 2>/dev/null; then : 202 | as_have_required=yes 203 | else 204 | as_have_required=no 205 | fi 206 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : 207 | 208 | else 209 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 210 | as_found=false 211 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 212 | do 213 | IFS=$as_save_IFS 214 | test -z "$as_dir" && as_dir=. 215 | as_found=: 216 | case $as_dir in #( 217 | /*) 218 | for as_base in sh bash ksh sh5; do 219 | # Try only shells that exist, to save several forks. 220 | as_shell=$as_dir/$as_base 221 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && 222 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : 223 | CONFIG_SHELL=$as_shell as_have_required=yes 224 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : 225 | break 2 226 | fi 227 | fi 228 | done;; 229 | esac 230 | as_found=false 231 | done 232 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && 233 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : 234 | CONFIG_SHELL=$SHELL as_have_required=yes 235 | fi; } 236 | IFS=$as_save_IFS 237 | 238 | 239 | if test "x$CONFIG_SHELL" != x; then : 240 | export CONFIG_SHELL 241 | # We cannot yet assume a decent shell, so we have to provide a 242 | # neutralization value for shells without unset; and this also 243 | # works around shells that cannot unset nonexistent variables. 244 | # Preserve -v and -x to the replacement shell. 245 | BASH_ENV=/dev/null 246 | ENV=/dev/null 247 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 248 | case $- in # (((( 249 | *v*x* | *x*v* ) as_opts=-vx ;; 250 | *v* ) as_opts=-v ;; 251 | *x* ) as_opts=-x ;; 252 | * ) as_opts= ;; 253 | esac 254 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} 255 | # Admittedly, this is quite paranoid, since all the known shells bail 256 | # out after a failed `exec'. 257 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 258 | exit 255 259 | fi 260 | 261 | if test x$as_have_required = xno; then : 262 | $as_echo "$0: This script requires a shell more modern than all" 263 | $as_echo "$0: the shells that I found on your system." 264 | if test x${ZSH_VERSION+set} = xset ; then 265 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" 266 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." 267 | else 268 | $as_echo "$0: Please tell bug-autoconf@gnu.org and 269 | $0: yixuan.qiu@cos.name about your system, including any 270 | $0: error possibly output before this message. Then install 271 | $0: a modern shell, or manually run the script under such a 272 | $0: shell if you do have one." 273 | fi 274 | exit 1 275 | fi 276 | fi 277 | fi 278 | SHELL=${CONFIG_SHELL-/bin/sh} 279 | export SHELL 280 | # Unset more variables known to interfere with behavior of common tools. 281 | CLICOLOR_FORCE= GREP_OPTIONS= 282 | unset CLICOLOR_FORCE GREP_OPTIONS 283 | 284 | ## --------------------- ## 285 | ## M4sh Shell Functions. ## 286 | ## --------------------- ## 287 | # as_fn_unset VAR 288 | # --------------- 289 | # Portably unset VAR. 290 | as_fn_unset () 291 | { 292 | { eval $1=; unset $1;} 293 | } 294 | as_unset=as_fn_unset 295 | 296 | # as_fn_set_status STATUS 297 | # ----------------------- 298 | # Set $? to STATUS, without forking. 299 | as_fn_set_status () 300 | { 301 | return $1 302 | } # as_fn_set_status 303 | 304 | # as_fn_exit STATUS 305 | # ----------------- 306 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 307 | as_fn_exit () 308 | { 309 | set +e 310 | as_fn_set_status $1 311 | exit $1 312 | } # as_fn_exit 313 | 314 | # as_fn_mkdir_p 315 | # ------------- 316 | # Create "$as_dir" as a directory, including parents if necessary. 317 | as_fn_mkdir_p () 318 | { 319 | 320 | case $as_dir in #( 321 | -*) as_dir=./$as_dir;; 322 | esac 323 | test -d "$as_dir" || eval $as_mkdir_p || { 324 | as_dirs= 325 | while :; do 326 | case $as_dir in #( 327 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 328 | *) as_qdir=$as_dir;; 329 | esac 330 | as_dirs="'$as_qdir' $as_dirs" 331 | as_dir=`$as_dirname -- "$as_dir" || 332 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 333 | X"$as_dir" : 'X\(//\)[^/]' \| \ 334 | X"$as_dir" : 'X\(//\)$' \| \ 335 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 336 | $as_echo X"$as_dir" | 337 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 338 | s//\1/ 339 | q 340 | } 341 | /^X\(\/\/\)[^/].*/{ 342 | s//\1/ 343 | q 344 | } 345 | /^X\(\/\/\)$/{ 346 | s//\1/ 347 | q 348 | } 349 | /^X\(\/\).*/{ 350 | s//\1/ 351 | q 352 | } 353 | s/.*/./; q'` 354 | test -d "$as_dir" && break 355 | done 356 | test -z "$as_dirs" || eval "mkdir $as_dirs" 357 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 358 | 359 | 360 | } # as_fn_mkdir_p 361 | 362 | # as_fn_executable_p FILE 363 | # ----------------------- 364 | # Test if FILE is an executable regular file. 365 | as_fn_executable_p () 366 | { 367 | test -f "$1" && test -x "$1" 368 | } # as_fn_executable_p 369 | # as_fn_append VAR VALUE 370 | # ---------------------- 371 | # Append the text in VALUE to the end of the definition contained in VAR. Take 372 | # advantage of any shell optimizations that allow amortized linear growth over 373 | # repeated appends, instead of the typical quadratic growth present in naive 374 | # implementations. 375 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 376 | eval 'as_fn_append () 377 | { 378 | eval $1+=\$2 379 | }' 380 | else 381 | as_fn_append () 382 | { 383 | eval $1=\$$1\$2 384 | } 385 | fi # as_fn_append 386 | 387 | # as_fn_arith ARG... 388 | # ------------------ 389 | # Perform arithmetic evaluation on the ARGs, and store the result in the 390 | # global $as_val. Take advantage of shells that can avoid forks. The arguments 391 | # must be portable across $(()) and expr. 392 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 393 | eval 'as_fn_arith () 394 | { 395 | as_val=$(( $* )) 396 | }' 397 | else 398 | as_fn_arith () 399 | { 400 | as_val=`expr "$@" || test $? -eq 1` 401 | } 402 | fi # as_fn_arith 403 | 404 | 405 | # as_fn_error STATUS ERROR [LINENO LOG_FD] 406 | # ---------------------------------------- 407 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 408 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the 409 | # script with STATUS, using 1 if that was 0. 410 | as_fn_error () 411 | { 412 | as_status=$1; test $as_status -eq 0 && as_status=1 413 | if test "$4"; then 414 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 415 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 416 | fi 417 | $as_echo "$as_me: error: $2" >&2 418 | as_fn_exit $as_status 419 | } # as_fn_error 420 | 421 | if expr a : '\(a\)' >/dev/null 2>&1 && 422 | test "X`expr 00001 : '.*\(...\)'`" = X001; then 423 | as_expr=expr 424 | else 425 | as_expr=false 426 | fi 427 | 428 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 429 | as_basename=basename 430 | else 431 | as_basename=false 432 | fi 433 | 434 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 435 | as_dirname=dirname 436 | else 437 | as_dirname=false 438 | fi 439 | 440 | as_me=`$as_basename -- "$0" || 441 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 442 | X"$0" : 'X\(//\)$' \| \ 443 | X"$0" : 'X\(/\)' \| . 2>/dev/null || 444 | $as_echo X/"$0" | 445 | sed '/^.*\/\([^/][^/]*\)\/*$/{ 446 | s//\1/ 447 | q 448 | } 449 | /^X\/\(\/\/\)$/{ 450 | s//\1/ 451 | q 452 | } 453 | /^X\/\(\/\).*/{ 454 | s//\1/ 455 | q 456 | } 457 | s/.*/./; q'` 458 | 459 | # Avoid depending upon Character Ranges. 460 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' 461 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 462 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS 463 | as_cr_digits='0123456789' 464 | as_cr_alnum=$as_cr_Letters$as_cr_digits 465 | 466 | 467 | as_lineno_1=$LINENO as_lineno_1a=$LINENO 468 | as_lineno_2=$LINENO as_lineno_2a=$LINENO 469 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && 470 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { 471 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) 472 | sed -n ' 473 | p 474 | /[$]LINENO/= 475 | ' <$as_myself | 476 | sed ' 477 | s/[$]LINENO.*/&-/ 478 | t lineno 479 | b 480 | :lineno 481 | N 482 | :loop 483 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ 484 | t loop 485 | s/-\n.*// 486 | ' >$as_me.lineno && 487 | chmod +x "$as_me.lineno" || 488 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } 489 | 490 | # If we had to re-execute with $CONFIG_SHELL, we're ensured to have 491 | # already done that, so ensure we don't try to do so again and fall 492 | # in an infinite loop. This has already happened in practice. 493 | _as_can_reexec=no; export _as_can_reexec 494 | # Don't try to exec as it changes $[0], causing all sort of problems 495 | # (the dirname of $[0] is not the place where we might find the 496 | # original and so on. Autoconf is especially sensitive to this). 497 | . "./$as_me.lineno" 498 | # Exit status is that of the last command. 499 | exit 500 | } 501 | 502 | ECHO_C= ECHO_N= ECHO_T= 503 | case `echo -n x` in #((((( 504 | -n*) 505 | case `echo 'xy\c'` in 506 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. 507 | xy) ECHO_C='\c';; 508 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 509 | ECHO_T=' ';; 510 | esac;; 511 | *) 512 | ECHO_N='-n';; 513 | esac 514 | 515 | rm -f conf$$ conf$$.exe conf$$.file 516 | if test -d conf$$.dir; then 517 | rm -f conf$$.dir/conf$$.file 518 | else 519 | rm -f conf$$.dir 520 | mkdir conf$$.dir 2>/dev/null 521 | fi 522 | if (echo >conf$$.file) 2>/dev/null; then 523 | if ln -s conf$$.file conf$$ 2>/dev/null; then 524 | as_ln_s='ln -s' 525 | # ... but there are two gotchas: 526 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 527 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 528 | # In both cases, we have to default to `cp -pR'. 529 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 530 | as_ln_s='cp -pR' 531 | elif ln conf$$.file conf$$ 2>/dev/null; then 532 | as_ln_s=ln 533 | else 534 | as_ln_s='cp -pR' 535 | fi 536 | else 537 | as_ln_s='cp -pR' 538 | fi 539 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 540 | rmdir conf$$.dir 2>/dev/null 541 | 542 | if mkdir -p . 2>/dev/null; then 543 | as_mkdir_p='mkdir -p "$as_dir"' 544 | else 545 | test -d ./-p && rmdir ./-p 546 | as_mkdir_p=false 547 | fi 548 | 549 | as_test_x='test -x' 550 | as_executable_p=as_fn_executable_p 551 | 552 | # Sed expression to map a string onto a valid CPP name. 553 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 554 | 555 | # Sed expression to map a string onto a valid variable name. 556 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 557 | 558 | 559 | test -n "$DJDIR" || exec 7<&0 &1 561 | 562 | # Name of the host. 563 | # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, 564 | # so uname gets run too. 565 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` 566 | 567 | # 568 | # Initializations. 569 | # 570 | ac_default_prefix=/usr/local 571 | ac_clean_files= 572 | ac_config_libobj_dir=. 573 | LIBOBJS= 574 | cross_compiling=no 575 | subdirs= 576 | MFLAGS= 577 | MAKEFLAGS= 578 | 579 | # Identity of this package. 580 | PACKAGE_NAME='sysfonts' 581 | PACKAGE_TARNAME='sysfonts' 582 | PACKAGE_VERSION='0.8' 583 | PACKAGE_STRING='sysfonts 0.8' 584 | PACKAGE_BUGREPORT='yixuan.qiu@cos.name' 585 | PACKAGE_URL='' 586 | 587 | ac_subst_vars='LTLIBOBJS 588 | LIBOBJS 589 | SYSFONTS_LIBS 590 | SYSFONTS_CPPFLAGS 591 | HAVE_FREETYPE_CONFIG 592 | PKGCONF 593 | OBJEXT 594 | EXEEXT 595 | ac_ct_CC 596 | CPPFLAGS 597 | LDFLAGS 598 | CFLAGS 599 | CC 600 | target_alias 601 | host_alias 602 | build_alias 603 | LIBS 604 | ECHO_T 605 | ECHO_N 606 | ECHO_C 607 | DEFS 608 | mandir 609 | localedir 610 | libdir 611 | psdir 612 | pdfdir 613 | dvidir 614 | htmldir 615 | infodir 616 | docdir 617 | oldincludedir 618 | includedir 619 | localstatedir 620 | sharedstatedir 621 | sysconfdir 622 | datadir 623 | datarootdir 624 | libexecdir 625 | sbindir 626 | bindir 627 | program_transform_name 628 | prefix 629 | exec_prefix 630 | PACKAGE_URL 631 | PACKAGE_BUGREPORT 632 | PACKAGE_STRING 633 | PACKAGE_VERSION 634 | PACKAGE_TARNAME 635 | PACKAGE_NAME 636 | PATH_SEPARATOR 637 | SHELL' 638 | ac_subst_files='' 639 | ac_user_opts=' 640 | enable_option_checking 641 | ' 642 | ac_precious_vars='build_alias 643 | host_alias 644 | target_alias 645 | CC 646 | CFLAGS 647 | LDFLAGS 648 | LIBS 649 | CPPFLAGS' 650 | 651 | 652 | # Initialize some variables set by options. 653 | ac_init_help= 654 | ac_init_version=false 655 | ac_unrecognized_opts= 656 | ac_unrecognized_sep= 657 | # The variables have the same names as the options, with 658 | # dashes changed to underlines. 659 | cache_file=/dev/null 660 | exec_prefix=NONE 661 | no_create= 662 | no_recursion= 663 | prefix=NONE 664 | program_prefix=NONE 665 | program_suffix=NONE 666 | program_transform_name=s,x,x, 667 | silent= 668 | site= 669 | srcdir= 670 | verbose= 671 | x_includes=NONE 672 | x_libraries=NONE 673 | 674 | # Installation directory options. 675 | # These are left unexpanded so users can "make install exec_prefix=/foo" 676 | # and all the variables that are supposed to be based on exec_prefix 677 | # by default will actually change. 678 | # Use braces instead of parens because sh, perl, etc. also accept them. 679 | # (The list follows the same order as the GNU Coding Standards.) 680 | bindir='${exec_prefix}/bin' 681 | sbindir='${exec_prefix}/sbin' 682 | libexecdir='${exec_prefix}/libexec' 683 | datarootdir='${prefix}/share' 684 | datadir='${datarootdir}' 685 | sysconfdir='${prefix}/etc' 686 | sharedstatedir='${prefix}/com' 687 | localstatedir='${prefix}/var' 688 | includedir='${prefix}/include' 689 | oldincludedir='/usr/include' 690 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' 691 | infodir='${datarootdir}/info' 692 | htmldir='${docdir}' 693 | dvidir='${docdir}' 694 | pdfdir='${docdir}' 695 | psdir='${docdir}' 696 | libdir='${exec_prefix}/lib' 697 | localedir='${datarootdir}/locale' 698 | mandir='${datarootdir}/man' 699 | 700 | ac_prev= 701 | ac_dashdash= 702 | for ac_option 703 | do 704 | # If the previous option needs an argument, assign it. 705 | if test -n "$ac_prev"; then 706 | eval $ac_prev=\$ac_option 707 | ac_prev= 708 | continue 709 | fi 710 | 711 | case $ac_option in 712 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; 713 | *=) ac_optarg= ;; 714 | *) ac_optarg=yes ;; 715 | esac 716 | 717 | # Accept the important Cygnus configure options, so we can diagnose typos. 718 | 719 | case $ac_dashdash$ac_option in 720 | --) 721 | ac_dashdash=yes ;; 722 | 723 | -bindir | --bindir | --bindi | --bind | --bin | --bi) 724 | ac_prev=bindir ;; 725 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) 726 | bindir=$ac_optarg ;; 727 | 728 | -build | --build | --buil | --bui | --bu) 729 | ac_prev=build_alias ;; 730 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) 731 | build_alias=$ac_optarg ;; 732 | 733 | -cache-file | --cache-file | --cache-fil | --cache-fi \ 734 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 735 | ac_prev=cache_file ;; 736 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 737 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) 738 | cache_file=$ac_optarg ;; 739 | 740 | --config-cache | -C) 741 | cache_file=config.cache ;; 742 | 743 | -datadir | --datadir | --datadi | --datad) 744 | ac_prev=datadir ;; 745 | -datadir=* | --datadir=* | --datadi=* | --datad=*) 746 | datadir=$ac_optarg ;; 747 | 748 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ 749 | | --dataroo | --dataro | --datar) 750 | ac_prev=datarootdir ;; 751 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ 752 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) 753 | datarootdir=$ac_optarg ;; 754 | 755 | -disable-* | --disable-*) 756 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` 757 | # Reject names that are not valid shell variable names. 758 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 759 | as_fn_error $? "invalid feature name: $ac_useropt" 760 | ac_useropt_orig=$ac_useropt 761 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 762 | case $ac_user_opts in 763 | *" 764 | "enable_$ac_useropt" 765 | "*) ;; 766 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" 767 | ac_unrecognized_sep=', ';; 768 | esac 769 | eval enable_$ac_useropt=no ;; 770 | 771 | -docdir | --docdir | --docdi | --doc | --do) 772 | ac_prev=docdir ;; 773 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) 774 | docdir=$ac_optarg ;; 775 | 776 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) 777 | ac_prev=dvidir ;; 778 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) 779 | dvidir=$ac_optarg ;; 780 | 781 | -enable-* | --enable-*) 782 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` 783 | # Reject names that are not valid shell variable names. 784 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 785 | as_fn_error $? "invalid feature name: $ac_useropt" 786 | ac_useropt_orig=$ac_useropt 787 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 788 | case $ac_user_opts in 789 | *" 790 | "enable_$ac_useropt" 791 | "*) ;; 792 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" 793 | ac_unrecognized_sep=', ';; 794 | esac 795 | eval enable_$ac_useropt=\$ac_optarg ;; 796 | 797 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 798 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 799 | | --exec | --exe | --ex) 800 | ac_prev=exec_prefix ;; 801 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ 802 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ 803 | | --exec=* | --exe=* | --ex=*) 804 | exec_prefix=$ac_optarg ;; 805 | 806 | -gas | --gas | --ga | --g) 807 | # Obsolete; use --with-gas. 808 | with_gas=yes ;; 809 | 810 | -help | --help | --hel | --he | -h) 811 | ac_init_help=long ;; 812 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) 813 | ac_init_help=recursive ;; 814 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) 815 | ac_init_help=short ;; 816 | 817 | -host | --host | --hos | --ho) 818 | ac_prev=host_alias ;; 819 | -host=* | --host=* | --hos=* | --ho=*) 820 | host_alias=$ac_optarg ;; 821 | 822 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) 823 | ac_prev=htmldir ;; 824 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ 825 | | --ht=*) 826 | htmldir=$ac_optarg ;; 827 | 828 | -includedir | --includedir | --includedi | --included | --include \ 829 | | --includ | --inclu | --incl | --inc) 830 | ac_prev=includedir ;; 831 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ 832 | | --includ=* | --inclu=* | --incl=* | --inc=*) 833 | includedir=$ac_optarg ;; 834 | 835 | -infodir | --infodir | --infodi | --infod | --info | --inf) 836 | ac_prev=infodir ;; 837 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) 838 | infodir=$ac_optarg ;; 839 | 840 | -libdir | --libdir | --libdi | --libd) 841 | ac_prev=libdir ;; 842 | -libdir=* | --libdir=* | --libdi=* | --libd=*) 843 | libdir=$ac_optarg ;; 844 | 845 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ 846 | | --libexe | --libex | --libe) 847 | ac_prev=libexecdir ;; 848 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ 849 | | --libexe=* | --libex=* | --libe=*) 850 | libexecdir=$ac_optarg ;; 851 | 852 | -localedir | --localedir | --localedi | --localed | --locale) 853 | ac_prev=localedir ;; 854 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) 855 | localedir=$ac_optarg ;; 856 | 857 | -localstatedir | --localstatedir | --localstatedi | --localstated \ 858 | | --localstate | --localstat | --localsta | --localst | --locals) 859 | ac_prev=localstatedir ;; 860 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 861 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 862 | localstatedir=$ac_optarg ;; 863 | 864 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 865 | ac_prev=mandir ;; 866 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) 867 | mandir=$ac_optarg ;; 868 | 869 | -nfp | --nfp | --nf) 870 | # Obsolete; use --without-fp. 871 | with_fp=no ;; 872 | 873 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 874 | | --no-cr | --no-c | -n) 875 | no_create=yes ;; 876 | 877 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 878 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) 879 | no_recursion=yes ;; 880 | 881 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ 882 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ 883 | | --oldin | --oldi | --old | --ol | --o) 884 | ac_prev=oldincludedir ;; 885 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ 886 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ 887 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) 888 | oldincludedir=$ac_optarg ;; 889 | 890 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 891 | ac_prev=prefix ;; 892 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 893 | prefix=$ac_optarg ;; 894 | 895 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ 896 | | --program-pre | --program-pr | --program-p) 897 | ac_prev=program_prefix ;; 898 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ 899 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) 900 | program_prefix=$ac_optarg ;; 901 | 902 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ 903 | | --program-suf | --program-su | --program-s) 904 | ac_prev=program_suffix ;; 905 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ 906 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) 907 | program_suffix=$ac_optarg ;; 908 | 909 | -program-transform-name | --program-transform-name \ 910 | | --program-transform-nam | --program-transform-na \ 911 | | --program-transform-n | --program-transform- \ 912 | | --program-transform | --program-transfor \ 913 | | --program-transfo | --program-transf \ 914 | | --program-trans | --program-tran \ 915 | | --progr-tra | --program-tr | --program-t) 916 | ac_prev=program_transform_name ;; 917 | -program-transform-name=* | --program-transform-name=* \ 918 | | --program-transform-nam=* | --program-transform-na=* \ 919 | | --program-transform-n=* | --program-transform-=* \ 920 | | --program-transform=* | --program-transfor=* \ 921 | | --program-transfo=* | --program-transf=* \ 922 | | --program-trans=* | --program-tran=* \ 923 | | --progr-tra=* | --program-tr=* | --program-t=*) 924 | program_transform_name=$ac_optarg ;; 925 | 926 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) 927 | ac_prev=pdfdir ;; 928 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) 929 | pdfdir=$ac_optarg ;; 930 | 931 | -psdir | --psdir | --psdi | --psd | --ps) 932 | ac_prev=psdir ;; 933 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) 934 | psdir=$ac_optarg ;; 935 | 936 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 937 | | -silent | --silent | --silen | --sile | --sil) 938 | silent=yes ;; 939 | 940 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 941 | ac_prev=sbindir ;; 942 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 943 | | --sbi=* | --sb=*) 944 | sbindir=$ac_optarg ;; 945 | 946 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ 947 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ 948 | | --sharedst | --shareds | --shared | --share | --shar \ 949 | | --sha | --sh) 950 | ac_prev=sharedstatedir ;; 951 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ 952 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ 953 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ 954 | | --sha=* | --sh=*) 955 | sharedstatedir=$ac_optarg ;; 956 | 957 | -site | --site | --sit) 958 | ac_prev=site ;; 959 | -site=* | --site=* | --sit=*) 960 | site=$ac_optarg ;; 961 | 962 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 963 | ac_prev=srcdir ;; 964 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 965 | srcdir=$ac_optarg ;; 966 | 967 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ 968 | | --syscon | --sysco | --sysc | --sys | --sy) 969 | ac_prev=sysconfdir ;; 970 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ 971 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) 972 | sysconfdir=$ac_optarg ;; 973 | 974 | -target | --target | --targe | --targ | --tar | --ta | --t) 975 | ac_prev=target_alias ;; 976 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) 977 | target_alias=$ac_optarg ;; 978 | 979 | -v | -verbose | --verbose | --verbos | --verbo | --verb) 980 | verbose=yes ;; 981 | 982 | -version | --version | --versio | --versi | --vers | -V) 983 | ac_init_version=: ;; 984 | 985 | -with-* | --with-*) 986 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` 987 | # Reject names that are not valid shell variable names. 988 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 989 | as_fn_error $? "invalid package name: $ac_useropt" 990 | ac_useropt_orig=$ac_useropt 991 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 992 | case $ac_user_opts in 993 | *" 994 | "with_$ac_useropt" 995 | "*) ;; 996 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" 997 | ac_unrecognized_sep=', ';; 998 | esac 999 | eval with_$ac_useropt=\$ac_optarg ;; 1000 | 1001 | -without-* | --without-*) 1002 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` 1003 | # Reject names that are not valid shell variable names. 1004 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1005 | as_fn_error $? "invalid package name: $ac_useropt" 1006 | ac_useropt_orig=$ac_useropt 1007 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1008 | case $ac_user_opts in 1009 | *" 1010 | "with_$ac_useropt" 1011 | "*) ;; 1012 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" 1013 | ac_unrecognized_sep=', ';; 1014 | esac 1015 | eval with_$ac_useropt=no ;; 1016 | 1017 | --x) 1018 | # Obsolete; use --with-x. 1019 | with_x=yes ;; 1020 | 1021 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ 1022 | | --x-incl | --x-inc | --x-in | --x-i) 1023 | ac_prev=x_includes ;; 1024 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ 1025 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) 1026 | x_includes=$ac_optarg ;; 1027 | 1028 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ 1029 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) 1030 | ac_prev=x_libraries ;; 1031 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ 1032 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 1033 | x_libraries=$ac_optarg ;; 1034 | 1035 | -*) as_fn_error $? "unrecognized option: \`$ac_option' 1036 | Try \`$0 --help' for more information" 1037 | ;; 1038 | 1039 | *=*) 1040 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` 1041 | # Reject names that are not valid shell variable names. 1042 | case $ac_envvar in #( 1043 | '' | [0-9]* | *[!_$as_cr_alnum]* ) 1044 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; 1045 | esac 1046 | eval $ac_envvar=\$ac_optarg 1047 | export $ac_envvar ;; 1048 | 1049 | *) 1050 | # FIXME: should be removed in autoconf 3.0. 1051 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 1052 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 1053 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 1054 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" 1055 | ;; 1056 | 1057 | esac 1058 | done 1059 | 1060 | if test -n "$ac_prev"; then 1061 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` 1062 | as_fn_error $? "missing argument to $ac_option" 1063 | fi 1064 | 1065 | if test -n "$ac_unrecognized_opts"; then 1066 | case $enable_option_checking in 1067 | no) ;; 1068 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; 1069 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; 1070 | esac 1071 | fi 1072 | 1073 | # Check all directory arguments for consistency. 1074 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ 1075 | datadir sysconfdir sharedstatedir localstatedir includedir \ 1076 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 1077 | libdir localedir mandir 1078 | do 1079 | eval ac_val=\$$ac_var 1080 | # Remove trailing slashes. 1081 | case $ac_val in 1082 | */ ) 1083 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` 1084 | eval $ac_var=\$ac_val;; 1085 | esac 1086 | # Be sure to have absolute directory names. 1087 | case $ac_val in 1088 | [\\/$]* | ?:[\\/]* ) continue;; 1089 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; 1090 | esac 1091 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 1092 | done 1093 | 1094 | # There might be people who depend on the old broken behavior: `$host' 1095 | # used to hold the argument of --host etc. 1096 | # FIXME: To remove some day. 1097 | build=$build_alias 1098 | host=$host_alias 1099 | target=$target_alias 1100 | 1101 | # FIXME: To remove some day. 1102 | if test "x$host_alias" != x; then 1103 | if test "x$build_alias" = x; then 1104 | cross_compiling=maybe 1105 | elif test "x$build_alias" != "x$host_alias"; then 1106 | cross_compiling=yes 1107 | fi 1108 | fi 1109 | 1110 | ac_tool_prefix= 1111 | test -n "$host_alias" && ac_tool_prefix=$host_alias- 1112 | 1113 | test "$silent" = yes && exec 6>/dev/null 1114 | 1115 | 1116 | ac_pwd=`pwd` && test -n "$ac_pwd" && 1117 | ac_ls_di=`ls -di .` && 1118 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || 1119 | as_fn_error $? "working directory cannot be determined" 1120 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || 1121 | as_fn_error $? "pwd does not report name of working directory" 1122 | 1123 | 1124 | # Find the source files, if location was not specified. 1125 | if test -z "$srcdir"; then 1126 | ac_srcdir_defaulted=yes 1127 | # Try the directory containing this script, then the parent directory. 1128 | ac_confdir=`$as_dirname -- "$as_myself" || 1129 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 1130 | X"$as_myself" : 'X\(//\)[^/]' \| \ 1131 | X"$as_myself" : 'X\(//\)$' \| \ 1132 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || 1133 | $as_echo X"$as_myself" | 1134 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 1135 | s//\1/ 1136 | q 1137 | } 1138 | /^X\(\/\/\)[^/].*/{ 1139 | s//\1/ 1140 | q 1141 | } 1142 | /^X\(\/\/\)$/{ 1143 | s//\1/ 1144 | q 1145 | } 1146 | /^X\(\/\).*/{ 1147 | s//\1/ 1148 | q 1149 | } 1150 | s/.*/./; q'` 1151 | srcdir=$ac_confdir 1152 | if test ! -r "$srcdir/$ac_unique_file"; then 1153 | srcdir=.. 1154 | fi 1155 | else 1156 | ac_srcdir_defaulted=no 1157 | fi 1158 | if test ! -r "$srcdir/$ac_unique_file"; then 1159 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 1160 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" 1161 | fi 1162 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" 1163 | ac_abs_confdir=`( 1164 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" 1165 | pwd)` 1166 | # When building in place, set srcdir=. 1167 | if test "$ac_abs_confdir" = "$ac_pwd"; then 1168 | srcdir=. 1169 | fi 1170 | # Remove unnecessary trailing slashes from srcdir. 1171 | # Double slashes in file names in object file debugging info 1172 | # mess up M-x gdb in Emacs. 1173 | case $srcdir in 1174 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; 1175 | esac 1176 | for ac_var in $ac_precious_vars; do 1177 | eval ac_env_${ac_var}_set=\${${ac_var}+set} 1178 | eval ac_env_${ac_var}_value=\$${ac_var} 1179 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} 1180 | eval ac_cv_env_${ac_var}_value=\$${ac_var} 1181 | done 1182 | 1183 | # 1184 | # Report the --help message. 1185 | # 1186 | if test "$ac_init_help" = "long"; then 1187 | # Omit some internal or obsolete options to make the list less imposing. 1188 | # This message is too long to be a string in the A/UX 3.1 sh. 1189 | cat <<_ACEOF 1190 | \`configure' configures sysfonts 0.8 to adapt to many kinds of systems. 1191 | 1192 | Usage: $0 [OPTION]... [VAR=VALUE]... 1193 | 1194 | To assign environment variables (e.g., CC, CFLAGS...), specify them as 1195 | VAR=VALUE. See below for descriptions of some of the useful variables. 1196 | 1197 | Defaults for the options are specified in brackets. 1198 | 1199 | Configuration: 1200 | -h, --help display this help and exit 1201 | --help=short display options specific to this package 1202 | --help=recursive display the short help of all the included packages 1203 | -V, --version display version information and exit 1204 | -q, --quiet, --silent do not print \`checking ...' messages 1205 | --cache-file=FILE cache test results in FILE [disabled] 1206 | -C, --config-cache alias for \`--cache-file=config.cache' 1207 | -n, --no-create do not create output files 1208 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] 1209 | 1210 | Installation directories: 1211 | --prefix=PREFIX install architecture-independent files in PREFIX 1212 | [$ac_default_prefix] 1213 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 1214 | [PREFIX] 1215 | 1216 | By default, \`make install' will install all the files in 1217 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify 1218 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', 1219 | for instance \`--prefix=\$HOME'. 1220 | 1221 | For better control, use the options below. 1222 | 1223 | Fine tuning of the installation directories: 1224 | --bindir=DIR user executables [EPREFIX/bin] 1225 | --sbindir=DIR system admin executables [EPREFIX/sbin] 1226 | --libexecdir=DIR program executables [EPREFIX/libexec] 1227 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 1228 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 1229 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] 1230 | --libdir=DIR object code libraries [EPREFIX/lib] 1231 | --includedir=DIR C header files [PREFIX/include] 1232 | --oldincludedir=DIR C header files for non-gcc [/usr/include] 1233 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] 1234 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 1235 | --infodir=DIR info documentation [DATAROOTDIR/info] 1236 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 1237 | --mandir=DIR man documentation [DATAROOTDIR/man] 1238 | --docdir=DIR documentation root [DATAROOTDIR/doc/sysfonts] 1239 | --htmldir=DIR html documentation [DOCDIR] 1240 | --dvidir=DIR dvi documentation [DOCDIR] 1241 | --pdfdir=DIR pdf documentation [DOCDIR] 1242 | --psdir=DIR ps documentation [DOCDIR] 1243 | _ACEOF 1244 | 1245 | cat <<\_ACEOF 1246 | _ACEOF 1247 | fi 1248 | 1249 | if test -n "$ac_init_help"; then 1250 | case $ac_init_help in 1251 | short | recursive ) echo "Configuration of sysfonts 0.8:";; 1252 | esac 1253 | cat <<\_ACEOF 1254 | 1255 | Some influential environment variables: 1256 | CC C compiler command 1257 | CFLAGS C compiler flags 1258 | LDFLAGS linker flags, e.g. -L if you have libraries in a 1259 | nonstandard directory 1260 | LIBS libraries to pass to the linker, e.g. -l 1261 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if 1262 | you have headers in a nonstandard directory 1263 | 1264 | Use these variables to override the choices made by `configure' or to help 1265 | it to find libraries and programs with nonstandard names/locations. 1266 | 1267 | Report bugs to . 1268 | _ACEOF 1269 | ac_status=$? 1270 | fi 1271 | 1272 | if test "$ac_init_help" = "recursive"; then 1273 | # If there are subdirs, report their specific --help. 1274 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue 1275 | test -d "$ac_dir" || 1276 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || 1277 | continue 1278 | ac_builddir=. 1279 | 1280 | case "$ac_dir" in 1281 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 1282 | *) 1283 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 1284 | # A ".." for each directory in $ac_dir_suffix. 1285 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 1286 | case $ac_top_builddir_sub in 1287 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 1288 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 1289 | esac ;; 1290 | esac 1291 | ac_abs_top_builddir=$ac_pwd 1292 | ac_abs_builddir=$ac_pwd$ac_dir_suffix 1293 | # for backward compatibility: 1294 | ac_top_builddir=$ac_top_build_prefix 1295 | 1296 | case $srcdir in 1297 | .) # We are building in place. 1298 | ac_srcdir=. 1299 | ac_top_srcdir=$ac_top_builddir_sub 1300 | ac_abs_top_srcdir=$ac_pwd ;; 1301 | [\\/]* | ?:[\\/]* ) # Absolute name. 1302 | ac_srcdir=$srcdir$ac_dir_suffix; 1303 | ac_top_srcdir=$srcdir 1304 | ac_abs_top_srcdir=$srcdir ;; 1305 | *) # Relative name. 1306 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 1307 | ac_top_srcdir=$ac_top_build_prefix$srcdir 1308 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 1309 | esac 1310 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 1311 | 1312 | cd "$ac_dir" || { ac_status=$?; continue; } 1313 | # Check for guested configure. 1314 | if test -f "$ac_srcdir/configure.gnu"; then 1315 | echo && 1316 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive 1317 | elif test -f "$ac_srcdir/configure"; then 1318 | echo && 1319 | $SHELL "$ac_srcdir/configure" --help=recursive 1320 | else 1321 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 1322 | fi || ac_status=$? 1323 | cd "$ac_pwd" || { ac_status=$?; break; } 1324 | done 1325 | fi 1326 | 1327 | test -n "$ac_init_help" && exit $ac_status 1328 | if $ac_init_version; then 1329 | cat <<\_ACEOF 1330 | sysfonts configure 0.8 1331 | generated by GNU Autoconf 2.69 1332 | 1333 | Copyright (C) 2012 Free Software Foundation, Inc. 1334 | This configure script is free software; the Free Software Foundation 1335 | gives unlimited permission to copy, distribute and modify it. 1336 | _ACEOF 1337 | exit 1338 | fi 1339 | 1340 | ## ------------------------ ## 1341 | ## Autoconf initialization. ## 1342 | ## ------------------------ ## 1343 | 1344 | # ac_fn_c_try_compile LINENO 1345 | # -------------------------- 1346 | # Try to compile conftest.$ac_ext, and return whether this succeeded. 1347 | ac_fn_c_try_compile () 1348 | { 1349 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1350 | rm -f conftest.$ac_objext 1351 | if { { ac_try="$ac_compile" 1352 | case "(($ac_try" in 1353 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1354 | *) ac_try_echo=$ac_try;; 1355 | esac 1356 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1357 | $as_echo "$ac_try_echo"; } >&5 1358 | (eval "$ac_compile") 2>conftest.err 1359 | ac_status=$? 1360 | if test -s conftest.err; then 1361 | grep -v '^ *+' conftest.err >conftest.er1 1362 | cat conftest.er1 >&5 1363 | mv -f conftest.er1 conftest.err 1364 | fi 1365 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1366 | test $ac_status = 0; } && { 1367 | test -z "$ac_c_werror_flag" || 1368 | test ! -s conftest.err 1369 | } && test -s conftest.$ac_objext; then : 1370 | ac_retval=0 1371 | else 1372 | $as_echo "$as_me: failed program was:" >&5 1373 | sed 's/^/| /' conftest.$ac_ext >&5 1374 | 1375 | ac_retval=1 1376 | fi 1377 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1378 | as_fn_set_status $ac_retval 1379 | 1380 | } # ac_fn_c_try_compile 1381 | 1382 | # ac_fn_c_try_link LINENO 1383 | # ----------------------- 1384 | # Try to link conftest.$ac_ext, and return whether this succeeded. 1385 | ac_fn_c_try_link () 1386 | { 1387 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1388 | rm -f conftest.$ac_objext conftest$ac_exeext 1389 | if { { ac_try="$ac_link" 1390 | case "(($ac_try" in 1391 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1392 | *) ac_try_echo=$ac_try;; 1393 | esac 1394 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1395 | $as_echo "$ac_try_echo"; } >&5 1396 | (eval "$ac_link") 2>conftest.err 1397 | ac_status=$? 1398 | if test -s conftest.err; then 1399 | grep -v '^ *+' conftest.err >conftest.er1 1400 | cat conftest.er1 >&5 1401 | mv -f conftest.er1 conftest.err 1402 | fi 1403 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1404 | test $ac_status = 0; } && { 1405 | test -z "$ac_c_werror_flag" || 1406 | test ! -s conftest.err 1407 | } && test -s conftest$ac_exeext && { 1408 | test "$cross_compiling" = yes || 1409 | test -x conftest$ac_exeext 1410 | }; then : 1411 | ac_retval=0 1412 | else 1413 | $as_echo "$as_me: failed program was:" >&5 1414 | sed 's/^/| /' conftest.$ac_ext >&5 1415 | 1416 | ac_retval=1 1417 | fi 1418 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information 1419 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would 1420 | # interfere with the next link command; also delete a directory that is 1421 | # left behind by Apple's compiler. We do this before executing the actions. 1422 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo 1423 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1424 | as_fn_set_status $ac_retval 1425 | 1426 | } # ac_fn_c_try_link 1427 | cat >config.log <<_ACEOF 1428 | This file contains any messages produced by compilers while 1429 | running configure, to aid debugging if configure makes a mistake. 1430 | 1431 | It was created by sysfonts $as_me 0.8, which was 1432 | generated by GNU Autoconf 2.69. Invocation command line was 1433 | 1434 | $ $0 $@ 1435 | 1436 | _ACEOF 1437 | exec 5>>config.log 1438 | { 1439 | cat <<_ASUNAME 1440 | ## --------- ## 1441 | ## Platform. ## 1442 | ## --------- ## 1443 | 1444 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 1445 | uname -m = `(uname -m) 2>/dev/null || echo unknown` 1446 | uname -r = `(uname -r) 2>/dev/null || echo unknown` 1447 | uname -s = `(uname -s) 2>/dev/null || echo unknown` 1448 | uname -v = `(uname -v) 2>/dev/null || echo unknown` 1449 | 1450 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` 1451 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` 1452 | 1453 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` 1454 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` 1455 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` 1456 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` 1457 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` 1458 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 1459 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 1460 | 1461 | _ASUNAME 1462 | 1463 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1464 | for as_dir in $PATH 1465 | do 1466 | IFS=$as_save_IFS 1467 | test -z "$as_dir" && as_dir=. 1468 | $as_echo "PATH: $as_dir" 1469 | done 1470 | IFS=$as_save_IFS 1471 | 1472 | } >&5 1473 | 1474 | cat >&5 <<_ACEOF 1475 | 1476 | 1477 | ## ----------- ## 1478 | ## Core tests. ## 1479 | ## ----------- ## 1480 | 1481 | _ACEOF 1482 | 1483 | 1484 | # Keep a trace of the command line. 1485 | # Strip out --no-create and --no-recursion so they do not pile up. 1486 | # Strip out --silent because we don't want to record it for future runs. 1487 | # Also quote any args containing shell meta-characters. 1488 | # Make two passes to allow for proper duplicate-argument suppression. 1489 | ac_configure_args= 1490 | ac_configure_args0= 1491 | ac_configure_args1= 1492 | ac_must_keep_next=false 1493 | for ac_pass in 1 2 1494 | do 1495 | for ac_arg 1496 | do 1497 | case $ac_arg in 1498 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; 1499 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 1500 | | -silent | --silent | --silen | --sile | --sil) 1501 | continue ;; 1502 | *\'*) 1503 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 1504 | esac 1505 | case $ac_pass in 1506 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 1507 | 2) 1508 | as_fn_append ac_configure_args1 " '$ac_arg'" 1509 | if test $ac_must_keep_next = true; then 1510 | ac_must_keep_next=false # Got value, back to normal. 1511 | else 1512 | case $ac_arg in 1513 | *=* | --config-cache | -C | -disable-* | --disable-* \ 1514 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ 1515 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ 1516 | | -with-* | --with-* | -without-* | --without-* | --x) 1517 | case "$ac_configure_args0 " in 1518 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; 1519 | esac 1520 | ;; 1521 | -* ) ac_must_keep_next=true ;; 1522 | esac 1523 | fi 1524 | as_fn_append ac_configure_args " '$ac_arg'" 1525 | ;; 1526 | esac 1527 | done 1528 | done 1529 | { ac_configure_args0=; unset ac_configure_args0;} 1530 | { ac_configure_args1=; unset ac_configure_args1;} 1531 | 1532 | # When interrupted or exit'd, cleanup temporary files, and complete 1533 | # config.log. We remove comments because anyway the quotes in there 1534 | # would cause problems or look ugly. 1535 | # WARNING: Use '\'' to represent an apostrophe within the trap. 1536 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. 1537 | trap 'exit_status=$? 1538 | # Save into config.log some information that might help in debugging. 1539 | { 1540 | echo 1541 | 1542 | $as_echo "## ---------------- ## 1543 | ## Cache variables. ## 1544 | ## ---------------- ##" 1545 | echo 1546 | # The following way of writing the cache mishandles newlines in values, 1547 | ( 1548 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do 1549 | eval ac_val=\$$ac_var 1550 | case $ac_val in #( 1551 | *${as_nl}*) 1552 | case $ac_var in #( 1553 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 1554 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 1555 | esac 1556 | case $ac_var in #( 1557 | _ | IFS | as_nl) ;; #( 1558 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 1559 | *) { eval $ac_var=; unset $ac_var;} ;; 1560 | esac ;; 1561 | esac 1562 | done 1563 | (set) 2>&1 | 1564 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( 1565 | *${as_nl}ac_space=\ *) 1566 | sed -n \ 1567 | "s/'\''/'\''\\\\'\'''\''/g; 1568 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" 1569 | ;; #( 1570 | *) 1571 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 1572 | ;; 1573 | esac | 1574 | sort 1575 | ) 1576 | echo 1577 | 1578 | $as_echo "## ----------------- ## 1579 | ## Output variables. ## 1580 | ## ----------------- ##" 1581 | echo 1582 | for ac_var in $ac_subst_vars 1583 | do 1584 | eval ac_val=\$$ac_var 1585 | case $ac_val in 1586 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 1587 | esac 1588 | $as_echo "$ac_var='\''$ac_val'\''" 1589 | done | sort 1590 | echo 1591 | 1592 | if test -n "$ac_subst_files"; then 1593 | $as_echo "## ------------------- ## 1594 | ## File substitutions. ## 1595 | ## ------------------- ##" 1596 | echo 1597 | for ac_var in $ac_subst_files 1598 | do 1599 | eval ac_val=\$$ac_var 1600 | case $ac_val in 1601 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 1602 | esac 1603 | $as_echo "$ac_var='\''$ac_val'\''" 1604 | done | sort 1605 | echo 1606 | fi 1607 | 1608 | if test -s confdefs.h; then 1609 | $as_echo "## ----------- ## 1610 | ## confdefs.h. ## 1611 | ## ----------- ##" 1612 | echo 1613 | cat confdefs.h 1614 | echo 1615 | fi 1616 | test "$ac_signal" != 0 && 1617 | $as_echo "$as_me: caught signal $ac_signal" 1618 | $as_echo "$as_me: exit $exit_status" 1619 | } >&5 1620 | rm -f core *.core core.conftest.* && 1621 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && 1622 | exit $exit_status 1623 | ' 0 1624 | for ac_signal in 1 2 13 15; do 1625 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal 1626 | done 1627 | ac_signal=0 1628 | 1629 | # confdefs.h avoids OS command line length limits that DEFS can exceed. 1630 | rm -f -r conftest* confdefs.h 1631 | 1632 | $as_echo "/* confdefs.h */" > confdefs.h 1633 | 1634 | # Predefined preprocessor variables. 1635 | 1636 | cat >>confdefs.h <<_ACEOF 1637 | #define PACKAGE_NAME "$PACKAGE_NAME" 1638 | _ACEOF 1639 | 1640 | cat >>confdefs.h <<_ACEOF 1641 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" 1642 | _ACEOF 1643 | 1644 | cat >>confdefs.h <<_ACEOF 1645 | #define PACKAGE_VERSION "$PACKAGE_VERSION" 1646 | _ACEOF 1647 | 1648 | cat >>confdefs.h <<_ACEOF 1649 | #define PACKAGE_STRING "$PACKAGE_STRING" 1650 | _ACEOF 1651 | 1652 | cat >>confdefs.h <<_ACEOF 1653 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" 1654 | _ACEOF 1655 | 1656 | cat >>confdefs.h <<_ACEOF 1657 | #define PACKAGE_URL "$PACKAGE_URL" 1658 | _ACEOF 1659 | 1660 | 1661 | # Let the site file select an alternate cache file if it wants to. 1662 | # Prefer an explicitly selected file to automatically selected ones. 1663 | ac_site_file1=NONE 1664 | ac_site_file2=NONE 1665 | if test -n "$CONFIG_SITE"; then 1666 | # We do not want a PATH search for config.site. 1667 | case $CONFIG_SITE in #(( 1668 | -*) ac_site_file1=./$CONFIG_SITE;; 1669 | */*) ac_site_file1=$CONFIG_SITE;; 1670 | *) ac_site_file1=./$CONFIG_SITE;; 1671 | esac 1672 | elif test "x$prefix" != xNONE; then 1673 | ac_site_file1=$prefix/share/config.site 1674 | ac_site_file2=$prefix/etc/config.site 1675 | else 1676 | ac_site_file1=$ac_default_prefix/share/config.site 1677 | ac_site_file2=$ac_default_prefix/etc/config.site 1678 | fi 1679 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" 1680 | do 1681 | test "x$ac_site_file" = xNONE && continue 1682 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then 1683 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 1684 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} 1685 | sed 's/^/| /' "$ac_site_file" >&5 1686 | . "$ac_site_file" \ 1687 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 1688 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 1689 | as_fn_error $? "failed to load site script $ac_site_file 1690 | See \`config.log' for more details" "$LINENO" 5; } 1691 | fi 1692 | done 1693 | 1694 | if test -r "$cache_file"; then 1695 | # Some versions of bash will fail to source /dev/null (special files 1696 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. 1697 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then 1698 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 1699 | $as_echo "$as_me: loading cache $cache_file" >&6;} 1700 | case $cache_file in 1701 | [\\/]* | ?:[\\/]* ) . "$cache_file";; 1702 | *) . "./$cache_file";; 1703 | esac 1704 | fi 1705 | else 1706 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 1707 | $as_echo "$as_me: creating cache $cache_file" >&6;} 1708 | >$cache_file 1709 | fi 1710 | 1711 | # Check that the precious variables saved in the cache have kept the same 1712 | # value. 1713 | ac_cache_corrupted=false 1714 | for ac_var in $ac_precious_vars; do 1715 | eval ac_old_set=\$ac_cv_env_${ac_var}_set 1716 | eval ac_new_set=\$ac_env_${ac_var}_set 1717 | eval ac_old_val=\$ac_cv_env_${ac_var}_value 1718 | eval ac_new_val=\$ac_env_${ac_var}_value 1719 | case $ac_old_set,$ac_new_set in 1720 | set,) 1721 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 1722 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} 1723 | ac_cache_corrupted=: ;; 1724 | ,set) 1725 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 1726 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 1727 | ac_cache_corrupted=: ;; 1728 | ,);; 1729 | *) 1730 | if test "x$ac_old_val" != "x$ac_new_val"; then 1731 | # differences in whitespace do not lead to failure. 1732 | ac_old_val_w=`echo x $ac_old_val` 1733 | ac_new_val_w=`echo x $ac_new_val` 1734 | if test "$ac_old_val_w" != "$ac_new_val_w"; then 1735 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 1736 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} 1737 | ac_cache_corrupted=: 1738 | else 1739 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 1740 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} 1741 | eval $ac_var=\$ac_old_val 1742 | fi 1743 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 1744 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} 1745 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 1746 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} 1747 | fi;; 1748 | esac 1749 | # Pass precious variables to config.status. 1750 | if test "$ac_new_set" = set; then 1751 | case $ac_new_val in 1752 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; 1753 | *) ac_arg=$ac_var=$ac_new_val ;; 1754 | esac 1755 | case " $ac_configure_args " in 1756 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. 1757 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; 1758 | esac 1759 | fi 1760 | done 1761 | if $ac_cache_corrupted; then 1762 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 1763 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 1764 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 1765 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} 1766 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 1767 | fi 1768 | ## -------------------- ## 1769 | ## Main body of script. ## 1770 | ## -------------------- ## 1771 | 1772 | ac_ext=c 1773 | ac_cpp='$CPP $CPPFLAGS' 1774 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 1775 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 1776 | ac_compiler_gnu=$ac_cv_c_compiler_gnu 1777 | 1778 | 1779 | 1780 | # Find R_HOME and set CC/CFLAGS/CPPFLAGS 1781 | : ${R_HOME=`R RHOME`} 1782 | if test -z "${R_HOME}"; then 1783 | echo "could not determine R_HOME" 1784 | exit 1 1785 | fi 1786 | CC=`"${R_HOME}/bin/R" CMD config CC` 1787 | CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS` 1788 | CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS` 1789 | 1790 | # Checks for programs. 1791 | ac_ext=c 1792 | ac_cpp='$CPP $CPPFLAGS' 1793 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 1794 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 1795 | ac_compiler_gnu=$ac_cv_c_compiler_gnu 1796 | if test -n "$ac_tool_prefix"; then 1797 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. 1798 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 1799 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 1800 | $as_echo_n "checking for $ac_word... " >&6; } 1801 | if ${ac_cv_prog_CC+:} false; then : 1802 | $as_echo_n "(cached) " >&6 1803 | else 1804 | if test -n "$CC"; then 1805 | ac_cv_prog_CC="$CC" # Let the user override the test. 1806 | else 1807 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1808 | for as_dir in $PATH 1809 | do 1810 | IFS=$as_save_IFS 1811 | test -z "$as_dir" && as_dir=. 1812 | for ac_exec_ext in '' $ac_executable_extensions; do 1813 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 1814 | ac_cv_prog_CC="${ac_tool_prefix}gcc" 1815 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 1816 | break 2 1817 | fi 1818 | done 1819 | done 1820 | IFS=$as_save_IFS 1821 | 1822 | fi 1823 | fi 1824 | CC=$ac_cv_prog_CC 1825 | if test -n "$CC"; then 1826 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 1827 | $as_echo "$CC" >&6; } 1828 | else 1829 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 1830 | $as_echo "no" >&6; } 1831 | fi 1832 | 1833 | 1834 | fi 1835 | if test -z "$ac_cv_prog_CC"; then 1836 | ac_ct_CC=$CC 1837 | # Extract the first word of "gcc", so it can be a program name with args. 1838 | set dummy gcc; ac_word=$2 1839 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 1840 | $as_echo_n "checking for $ac_word... " >&6; } 1841 | if ${ac_cv_prog_ac_ct_CC+:} false; then : 1842 | $as_echo_n "(cached) " >&6 1843 | else 1844 | if test -n "$ac_ct_CC"; then 1845 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 1846 | else 1847 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1848 | for as_dir in $PATH 1849 | do 1850 | IFS=$as_save_IFS 1851 | test -z "$as_dir" && as_dir=. 1852 | for ac_exec_ext in '' $ac_executable_extensions; do 1853 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 1854 | ac_cv_prog_ac_ct_CC="gcc" 1855 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 1856 | break 2 1857 | fi 1858 | done 1859 | done 1860 | IFS=$as_save_IFS 1861 | 1862 | fi 1863 | fi 1864 | ac_ct_CC=$ac_cv_prog_ac_ct_CC 1865 | if test -n "$ac_ct_CC"; then 1866 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 1867 | $as_echo "$ac_ct_CC" >&6; } 1868 | else 1869 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 1870 | $as_echo "no" >&6; } 1871 | fi 1872 | 1873 | if test "x$ac_ct_CC" = x; then 1874 | CC="" 1875 | else 1876 | case $cross_compiling:$ac_tool_warned in 1877 | yes:) 1878 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 1879 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 1880 | ac_tool_warned=yes ;; 1881 | esac 1882 | CC=$ac_ct_CC 1883 | fi 1884 | else 1885 | CC="$ac_cv_prog_CC" 1886 | fi 1887 | 1888 | if test -z "$CC"; then 1889 | if test -n "$ac_tool_prefix"; then 1890 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. 1891 | set dummy ${ac_tool_prefix}cc; ac_word=$2 1892 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 1893 | $as_echo_n "checking for $ac_word... " >&6; } 1894 | if ${ac_cv_prog_CC+:} false; then : 1895 | $as_echo_n "(cached) " >&6 1896 | else 1897 | if test -n "$CC"; then 1898 | ac_cv_prog_CC="$CC" # Let the user override the test. 1899 | else 1900 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1901 | for as_dir in $PATH 1902 | do 1903 | IFS=$as_save_IFS 1904 | test -z "$as_dir" && as_dir=. 1905 | for ac_exec_ext in '' $ac_executable_extensions; do 1906 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 1907 | ac_cv_prog_CC="${ac_tool_prefix}cc" 1908 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 1909 | break 2 1910 | fi 1911 | done 1912 | done 1913 | IFS=$as_save_IFS 1914 | 1915 | fi 1916 | fi 1917 | CC=$ac_cv_prog_CC 1918 | if test -n "$CC"; then 1919 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 1920 | $as_echo "$CC" >&6; } 1921 | else 1922 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 1923 | $as_echo "no" >&6; } 1924 | fi 1925 | 1926 | 1927 | fi 1928 | fi 1929 | if test -z "$CC"; then 1930 | # Extract the first word of "cc", so it can be a program name with args. 1931 | set dummy cc; ac_word=$2 1932 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 1933 | $as_echo_n "checking for $ac_word... " >&6; } 1934 | if ${ac_cv_prog_CC+:} false; then : 1935 | $as_echo_n "(cached) " >&6 1936 | else 1937 | if test -n "$CC"; then 1938 | ac_cv_prog_CC="$CC" # Let the user override the test. 1939 | else 1940 | ac_prog_rejected=no 1941 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 1942 | for as_dir in $PATH 1943 | do 1944 | IFS=$as_save_IFS 1945 | test -z "$as_dir" && as_dir=. 1946 | for ac_exec_ext in '' $ac_executable_extensions; do 1947 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 1948 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then 1949 | ac_prog_rejected=yes 1950 | continue 1951 | fi 1952 | ac_cv_prog_CC="cc" 1953 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 1954 | break 2 1955 | fi 1956 | done 1957 | done 1958 | IFS=$as_save_IFS 1959 | 1960 | if test $ac_prog_rejected = yes; then 1961 | # We found a bogon in the path, so make sure we never use it. 1962 | set dummy $ac_cv_prog_CC 1963 | shift 1964 | if test $# != 0; then 1965 | # We chose a different compiler from the bogus one. 1966 | # However, it has the same basename, so the bogon will be chosen 1967 | # first if we set CC to just the basename; use the full file name. 1968 | shift 1969 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" 1970 | fi 1971 | fi 1972 | fi 1973 | fi 1974 | CC=$ac_cv_prog_CC 1975 | if test -n "$CC"; then 1976 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 1977 | $as_echo "$CC" >&6; } 1978 | else 1979 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 1980 | $as_echo "no" >&6; } 1981 | fi 1982 | 1983 | 1984 | fi 1985 | if test -z "$CC"; then 1986 | if test -n "$ac_tool_prefix"; then 1987 | for ac_prog in cl.exe 1988 | do 1989 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 1990 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 1991 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 1992 | $as_echo_n "checking for $ac_word... " >&6; } 1993 | if ${ac_cv_prog_CC+:} false; then : 1994 | $as_echo_n "(cached) " >&6 1995 | else 1996 | if test -n "$CC"; then 1997 | ac_cv_prog_CC="$CC" # Let the user override the test. 1998 | else 1999 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2000 | for as_dir in $PATH 2001 | do 2002 | IFS=$as_save_IFS 2003 | test -z "$as_dir" && as_dir=. 2004 | for ac_exec_ext in '' $ac_executable_extensions; do 2005 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2006 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 2007 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 2008 | break 2 2009 | fi 2010 | done 2011 | done 2012 | IFS=$as_save_IFS 2013 | 2014 | fi 2015 | fi 2016 | CC=$ac_cv_prog_CC 2017 | if test -n "$CC"; then 2018 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 2019 | $as_echo "$CC" >&6; } 2020 | else 2021 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2022 | $as_echo "no" >&6; } 2023 | fi 2024 | 2025 | 2026 | test -n "$CC" && break 2027 | done 2028 | fi 2029 | if test -z "$CC"; then 2030 | ac_ct_CC=$CC 2031 | for ac_prog in cl.exe 2032 | do 2033 | # Extract the first word of "$ac_prog", so it can be a program name with args. 2034 | set dummy $ac_prog; ac_word=$2 2035 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 2036 | $as_echo_n "checking for $ac_word... " >&6; } 2037 | if ${ac_cv_prog_ac_ct_CC+:} false; then : 2038 | $as_echo_n "(cached) " >&6 2039 | else 2040 | if test -n "$ac_ct_CC"; then 2041 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 2042 | else 2043 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2044 | for as_dir in $PATH 2045 | do 2046 | IFS=$as_save_IFS 2047 | test -z "$as_dir" && as_dir=. 2048 | for ac_exec_ext in '' $ac_executable_extensions; do 2049 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2050 | ac_cv_prog_ac_ct_CC="$ac_prog" 2051 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 2052 | break 2 2053 | fi 2054 | done 2055 | done 2056 | IFS=$as_save_IFS 2057 | 2058 | fi 2059 | fi 2060 | ac_ct_CC=$ac_cv_prog_ac_ct_CC 2061 | if test -n "$ac_ct_CC"; then 2062 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 2063 | $as_echo "$ac_ct_CC" >&6; } 2064 | else 2065 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2066 | $as_echo "no" >&6; } 2067 | fi 2068 | 2069 | 2070 | test -n "$ac_ct_CC" && break 2071 | done 2072 | 2073 | if test "x$ac_ct_CC" = x; then 2074 | CC="" 2075 | else 2076 | case $cross_compiling:$ac_tool_warned in 2077 | yes:) 2078 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 2079 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 2080 | ac_tool_warned=yes ;; 2081 | esac 2082 | CC=$ac_ct_CC 2083 | fi 2084 | fi 2085 | 2086 | fi 2087 | 2088 | 2089 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2090 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2091 | as_fn_error $? "no acceptable C compiler found in \$PATH 2092 | See \`config.log' for more details" "$LINENO" 5; } 2093 | 2094 | # Provide some information about the compiler. 2095 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 2096 | set X $ac_compile 2097 | ac_compiler=$2 2098 | for ac_option in --version -v -V -qversion; do 2099 | { { ac_try="$ac_compiler $ac_option >&5" 2100 | case "(($ac_try" in 2101 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2102 | *) ac_try_echo=$ac_try;; 2103 | esac 2104 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2105 | $as_echo "$ac_try_echo"; } >&5 2106 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err 2107 | ac_status=$? 2108 | if test -s conftest.err; then 2109 | sed '10a\ 2110 | ... rest of stderr output deleted ... 2111 | 10q' conftest.err >conftest.er1 2112 | cat conftest.er1 >&5 2113 | fi 2114 | rm -f conftest.er1 conftest.err 2115 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2116 | test $ac_status = 0; } 2117 | done 2118 | 2119 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2120 | /* end confdefs.h. */ 2121 | 2122 | int 2123 | main () 2124 | { 2125 | 2126 | ; 2127 | return 0; 2128 | } 2129 | _ACEOF 2130 | ac_clean_files_save=$ac_clean_files 2131 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" 2132 | # Try to create an executable without -o first, disregard a.out. 2133 | # It will help us diagnose broken compilers, and finding out an intuition 2134 | # of exeext. 2135 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 2136 | $as_echo_n "checking whether the C compiler works... " >&6; } 2137 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` 2138 | 2139 | # The possible output files: 2140 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" 2141 | 2142 | ac_rmfiles= 2143 | for ac_file in $ac_files 2144 | do 2145 | case $ac_file in 2146 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 2147 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; 2148 | esac 2149 | done 2150 | rm -f $ac_rmfiles 2151 | 2152 | if { { ac_try="$ac_link_default" 2153 | case "(($ac_try" in 2154 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2155 | *) ac_try_echo=$ac_try;; 2156 | esac 2157 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2158 | $as_echo "$ac_try_echo"; } >&5 2159 | (eval "$ac_link_default") 2>&5 2160 | ac_status=$? 2161 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2162 | test $ac_status = 0; }; then : 2163 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. 2164 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' 2165 | # in a Makefile. We should not override ac_cv_exeext if it was cached, 2166 | # so that the user can short-circuit this test for compilers unknown to 2167 | # Autoconf. 2168 | for ac_file in $ac_files '' 2169 | do 2170 | test -f "$ac_file" || continue 2171 | case $ac_file in 2172 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) 2173 | ;; 2174 | [ab].out ) 2175 | # We found the default executable, but exeext='' is most 2176 | # certainly right. 2177 | break;; 2178 | *.* ) 2179 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; 2180 | then :; else 2181 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 2182 | fi 2183 | # We set ac_cv_exeext here because the later test for it is not 2184 | # safe: cross compilers may not add the suffix if given an `-o' 2185 | # argument, so we may need to know it at that point already. 2186 | # Even if this section looks crufty: it has the advantage of 2187 | # actually working. 2188 | break;; 2189 | * ) 2190 | break;; 2191 | esac 2192 | done 2193 | test "$ac_cv_exeext" = no && ac_cv_exeext= 2194 | 2195 | else 2196 | ac_file='' 2197 | fi 2198 | if test -z "$ac_file"; then : 2199 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2200 | $as_echo "no" >&6; } 2201 | $as_echo "$as_me: failed program was:" >&5 2202 | sed 's/^/| /' conftest.$ac_ext >&5 2203 | 2204 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2205 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2206 | as_fn_error 77 "C compiler cannot create executables 2207 | See \`config.log' for more details" "$LINENO" 5; } 2208 | else 2209 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 2210 | $as_echo "yes" >&6; } 2211 | fi 2212 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 2213 | $as_echo_n "checking for C compiler default output file name... " >&6; } 2214 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 2215 | $as_echo "$ac_file" >&6; } 2216 | ac_exeext=$ac_cv_exeext 2217 | 2218 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out 2219 | ac_clean_files=$ac_clean_files_save 2220 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 2221 | $as_echo_n "checking for suffix of executables... " >&6; } 2222 | if { { ac_try="$ac_link" 2223 | case "(($ac_try" in 2224 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2225 | *) ac_try_echo=$ac_try;; 2226 | esac 2227 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2228 | $as_echo "$ac_try_echo"; } >&5 2229 | (eval "$ac_link") 2>&5 2230 | ac_status=$? 2231 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2232 | test $ac_status = 0; }; then : 2233 | # If both `conftest.exe' and `conftest' are `present' (well, observable) 2234 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will 2235 | # work properly (i.e., refer to `conftest.exe'), while it won't with 2236 | # `rm'. 2237 | for ac_file in conftest.exe conftest conftest.*; do 2238 | test -f "$ac_file" || continue 2239 | case $ac_file in 2240 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 2241 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 2242 | break;; 2243 | * ) break;; 2244 | esac 2245 | done 2246 | else 2247 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2248 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2249 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link 2250 | See \`config.log' for more details" "$LINENO" 5; } 2251 | fi 2252 | rm -f conftest conftest$ac_cv_exeext 2253 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 2254 | $as_echo "$ac_cv_exeext" >&6; } 2255 | 2256 | rm -f conftest.$ac_ext 2257 | EXEEXT=$ac_cv_exeext 2258 | ac_exeext=$EXEEXT 2259 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2260 | /* end confdefs.h. */ 2261 | #include 2262 | int 2263 | main () 2264 | { 2265 | FILE *f = fopen ("conftest.out", "w"); 2266 | return ferror (f) || fclose (f) != 0; 2267 | 2268 | ; 2269 | return 0; 2270 | } 2271 | _ACEOF 2272 | ac_clean_files="$ac_clean_files conftest.out" 2273 | # Check that the compiler produces executables we can run. If not, either 2274 | # the compiler is broken, or we cross compile. 2275 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 2276 | $as_echo_n "checking whether we are cross compiling... " >&6; } 2277 | if test "$cross_compiling" != yes; then 2278 | { { ac_try="$ac_link" 2279 | case "(($ac_try" in 2280 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2281 | *) ac_try_echo=$ac_try;; 2282 | esac 2283 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2284 | $as_echo "$ac_try_echo"; } >&5 2285 | (eval "$ac_link") 2>&5 2286 | ac_status=$? 2287 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2288 | test $ac_status = 0; } 2289 | if { ac_try='./conftest$ac_cv_exeext' 2290 | { { case "(($ac_try" in 2291 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2292 | *) ac_try_echo=$ac_try;; 2293 | esac 2294 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2295 | $as_echo "$ac_try_echo"; } >&5 2296 | (eval "$ac_try") 2>&5 2297 | ac_status=$? 2298 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2299 | test $ac_status = 0; }; }; then 2300 | cross_compiling=no 2301 | else 2302 | if test "$cross_compiling" = maybe; then 2303 | cross_compiling=yes 2304 | else 2305 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2306 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2307 | as_fn_error $? "cannot run C compiled programs. 2308 | If you meant to cross compile, use \`--host'. 2309 | See \`config.log' for more details" "$LINENO" 5; } 2310 | fi 2311 | fi 2312 | fi 2313 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 2314 | $as_echo "$cross_compiling" >&6; } 2315 | 2316 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out 2317 | ac_clean_files=$ac_clean_files_save 2318 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 2319 | $as_echo_n "checking for suffix of object files... " >&6; } 2320 | if ${ac_cv_objext+:} false; then : 2321 | $as_echo_n "(cached) " >&6 2322 | else 2323 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2324 | /* end confdefs.h. */ 2325 | 2326 | int 2327 | main () 2328 | { 2329 | 2330 | ; 2331 | return 0; 2332 | } 2333 | _ACEOF 2334 | rm -f conftest.o conftest.obj 2335 | if { { ac_try="$ac_compile" 2336 | case "(($ac_try" in 2337 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2338 | *) ac_try_echo=$ac_try;; 2339 | esac 2340 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2341 | $as_echo "$ac_try_echo"; } >&5 2342 | (eval "$ac_compile") 2>&5 2343 | ac_status=$? 2344 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2345 | test $ac_status = 0; }; then : 2346 | for ac_file in conftest.o conftest.obj conftest.*; do 2347 | test -f "$ac_file" || continue; 2348 | case $ac_file in 2349 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; 2350 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` 2351 | break;; 2352 | esac 2353 | done 2354 | else 2355 | $as_echo "$as_me: failed program was:" >&5 2356 | sed 's/^/| /' conftest.$ac_ext >&5 2357 | 2358 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2359 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2360 | as_fn_error $? "cannot compute suffix of object files: cannot compile 2361 | See \`config.log' for more details" "$LINENO" 5; } 2362 | fi 2363 | rm -f conftest.$ac_cv_objext conftest.$ac_ext 2364 | fi 2365 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 2366 | $as_echo "$ac_cv_objext" >&6; } 2367 | OBJEXT=$ac_cv_objext 2368 | ac_objext=$OBJEXT 2369 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 2370 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } 2371 | if ${ac_cv_c_compiler_gnu+:} false; then : 2372 | $as_echo_n "(cached) " >&6 2373 | else 2374 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2375 | /* end confdefs.h. */ 2376 | 2377 | int 2378 | main () 2379 | { 2380 | #ifndef __GNUC__ 2381 | choke me 2382 | #endif 2383 | 2384 | ; 2385 | return 0; 2386 | } 2387 | _ACEOF 2388 | if ac_fn_c_try_compile "$LINENO"; then : 2389 | ac_compiler_gnu=yes 2390 | else 2391 | ac_compiler_gnu=no 2392 | fi 2393 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2394 | ac_cv_c_compiler_gnu=$ac_compiler_gnu 2395 | 2396 | fi 2397 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 2398 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } 2399 | if test $ac_compiler_gnu = yes; then 2400 | GCC=yes 2401 | else 2402 | GCC= 2403 | fi 2404 | ac_test_CFLAGS=${CFLAGS+set} 2405 | ac_save_CFLAGS=$CFLAGS 2406 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 2407 | $as_echo_n "checking whether $CC accepts -g... " >&6; } 2408 | if ${ac_cv_prog_cc_g+:} false; then : 2409 | $as_echo_n "(cached) " >&6 2410 | else 2411 | ac_save_c_werror_flag=$ac_c_werror_flag 2412 | ac_c_werror_flag=yes 2413 | ac_cv_prog_cc_g=no 2414 | CFLAGS="-g" 2415 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2416 | /* end confdefs.h. */ 2417 | 2418 | int 2419 | main () 2420 | { 2421 | 2422 | ; 2423 | return 0; 2424 | } 2425 | _ACEOF 2426 | if ac_fn_c_try_compile "$LINENO"; then : 2427 | ac_cv_prog_cc_g=yes 2428 | else 2429 | CFLAGS="" 2430 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2431 | /* end confdefs.h. */ 2432 | 2433 | int 2434 | main () 2435 | { 2436 | 2437 | ; 2438 | return 0; 2439 | } 2440 | _ACEOF 2441 | if ac_fn_c_try_compile "$LINENO"; then : 2442 | 2443 | else 2444 | ac_c_werror_flag=$ac_save_c_werror_flag 2445 | CFLAGS="-g" 2446 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2447 | /* end confdefs.h. */ 2448 | 2449 | int 2450 | main () 2451 | { 2452 | 2453 | ; 2454 | return 0; 2455 | } 2456 | _ACEOF 2457 | if ac_fn_c_try_compile "$LINENO"; then : 2458 | ac_cv_prog_cc_g=yes 2459 | fi 2460 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2461 | fi 2462 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2463 | fi 2464 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2465 | ac_c_werror_flag=$ac_save_c_werror_flag 2466 | fi 2467 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 2468 | $as_echo "$ac_cv_prog_cc_g" >&6; } 2469 | if test "$ac_test_CFLAGS" = set; then 2470 | CFLAGS=$ac_save_CFLAGS 2471 | elif test $ac_cv_prog_cc_g = yes; then 2472 | if test "$GCC" = yes; then 2473 | CFLAGS="-g -O2" 2474 | else 2475 | CFLAGS="-g" 2476 | fi 2477 | else 2478 | if test "$GCC" = yes; then 2479 | CFLAGS="-O2" 2480 | else 2481 | CFLAGS= 2482 | fi 2483 | fi 2484 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 2485 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } 2486 | if ${ac_cv_prog_cc_c89+:} false; then : 2487 | $as_echo_n "(cached) " >&6 2488 | else 2489 | ac_cv_prog_cc_c89=no 2490 | ac_save_CC=$CC 2491 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2492 | /* end confdefs.h. */ 2493 | #include 2494 | #include 2495 | struct stat; 2496 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ 2497 | struct buf { int x; }; 2498 | FILE * (*rcsopen) (struct buf *, struct stat *, int); 2499 | static char *e (p, i) 2500 | char **p; 2501 | int i; 2502 | { 2503 | return p[i]; 2504 | } 2505 | static char *f (char * (*g) (char **, int), char **p, ...) 2506 | { 2507 | char *s; 2508 | va_list v; 2509 | va_start (v,p); 2510 | s = g (p, va_arg (v,int)); 2511 | va_end (v); 2512 | return s; 2513 | } 2514 | 2515 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has 2516 | function prototypes and stuff, but not '\xHH' hex character constants. 2517 | These don't provoke an error unfortunately, instead are silently treated 2518 | as 'x'. The following induces an error, until -std is added to get 2519 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an 2520 | array size at least. It's necessary to write '\x00'==0 to get something 2521 | that's true only with -std. */ 2522 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; 2523 | 2524 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters 2525 | inside strings and character constants. */ 2526 | #define FOO(x) 'x' 2527 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; 2528 | 2529 | int test (int i, double x); 2530 | struct s1 {int (*f) (int a);}; 2531 | struct s2 {int (*f) (double a);}; 2532 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); 2533 | int argc; 2534 | char **argv; 2535 | int 2536 | main () 2537 | { 2538 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; 2539 | ; 2540 | return 0; 2541 | } 2542 | _ACEOF 2543 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ 2544 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 2545 | do 2546 | CC="$ac_save_CC $ac_arg" 2547 | if ac_fn_c_try_compile "$LINENO"; then : 2548 | ac_cv_prog_cc_c89=$ac_arg 2549 | fi 2550 | rm -f core conftest.err conftest.$ac_objext 2551 | test "x$ac_cv_prog_cc_c89" != "xno" && break 2552 | done 2553 | rm -f conftest.$ac_ext 2554 | CC=$ac_save_CC 2555 | 2556 | fi 2557 | # AC_CACHE_VAL 2558 | case "x$ac_cv_prog_cc_c89" in 2559 | x) 2560 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 2561 | $as_echo "none needed" >&6; } ;; 2562 | xno) 2563 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 2564 | $as_echo "unsupported" >&6; } ;; 2565 | *) 2566 | CC="$CC $ac_cv_prog_cc_c89" 2567 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 2568 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; 2569 | esac 2570 | if test "x$ac_cv_prog_cc_c89" != xno; then : 2571 | 2572 | fi 2573 | 2574 | ac_ext=c 2575 | ac_cpp='$CPP $CPPFLAGS' 2576 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2577 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2578 | ac_compiler_gnu=$ac_cv_c_compiler_gnu 2579 | 2580 | 2581 | # Checks for pkg-config 2582 | # Extract the first word of "pkg-config", so it can be a program name with args. 2583 | set dummy pkg-config; ac_word=$2 2584 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 2585 | $as_echo_n "checking for $ac_word... " >&6; } 2586 | if ${ac_cv_path_PKGCONF+:} false; then : 2587 | $as_echo_n "(cached) " >&6 2588 | else 2589 | case $PKGCONF in 2590 | [\\/]* | ?:[\\/]*) 2591 | ac_cv_path_PKGCONF="$PKGCONF" # Let the user override the test with a path. 2592 | ;; 2593 | *) 2594 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2595 | as_dummy="$PATH:/usr/bin:/usr/local/bin:/opt/bin:/opt/homebrew/bin" 2596 | for as_dir in $as_dummy 2597 | do 2598 | IFS=$as_save_IFS 2599 | test -z "$as_dir" && as_dir=. 2600 | for ac_exec_ext in '' $ac_executable_extensions; do 2601 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2602 | ac_cv_path_PKGCONF="$as_dir/$ac_word$ac_exec_ext" 2603 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 2604 | break 2 2605 | fi 2606 | done 2607 | done 2608 | IFS=$as_save_IFS 2609 | 2610 | ;; 2611 | esac 2612 | fi 2613 | PKGCONF=$ac_cv_path_PKGCONF 2614 | if test -n "$PKGCONF"; then 2615 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONF" >&5 2616 | $as_echo "$PKGCONF" >&6; } 2617 | else 2618 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2619 | $as_echo "no" >&6; } 2620 | fi 2621 | 2622 | 2623 | 2624 | # If pkg-config is available, use it to find needed libraries 2625 | if test -n "${PKGCONF}"; then 2626 | # Check zlib 2627 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pkg-config could find zlib" >&5 2628 | $as_echo_n "checking whether pkg-config could find zlib... " >&6; } 2629 | if "${PKGCONF}" --exists zlib; then 2630 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 2631 | $as_echo "yes" >&6; } 2632 | ZLIB_CPPFLAGS=`"${PKGCONF}" --cflags zlib` 2633 | ZLIB_LIBS=`"${PKGCONF}" --libs zlib` 2634 | else 2635 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2636 | $as_echo "no" >&6; } 2637 | fi 2638 | # Check libpng 2639 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pkg-config could find libpng" >&5 2640 | $as_echo_n "checking whether pkg-config could find libpng... " >&6; } 2641 | if "${PKGCONF}" --exists libpng; then 2642 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 2643 | $as_echo "yes" >&6; } 2644 | LIBPNG_CPPFLAGS=`"${PKGCONF}" --cflags libpng` 2645 | LIBPNG_LIBS=`"${PKGCONF}" --libs libpng` 2646 | else 2647 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2648 | $as_echo "no" >&6; } 2649 | fi 2650 | # Check freetype2 2651 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pkg-config could find freetype2" >&5 2652 | $as_echo_n "checking whether pkg-config could find freetype2... " >&6; } 2653 | if "${PKGCONF}" --exists freetype2; then 2654 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 2655 | $as_echo "yes" >&6; } 2656 | FT_CPPFLAGS=`"${PKGCONF}" --cflags freetype2` 2657 | FT_LIBS=`"${PKGCONF}" --libs freetype2` 2658 | else 2659 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2660 | $as_echo "no" >&6; } 2661 | fi 2662 | fi 2663 | 2664 | # If pkg-config is not found, or if some library is not detected 2665 | # by pkg-config, try to check them directly 2666 | 2667 | # Check zlib 2668 | if test -z "${ZLIB_LIBS}"; then 2669 | 2670 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5 2671 | $as_echo_n "checking for deflate in -lz... " >&6; } 2672 | if ${ac_cv_lib_z_deflate+:} false; then : 2673 | $as_echo_n "(cached) " >&6 2674 | else 2675 | ac_check_lib_save_LIBS=$LIBS 2676 | LIBS="-lz $LIBS" 2677 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2678 | /* end confdefs.h. */ 2679 | 2680 | /* Override any GCC internal prototype to avoid an error. 2681 | Use char because int might match the return type of a GCC 2682 | builtin and then its argument prototype would still apply. */ 2683 | #ifdef __cplusplus 2684 | extern "C" 2685 | #endif 2686 | char deflate (); 2687 | int 2688 | main () 2689 | { 2690 | return deflate (); 2691 | ; 2692 | return 0; 2693 | } 2694 | _ACEOF 2695 | if ac_fn_c_try_link "$LINENO"; then : 2696 | ac_cv_lib_z_deflate=yes 2697 | else 2698 | ac_cv_lib_z_deflate=no 2699 | fi 2700 | rm -f core conftest.err conftest.$ac_objext \ 2701 | conftest$ac_exeext conftest.$ac_ext 2702 | LIBS=$ac_check_lib_save_LIBS 2703 | fi 2704 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5 2705 | $as_echo "$ac_cv_lib_z_deflate" >&6; } 2706 | if test "x$ac_cv_lib_z_deflate" = xyes; then : 2707 | ZLIB_LIBS=-lz 2708 | else 2709 | ZLIB_LIBS= 2710 | fi 2711 | 2712 | if test -z "${ZLIB_LIBS}"; then 2713 | echo "" 2714 | echo "****************************************************" 2715 | echo "Error: zlib not found" 2716 | echo "If you have not installed zlib, you can download" 2717 | echo "the source code from http://www.zlib.net/" 2718 | echo "" 2719 | echo "In Debian/Ubuntu-like systems, you can use" 2720 | echo ' "sudo apt-get install zlib1g-dev"' 2721 | echo "to install zlib" 2722 | echo "" 2723 | echo "For rpm-based systems, try" 2724 | echo ' "sudo yum install zlib-devel"' 2725 | echo "****************************************************" 2726 | echo "" 2727 | exit 1 2728 | fi 2729 | fi 2730 | 2731 | # Check libpng 2732 | if test -z "${LIBPNG_LIBS}"; then 2733 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_init_io in -lpng" >&5 2734 | $as_echo_n "checking for png_init_io in -lpng... " >&6; } 2735 | if ${ac_cv_lib_png_png_init_io+:} false; then : 2736 | $as_echo_n "(cached) " >&6 2737 | else 2738 | ac_check_lib_save_LIBS=$LIBS 2739 | LIBS="-lpng $LIBS" 2740 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2741 | /* end confdefs.h. */ 2742 | 2743 | /* Override any GCC internal prototype to avoid an error. 2744 | Use char because int might match the return type of a GCC 2745 | builtin and then its argument prototype would still apply. */ 2746 | #ifdef __cplusplus 2747 | extern "C" 2748 | #endif 2749 | char png_init_io (); 2750 | int 2751 | main () 2752 | { 2753 | return png_init_io (); 2754 | ; 2755 | return 0; 2756 | } 2757 | _ACEOF 2758 | if ac_fn_c_try_link "$LINENO"; then : 2759 | ac_cv_lib_png_png_init_io=yes 2760 | else 2761 | ac_cv_lib_png_png_init_io=no 2762 | fi 2763 | rm -f core conftest.err conftest.$ac_objext \ 2764 | conftest$ac_exeext conftest.$ac_ext 2765 | LIBS=$ac_check_lib_save_LIBS 2766 | fi 2767 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_init_io" >&5 2768 | $as_echo "$ac_cv_lib_png_png_init_io" >&6; } 2769 | if test "x$ac_cv_lib_png_png_init_io" = xyes; then : 2770 | LIBPNG_LIBS=-lpng 2771 | else 2772 | LIBPNG_LIBS= 2773 | fi 2774 | 2775 | if test -z "${LIBPNG_LIBS}"; then 2776 | echo "" 2777 | echo "****************************************************" 2778 | echo "Error: libpng not found." 2779 | echo "If you have not installed libpng, you can download" 2780 | echo "the source code from http://www.libpng.org/" 2781 | echo "" 2782 | echo "In Debian/Ubuntu-like systems, you can use" 2783 | echo ' "sudo apt-get install libpng12-dev"' 2784 | echo "to install libpng" 2785 | echo "" 2786 | echo "For rpm-based systems, try" 2787 | echo ' "sudo yum install libpng-devel"' 2788 | echo "****************************************************" 2789 | echo "" 2790 | exit 1 2791 | fi 2792 | fi 2793 | 2794 | ## Check freetype 2795 | if test -z "${FT_LIBS}"; then 2796 | # Extract the first word of "freetype-config", so it can be a program name with args. 2797 | set dummy freetype-config; ac_word=$2 2798 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 2799 | $as_echo_n "checking for $ac_word... " >&6; } 2800 | if ${ac_cv_prog_HAVE_FREETYPE_CONFIG+:} false; then : 2801 | $as_echo_n "(cached) " >&6 2802 | else 2803 | if test -n "$HAVE_FREETYPE_CONFIG"; then 2804 | ac_cv_prog_HAVE_FREETYPE_CONFIG="$HAVE_FREETYPE_CONFIG" # Let the user override the test. 2805 | else 2806 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2807 | for as_dir in $PATH 2808 | do 2809 | IFS=$as_save_IFS 2810 | test -z "$as_dir" && as_dir=. 2811 | for ac_exec_ext in '' $ac_executable_extensions; do 2812 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2813 | ac_cv_prog_HAVE_FREETYPE_CONFIG="yes" 2814 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 2815 | break 2 2816 | fi 2817 | done 2818 | done 2819 | IFS=$as_save_IFS 2820 | 2821 | test -z "$ac_cv_prog_HAVE_FREETYPE_CONFIG" && ac_cv_prog_HAVE_FREETYPE_CONFIG="no" 2822 | fi 2823 | fi 2824 | HAVE_FREETYPE_CONFIG=$ac_cv_prog_HAVE_FREETYPE_CONFIG 2825 | if test -n "$HAVE_FREETYPE_CONFIG"; then 2826 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_FREETYPE_CONFIG" >&5 2827 | $as_echo "$HAVE_FREETYPE_CONFIG" >&6; } 2828 | else 2829 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2830 | $as_echo "no" >&6; } 2831 | fi 2832 | 2833 | 2834 | if test "x$HAVE_FREETYPE_CONFIG" = "xyes" ; then 2835 | FT_CPPFLAGS="`freetype-config --cflags`" 2836 | FT_LIBS="`freetype-config --libs`" 2837 | else 2838 | echo "" 2839 | echo "****************************************************" 2840 | echo "Error: freetype-config not found." 2841 | echo "Please install FreeType with freetype-config script." 2842 | echo "If you have not installed FreeType, you can" 2843 | echo "download the source code from http://freetype.org/" 2844 | echo "" 2845 | echo "In Debian/Ubuntu-like systems, you can use" 2846 | echo ' "sudo apt-get install libfreetype6-dev"' 2847 | echo "to install FreeType" 2848 | echo "" 2849 | echo "For rpm-based systems, try" 2850 | echo ' "sudo yum install freetype-devel"' 2851 | echo "****************************************************" 2852 | echo "" 2853 | exit 1 2854 | fi 2855 | fi 2856 | 2857 | # Additional check for linking 2858 | CPPFLAGS="$CPPFLAGS ${FT_CPPFLAGS}" 2859 | LIBS0="$LIBS" 2860 | LIBS="$LIBS0 ${FT_LIBS}" 2861 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether freetype2 flags work" >&5 2862 | $as_echo_n "checking whether freetype2 flags work... " >&6; } 2863 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2864 | /* end confdefs.h. */ 2865 | 2866 | /* Override any GCC internal prototype to avoid an error. 2867 | Use char because int might match the return type of a GCC 2868 | builtin and then its argument prototype would still apply. */ 2869 | #ifdef __cplusplus 2870 | extern "C" 2871 | #endif 2872 | char FT_Init_FreeType (); 2873 | int 2874 | main () 2875 | { 2876 | return FT_Init_FreeType (); 2877 | ; 2878 | return 0; 2879 | } 2880 | _ACEOF 2881 | if ac_fn_c_try_link "$LINENO"; then : 2882 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 2883 | $as_echo "yes" >&6; } 2884 | else 2885 | 2886 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2887 | $as_echo "no" >&6; } 2888 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether --static helps" >&5 2889 | $as_echo_n "checking whether --static helps... " >&6; } 2890 | FT_LIBS=`"${PKGCONF}" --libs --static freetype2` 2891 | LIBS="$LIBS0 ${FT_LIBS}" 2892 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2893 | /* end confdefs.h. */ 2894 | 2895 | /* Override any GCC internal prototype to avoid an error. 2896 | Use char because int might match the return type of a GCC 2897 | builtin and then its argument prototype would still apply. */ 2898 | #ifdef __cplusplus 2899 | extern "C" 2900 | #endif 2901 | char FT_Init_FreeType (); 2902 | int 2903 | main () 2904 | { 2905 | return FT_Init_FreeType (); 2906 | ; 2907 | return 0; 2908 | } 2909 | _ACEOF 2910 | if ac_fn_c_try_link "$LINENO"; then : 2911 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 2912 | $as_echo "yes" >&6; } 2913 | else 2914 | 2915 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2916 | $as_echo "no" >&6; } 2917 | as_fn_error $? "Cannot get FreeType to work, check config.log for details." "$LINENO" 5 2918 | 2919 | fi 2920 | rm -f core conftest.err conftest.$ac_objext \ 2921 | conftest$ac_exeext conftest.$ac_ext 2922 | 2923 | fi 2924 | rm -f core conftest.err conftest.$ac_objext \ 2925 | conftest$ac_exeext conftest.$ac_ext 2926 | 2927 | SYSFONTS_CPPFLAGS="${FT_CPPFLAGS} ${LIBPNG_CPPFLAGS} ${ZLIB_CPPFLAGS}" 2928 | SYSFONTS_LIBS="${FT_LIBS} ${LIBPNG_LIBS} ${ZLIB_LIBS}" 2929 | 2930 | 2931 | 2932 | ac_config_files="$ac_config_files src/Makevars" 2933 | 2934 | cat >confcache <<\_ACEOF 2935 | # This file is a shell script that caches the results of configure 2936 | # tests run on this system so they can be shared between configure 2937 | # scripts and configure runs, see configure's option --config-cache. 2938 | # It is not useful on other systems. If it contains results you don't 2939 | # want to keep, you may remove or edit it. 2940 | # 2941 | # config.status only pays attention to the cache file if you give it 2942 | # the --recheck option to rerun configure. 2943 | # 2944 | # `ac_cv_env_foo' variables (set or unset) will be overridden when 2945 | # loading this file, other *unset* `ac_cv_foo' will be assigned the 2946 | # following values. 2947 | 2948 | _ACEOF 2949 | 2950 | # The following way of writing the cache mishandles newlines in values, 2951 | # but we know of no workaround that is simple, portable, and efficient. 2952 | # So, we kill variables containing newlines. 2953 | # Ultrix sh set writes to stderr and can't be redirected directly, 2954 | # and sets the high bit in the cache file unless we assign to the vars. 2955 | ( 2956 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do 2957 | eval ac_val=\$$ac_var 2958 | case $ac_val in #( 2959 | *${as_nl}*) 2960 | case $ac_var in #( 2961 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 2962 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 2963 | esac 2964 | case $ac_var in #( 2965 | _ | IFS | as_nl) ;; #( 2966 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 2967 | *) { eval $ac_var=; unset $ac_var;} ;; 2968 | esac ;; 2969 | esac 2970 | done 2971 | 2972 | (set) 2>&1 | 2973 | case $as_nl`(ac_space=' '; set) 2>&1` in #( 2974 | *${as_nl}ac_space=\ *) 2975 | # `set' does not quote correctly, so add quotes: double-quote 2976 | # substitution turns \\\\ into \\, and sed turns \\ into \. 2977 | sed -n \ 2978 | "s/'/'\\\\''/g; 2979 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" 2980 | ;; #( 2981 | *) 2982 | # `set' quotes correctly as required by POSIX, so do not add quotes. 2983 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 2984 | ;; 2985 | esac | 2986 | sort 2987 | ) | 2988 | sed ' 2989 | /^ac_cv_env_/b end 2990 | t clear 2991 | :clear 2992 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ 2993 | t end 2994 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ 2995 | :end' >>confcache 2996 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else 2997 | if test -w "$cache_file"; then 2998 | if test "x$cache_file" != "x/dev/null"; then 2999 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 3000 | $as_echo "$as_me: updating cache $cache_file" >&6;} 3001 | if test ! -f "$cache_file" || test -h "$cache_file"; then 3002 | cat confcache >"$cache_file" 3003 | else 3004 | case $cache_file in #( 3005 | */* | ?:*) 3006 | mv -f confcache "$cache_file"$$ && 3007 | mv -f "$cache_file"$$ "$cache_file" ;; #( 3008 | *) 3009 | mv -f confcache "$cache_file" ;; 3010 | esac 3011 | fi 3012 | fi 3013 | else 3014 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 3015 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 3016 | fi 3017 | fi 3018 | rm -f confcache 3019 | 3020 | test "x$prefix" = xNONE && prefix=$ac_default_prefix 3021 | # Let make expand exec_prefix. 3022 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 3023 | 3024 | # Transform confdefs.h into DEFS. 3025 | # Protect against shell expansion while executing Makefile rules. 3026 | # Protect against Makefile macro expansion. 3027 | # 3028 | # If the first sed substitution is executed (which looks for macros that 3029 | # take arguments), then branch to the quote section. Otherwise, 3030 | # look for a macro that doesn't take arguments. 3031 | ac_script=' 3032 | :mline 3033 | /\\$/{ 3034 | N 3035 | s,\\\n,, 3036 | b mline 3037 | } 3038 | t clear 3039 | :clear 3040 | s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g 3041 | t quote 3042 | s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g 3043 | t quote 3044 | b any 3045 | :quote 3046 | s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g 3047 | s/\[/\\&/g 3048 | s/\]/\\&/g 3049 | s/\$/$$/g 3050 | H 3051 | :any 3052 | ${ 3053 | g 3054 | s/^\n// 3055 | s/\n/ /g 3056 | p 3057 | } 3058 | ' 3059 | DEFS=`sed -n "$ac_script" confdefs.h` 3060 | 3061 | 3062 | ac_libobjs= 3063 | ac_ltlibobjs= 3064 | U= 3065 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 3066 | # 1. Remove the extension, and $U if already installed. 3067 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 3068 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` 3069 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR 3070 | # will be set to the directory where LIBOBJS objects are built. 3071 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" 3072 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' 3073 | done 3074 | LIBOBJS=$ac_libobjs 3075 | 3076 | LTLIBOBJS=$ac_ltlibobjs 3077 | 3078 | 3079 | 3080 | : "${CONFIG_STATUS=./config.status}" 3081 | ac_write_fail=0 3082 | ac_clean_files_save=$ac_clean_files 3083 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" 3084 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 3085 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} 3086 | as_write_fail=0 3087 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 3088 | #! $SHELL 3089 | # Generated by $as_me. 3090 | # Run this file to recreate the current configuration. 3091 | # Compiler output produced by configure, useful for debugging 3092 | # configure, is in config.log if it exists. 3093 | 3094 | debug=false 3095 | ac_cs_recheck=false 3096 | ac_cs_silent=false 3097 | 3098 | SHELL=\${CONFIG_SHELL-$SHELL} 3099 | export SHELL 3100 | _ASEOF 3101 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 3102 | ## -------------------- ## 3103 | ## M4sh Initialization. ## 3104 | ## -------------------- ## 3105 | 3106 | # Be more Bourne compatible 3107 | DUALCASE=1; export DUALCASE # for MKS sh 3108 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 3109 | emulate sh 3110 | NULLCMD=: 3111 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 3112 | # is contrary to our usage. Disable this feature. 3113 | alias -g '${1+"$@"}'='"$@"' 3114 | setopt NO_GLOB_SUBST 3115 | else 3116 | case `(set -o) 2>/dev/null` in #( 3117 | *posix*) : 3118 | set -o posix ;; #( 3119 | *) : 3120 | ;; 3121 | esac 3122 | fi 3123 | 3124 | 3125 | as_nl=' 3126 | ' 3127 | export as_nl 3128 | # Printing a long string crashes Solaris 7 /usr/bin/printf. 3129 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 3130 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 3131 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 3132 | # Prefer a ksh shell builtin over an external printf program on Solaris, 3133 | # but without wasting forks for bash or zsh. 3134 | if test -z "$BASH_VERSION$ZSH_VERSION" \ 3135 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 3136 | as_echo='print -r --' 3137 | as_echo_n='print -rn --' 3138 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 3139 | as_echo='printf %s\n' 3140 | as_echo_n='printf %s' 3141 | else 3142 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 3143 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 3144 | as_echo_n='/usr/ucb/echo -n' 3145 | else 3146 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 3147 | as_echo_n_body='eval 3148 | arg=$1; 3149 | case $arg in #( 3150 | *"$as_nl"*) 3151 | expr "X$arg" : "X\\(.*\\)$as_nl"; 3152 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 3153 | esac; 3154 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 3155 | ' 3156 | export as_echo_n_body 3157 | as_echo_n='sh -c $as_echo_n_body as_echo' 3158 | fi 3159 | export as_echo_body 3160 | as_echo='sh -c $as_echo_body as_echo' 3161 | fi 3162 | 3163 | # The user is always right. 3164 | if test "${PATH_SEPARATOR+set}" != set; then 3165 | PATH_SEPARATOR=: 3166 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 3167 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 3168 | PATH_SEPARATOR=';' 3169 | } 3170 | fi 3171 | 3172 | 3173 | # IFS 3174 | # We need space, tab and new line, in precisely that order. Quoting is 3175 | # there to prevent editors from complaining about space-tab. 3176 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word 3177 | # splitting by setting IFS to empty value.) 3178 | IFS=" "" $as_nl" 3179 | 3180 | # Find who we are. Look in the path if we contain no directory separator. 3181 | as_myself= 3182 | case $0 in #(( 3183 | *[\\/]* ) as_myself=$0 ;; 3184 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3185 | for as_dir in $PATH 3186 | do 3187 | IFS=$as_save_IFS 3188 | test -z "$as_dir" && as_dir=. 3189 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 3190 | done 3191 | IFS=$as_save_IFS 3192 | 3193 | ;; 3194 | esac 3195 | # We did not find ourselves, most probably we were run as `sh COMMAND' 3196 | # in which case we are not to be found in the path. 3197 | if test "x$as_myself" = x; then 3198 | as_myself=$0 3199 | fi 3200 | if test ! -f "$as_myself"; then 3201 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 3202 | exit 1 3203 | fi 3204 | 3205 | # Unset variables that we do not need and which cause bugs (e.g. in 3206 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 3207 | # suppresses any "Segmentation fault" message there. '((' could 3208 | # trigger a bug in pdksh 5.2.14. 3209 | for as_var in BASH_ENV ENV MAIL MAILPATH 3210 | do eval test x\${$as_var+set} = xset \ 3211 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 3212 | done 3213 | PS1='$ ' 3214 | PS2='> ' 3215 | PS4='+ ' 3216 | 3217 | # NLS nuisances. 3218 | LC_ALL=C 3219 | export LC_ALL 3220 | LANGUAGE=C 3221 | export LANGUAGE 3222 | 3223 | # CDPATH. 3224 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 3225 | 3226 | 3227 | # as_fn_error STATUS ERROR [LINENO LOG_FD] 3228 | # ---------------------------------------- 3229 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 3230 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the 3231 | # script with STATUS, using 1 if that was 0. 3232 | as_fn_error () 3233 | { 3234 | as_status=$1; test $as_status -eq 0 && as_status=1 3235 | if test "$4"; then 3236 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 3237 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 3238 | fi 3239 | $as_echo "$as_me: error: $2" >&2 3240 | as_fn_exit $as_status 3241 | } # as_fn_error 3242 | 3243 | 3244 | # as_fn_set_status STATUS 3245 | # ----------------------- 3246 | # Set $? to STATUS, without forking. 3247 | as_fn_set_status () 3248 | { 3249 | return $1 3250 | } # as_fn_set_status 3251 | 3252 | # as_fn_exit STATUS 3253 | # ----------------- 3254 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 3255 | as_fn_exit () 3256 | { 3257 | set +e 3258 | as_fn_set_status $1 3259 | exit $1 3260 | } # as_fn_exit 3261 | 3262 | # as_fn_unset VAR 3263 | # --------------- 3264 | # Portably unset VAR. 3265 | as_fn_unset () 3266 | { 3267 | { eval $1=; unset $1;} 3268 | } 3269 | as_unset=as_fn_unset 3270 | # as_fn_append VAR VALUE 3271 | # ---------------------- 3272 | # Append the text in VALUE to the end of the definition contained in VAR. Take 3273 | # advantage of any shell optimizations that allow amortized linear growth over 3274 | # repeated appends, instead of the typical quadratic growth present in naive 3275 | # implementations. 3276 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 3277 | eval 'as_fn_append () 3278 | { 3279 | eval $1+=\$2 3280 | }' 3281 | else 3282 | as_fn_append () 3283 | { 3284 | eval $1=\$$1\$2 3285 | } 3286 | fi # as_fn_append 3287 | 3288 | # as_fn_arith ARG... 3289 | # ------------------ 3290 | # Perform arithmetic evaluation on the ARGs, and store the result in the 3291 | # global $as_val. Take advantage of shells that can avoid forks. The arguments 3292 | # must be portable across $(()) and expr. 3293 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 3294 | eval 'as_fn_arith () 3295 | { 3296 | as_val=$(( $* )) 3297 | }' 3298 | else 3299 | as_fn_arith () 3300 | { 3301 | as_val=`expr "$@" || test $? -eq 1` 3302 | } 3303 | fi # as_fn_arith 3304 | 3305 | 3306 | if expr a : '\(a\)' >/dev/null 2>&1 && 3307 | test "X`expr 00001 : '.*\(...\)'`" = X001; then 3308 | as_expr=expr 3309 | else 3310 | as_expr=false 3311 | fi 3312 | 3313 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 3314 | as_basename=basename 3315 | else 3316 | as_basename=false 3317 | fi 3318 | 3319 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 3320 | as_dirname=dirname 3321 | else 3322 | as_dirname=false 3323 | fi 3324 | 3325 | as_me=`$as_basename -- "$0" || 3326 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 3327 | X"$0" : 'X\(//\)$' \| \ 3328 | X"$0" : 'X\(/\)' \| . 2>/dev/null || 3329 | $as_echo X/"$0" | 3330 | sed '/^.*\/\([^/][^/]*\)\/*$/{ 3331 | s//\1/ 3332 | q 3333 | } 3334 | /^X\/\(\/\/\)$/{ 3335 | s//\1/ 3336 | q 3337 | } 3338 | /^X\/\(\/\).*/{ 3339 | s//\1/ 3340 | q 3341 | } 3342 | s/.*/./; q'` 3343 | 3344 | # Avoid depending upon Character Ranges. 3345 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' 3346 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 3347 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS 3348 | as_cr_digits='0123456789' 3349 | as_cr_alnum=$as_cr_Letters$as_cr_digits 3350 | 3351 | ECHO_C= ECHO_N= ECHO_T= 3352 | case `echo -n x` in #((((( 3353 | -n*) 3354 | case `echo 'xy\c'` in 3355 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. 3356 | xy) ECHO_C='\c';; 3357 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 3358 | ECHO_T=' ';; 3359 | esac;; 3360 | *) 3361 | ECHO_N='-n';; 3362 | esac 3363 | 3364 | rm -f conf$$ conf$$.exe conf$$.file 3365 | if test -d conf$$.dir; then 3366 | rm -f conf$$.dir/conf$$.file 3367 | else 3368 | rm -f conf$$.dir 3369 | mkdir conf$$.dir 2>/dev/null 3370 | fi 3371 | if (echo >conf$$.file) 2>/dev/null; then 3372 | if ln -s conf$$.file conf$$ 2>/dev/null; then 3373 | as_ln_s='ln -s' 3374 | # ... but there are two gotchas: 3375 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 3376 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 3377 | # In both cases, we have to default to `cp -pR'. 3378 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 3379 | as_ln_s='cp -pR' 3380 | elif ln conf$$.file conf$$ 2>/dev/null; then 3381 | as_ln_s=ln 3382 | else 3383 | as_ln_s='cp -pR' 3384 | fi 3385 | else 3386 | as_ln_s='cp -pR' 3387 | fi 3388 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 3389 | rmdir conf$$.dir 2>/dev/null 3390 | 3391 | 3392 | # as_fn_mkdir_p 3393 | # ------------- 3394 | # Create "$as_dir" as a directory, including parents if necessary. 3395 | as_fn_mkdir_p () 3396 | { 3397 | 3398 | case $as_dir in #( 3399 | -*) as_dir=./$as_dir;; 3400 | esac 3401 | test -d "$as_dir" || eval $as_mkdir_p || { 3402 | as_dirs= 3403 | while :; do 3404 | case $as_dir in #( 3405 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 3406 | *) as_qdir=$as_dir;; 3407 | esac 3408 | as_dirs="'$as_qdir' $as_dirs" 3409 | as_dir=`$as_dirname -- "$as_dir" || 3410 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 3411 | X"$as_dir" : 'X\(//\)[^/]' \| \ 3412 | X"$as_dir" : 'X\(//\)$' \| \ 3413 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 3414 | $as_echo X"$as_dir" | 3415 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 3416 | s//\1/ 3417 | q 3418 | } 3419 | /^X\(\/\/\)[^/].*/{ 3420 | s//\1/ 3421 | q 3422 | } 3423 | /^X\(\/\/\)$/{ 3424 | s//\1/ 3425 | q 3426 | } 3427 | /^X\(\/\).*/{ 3428 | s//\1/ 3429 | q 3430 | } 3431 | s/.*/./; q'` 3432 | test -d "$as_dir" && break 3433 | done 3434 | test -z "$as_dirs" || eval "mkdir $as_dirs" 3435 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 3436 | 3437 | 3438 | } # as_fn_mkdir_p 3439 | if mkdir -p . 2>/dev/null; then 3440 | as_mkdir_p='mkdir -p "$as_dir"' 3441 | else 3442 | test -d ./-p && rmdir ./-p 3443 | as_mkdir_p=false 3444 | fi 3445 | 3446 | 3447 | # as_fn_executable_p FILE 3448 | # ----------------------- 3449 | # Test if FILE is an executable regular file. 3450 | as_fn_executable_p () 3451 | { 3452 | test -f "$1" && test -x "$1" 3453 | } # as_fn_executable_p 3454 | as_test_x='test -x' 3455 | as_executable_p=as_fn_executable_p 3456 | 3457 | # Sed expression to map a string onto a valid CPP name. 3458 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 3459 | 3460 | # Sed expression to map a string onto a valid variable name. 3461 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 3462 | 3463 | 3464 | exec 6>&1 3465 | ## ----------------------------------- ## 3466 | ## Main body of $CONFIG_STATUS script. ## 3467 | ## ----------------------------------- ## 3468 | _ASEOF 3469 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 3470 | 3471 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 3472 | # Save the log message, to keep $0 and so on meaningful, and to 3473 | # report actual input values of CONFIG_FILES etc. instead of their 3474 | # values after options handling. 3475 | ac_log=" 3476 | This file was extended by sysfonts $as_me 0.8, which was 3477 | generated by GNU Autoconf 2.69. Invocation command line was 3478 | 3479 | CONFIG_FILES = $CONFIG_FILES 3480 | CONFIG_HEADERS = $CONFIG_HEADERS 3481 | CONFIG_LINKS = $CONFIG_LINKS 3482 | CONFIG_COMMANDS = $CONFIG_COMMANDS 3483 | $ $0 $@ 3484 | 3485 | on `(hostname || uname -n) 2>/dev/null | sed 1q` 3486 | " 3487 | 3488 | _ACEOF 3489 | 3490 | case $ac_config_files in *" 3491 | "*) set x $ac_config_files; shift; ac_config_files=$*;; 3492 | esac 3493 | 3494 | 3495 | 3496 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 3497 | # Files that config.status was made for. 3498 | config_files="$ac_config_files" 3499 | 3500 | _ACEOF 3501 | 3502 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 3503 | ac_cs_usage="\ 3504 | \`$as_me' instantiates files and other configuration actions 3505 | from templates according to the current configuration. Unless the files 3506 | and actions are specified as TAGs, all are instantiated by default. 3507 | 3508 | Usage: $0 [OPTION]... [TAG]... 3509 | 3510 | -h, --help print this help, then exit 3511 | -V, --version print version number and configuration settings, then exit 3512 | --config print configuration, then exit 3513 | -q, --quiet, --silent 3514 | do not print progress messages 3515 | -d, --debug don't remove temporary files 3516 | --recheck update $as_me by reconfiguring in the same conditions 3517 | --file=FILE[:TEMPLATE] 3518 | instantiate the configuration file FILE 3519 | 3520 | Configuration files: 3521 | $config_files 3522 | 3523 | Report bugs to ." 3524 | 3525 | _ACEOF 3526 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 3527 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" 3528 | ac_cs_version="\\ 3529 | sysfonts config.status 0.8 3530 | configured by $0, generated by GNU Autoconf 2.69, 3531 | with options \\"\$ac_cs_config\\" 3532 | 3533 | Copyright (C) 2012 Free Software Foundation, Inc. 3534 | This config.status script is free software; the Free Software Foundation 3535 | gives unlimited permission to copy, distribute and modify it." 3536 | 3537 | ac_pwd='$ac_pwd' 3538 | srcdir='$srcdir' 3539 | test -n "\$AWK" || AWK=awk 3540 | _ACEOF 3541 | 3542 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 3543 | # The default lists apply if the user does not specify any file. 3544 | ac_need_defaults=: 3545 | while test $# != 0 3546 | do 3547 | case $1 in 3548 | --*=?*) 3549 | ac_option=`expr "X$1" : 'X\([^=]*\)='` 3550 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` 3551 | ac_shift=: 3552 | ;; 3553 | --*=) 3554 | ac_option=`expr "X$1" : 'X\([^=]*\)='` 3555 | ac_optarg= 3556 | ac_shift=: 3557 | ;; 3558 | *) 3559 | ac_option=$1 3560 | ac_optarg=$2 3561 | ac_shift=shift 3562 | ;; 3563 | esac 3564 | 3565 | case $ac_option in 3566 | # Handling of the options. 3567 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 3568 | ac_cs_recheck=: ;; 3569 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) 3570 | $as_echo "$ac_cs_version"; exit ;; 3571 | --config | --confi | --conf | --con | --co | --c ) 3572 | $as_echo "$ac_cs_config"; exit ;; 3573 | --debug | --debu | --deb | --de | --d | -d ) 3574 | debug=: ;; 3575 | --file | --fil | --fi | --f ) 3576 | $ac_shift 3577 | case $ac_optarg in 3578 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 3579 | '') as_fn_error $? "missing file argument" ;; 3580 | esac 3581 | as_fn_append CONFIG_FILES " '$ac_optarg'" 3582 | ac_need_defaults=false;; 3583 | --he | --h | --help | --hel | -h ) 3584 | $as_echo "$ac_cs_usage"; exit ;; 3585 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 3586 | | -silent | --silent | --silen | --sile | --sil | --si | --s) 3587 | ac_cs_silent=: ;; 3588 | 3589 | # This is an error. 3590 | -*) as_fn_error $? "unrecognized option: \`$1' 3591 | Try \`$0 --help' for more information." ;; 3592 | 3593 | *) as_fn_append ac_config_targets " $1" 3594 | ac_need_defaults=false ;; 3595 | 3596 | esac 3597 | shift 3598 | done 3599 | 3600 | ac_configure_extra_args= 3601 | 3602 | if $ac_cs_silent; then 3603 | exec 6>/dev/null 3604 | ac_configure_extra_args="$ac_configure_extra_args --silent" 3605 | fi 3606 | 3607 | _ACEOF 3608 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 3609 | if \$ac_cs_recheck; then 3610 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 3611 | shift 3612 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 3613 | CONFIG_SHELL='$SHELL' 3614 | export CONFIG_SHELL 3615 | exec "\$@" 3616 | fi 3617 | 3618 | _ACEOF 3619 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 3620 | exec 5>>config.log 3621 | { 3622 | echo 3623 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 3624 | ## Running $as_me. ## 3625 | _ASBOX 3626 | $as_echo "$ac_log" 3627 | } >&5 3628 | 3629 | _ACEOF 3630 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 3631 | _ACEOF 3632 | 3633 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 3634 | 3635 | # Handling of arguments. 3636 | for ac_config_target in $ac_config_targets 3637 | do 3638 | case $ac_config_target in 3639 | "src/Makevars") CONFIG_FILES="$CONFIG_FILES src/Makevars" ;; 3640 | 3641 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 3642 | esac 3643 | done 3644 | 3645 | 3646 | # If the user did not use the arguments to specify the items to instantiate, 3647 | # then the envvar interface is used. Set only those that are not. 3648 | # We use the long form for the default assignment because of an extremely 3649 | # bizarre bug on SunOS 4.1.3. 3650 | if $ac_need_defaults; then 3651 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files 3652 | fi 3653 | 3654 | # Have a temporary directory for convenience. Make it in the build tree 3655 | # simply because there is no reason against having it here, and in addition, 3656 | # creating and moving files from /tmp can sometimes cause problems. 3657 | # Hook for its removal unless debugging. 3658 | # Note that there is a small window in which the directory will not be cleaned: 3659 | # after its creation but before its name has been assigned to `$tmp'. 3660 | $debug || 3661 | { 3662 | tmp= ac_tmp= 3663 | trap 'exit_status=$? 3664 | : "${ac_tmp:=$tmp}" 3665 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status 3666 | ' 0 3667 | trap 'as_fn_exit 1' 1 2 13 15 3668 | } 3669 | # Create a (secure) tmp directory for tmp files. 3670 | 3671 | { 3672 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && 3673 | test -d "$tmp" 3674 | } || 3675 | { 3676 | tmp=./conf$$-$RANDOM 3677 | (umask 077 && mkdir "$tmp") 3678 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 3679 | ac_tmp=$tmp 3680 | 3681 | # Set up the scripts for CONFIG_FILES section. 3682 | # No need to generate them if there are no CONFIG_FILES. 3683 | # This happens for instance with `./config.status config.h'. 3684 | if test -n "$CONFIG_FILES"; then 3685 | 3686 | 3687 | ac_cr=`echo X | tr X '\015'` 3688 | # On cygwin, bash can eat \r inside `` if the user requested igncr. 3689 | # But we know of no other shell where ac_cr would be empty at this 3690 | # point, so we can use a bashism as a fallback. 3691 | if test "x$ac_cr" = x; then 3692 | eval ac_cr=\$\'\\r\' 3693 | fi 3694 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` 3695 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 3696 | ac_cs_awk_cr='\\r' 3697 | else 3698 | ac_cs_awk_cr=$ac_cr 3699 | fi 3700 | 3701 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && 3702 | _ACEOF 3703 | 3704 | 3705 | { 3706 | echo "cat >conf$$subs.awk <<_ACEOF" && 3707 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && 3708 | echo "_ACEOF" 3709 | } >conf$$subs.sh || 3710 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 3711 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` 3712 | ac_delim='%!_!# ' 3713 | for ac_last_try in false false false false false :; do 3714 | . ./conf$$subs.sh || 3715 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 3716 | 3717 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` 3718 | if test $ac_delim_n = $ac_delim_num; then 3719 | break 3720 | elif $ac_last_try; then 3721 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 3722 | else 3723 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 3724 | fi 3725 | done 3726 | rm -f conf$$subs.sh 3727 | 3728 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 3729 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && 3730 | _ACEOF 3731 | sed -n ' 3732 | h 3733 | s/^/S["/; s/!.*/"]=/ 3734 | p 3735 | g 3736 | s/^[^!]*!// 3737 | :repl 3738 | t repl 3739 | s/'"$ac_delim"'$// 3740 | t delim 3741 | :nl 3742 | h 3743 | s/\(.\{148\}\)..*/\1/ 3744 | t more1 3745 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ 3746 | p 3747 | n 3748 | b repl 3749 | :more1 3750 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 3751 | p 3752 | g 3753 | s/.\{148\}// 3754 | t nl 3755 | :delim 3756 | h 3757 | s/\(.\{148\}\)..*/\1/ 3758 | t more2 3759 | s/["\\]/\\&/g; s/^/"/; s/$/"/ 3760 | p 3761 | b 3762 | :more2 3763 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 3764 | p 3765 | g 3766 | s/.\{148\}// 3767 | t delim 3768 | ' >$CONFIG_STATUS || ac_write_fail=1 3774 | rm -f conf$$subs.awk 3775 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 3776 | _ACAWK 3777 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && 3778 | for (key in S) S_is_set[key] = 1 3779 | FS = "" 3780 | 3781 | } 3782 | { 3783 | line = $ 0 3784 | nfields = split(line, field, "@") 3785 | substed = 0 3786 | len = length(field[1]) 3787 | for (i = 2; i < nfields; i++) { 3788 | key = field[i] 3789 | keylen = length(key) 3790 | if (S_is_set[key]) { 3791 | value = S[key] 3792 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) 3793 | len += length(value) + length(field[++i]) 3794 | substed = 1 3795 | } else 3796 | len += 1 + keylen 3797 | } 3798 | 3799 | print line 3800 | } 3801 | 3802 | _ACAWK 3803 | _ACEOF 3804 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 3805 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then 3806 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" 3807 | else 3808 | cat 3809 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ 3810 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 3811 | _ACEOF 3812 | 3813 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), 3814 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and 3815 | # trailing colons and then remove the whole line if VPATH becomes empty 3816 | # (actually we leave an empty line to preserve line numbers). 3817 | if test "x$srcdir" = x.; then 3818 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ 3819 | h 3820 | s/// 3821 | s/^/:/ 3822 | s/[ ]*$/:/ 3823 | s/:\$(srcdir):/:/g 3824 | s/:\${srcdir}:/:/g 3825 | s/:@srcdir@:/:/g 3826 | s/^:*// 3827 | s/:*$// 3828 | x 3829 | s/\(=[ ]*\).*/\1/ 3830 | G 3831 | s/\n// 3832 | s/^[^=]*=[ ]*$// 3833 | }' 3834 | fi 3835 | 3836 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 3837 | fi # test -n "$CONFIG_FILES" 3838 | 3839 | 3840 | eval set X " :F $CONFIG_FILES " 3841 | shift 3842 | for ac_tag 3843 | do 3844 | case $ac_tag in 3845 | :[FHLC]) ac_mode=$ac_tag; continue;; 3846 | esac 3847 | case $ac_mode$ac_tag in 3848 | :[FHL]*:*);; 3849 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; 3850 | :[FH]-) ac_tag=-:-;; 3851 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 3852 | esac 3853 | ac_save_IFS=$IFS 3854 | IFS=: 3855 | set x $ac_tag 3856 | IFS=$ac_save_IFS 3857 | shift 3858 | ac_file=$1 3859 | shift 3860 | 3861 | case $ac_mode in 3862 | :L) ac_source=$1;; 3863 | :[FH]) 3864 | ac_file_inputs= 3865 | for ac_f 3866 | do 3867 | case $ac_f in 3868 | -) ac_f="$ac_tmp/stdin";; 3869 | *) # Look for the file first in the build tree, then in the source tree 3870 | # (if the path is not absolute). The absolute path cannot be DOS-style, 3871 | # because $ac_f cannot contain `:'. 3872 | test -f "$ac_f" || 3873 | case $ac_f in 3874 | [\\/$]*) false;; 3875 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 3876 | esac || 3877 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; 3878 | esac 3879 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac 3880 | as_fn_append ac_file_inputs " '$ac_f'" 3881 | done 3882 | 3883 | # Let's still pretend it is `configure' which instantiates (i.e., don't 3884 | # use $as_me), people would be surprised to read: 3885 | # /* config.h. Generated by config.status. */ 3886 | configure_input='Generated from '` 3887 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' 3888 | `' by configure.' 3889 | if test x"$ac_file" != x-; then 3890 | configure_input="$ac_file. $configure_input" 3891 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 3892 | $as_echo "$as_me: creating $ac_file" >&6;} 3893 | fi 3894 | # Neutralize special characters interpreted by sed in replacement strings. 3895 | case $configure_input in #( 3896 | *\&* | *\|* | *\\* ) 3897 | ac_sed_conf_input=`$as_echo "$configure_input" | 3898 | sed 's/[\\\\&|]/\\\\&/g'`;; #( 3899 | *) ac_sed_conf_input=$configure_input;; 3900 | esac 3901 | 3902 | case $ac_tag in 3903 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ 3904 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; 3905 | esac 3906 | ;; 3907 | esac 3908 | 3909 | ac_dir=`$as_dirname -- "$ac_file" || 3910 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 3911 | X"$ac_file" : 'X\(//\)[^/]' \| \ 3912 | X"$ac_file" : 'X\(//\)$' \| \ 3913 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || 3914 | $as_echo X"$ac_file" | 3915 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 3916 | s//\1/ 3917 | q 3918 | } 3919 | /^X\(\/\/\)[^/].*/{ 3920 | s//\1/ 3921 | q 3922 | } 3923 | /^X\(\/\/\)$/{ 3924 | s//\1/ 3925 | q 3926 | } 3927 | /^X\(\/\).*/{ 3928 | s//\1/ 3929 | q 3930 | } 3931 | s/.*/./; q'` 3932 | as_dir="$ac_dir"; as_fn_mkdir_p 3933 | ac_builddir=. 3934 | 3935 | case "$ac_dir" in 3936 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 3937 | *) 3938 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 3939 | # A ".." for each directory in $ac_dir_suffix. 3940 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 3941 | case $ac_top_builddir_sub in 3942 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 3943 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 3944 | esac ;; 3945 | esac 3946 | ac_abs_top_builddir=$ac_pwd 3947 | ac_abs_builddir=$ac_pwd$ac_dir_suffix 3948 | # for backward compatibility: 3949 | ac_top_builddir=$ac_top_build_prefix 3950 | 3951 | case $srcdir in 3952 | .) # We are building in place. 3953 | ac_srcdir=. 3954 | ac_top_srcdir=$ac_top_builddir_sub 3955 | ac_abs_top_srcdir=$ac_pwd ;; 3956 | [\\/]* | ?:[\\/]* ) # Absolute name. 3957 | ac_srcdir=$srcdir$ac_dir_suffix; 3958 | ac_top_srcdir=$srcdir 3959 | ac_abs_top_srcdir=$srcdir ;; 3960 | *) # Relative name. 3961 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 3962 | ac_top_srcdir=$ac_top_build_prefix$srcdir 3963 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 3964 | esac 3965 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 3966 | 3967 | 3968 | case $ac_mode in 3969 | :F) 3970 | # 3971 | # CONFIG_FILE 3972 | # 3973 | 3974 | _ACEOF 3975 | 3976 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 3977 | # If the template does not know about datarootdir, expand it. 3978 | # FIXME: This hack should be removed a few years after 2.60. 3979 | ac_datarootdir_hack=; ac_datarootdir_seen= 3980 | ac_sed_dataroot=' 3981 | /datarootdir/ { 3982 | p 3983 | q 3984 | } 3985 | /@datadir@/p 3986 | /@docdir@/p 3987 | /@infodir@/p 3988 | /@localedir@/p 3989 | /@mandir@/p' 3990 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in 3991 | *datarootdir*) ac_datarootdir_seen=yes;; 3992 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) 3993 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 3994 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} 3995 | _ACEOF 3996 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 3997 | ac_datarootdir_hack=' 3998 | s&@datadir@&$datadir&g 3999 | s&@docdir@&$docdir&g 4000 | s&@infodir@&$infodir&g 4001 | s&@localedir@&$localedir&g 4002 | s&@mandir@&$mandir&g 4003 | s&\\\${datarootdir}&$datarootdir&g' ;; 4004 | esac 4005 | _ACEOF 4006 | 4007 | # Neutralize VPATH when `$srcdir' = `.'. 4008 | # Shell code in configure.ac might set extrasub. 4009 | # FIXME: do we really want to maintain this feature? 4010 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 4011 | ac_sed_extra="$ac_vpsub 4012 | $extrasub 4013 | _ACEOF 4014 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 4015 | :t 4016 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b 4017 | s|@configure_input@|$ac_sed_conf_input|;t t 4018 | s&@top_builddir@&$ac_top_builddir_sub&;t t 4019 | s&@top_build_prefix@&$ac_top_build_prefix&;t t 4020 | s&@srcdir@&$ac_srcdir&;t t 4021 | s&@abs_srcdir@&$ac_abs_srcdir&;t t 4022 | s&@top_srcdir@&$ac_top_srcdir&;t t 4023 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t 4024 | s&@builddir@&$ac_builddir&;t t 4025 | s&@abs_builddir@&$ac_abs_builddir&;t t 4026 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t 4027 | $ac_datarootdir_hack 4028 | " 4029 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ 4030 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 4031 | 4032 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 4033 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && 4034 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ 4035 | "$ac_tmp/out"`; test -z "$ac_out"; } && 4036 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' 4037 | which seems to be undefined. Please make sure it is defined" >&5 4038 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' 4039 | which seems to be undefined. Please make sure it is defined" >&2;} 4040 | 4041 | rm -f "$ac_tmp/stdin" 4042 | case $ac_file in 4043 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; 4044 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; 4045 | esac \ 4046 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 4047 | ;; 4048 | 4049 | 4050 | 4051 | esac 4052 | 4053 | done # for ac_tag 4054 | 4055 | 4056 | as_fn_exit 0 4057 | _ACEOF 4058 | ac_clean_files=$ac_clean_files_save 4059 | 4060 | test $ac_write_fail = 0 || 4061 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 4062 | 4063 | 4064 | # configure is writing to config.log, and then calls config.status. 4065 | # config.status does its own redirection, appending to config.log. 4066 | # Unfortunately, on DOS this fails, as config.log is still kept open 4067 | # by configure, so config.status won't be able to write to it; its 4068 | # output is simply discarded. So we exec the FD to /dev/null, 4069 | # effectively closing config.log, so it can be properly (re)opened and 4070 | # appended to by config.status. When coming back to configure, we 4071 | # need to make the FD available again. 4072 | if test "$no_create" != yes; then 4073 | ac_cs_success=: 4074 | ac_config_status_args= 4075 | test "$silent" = yes && 4076 | ac_config_status_args="$ac_config_status_args --quiet" 4077 | exec 5>/dev/null 4078 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 4079 | exec 5>>config.log 4080 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which 4081 | # would make configure fail if this is the last instruction. 4082 | $ac_cs_success || as_fn_exit 1 4083 | fi 4084 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then 4085 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 4086 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} 4087 | fi 4088 | 4089 | 4090 | --------------------------------------------------------------------------------