blob: 00fef530c1cd387f4b4556024c1dd5cfa304ecd6 [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 Boyera9104b52009-08-18 23:45:28 +00004AC_INIT(liblouis, 1.7.0, john.boyer@abilitiessoft.com)
Eitan Isaacson109996e2008-12-20 14:52:53 +00005AC_CONFIG_SRCDIR([liblouis/lou_backTranslateString.c])
6AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
Christian Egli4255aa22009-10-08 09:34:06 +00007AM_CONFIG_HEADER(liblouis/config.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
Christian Egli4255aa22009-10-08 09:34:06 +000012
13# gnulib
14gl_EARLY
15gl_INIT
16
17# Checks for more programs.
Eitan Isaacson109996e2008-12-20 14:52:53 +000018AC_PROG_INSTALL
19AC_PROG_LN_S
20AC_PROG_MAKE_SET
Eitan Isaacson109996e2008-12-20 14:52:53 +000021
22# Checks for libraries.
23
24# Checks for header files.
25AC_HEADER_STDC
26AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
27
28# Checks for typedefs, structures, and compiler characteristics.
29AC_C_CONST
30
31# Checks for library functions.
32AC_FUNC_MALLOC
33AC_FUNC_MEMCMP
34AC_FUNC_REALLOC
35AC_FUNC_VPRINTF
36AC_CHECK_FUNCS([memset])
37
38# This is for stuff that absolutely must end up in pyconfig.h.
39# Please use pyport.h instead, if possible.
40AH_TOP([
41#ifndef LOUISCFG_H
42#define LOUISCFG_H
43])
44AH_BOTTOM([
45#endif /*LOUISCFG_H*/
46])
47
48# increment if the interface has additions, changes, removals.
John Boyer16689ac2009-01-12 15:11:39 +000049LIBLOUIS_CURRENT=2
Eitan Isaacson109996e2008-12-20 14:52:53 +000050
51# increment any time the source changes; set to
52# 0 if you increment CURRENT
John Boyera9104b52009-08-18 23:45:28 +000053LIBLOUIS_REVISION=5
Eitan Isaacson109996e2008-12-20 14:52:53 +000054
55# increment if any interfaces have been added; set to 0
56# if any interfaces have been changed or removed. removal has
57# precedence over adding, so set to 0 if both happened.
John Boyer2b069722009-01-20 16:55:44 +000058LIBLOUIS_AGE=2
Eitan Isaacson109996e2008-12-20 14:52:53 +000059
60AC_SUBST(LIBLOUIS_CURRENT)
61AC_SUBST(LIBLOUIS_REVISION)
62AC_SUBST(LIBLOUIS_AGE)
63
64AC_ISC_POSIX
65AC_HEADER_STDC
66AC_LIBTOOL_WIN32_DLL
67AM_PROG_LIBTOOL
68
69AC_PATH_PROG(PKG_CONFIG, pkg-config)
70
71AC_ARG_ENABLE(ucs4,
72 AC_HELP_STRING(--enable-ucs4, Enable 4 byte-wide characters.),
73 [],
74 [enable_ucs4=no])
75
76AH_TEMPLATE(WIDECHAR_SIZE,
77 [Define as the size of the unicode type.])
78
79case "$enable_ucs4" in
80no) unicode_size="2"
81 AC_DEFINE(WIDECHAR_SIZE,2)
82 ;;
83yes) unicode_size="4"
84 AC_DEFINE(WIDECHAR_SIZE,4)
85 ;;
86esac
87
James Teh75bfbe22009-01-20 12:19:47 +000088case $host in
89 *mingw* | *cygwin*)
James Teh115fb832009-02-14 00:47:32 +000090 CFLAGS="$CFLAGS -Wl,--add-stdcall-alias"
James Teh75bfbe22009-01-20 12:19:47 +000091 ;;
92esac
93
Eitan Isaacson109996e2008-12-20 14:52:53 +000094AC_CONFIG_FILES([Makefile
95 doc/Makefile
96 liblouis/Makefile
97 tables/Makefile
Christian Egli4255aa22009-10-08 09:34:06 +000098 liblouis.pc
Eitan Isaacson109996e2008-12-20 14:52:53 +000099 tests/Makefile
Christian Egli4255aa22009-10-08 09:34:06 +0000100 python/Makefile
101 python/louis/Makefile
102 tools/Makefile
103 gnulib/Makefile])
Eitan Isaacson109996e2008-12-20 14:52:53 +0000104AC_OUTPUT
105