blob: 15423d7432c50556d65cea98eb479c58d9be297b [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 Boyer2b069722009-01-20 16:55:44 +00004AC_INIT(liblouis, 1.5.2, 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
Eitan Isaacson109996e2008-12-20 14:52:53 +000015
16# Checks for libraries.
17
18# Checks for header files.
19AC_HEADER_STDC
20AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
21
22# Checks for typedefs, structures, and compiler characteristics.
23AC_C_CONST
24
25# Checks for library functions.
26AC_FUNC_MALLOC
27AC_FUNC_MEMCMP
28AC_FUNC_REALLOC
29AC_FUNC_VPRINTF
30AC_CHECK_FUNCS([memset])
31
32# This is for stuff that absolutely must end up in pyconfig.h.
33# Please use pyport.h instead, if possible.
34AH_TOP([
35#ifndef LOUISCFG_H
36#define LOUISCFG_H
37])
38AH_BOTTOM([
39#endif /*LOUISCFG_H*/
40])
41
42# increment if the interface has additions, changes, removals.
John Boyer16689ac2009-01-12 15:11:39 +000043LIBLOUIS_CURRENT=2
Eitan Isaacson109996e2008-12-20 14:52:53 +000044
45# increment any time the source changes; set to
46# 0 if you increment CURRENT
John Boyerc675d7a2009-01-15 14:32:20 +000047LIBLOUIS_REVISION=1
Eitan Isaacson109996e2008-12-20 14:52:53 +000048
49# increment if any interfaces have been added; set to 0
50# if any interfaces have been changed or removed. removal has
51# precedence over adding, so set to 0 if both happened.
John Boyer2b069722009-01-20 16:55:44 +000052LIBLOUIS_AGE=2
Eitan Isaacson109996e2008-12-20 14:52:53 +000053
54AC_SUBST(LIBLOUIS_CURRENT)
55AC_SUBST(LIBLOUIS_REVISION)
56AC_SUBST(LIBLOUIS_AGE)
57
58AC_ISC_POSIX
59AC_HEADER_STDC
60AC_LIBTOOL_WIN32_DLL
61AM_PROG_LIBTOOL
62
63AC_PATH_PROG(PKG_CONFIG, pkg-config)
64
65AC_ARG_ENABLE(ucs4,
66 AC_HELP_STRING(--enable-ucs4, Enable 4 byte-wide characters.),
67 [],
68 [enable_ucs4=no])
69
70AH_TEMPLATE(WIDECHAR_SIZE,
71 [Define as the size of the unicode type.])
72
73case "$enable_ucs4" in
74no) unicode_size="2"
75 AC_DEFINE(WIDECHAR_SIZE,2)
76 ;;
77yes) unicode_size="4"
78 AC_DEFINE(WIDECHAR_SIZE,4)
79 ;;
80esac
81
James Teh75bfbe22009-01-20 12:19:47 +000082case $host in
83 *mingw* | *cygwin*)
84 LDFLAGS="$LDFLAGS -avoid-version"
85 ;;
86esac
87
Eitan Isaacson109996e2008-12-20 14:52:53 +000088AC_CONFIG_FILES([Makefile
89 doc/Makefile
90 liblouis/Makefile
91 tables/Makefile
92 liblouis.pc
93 tests/Makefile
Eitan Isaacson9b1f03b2009-01-19 13:06:25 +000094 python/Makefile
95 python/louis/Makefile
Eitan Isaacson109996e2008-12-20 14:52:53 +000096 tools/Makefile])
97AC_OUTPUT
98