eliot/configure.in

140 lines
4.7 KiB
Text
Raw Normal View History

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 --------------------------------------------------------------
dnl Checks for compilation flags
2004-04-08 11:43:06 +02:00
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],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
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
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
dnl --------------------------------------------------------------
dnl Checks for libraries.
dnl --------------------------------------------------------------
dnl Check for wxWidgets
AC_ARG_ENABLE([wxwidgets],AC_HELP_STRING([--enable-wxwidgets],[wxWidgets interface support (default disabled)]))
if test "${enable_wxwidgets}" = "yes"
then
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.
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 wxWidgets version is 2.6.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],AC_HELP_STRING([--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],AC_HELP_STRING([--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
2004-04-08 11:43:06 +02:00
dnl --------------------------------------------------------------
dnl Output
dnl --------------------------------------------------------------
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