version 1.1, 2002/01/07 16:09:52 |
version 1.6, 2002/01/28 14:59:45 |
| |
dnl | dnl |
dnl Option: "yes" if the use of the OpenAL library is mandatory. | dnl Option: "yes" if the use of the OpenAL library is mandatory. |
dnl Description: check the instalation of the OpenGL library and set the | dnl Description: check the instalation of the OpenGL library and set the |
dnl OPENAL_CFLAGS and OPENAL_LIB variables to use it. | dnl OPENAL_CFLAGS and OPENAL_LIBS variables to use it. |
dnl | dnl |
dnl | dnl |
dnl AM_PATH_PYTHON | dnl AM_PATH_PYTHON |
| |
STL_DEBUG="-D__STL_DEBUG" | STL_DEBUG="-D__STL_DEBUG" |
| |
NL_DEBUG="-DNL_DEBUG" | NL_DEBUG="-DNL_DEBUG" |
dnl NL_DEBUG_FAST="-DNL_DEBUG_FAST" | NL_DEBUG_FAST="-DNL_DEBUG_FAST" |
NL_RELEASE_DEBUG="-DNL_RELEASE_DEBUG" | NL_RELEASE_DEBUG="-DNL_RELEASE_DEBUG" |
NL_RELEASE="-DNL_RELEASE" | NL_RELEASE="-DNL_RELEASE" |
| |
| |
| |
if test $nel_libraries | if test $nel_libraries |
then | then |
NEL_TEST_LIB="-L$nel_libraries -l$nel_test_lib" | NEL_TEST_LIBS="-L$nel_libraries -l$nel_test_lib" |
| |
else | else |
NEL_TEST_LIB="$nel_dir_lnk -l$nel_test_lib" | NEL_TEST_LIBS="$nel_dir_lnk -l$nel_test_lib" |
fi | fi |
| |
_CPPFLAGS="$CPPFLAGS" | _CPPFLAGS="$CPPFLAGS" |
| |
NEL_CFLAGS="-I$nel_includes" | NEL_CFLAGS="-I$nel_includes" |
fi | fi |
| |
| if test "$nel_libraries" |
| then |
| NEL_LIBS="-L$nel_libraries" |
| fi |
| |
dnl Checking for NeL headers | dnl Checking for NeL headers |
MY_NEL_HEADER_CHK([NeL Misc], [nel/misc/types_nl.h], [NL_TYPES_H], $nelmisc_is_mandatory) | MY_NEL_HEADER_CHK([NeL Misc], [nel/misc/types_nl.h], [NL_TYPES_H], $nelmisc_is_mandatory) |
MY_NEL_HEADER_CHK([NeL Network], [nel/net/sock.h], [NL_SOCK_H], $nelnet_is_mandatory) | MY_NEL_HEADER_CHK([NeL Network], [nel/net/sock.h], [NL_SOCK_H], $nelnet_is_mandatory) |
| |
then | then |
stlport_includes="$with_stlport/stlport" | stlport_includes="$with_stlport/stlport" |
stlport_libraries="$with_stlport/lib" | stlport_libraries="$with_stlport/lib" |
| |
| if test ! -d "$stlport_includes" |
| then |
| stlport_includes="$with_stlport/include/stlport" |
| fi |
fi | fi |
fi | fi |
| |
| |
then | then |
OPENAL_LIBS="-L$openal_libraries" | OPENAL_LIBS="-L$openal_libraries" |
fi | fi |
OPENAL_LIB="$OPENAL_LIB -l$openal_lib" | OPENAL_LIBS="$OPENAL_LIBS -l$openal_lib" |
| |
_CPPFLAGS="$CPPFLAGS" | _CPPFLAGS="$CPPFLAGS" |
CPPFLAGS="$CXXFLAGS $OPENAL_CFLAGS" | CPPFLAGS="$CXXFLAGS $OPENAL_CFLAGS" |
| |
dnl Test the libraries | dnl Test the libraries |
AC_MSG_CHECKING(for OpenAL libraries) | AC_MSG_CHECKING(for OpenAL libraries) |
| |
CPPFLAGS="$CXXFLAGS $OPENAL_LIB" | CPPFLAGS="$CXXFLAGS $OPENAL_LIBS" |
| |
AC_TRY_LINK( , , have_openal_libraries="yes", have_openal_libraries="no") | AC_TRY_LINK( , , have_openal_libraries="yes", have_openal_libraries="no") |
| |
| |
fi | fi |
| |
AC_SUBST(OPENAL_CFLAGS) | AC_SUBST(OPENAL_CFLAGS) |
AC_SUBST(OPENAL_LIB) | AC_SUBST(OPENAL_LIBS) |
| |
| |
]) | ]) |
| |
# AM_PATH_PYTHON : Python checking macros | # AM_PATH_PYTHON : Python checking macros |
| |
AC_DEFUN(AM_PATH_PYTHON, | AC_DEFUN(AM_PATH_PYTHON, |
[ is_mandatory="$1" | [ python_version_required="$1" |
| |
| is_mandatory="$2" |
| |
AC_REQUIRE_CPP() | AC_REQUIRE_CPP() |
| |
| |
then | then |
PYTHON_EXEC="python$PYTHON_VERSION" | PYTHON_EXEC="python$PYTHON_VERSION" |
else | else |
PYTHON_EXEC="python python2.0 python1.5" | PYTHON_EXEC="python python2.1 python2.0 python1.5" |
fi | fi |
| |
AC_PATH_PROGS(PYTHON, $PYTHON_EXEC, no, $PATH) | AC_PATH_PROGS(PYTHON, $PYTHON_EXEC, no, $PATH) |
| |
if test "$PYTHON" = "no" | if test "$PYTHON" != "no" |
| then |
| PYTHON_PREFIX=`$PYTHON -c 'import sys; print "%s" % (sys.prefix)'` |
| PYTHON_VERSION=`$PYTHON -c 'import sys; print "%s" % (sys.version[[:3]])'` |
| |
| is_python_version_enough=`expr $python_version_required \<= $PYTHON_VERSION` |
| fi |
| |
| |
| if test "$PYTHON" = "no" || test "$is_python_version_enough" != "1" |
then | then |
| |
if test "$is_mandatory" = "yes" | if test "$is_mandatory" = "yes" |
then | then |
AC_MSG_ERROR([Python must be installed (http://www.python.org)]) | AC_MSG_ERROR([Python $python_version_required must be installed (http://www.python.org)]) |
else | else |
have_python="no" | have_python="no" |
fi | fi |
| |
else | else |
| |
PYTHON_PREFIX=`$PYTHON -c 'import sys; print "%s" % (sys.prefix)'` | |
PYTHON_VERSION=`$PYTHON -c 'import sys; print "%s" % (sys.version[[:3]])'` | |
| |
python_includes="$PYTHON_PREFIX/include/python$PYTHON_VERSION" | python_includes="$PYTHON_PREFIX/include/python$PYTHON_VERSION" |
python_libraries="$PYTHON_PREFIX/lib/python$PYTHON_VERSION/config" | python_libraries="$PYTHON_PREFIX/lib/python$PYTHON_VERSION/config" |