OSDN Git Service

feef29b29c1a8844787cfb0a6643f27a2e166a57
[putex/putex.git] / src / texsourc / libtoua / ptexenc / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2 dnl
3 dnl   Copyright (C) 2010 Peter Breitenlohner <tex-live@tug.org>
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 ptexenc_version
10 AC_INIT([ptexenc], ptexenc_version, [tex-k@tug.org])
11 AC_PREREQ([2.63])
12 AC_CONFIG_SRCDIR([ptexenc.c])
13 AC_CONFIG_AUX_DIR([../../build-aux])
14 AC_CONFIG_MACRO_DIR([../../m4])
15
16 AC_SUBST([PTEXENCVERSION], [ptexenc_version])
17 AC_DEFINE([PTEXENCVERSION], ["ptexenc version ptexenc_version"])
18 KPSE_LT_VERSION([ptexenc])
19
20 dnl Common code for all programs (or libraries) using libkpathsea.
21 KPSE_COMMON([ptexenc])
22
23 KPSE_KPATHSEA_FLAGS
24
25 dnl Using iconv for kanji <=> unicode conversion
26 AC_ARG_ENABLE([kanji-iconv],
27               AS_HELP_STRING([--enable-kanji-iconv],
28                              [Use iconv for kanji <=> unicode conversion]))
29
30 if test "x$enable_kanji_iconv" = "xyes"; then
31 AC_DEFINE([KANJI_ICONV], 1,
32           [Define to 1 if you use iconv for kanji <=> unicode conversion.])
33 AC_CHECK_LIB([iconv], [iconv_open], ,[AC_CHECK_LIB([iconv], [libiconv_open])])
34 AC_CHECK_HEADERS([iconv.h])
35 AC_CHECK_FUNCS([iconv])
36 AC_CHECK_FUNCS([atexit on_exit], [break])
37 fi
38
39 dnl Write output here, instead of putting a zillion -D's on the command line.
40 AC_CONFIG_HEADERS([ptexenc/c-auto.h:c-auto.in],
41  [sed -e 's/^#define PACKAGE/#define PTEXENC_PACKAGE/' \
42       -e 's/^#define VERSION/#define PTEXENC_VERSION/' ptexenc/c-auto.h >c-auto.tmp \
43     && mv -f c-auto.tmp ptexenc/c-auto.h])
44
45 AH_TOP([/* ptexenc/c-auto.h: defines for ptexenc, as determined by configure. */
46 /* Guard against double inclusion. */
47 #ifndef PTEXENC_C_AUTO_H
48 #define PTEXENC_C_AUTO_H
49
50 /* ptexenc: the version string. */
51 #define PTEXENCVERSION "REPLACE-WITH-PTEXENCVERSION"])
52 AH_BOTTOM([#endif /* !PTEXENC_C_AUTO_H */])
53
54 AC_CONFIG_FILES([Makefile])
55
56 AC_OUTPUT