mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2024-11-17 07:48:27 +01:00
137 lines
4.3 KiB
Text
137 lines
4.3 KiB
Text
dnl -*-m4-*-
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
dnl --------------------------------------------------------------
|
|
dnl configure.in for Eliot
|
|
dnl --------------------------------------------------------------
|
|
AC_INIT(eliot, 1.5)
|
|
AC_CONFIG_SRCDIR(wxwin/main.cc)
|
|
AM_INIT_AUTOMAKE
|
|
AM_CONFIG_HEADER(config.h)
|
|
AM_OPTIONS_WXCONFIG
|
|
|
|
dnl --------------------------------------------------------------
|
|
dnl Checks for programs.
|
|
dnl --------------------------------------------------------------
|
|
AC_PROG_INSTALL
|
|
AC_PROG_CC
|
|
AC_PROG_CXX
|
|
AC_PROG_MAKE_SET
|
|
AC_PROG_RANLIB
|
|
|
|
dnl --------------------------------------------------------------
|
|
dnl Checks for compilation flags
|
|
dnl --------------------------------------------------------------
|
|
CFLAGS_save="${CFLAGS}"
|
|
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)])
|
|
CFLAGS="${CFLAGS_save}"
|
|
if test "${ac_cv_c_Wall}" != "no"; then
|
|
CFLAGS="-Wall ${CFLAGS}"
|
|
CXXFLAGS="-Wall ${CXXFLAGS}"
|
|
fi
|
|
|
|
dnl Debug mode
|
|
AC_ARG_ENABLE(debug,
|
|
[ --enable-debug debug mode (default enabled)])
|
|
if test "${enable_debug}" != "no"; then
|
|
CPPFLAGS="${CPPFLAGS} -DDEBUG"
|
|
dnl CFLAGS="${CFLAGS} -O0"
|
|
dnl CXXFLAGS="${CXXFLAGS} -O0"
|
|
fi
|
|
|
|
dnl Regexp build
|
|
AC_ARG_ENABLE(dictools,
|
|
[ --enable-dictools build independant dictionary tools (default enabled)])
|
|
AM_PROG_LEX
|
|
AC_PROG_YACC
|
|
AM_CONDITIONAL([BUILD_DICTOOLS], [test "${enable_dictools}" != "no"])
|
|
|
|
dnl --------------------------------------------------------------
|
|
dnl Checks for header files.
|
|
dnl --------------------------------------------------------------
|
|
AC_HEADER_STDC
|
|
AC_CHECK_HEADERS(fcntl.h unistd.h sys/wait.h)
|
|
|
|
dnl --------------------------------------------------------------
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
dnl --------------------------------------------------------------
|
|
AC_C_CONST
|
|
AC_TYPE_SIZE_T
|
|
dnl AC_C_BIGENDIAN
|
|
AC_C_INLINE
|
|
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
|
|
|
|
dnl --------------------------------------------------------------
|
|
dnl Checks for libraries.
|
|
dnl --------------------------------------------------------------
|
|
|
|
dnl Check for wxWidgets
|
|
AC_ARG_ENABLE(wxwidgets,
|
|
[ --enable-wxwidgets wxWidgets interface support (default disabled)])
|
|
if test "${enable_wxwidgets}" = "yes"
|
|
then
|
|
AM_PATH_WXCONFIG(2.4.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.
|
|
|
|
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
|
|
equivalent variable and wxWindows version is 2.4.0 or above.
|
|
])
|
|
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
|
|
AM_CONDITIONAL([BUILD_WXWIDGETS], [test "${wxwin}" = "1"])
|
|
|
|
dnl Check for ncurses
|
|
AC_ARG_ENABLE(ncurses,
|
|
[ --enable-ncurses ncurses interface support (default disabled)])
|
|
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
|
|
AC_ARG_ENABLE(text,
|
|
[ --enable-text text interface support (default enabled)])
|
|
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
|
|
AM_CONDITIONAL([BUILD_TEXT], [test "${enable_text}" != "no"])
|
|
|
|
dnl Internationalization macros
|
|
AM_GNU_GETTEXT_VERSION(0.11.5)
|
|
AM_GNU_GETTEXT
|
|
|
|
dnl --------------------------------------------------------------
|
|
dnl Output
|
|
dnl --------------------------------------------------------------
|
|
AC_CONFIG_FILES(intl/Makefile po/Makefile.in
|
|
dic/Makefile
|
|
game/Makefile
|
|
wxwin/Makefile
|
|
utils/Makefile
|
|
Makefile)
|
|
AC_OUTPUT
|