Switch to automake

This commit is contained in:
Keith Packard 2003-02-24 17:18:50 +00:00
parent 46d003c34e
commit 20fa60c9ae
23 changed files with 6749 additions and 858 deletions

49
Makefile.am Normal file
View File

@ -0,0 +1,49 @@
#
# $Id$
#
# Copyright © 2003 Keith Packard
#
# 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.
SUBDIRS=fontconfig fc-lang src fc-cache fc-list
EXTRA_DIST = \
fontconfig.pc.in \
fonts.conf.in \
fonts.dtd \
local.conf \
stamp-h.in
pkgconfigdir=$(libdir)/pkgconfig
pkgconfig_DATA = fontconfig.pc
configdir=$(CONFDIR)
config_DATA=fonts.conf fonts.dtd
install-data-local:
if [ -f $(DESTDIR)$(configdir)/local.conf ]; then \
echo "not overwriting existing $(DESTDIR)$(configdir)/local.conf"; \
else if [ -f $(srcdir)/local.conf ]; then \
echo " $(INSTALL_DATA) $(srcdir)/local.conf $(DESTDIR)$(configdir)/local.conf"; \
$(INSTALL_DATA) $(srcdir)/local.conf $(DESTDIR)$(configdir)/local.conf; \
else if [ -f local.conf ]; then \
echo " $(INSTALL_DATA) local.conf $(DESTDIR)$(configdir)/local.conf"; \
$(INSTALL_DATA) local.conf $(DESTDIR)$(configdir)/local.conf; \
fi; fi; fi
if [ x$(DESTDIR) = x ]; then $(bindir)/fc-cache -f -v; fi

View File

@ -1,91 +0,0 @@
#
# $XFree86: xc/lib/fontconfig/Makefile.in,v 1.6 2002/05/28 03:50:23 keithp Exp $
#
# 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 = fc-lang src fc-cache fc-list fontconfig
all install clean::
for d in $(DIRS); do (cd $$d && $(MAKE) $@) || exit 1; done
#
# create fonts.conf file
#
all:: fonts.conf
fonts.conf: fonts.conf.in
rm -f $@
sh ./setfontdirs $(FC_DEFAULT_FONTS) $(X_FONT_DIR)
clean::
rm -f fonts.conf
#
# installation directories
#
install:: $(DESTDIR)$(CONFDIR) $(DESTDIR)$(BINDIR)
install:: $(DESTDIR)$(LIBDIR) $(DESTDIR)$(LIBDIR)/pkgconfig
$(DESTDIR)$(CONFDIR):
mkdir -p $@
$(DESTDIR)$(BINDIR):
mkdir -p $@
$(DESTDIR)$(LIBDIR):
mkdir -p $@
$(DESTDIR)$(LIBDIR)/pkgconfig:
mkdir -p $@
#
# install config files
#
install:: $(DESTDIR)$(CONFDIR)/fonts.conf \
$(DESTDIR)$(CONFDIR)/fonts.dtd \
$(DESTDIR)$(CONFDIR)/local.conf
$(DESTDIR)$(CONFDIR)/fonts.conf:: fonts.conf
$(INSTALL_DATA) fonts.conf $(DESTDIR)$(CONFDIR)/fonts.conf
$(DESTDIR)$(CONFDIR)/fonts.dtd:: fonts.dtd
$(INSTALL_DATA) fonts.dtd $(DESTDIR)$(CONFDIR)/fonts.dtd
$(DESTDIR)$(CONFDIR)/local.conf:: local.conf
if [ -f $@ ]; then \
echo "Not overwriting existing $@"; \
else \
$(INSTALL_DATA) local.conf $(DESTDIR)$(CONFDIR)/local.conf; \
fi
#
# install pkgconfig control file
#
install:: $(DESTDIR)$(LIBDIR)/pkgconfig/fontconfig.pc
$(DESTDIR)$(LIBDIR)/pkgconfig/fontconfig.pc: fontconfig.pc
$(INSTALL_DATA) $< $(DESTDIR)$(LIBDIR)/pkgconfig/$<

89
autogen.sh Executable file
View File

