2004-04-08 11:43:06 +02:00
|
|
|
dnl -*-m4-*-
|
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
dnl --------------------------------------------------------------
|
|
|
|
dnl configure.in for Eliot
|
|
|
|
dnl --------------------------------------------------------------
|
2005-05-28 22:59:14 +02:00
|
|
|
AC_INIT(eliot, 1.5)
|
2004-06-26 16:47:39 +02:00
|
|
|
AC_CONFIG_SRCDIR(wxwin/main.cc)
|
|
|
|
AM_INIT_AUTOMAKE
|
2004-04-08 11:43:06 +02:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
2004-04-08 11:57:28 +02:00
|
|
|
AM_OPTIONS_WXCONFIG
|
2004-04-08 11:43:06 +02:00
|
|
|
|
|
|
|
dnl --------------------------------------------------------------
|
|
|
|
dnl Checks for programs.
|
|
|
|
dnl --------------------------------------------------------------
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_PROG_RANLIB
|
|
|
|
|
|
|
|
dnl --------------------------------------------------------------
|
2005-02-05 12:14:56 +01:00
|
|
|
dnl Checks for compilation flags
|
2004-04-08 11:43:06 +02:00
|
|
|
dnl --------------------------------------------------------------
|
2005-04-03 23:12:03 +02:00
|
|
|
CFLAGS_save="${CFLAGS}"
|
2005-02-05 12:14:56 +01:00
|
|
|
AC_CACHE_CHECK([if \$CC accepts -Wall],
|
|
|
|
[ac_cv_c_Wall],
|
|
|
|
[CFLAGS="-Wall ${CFLAGS_save}"
|
|
|
|
AC_TRY_COMPILE([],,ac_cv_c_Wall=yes, ac_cv_c_Wall=no)])
|
2005-04-03 23:12:03 +02:00
|
|
|
CFLAGS="${CFLAGS_save}"
|
2005-02-05 12:14:56 +01:00
|
|
|
if test "${ac_cv_c_Wall}" != "no"; then
|
2005-04-03 23:12:03 +02:00
|
|
|
CFLAGS="-Wall ${CFLAGS}"
|
|
|
|
CXXFLAGS="-Wall ${CXXFLAGS}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Debug mode
|
2006-01-01 20:23:05 +01:00
|
|
|
AC_ARG_ENABLE([debug],AC_HELP_STRING([--enable-debug],[debug mode (default disabled)]))
|
|
|
|
if test "${enable_debug}" = "yes"; then
|
|
|
|
CFLAGS="${CFLAGS} -g -DDEBUG"
|
|
|
|
CPPFLAGS="${CPPFLAGS} -g -DDEBUG"
|
2004-04-08 11:57:28 +02:00
|
|
|
fi
|
|
|
|
|
2006-01-01 20:23:05 +01:00
|
|
|
dnl Profile mode
|
|
|
|
AC_ARG_ENABLE([profile],AC_HELP_STRING([--enable-profile],[profile mode (default disabled)]))
|
|
|
|
if test "${enable_profile}" = "yes"; then
|
|
|
|
CFLAGS="${CFLAGS} -pg -DPROFILE"
|
|
|
|
CPPFLAGS="${CPPFLAGS} -pg -DPROFILE"
|
|
|
|
LDFLAGS="${LDFLAGS} -pg"
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Regexp / Listdic / Compdic build enable
|
|
|
|
AC_ARG_ENABLE([dictools],AC_HELP_STRING([--enable-dictools],[build independant dictionary tools (default enabled)]))
|
2005-04-09 21:16:56 +02:00
|
|
|
AM_PROG_LEX
|
|
|
|
AC_PROG_YACC
|
|
|
|
AM_CONDITIONAL([BUILD_DICTOOLS], [test "${enable_dictools}" != "no"])
|
|
|
|
|
2004-04-08 11:43:06 +02:00
|
|
|
dnl --------------------------------------------------------------
|
|
|
|
dnl Checks for header files.
|
|
|
|
dnl --------------------------------------------------------------
|
|
|
|
AC_HEADER_STDC
|
2004-06-22 23:04:07 +02:00
|
|
|
AC_CHECK_HEADERS(fcntl.h unistd.h sys/wait.h)
|
2004-04-08 11:43:06 +02:00
|
|
|
|
|
|
|
dnl --------------------------------------------------------------
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
dnl --------------------------------------------------------------
|
|
|
|
AC_C_CONST
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
dnl AC_C_BIGENDIAN
|
2004-06-26 16:47:39 +02:00
|
|
|
AC_C_INLINE
|
2004-04-08 11:43:06 +02:00
|
|
|
AC_CHECK_SIZEOF(char, 1)
|
|
|
|
AC_CHECK_SIZEOF(short, 2)
|
|
|
|
AC_CHECK_SIZEOF(int *, 4)
|
|
|
|
AC_CHECK_SIZEOF(int, 4)
|
|
|
|
AC_CHECK_SIZEOF(long, 4)
|
|
|
|
AC_CHECK_SIZEOF(long long, 0)
|
|
|
|
|
|
|
|
dnl --------------------------------------------------------------
|
|
|
|
dnl Checks for library functions.
|
|
|
|
dnl --------------------------------------------------------------
|
|
|
|
AC_FUNC_MEMCMP
|
|
|
|
|
2005-02-05 12:14:56 +01:00
|
|
|
dnl --------------------------------------------------------------
|
|
|
|
dnl Checks for libraries.
|
|
|
|
dnl --------------------------------------------------------------
|
|
|
|
|
|
|
|
dnl Check for wxWidgets
|
2006-01-01 20:23:05 +01:00
|
|
|
AC_ARG_ENABLE([wxwidgets],AC_HELP_STRING([--enable-wxwidgets],[wxWidgets interface support (default disabled)]))
|
2005-02-06 23:18:11 +01:00
|
|
|
if test "${enable_wxwidgets}" = "yes"
|
2005-02-05 12:14:56 +01:00
|
|
|
then
|
2006-01-01 20:23:05 +01:00
|
|
|
AM_PATH_WXCONFIG(2.6.0, wxWin=1)
|
|
|
|
if test "${wxWin}" != 1; then
|
|
|
|
AC_MSG_ERROR([
|
|
|
|
wxWidgets must be installed on your system
|
|
|
|
but wx-config script couldn't be found.
|
2005-02-05 12:14:56 +01:00
|
|
|
|
2006-01-01 20:23:05 +01:00
|
|
|
Please check that wx-config is in path, the directory
|
|
|
|
where wxWidgets libraries are installed (returned by
|
|
|
|
'wx-config --libs' command) is in LD_LIBRARY_PATH or
|
2006-01-01 23:16:42 +01:00
|
|
|
equivalent variable and wxWidgets version is 2.6.0 or above.
|
2006-01-01 20:23:05 +01:00
|
|
|
])
|
2005-02-05 12:14:56 +01:00
|
|
|
fi
|
|
|
|
AM_CPPFLAGS="$AM_CPPFLAGS $WX_CPPFLAGS"
|
|
|
|
AM_CXXFLAGS="$AM_CXXFLAGS $WX_CXXFLAGS_ONLY"
|
|
|
|
AM_CFLAGS="$AM_CFLAGS $WX_CFLAGS_ONLY"
|
|
|
|
AM_LDFLAGS="$AM_LDFLAGS $WX_LIBS"
|
|
|
|
fi
|
2006-01-01 20:23:05 +01:00
|
|
|
AM_CONDITIONAL([BUILD_WXWIDGETS], [test "${wxWin}" = "1"])
|
2005-02-05 12:14:56 +01:00
|
|
|
|
|
|
|
dnl Check for ncurses
|
2006-01-01 20:23:05 +01:00
|
|
|
AC_ARG_ENABLE([ncurses],AC_HELP_STRING([--enable-ncurses],[ncurses interface support (default disabled)]))
|
2005-02-05 12:14:56 +01:00
|
|
|
if test "${enable_ncurses}" = "yes"
|
|
|
|
then
|
|
|
|
AC_CHECK_HEADERS(ncurses.h, want_ncurses=1,
|
|
|
|
[AC_MSG_ERROR([Could not find the ncurses library on your system])])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL([BUILD_NCURSES], [test "${want_ncurses}" = "1"])
|
|
|
|
|
|
|
|
dnl Enable/disable text version
|
2006-01-01 20:23:05 +01:00
|
|
|
AC_ARG_ENABLE([text],AC_HELP_STRING([--enable-text],[text interface support (default enabled)]))
|
2005-04-27 19:55:32 +02:00
|
|
|
if test "${enable_text}" != "no"
|
|
|
|
then
|
|
|
|
AC_CHECK_HEADERS(readline/readline.h, want_text=1,
|
|
|
|
[AC_MSG_ERROR([Could not find the readline library on your system])])
|
|
|
|
fi
|
2005-02-05 12:14:56 +01:00
|
|
|
AM_CONDITIONAL([BUILD_TEXT], [test "${enable_text}" != "no"])
|
|
|
|
|
2005-04-03 23:12:03 +02:00
|
|
|
dnl Internationalization macros
|
2005-02-06 23:18:11 +01:00
|
|
|
AM_GNU_GETTEXT_VERSION(0.11.5)
|
|
|
|
AM_GNU_GETTEXT
|
2005-02-05 12:14:56 +01:00
|
|
|
|
2004-04-08 11:43:06 +02:00
|
|
|
dnl --------------------------------------------------------------
|
|
|
|
dnl Output
|
|
|
|
dnl --------------------------------------------------------------
|
2005-02-06 23:18:11 +01:00
|
|
|
AC_CONFIG_FILES(intl/Makefile po/Makefile.in
|
2004-06-26 16:47:39 +02:00
|
|
|
dic/Makefile
|
2004-04-08 11:43:06 +02:00
|
|
|
game/Makefile
|
2004-06-26 16:47:39 +02:00
|
|
|
wxwin/Makefile
|
2004-04-08 11:43:06 +02:00
|
|
|
utils/Makefile
|
|
|
|
Makefile)
|
2004-06-26 16:47:39 +02:00
|
|
|
AC_OUTPUT
|