[BACK] Return to acinclude.m4 CVS log [TXT][DIR] Up to Nevrax / code / nelns

Diff for /code/nelns/acinclude.m4 between version 1.1 and 1.14

version 1.1, 2002/01/07 16:09:52 version 1.14, 2002/04/25 17:52:16
Line 64 
Line 64 
 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
Line 73 
Line 73 
 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                 PYTHON_CFLAGS and PYTHON_LIBS variables to use it. dnl                 PYTHON_CFLAGS and PYTHON_LIBS variables to use it.
 dnl dnl
  dnl AM_PATH_CCACHE
  dnl
  dnl    Option:      none.
  dnl    Description: check the instalation of the Ccache utility.
  dnl
 dnl ========================================================================= dnl =========================================================================
  
  
Line 87 
Line 92 
 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"
  
Line 214 
Line 219 
 [ AC_REQUIRE_CPP() [ AC_REQUIRE_CPP()
  
 chk_message_obj="$1" chk_message_obj="$1"
 nel_dir_lnk="$2" nel_test_lib="$2"
 nel_libraries="$3" is_mandatory="$3"
 nel_test_lib="$4" 
 is_mandatory="$5" 
  
 if test $is_mandatory = "yes" if test $is_mandatory = "yes"
 then then
  
     AC_MSG_CHECKING(for -l$nel_test_lib)     AC_CHECK_LIB($nel_test_lib, main,,[AC_MSG_ERROR([$chk_message_obj must be installed ().])])
          
     if test $nel_libraries 
     then 
         NEL_TEST_LIB="-L$nel_libraries -l$nel_test_lib" 
  
     else 
         NEL_TEST_LIB="$nel_dir_lnk -l$nel_test_lib" 
     fi 
  
     _CPPFLAGS="$CPPFLAGS" 
  
     CPPFLAGS="$CXXFLAGS $NEL_TEST_LIBS" 
  
     AC_TRY_LINK( , , have_nel_test_libraries="yes", have_nel_test_libraries="no") 
  
     CPPFLAGS="$_CPPFLAGS" 
  
     if test "$have_nel_test_libraries" = "yes" 
     then     
         AC_MSG_RESULT(yes) 
     else 
         if test "$is_mandatory" = "yes" 
         then 
             AC_MSG_ERROR([$chk_message_obj must be installed ().]) 
         else 
             AC_MSG_RESULT(no) 
         fi 
     fi 
 fi fi
 ]) ])
  
