From: Keith Packard Date: Tue, 21 May 2002 17:48:15 +0000 (+0000) Subject: More autoconf cleanup for fontconfig X-Git-Tag: xf-4_2_99_1~23 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=446bb9c9e0a18d365de0578c6f0daf676e36f168;p=fontconfig.git More autoconf cleanup for fontconfig --- diff --git a/Makefile.in b/Makefile.in index d9d1014..3d7d8cd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 diff --git a/config.h.in b/config.h.in index e9b788e..be68fa2 100644 --- a/config.h.in +++ b/config.h.in @@ -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 header file, and it defines `DIR'. */ diff --git a/config/Makedefs.in b/config/Makedefs.in index b304379..1d7d7a1 100644 --- a/config/Makedefs.in +++ b/config/Makedefs.in @@ -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 diff --git a/configure.in b/configure.in index e87bd81..4cd437b 100644 --- a/configure.in +++ b/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]) + diff --git a/fc-cache/Makefile.in b/fc-cache/Makefile.in index 7cde602..7cc9d0c 100644 --- a/fc-cache/Makefile.in +++ b/fc-cache/Makefile.in @@ -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) diff --git a/fc-list/Makefile.in b/fc-list/Makefile.in index 7d92286..18943f1 100644 --- a/fc-list/Makefile.in +++ b/fc-list/Makefile.in @@ -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) diff --git a/src/Imakefile b/src/Imakefile index c86ae2b..cf56f31 100644 --- a/src/Imakefile +++ b/src/Imakefile @@ -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) diff --git a/src/Makefile.in b/src/Makefile.in index 9e557e7..0b156e9 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -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) diff --git a/src/fcinit.c b/src/fcinit.c index 8154b65..1b9ef2a 100644 --- a/src/fcinit.c +++ b/src/fcinit.c @@ -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;