diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-17 21:16:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-17 21:16:42 +0000 |
commit | a3d3111bfe26b8e5f5bc6049dfb2a4ca2edc7881 (patch) | |
tree | f4a8a34f904c1bb86adcc3ae0e14434badc6dbe4 /Build/source/utils/t1utils/configure.in | |
parent | 6c0eafbb1395d426a72a74538e0b2a95e8344ca6 (diff) |
utils 1
git-svn-id: svn://tug.org/texlive/trunk@1484 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/t1utils/configure.in')
-rw-r--r-- | Build/source/utils/t1utils/configure.in | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/Build/source/utils/t1utils/configure.in b/Build/source/utils/t1utils/configure.in new file mode 100644 index 00000000000..9e9fee3907c --- /dev/null +++ b/Build/source/utils/t1utils/configure.in @@ -0,0 +1,110 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(t1ascii.c) +AM_INIT_AUTOMAKE(t1utils, 1.32) +AM_CONFIG_HEADER(config.h) + +AC_PROG_CC +AC_C_CONST + +AC_ARG_ENABLE(warnings, +[ --enable-warnings compile with -Wall], +if test "$enableval" = yes ; then + CFLAGS="$CFLAGS -W -Wall" +fi) + + +dnl +dnl strerror()? +dnl + +AC_REPLACE_FUNCS(strerror) + + +dnl +dnl integer types +dnl + +AC_CHECK_HEADERS(inttypes.h, have_inttypes_h=yes, have_inttypes_h=no) +AC_CHECK_HEADERS(sys/types.h, have_sys_types_h=yes, have_sys_types_h=no) + +if test $have_inttypes_h = no -a $have_sys_types_h = yes; then + AC_CACHE_CHECK([for uintXX_t typedefs], ac_cv_uint_t, + [AC_EGREP_HEADER(dnl +changequote(<<,>>)<<(^|[^a-zA-Z_0-9])uint32_t[^a-zA-Z_0-9]>>changequote([,]), + sys/types.h, ac_cv_uint_t=yes, ac_cv_uint_t=no)]) +fi +if test $have_inttypes_h = no -a $have_sys_types_h = yes -a "$ac_cv_uint_t" = no; then + AC_CACHE_CHECK([for u_intXX_t typedefs], ac_cv_u_int_t, + [AC_EGREP_HEADER(dnl +changequote(<<,>>)<<(^|[^a-zA-Z_0-9])u_int32_t[^a-zA-Z_0-9]>>changequote([,]), + sys/types.h, ac_cv_u_int_t=yes, ac_cv_u_int_t=no)]) +fi +if test $have_inttypes_h = yes -o "$ac_cv_uint_t" = yes; then + : +elif test "$ac_cv_u_int_t" = yes; then + AC_DEFINE(HAVE_U_INT_TYPES, 1, [Define if you have u_intXX_t types but not uintXX_t types.]) +else + AC_MSG_WARN([ +========================================= + +Neither uint32_t nor u_int32_t defined by <inttypes.h> or <sys/types.h>! +Assuming "short" has 16 bits and "int" has 32 bits. + +=========================================]) + AC_DEFINE(HAVE_FAKE_INT_TYPES, 1, [Define if intXX_t types are not available.]) +fi + +AC_CHECK_TYPES(uintptr_t, [], [], +[#if HAVE_INTTYPES_H +# include <inttypes.h> +#endif +#if HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +]) + +AC_CHECK_SIZEOF(void *) +AC_CHECK_SIZEOF(unsigned long) +AC_CHECK_SIZEOF(unsigned int) + + +dnl +dnl verbatim portions of the header +dnl + +AH_TOP([#ifndef T1UTILS_CONFIG_H +#define T1UTILS_CONFIG_H]) + +AH_BOTTOM([#include <lcdf/inttypes.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Prototype strerror if we don't have it. */ +#if !HAVE_STRERROR +char *strerror(int errno); +#endif + +#ifdef __cplusplus +} +/* Get rid of a possible inline macro under C++. */ +# define inline inline +#endif + +#endif /* T1UTILS_CONFIG_H */]) + + +dnl +dnl Output +dnl + +# For teTeX and TeX Live. +AC_CANONICAL_HOST +AC_ARG_ENABLE(multiplatform, + [ --enable-multiplatform put executables in bin/PLATFORM]) +test "x$enable_multiplatform" = xyes \ + && test "x$bindir" = 'x${exec_prefix}/bin' \ + && bindir="$bindir/$host" + +AC_OUTPUT(Makefile) |