Commit 446bb9c9 authored by Keith Packard's avatar Keith Packard

More autoconf cleanup for fontconfig

parent fb9545b1
...@@ -22,11 +22,9 @@ ...@@ -22,11 +22,9 @@
# PERFORMANCE OF THIS SOFTWARE. # PERFORMANCE OF THIS SOFTWARE.
# #
TOPDIR=. DEPTH = .
include $(TOPDIR)/config/Makedefs DIRS = src fc-cache fc-list fontconfig
DIRS = src fc-cache fc-list
all install clean:: all install clean::
for d in $(DIRS); do $(MAKE) -C $$d $@; done for d in $(DIRS); do $(MAKE) -C $$d $@; done
...@@ -35,7 +33,7 @@ all:: fonts.conf ...@@ -35,7 +33,7 @@ all:: fonts.conf
fonts.conf: fonts.conf.in fonts.conf: fonts.conf.in
rm -f $@ rm -f $@
sh ./setfontdirs /usr/share/fonts $(FONTDIR) sh ./setfontdirs $(FC_DEFAULT_FONTS) $(X_FONT_DIR)
install:: $(CONFDIR)/fonts.conf $(CONFDIR)/fonts.dtd install:: $(CONFDIR)/fonts.conf $(CONFDIR)/fonts.dtd
......
/* config.h.in. Generated manually by keithp. */ /* config.h.in. Generated manually by keithp. */
/* Path library uses when config file is broken */ /* 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'. /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/ */
......
# #
# $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. # Copyright 2002 Keith Packard, member of The XFree86 Project, Inc.
# #
...@@ -52,12 +52,17 @@ INSTALL_DATA=@INSTALL_DATA@ ...@@ -52,12 +52,17 @@ INSTALL_DATA=@INSTALL_DATA@
MKSHLIB=@MKSHLIB@ MKSHLIB=@MKSHLIB@
LN_S=@LN_S@ LN_S=@LN_S@
X_FONT_DIR=@X_FONT_DIR@
FC_DEFAULT_FONTS=@FC_DEFAULT_FONTS@
# shared libraries # shared libraries
LIBDIR=$(libdir) LIBDIR=$(libdir)
# programs # programs
BINDIR=$(bindir) BINDIR=$(bindir)
# font configuration files # font configuration files
CONFDIR=$(sysconfdir)/fonts CONFDIR=$(sysconfdir)/fonts
# include files
INCLUDEDIR=$(includedir)/fontconfig
LIBBASE=libfontconfig.so LIBBASE=libfontconfig.so
LIBFILE=$(LIBBASE).@PACKAGE_MAJOR@.@PACKAGE_MINOR@ LIBFILE=$(LIBBASE).@PACKAGE_MAJOR@.@PACKAGE_MINOR@
...@@ -66,3 +71,6 @@ LIBMAJOR=$(LIBBASE).@PACKAGE_MAJOR@ ...@@ -66,3 +71,6 @@ LIBMAJOR=$(LIBBASE).@PACKAGE_MAJOR@
LIBFONTCONFIG=-L$(SRCDIR) -lfontconfig LIBFONTCONFIG=-L$(SRCDIR) -lfontconfig
SRCDIR=$(TOPDIR)/src SRCDIR=$(TOPDIR)/src
INCDIR=$(TOPDIR)/fontconfig
HEADERS=$(INCDIR)/fontconfig.h $(INCDIR)/fcfreetype.h $(INCDIR)/fcprivate.h
dnl dnl
dnl $XFree86$ dnl $XFree86: xc/lib/fontconfig/configure.in,v 1.2 2002/05/21 17:08:42 keithp Exp $
dnl dnl
dnl Copyright 2002 Keith Packard, member of The XFree86 Project, Inc. dnl Copyright 2002 Keith Packard, member of The XFree86 Project, Inc.
dnl dnl
...@@ -36,12 +36,13 @@ AC_ARG_WITH(expat_lib, [ --with-expat-lib=DIR Use Expat librar ...@@ -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, [ --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_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(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. # Checks for programs.
AC_PROG_CC AC_PROG_CC
AC_PROG_INSTALL AC_PROG_INSTALL
AC_PROG_LN_S AC_PROG_LN_S
AC_PATH_X
PACKAGE_VERSION=1.0.1 PACKAGE_VERSION=1.0.1
...@@ -60,10 +61,6 @@ AC_DEFINE_UNQUOTED(PACKAGE_MAJOR,$PACKAGE_MAJOR) ...@@ -60,10 +61,6 @@ AC_DEFINE_UNQUOTED(PACKAGE_MAJOR,$PACKAGE_MAJOR)
AC_DEFINE_UNQUOTED(PACKAGE_MINOR,$PACKAGE_MINOR) AC_DEFINE_UNQUOTED(PACKAGE_MINOR,$PACKAGE_MINOR)
AC_DEFINE_UNQUOTED(PACKAGE_REVISION,$PACKAGE_REVISION) 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. # Checks for header files.
AC_HEADER_DIRENT AC_HEADER_DIRENT
AC_HEADER_STDC AC_HEADER_STDC
...@@ -74,9 +71,6 @@ AC_C_CONST ...@@ -74,9 +71,6 @@ AC_C_CONST
AC_TYPE_PID_T AC_TYPE_PID_T
# Checks for library functions. # Checks for library functions.
#AC_FUNC_MALLOC
#AC_FUNC_STAT
#AC_FUNC_STRTOD
AC_FUNC_VPRINTF AC_FUNC_VPRINTF
AC_CHECK_FUNCS([memmove memset strchr strrchr strtol getopt getopt_long]) AC_CHECK_FUNCS([memmove memset strchr strrchr strtol getopt getopt_long])
...@@ -97,6 +91,18 @@ AC_SUBST(DSO_LDOPTS) ...@@ -97,6 +91,18 @@ AC_SUBST(DSO_LDOPTS)
AC_SUBST(DSO_CFLAGS) AC_SUBST(DSO_CFLAGS)
AC_SUBST(DSO_PIC_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 # Check freetype configuration
# #
...@@ -173,18 +179,19 @@ yes) ...@@ -173,18 +179,19 @@ yes)
esac esac
;; ;;
esac esac
#AH_TEMPLATE([HAVE_FREETYPE],[whether system has freetype2 library])
case "$fallback_fonts" in case "$default_fonts" in
yes) 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 esac
#AH_TEMPLATE([FC_FALLBACK_FONTS],
# [Path library uses when config file is broken]) AC_SUBST(FC_DEFAULT_FONTS)
# #
# Check expat/libxml2 configuration # Check expat/libxml2 configuration
...@@ -355,28 +362,16 @@ no) ...@@ -355,28 +362,16 @@ no)
;; ;;
esac 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 case "$expat""$xml2" in
nono) nono)
AC_MSG_ERROR([cannot find either libxml2 or expat]) AC_MSG_ERROR([cannot find either libxml2 or expat])
;; ;;
esac 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 AC_OUTPUT([Makefile
config/Makedefs config/Makedefs
src/Makefile src/Makefile
fc-cache/Makefile fc-cache/Makefile
fc-list/Makefile]) fc-list/Makefile
#AC_OUTPUT fontconfig/Makefile])
# #
# $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. # Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
# #
...@@ -44,3 +44,5 @@ clean:: ...@@ -44,3 +44,5 @@ clean::
$(PROG): $(OBJS) $(PROG): $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBFONTCONFIG) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBFONTCONFIG)
$(OBJS): $(HEADERS)
# #
# $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. # Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
# #
...@@ -44,3 +44,5 @@ clean:: ...@@ -44,3 +44,5 @@ clean::
$(PROG): $(OBJS) $(PROG): $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBFONTCONFIG) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBFONTCONFIG)
$(OBJS): $(HEADERS)
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
FONTCONFIGSRC=. FONTCONFIGSRC=.
FALLBACK_FONTS=$(FONTDIR)/Type1 FC_DEFAULT_FONTS=$(FONTDIR)/Type1
#define DoNormalLib NormalLibFontconfig #define DoNormalLib NormalLibFontconfig
#define DoSharedLib SharedLibFontconfig #define DoSharedLib SharedLibFontconfig
...@@ -23,7 +23,7 @@ SOFONTCONFIGREV=1.0 ...@@ -23,7 +23,7 @@ SOFONTCONFIGREV=1.0
INCLUDES=$(FREETYPE2INCLUDES) $(LIBXML2INCLUDES) -I.. INCLUDES=$(FREETYPE2INCLUDES) $(LIBXML2INCLUDES) -I..
DEFINES=-DFC_FALLBACK_FONTS='"$(FALLBACK_FONTS)"' DEFINES=-DFC_DEFAULT_FONTS='"$(FC_DEFAULT_FONTS)"'
EXPATLIB=-lexpat EXPATLIB=-lexpat
REQUIREDLIBS=$(LDPRELIBS) $(FREETYPE2LIB) $(EXPATLIB) REQUIREDLIBS=$(LDPRELIBS) $(FREETYPE2LIB) $(EXPATLIB)
......
...@@ -41,7 +41,6 @@ SRCS=fcatomic.c \ ...@@ -41,7 +41,6 @@ SRCS=fcatomic.c \
fcfs.c \ fcfs.c \
fcinit.c \ fcinit.c \
fclist.c \ fclist.c \
fclock.c \
fcmatch.c \ fcmatch.c \
fcmatrix.c \ fcmatrix.c \
fcname.c \ fcname.c \
...@@ -62,7 +61,6 @@ OBJS=fcatomic.@OBJEXT@ \ ...@@ -62,7 +61,6 @@ OBJS=fcatomic.@OBJEXT@ \
fcfs.@OBJEXT@ \ fcfs.@OBJEXT@ \
fcinit.@OBJEXT@ \ fcinit.@OBJEXT@ \
fclist.@OBJEXT@ \ fclist.@OBJEXT@ \
fclock.@OBJEXT@ \
fcmatch.@OBJEXT@ \ fcmatch.@OBJEXT@ \
fcmatrix.@OBJEXT@ \ fcmatrix.@OBJEXT@ \
fcname.@OBJEXT@ \ fcname.@OBJEXT@ \
...@@ -101,5 +99,4 @@ $(LIBBASE): $(LIBMAJOR) ...@@ -101,5 +99,4 @@ $(LIBBASE): $(LIBMAJOR)
rm -f $@ rm -f $@
$(LN_S) $(LIBMAJOR) $(LIBBASE) $(LN_S) $(LIBMAJOR) $(LIBBASE)
$(OBJS): fcint.h $(TOPDIR)/fontconfig/fontconfig.h $(OBJS): fcint.h $(HEADERS)
$(OBJS): $(TOPDIR)/fontconfig/fcprivate.h $(TOPDIR)/config.h
/* /*
* $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. * Copyright 2001 Keith Packard, member of The XFree86 Project, Inc.
* *
...@@ -33,7 +33,7 @@ FcInitFallbackConfig (void) ...@@ -33,7 +33,7 @@ FcInitFallbackConfig (void)
config = FcConfigCreate (); config = FcConfigCreate ();
if (!config) if (!config)
goto bail0; goto bail0;
if (!FcConfigAddDir (config, (FcChar8 *) FC_FALLBACK_FONTS)) if (!FcConfigAddDir (config, (FcChar8 *) FC_DEFAULT_FONTS))
goto bail1; goto bail1;
return config; return config;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment