X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=configure.in;h=7875831371933c28e11bcf50ce8b9cb0aaac9ba7;hb=7a03bbdceb4ea5b673caf89bfcafa84211a456f0;hp=26fd05b27c710be6f9d489777abd3c6521d5b04e;hpb=b17cf498be69f483e6355ae468f7239165df3ffb;p=fontconfig.git diff --git a/configure.in b/configure.in index 26fd05b..7875831 100644 --- a/configure.in +++ b/configure.in @@ -33,7 +33,7 @@ dnl This is the package version number, not the shared library dnl version. This same version number must appear in fontconfig/fontconfig.h dnl Yes, it is a pain to synchronize version numbers. Unfortunately, it's dnl not possible to extract the version number here from fontconfig.h -AM_INIT_AUTOMAKE(fontconfig, 2.3.94) +AM_INIT_AUTOMAKE(fontconfig, 2.3.95) AM_MAINTAINER_MODE dnl libtool versioning @@ -132,18 +132,69 @@ AC_SUBST(EXEEXT_FOR_BUILD) dnl ========================================================================== +AC_ARG_WITH(arch, [ --with-arch=ARCH Force architecture to ARCH], arch="$withval", arch=auto) + +if test $cross_compiling = yes; then + case "$arch" in + auto) + AC_MSG_ERROR([Cannot autodetect architecture in cross compile environment] + [Use --with-arch=ARCH to specify architecture]) + ;; + esac +fi + +ARCHITECTURE=$arch +AC_SUBST(ARCHITECTURE) + +dnl ========================================================================== + # Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC -AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h iconv.h]) +AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST +AC_C_INLINE AC_TYPE_PID_T # Checks for library functions. AC_FUNC_VPRINTF -AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr strtol getopt getopt_long iconv]) +AC_FUNC_MMAP +AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr strtol getopt getopt_long sysconf ftruncate chsize rand_r]) + +# +# Checks for iconv +# +AC_MSG_CHECKING([for a usable iconv]) +ICONV_LIBS="" +AC_TRY_LINK([#include ], + [iconv_open ("from", "to");], + [use_iconv=1], + [use_iconv=0]) +if test x$use_iconv = x1; then + AC_MSG_RESULT([libc]) +else + # try using libiconv + fontconfig_save_libs="$LIBS" + LIBS="$LIBS -liconv" + + AC_TRY_LINK([#include ], + [iconv_open ("from", "to");], + [use_iconv=true], + [use_iconv=false]) + + if test x$use_iconv = x1; then + ICONV_LIBS="-liconv" + AC_MSG_RESULT([libiconv]) + else + AC_MSG_RESULT([no]) + fi + + LIBS="$fontconfig_save_libs" +fi +AC_SUBST(ICONV_LIBS) +AC_DEFINE_UNQUOTED(USE_ICONV,$use_iconv,[Use iconv.]) # # Checks for FreeType @@ -396,6 +447,22 @@ esac AC_SUBST(FC_FONTPATH) +# +# Set default cache directory path +# +AC_ARG_WITH(cache-dir, [ --with-cache-dir=DIR Use DIR to store cache files (default /var/cache/fontconfig)], fc_cachedir="$withval", fc_cachedir=yes) + +case $fc_cachedir in +no|yes) + fc_cachedir=`eval echo "${localstatedir}/cache/"${PACKAGE}` + ;; +*) + ;; +esac +AC_SUBST(fc_cachedir) +FC_CACHEDIR=${fc_cachedir} +AC_SUBST(FC_CACHEDIR) + FC_FONTDATE=`LC_ALL=C date` AC_SUBST(FC_FONTDATE) @@ -481,12 +548,6 @@ fi AC_SUBST(DOCDIR) -# -# Make /var/cache/fontconfig directory available to source code -# - -pkgcachedir='${localstatedir}/cache/'${PACKAGE} -AC_SUBST(pkgcachedir) AC_OUTPUT([ Makefile @@ -494,6 +555,7 @@ fontconfig/Makefile fc-lang/Makefile fc-glyphname/Makefile fc-case/Makefile +fc-arch/Makefile src/Makefile src/fontconfig.def conf.d/Makefile