summaryrefslogtreecommitdiff
path: root/Build/source/libs/teckit/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/teckit/configure.ac')
-rw-r--r--Build/source/libs/teckit/configure.ac111
1 files changed, 36 insertions, 75 deletions
diff --git a/Build/source/libs/teckit/configure.ac b/Build/source/libs/teckit/configure.ac
index 6687096d2d7..044349b019a 100644
--- a/Build/source/libs/teckit/configure.ac
+++ b/Build/source/libs/teckit/configure.ac
@@ -1,96 +1,57 @@
-AC_PREREQ(2.54)
-AC_INIT(teckit, 2.5.1, jonathan_kew@sil.org)
-AM_CONFIG_HEADER([config.h])
+dnl Process this file with autoconf to produce a configure script.
+dnl
+dnl Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+dnl
+dnl This file is free software; the copyright holder
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+AC_INIT([teckit for TeX Live], [2.5.1], [tex-k@tug.org])
+AC_PREREQ([2.63])
AC_CONFIG_SRCDIR([source/UnicodeNames.cpp])
-AC_CANONICAL_SYSTEM
-
-AM_INIT_AUTOMAKE
+AC_CONFIG_AUX_DIR([../../build-aux])
+AC_CONFIG_MACRO_DIR([../../m4])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
-AC_PROG_INSTALL
-AC_PROG_LIBTOOL
+AC_PROG_RANLIB
+AC_PROG_LN_S
-if test "${target_os}" = "mingw32"; then
-AC_PROG_RC
-fi
+# Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS([stdlib.h string.h])
-AC_ARG_WITH(old-lib-names,
-[ --with-old-lib-names Use old library names (for Windows only)],
-[case "${withval}" in
- yes) oldnames=true ;;
- no) oldnames=false ;;
- *) AC_MSG_ERROR(bad value ${withval} for --with-old-lib-names) ;;
-esac],[oldnames=false])
-AM_CONDITIONAL(OLD_LIB_NAMES, test x$oldnames = xtrue)
+AC_C_BIGENDIAN
-sinclude(../../libs/zlib/withenable.ac)
-sinclude(../../libs/zlib/zlib.ac)
+AC_CONFIG_HEADERS([config.h])
-# Checks for libraries.
-## NO! see above
-## AC_CHECK_LIB(z, compress)
-## AM_CONDITIONAL(SYSTEM_ZLIB, test x$ac_cv_lib_z_compress = xyes)
-## SYSTEM_ZLIB=no
+KPSE_ZLIB_FLAGS
-# Checks for header files.
-AC_HEADER_STDC
-AC_CHECK_HEADERS([stdlib.h string.h])
+AM_CONDITIONAL([build], [test "x$enable_build" != xno])
+# Configure must not fail, or 'make dist' will fail as well; thus
+# don't run any tests for '--disable-build', there may be no zlib.
+if test "x$enable_build" != xno; then
-AC_C_BIGENDIAN
+save_CPPFLAGS=$CPPFLAGS
+save_LIBS=$LIBS
-# Enable debug
-if test "$enable_debug" = yes; then
- CFLAGS="$CFLAGS -O0"
- CXXFLAGS="$CXXFLAGS -O0"
- if test "$ac_cv_prog_cc_g" = yes; then
- CFLAGS="$CFLAGS -g"
- fi
- if test "$ac_cv_prog_cxx_g" = yes; then
- CXXFLAGS="$CXXFLAGS -g"
- fi
- CFLAGS="$CFLAGS -Wno-unknown-pragmas -Wparentheses -Werror "
- CXXFLAGS="$CXXFLAGS -Wno-unknown-pragmas -Wparentheses -Werror "
-# AC_DEFINE(DEBUG)
-else
- CFLAGS="$CFLAGS -DNDEBUG"
- CXXFLAGS="$CXXFLAGS -DNDEBUG"
-fi
+CPPFLAGS="$CPPFLAGS $ZLIB_INCLUDES"
+LIBS="$ZLIB_LIBS $LIBS"
-# Enable final
-if test "$enable_final" = yes; then
- CFLAGS="-O3 -DNDEBUG"
- CXXFLAGS="-O3 -DNDEBUG"
-fi
+AC_CHECK_FUNC([compress], , [AC_ERROR([zlib not found])])
+AC_CHECK_HEADERS([zlib.h], , [AC_ERROR([zlib not found])])
+AC_DEFINE([HAVE_LIBZ], 1, [Define if you have zlib.])
-# Enable profile
-if test "$enable_profile" = yes; then
- CFLAGS="$CFLAGS -pg "
- CXXFLAGS="$CXXFLAGS -pg "
-fi
-if test "$enable_profilefn" = yes; then
- CFLAGS="$CFLAGS -g -finstrument-functions "
- CXXFLAGS="$CXXFLAGS -g -finstrument-functions "
- LIBS="$LIBS -g -finstrument-functions -lfnccheck "
-fi
+CPPFLAGS=$save_CPPFLAGS
+LIBS=$save_LIBS
-# We only want expat for sfconv, so remember the libs setting without it
-# (this seems really hacky, but I don't know the proper way....!)
-noexpat_CFLAGS="$CFLAGS"
-noexpat_LIBS="$LIBS"
-AC_CHECK_LIB(expat, XML_ExpatVersion)
-AM_CONDITIONAL(SYSTEM_EXPAT, test x$ac_cv_lib_expat_XML_ExpatVersion = xyes)
-expat_CFLAGS="$CFLAGS"
-expat_LIBS="$LIBS"
-CFLAGS="$noexpat_CFLAGS"
-LIBS="$noexpat_LIBS"
-AC_SUBST(expat_CFLAGS)
-AC_SUBST(expat_LIBS)
+fi
-AC_CONFIG_FILES([ Makefile lib/Makefile bin/Makefile docs/Makefile test/Makefile])
+AC_CONFIG_FILES([Makefile])
AC_OUTPUT