Line 267 
Line 242 
 AC_ARG_WITH( nel-include, AC_ARG_WITH( nel-include,
     [  --with-nel-include=<path>     [  --with-nel-include=<path>
                           path to the NeL header files directory.                           path to the NeL header files directory.
                           e.g. /usr/local/nel/stlport])                           e.g. /usr/local/nel/include])
  
 AC_ARG_WITH( nel-lib, AC_ARG_WITH( nel-lib,
     [  --with-nel-lib=<path>     [  --with-nel-lib=<path>
Line 275 
Line 250 
                           e.g. /usr/local/nel/lib])                           e.g. /usr/local/nel/lib])
  
  
 nel_misc_lib="nelmisc" 
 nel_net_lib="nelnet" 
 nel_3d_lib="nel3d" 
 nel_pacs_lib="nelpacs" 
 nel_sound_lib="nelsound" 
 nel_ai_lib="nelai" 
  
 nelmisc_is_mandatory="$1" nelmisc_is_mandatory="$1"
 nelnet_is_mandatory="$2" nelnet_is_mandatory="$2"
 nel3d_is_mandatory="$3" nel3d_is_mandatory="$3"
 nelpacs_is_mandatory="$4" nelpacs_is_mandatory="$4"
 nelsound_is_mandatory="$5" nelsound_is_mandatory="$5"
 nelai_is_mandatory="$6" nelai_is_mandatory="$6"
  nelgeorges_is_mandatory="$7"
  
 nelconfig_libs_args="" dnl Check for nel-config
  AC_PATH_PROG(NEL_CONFIG, nel-config, no)
 if test "$nelnet_is_mandatory" != "yes" 
 then 
     nelconfig_libs_args="$nelconfig_libs_args --without-network" 
 fi 
  
 if test "$nel3d_is_mandatory" != "yes" dnl
  dnl Configure options (--with-nel*) have precendence
  dnl over nel-config only set variables if they are not
  dnl specified
  dnl
  if test "$NEL_CONFIG" != "no"
 then then
     nelconfig_libs_args="$nelconfig_libs_args --without-3d"     if test -z "$with_nel" -a -z "$with_nel_include"
 fi 
  
 if test "$nelpacs_is_mandatory" != "yes" 
 then then
     nelconfig_libs_args="$nelconfig_libs_args --without-pacs"         CXXFLAGS="$CXXFLAGS `nel-config --cflags`"
 fi fi
  
 if test "$nelsound_is_mandatory" != "yes"     if test -z "$with_nel" -a -z "$with_nel_lib"
 then then
     nelconfig_libs_args="$nelconfig_libs_args --without-sound"         LDFLAGS="`nel-config --ldflags` $LDFLAGS"
 fi fi
  
 if test "$nelai_is_mandatory" != "yes" 
 then 
     nelconfig_libs_args="$nelconfig_libs_args --without-ai" 
 fi fi
  
 dnl Check for nel-config dnl
 AC_PATH_PROG(NEL_CONFIG, nel-config, no) dnl Set nel_libraries and nel_includes according to
  dnl user specification (--with-nel*) if any.
 if test "$NEL_CONFIG" = "no" dnl --with-nel-include and --with-nel-lib have precendence
  dnl over --with-nel
  dnl
  if test "$with_nel" = "no"
 then then
     have_nel_config="no"     dnl The user explicitly disabled the use of the NeL
      AC_MSG_ERROR([NeL is mandatory: do not specify --without-nel])
 else else
     NEL_CFLAGS=`nel-config --cflags`     if test "$with_nel" -a "$with_nel" != "yes"
     NEL_LIBS=`nel-config --libs $nelconfig_libs_args` 
  
     nel_dir_lnk=`echo '$NEL_LIBS' | sed -e 's/[[:space:]]*-l[^[:space:]]*//g'` 
  
     have_nel_config="yes" 
 fi 
  
 if test "$with_nel" 
 then then
     nel_includes="$with_nel/include"     nel_includes="$with_nel/include"
     nel_libraries="$with_nel/lib"     nel_libraries="$with_nel/lib"
 fi fi
  fi
  
 if test "$with_nel_include" if test "$with_nel_include"
 then then
Line 347 
Line 307 
     nel_libraries="$with_nel_lib"     nel_libraries="$with_nel_lib"
 fi fi
  
  dnl
  dnl Set compilation variables
  dnl
 if test "$nel_includes" if test "$nel_includes"
 then then
     NEL_CFLAGS="-I$nel_includes"     CXXFLAGS="$CXXFLAGS -I$nel_includes"
  fi
  
  if test "$nel_libraries"
  then
      LDFLAGS="-L$nel_libraries $LDFLAGS"
 fi fi
  
 dnl Checking for NeL headers dnl
  dnl Collect headers information and bark if missing and
  dnl mandatory
  dnl
  
 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)
 MY_NEL_HEADER_CHK([NeL 3D], [nel/3d/u_camera.h], [NL_U_CAMERA_H], $nel3d_is_mandatory) MY_NEL_HEADER_CHK([NeL 3D], [nel/3d/u_camera.h], [NL_U_CAMERA_H], $nel3d_is_mandatory)
 MY_NEL_HEADER_CHK([NeL PACS], [nel/pacs/u_global_position.h], [NL_U_GLOBAL_POSITION_H], $nelpacs_is_mandatory) MY_NEL_HEADER_CHK([NeL PACS], [nel/pacs/u_global_position.h], [NL_U_GLOBAL_POSITION_H], $nelpacs_is_mandatory)
 MY_NEL_HEADER_CHK([NeL Sound], [nel/sound/u_source.h], [NL_U_SOURCE_H], $nelsound_is_mandatory) MY_NEL_HEADER_CHK([NeL Sound], [nel/sound/u_source.h], [NL_U_SOURCE_H], $nelsound_is_mandatory)
 MY_NEL_HEADER_CHK([NeL AI], [nel/ai/nl_ai.h], [_IA_NEL_H], $nelai_is_mandatory) MY_NEL_HEADER_CHK([NeL AI], [nel/ai/nl_ai.h], [_IA_NEL_H], $nelai_is_mandatory)
  MY_NEL_HEADER_CHK([NeL Georges], [nel/georges/common.h], [NLGEORGES_COMMON_H], $nelgeorges_is_mandatory)
  
  dnl
  dnl Collect libraries information and bark if missing and
  dnl mandatory
  dnl
  
 dnl Checking for NeL libraries MY_NEL_LIB_CHK([NeL Misc], [nelmisc], $nelmisc_is_mandatory)
 MY_NEL_LIB_CHK([NeL Misc], $nel_dir_lnk, $nel_libraries, $nel_misc_lib, $nelmisc_is_mandatory) MY_NEL_LIB_CHK([NeL Network], [nelnet], $nelnet_is_mandatory)
 MY_NEL_LIB_CHK([NeL Network], $nel_dir_lnk, $nel_libraries, $nel_net_lib, $nelnet_is_mandatory) MY_NEL_LIB_CHK([NeL 3D], [nel3d], $nel3d_is_mandatory)
 MY_NEL_LIB_CHK([NeL 3D], $nel_dir_lnk, $nel_libraries, $nel_3d_lib, $nel3d_is_mandatory) MY_NEL_LIB_CHK([NeL PACS], [nelpacs], $nelpacs_is_mandatory)
 MY_NEL_LIB_CHK([NeL PACS], $nel_dir_lnk, $nel_libraries, $nel_pacs_lib, $nelpacs_is_mandatory) MY_NEL_LIB_CHK([NeL Sound], [nelsnd], $nelsound_is_mandatory)
 MY_NEL_LIB_CHK([NeL Sound], $nel_dir_lnk, $nel_libraries, $nel_sound_lib, $nelsound_is_mandatory) MY_NEL_LIB_CHK([NeL AI], [nelai], $nelai_is_mandatory)
 MY_NEL_LIB_CHK([NeL AI], $nel_dir_lnk, $nel_libraries, $nel_ai_lib, $nelai_is_mandatory) MY_NEL_LIB_CHK([NeL Georges], [nelgeorges], $nelgeorges_is_mandatory)
  
 ]) ])
  