@ -0,0 +1,89 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
PROJECT=Fontconfig
TEST_TYPE=-f
FILE=fontconfig/fontconfig.h
DIE=0
have_libtool=false
if libtool --version < /dev/null > /dev/null 2>&1 ; then
libtool_version=`libtoolize --version | libtoolize --version | sed 's/^[^0-9]*\([0-9].[0-9.]*\).*/\1/'`
case $libtool_version in
1.4*|1.5*)
have_libtool=true
;;
esac
fi
if $have_libtool ; then : ; else
echo
echo "You must have libtool 1.4 installed to compile $PROJECT."
echo "Install the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
fi
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile $PROJECT."
echo "libtool the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
have_automake=false
if automake --version < /dev/null > /dev/null 2>&1 ; then
automake_version=`automake --version | grep 'automake (GNU automake)' | sed 's/^[^0-9]*\(.*\)/\1/'`
case $automake_version in
1.2*|1.3*|1.4)
;;
*)
have_automake=true
;;
esac
fi
if $have_automake ; then : ; else
echo
echo "You must have automake 1.4-p1 installed to compile $PROJECT."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.4-p1.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
fi
if test "$DIE" -eq 1; then
exit 1
fi
test $TEST_TYPE $FILE || {
echo "You must run this script in the top-level $PROJECT directory"
exit 1
}
if test -z "$AUTOGEN_SUBDIR_MODE"; then
if test -z "$*"; then
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
fi
fi
aclocal $ACLOCAL_FLAGS
# optionally run autoheader
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
automake -a $am_opt
autoconf
cd $ORIGDIR
if test -z "$AUTOGEN_SUBDIR_MODE"; then
$srcdir/configure --enable-maintainer-mode "$@"
echo
echo "Now type 'make' to compile $PROJECT."
fi

View File

