version 1.1, 2001/07/11 15:17:40 |
version 1.2, 2001/07/19 15:26:41 |
| |
dnl | dnl ========================================================================== |
dnl Configuration script for client | dnl Configuration script for Snowballs |
| 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. |
| |
AC_INIT(client/src/client.cpp) | AC_INIT(client/src/client.cpp) |
| |
MAJOR_VERSION=0 | MAJOR_VERSION=0 |
MINOR_VERSION=2 | MINOR_VERSION=1 |
PICO_VERSION=0 | PICO_VERSION=0 |
| |
AM_INIT_AUTOMAKE(snowball, $MAJOR_VERSION.$MINOR_VERSION.$PICO_VERSION) | AM_INIT_AUTOMAKE(snowballs, $MAJOR_VERSION.$MINOR_VERSION.$PICO_VERSION) |
| |
AM_CONFIG_HEADER(config.h) | AM_CONFIG_HEADER(config.h) |
| |
| |
CXXFLAGS="$CXXFLAGS " | CXXFLAGS="$CXXFLAGS " |
| |
| |
dnl ==================================================================== | dnl ========================================================================== |
| dnl Checks Snowballs modules (Client / Server) to install / Disable |
| |
| SNO_SUBDIRS="" |
| |
| dnl Client |
| AC_ARG_ENABLE( client, |
| [ --disable-client disable compilation and install of Snowballs Client.], |
| [ AC_MSG_RESULT(disable Snowballs Client.) ], |
| [ SNO_SUBDIRS="$SNO_SUBDIRS client" ] ) |
| |
| dnl Server |
| AC_ARG_ENABLE( server, |
| [ --disable-server disable compilation and install of Snowballs Server.], |
| [ AC_MSG_RESULT(disable Snowballs Server.) ], |
| [ SNO_SUBDIRS="$SNO_SUBDIRS server" ] ) |
| |
| AC_SUBST(SNO_SUBDIRS) |
| |
| |
| dnl ========================================================================== |
dnl Checks for programs. | dnl Checks for programs. |
| dnl ========================================================================== |
| |
AC_PROG_MAKE_SET | AC_PROG_MAKE_SET |
| |
| |
AC_PROG_INSTALL | AC_PROG_INSTALL |
| |
| |
dnl ==================================================================== | dnl ========================================================================== |
dnl Configure Settings | dnl Configure Settings |
| dnl ========================================================================== |
| |
| dnl Set the C++ compiler as the default compiler for the configure script |
| dnl compilation tests |
AC_LANG_CPLUSPLUS | AC_LANG_CPLUSPLUS |
| |
| |
dnl ==================================================================== | dnl ========================================================================== |
dnl Checks for typedefs, structures, and compiler characteristics. | dnl Checks for typedefs, structures, and compiler characteristics. |
| dnl ========================================================================== |
| |
| |
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 ========== | |
| |
dnl Ask user for path to the STLport header files | dnl Ask user for path to the STLport header files |
AC_ARG_WITH( stlport, | AC_ARG_WITH( stlport, |
| |
CPPFLAGS="$_CPPFLAGS" | CPPFLAGS="$_CPPFLAGS" |
| |
| |
dnl ========== | dnl ========================================================================== |
dnl NeL | dnl NeL |
dnl ========== | |
| |
dnl Ask user for path to the NeL header files | dnl Check for NeL library files |
AC_ARG_WITH( nel, | AC_PATH_PROG(NEL_CONFIG, nel-config, no) |
[ --with-nel=<prefix> prefix to the NeL files installation. | |
e.g. /usr/local/include], | |
[NEL_DIR=$with_nel | |
AC_MSG_RESULT(using NeL header files located in $with_nel)] | |
) | |
| |
if test X"$NEL_DIR" != X""; | if test "$NEL_CONFIG" = "no"; then |
then | AC_MSG_ERROR([Cannot find nel-config: check your path. |
CXXFLAGS="-I$NEL_DIR/include $CXXFLAGS" | NeL library is needed to compile Snowballs (www.nevrax.org).]) |
LIBS="-L$NEL_DIR/lib $LIBS" | else |
| NEL_CFLAGS=`nel-config --cflags` |
| NEL_LIBS=`nel-config --libs` |
fi | fi |
| |
_CPPFLAGS="$CPPFLAGS" | AC_SUBST(NEL_CFLAGS) |
CPPFLAGS="$CXXFLAGS" | AC_SUBST(NEL_LIBS) |
| |
AC_MSG_CHECKING(for NeL) | dnl Checking NeL instalation |
AC_EGREP_CPP( yo_nel, | _CPPFLAGS="$CPPFLAGS" |
[#include <nel/net.h> | CPPFLAGS="$CXXFLAGS ${NEL_CFLAGS}" |
#ifdef NL_NET_H | |
yo_nel | |
#endif], | |
[AC_MSG_RESULT(yes)], | |
AC_MSG_ERROR([NeL is needed to compile the client (www.nevrax.org)]) | |
) | |
| |
| |
dnl ========== | dnl ========================================================================== |
dnl FreeType 2 | dnl FreeType 2 |
dnl ========== | |
| |
dnl Check for the FreeType 2 library files | dnl Check for the FreeType 2 library files |
AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no) | AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no) |
| |
if test "$FREETYPE_CONFIG" = "no"; then | if test "$FREETYPE_CONFIG" = "no"; then |
AC_MSG_ERROR([Cannot find freetype-config: check your path. | AC_MSG_ERROR([Cannot find freetype-config: check your path. |
FreeType 2 library is needed to compile the client (www.freetype.org).]) | FreeType 2 library is needed to compile NeL (freetype.sourceforge.net).]) |
else | else |
FREETYPE_CFLAGS=`freetype-config --cflags` | FREETYPE_CFLAGS=`freetype-config --cflags` |
FREETYPE_LIBS=`freetype-config --libs` | FREETYPE_LIBS=`freetype-config --libs` |
fi | fi |
| |
dnl CXXFLAGS="$CXXFLAGS ${FREETYPE_CFLAGS}" | |
dnl LIBS="$LIBS ${FREETYPE_LIBS}" | |
AC_SUBST(FREETYPE_CFLAGS) | AC_SUBST(FREETYPE_CFLAGS) |
AC_SUBST(FREETYPE_LIBS) | AC_SUBST(FREETYPE_LIBS) |
| |
| |
yo_freetype2 | yo_freetype2 |
#endif], | #endif], |
[AC_MSG_RESULT(yes)], | [AC_MSG_RESULT(yes)], |
AC_MSG_ERROR([Freetype 2 library is needed to compile the client (www.stlport.org).]) | AC_MSG_ERROR([Freetype 2 library is needed to compile NeL (freetype.sourceforge.net).]) |
) | ) |
| |
CPPFLAGS="$_CPPFLAGS" | CPPFLAGS="$_CPPFLAGS" |
| |
| |
dnl ========== | dnl ========================================================================== |
dnl Debug/optimized compilation mode | dnl Debug/optimized compilation mode |
dnl ========== | |
| |
MAX_C_OPTIMIZE="-O6" | MAX_C_OPTIMIZE="-O6" |
| |
| |
DEBUG_OPTIMIZE_CC="" | DEBUG_OPTIMIZE_CC="" |
OPTIMIZE_CFLAGS="-O" | OPTIMIZE_CFLAGS="-O" |
fi | fi |
| |
if test "$ac_cv_prog_cxx_g" = "yes" | if test "$ac_cv_prog_cxx_g" = "yes" |
then | then |
DEBUG_CXXFLAGS="-g" | DEBUG_CXXFLAGS="-g" |
| |
DEBUG_OPTIMIZE_CXX="" | DEBUG_OPTIMIZE_CXX="" |
OPTIMIZE_CXXFLAGS="-O" | OPTIMIZE_CXXFLAGS="-O" |
fi | fi |
| |
AC_ARG_WITH(debug, | AC_ARG_WITH(debug, |
[ --with-debug[=full] Build a debug version (huge libraries) | [ --with-debug[=full] Build a debug version (huge libraries) |
--without-debug Build withoug debugging code (default)], | --without-debug Build withoug debugging code (default)], |
[with_debug=$withval], | [with_debug=$withval], |
[with_debug=no]) | [with_debug=no]) |
| |
if test "$with_debug" = "yes" | if test "$with_debug" = "yes" |
then | then |
dnl Medium debug. | dnl Medium debug. |
| |
fi | fi |
| |
| |
dnl ==================================================================== | dnl ========================================================================== |
dnl Checks for libraries. | dnl Checks for libraries. |
| |
| |
dnl ==================================================================== | dnl ========================================================================== |
dnl Checks for library functions. | dnl Checks for library functions. |
| |
| |
dnl ==================================================================== | dnl ========================================================================== |
dnl Output files to generate. | dnl Output files to generate. |
| |
AC_OUTPUT( Makefile \ | AC_OUTPUT( Makefile \ |
client/Makefile \ | client/Makefile \ |
client/src/Makefile \ | client/src/Makefile \ |
server/Makefile \ | server/Makefile \ |
server/moves_service/Makefile \ | server/frontend/Makefile \ |
| server/frontend/src/Makefile \ |
| server/chat/Makefile \ |
| server/chat/src/Makefile \ |
) | ) |
| |
| |