Fix xmkmf build process for fontconfig
This commit is contained in:
parent
179c39959c
commit
fb9545b1ba
|
@ -25,7 +25,7 @@ all:: fonts.conf
|
||||||
|
|
||||||
fonts.conf: fonts.conf.in
|
fonts.conf: fonts.conf.in
|
||||||
RemoveFile($@)
|
RemoveFile($@)
|
||||||
sh ./setfontdirs
|
sh ./setfontdirs /usr/share/fonts $(FONTDIR)
|
||||||
|
|
||||||
clean::
|
clean::
|
||||||
RemoveFile(fonts.conf)
|
RemoveFile(fonts.conf)
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
#
|
||||||
|
# $XFree86$
|
||||||
|
#
|
||||||
|
# Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
|
||||||
|
#
|
||||||
|
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||||
|
# documentation for any purpose is hereby granted without fee, provided that
|
||||||
|
# the above copyright notice appear in all copies and that both that
|
||||||
|
# copyright notice and this permission notice appear in supporting
|
||||||
|
# documentation, and that the name of Keith Packard not be used in
|
||||||
|
# advertising or publicity pertaining to distribution of the software without
|
||||||
|
# specific, written prior permission. Keith Packard makes no
|
||||||
|
# representations about the suitability of this software for any purpose. It
|
||||||
|
# is provided "as is" without express or implied warranty.
|
||||||
|
#
|
||||||
|
# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||||
|
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||||
|
# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||||
|
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||||
|
# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||||
|
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
|
# PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
#
|
||||||
|
|
||||||
|
TOPDIR=.
|
||||||
|
|
||||||
|
include $(TOPDIR)/config/Makedefs
|
||||||
|
|
||||||
|
DIRS = src fc-cache fc-list
|
||||||
|
|
||||||
|
all install clean::
|
||||||
|
for d in $(DIRS); do $(MAKE) -C $$d $@; done
|
||||||
|
|
||||||
|
all:: fonts.conf
|
||||||
|
|
||||||
|
fonts.conf: fonts.conf.in
|
||||||
|
rm -f $@
|
||||||
|
sh ./setfontdirs /usr/share/fonts $(FONTDIR)
|
||||||
|
|
||||||
|
install:: $(CONFDIR)/fonts.conf $(CONFDIR)/fonts.dtd
|
||||||
|
|
||||||
|
$(CONFDIR)/fonts.conf:: fonts.conf
|
||||||
|
if [ -f $@ ]; then
|
||||||
|
echo "Not overwriting existing $@"
|
||||||
|
else
|
||||||
|
$(INSTALL_DATA) fonts.conf $(CONFDIR)
|
||||||
|
fi
|
||||||
|
|
||||||
|
$(CONFDIR)/fonts.dtd:: fonts.dtd
|
||||||
|
$(INSTALL_DATA) fonts.dtd $(CONFDIR)
|
||||||
|
|
||||||
|
clean::
|
||||||
|
rm -f fonts.conf
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
#undef HAVE_FREETYPE
|
|
||||||
#undef FC_FALLBACK_FONTS
|
|
|
@ -0,0 +1,144 @@
|
||||||
|
/* config.h.in. Generated manually by keithp. */
|
||||||
|
|
||||||
|
/* Path library uses when config file is broken */
|
||||||
|
#undef FC_FALLBACK_FONTS
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
||||||
|
*/
|
||||||
|
#undef HAVE_DIRENT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
|
||||||
|
#undef HAVE_DOPRNT
|
||||||
|
|
||||||
|
/* Use expat library for xml parsing */
|
||||||
|
#undef HAVE_EXPAT
|
||||||
|
|
||||||
|
/* expat uses old xmlparse.h include */
|
||||||
|
#undef HAVE_XMLPARSE_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||||
|
#undef HAVE_FCNTL_H
|
||||||
|
|
||||||
|
/* whether system has freetype2 library */
|
||||||
|
#undef HAVE_FREETYPE
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <ft2build.h> header file. */
|
||||||
|
#undef HAVE_FT2BUILD_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `FT_Init_FreeType' function. */
|
||||||
|
#undef HAVE_FT_INIT_FREETYPE
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `getopt' function. */
|
||||||
|
#undef HAVE_GETOPT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `getopt_long' function. */
|
||||||
|
#undef HAVE_GETOPT_LONG
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if your system has a working `malloc' function. */
|
||||||
|
#undef HAVE_MALLOC
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `memmove' function. */
|
||||||
|
#undef HAVE_MEMMOVE
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#undef HAVE_MEMORY_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `memset' function. */
|
||||||
|
#undef HAVE_MEMSET
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||||
|
#undef HAVE_NDIR_H
|
||||||
|
|
||||||
|
/* Define to 1 if `stat' has the bug that it succeeds when given the
|
||||||
|
zero-length file name argument. */
|
||||||
|
#undef HAVE_STAT_EMPTY_STRING_BUG
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#undef HAVE_STDINT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strchr' function. */
|
||||||
|
#undef HAVE_STRCHR
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#undef HAVE_STRINGS_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#undef HAVE_STRING_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strrchr' function. */
|
||||||
|
#undef HAVE_STRRCHR
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `strtol' function. */
|
||||||
|
#undef HAVE_STRTOL
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
||||||
|
*/
|
||||||
|
#undef HAVE_SYS_DIR_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
||||||
|
*/
|
||||||
|
#undef HAVE_SYS_NDIR_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#undef HAVE_SYS_STAT_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#undef HAVE_SYS_TYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `vprintf' function. */
|
||||||
|
#undef HAVE_VPRINTF
|
||||||
|
|
||||||
|
/* Use libxml2 library for xml parsing */
|
||||||
|
#undef HAVE_XML2
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `xmlInitParser' function. */
|
||||||
|
#undef HAVE_XMLINITPARSER
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `XML_ParserCreate' function. */
|
||||||
|
#undef HAVE_XML_PARSERCREATE
|
||||||
|
|
||||||
|
/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
|
||||||
|
slash. */
|
||||||
|
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
|
||||||
|
|
||||||
|
/* Define to the address where bug reports for this package should be sent. */
|
||||||
|
#undef PACKAGE_BUGREPORT
|
||||||
|
|
||||||
|
/* Library major version */
|
||||||
|
#undef PACKAGE_MAJOR
|
||||||
|
|
||||||
|
/* Library minor version */
|
||||||
|
#undef PACKAGE_MINOR
|
||||||
|
|
||||||
|
/* Define to the full name of this package. */
|
||||||
|
#undef PACKAGE_NAME
|
||||||
|
|
||||||
|
/* Library revision */
|
||||||
|
#undef PACKAGE_REVISION
|
||||||
|
|
||||||
|
/* Define to the full name and version of this package. */
|
||||||
|
#undef PACKAGE_STRING
|
||||||
|
|
||||||
|
/* Define to the one symbol short name of this package. */
|
||||||
|
#undef PACKAGE_TARNAME
|
||||||
|
|
||||||
|
/* Define to the version of this package. */
|
||||||
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* Define to empty if `const' does not conform to ANSI C. */
|
||||||
|
#undef const
|
||||||
|
|
||||||
|
/* Define to `int' if <sys/types.h> does not define. */
|
||||||
|
#undef pid_t
|
370
configure.in
370
configure.in
|
@ -1,72 +1,110 @@
|
||||||
AC_INIT(fontconfig/fontconfig.h)
|
dnl
|
||||||
|
dnl $XFree86$
|
||||||
|
dnl
|
||||||
|
dnl Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
|
||||||
|
dnl
|
||||||
|
dnl Permission to use, copy, modify, distribute, and sell this software and its
|
||||||
|
dnl documentation for any purpose is hereby granted without fee, provided that
|
||||||
|
dnl the above copyright notice appear in all copies and that both that
|
||||||
|
dnl copyright notice and this permission notice appear in supporting
|
||||||
|
dnl documentation, and that the name of Keith Packard not be used in
|
||||||
|
dnl advertising or publicity pertaining to distribution of the software without
|
||||||
|
dnl specific, written prior permission. Keith Packard makes no
|
||||||
|
dnl representations about the suitability of this software for any purpose. It
|
||||||
|
dnl is provided "as is" without express or implied warranty.
|
||||||
|
dnl
|
||||||
|
dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||||
|
dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||||
|
dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||||
|
dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
||||||
|
dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||||
|
dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
|
dnl PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
dnl
|
||||||
|
|
||||||
AC_PREREQ(2.13)
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
AC_INIT(fontconfig, 1.0.1, fonts@xfree86.org)
|
||||||
FC_MAJOR=1
|
AC_CONFIG_AUX_DIR(config)
|
||||||
FC_MINOR=0
|
AC_CONFIG_HEADER(config.h)
|
||||||
FC_SUB=1
|
|
||||||
FC_PRE=
|
|
||||||
FC_IFACE_AGE=0
|
|
||||||
FC_BIN_AGE=0
|
|
||||||
|
|
||||||
AC_SUBST(FC_MAJOR)
|
|
||||||
AC_SUBST(FC_MINOR)
|
|
||||||
AC_SUBST(FC_SUB)
|
|
||||||
AC_SUBST(FC_IFACE_AGE)
|
|
||||||
AC_SUBST(FC_BIN_AGE)
|
|
||||||
|
|
||||||
LT_RELEASE=$FC_MAJOR.$FC_MINOR
|
|
||||||
LT_CURRENT=`expr $FC_SUB - $FC_IFACE_AGE`
|
|
||||||
LT_REVISION=$FC_IFACE_AGE
|
|
||||||
LT_AGE=`expr $FC_BIN_AGE - $FC_IFACE_AGE`
|
|
||||||
AC_SUBST(LT_RELEASE)
|
|
||||||
AC_SUBST(LT_CURRENT)
|
|
||||||
AC_SUBST(LT_REVISION)
|
|
||||||
AC_SUBST(LT_AGE)
|
|
||||||
|
|
||||||
AM_INIT_AUTOMAKE("fontconfig", $FC_MAJOR.$FC_MINOR.$FC_SUB$FC_PRE)
|
|
||||||
|
|
||||||
AC_CANONICAL_HOST
|
|
||||||
AM_CONFIG_HEADER(config.h)
|
|
||||||
|
|
||||||
AC_ARG_WITH(freetype_includes, [ --with-freetype-includes=DIR Use FreeType includes in DIR], freetype_includes=$withval, freetype_includes=yes)
|
AC_ARG_WITH(freetype_includes, [ --with-freetype-includes=DIR Use FreeType includes in DIR], freetype_includes=$withval, freetype_includes=yes)
|
||||||
AC_ARG_WITH(freetype_lib, [ --with-freetype-lib=DIR Use FreeType library in DIR], freetype_lib=$withval, freetype_lib=yes)
|
AC_ARG_WITH(freetype_lib, [ --with-freetype-lib=DIR Use FreeType library in DIR], freetype_lib=$withval, freetype_lib=yes)
|
||||||
AC_ARG_WITH(freetype_config, [ --with-freeetype-config=PROG Use FreeType configuration program PROG], freetype_config=$withval, freetype_config=yes)
|
AC_ARG_WITH(freetype_config, [ --with-freeetype-config=PROG Use FreeType configuration program PROG], freetype_config=$withval, freetype_config=yes)
|
||||||
AC_ARG_WITH(xml2_includes, [ --with-xml2-includes=DIR Use xml2 includes in DIR], xml2_includes=$withval, xml2_includes=yes)
|
AC_ARG_WITH(expat, [ --with-expat=DIR Use Expat in DIR instead of xml2], expat=$withval, expat=maybe)
|
||||||
AC_ARG_WITH(xml2_lib, [ --with-xml2-lib=DIR Use xml2 library in DIR], xml2_lib=$withval, xml2_lib=yes)
|
AC_ARG_WITH(expat_includes, [ --with-expat-includes=DIR Use Expat includes in DIR], expat_includes=$withval, expat_includes=yes)
|
||||||
AC_ARG_WITH(xml2_config, [ --with-freeetype-config=PROG Use FreeType configuration program PROG], xml2_config=$withval, xml2_config=yes)
|
AC_ARG_WITH(expat_lib, [ --with-expat-lib=DIR Use Expat library in DIR], expat_lib=$withval, expat_lib=yes)
|
||||||
|
AC_ARG_WITH(xml2, [ --with-xml2=DIR Use Libxml2 in DIR instead of expat], xml2=$withval, xml2=maybe)
|
||||||
|
AC_ARG_WITH(xml2_includes, [ --with-xml2-includes=DIR Use Libxml2 includes in DIR], xml2_includes=$withval, xml2_includes=yes)
|
||||||
|
AC_ARG_WITH(xml2_lib, [ --with-xml2-lib=DIR Use Libxml2 library in DIR], xml2_lib=$withval, xml2_lib=yes)
|
||||||
AC_ARG_WITH(fallback_fonts, [ --with-fallback-fonts=DIR Use fonts from DIR when config is busted], fallback_fonts="$withval", fallback_fonts=yes)
|
AC_ARG_WITH(fallback_fonts, [ --with-fallback-fonts=DIR Use fonts from DIR when config is busted], fallback_fonts="$withval", fallback_fonts=yes)
|
||||||
AC_ISC_POSIX
|
|
||||||
AC_PROG_CC
|
|
||||||
AC_STDC_HEADERS
|
|
||||||
AC_PROG_MAKE_SET
|
|
||||||
AC_PROG_INSTALL
|
|
||||||
|
|
||||||
|
# Checks for programs.
|
||||||
|
AC_PROG_CC
|
||||||
|
AC_PROG_INSTALL
|
||||||
AC_PROG_LN_S
|
AC_PROG_LN_S
|
||||||
|
|
||||||
dnl
|
PACKAGE_VERSION=1.0.1
|
||||||
dnl Libtool
|
|
||||||
dnl
|
# Set major version
|
||||||
AM_DISABLE_STATIC
|
PACKAGE_MAJOR=`echo $PACKAGE_VERSION | awk -F . '{ print $1 }'`
|
||||||
AM_PROG_LIBTOOL
|
PACKAGE_MINOR=`echo $PACKAGE_VERSION | awk -F . '{ print $2 }'`
|
||||||
AC_SUBST(LIBTOOL_DEPS)
|
PACKAGE_REVISION=`echo $PACKAGE_VERSION | awk -F . '{ print $3 }'`
|
||||||
if libtool --features | grep "enable static" >/dev/null; then
|
AC_SUBST(PACKAGE_MAJOR)
|
||||||
STATIC="-static"
|
AC_SUBST(PACKAGE_MINOR)
|
||||||
|
AC_SUBST(PACKAGE_REVISION)
|
||||||
|
|
||||||
|
OBJEXT="o"
|
||||||
|
AC_SUBST(OBJEXT)
|
||||||
|
|
||||||
|
AC_DEFINE_UNQUOTED(PACKAGE_MAJOR,$PACKAGE_MAJOR)
|
||||||
|
AC_DEFINE_UNQUOTED(PACKAGE_MINOR,$PACKAGE_MINOR)
|
||||||
|
AC_DEFINE_UNQUOTED(PACKAGE_REVISION,$PACKAGE_REVISION)
|
||||||
|
|
||||||
|
#AH_TEMPLATE([PACKAGE_MAJOR],[Library major version])
|
||||||
|
#AH_TEMPLATE([PACKAGE_MINOR],[Library minor version])
|
||||||
|
#AH_TEMPLATE([PACKAGE_REVISION],[Library revision])
|
||||||
|
|
||||||
|
# Checks for header files.
|
||||||
|
AC_HEADER_DIRENT
|
||||||
|
AC_HEADER_STDC
|
||||||
|
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
|
||||||
|
|
||||||
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
AC_C_CONST
|
||||||
|
AC_TYPE_PID_T
|
||||||
|
|
||||||
|
# Checks for library functions.
|
||||||
|
#AC_FUNC_MALLOC
|
||||||
|
#AC_FUNC_STAT
|
||||||
|
#AC_FUNC_STRTOD
|
||||||
|
AC_FUNC_VPRINTF
|
||||||
|
AC_CHECK_FUNCS([memmove memset strchr strrchr strtol getopt getopt_long])
|
||||||
|
|
||||||
|
if test "$GCC" = "yes"; then
|
||||||
|
MKSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
|
||||||
|
DSO_LDOPTS='-shared -Wl,-h,`echo $@ | sed '"'s/\.so\.\([[0-9][0-9]]*\).*/.so.\1/'"'`'
|
||||||
|
DSO_CFLAGS=''
|
||||||
|
DSO_PIC_CFLAGS='-fPIC -DPIC'
|
||||||
else
|
else
|
||||||
STATIC=
|
MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
|
||||||
|
DSO_LDOPTS='-shared -h $@'
|
||||||
|
DSO_CFLAGS=''
|
||||||
|
DSO_PIC_CFLAGS='-KPIC -DPIC'
|
||||||
fi
|
fi
|
||||||
AC_SUBST(STATIC)
|
|
||||||
|
|
||||||
AC_SUBST(DEBUG_CFLAGS)
|
AC_SUBST(MKSHLIB)
|
||||||
AC_SUBST(GLOBAL_CFLAGS)
|
AC_SUBST(DSO_LDOPTS)
|
||||||
|
AC_SUBST(DSO_CFLAGS)
|
||||||
AC_CHECK_FUNCS(getopt_long getopt)
|
AC_SUBST(DSO_PIC_CFLAGS)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check freetype configuration
|
||||||
|
#
|
||||||
case "$freetype_config" in
|
case "$freetype_config" in
|
||||||
no)
|
no)
|
||||||
;;
|
;;
|
||||||
yes)
|
yes)
|
||||||
AC_CHECK_PROG(ft_config, freetype-config, freetype-config, no)
|
AC_CHECK_PROG(ft_config,freetype-config,freetype-config,no)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
ft_config="$freetype_config"
|
ft_config="$freetype_config"
|
||||||
|
@ -111,22 +149,13 @@ yes)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$fallback_fonts" in
|
|
||||||
yes)
|
|
||||||
AC_DEFINE_UNQUOTED(FC_FALLBACK_FONTS, "/usr/X11R6/lib/X11/fonts/Type1")
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
AC_DEFINE_UNQUOTED(FC_FALLBACK_FONTS, "$fallback_fonts")
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
saved_LIBS="$LIBS"
|
saved_LIBS="$LIBS"
|
||||||
LIBS="$LIBS $freetype_lib"
|
LIBS="$LIBS $freetype_lib"
|
||||||
saved_CPPFLAGS="$CPPFLAGS"
|
saved_CPPFLAGS="$CPPFLAGS"
|
||||||
CPPFLAGS="$CPPFLAGS $freetype_includes"
|
CPPFLAGS="$CPPFLAGS $freetype_includes"
|
||||||
AC_CHECK_HEADERS(ft2build.h)
|
AC_CHECK_HEADERS(freetype/freetype.h)
|
||||||
|
|
||||||
case "$ac_cv_header_ft2build_h" in
|
case "$ac_cv_header_freetype_freetype_h" in
|
||||||
no)
|
no)
|
||||||
CPPFLAGS="$saved_CPPFLAGS"
|
CPPFLAGS="$saved_CPPFLAGS"
|
||||||
LIBS="$saved_LIBS"
|
LIBS="$saved_LIBS"
|
||||||
|
@ -144,59 +173,210 @@ yes)
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
#AH_TEMPLATE([HAVE_FREETYPE],[whether system has freetype2 library])
|
||||||
|
|
||||||
case "$xml2_config" in
|
case "$fallback_fonts" in
|
||||||
no)
|
|
||||||
;;
|
|
||||||
yes)
|
yes)
|
||||||
AC_CHECK_PROG(xml2_config_prog, xml2-config, xml2-config, no)
|
AC_DEFINE_UNQUOTED(FC_FALLBACK_FONTS, "/usr/share/fonts")
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
AC_DEFINE_UNQUOTED(FC_FALLBACK_FONTS, "$fallback_fonts")
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
#AH_TEMPLATE([FC_FALLBACK_FONTS],
|
||||||
|
# [Path library uses when config file is broken])
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check expat/libxml2 configuration
|
||||||
|
#
|
||||||
|
|
||||||
|
case "$expat" in
|
||||||
|
maybe)
|
||||||
|
;;
|
||||||
|
no)
|
||||||
|
xml2=yes
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
xml2=no
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$xml2_includes" in
|
case "$xml2" in
|
||||||
no)
|
maybe)
|
||||||
xml2_includes=""
|
|
||||||
;;
|
;;
|
||||||
yes)
|
no)
|
||||||
case "$xml2_config_prog" in
|
expat=yes
|
||||||
no)
|
;;
|
||||||
xml2_includes=""
|
*)
|
||||||
|
expat=no
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$expat" in
|
||||||
|
no)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
case "$expat_includes" in
|
||||||
|
yes|no)
|
||||||
|
expat_include_path=""
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
xml2_includes="`$xml2_config_prog --cflags`"
|
expat_include_path="-I$expat_includes"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case "$expat_lib" in
|
||||||
|
yes)
|
||||||
|
case "$expat" in
|
||||||
|
yes|maybe)
|
||||||
|
expat_library="-lexpat"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
expat_library="-L$expat/lib -lexpat"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
no)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
expat_library="-L$expat_lib -lexpat"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
saved_CPPFLAGS="$CPPFLAGS"
|
||||||
|
CPPFLAGS="$CPPFLAGS $expat_include_path"
|
||||||
|
saved_LIBS="$LIBS"
|
||||||
|
LIBS="$LIBS $expat_library"
|
||||||
|
|
||||||
|
AC_CHECK_HEADER(expat.h)
|
||||||
|
case "$ac_cv_header_expat_h" in
|
||||||
|
no)
|
||||||
|
AC_CHECK_HEADER(xmlparse.h)
|
||||||
|
case "$ac_cv_header_xmlparse_h" in
|
||||||
|
no)
|
||||||
|
have_expat_header=no;
|
||||||
|
;;
|
||||||
|
yes)
|
||||||
|
HAVE_XMLPARSE_H=1
|
||||||
|
AC_SUBST(HAVE_XMLPARSE_H)
|
||||||
|
AC_DEFINE_UNQUOTED(HAVE_XMLPARSE_H,$HAVE_XMLPARSE_H)
|
||||||
|
have_expat_header=yes
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
yes)
|
||||||
|
have_expat_header=yes
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case "$have_expat_header" in
|
||||||
|
no)
|
||||||
|
CPPFLAGS="$saved_CPPFLAGS"
|
||||||
|
LIBS="$saved_LIBS"
|
||||||
|
expat=no
|
||||||
|
;;
|
||||||
|
yes)
|
||||||
|
AC_CHECK_FUNCS(XML_ParserCreate)
|
||||||
|
case "$ac_cv_func_XML_ParserCreate" in
|
||||||
|
no)
|
||||||
|
CPPFLAGS="$saved_CPPFLAGS"
|
||||||
|
LIBS="$saved_LIBS"
|
||||||
|
expat=no
|
||||||
|
;;
|
||||||
|
yes)
|
||||||
|
HAVE_EXPAT=1
|
||||||
|
AC_SUBST(HAVE_EXPAT)
|
||||||
|
AC_DEFINE_UNQUOTED(HAVE_EXPAT,$HAVE_EXPAT)
|
||||||
|
xml2=no
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
*)
|
|
||||||
xml2_includes="-I$xml2_includes"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$xml2_lib" in
|
case "$xml2" in
|
||||||
no)
|
no)
|
||||||
xml2_lib=""
|
|
||||||
;;
|
;;
|
||||||
yes)
|
*)
|
||||||
case "$xml2_config_prog" in
|
case "$xml2_includes" in
|
||||||
no)
|
yes|no)
|
||||||
xml2_lib=""
|
xml2_include_path=""
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
xml2_lib="`$xml2_config_prog --libs`"
|
xml2_include_path="-I$xml2_includes"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
case "$xml2_lib" in
|
||||||
|
yes)
|
||||||
|
case "$xml2" in
|
||||||
|
yes|maybe)
|
||||||
|
xml2_library="-lxml2"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
xml2_library="-L$xml2/lib -lxml2"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
no)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
xml2_library="-L$xml2_lib -lxml2"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
saved_CPPFLAGS="$CPPFLAGS"
|
||||||
|
CPPFLAGS="$CPPFLAGS $xml2_include_path"
|
||||||
|
saved_LIBS="$LIBS"
|
||||||
|
LIBS="$LIBS $xml2_library"
|
||||||
|
|
||||||
|
AC_CHECK_HEADER(libxml/parser.h)
|
||||||
|
case "$ac_cv_header_libxml_parser_h" in
|
||||||
|
no)
|
||||||
|
CPPFLAGS="$saved_CPPFLAGS"
|
||||||
|
LIBS="$saved_LIBS"
|
||||||
|
xml2=no
|
||||||
|
;;
|
||||||
|
yes)
|
||||||
|
AC_CHECK_FUNCS(xmlInitParser)
|
||||||
|
case "$ac_cv_func_xmlInitParser" in
|
||||||
|
no)
|
||||||
|
CPPFLAGS="$saved_CPPFLAGS"
|
||||||
|
LIBS="$saved_LIBS"
|
||||||
|
xml2=no
|
||||||
|
;;
|
||||||
|
yes)
|
||||||
|
HAVE_XML2=1
|
||||||
|
AC_SUBST(HAVE_XML2)
|
||||||
|
AC_DEFINE_UNQUOTED(HAVE_XML2,$HAVE_XML2)
|
||||||
|
expat=no
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
*)
|
esac
|
||||||
xml2_lib="-L$xml2_lib -lxml2"
|
|
||||||
|
#AH_TEMPLATE([HAVE_EXPAT],[Use expat library for xml parsing])
|
||||||
|
#AH_TEMPLATE([HAVE_XML2],[Use libxml2 library for xml parsing])
|
||||||
|
|
||||||
|
case "$expat""$xml2" in
|
||||||
|
nono)
|
||||||
|
AC_MSG_ERROR([cannot find either libxml2 or expat])
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
saved_LIBS="$LIBS"
|
#AC_CONFIG_FILES([Makefile
|
||||||
LIBS="$LIBS $xml2_lib"
|
# fc-cache/Makefile
|
||||||
saved_CPPFLAGS="$CPPFLAGS"
|
# fc-list/Makefile
|
||||||
CPPFLAGS="$CPPFLAGS $xml2_includes"
|
# fontconfig/Makefile
|
||||||
AC_CHECK_HEADERS(xmlversion.h)
|
# src/Makefile])
|
||||||
|
#AC_CONFIG_FILES([Makefile
|
||||||
AC_OUTPUT(Makefile src/Makefile fontconfig/Makefile fc-cache/Makefile fc-list/Makefile)
|
# config/Makedefs
|
||||||
|
# src/Makefile
|
||||||
|
# fc-cache/Makefile
|
||||||
|
# fc-list/Makefile])
|
||||||
|
AC_OUTPUT([Makefile
|
||||||
|
config/Makedefs
|
||||||
|
src/Makefile
|
||||||
|
fc-cache/Makefile
|
||||||
|
fc-list/Makefile])
|
||||||
|
#AC_OUTPUT
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
aclocal
|
|
||||||
autoheader
|
|
||||||
automake -a
|
|
||||||
autoconf
|
autoconf
|
||||||
|
if [ x"$NO_CONFIGURE" = "x" ]; then
|
||||||
|
echo " + Running 'configure $@':"
|
||||||
|
if [ -z "$*" ]; then
|
||||||
|
echo " ** If you wish to pass arguments to ./configure, please"
|
||||||
|
echo " ** specify them on the command line."
|
||||||
|
fi
|
||||||
|
./configure ${1+"$@"} && echo "Now type 'make' to compile" || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
dirs="/usr/share/fonts /usr/X11R6/lib/X11/fonts"
|
for d in ${1+"$@"}; do
|
||||||
for d in $dirs; do
|
echo "$d"
|
||||||
find $d \( -name '*.[Tt][Tt][Ff]' -o -name '*.[Pp][Ff][BbAa]' \) -print
|
|
||||||
done | while read f; do
|
|
||||||
dir=`dirname $f`
|
|
||||||
echo $dir
|
|
||||||
done | sort -u | sed 's/^/ <dir>/' | sed 's;$;</dir>;'
|
done | sort -u | sed 's/^/ <dir>/' | sed 's;$;</dir>;'
|
||||||
|
|
|
@ -49,10 +49,9 @@
|
||||||
-->
|
-->
|
||||||
<alias>
|
<alias>
|
||||||
<family>Times</family>
|
<family>Times</family>
|
||||||
<default><family>serif</family></default>
|
|
||||||
</alias>
|
|
||||||
<alias>
|
|
||||||
<family>Times New Roman</family>
|
<family>Times New Roman</family>
|
||||||
|
<family>Nimbus Roman No9 L</family>
|
||||||
|
<family>Luxi Serif</family>
|
||||||
<default><family>serif</family></default>
|
<default><family>serif</family></default>
|
||||||
</alias>
|
</alias>
|
||||||
<!--
|
<!--
|
||||||
|
@ -60,14 +59,10 @@
|
||||||
-->
|
-->
|
||||||
<alias>
|
<alias>
|
||||||
<family>Helvetica</family>
|
<family>Helvetica</family>
|
||||||
<default><family>sans-serif</family></default>
|
|
||||||
</alias>
|
|
||||||
<alias>
|
|
||||||
<family>Arial</family>
|
<family>Arial</family>
|
||||||
<default><family>sans-serif</family></default>
|
|
||||||
</alias>
|
|
||||||
<alias>
|
|
||||||
<family>Verdana</family>
|
<family>Verdana</family>
|
||||||
|
<family>Nimbus Sans L</family>
|
||||||
|
<family>Luxi Sans</family>
|
||||||
<default><family>sans-serif</family></default>
|
<default><family>sans-serif</family></default>
|
||||||
</alias>
|
</alias>
|
||||||
<!--
|
<!--
|
||||||
|
@ -75,14 +70,10 @@
|
||||||
-->
|
-->
|
||||||
<alias>
|
<alias>
|
||||||
<family>Courier</family>
|
<family>Courier</family>
|
||||||
<default><family>monospace</family></default>
|
|
||||||
</alias>
|
|
||||||
<alias>
|
|
||||||
<family>Courier New</family>
|
<family>Courier New</family>
|
||||||
<default><family>monospace</family></default>
|
|
||||||
</alias>
|
|
||||||
<alias>
|
|
||||||
<family>Andale Mono</family>
|
<family>Andale Mono</family>
|
||||||
|
<family>Nimbus Mono L</family>
|
||||||
|
<family>Luxi Mono</family>
|
||||||
<default><family>monospace</family></default>
|
<default><family>monospace</family></default>
|
||||||
</alias>
|
</alias>
|
||||||
<!--
|
<!--
|
||||||
|
@ -113,23 +104,19 @@
|
||||||
-->
|
-->
|
||||||
<alias>
|
<alias>
|
||||||
<family>Times</family>
|
<family>Times</family>
|
||||||
<prefer><family>Times New Roman</family></prefer>
|
<accept><family>Times New Roman</family></accept>
|
||||||
<default><family>serif</family></default>
|
|
||||||
</alias>
|
</alias>
|
||||||
<alias>
|
<alias>
|
||||||
<family>Helvetica</family>
|
<family>Helvetica</family>
|
||||||
<prefer><family>Verdana</family></prefer>
|
<accept><family>Verdana</family></accept>
|
||||||
<default><family>sans-serif</family></default>
|
|
||||||
</alias>
|
</alias>
|
||||||
<alias>
|
<alias>
|
||||||
<family>Arial</family>
|
<family>Arial</family>
|
||||||
<prefer><family>Verdana</family></prefer>
|
<accept><family>Verdana</family></accept>
|
||||||
<default><family>sans-serif</family></default>
|
|
||||||
</alias>
|
</alias>
|
||||||
<alias>
|
<alias>
|
||||||
<family>Courier</family>
|
<family>Courier</family>
|
||||||
<prefer><family>Courier New</family></prefer>
|
<accept><family>Courier New</family></accept>
|
||||||
<default><family>monospace</family></default>
|
|
||||||
</alias>
|
</alias>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
@ -164,28 +151,36 @@
|
||||||
</prefer>
|
</prefer>
|
||||||
</alias>
|
</alias>
|
||||||
|
|
||||||
|
<config>
|
||||||
<!--
|
<!--
|
||||||
These are the default Unicode chars that are expected to be blank
|
These are the default Unicode chars that are expected to be blank
|
||||||
in fonts. All other blank chars are assumed to be broken and
|
in fonts. All other blank chars are assumed to be broken and
|
||||||
won't appear in the resulting charsets
|
won't appear in the resulting charsets
|
||||||
-->
|
-->
|
||||||
<config><blank>
|
<blank>
|
||||||
<int>0x20</int> <!-- space -->
|
<int>0x20</int> <!-- space -->
|
||||||
<int>0xa0</int> <!-- nsbp -->
|
<int>0xa0</int> <!-- nsbp -->
|
||||||
<int>0x2000</int> <!-- general punctuation spaces -->
|
<int>0x2000</int> <!-- general punctuation spaces -->
|
||||||
<int>0x2001</int>
|
<int>0x2001</int>
|
||||||
<int>0x2002</int>
|
<int>0x2002</int>
|
||||||
<int>0x2003</int>
|
<int>0x2003</int>
|
||||||
<int>0x2004</int>
|
<int>0x2004</int>
|
||||||
<int>0x2005</int>
|
<int>0x2005</int>
|
||||||
<int>0x2005</int>
|
<int>0x2005</int>
|
||||||
<int>0x2006</int>
|
<int>0x2006</int>
|
||||||
<int>0x2007</int>
|
<int>0x2007</int>
|
||||||
<int>0x2008</int>
|
<int>0x2008</int>
|
||||||
<int>0x2009</int>
|
<int>0x2009</int>
|
||||||
<int>0x200a</int>
|
<int>0x200a</int>
|
||||||
<int>0x200b</int>
|
<int>0x200b</int>
|
||||||
<int>0x3000</int> <!-- CJK space -->
|
<int>0x3000</int> <!-- CJK space -->
|
||||||
</blank></config>
|
</blank>
|
||||||
|
<!--
|
||||||
|
Rescan configuration every 30 seconds when FcFontSetList is called
|
||||||
|
-->
|
||||||
|
<rescan>
|
||||||
|
<int>30</int>
|
||||||
|
</rescan>
|
||||||
|
</config>
|
||||||
|
|
||||||
</fontconfig>
|
</fontconfig>
|
||||||
|
|
13
fonts.dtd
13
fonts.dtd
|
@ -39,7 +39,7 @@
|
||||||
<!--
|
<!--
|
||||||
Global library configuration data
|
Global library configuration data
|
||||||
-->
|
-->
|
||||||
<!ELEMENT config (blanks)*>
|
<!ELEMENT config (blanks|rescan)*>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Specify the set of Unicode encoding values which
|
Specify the set of Unicode encoding values which
|
||||||
|
@ -74,7 +74,14 @@
|
||||||
</edit>
|
</edit>
|
||||||
</match>
|
</match>
|
||||||
-->
|
-->
|
||||||
<!ELEMENT alias (family, prefer?, accept?, default?)>
|
<!--
|
||||||
|
Periodically rescan the font configuration and
|
||||||
|
directories to synch internal state with filesystem
|
||||||
|
-->
|
||||||
|
<!ELEMENT rescan (int)>
|
||||||
|
|
||||||
|
|
||||||
|
<!ELEMENT alias (family*, prefer?, accept?, default?)>
|
||||||
<!ELEMENT prefer (family)*>
|
<!ELEMENT prefer (family)*>
|
||||||
<!ELEMENT accept (family)*>
|
<!ELEMENT accept (family)*>
|
||||||
<!ELEMENT default (family)*>
|
<!ELEMENT default (family)*>
|
||||||
|
@ -103,7 +110,7 @@
|
||||||
if 'qual' is 'any', then the match succeeds if any value in the field matches.
|
if 'qual' is 'any', then the match succeeds if any value in the field matches.
|
||||||
if 'qual' is 'all', then the match succeeds only if all values match.
|
if 'qual' is 'all', then the match succeeds only if all values match.
|
||||||
-->
|
-->
|
||||||
<!ELEMENT test (%expr;)>
|
<!ELEMENT test (%expr;)*>
|
||||||
<!ATTLIST test
|
<!ATTLIST test
|
||||||
qual (any|all) "any"
|
qual (any|all) "any"
|
||||||
name CDATA #REQUIRED
|
name CDATA #REQUIRED
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
#ifndef SharedLibFontconfig
|
||||||
|
#define SharedLibFontconfig YES
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NormalLibFontconfig
|
||||||
|
#define NormalLibFontconfig (!SharedLibFontconfig | ForceNormalLib)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DebugLibFontconfig
|
||||||
|
#define DebugLibFontconfig NO
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ProfileLibFontconfig
|
||||||
|
#define ProfileLibFontconfig NO
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define _FUse(a,b) b hello
|
||||||
|
#if (defined(__STDC__) && !defined(UnixCpp)) || defined(AnsiCpp)
|
||||||
|
# define _FUseCat(a,b,c) b##c fllop
|
||||||
|
#else
|
||||||
|
# define _FUseCat(a,b,c) b/**/c
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#undef _Use
|
||||||
|
#undef _UseCat
|
||||||
|
#define _Use _FUse
|
||||||
|
#define _UseCat _FUseCat
|
||||||
|
|
||||||
|
#if SharedLibFontconfig
|
||||||
|
#define SharedFontconfigRev 1.0
|
||||||
|
SharedLibReferences(FONTCONFIG,fontconfig,$(FONTCONFIGSRC),SOXLIBREV,SharedFontconfigRev)
|
||||||
|
#else
|
||||||
|
ProjectUnsharedLibReferences(FONTCONFIG,fontconfig,$(FONTCONFIGSRC),BuildLibDir)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#undef LinkBuildLibrary
|
||||||
|
#define LinkBuildLibrary(lib) MakeDir($(BUILDLIBDIR)) @@\
|
||||||
|
RemoveFile($(BUILDLIBDIR)/lib) @@\
|
||||||
|
cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib .
|
||||||
|
#undef _LinkBuildLibrary
|
||||||
|
#define _LinkBuildLibrary(lib) LinkBuildLibrary(lib)
|
||||||
|
|
||||||
|
#undef LinkBuildLibraryMaybe
|
||||||
|
#define LinkBuildLibraryMaybe(lib,doit) MakeDir($(BUILDLIBDIR)) @@\
|
||||||
|
@if doit; then (set -x; \ @@\
|
||||||
|
RemoveFile($(BUILDLIBDIR)/lib); \ @@\
|
||||||
|
cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib .); fi
|
||||||
|
|
||||||
|
#ifdef LdPreLibs
|
||||||
|
# undef LdPreLibs
|
||||||
|
#endif
|
||||||
|
#define LdPreLibs -L$(BUILDLIBDIR) LdPreLib XLdPreLibs
|
||||||
|
|
||||||
|
LDPRELIBS=LdPreLibs
|
|
@ -1,12 +1,12 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
FONTDIRS=fontdirs$$
|
FONTDIRS=fontdirs$$
|
||||||
trap "rm $FONTDIRS" 0
|
trap "rm $FONTDIRS" 0
|
||||||
sh ./findfonts > $FONTDIRS
|
sh ./findfonts ${1+"$@"} > $FONTDIRS
|
||||||
cp fonts.conf.in fonts.conf
|
cp fonts.conf.in fonts.conf
|
||||||
chmod +w fonts.conf
|
chmod +w fonts.conf
|
||||||
ed fonts.conf << EOF
|
ed fonts.conf << EOF
|
||||||
/FONTPATH_END/a
|
/FONTPATH_END/a
|
||||||
<!-- Font directories found on `date` -->
|
<!-- Font directory list configured on `date` -->
|
||||||
.
|
.
|
||||||
+r $FONTDIRS
|
+r $FONTDIRS
|
||||||
a
|
a
|
||||||
|
|
Loading…
Reference in New Issue