@ -1,138 +0,0 @@
/* config.h.in. Generated manually by keithp. */
/* Path library uses when config file is broken */
#undef FC_DEFAULT_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
/* 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

View File

@ -1,66 +1,63 @@
dnl
dnl $Id$
dnl
dnl Copyright © 2003 Keith Packard
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
dnl $XFree86: xc/lib/fontconfig/configure.in,v 1.7 2002/08/01 15:57:25 keithp Exp $
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
dnl Process this file with autoconf to create configure.
# Process this file with autoconf to produce a configure script.
dnl ==========================================================================
dnl Versioning
dnl ==========================================================================
AC_INIT(fontconfig, 1.0.1, fonts@xfree86.org)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_HEADER(config.h)
dnl The version number is also in fontconfig/fontconfig.h
AC_INIT(ChangeLog,1.0.3,fontconfig@fontconfig.org)
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_config, [ --with-freetype-config=PROG Use FreeType configuration program PROG], freetype_config=$withval, freetype_config=yes)
AC_ARG_WITH(expat, [ --with-expat=DIR Use Expat in DIR], expat=$withval, expat=yes)
AC_ARG_WITH(expat_includes, [ --with-expat-includes=DIR Use Expat includes in DIR], expat_includes=$withval, expat_includes=yes)
AC_ARG_WITH(expat_lib, [ --with-expat-lib=DIR Use Expat library in DIR], expat_lib=$withval, expat_lib=yes)
AC_ARG_WITH(default_fonts, [ --with-default-fonts=DIR Use fonts from DIR when config is busted], defaultfonts="$withval", default_fonts=yes)
AC_ARG_WITH(confdir, [ --with-confdir=DIR Use DIR to store configuration files (default /etc/fonts)], confdir="$withval", confdir=yes)
FONTCONFIG_HEADER=fontconfig/fontconfig.h
FONTCONFIG_MAJOR=`awk '/^#define FC_MAJOR/ { print $3 }' $FONTCONFIG_HEADER`
FONTCONFIG_MINOR=`awk '/^#define FC_MINOR/ { print $3 }' $FONTCONFIG_HEADER`
FONTCONFIG_REVISION=`awk '/^#define FC_REVISION/ { print $3 }' $FONTCONFIG_HEADER`
FONTCONFIG_VERSION="$FONTCONFIG_MAJOR.$FONTCONFIG_MINOR.$FONTCONFIG_REVISION"
AC_SUBST(FONTCONFIG_MAJOR)
AC_SUBST(FONTCONFIG_MINOR)
AC_SUBST(FONTCONFIG_REVISION)
AC_SUBST(FONTCONFIG_VERSION)
dnl libtool versioning
LT_VERSION_NUMBER="$FONTCONFIG_MAJOR:$FONTCONFIG_MINOR:$FONTCONFIG_REVISION"
AC_SUBST(LT_VERSION_NUMBER)
dnl ==========================================================================
AM_INIT_AUTOMAKE(fontconfig, $FONTCONFIG_VERSION)
AM_CONFIG_HEADER(config.h)
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PATH_X
AM_PROG_LIBTOOL
AC_PROG_MAKE_SET
PACKAGE_VERSION=1.0.1
# Set major version
PACKAGE_MAJOR=`echo $PACKAGE_VERSION | awk -F . '{ print $1 }'`
PACKAGE_MINOR=`echo $PACKAGE_VERSION | awk -F . '{ print $2 }'`
PACKAGE_REVISION=`echo $PACKAGE_VERSION | awk -F . '{ print $3 }'`
AC_SUBST(PACKAGE_VERSION)
AC_SUBST(PACKAGE_MAJOR)
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)
# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
@ -74,153 +71,201 @@ AC_TYPE_PID_T
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'
#
# Checks for FreeType
#
AC_ARG_WITH(freetype_config, [ --with-freetype-config=PROG Use FreeType configuration program PROG], freetype_config=$withval, freetype_config=yes)
if test "$freetype_config" = "yes"; then
AC_PATH_PROG(ft_config,freetype-config,no)
if test "$ft_config" = "no"; then
AC_MSG_ERROR([You must have freetype installed; see http://www.freetype.org/])
fi
else
AC_CANONICAL_HOST
MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
DSO_CFLAGS=''
DSO_PIC_CFLAGS='-KPIC -DPIC'
case "$host" in
*solaris*)
DSO_LDOPTS='-G -z text -z defs -h $@'
LIBS="$LIBS -lc"
;;
*irix6*)
DSO_LDOPTS='-shared -rpath $(libdir) -set_version sgi1.0 -soname $@'
LIBS="$LIBS -lc"
;;
*osf[[123]]*)
# since the library is using soname-style versioning, don't use
# internal versioning, via -set_version.
DSO_LDOPTS='-shared -rpath $(libdir) -soname $@'
LIBS="$LIBS -lc"
;;
*osf[[45]]*)
# since the library is using soname-style versioning, don't use
# internal versioning, via -set_version.
DSO_LDOPTS='-shared -msym -rpath $(libdir) -soname $@'
LIBS="$LIBS -lc"
;;
*)
DSO_LDOPTS='-shared -h $@'
;;
esac
ft_config="$freetype_config"
fi
AC_SUBST(MKSHLIB)
AC_SUBST(DSO_LDOPTS)
AC_SUBST(DSO_CFLAGS)
AC_SUBST(DSO_PIC_CFLAGS)
FREETYPE_CFLAGS="$($ft_config --cflags)"
FREETYPE_LIBS="$($ft_config --libs)"
AC_SUBST(FREETYPE_LIBS)
AC_SUBST(FREETYPE_CFLAGS)
#
# Using x libraries, set X font directory
case "$no_x" in
yes)
;;
*)
X_FONT_DIR="$x_libraries/X11/fonts"
AC_DEFINE_UNQUOTED(X_FONT_DIR,$X_FONT_DIR)
;;
esac
AC_SUBST(X_FONT_DIR)
# Check to see whether we have FT_Get_First_Char(), new in 2.0.9
#
fontconfig_save_libs=$LIBS
LIBS="$LIBS $FREETYPE_LIBS"
AC_CHECK_FUNCS(FT_Get_First_Char)
LIBS=$fontconfig_save_libs
#
# Check freetype configuration
# Check expat configuration
#
case "$freetype_config" in
AC_ARG_WITH(expat, [ --with-expat=DIR Use Expat in DIR], expat=$withval, expat=yes)
AC_ARG_WITH(expat_includes, [ --with-expat-includes=DIR Use Expat includes in DIR], expat_includes=$withval, expat_includes=yes)
AC_ARG_WITH(expat_lib, [ --with-expat-lib=DIR Use Expat library in DIR], expat_lib=$withval, expat_lib=yes)
case "$expat" in
no)
;;
yes)
AC_CHECK_PROG(ft_config,freetype-config,freetype-config,no)
;;
*)
ft_config="$freetype_config"
;;
esac
case "$freetype_includes" in
no)
FREETYPE_CFLAGS=""
;;
yes)
case "$ft_config" in
no)
FREETYPE_CFLAGS=""
case "$expat_includes" in
yes|no)
EXPAT_CFLAGS=""
;;
*)
FREETYPE_CFLAGS="`$ft_config --cflags`"
EXPAT_CFLAGS="-I$expat_includes"
;;
esac
;;
*)
FREETYPE_CFLAGS="-I$freetype_includes"
;;
esac
case "$freetype_lib" in
no)
freetype_lib=""
;;
yes)
case "$ft_config" in
case "$expat_lib" in
yes)
case "$expat" in
yes)
EXPAT_LIBS="-lexpat"
;;
*)
EXPAT_LIBS="-L$expat/lib -lexpat"
;;
esac
;;
no)
freetype_lib=""
;;
*)
freetype_lib="`$ft_config --libs`"
EXPAT_LIBS="-L$expat_lib -lexpat"
;;
esac
;;
*)
freetype_lib="-L$freetype_lib -lfreetype"
;;
esac
saved_LIBS="$LIBS"
LIBS="$LIBS $freetype_lib"
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
AC_CHECK_HEADERS(freetype/freetype.h)
expatsaved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $EXPAT_CFLAGS"
expatsaved_LIBS="$LIBS"
LIBS="$LIBS $EXPAT_LIBS"
case "$ac_cv_header_freetype_freetype_h" in
no)
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,
[Use xmlparse.h instead of expat.h])
have_expat_header=yes
;;
esac
;;
yes)
have_expat_header=yes
;;
esac
case "$have_expat_header" in
no)
expat=no
;;
yes)
AC_CHECK_FUNCS(XML_ParserCreate)
case "$ac_cv_func_XML_ParserCreate" in
no)
expat=no
;;
yes)
HAVE_EXPAT=1
AC_SUBST(HAVE_EXPAT)
AC_DEFINE_UNQUOTED(HAVE_EXPAT,$HAVE_EXPAT,
[Found a useable expat library])
;;
esac
;;
esac
CPPFLAGS="$saved_CPPFLAGS"
LIBS="$saved_LIBS"
;;
yes)
AC_CHECK_FUNCS(FT_Init_FreeType)
case "$ac_cv_func_FT_Init_FreeType" in
no)
CPPFLAGS="$saved_CPPFLAGS"
LIBS="$saved_LIBS"
;;
yes)
AC_DEFINE(HAVE_FREETYPE)
AC_SUBST(FREETYPE_CFLAGS)
;;
esac
esac
AC_SUBST(EXPAT_LIBS)
AC_SUBST(EXPAT_CFLAGS)
case "$expat" in
no)
AC_MSG_ERROR([cannot find expat library])
;;
esac
#
# Set default font directory
#
AC_ARG_WITH(default_fonts, [ --with-default-fonts=DIR Use fonts from DIR when config is busted], defaultfonts="$withval", default_fonts=yes)
case "$default_fonts" in
yes)
FC_DEFAULT_FONTS="/usr/share/fonts"
AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "/usr/share/fonts")
AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "/usr/share/fonts",
[System font directory])
;;
*)
FC_DEFAULT_FONTS="$default_fonts"
AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "$default_fonts")
AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "$default_fonts",
[System font directory])
;;
esac
AC_SUBST(FC_DEFAULT_FONTS)
#
# Add X fonts if available
#
AC_ARG_WITH(x_fonts, [ --with-x-fonts=DIR Find X fonts in DIR ], x_fonts="$withval", x_fonts=yes)
case "$x_fonts" in
yes)
FC_X_FONTS=""
for dir in /usr/X11R6/lib /usr/X11/lib /usr/lib/X11; do
case x"$FC_X_FONTS" in
x)
if test -d "$dir/fonts"; then
FC_X_FONTS="$dir/fonts"
fi
;;
esac
done
AC_DEFINE_UNQUOTED(FC_X_FONTS,"$x_fonts",[X font directory])
;;
no)
FC_X_FONTS=""
;;
*)
FC_X_FONTS="$x_fonts"
AC_DEFINE_UNQUOTED(FC_X_FONTS,"$x_fonts",[X font directory])
;;
esac
AC_SUBST(FC_X_FONTS)
FC_FONTPATH=""
case "$FC_X_FONTS" in
"")
;;
*)
FC_FONTPATH="<dir>$FC_X_FONTS</dir>"
;;
esac
AC_SUBST(FC_FONTPATH)
FC_FONTDATE=`date`
AC_SUBST(FC_FONTDATE)
AC_ARG_WITH(confdir, [ --with-confdir=DIR Use DIR to store configuration files (default /etc/fonts)], confdir="$withval", confdir=yes)
#
# Set CONFDIR and FONTCONFIG_PATH
#
@ -234,106 +279,24 @@ no|yes)
esac
AC_SUBST(confdir)
CONFDIR='${confdir}'
AC_DEFINE_UNQUOTED(CONFDIR, "$CONFDIR")
AC_DEFINE_UNQUOTED(CONFDIR, "$CONFDIR",[Font configuration directory])
AC_SUBST(CONFDIR)
#
# Check expat configuration
# Find out what language orthographies are included
#
case "$expat" in
no)
;;
*)
case "$expat_includes" in
yes|no)
expat_include_path=""
;;
*)
expat_include_path="-I$expat_includes"
;;
esac
case "$expat_lib" in
yes)
case "$expat" in
yes)
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)
;;
esac
;;
esac
;;
esac
case "$expat" in
no)
AC_MSG_ERROR([cannot find expat library])
;;
esac
AC_OUTPUT([Makefile
config/Makedefs
fc-lang/Makefile
src/Makefile
fc-cache/Makefile
fc-list/Makefile
fontconfig/Makefile
fontconfig.pc])
ORTH_FILES=`cd fc-lang && echo *.orth`
AC_SUBST(ORTH_FILES)
AC_OUTPUT([
Makefile
fontconfig/Makefile
fc-lang/Makefile
src/Makefile
fc-cache/Makefile
fc-list/Makefile
fontconfig.spec
fontconfig.pc
fonts.conf
])

View File

@ -1,11 +0,0 @@
#!/bin/sh
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

28
fc-cache/Makefile.am Normal file
View File

@ -0,0 +1,28 @@
#
# $Id$
#
# Copyright © 2003 Keith Packard
#
# 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.
INCLUDES=$(FREETYPE_CFLAGS)
bin_PROGRAMS=fc-cache
fc_cache_LDADD = ../src/libfontconfig.la

View File

@ -1,53 +0,0 @@
#
# $XFree86: xc/lib/fontconfig/fc-cache/Makefile.in,v 1.3 2002/05/24 06:25:51 keithp Exp $
#
# 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
SRCS=fc-cache.c
OBJS=fc-cache.o
PROG=fc-cache
all:: $(PROG)
$(PROG): $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBFONTCONFIG)
$(OBJS): $(HEADERS)
install:: $(DESTDIR)$(BINDIR)
$(DESTDIR)$(BINDIR):
mkdir -p $@
install:: $(DESTDIR)$(BINDIR)/$(PROG)
$(DESTDIR)$(BINDIR)/$(PROG): $(PROG)
$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(BINDIR)/$<
clean::
rm -f $(PROG) $(OBJS)

View File

@ -1,7 +1,7 @@
#
# $XFree86: xc/lib/fontconfig/fontconfig/Makefile.in,v 1.3 2002/08/01 15:57:26 keithp Exp $
# $Id $
#
# Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
# Copyright © 2003 Keith Packard
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
@ -22,18 +22,17 @@
# PERFORMANCE OF THIS SOFTWARE.
#
TOPDIR=..
INCLUDES=-I../src $(FREETYPE_CFLAGS)
include $(TOPDIR)/config/Makedefs
TMPL=fclang.tmpl.h
TARG=fclang.h
all::
noinst_PROGRAMS=fc-lang
install:: $(DESTDIR)$(INCLUDEDIR)
$(INSTALL_DATA) fcfreetype.h $(DESTDIR)$(INCLUDEDIR)/fcfreetype.h
$(INSTALL_DATA) fcprivate.h $(DESTDIR)$(INCLUDEDIR)/fcprivate.h
$(INSTALL_DATA) fontconfig.h $(DESTDIR)$(INCLUDEDIR)/fontconfig.h
noinst_HEADERS=$(TARG)
$(DESTDIR)$(INCLUDEDIR):
mkdir -p $@
ORTH=@ORTH_FILES@
clean::
$(TARG): $(TMPL) fc-lang $(ORTH)
rm -f $(TARG)
./fc-lang $(ORTH) < $(TMPL) > $(TARG)

28
fc-list/Makefile.am Normal file
View File

@ -0,0 +1,28 @@
#
# $Id$
#
# Copyright © 2003 Keith Packard
#
# 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.
bin_PROGRAMS=fc-list
INCLUDES=$(FREETYPE_CFLAGS)
fc_list_LDADD = ../src/libfontconfig.la

View File

@ -1,54 +0,0 @@
#
# $XFree86: xc/lib/fontconfig/fc-list/Makefile.in,v 1.3 2002/05/24 06:25:52 keithp Exp $
#
# 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
SRCS=fc-list.c
OBJS=fc-list.o
PROG=fc-list
all:: $(PROG)
$(PROG): $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBFONTCONFIG)
$(OBJS): $(HEADERS)
install:: $(DESTDIR)$(BINDIR)
$(DESTDIR)$(BINDIR):
mkdir -p $@
install:: $(DESTDIR)$(BINDIR)/$(PROG)
$(DESTDIR)$(BINDIR)/$(PROG): $(PROG)
$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(BINDIR)/$<
clean::
rm -f $(PROG) $(OBJS)

View File

@ -1,4 +0,0 @@
#!/bin/sh
for d in ${1+"$@"}; do
echo "$d"
done | sort -u | sed 's/^/ <dir>/' | sed 's;$;</dir>;'

74
fontconfig.spec.in Normal file
View File

@ -0,0 +1,74 @@
Summary: System for configuring and customizing font access
Name: fontconfig
Version: @VERSION@
Release: 1
License: MIT
Group: System Environment/Libraries
Source: http://fontconfig.org/fontconfig.tar.gz
BuildRoot: /var/tmp/%{name}-%{version}-root
Requires: freetype2
BuildRequires: freetype2-devel
%description
System for layout and rendering of internationalized text.
%package devel
Summary: System for layout and rendering of internationalized text
Group: Development/Libraries
Requires: %{name} = %{version}
Requires: freetype2-devel
%description devel
The fontconfig-devel package includes the static libraries and header files
for the fontconfig package.
Install fontconfig-devel if you want to develop programs which will use
fontconfig.
%prep
%setup
%build
CFLAGS="$RPM_OPT_FLAGS"
./configure --prefix=%{_prefix} \
--bindir=%{_bindir} --mandir=%{_mandir} \
--localstatedir=%{_localstatedir} --libdir=%{_libdir} \
--datadir=%{_datadir} --includedir=%{_includedir} \
--sysconfdir=%{_sysconfdir} --disable-gtk-doc
make
%install
rm -rf $RPM_BUILD_ROOT
make prefix=$RPM_BUILD_ROOT%{_prefix} bindir=$RPM_BUILD_ROOT%{_bindir} \
mandir=$RPM_BUILD_ROOT%{_mandir} libdir=$RPM_BUILD_ROOT%{_libdir} \
localstatedir=$RPM_BUILD_ROOT%{_localstatedir} \
datadir=$RPM_BUILD_ROOT%{_datadir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} install
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc README AUTHORS COPYING ChangeLog TODO
%{_libdir}/libfontconfig*.so
%{_bindir}/fc-*
%{_libdir}/pango
%config %{_sysconfdir}/fonts/fonts.conf
%config %{_sysconfdir}/fonts/fonts.dtd
%config %{_sysconfdir}/fonts/local.conf
%files devel
%defattr(-, root, root)
%{_libdir}/libfontconfig*.so
%{_libdir}/*a
%{_libdir}/pkgconfig/*.pc
%{_includedir}/fontconfig
%changelog

8
fontconfig/Makefile.am Normal file
View File

@ -0,0 +1,8 @@
fontconfigincludedir=$(includedir)/fontconfig
fontconfig_headers= \
fontconfig.h \
fcfreetype.h \
fcprivate.h
fontconfiginclude_HEADERS = $(fontconfig_headers)

View File

@ -35,9 +35,10 @@ typedef int FcBool;
/*
* Current Fontconfig version number
*/
#define FC_MAJOR 1
#define FC_MINOR 0
#define FC_REVISION 2
#define FC_REVISION 3
#define FC_VERSION ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION))

