|
Packit |
c06654 |
# Process this file with autoconf to produce a configure script.
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
AC_PREREQ(2.68)
|
|
Packit |
c06654 |
AC_INIT([Liblouis], [2.6.2], [liblouis-liblouisxml@freelists.org], [liblouis], [http://www.liblouis.org])
|
|
Packit |
c06654 |
AC_CONFIG_SRCDIR([liblouis/lou_backTranslateString.c])
|
|
Packit |
c06654 |
AM_CONFIG_HEADER(liblouis/config.h)
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
AC_CONFIG_AUX_DIR([build-aux])
|
|
Packit |
c06654 |
AC_CONFIG_MACRO_DIR([m4])
|
|
Packit |
c06654 |
AM_INIT_AUTOMAKE
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
# Checks for programs.
|
|
Packit |
c06654 |
AC_PROG_CC
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
# gnulib
|
|
Packit |
c06654 |
gl_EARLY
|
|
Packit |
c06654 |
gl_INIT
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
# make sure we have a decent malloc and realloc
|
|
Packit |
c06654 |
gl_FUNC_MALLOC_GNU
|
|
Packit |
c06654 |
if test $REPLACE_MALLOC = 1; then
|
|
Packit |
c06654 |
AC_LIBOBJ([malloc])
|
|
Packit |
c06654 |
fi
|
|
Packit |
c06654 |
gl_MODULE_INDICATOR([malloc-gnu])
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
gl_FUNC_REALLOC_GNU
|
|
Packit |
c06654 |
if test $REPLACE_REALLOC = 1; then
|
|
Packit |
c06654 |
AC_LIBOBJ([realloc])
|
|
Packit |
c06654 |
fi
|
|
Packit |
c06654 |
gl_MODULE_INDICATOR([realloc-gnu])
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
# Checks for more programs.
|
|
Packit |
c06654 |
AC_PROG_INSTALL
|
|
Packit |
c06654 |
AC_PROG_LN_S
|
|
Packit |
c06654 |
AC_PROG_MAKE_SET
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
# Checks for libraries.
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
# Checks for header files.
|
|
Packit |
c06654 |
AC_HEADER_STDC
|
|
Packit |
c06654 |
AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
# Checks for typedefs, structures, and compiler characteristics.
|
|
Packit |
c06654 |
AC_C_CONST
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
# Checks for library functions.
|
|
Packit |
c06654 |
AC_FUNC_MEMCMP
|
|
Packit |
c06654 |
AC_FUNC_VPRINTF
|
|
Packit |
c06654 |
AC_CHECK_FUNCS([memset])
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
# This is for stuff that absolutely must end up in pyconfig.h.
|
|
Packit |
c06654 |
# Please use pyport.h instead, if possible.
|
|
Packit |
c06654 |
AH_TOP([
|
|
Packit |
c06654 |
#ifndef LOUISCFG_H
|
|
Packit |
c06654 |
#define LOUISCFG_H
|
|
Packit |
c06654 |
])
|
|
Packit |
c06654 |
AH_BOTTOM([
|
|
Packit |
c06654 |
#endif /*LOUISCFG_H*/
|
|
Packit |
c06654 |
])
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
# increment if the interface has additions, changes, removals.
|
|
Packit |
c06654 |
LIBLOUIS_CURRENT=7
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
# increment any time the source changes; set to 0 if you increment
|
|
Packit |
c06654 |
# CURRENT
|
|
Packit |
c06654 |
LIBLOUIS_REVISION=2
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
# increment if any interfaces have been added; set to 0 if any
|
|
Packit |
c06654 |
# interfaces have been changed or removed. removal has precedence over
|
|
Packit |
c06654 |
# adding, so set to 0 if both happened.
|
|
Packit |
c06654 |
LIBLOUIS_AGE=5
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
AC_SUBST(LIBLOUIS_CURRENT)
|
|
Packit |
c06654 |
AC_SUBST(LIBLOUIS_REVISION)
|
|
Packit |
c06654 |
AC_SUBST(LIBLOUIS_AGE)
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
AC_ISC_POSIX
|
|
Packit |
c06654 |
AC_HEADER_STDC
|
|
Packit |
c06654 |
AC_LIBTOOL_WIN32_DLL
|
|
Packit |
c06654 |
AC_PROG_LIBTOOL
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
# GNU help2man creates man pages from --help output; in many cases,
|
|
Packit |
c06654 |
# this is sufficient, and obviates the need to maintain man pages
|
|
Packit |
c06654 |
# separately. However, some developers do not have it so we do not
|
|
Packit |
c06654 |
# make its use mandatory.
|
|
Packit |
c06654 |
if test "x$cross_compiling" = xyes; then
|
|
Packit |
c06654 |
AC_MSG_WARN([cannot generate manual pages while cross compiling])
|
|
Packit |
c06654 |
else
|
|
Packit |
c06654 |
AC_CHECK_PROG([HELP2MAN], [help2man], [help2man])
|
|
Packit |
c06654 |
fi
|
|
Packit |
c06654 |
AM_CONDITIONAL([HAVE_HELP2MAN], [test x$HELP2MAN = xhelp2man])
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
# Check for makeinfo version >= 5, required for building documentation.
|
|
Packit |
c06654 |
AC_PROG_SED
|
|
Packit |
c06654 |
AC_CHECK_PROG([MAKEINFO_FOUND], [makeinfo], [yes])
|
|
Packit |
c06654 |
if test x"${MAKEINFO_FOUND}" = xyes
|
|
Packit |
c06654 |
then
|
|
Packit |
c06654 |
MAKEINFO_VERSION_REQ=5
|
|
Packit |
c06654 |
AC_MSG_CHECKING([for makeinfo version >= $MAKEINFO_VERSION_REQ])
|
|
Packit Service |
1ba859 |
MAKEINFO_VERSION=`makeinfo --version | sed -ne 's/^\(makeinfo\|texi2any\) .* \([[0-9]][[0-9]]*\)\.[[0-9]][[0-9]]*$/\2/p'`
|
|
Packit |
c06654 |
if test x$MAKEINFO_VERSION = x -o 0$MAKEINFO_VERSION -lt $MAKEINFO_VERSION_REQ
|
|
Packit |
c06654 |
then
|
|
Packit |
c06654 |
AC_MSG_RESULT([no])
|
|
Packit |
c06654 |
AC_MSG_ERROR([Program 'makeinfo' version >= $MAKEINFO_VERSION_REQ is required.])
|
|
Packit |
c06654 |
else
|
|
Packit |
c06654 |
AC_MSG_RESULT([yes])
|
|
Packit |
c06654 |
fi
|
|
Packit |
c06654 |
else
|
|
Packit |
c06654 |
AC_MSG_ERROR([Missing program 'makeinfo', please install.)])
|
|
Packit |
c06654 |
fi
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
# Check if we have Python installed
|
|
Packit |
c06654 |
AM_PATH_PYTHON([2.6],, [:])
|
|
Packit |
c06654 |
AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
AC_PATH_PROG(PKG_CONFIG, pkg-config)
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
AC_ARG_ENABLE(ucs4,
|
|
Packit |
c06654 |
AC_HELP_STRING(--enable-ucs4, Enable 4 byte-wide characters),
|
|
Packit |
c06654 |
[],
|
|
Packit |
c06654 |
[enable_ucs4=no])
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
AC_MSG_CHECKING([whether 4 byte-wide characters should be supported])
|
|
Packit |
c06654 |
AC_MSG_RESULT($enable_ucs4)
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
case "$enable_ucs4" in
|
|
Packit |
c06654 |
yes) WIDECHAR_TYPE='unsigned int';;
|
|
Packit |
c06654 |
*) WIDECHAR_TYPE='unsigned short int';;
|
|
Packit |
c06654 |
esac
|
|
Packit |
c06654 |
AC_SUBST(WIDECHAR_TYPE)
|
|
Packit |
c06654 |
AM_CONDITIONAL([HAVE_UCS4], [test x$enable_ucs4 = xyes])
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
case $host in
|
|
Packit |
c06654 |
*mingw* | *cygwin*)
|
|
Packit |
c06654 |
CFLAGS="$CFLAGS -Wl,--add-stdcall-alias"
|
|
Packit |
c06654 |
LDFLAGS="$LDFLAGS -avoid-version"
|
|
Packit |
c06654 |
;;
|
|
Packit |
c06654 |
esac
|
|
Packit |
c06654 |
|
|
Packit |
c06654 |
AC_CONFIG_FILES([
|
|
Packit |
c06654 |
Makefile
|
|
Packit |
c06654 |
doc/Makefile
|
|
Packit |
c06654 |
man/Makefile
|
|
Packit |
c06654 |
liblouis/Makefile
|
|
Packit |
c06654 |
liblouis/liblouis.h
|
|
Packit |
c06654 |
windows/Makefile
|
|
Packit |
c06654 |
windows/include/Makefile
|
|
Packit |
c06654 |
tables/Makefile
|
|
Packit |
c06654 |
liblouis.pc
|
|
Packit |
c06654 |
tests/Makefile
|
|
Packit |
c06654 |
tests/resolve_table.h
|
|
Packit |
c06654 |
tests/tables/Makefile
|
|
Packit |
c06654 |
tests/tables/moreTables/Makefile
|
|
Packit |
c06654 |
tests/tables/resolve_table/Makefile
|
|
Packit |
c06654 |
tests/tables/resolve_table/dir_1/Makefile
|
|
Packit |
c06654 |
tests/tables/resolve_table/dir_1/dir_1.1/Makefile
|
|
Packit |
c06654 |
tests/tables/resolve_table/dir_2/Makefile
|
|
Packit |
c06654 |
tests/doctests/Makefile
|
|
Packit |
c06654 |
tests/harness/Makefile
|
|
Packit |
c06654 |
tests/harnessSources/Makefile
|
|
Packit |
c06654 |
python/Makefile
|
|
Packit |
c06654 |
python/louis/Makefile
|
|
Packit |
c06654 |
tools/Makefile
|
|
Packit |
c06654 |
gnulib/Makefile
|
|
Packit |
c06654 |
m4/Makefile])
|
|
Packit |
c06654 |
AC_OUTPUT
|
|
Packit |
c06654 |
|