Line 391 
Line 369 
                           path to the STLPort library files directory.                           path to the STLPort library files directory.
                           e.g. /usr/local/stlport/lib])                           e.g. /usr/local/stlport/lib])
  
  if test "$with_debug" = "full"
  then
   stlport_lib="stlport_gcc_stldebug"
  else
 stlport_lib="stlport_gcc" stlport_lib="stlport_gcc"
  fi
  
 if test "$with_stlport" = no if test "$with_stlport" = no
 then then
     dnl The user explicitly disabled the use of the STLPorts     dnl The user explicitly disabled the use of the STLPorts
     AC_MSG_CHECKING(STLPort)     AC_MSG_ERROR([STLPort is mandatory: do not specify --without-stlport])
     have_stlport="disabled" 
     AC_MSG_RESULT(disabled (*** EXPERIMENTAL ***)) 
 else else
     if test "$with_stlport"     stlport_includes="/usr/include/stlport"
      if test "$with_stlport" -a "$with_stlport" != yes
     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
  
 if test -z "$have_stlport" -a "$with_stlport_include" if test "$with_stlport_include"
 then then
     stlport_includes="$with_stlport_include"     stlport_includes="$with_stlport_include"
 fi fi
  
 if test -z "$have_stlport" -a "$with_stlport_lib" if test "$with_stlport_lib"
 then then
     stlport_libraries="$with_stlport_lib"     stlport_libraries="$with_stlport_lib"
 fi fi
  
 if test -z "$have_stlport" dnl Check for the 'pthread' library. SLTPort needs it.
 then AC_CHECK_LIB(pthread, main, , [AC_MSG_ERROR([cannot find the pthread library.])])
  
  AC_LANG_SAVE
  AC_LANG_CPLUSPLUS
  
     dnl Put STLPorts includes in CXXFLAGS     dnl Put STLPorts includes in CXXFLAGS
     if test "$stlport_includes"     if test "$stlport_includes"
     then     then
         CXXFLAGS="$CXXFLAGS -I$stlport_includes"         CXXFLAGS="$CXXFLAGS -I$stlport_includes"
     fi     fi
  
     dnl Put STLPorts libraries in LIBS dnl Put STLPorts libraries directory in LIBS
     if test "$stlport_libraries"     if test "$stlport_libraries"
     then     then
         LIBS="-L$stlport_libraries $LIBS -l$stlport_lib"     LIBS="-L$stlport_libraries $LIBS"
  else
      stlport_libraries='default'
     fi     fi
  
     dnl Test the headers     dnl Test the headers
     AC_MSG_CHECKING(for STLPort headers) 
  
     _CPPFLAGS="$CPPFLAGS" AC_CHECK_HEADER(algorithm,
  
     CPPFLAGS="$CXXFLAGS" 
  
     AC_EGREP_CPP( yo_stlport, 
     [#include <algorithm> 
 #ifdef __SGI_STL_PORT 
    yo_stlport 
 #endif], 
       have_stlport_headers="yes",       have_stlport_headers="yes",
       have_stlport_headers="no" )       have_stlport_headers="no" )
  
  AC_MSG_CHECKING(for STLPort headers)
  
     if test "$have_stlport_headers" = "yes"     if test "$have_stlport_headers" = "yes"
     then     then
         AC_MSG_RESULT([$stlport_includes])         AC_MSG_RESULT([$stlport_includes])
Line 453 
Line 439 
         AC_MSG_RESULT(no)         AC_MSG_RESULT(no)
     fi     fi
  
     dnl Test the libraries AC_CHECK_LIB($stlport_lib, main,, have_stlport_libraries="no")
     AC_MSG_CHECKING(for STLPort libraries) 
  
     CPPFLAGS="$CXXFLAGS $LIBS" 
  
     AC_TRY_LINK( , , have_stlport_libraries="yes", have_stlport_libraries="no") 
  
     CPPFLAGS="$_CPPFLAGS" AC_MSG_CHECKING(for STLPort library)
  
     if test "$have_stlport_libraries" = "yes" if test "$have_stlport_libraries" != "no"
     then     then
         AC_MSG_RESULT([$stlport_libraries])         AC_MSG_RESULT([$stlport_libraries])
     else     else
         AC_MSG_RESULT(no)         AC_MSG_RESULT(no)
     fi     fi
  
     if test "$have_stlport_headers" = "yes" \ if test "$have_stlport_headers" = "yes" &&
        && test "$have_stlport_libraries" = "yes"     test "$have_stlport_libraries" != "no"
     then     then
         have_stlport="yes"         have_stlport="yes"
     else     else
Line 482 
Line 463 
         AC_MSG_ERROR([STLPort must be installed (http://www.stlport.org).])         AC_MSG_ERROR([STLPort must be installed (http://www.stlport.org).])
     fi     fi
  
 fi AC_LANG_RESTORE
  
 ]) ])
  
