]> git.wh0rd.org - fontconfig.git/blobdiff - configure.in
More autoconf cleanup for fontconfig
[fontconfig.git] / configure.in
index e87bd810018b908c4f1eff5c65cfe744a1b757d4..4cd437b75ddbfaed99d1abdcf4cbb0643b74c968 100644 (file)
@@ -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])
+