View File

@ -22,18 +22,12 @@
Keith Packard
-->
<!-- FONTPATH_START -->
<!-- Font directory list configured on @FC_FONTDATE@ -->
<!--
Common X11R6 font directories
-->
<dir>/usr/X11R6/lib/X11/fonts</dir>
<dir>/usr/share/fonts</dir>
<dir>@FC_DEFAULT_FONTS@</dir>
@FC_FONTPATH@
<dir>~/.fonts</dir>
<!-- FONTPATH_END -->
<!--
Enable sub-pixel rendering
<match target="font">

5
local.conf Normal file
View File

@ -0,0 +1,5 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/local.conf file for local customizations -->
<fontconfig>
</fontconfig>

View File

@ -1,70 +0,0 @@
#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
#ifndef ExpatClientLibs
#define ExpatClientLibs -lexpat
#endif
#ifndef ExpatClientDepLibs
#define ExpatClientDepLibs
#endif
#ifndef FontconfigClientDepLibs
#define FontconfigClientDepLibs $(DEPFONTCONFIGLIB) $(DEPFREETYPE2LIB) ExpatClientDepLibs
#endif
#ifndef FontconfigClientLibs
#define FontconfigClientLibs $(FONTCONFIGLIB) $(FREETYPE2LIB) ExpatClientLibs
#endif
#if SharedLibFontconfig
#define SharedFontconfigRev 1.0
SharedLibReferences(FONTCONFIG,fontconfig,$(FONTCONFIGSRC),SOXLIBREV,SharedFontconfigRev)
#else
ProjectUnsharedLibReferences(FONTCONFIG,fontconfig,$(FONTCONFIGSRC),BuildLibDir)
#endif
FCCACHE=$(TOP)/fc-cache/fc-cache
#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