Line 689 
Line 670 
  
 dnl Checking the FreeType 2 instalation dnl Checking the FreeType 2 instalation
 _CPPFLAGS="$CPPFLAGS" _CPPFLAGS="$CPPFLAGS"
 CPPFLAGS="$CXXFLAGS $FREETYPE_CFLAGS" CPPFLAGS=" $FREETYPE_CFLAGS $CXXFLAGS"
  
 AC_MSG_CHECKING(for FreeType version = 2) AC_MSG_CHECKING(for FreeType version = 2)
  
Line 716 
Line 697 
     FREETYPE_LIBS="-L$freetype_libraries -l$freetype_lib"     FREETYPE_LIBS="-L$freetype_libraries -l$freetype_lib"
 fi fi
  
 CPPFLAGS="$CXXFLAGS $FREETYPE_LIBS" CPPFLAGS="$FREETYPE_LIBS $CXXFLAGS"
          
 AC_TRY_LINK( , , have_freetype_libraries="yes", have_freetype_libraries="no") AC_TRY_LINK( , , have_freetype_libraries="yes", have_freetype_libraries="no")
  
Line 876 
Line 857 
 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"
Line 905 
Line 886 
 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")
  
Line 939 
Line 920 
 fi fi
  
 AC_SUBST(OPENAL_CFLAGS) AC_SUBST(OPENAL_CFLAGS)
 AC_SUBST(OPENAL_LIB) AC_SUBST(OPENAL_LIBS)
  
  
 ]) ])
Line 949 
Line 930 
 # 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()
  
Line 975 
Line 958 
 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"
     python_lib="python$PYTHON_VERSION"     python_lib="python$PYTHON_VERSION"
Line 1064 
Line 1053 
 ]) ])
  
  
  # =========================================================================
  # AM_PATH_CCACHE : Ccache checking macros
  
  AC_DEFUN(AM_PATH_CCACHE,
  [
  
  AC_ARG_WITH( ccache,
      [  --with-ccache           use ccache for compiling.],
      [ using_ccache=$with_ccache ]
  )
  
  AC_PATH_PROG(CCACHE, ccache)
  if test "$CCACHE" -a "$using_ccache" = "yes"
  then
      CC="ccache $CC"
      CXX="ccache $CXX"
  fi
  
  ])
  
  
 dnl ========================================================================= dnl =========================================================================
 dnl End of file dnl End of file
  


Legend:
Removed from v.1.1 
changed lines
 Added in v.1.14