blob: dfb19264c74680887732721243c665555db93a3b [file] [log] [blame]
Eitan Isaacson109996e2008-12-20 14:52:53 +00001# Process this file with autoconf to produce a configure script.
2
3AC_PREREQ(2.59)
John Boyerc675d7a2009-01-15 14:32:20 +00004AC_INIT(liblouis, 1.5.1, john.boyer@jjb-software.com)
Eitan Isaacson109996e2008-12-20 14:52:53 +00005AC_CONFIG_SRCDIR([liblouis/lou_backTranslateString.c])
6AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
7AM_CONFIG_HEADER(liblouis/louiscfg.h)
John Boyerdaafc2d2009-01-13 17:04:28 +00008# AM_MAINTAINER_MODE
Eitan Isaacson109996e2008-12-20 14:52:53 +00009
10# Checks for programs.
11AC_PROG_CC
12AC_PROG_INSTALL
13AC_PROG_LN_S
14AC_PROG_MAKE_SET
15AC_PROG_RANLIB
16
17# Checks for libraries.
18
19# Checks for header files.
20AC_HEADER_STDC
21AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
22
23# Checks for typedefs, structures, and compiler characteristics.
24AC_C_CONST
25
26# Checks for library functions.
27AC_FUNC_MALLOC
28AC_FUNC_MEMCMP
29AC_FUNC_REALLOC
30AC_FUNC_VPRINTF
31AC_CHECK_FUNCS([memset])
32
33# This is for stuff that absolutely must end up in pyconfig.h.
34# Please use pyport.h instead, if possible.
35AH_TOP([
36#ifndef LOUISCFG_H
37#define LOUISCFG_H
38])
39AH_BOTTOM([
40#endif /*LOUISCFG_H*/
41])
42
43# increment if the interface has additions, changes, removals.
John Boyer16689ac2009-01-12 15:11:39 +000044LIBLOUIS_CURRENT=2
Eitan Isaacson109996e2008-12-20 14:52:53 +000045
46# increment any time the source changes; set to
47# 0 if you increment CURRENT
John Boyerc675d7a2009-01-15 14:32:20 +000048LIBLOUIS_REVISION=1
Eitan Isaacson109996e2008-12-20 14:52:53 +000049
50# increment if any interfaces have been added; set to 0
51# if any interfaces have been changed or removed. removal has
52# precedence over adding, so set to 0 if both happened.
John Boyer16689ac2009-01-12 15:11:39 +000053LIBLOUIS_AGE=1
Eitan Isaacson109996e2008-12-20 14:52:53 +000054
55AC_SUBST(LIBLOUIS_CURRENT)
56AC_SUBST(LIBLOUIS_REVISION)
57AC_SUBST(LIBLOUIS_AGE)
58
59AC_ISC_POSIX
60AC_HEADER_STDC
61AC_LIBTOOL_WIN32_DLL
62AM_PROG_LIBTOOL
63
64AC_PATH_PROG(PKG_CONFIG, pkg-config)
65
66AC_ARG_ENABLE(ucs4,
67 AC_HELP_STRING(--enable-ucs4, Enable 4 byte-wide characters.),
68 [],
69 [enable_ucs4=no])
70
71AH_TEMPLATE(WIDECHAR_SIZE,
72 [Define as the size of the unicode type.])
73
74case "$enable_ucs4" in
75no) unicode_size="2"
76 AC_DEFINE(WIDECHAR_SIZE,2)
77 ;;
78yes) unicode_size="4"
79 AC_DEFINE(WIDECHAR_SIZE,4)
80 ;;
81esac
82
83AC_CONFIG_FILES([Makefile
84 doc/Makefile
85 liblouis/Makefile
86 tables/Makefile
87 liblouis.pc
88 tests/Makefile
Eitan Isaacson9b1f03b2009-01-19 13:06:25 +000089 python/Makefile
90 python/louis/Makefile
Eitan Isaacson109996e2008-12-20 14:52:53 +000091 tools/Makefile])
92AC_OUTPUT
93