| 1 |
dnl Process this file with autoconf to produce a configure script. |
| 2 |
dnl |
| 3 |
dnl Copyright (C) 2009-2015 Peter Breitenlohner <[email protected]> |
| 4 |
dnl |
| 5 |
dnl This file is free software; the copyright holder |
| 6 |
dnl gives unlimited permission to copy and/or distribute it, |
| 7 |
dnl with or without modifications, as long as this notice is preserved. |
| 8 |
dnl |
| 9 |
m4_include([version.ac])[] dnl define cjk_version |
| 10 |
AC_INIT([CJK utils (TeX Live)], cjk_version, [[email protected]]) |
| 11 |
AC_PREREQ([2.65]) |
| 12 |
AC_CONFIG_SRCDIR([cjkutils-src/hbf2gf/hbf.h]) |
| 13 |
AC_CONFIG_AUX_DIR([../../build-aux]) |
| 14 |
AC_CONFIG_MACRO_DIR([../../m4]) |
| 15 |
|
| 16 |
dnl Common code for all programs using libkpathsea. |
| 17 |
KPSE_COMMON([cjkutils], [no-define]) |
| 18 |
|
| 19 |
AC_CONFIG_HEADERS([c-auto.h:c-auto.in]) |
| 20 |
|
| 21 |
dnl get Compiler flags right. |
| 22 |
XX_CFLAGS=$WARNING_CFLAGS |
| 23 |
AC_SUBST([XX_CFLAGS]) |
| 24 |
|
| 25 |
dnl Checks for typedefs, structures, and compiler characteristics. |
| 26 |
AC_STRUCT_TM |
| 27 |
|
| 28 |
dnl Checks for library functions. |
| 29 |
AC_FUNC_VPRINTF |
| 30 |
|
| 31 |
dnl we need this for hbf.c |
| 32 |
if test "x$ac_cv_func_strdup" = xno; then |
| 33 |
XX_CPPFLAGS=-DNO_STRDUP |
| 34 |
fi |
| 35 |
AC_SUBST([XX_CPPFLAGS]) |
| 36 |
|
| 37 |
KPSE_KPATHSEA_FLAGS |
| 38 |
|
| 39 |
if test "x$enable_build" != xno || test -f config.force; then |
| 40 |
|
| 41 |
KPSE_ADD_FLAGS([kpathsea]) |
| 42 |
AC_CHECK_HEADER([kpathsea/version.h], [], |
| 43 |
[AC_MSG_ERROR([Sorry, kpathsea too old])]) |
| 44 |
KPSE_RESTORE_FLAGS |
| 45 |
|
| 46 |
echo timestamp >config.force |
| 47 |
fi |
| 48 |
|
| 49 |
dnl Rebuilding hbf2gf.c, hbf2gf.tex, and hbf2gf.tex requires ctangle, cweave, and tex |
| 50 |
do_cweb=$enable_maintainer_mode |
| 51 |
if test x"$do_cweb" = xyes; then |
| 52 |
AC_CHECK_PROGS([CTANGLE], [ctangle], [none]) |
| 53 |
AC_CHECK_PROGS([CWEAVE], [cweave], [none]) |
| 54 |
AC_CHECK_PROGS([TEX], [tex], [none]) |
| 55 |
case :$CTANGLE:$CWEAVE:$TEX: in |
| 56 |
*:none:*) |
| 57 |
AC_MSG_WARN([Will not run cweb -- requires ctangle, cweave, and tex.]) |
| 58 |
do_cweb=no |
| 59 |
;; |
| 60 |
esac |
| 61 |
fi |
| 62 |
AM_CONDITIONAL([do_cweb], [test "x$do_cweb" = xyes]) |
| 63 |
|
| 64 |
KPSE_COND_WIN32 |
| 65 |
|
| 66 |
AC_SUBST([CJKUTILS_TREE], [cjkutils-src]) |
| 67 |
|
| 68 |
AC_CONFIG_FILES([Makefile]) |
| 69 |
|
| 70 |
AC_OUTPUT |