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

Diff for /code/nelns/acinclude.m4 between version 1.5 and 1.12

version 1.5, 2002/01/28 14:40:26 version 1.12, 2002/03/29 10:19:10
Line 214 
Line 214 
 [ 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_LIBS="-L$nel_libraries -l$nel_test_lib" 
  
     else 
         NEL_TEST_LIBS="$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 237 
 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 245 
                           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 302 
     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 fi
  
 if test "$nel_libraries" if test "$nel_libraries"
 then then
     NEL_LIBS="-L$nel_libraries"     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 Checking for NeL libraries dnl
 MY_NEL_LIB_CHK([NeL Misc], $nel_dir_lnk, $nel_libraries, $nel_misc_lib, $nelmisc_is_mandatory) dnl Collect libraries information and bark if missing and
 MY_NEL_LIB_CHK([NeL Network], $nel_dir_lnk, $nel_libraries, $nel_net_lib, $nelnet_is_mandatory) dnl mandatory
 MY_NEL_LIB_CHK([NeL 3D], $nel_dir_lnk, $nel_libraries, $nel_3d_lib, $nel3d_is_mandatory) dnl
 MY_NEL_LIB_CHK([NeL PACS], $nel_dir_lnk, $nel_libraries, $nel_pacs_lib, $nelpacs_is_mandatory) 
 MY_NEL_LIB_CHK([NeL Sound], $nel_dir_lnk, $nel_libraries, $nel_sound_lib, $nelsound_is_mandatory) MY_NEL_LIB_CHK([NeL Misc], [nelmisc], $nelmisc_is_mandatory)
 MY_NEL_LIB_CHK([NeL AI], $nel_dir_lnk, $nel_libraries, $nel_ai_lib, $nelai_is_mandatory) MY_NEL_LIB_CHK([NeL Network], [nelnet], $nelnet_is_mandatory)
  MY_NEL_LIB_CHK([NeL 3D], [nel3d], $nel3d_is_mandatory)
  MY_NEL_LIB_CHK([NeL PACS], [nelpacs], $nelpacs_is_mandatory)
  MY_NEL_LIB_CHK([NeL Sound], [nelsnd], $nelsound_is_mandatory)
  MY_NEL_LIB_CHK([NeL AI], [nelai], $nelai_is_mandatory)
  MY_NEL_LIB_CHK([NeL Georges], [nelgeorges], $nelgeorges_is_mandatory)
  
 ]) ])
  
Line 396 
Line 364 
                           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" AC_LANG_SAVE
 then 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 458 
Line 431 
         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") AC_MSG_CHECKING(for STLPort library)
  
     CPPFLAGS="$_CPPFLAGS" if test "$have_stlport_libraries" != "no"
  
     if test "$have_stlport_libraries" = "yes" 
     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 487 
Line 455 
         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 694 
Line 662 
  
 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 721 
Line 689 
     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")
  


Legend:
Removed from v.1.5 
changed lines
 Added in v.1.12