version 1.56, 2002/01/07 16:09:52 |
version 1.65, 2002/04/15 12:04:16 |
| |
dnl | dnl ==================================================================== |
dnl Configuration script for NeL | dnl Configuration script for NeL |
| dnl ==================================================================== |
dnl | dnl |
dnl $Id$ | dnl $Id$ |
dnl | dnl |
| |
| |
| dnl ==================================================================== |
dnl Process this file with autoconf to produce a configure script. | dnl Process this file with autoconf to produce a configure script. |
| dnl ==================================================================== |
| |
AC_INIT(include/nel/nel.h) | AC_INIT(include/nel/nel.h) |
| |
| |
| |
LIBTOOL_VERSION=$MAJOR_VERSION:$MINOR_VERSION:$PICO_VERSION | LIBTOOL_VERSION=$MAJOR_VERSION:$MINOR_VERSION:$PICO_VERSION |
| |
| AC_CANONICAL_HOST |
AC_SUBST(VERSION) | AC_SUBST(VERSION) |
AC_SUBST(LIBTOOL_VERSION) | AC_SUBST(LIBTOOL_VERSION) |
| |
| |
| |
dnl ==================================================================== | dnl ==================================================================== |
dnl Checks NeL modules (net, 3d, ai) to install / Disable | dnl Checks NeL modules (net, 3d, ai) to install / Disable |
| dnl ==================================================================== |
| |
dnl the misc is mandatory, it is use by the other modules. | dnl the misc is mandatory, it is use by the other modules. |
NEL_SUBDIRS="misc" | NEL_SUBDIRS="misc" |
| |
NEL_SUBDIRS="$NEL_SUBDIRS ai" | NEL_SUBDIRS="$NEL_SUBDIRS ai" |
fi | fi |
| |
| dnl Georges library |
| AC_ARG_ENABLE( georges, |
| [ --enable-georges enable compilation and install of NeL Georges.], |
| , enable_georges=no ) |
| |
| if test $enable_georges = "yes"; |
| then |
| AC_MSG_RESULT(enable NEL Georges.) |
| NEL_SUBDIRS="$NEL_SUBDIRS georges" |
| fi |
| |
AC_SUBST(enable_net) | AC_SUBST(enable_net) |
AC_SUBST(enable_3d) | AC_SUBST(enable_3d) |
AC_SUBST(enable_pacs) | AC_SUBST(enable_pacs) |
AC_SUBST(enable_sound) | AC_SUBST(enable_sound) |
AC_SUBST(enable_ai) | AC_SUBST(enable_ai) |
| AC_SUBST(enable_georges) |
| |
AC_SUBST(NEL_SUBDIRS) | AC_SUBST(NEL_SUBDIRS) |
| |
| |
dnl ==================================================================== | dnl ==================================================================== |
dnl Checks for programs. | dnl Checks for programs. |
| dnl ==================================================================== |
| |
AC_PROG_MAKE_SET | AC_PROG_MAKE_SET |
| |
| |
| |
AC_PROG_INSTALL | AC_PROG_INSTALL |
| |
| AC_PATH_PROG(CCACHE, ccache) |
| if test "$CCACHE" |
| then |
| CXX="ccache $CXX" |
| fi |
| |
dnl ==================================================================== | dnl ==================================================================== |
dnl Configure Settings | dnl Configure Settings |
| dnl ==================================================================== |
| |
dnl Disable the static linking by default | dnl Disable the static linking by default |
dnl AC_DISABLE_STATIC | dnl AC_DISABLE_STATIC |
| |
| |
dnl ==================================================================== | dnl ==================================================================== |
dnl Debug/optimized compilation mode | dnl Debug/optimized compilation mode |
| dnl ==================================================================== |
| |
AM_NEL_DEBUG | AM_NEL_DEBUG |
| |
| AC_ARG_WITH([logging], |
| [ --without-logging be silent on stdout and in no log.log], |
| [ |
| if test "$with_logging" = "no" |
| then |
| AC_DEFINE(NEL_DEFAULT_DISPLAYER, 0) |
| AC_DEFINE(NEL_LOG_IN_FILE, 0) |
| else |
| AC_MSG_ERROR([--with-logging is the default: do not use this option]) |
| fi |
| ]) |
| |
| |
dnl ==================================================================== | dnl ==================================================================== |
dnl Checks for typedefs, structures, and compiler characteristics. | dnl Checks for typedefs, structures, and compiler characteristics. |
| dnl ==================================================================== |
| |
dnl Supress GCC "multi-character character constant" warnings. | dnl Supress GCC "multi-character character constant" warnings. |
if test "X$CC" = "Xgcc"; | if test "X$CC" = "Xgcc"; |
| |
| |
dnl ==================================================================== | dnl ==================================================================== |
dnl Checks for header files. | dnl Checks for header files. |
| dnl ==================================================================== |
| |
AC_STDC_HEADERS | AC_STDC_HEADERS |
AC_CHECK_HEADERS(fcntl.h unistd.h) | AC_CHECK_HEADERS(fcntl.h unistd.h) |
| |
| |
dnl ========== | dnl ==================================================================== |
dnl X11 | dnl X11 |
dnl ========== | |
| |
AC_PATH_X | AC_PATH_X |
| |
| |
fi | fi |
| |
| |
dnl ========== | dnl ==================================================================== |
dnl STLPort | dnl STLPort |
dnl ========== | |
| |
AM_PATH_STLPORT | AM_PATH_STLPORT |
| |
| |
dnl ========== | dnl ==================================================================== |
dnl OpenAL | |
dnl ========== | |
| |
AM_PATH_OPENAL( $enable_3d ) | |
| |
| |
dnl ========== | |
dnl Python | dnl Python |
dnl ========== | |
| |
AM_PATH_PYTHON( $enable_ai ) | AM_PATH_PYTHON(1.5,$enable_ai) |
| |
| |
dnl ========== | dnl ==================================================================== |
dnl LibXML | dnl LibXML |
dnl ========== | |
| dnl Use C++ compiler as a default for the compilation tests. |
| AC_LANG_C |
| |
AM_PATH_XML2( 2.0.0, , AC_MSG_ERROR(libxml2 must be installed.) ) | AM_PATH_XML2( 2.0.0, , AC_MSG_ERROR(libxml2 must be installed.) ) |
| |
| CFLAGS="$CFLAGS $XML_CFLAGS" |
| CXXFLAGS="$CXXFLAGS $XML_CFLAGS" |
| |
| LIBS="$LIBS $XML_LIBS" |
| |
| dnl Use C++ compiler as a default for the compilation tests. |
| AC_LANG_CPLUSPLUS |
| |
| |
dnl ==================================================================== | dnl ==================================================================== |
dnl Checks for libraries. | dnl Checks for libraries. |
| dnl ==================================================================== |
| |
dnl ========== | dnl ==================================================================== |
dnl FreeType 2 | dnl FreeType 2 |
dnl ========== | |
| |
AM_PATH_FREETYPE( $enable_3d ) | AM_PATH_FREETYPE( $enable_3d ) |
| |
| |
dnl ========== | dnl ==================================================================== |
dnl OpenGL | dnl OpenGL |
dnl ========== | |
| |
AM_PATH_OPENGL( $enable_3d ) | AM_PATH_OPENGL( $enable_3d ) |
| |
| |
dnl ============================================ | dnl ==================================================================== |
dnl Check for XF86VidMode extension (-lXxf86vm) | dnl Check for XF86VidMode extension (-lXxf86vm) |
dnl ============================================ | |
| |
AM_PATH_XF86VIDMODE | AM_PATH_XF86VIDMODE |
| |
| |
dnl ==================================================================== | dnl ==================================================================== |
| dnl OpenAL |
| |
| AM_PATH_OPENAL($enable_sound) |
| |
| |
| dnl ==================================================================== |
| dnl Arrange for the include directory to be in the search path even when |
| dnl build is done outside the source tree |
| CFLAGS="$CFLAGS -I\${top_srcdir}/include" |
| CXXFLAGS="$CXXFLAGS -I\${top_srcdir}/include" |
| |
| |
| dnl ==================================================================== |
dnl Checks for library functions. | dnl Checks for library functions. |
| dnl ==================================================================== |
| |
| |
dnl ==================================================================== | dnl ==================================================================== |
dnl Output files to generate. | dnl Output files to generate. |
| dnl ==================================================================== |
dnl What an ugly hack to try to get something cleanner ... i hope ... | |
AC_OUTPUT_COMMANDS( | |
[cd include/nel && ln -sfv ../nelconfig.h .] | |
) | |
| |
AC_OUTPUT( Makefile \ | AC_OUTPUT( Makefile \ |
include/Makefile \ | include/Makefile \ |
| |
include/nel/ai/pyserver/Makefile \ | include/nel/ai/pyserver/Makefile \ |
include/nel/ai/script/Makefile \ | include/nel/ai/script/Makefile \ |
include/nel/ai/tools/Makefile \ | include/nel/ai/tools/Makefile \ |
| include/nel/georges/Makefile \ |
src/Makefile \ | src/Makefile \ |
src/misc/Makefile \ | src/misc/Makefile \ |
src/misc/config_file/Makefile \ | src/misc/config_file/Makefile \ |
| |
src/ai/pyserver/Makefile \ | src/ai/pyserver/Makefile \ |
src/ai/script/Makefile \ | src/ai/script/Makefile \ |
src/ai/tools/Makefile \ | src/ai/tools/Makefile \ |
| src/georges/Makefile \ |
nel-config \ | nel-config \ |
) | ) |
| |