6192
ltmain.sh Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,36 +0,0 @@
#!/bin/sh
#
# $XFree86: xc/lib/fontconfig/setfontdirs,v 1.5 2002/12/17 03:26:36 dawes Exp $
#
LC_ALL=C
export LC_ALL
FONTDIRS=fontdirs$$
trap "rm $FONTDIRS" 0
sh ./findfonts ${1+"$@"} > $FONTDIRS
cp fonts.conf.in fonts.conf
chmod +w fonts.conf
EDITOR=ed
(echo q | ed) > /dev/null 2>&1
if [ $? -ne 0 ]; then
EDITOR=ex
(echo q | ex) > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "$0: *** Error: Cannot find 'ed' or 'ex' editor"
exit 1
fi
fi
$EDITOR fonts.conf << EOF
/FONTPATH_END/a
<!-- Font directory list configured on `date` -->
.
+r $FONTDIRS
a
<dir>~/.fonts</dir>
.
/FONTPATH_START/,/FONTPATH_END/d
w
q
EOF

38
src/Makefile.am Normal file
View File

@ -0,0 +1,38 @@
INCLUDES = \
$(FREETYPE_CFLAGS) \
$(EXPAT_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/src
libfontconfig_la_SOURCES = \
fcatomic.c \
fcblanks.c \
fccache.c \
fccfg.c \
fccharset.c \
fcdbg.c \
fcdefault.c \
fcdir.c \
fcfreetype.c \
fcfs.c \
fcinit.c \
fclang.c \
fclist.c \
fcmatch.c \
fcmatrix.c \
fcname.c \
fcpat.c \
fcstr.c \
fcxml.c
man_MANS = fontconfig.3
EXTRA_DIST = $(man_MANS)
lib_LTLIBRARIES = libfontconfig.la
libfontconfig_la_LDFLAGS = \
-version-number @LT_VERSION_NUMBER@
libfontconfig_la_LIBADD = $(FREETYPE_LIBS) $(EXPAT_LIBS)

View File

@ -1,120 +0,0 @@
#
# $XFree86: xc/lib/fontconfig/src/Makefile.in,v 1.3 2002/05/22 04:12:35 keithp Exp $
#
# 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
LIBS=@LIBS@
SRCS=fcatomic.c \
fcblanks.c \
fccache.c \
fccfg.c \
fccharset.c \
fcdbg.c \
fcdefault.c \
fcdir.c \
fcfreetype.c \
fcfs.c \
fcinit.c \
fclang.c \
fclist.c \
fcmatch.c \
fcmatrix.c \
fcname.c \
fcpat.c \
fcstr.c \
fcxml.c
OBJS=fcatomic.@OBJEXT@ \
fcblanks.@OBJEXT@ \
fccache.@OBJEXT@ \
fccfg.@OBJEXT@ \
fccharset.@OBJEXT@ \
fcdbg.@OBJEXT@ \
fcdefault.@OBJEXT@ \
fcdir.@OBJEXT@ \
fcfreetype.@OBJEXT@ \
fcfs.@OBJEXT@ \
fcinit.@OBJEXT@ \
fclang.@OBJEXT@ \
fclist.@OBJEXT@ \
fcmatch.@OBJEXT@ \
fcmatrix.@OBJEXT@ \
fcname.@OBJEXT@ \
fcpat.@OBJEXT@ \
fcstr.@OBJEXT@ \
fcxml.@OBJEXT@
.c.@OBJEXT@:
$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) -c $< -o $@
all:: $(LIBFILE) $(LIBMAJOR) $(LIBBASE)
#
# build the library and the various version links
#
$(LIBFILE): $(OBJS)
rm -f $@
$(MKSHLIB) $(OBJS) $(LIBS)
$(LIBMAJOR): $(LIBFILE)
rm -f $@
$(LN_S) $(LIBFILE) $(LIBMAJOR)
$(LIBBASE): $(LIBMAJOR)
rm -f $@
$(LN_S) $(LIBMAJOR) $(LIBBASE)
$(OBJS): fcint.h $(HEADERS)
#
# install directories
#
install:: $(DESTDIR)$(LIBDIR)
$(DESTDIR)$(LIBDIR):
mkdir -p $@
#
# install library
#
install:: $(DESTDIR)$(LIBDIR)/$(LIB) $(DESTDIR)$(LIBDIR)/$(LIBMAJOR)
install:: $(DESTDIR)$(LIBDIR)/$(LIBBASE)
$(DESTDIR)$(LIBDIR)/$(LIBFILE): $(LIBFILE)
$(INSTALL_PROGRAM) $< $(DESTDIR)$(LIBDIR)/$<
$(DESTDIR)$(LIBDIR)/$(LIBMAJOR): $(DESTDIR)$(LIBDIR)/$(LIBFILE)
rm -f $(DESTDIR)$(LIBDIR)/$(LIBMAJOR)
$(LN_S) $(LIBFILE) $(DESTDIR)$(LIBDIR)/$(LIBMAJOR)
$(DESTDIR)$(LIBDIR)/$(LIBBASE): $(DESTDIR)$(LIBDIR)/$(LIBMAJOR)
rm -f $(DESTDIR)$(LIBDIR)/$(LIBBASE)
$(LN_S) $(LIBMAJOR) $(DESTDIR)$(LIBDIR)/$(LIBBASE)
clean::
rm -f $(LIBFILE) $(LIBMAJOR) $(LIBBASE) $(OBJS)