More autoconf cleanup for fontconfig
This commit is contained in:
parent
fb9545b1ba
commit
446bb9c9e0
|
@ -22,11 +22,9 @@
|
|||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
TOPDIR=.
|
||||
DEPTH = .
|
||||
|
||||
include $(TOPDIR)/config/Makedefs
|
||||
|
||||
DIRS = src fc-cache fc-list
|
||||
DIRS = src fc-cache fc-list fontconfig
|
||||
|
||||
all install clean::
|
||||
for d in $(DIRS); do $(MAKE) -C $$d $@; done
|
||||
|
@ -35,7 +33,7 @@ all:: fonts.conf
|
|||
|
||||
fonts.conf: fonts.conf.in
|
||||
rm -f $@
|
||||
sh ./setfontdirs /usr/share/fonts $(FONTDIR)
|
||||
sh ./setfontdirs $(FC_DEFAULT_FONTS) $(X_FONT_DIR)
|
||||
|
||||
install:: $(CONFDIR)/fonts.conf $(CONFDIR)/fonts.dtd
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* config.h.in. Generated manually by keithp. */
|
||||
|
||||
/* Path library uses when config file is broken */
|
||||
#undef FC_FALLBACK_FONTS
|
||||
#undef FC_DEFAULT_FONTS
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# $XFree86$
|
||||
# $XFree86: xc/lib/fontconfig/config/Makedefs.in,v 1.1 2002/05/21 17:06:21 keithp Exp $
|
||||
#
|
||||
# Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
|
||||
#
|
||||
|
@ -52,12 +52,17 @@ INSTALL_DATA=@INSTALL_DATA@
|
|||
MKSHLIB=@MKSHLIB@
|
||||
LN_S=@LN_S@
|
||||
|
||||
X_FONT_DIR=@X_FONT_DIR@
|
||||
FC_DEFAULT_FONTS=@FC_DEFAULT_FONTS@
|
||||
|
||||
# shared libraries
|
||||
LIBDIR=$(libdir)
|
||||
# programs
|
||||
BINDIR=$(bindir)
|
||||
# font configuration files
|
||||
CONFDIR=$(sysconfdir)/fonts
|
||||
# include files
|
||||
INCLUDEDIR=$(includedir)/fontconfig
|
||||
|
||||
LIBBASE=libfontconfig.so
|
||||
LIBFILE=$(LIBBASE).@PACKAGE_MAJOR@.@PACKAGE_MINOR@
|
||||
|
@ -66,3 +71,6 @@ LIBMAJOR=$(LIBBASE).@PACKAGE_MAJOR@
|
|||
LIBFONTCONFIG=-L$(SRCDIR) -lfontconfig
|
||||
|
||||
SRCDIR=$(TOPDIR)/src
|
||||
|
||||
INCDIR=$(TOPDIR)/fontconfig
|
||||
HEADERS=$(INCDIR)/fontconfig.h $(INCDIR)/fcfreetype.h $(INCDIR)/fcprivate.h
|
||||
|
|
55
configure.in
55
configure.in
|
@ -1,5 +1,5 @@
|
|||
dnl
|
||||
dnl $XFree86$
|
||||
dnl $XFree86: xc/lib/fontconfig/configure.in,v 1.2 2002/05/21 17:08:42 keithp Exp $
|
||||
dnl
|
||||
dnl Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
|
||||
dnl
|
||||
|
@ -36,12 +36,13 @@ AC_ARG_WITH(expat_lib, [ --with-expat-lib=DIR Use Expat librar
|
|||
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(default_fonts, [ --with-default-fonts=DIR Use fonts from DIR when config is busted], defaultfonts="$withval", default_fonts=yes)
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PATH_X
|
||||
|
||||
PACKAGE_VERSION=1.0.1
|
||||
|
||||
|
@ -60,10 +61,6 @@ 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
|
||||
|
@ -74,9 +71,6 @@ 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])
|
||||
|
||||
|
@ -97,6 +91,18 @@ AC_SUBST(DSO_LDOPTS)
|
|||
AC_SUBST(DSO_CFLAGS)
|
||||
AC_SUBST(DSO_PIC_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 freetype configuration
|
||||
#
|
||||
|
@ -173,18 +179,19 @@ yes)
|
|||
esac
|
||||
;;
|
||||
esac
|
||||
#AH_TEMPLATE([HAVE_FREETYPE],[whether system has freetype2 library])
|
||||
|
||||
case "$fallback_fonts" in
|
||||
case "$default_fonts" in
|
||||
yes)
|
||||
AC_DEFINE_UNQUOTED(FC_FALLBACK_FONTS, "/usr/share/fonts")
|
||||
FC_DEFAULT_FONTS="/usr/share/fonts"
|
||||
AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "/usr/share/fonts")
|
||||
;;
|
||||
*)
|
||||
AC_DEFINE_UNQUOTED(FC_FALLBACK_FONTS, "$fallback_fonts")
|
||||
FC_DEFAULT_FONTS="$default_fonts"
|
||||
AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "$default_fonts")
|
||||
;;
|
||||
esac
|
||||
#AH_TEMPLATE([FC_FALLBACK_FONTS],
|
||||
# [Path library uses when config file is broken])
|
||||
|
||||
AC_SUBST(FC_DEFAULT_FONTS)
|
||||
|
||||
#
|
||||
# Check expat/libxml2 configuration
|
||||
|
@ -355,28 +362,16 @@ no)
|
|||
;;
|
||||
esac
|
||||
|
||||
#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
|
||||
|
||||
#AC_CONFIG_FILES([Makefile
|
||||
# fc-cache/Makefile
|
||||
# fc-list/Makefile
|
||||
# fontconfig/Makefile
|
||||
# src/Makefile])
|
||||
#AC_CONFIG_FILES([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
|
||||
fc-list/Makefile
|
||||
fontconfig/Makefile])
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# $XFree86$
|
||||
# $XFree86: xc/lib/fontconfig/fc-cache/Makefile.in,v 1.1 2002/05/21 17:06:21 keithp Exp $
|
||||
#
|
||||
# Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
|
||||
#
|
||||
|
@ -44,3 +44,5 @@ clean::
|
|||
|
||||
$(PROG): $(OBJS)
|
||||
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBFONTCONFIG)
|
||||
|
||||
$(OBJS): $(HEADERS)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# $XFree86$
|
||||
# $XFree86: xc/lib/fontconfig/fc-list/Makefile.in,v 1.1 2002/05/21 17:06:21 keithp Exp $
|
||||
#
|
||||
# Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
|
||||
#
|
||||
|
@ -44,3 +44,5 @@ clean::
|
|||
|
||||
$(PROG): $(OBJS)
|
||||
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBFONTCONFIG)
|
||||
|
||||
$(OBJS): $(HEADERS)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
FONTCONFIGSRC=.
|
||||
|
||||
FALLBACK_FONTS=$(FONTDIR)/Type1
|
||||
FC_DEFAULT_FONTS=$(FONTDIR)/Type1
|
||||
|
||||
#define DoNormalLib NormalLibFontconfig
|
||||
#define DoSharedLib SharedLibFontconfig
|
||||
|
@ -23,7 +23,7 @@ SOFONTCONFIGREV=1.0
|
|||
|
||||
INCLUDES=$(FREETYPE2INCLUDES) $(LIBXML2INCLUDES) -I..
|
||||
|
||||
DEFINES=-DFC_FALLBACK_FONTS='"$(FALLBACK_FONTS)"'
|
||||
DEFINES=-DFC_DEFAULT_FONTS='"$(FC_DEFAULT_FONTS)"'
|
||||
|
||||
EXPATLIB=-lexpat
|
||||
REQUIREDLIBS=$(LDPRELIBS) $(FREETYPE2LIB) $(EXPATLIB)
|
||||
|
|
|
@ -41,7 +41,6 @@ SRCS=fcatomic.c \
|
|||
fcfs.c \
|
||||
fcinit.c \
|
||||
fclist.c \
|
||||
fclock.c \
|
||||
fcmatch.c \
|
||||
fcmatrix.c \
|
||||
fcname.c \
|
||||
|
@ -62,7 +61,6 @@ OBJS=fcatomic.@OBJEXT@ \
|
|||
fcfs.@OBJEXT@ \
|
||||
fcinit.@OBJEXT@ \
|
||||
fclist.@OBJEXT@ \
|
||||
fclock.@OBJEXT@ \
|
||||
fcmatch.@OBJEXT@ \
|
||||
fcmatrix.@OBJEXT@ \
|
||||
fcname.@OBJEXT@ \
|
||||
|
@ -101,5 +99,4 @@ $(LIBBASE): $(LIBMAJOR)
|
|||
rm -f $@
|
||||
$(LN_S) $(LIBMAJOR) $(LIBBASE)
|
||||
|
||||
$(OBJS): fcint.h $(TOPDIR)/fontconfig/fontconfig.h
|
||||
$(OBJS): $(TOPDIR)/fontconfig/fcprivate.h $(TOPDIR)/config.h
|
||||
$(OBJS): fcint.h $(HEADERS)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $XFree86: xc/lib/fontconfig/src/fcinit.c,v 1.3 2002/02/19 08:33:23 keithp Exp $
|
||||
* $XFree86: xc/lib/fontconfig/src/fcinit.c,v 1.4 2002/05/21 17:06:22 keithp Exp $
|
||||
*
|
||||
* Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
|
||||
*
|
||||
|
@ -33,7 +33,7 @@ FcInitFallbackConfig (void)
|
|||
config = FcConfigCreate ();
|
||||
if (!config)
|
||||
goto bail0;
|
||||
if (!FcConfigAddDir (config, (FcChar8 *) FC_FALLBACK_FONTS))
|
||||
if (!FcConfigAddDir (config, (FcChar8 *) FC_DEFAULT_FONTS))
|
||||
goto bail1;
|
||||
return config;
|
||||
|
||||
|
|
Loading…
Reference in New Issue