aboutsummaryrefslogtreecommitdiff
path: root/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
committerneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
commit0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch)
tree2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to 'cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text')
-rw-r--r--cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup&only_with_tag=MAIN/index.html1093
-rw-r--r--cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup&only_with_tag=georges_v2/index.html1093
-rw-r--r--cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup&sortby=author&only_with_tag=georges_v2/index.html1093
-rw-r--r--cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup&sortby=rev&only_with_tag=HEAD/index.html1093
-rw-r--r--cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup&sortby=rev/index.html1093
-rw-r--r--cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup/index.html1093
6 files changed, 6558 insertions, 0 deletions
diff --git a/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup&only_with_tag=MAIN/index.html b/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup&only_with_tag=MAIN/index.html
new file mode 100644
index 00000000..ddb449fd
--- /dev/null
+++ b/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup&only_with_tag=MAIN/index.html
@@ -0,0 +1,1093 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
+<HEAD><style> A { color:black }</style>
+<!-- hennerik CVSweb $Revision: 1.93 $ -->
+<TITLE>code/nelns/acinclude.m4 - view - 1.14</TITLE></HEAD>
+<BODY BGCOLOR="#eeeeee">
+<table width="100%" border=0 cellspacing=0 cellpadding=1 bgcolor="#aaaaaa"><tr valign=bottom><td><a href="acinclude.m4?only_with_tag=MAIN"><IMG SRC="http://www.nevrax.org/inc/img/picto-up.gif" ALT="[BACK]" BORDER="0" WIDTH="14" HEIGHT="13"></a> <b>Return to <A HREF="acinclude.m4?only_with_tag=MAIN">acinclude.m4</A>
+ CVS log</b> <IMG SRC="http://www.nevrax.org/inc/img/picto-news.gif" ALT="[TXT]" BORDER="0" WIDTH="13" HEIGHT="15"></td><td align=right><IMG SRC="http://www.nevrax.org/inc/img/picto-dir.gif" ALT="[DIR]" BORDER="0" WIDTH="15" HEIGHT="13"> <b>Up to <a href="/cvs/cvsweb.cgi/?only_with_tag=MAIN">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/?only_with_tag=MAIN">code</a> / <a href="/cvs/cvsweb.cgi/code/nelns/?only_with_tag=MAIN">nelns</a></b></td></tr></table><HR noshade><table width="100%"><tr><td bgcolor="#ffffff">File: <a href="/cvs/cvsweb.cgi/?only_with_tag=MAIN">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/?only_with_tag=MAIN">code</a> / <a href="/cvs/cvsweb.cgi/code/nelns/?only_with_tag=MAIN">nelns</a> / <a href="/cvs/cvsweb.cgi/code/nelns/acinclude.m4?only_with_tag=MAIN">acinclude.m4</a>&nbsp;(<A HREF="/cvs/cvsweb.cgi/~checkout~/code/nelns/acinclude.m4?rev=1.14&amp;only_with_tag=MAIN" target="cvs_checkout" onClick="window.open('/cvs/cvsweb.cgi/~checkout~/code/nelns/acinclude.m4?rev=1.14','cvs_checkout','resizeable,scrollbars');"><b>download</b></A>)<BR>
+Revision <B>1.14</B>, <i>Thu Apr 25 17:52:16 2002 UTC</i> (2 months, 4 weeks ago) by <i>valignat</i>
+<BR>Branch: <b>MAIN</b>
+<BR>CVS Tags: <b>georges_v2, HEAD</b><BR>Changes since <b>1.13: +4 -1
+ lines</b><PRE>
+Added check on the 'pthread' library. SLTPort needs it.
+</PRE>
+</td></tr></table><HR noshade><PRE>dnl =========================================================================
+dnl
+dnl Macros used by Nevrax in configure.in files.
+dnl
+dnl $Id: acinclude.m4,v 1.14 2002/04/25 17:52:16 valignat Exp $
+dnl
+dnl =========================================================================
+
+dnl =========================================================================
+dnl WARNING: The original version of this file is placed in the $CVSROOT/code
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;directory.
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;There is links in the $CVSROOT/code sub-directories to that file
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(ex: $CVSROOT/code/nel), so be careful of the consequences of
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;any modification of that file.
+dnl =========================================================================
+
+dnl =========================================================================
+dnl Macros available in that file.
+dnl
+dnl
+dnl AM_NEL_DEBUG
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: manage the different debug and the release mode by setting
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; correctly the CFLAGS and CXXFLAGS variables.
+dnl
+dnl
+dnl AM_PATH_NEL
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the NeL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CXXFLAGS and LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_STLPORT
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the STLPort library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CXXFLAGS and LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_OPENGL
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the OpenGL library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OPENGL_CFLAGS and OPENGL_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_FREETYPE
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the Freetype library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FREETYPE_CFLAGS and FREETYPE_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_XF86VIDMODE
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; XF86VIDMODE_CFLAGS and XF86VIDMODE_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_OPENAL
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the OpenAL library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OPENAL_CFLAGS and OPENAL_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_PYTHON
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the Python library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PYTHON_CFLAGS and PYTHON_LIBS variables to use it.
+dnl
+dnl AM_PATH_CCACHE
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the Ccache utility.
+dnl
+dnl =========================================================================
+
+
+# =========================================================================
+# AM_NEL_DEBUG
+
+AC_DEFUN(AM_NEL_DEBUG,
+[
+
+MAX_C_OPTIMIZE=&quot;-O6&quot;
+
+STL_DEBUG=&quot;-D__STL_DEBUG&quot;
+
+NL_DEBUG=&quot;-DNL_DEBUG&quot;
+NL_DEBUG_FAST=&quot;-DNL_DEBUG_FAST&quot;
+NL_RELEASE_DEBUG=&quot;-DNL_RELEASE_DEBUG&quot;
+NL_RELEASE=&quot;-DNL_RELEASE&quot;
+
+AC_ARG_WITH(debug,
+ &nbsp; &nbsp;[ &nbsp;--with-debug[=full|medium|fast]
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Build a debug version (huge libraries).
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Full mode set only NeL and STL debug flags.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Medium mode set NeL debug flags with inline
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;optimization (default mode).
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Fast mode is like the Medium mode with some basic
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;optimization.
+ &nbsp;--without-debug &nbsp; &nbsp; &nbsp; &nbsp; Build without debugging code (default)],
+ &nbsp; &nbsp;[with_debug=$withval],
+ &nbsp; &nbsp;[with_debug=no])
+
+dnl Build optimized or debug version ?
+dnl First check for gcc and g++
+if test &quot;$ac_cv_prog_gcc&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;DEBUG_CFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CC=&quot;-O&quot;
+ &nbsp; &nbsp;OPTIMIZE_CFLAGS=&quot;$MAX_C_OPTIMIZE&quot;
+else
+ &nbsp; &nbsp;DEBUG_CFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CC=&quot;&quot;
+ &nbsp; &nbsp;OPTIMIZE_CFLAGS=&quot;-O&quot;
+fi
+
+if test &quot;$ac_cv_prog_cxx_g&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;DEBUG_CXXFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CXX=&quot;-O&quot;
+ &nbsp; &nbsp;OPTIMIZE_CXXFLAGS=&quot;-O3&quot;
+ &nbsp; &nbsp;OPTIMIZE_INLINE_CXXFLAGS=&quot;-finline-functions&quot;
+else
+ &nbsp; &nbsp;DEBUG_CXXFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CXX=&quot;&quot;
+ &nbsp; &nbsp;OPTIMIZE_CXXFLAGS=&quot;-O&quot;
+ &nbsp; &nbsp;OPTIMIZE_INLINE_CXXFLAGS=&quot;&quot;
+fi
+
+if test &quot;$with_debug&quot; = &quot;yes&quot; -o &quot;$with_debug&quot; = &quot;medium&quot;
+then
+ &nbsp; &nbsp;dnl Medium debug. Inline optimization
+ &nbsp; &nbsp;CFLAGS=&quot;$DEBUG_CFLAGS $OPTIMIZE_INLINE_CFLAGS $NL_DEBUG $NL_DEBUG_FAST $CFLAGS&quot;
+ &nbsp; &nbsp;CXXFLAGS=&quot;$DEBUG_CXXFLAGS $OPTIMIZE_INLINE_CXXFLAGS $NL_DEBUG $NL_DEBUG_FAST $CXXFLAGS&quot;
+else
+ &nbsp; &nbsp;if test &quot;$with_debug&quot; = &quot;full&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;dnl Full debug. Very slow in some cases
+ &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$DEBUG_CFLAGS $NL_DEBUG $STL_DEBUG $CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$DEBUG_CXXFLAGS $NL_DEBUG $STL_DEBUG $CXXFLAGS&quot;
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$with_debug&quot; = &quot;fast&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dnl Fast debug.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC $OPTIMIZE_INLINE_CFLAGS $NL_DEBUG $CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX $OPTIMIZE_INLINE_CXXFLAGS $NL_DEBUG $CXXFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dnl Optimized version. No debug
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$OPTIMIZE_CFLAGS $NL_RELEASE $CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$OPTIMIZE_CXXFLAGS $NL_RELEASE $CXXFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;fi
+fi
+
+dnl AC_MSG_RESULT([CFLAGS = $CFLAGS])
+dnl AC_MSG_RESULT([CXXGLAGS = $CXXFLAGS])
+
+])
+
+
+# =========================================================================
+# MY_NEL_HEADER_CHK : NeL header files checking macros
+
+AC_DEFUN(MY_NEL_HEADER_CHK,
+[ AC_REQUIRE_CPP()
+
+chk_message_obj=&quot;$1&quot;
+header=&quot;$2&quot;
+macro=&quot;$3&quot;
+is_mandatory=&quot;$4&quot;
+
+if test $is_mandatory = &quot;yes&quot;
+then
+
+ &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $NEL_CFLAGS&quot;
+
+ &nbsp; &nbsp;AC_MSG_CHECKING(for $header)
+
+ &nbsp; &nbsp;AC_EGREP_CPP( yo_header,
+[#include &lt;$header&gt;
+#ifdef $macro
+ &nbsp; yo_header
+#endif],
+ &nbsp;have_header=&quot;yes&quot;,
+ &nbsp;have_header=&quot;no&quot;)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+ &nbsp; &nbsp;if test &quot;$have_header&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$is_mandatory&quot; = &quot;yes&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([$chk_message_obj must be installed (<A HREF="http://www.nevrax.org">http://www.nevrax.org</A>).])
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no)
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;fi
+fi
+
+ &nbsp; &nbsp; &nbsp; &nbsp;
+])
+
+
+# =========================================================================
+# MY_NEL_LIB_CHK : NeL library checking macros
+
+AC_DEFUN(MY_NEL_LIB_CHK,
+[ AC_REQUIRE_CPP()
+
+chk_message_obj=&quot;$1&quot;
+nel_test_lib=&quot;$2&quot;
+is_mandatory=&quot;$3&quot;
+
+if test $is_mandatory = &quot;yes&quot;
+then
+
+ &nbsp; &nbsp;AC_CHECK_LIB($nel_test_lib, main,,[AC_MSG_ERROR([$chk_message_obj must be installed (<A HREF="http://www.nevrax.org">http://www.nevrax.org</A>).])])
+fi
+])
+
+
+# =========================================================================
+# AM_PATH_NEL : NeL checking macros
+AC_DEFUN(AM_PATH_NEL,
+[ AC_REQUIRE_CPP()
+
+AC_ARG_WITH( nel,
+ &nbsp; &nbsp;[ &nbsp;--with-nel=&lt;path&gt; &nbsp; &nbsp; &nbsp; path to the NeL install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/nel])
+
+AC_ARG_WITH( nel-include,
+ &nbsp; &nbsp;[ &nbsp;--with-nel-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the NeL header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/nel/include])
+
+AC_ARG_WITH( nel-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-nel-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the NeL library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/nel/lib])
+
+
+nelmisc_is_mandatory=&quot;$1&quot;
+nelnet_is_mandatory=&quot;$2&quot;
+nel3d_is_mandatory=&quot;$3&quot;
+nelpacs_is_mandatory=&quot;$4&quot;
+nelsound_is_mandatory=&quot;$5&quot;
+nelai_is_mandatory=&quot;$6&quot;
+nelgeorges_is_mandatory=&quot;$7&quot;
+
+dnl Check for nel-config
+AC_PATH_PROG(NEL_CONFIG, nel-config, no)
+
+dnl
+dnl Configure options (--with-nel*) have precendence
+dnl over nel-config only set variables if they are not
+dnl specified
+dnl
+if test &quot;$NEL_CONFIG&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;if test -z &quot;$with_nel&quot; -a -z &quot;$with_nel_include&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS `nel-config --cflags`&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test -z &quot;$with_nel&quot; -a -z &quot;$with_nel_lib&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;LDFLAGS=&quot;`nel-config --ldflags` $LDFLAGS&quot;
+ &nbsp; &nbsp;fi
+fi
+
+dnl
+dnl Set nel_libraries and nel_includes according to
+dnl user specification (--with-nel*) if any.
+dnl --with-nel-include and --with-nel-lib have precendence
+dnl over --with-nel
+dnl
+if test &quot;$with_nel&quot; = &quot;no&quot;
+then
+ &nbsp; &nbsp;dnl The user explicitly disabled the use of the NeL
+ &nbsp; &nbsp;AC_MSG_ERROR([NeL is mandatory: do not specify --without-nel])
+else
+ &nbsp; &nbsp;if test &quot;$with_nel&quot; -a &quot;$with_nel&quot; != &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;nel_includes=&quot;$with_nel/include&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;nel_libraries=&quot;$with_nel/lib&quot;
+ &nbsp; &nbsp;fi
+fi
+
+if test &quot;$with_nel_include&quot;
+then
+ &nbsp; &nbsp;nel_includes=&quot;$with_nel_include&quot;
+fi
+
+if test &quot;$with_nel_lib&quot;
+then
+ &nbsp; &nbsp;nel_libraries=&quot;$with_nel_lib&quot;
+fi
+
+dnl
+dnl Set compilation variables
+dnl
+if test &quot;$nel_includes&quot;
+then
+ &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS -I$nel_includes&quot;
+fi
+
+if test &quot;$nel_libraries&quot;
+then
+ &nbsp; &nbsp;LDFLAGS=&quot;-L$nel_libraries $LDFLAGS&quot;
+fi
+
+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 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 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 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
+
+MY_NEL_LIB_CHK([NeL Misc], [nelmisc], $nelmisc_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)
+
+])
+
+
+# =========================================================================
+# AM_PATH_STLPORT : STLPort checking macros
+
+AC_DEFUN(AM_PATH_STLPORT,
+[ AC_REQUIRE_CPP()
+
+AC_ARG_WITH( stlport,
+ &nbsp; &nbsp;[ &nbsp;--with-stlport=&lt;path&gt; &nbsp; path to the STLPort install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport])
+
+AC_ARG_WITH( stlport-include,
+ &nbsp; &nbsp;[ &nbsp;--with-stlport-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the STLPort header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport/stlport])
+
+AC_ARG_WITH( stlport-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-stlport-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the STLPort library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport/lib])
+
+if test &quot;$with_debug&quot; = &quot;full&quot;
+then
+ stlport_lib=&quot;stlport_gcc_stldebug&quot;
+else
+ stlport_lib=&quot;stlport_gcc&quot;
+fi
+
+if test &quot;$with_stlport&quot; = no
+then
+ &nbsp; &nbsp;dnl The user explicitly disabled the use of the STLPorts
+ &nbsp; &nbsp;AC_MSG_ERROR([STLPort is mandatory: do not specify --without-stlport])
+else
+ &nbsp; &nbsp;stlport_includes=&quot;/usr/include/stlport&quot;
+ &nbsp; &nbsp;if test &quot;$with_stlport&quot; -a &quot;$with_stlport&quot; != yes
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;stlport_includes=&quot;$with_stlport/stlport&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;stlport_libraries=&quot;$with_stlport/lib&quot;
+
+ &nbsp; &nbsp; &nbsp; &nbsp;if test ! -d &quot;$stlport_includes&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;stlport_includes=&quot;$with_stlport/include/stlport&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;fi
+fi
+
+if test &quot;$with_stlport_include&quot;
+then
+ &nbsp; &nbsp;stlport_includes=&quot;$with_stlport_include&quot;
+fi
+
+if test &quot;$with_stlport_lib&quot;
+then
+ &nbsp; &nbsp;stlport_libraries=&quot;$with_stlport_lib&quot;
+fi
+
+dnl Check for the 'pthread' library. SLTPort needs it.
+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
+if test &quot;$stlport_includes&quot;
+then
+ &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS -I$stlport_includes&quot;
+fi
+
+dnl Put STLPorts libraries directory in LIBS
+if test &quot;$stlport_libraries&quot;
+then
+ &nbsp; &nbsp;LIBS=&quot;-L$stlport_libraries $LIBS&quot;
+else
+ &nbsp; &nbsp;stlport_libraries='default'
+fi
+
+dnl Test the headers
+
+AC_CHECK_HEADER(algorithm,
+ &nbsp; &nbsp;have_stlport_headers=&quot;yes&quot;,
+ &nbsp; &nbsp;have_stlport_headers=&quot;no&quot; )
+
+AC_MSG_CHECKING(for STLPort headers)
+
+if test &quot;$have_stlport_headers&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT([$stlport_includes])
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+AC_CHECK_LIB($stlport_lib, main,, have_stlport_libraries=&quot;no&quot;)
+
+AC_MSG_CHECKING(for STLPort library)
+
+if test &quot;$have_stlport_libraries&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT([$stlport_libraries])
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+if test &quot;$have_stlport_headers&quot; = &quot;yes&quot; &amp;&amp;
+ &nbsp; &nbsp;test &quot;$have_stlport_libraries&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;have_stlport=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_stlport=&quot;no&quot;
+fi
+
+if test &quot;$have_stlport&quot; = &quot;no&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([STLPort must be installed (<A HREF="http://www.stlport.org">http://www.stlport.org</A>).])
+fi
+
+AC_LANG_RESTORE
+
+])
+
+
+# =========================================================================
+# AM_PATH_OPENGL : OpenGL checking macros
+
+AC_DEFUN(AM_PATH_OPENGL,
+[ AC_MSG_CHECKING(for OpenGL headers and GL Version &gt;= 1.2)
+
+is_mandatory=&quot;$1&quot;
+
+AC_REQUIRE_CPP()
+
+AC_ARG_WITH( opengl,
+ &nbsp; &nbsp;[ &nbsp;--with-opengl=&lt;path&gt; &nbsp; &nbsp;path to the OpenGL install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local])
+
+AC_ARG_WITH( opengl-include,
+ &nbsp; &nbsp;[ &nbsp;--with-opengl-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenGL header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/include])
+
+AC_ARG_WITH( opengl-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-opengl-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenGL library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/lib])
+
+opengl_lib=&quot;GL&quot;
+
+if test &quot;$with_opengl&quot;
+then
+ &nbsp; &nbsp;opengl_includes=&quot;$with_opengl/include&quot;
+ &nbsp; &nbsp;opengl_libraries=&quot;$with_opengl/lib&quot;
+fi
+
+if test &quot;$with_opengl_include&quot;
+then
+ &nbsp; &nbsp;opengl_includes=&quot;$with_opengl_include&quot;
+fi
+
+if test &quot;$with_opengl_lib&quot;
+then
+ &nbsp; &nbsp;opengl_libraries=&quot;$with_opengl_lib&quot;
+fi
+
+dnl Set OPENGL_CFLAGS
+if test &quot;$opengl_includes&quot;
+then
+ &nbsp; &nbsp;OPENGL_CFLAGS=&quot;-I$opengl_includes&quot;
+fi
+
+dnl Set OPENGL_LIBS
+if test &quot;$opengl_libraries&quot;
+then
+ &nbsp; &nbsp;OPENGL_LIBS=&quot;-L$opengl_libraries&quot;
+fi
+OPENGL_LIBS=&quot;$OPENGL_LIBS -l$opengl_lib&quot;
+
+dnl Test the headers
+_CPPFLAGS=&quot;$CPPFLAGS&quot;
+
+CPPFLAGS=&quot;$CXXFLAGS $OPENGL_CFLAGS&quot;
+
+AC_EGREP_CPP( yo_opengl,
+[#include &lt;GL/gl.h&gt; &nbsp; &nbsp; &nbsp;
+#if defined(GL_VERSION_1_2)
+ &nbsp; yo_opengl
+#endif],
+ &nbsp;have_opengl_headers=&quot;yes&quot;,
+ &nbsp;have_opengl_headers=&quot;no&quot; )
+
+if test &quot;$have_opengl_headers&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$opengl_includes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$opengl_includes])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+dnl Checking the GLEXT version &gt;= 7
+AC_MSG_CHECKING(for &lt;GL/glext.h&gt; and GLEXT version &gt;= 7)
+
+AC_EGREP_CPP( yo_glext_version,
+[#include &lt;GL/glext.h&gt;
+#ifdef GL_GLEXT_VERSION
+#if GL_GLEXT_VERSION &gt;= 7
+ &nbsp; yo_glext_version
+#endif
+#endif],
+ &nbsp;have_glext=&quot;yes&quot;,
+ &nbsp;have_glext=&quot;no&quot; )
+
+if test &quot;$have_glext&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT(yes)
+else
+ &nbsp; &nbsp;AC_MSG_RESULT([no, &lt;GL/glext.h&gt; can be downloaded from <A HREF="http://oss.sgi.com/projects/ogl-sample/ABI/">http://oss.sgi.com/projects/ogl-sample/ABI/</A>])
+fi
+ &nbsp; &nbsp;
+dnl Test the libraries
+AC_MSG_CHECKING(for OpenGL libraries)
+
+CPPFLAGS=&quot;$CXXFLAGS $OPENGL_LIBS&quot;
+
+AC_TRY_LINK( , , have_opengl_libraries=&quot;yes&quot;, have_opengl_libraries=&quot;no&quot;)
+
+CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+if test &quot;$have_opengl_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$opengl_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$opengl_libraries])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+opengl_libraries=&quot;$opengl_libraries&quot;
+
+if test &quot;$have_opengl_headers&quot; = &quot;yes&quot; \
+ &nbsp; &nbsp; &nbsp; &nbsp;-a &quot;$have_glext&quot; = &quot;yes&quot; \
+ &nbsp; &nbsp; &nbsp; &nbsp;-a &quot;$have_opengl_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;have_opengl=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_opengl=&quot;no&quot;
+fi
+
+if test &quot;$have_opengl&quot; = &quot;no&quot; -a &quot;$is_mandatory&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([OpenGL &gt;= 1.2 must be installed (<A HREF="http://www.mesa3d.org">http://www.mesa3d.org</A>)])
+fi
+
+AC_SUBST(OPENGL_CFLAGS)
+AC_SUBST(OPENGL_LIBS)
+
+])
+
+
+# =========================================================================
+# AM_PATH_FREETYPE : FreeType checking macros
+
+AC_DEFUN(AM_PATH_FREETYPE,
+[ is_mandatory=&quot;$1&quot;
+
+AC_REQUIRE_CPP()
+
+AC_ARG_WITH( freetype,
+ &nbsp; &nbsp;[ &nbsp;--with-freetype=&lt;path&gt; &nbsp; path to the FreeType install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/freetype])
+
+AC_ARG_WITH( freetype-include,
+ &nbsp; &nbsp;[ &nbsp;--with-freetype-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the FreeType header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/freetype/include])
+
+AC_ARG_WITH( freetype-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-freetype-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the FreeType library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/freetype/lib])
+
+freetype_lib=&quot;freetype&quot;
+
+
+AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
+ &nbsp;
+if test &quot;$FREETYPE_CONFIG&quot; = &quot;no&quot;
+then
+ &nbsp; &nbsp;have_freetype_config=&quot;no&quot;
+else
+ &nbsp; &nbsp;FREETYPE_CFLAGS=`freetype-config --cflags`
+ &nbsp; &nbsp;FREETYPE_LIBS=`freetype-config --libs`
+ &nbsp; &nbsp;have_freetype_config=&quot;yes&quot;
+fi
+
+if test &quot;$with_freetype&quot;
+then
+ &nbsp; &nbsp;freetype_includes=&quot;$with_freetype/include&quot;
+ &nbsp; &nbsp;freetype_libraries=&quot;$with_freetype/lib&quot;
+fi
+
+if test &quot;$with_freetype_include&quot;
+then
+ &nbsp; &nbsp;freetype_includes=&quot;$with_freetype_include&quot;
+fi
+
+if test &quot;$with_freetype_lib&quot;
+then
+ &nbsp; &nbsp;freetype_libraries=&quot;$with_freetype_lib&quot;
+fi
+
+if test &quot;$freetype_includes&quot;
+then
+ &nbsp; &nbsp;FREETYPE_CFLAGS=&quot;-I$freetype_includes&quot;
+fi
+
+dnl Checking the FreeType 2 instalation
+_CPPFLAGS=&quot;$CPPFLAGS&quot;
+CPPFLAGS=&quot; $FREETYPE_CFLAGS $CXXFLAGS&quot;
+
+AC_MSG_CHECKING(for FreeType version = 2)
+
+AC_EGREP_CPP( yo_freetype2,
+[#include &lt;freetype/freetype.h&gt;
+#if FREETYPE_MAJOR == 2
+ &nbsp; yo_freetype2
+#endif],
+ &nbsp;have_freetype2=&quot;yes&quot;,
+ &nbsp;have_freetype2=&quot;no&quot;)
+
+if test &quot;$have_freetype2&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT(yes)
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+ &nbsp; &nbsp;
+dnl Test the libraries
+AC_MSG_CHECKING(for FreeType libraries)
+ &nbsp; &nbsp; &nbsp; &nbsp;
+if test $freetype_libraries
+then
+ &nbsp; &nbsp;FREETYPE_LIBS=&quot;-L$freetype_libraries -l$freetype_lib&quot;
+fi
+
+CPPFLAGS=&quot;$FREETYPE_LIBS $CXXFLAGS&quot;
+ &nbsp; &nbsp;
+AC_TRY_LINK( , , have_freetype_libraries=&quot;yes&quot;, have_freetype_libraries=&quot;no&quot;)
+
+CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+if test &quot;$have_freetype_libraries&quot; = &quot;yes&quot;
+then &nbsp; &nbsp;
+ &nbsp; &nbsp;if test &quot;$freetype_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$freetype_libraries])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+if test &quot;$have_freetype2&quot; = &quot;yes&quot; &amp;&amp; test &quot;$have_freetype_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;have_freetype=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_freetype=&quot;no&quot;
+fi
+
+if test &quot;$have_freetype&quot; = &quot;no&quot; &amp;&amp; test &quot;$is_mandatory&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([FreeType 2 must be installed (<A HREF="http://freetype.sourceforge.net">http://freetype.sourceforge.net</A>)])
+fi
+
+AC_SUBST(FREETYPE_CFLAGS)
+AC_SUBST(FREETYPE_LIBS)
+
+])
+
+
+# =========================================================================
+# AM_PATH_XF86VIDMODE : XF86VidMode checking macros
+
+AC_DEFUN(AM_PATH_XF86VIDMODE,
+[ AC_MSG_CHECKING(for XF86VidMode extension)
+
+AC_REQUIRE_CPP()
+
+AC_ARG_WITH( xf86vidmode-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-xf86vidmode-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the XF86VidMode library.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/X11R6/lib] )
+
+xf86vidmode_lib=&quot;Xxf86vm&quot;
+
+if test &quot;$with_xf86vidmode_lib&quot; = no
+then
+ &nbsp; &nbsp;dnl The user explicitly disabled the use of XF86VidMode
+ &nbsp; &nbsp;have_xf86vidmode=&quot;disabled&quot;
+ &nbsp; &nbsp;AC_MSG_RESULT(disabled)
+else
+ &nbsp; &nbsp;if test &quot;$with_xf86vidmode_lib&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;xf86vidmode_libraries=&quot;$with_xf86vidmode_lib&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;XF86VIDMODE_CFLAGS=&quot;-DXF86VIDMODE&quot;
+fi
+
+if test -z &quot;$have_xf86vidmode&quot;
+dnl -a &quot;$with_xf86vidmode_lib&quot;
+then
+ &nbsp; &nbsp;if test &quot;$xf86vidmode_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;XF86VIDMODE_LIBS=&quot;-L$xf86vidmode_libraries&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;XF86VIDMODE_LIBS=&quot;$XF86VIDMODE_LIBS -l$xf86vidmode_lib&quot;
+
+ &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $XF86VIDMODE_LIBS&quot;
+
+ &nbsp; &nbsp;AC_TRY_LINK( , , have_xf86vidmode_libraries=&quot;yes&quot;, have_xf86vidmode_libraries=&quot;no&quot;)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+ &nbsp; &nbsp;if test &quot;$have_xf86vidmode_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;have_xf86vidmode=&quot;yes&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$xf86vidmode_libraries&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT($xf86vidmode_libraries)
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;have_xf86vidmode=&quot;no&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no, no fullscreen support available.)
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;xf86vidmode_libraries=&quot;$xf86vidmode_libraries&quot;
+
+fi
+
+AC_SUBST(XF86VIDMODE_CFLAGS)
+AC_SUBST(XF86VIDMODE_LIBS)
+
+])
+
+
+# =========================================================================
+# AM_PATH_OPENAL : OpenAL checking macros
+
+AC_DEFUN(AM_PATH_OPENAL,
+[ is_mandatory=&quot;$1&quot;
+
+AC_REQUIRE_CPP()
+
+dnl Get from the user option the path to the OpenAL files location
+AC_ARG_WITH( openal,
+ &nbsp; &nbsp;[ &nbsp;--with-openal=&lt;path&gt; &nbsp; path to the OpenAL install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local])
+
+AC_ARG_WITH( openal-include,
+ &nbsp; &nbsp;[ &nbsp;--with-openal-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenAL header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/include])
+
+AC_ARG_WITH( openal-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-openal-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenAL library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/lib])
+
+openal_lib=&quot;openal&quot;
+
+if test $with_openal
+then
+ &nbsp; &nbsp;openal_includes=&quot;$with_openal/include&quot;
+ &nbsp; &nbsp;openal_libraries=&quot;$with_openal/lib&quot;
+fi
+
+if test &quot;$with_openal_include&quot;
+then
+ &nbsp; &nbsp;openal_includes=&quot;$with_openal_include&quot;
+fi
+
+if test &quot;$with_openal_lib&quot;
+then
+ &nbsp; &nbsp;openal_libraries=&quot;$with_openal_lib&quot;
+fi
+
+
+dnl Set OPENAL_CFLAGS
+if test &quot;$openal_includes&quot;
+then
+ &nbsp; &nbsp;OPENAL_CFLAGS=&quot;-I$openal_includes&quot;
+fi
+
+dnl Set OPENAL_LIBS
+if test &quot;$openal_libraries&quot;
+then
+ &nbsp; &nbsp;OPENAL_LIBS=&quot;-L$openal_libraries&quot;
+fi
+OPENAL_LIBS=&quot;$OPENAL_LIBS -l$openal_lib&quot;
+
+_CPPFLAGS=&quot;$CPPFLAGS&quot;
+CPPFLAGS=&quot;$CXXFLAGS $OPENAL_CFLAGS&quot;
+
+AC_MSG_CHECKING(for OpenAL headers)
+AC_EGREP_CPP( yo_openal,
+[#include &lt;AL/altypes.h&gt;
+#ifdef AL_VERSION
+ &nbsp; yo_openal
+#endif],
+ &nbsp;have_openal_headers=&quot;yes&quot;,
+ &nbsp;have_openal_headers=&quot;no&quot; )
+
+if test &quot;$have_openal_headers&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$openal_includes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$openal_includes])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+dnl Test the libraries
+AC_MSG_CHECKING(for OpenAL libraries)
+
+CPPFLAGS=&quot;$CXXFLAGS $OPENAL_LIBS&quot;
+
+AC_TRY_LINK( , , have_openal_libraries=&quot;yes&quot;, have_openal_libraries=&quot;no&quot;)
+
+CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+if test &quot;$have_openal_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$openal_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$openal_libraries])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+openal_libraries=&quot;$openal_libraries&quot;
+
+if test &quot;$have_openal_headers&quot; = &quot;yes&quot; \
+ &nbsp; &amp;&amp; test &quot;$have_openal_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;have_openal=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_openal=&quot;no&quot;
+fi
+
+if test &quot;$have_openal&quot; = &quot;no&quot; -a &quot;$is_mandatory&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([OpenAL is needed to compile NeL (<A HREF="http://www.openal.org">http://www.openal.org</A>).])
+fi
+
+AC_SUBST(OPENAL_CFLAGS)
+AC_SUBST(OPENAL_LIBS)
+
+
+])
+
+
+# =========================================================================
+# AM_PATH_PYTHON : Python checking macros
+
+AC_DEFUN(AM_PATH_PYTHON,
+[ python_version_required=&quot;$1&quot;
+
+is_mandatory=&quot;$2&quot;
+
+AC_REQUIRE_CPP()
+
+dnl Get from the user option the path to the Python files location
+AC_ARG_WITH( python,
+ &nbsp; &nbsp;[ &nbsp;--with-python=&lt;path&gt; &nbsp; &nbsp;path to the Python prefix installation directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local],
+ &nbsp; &nbsp;[ PYTHON_PREFIX=$with_python ]
+)
+
+AC_ARG_WITH( python-version,
+ &nbsp; &nbsp;[ &nbsp;--with-python-version=&lt;version&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Python version to use, e.g. 1.5],
+ &nbsp; &nbsp;[ PYTHON_VERSION=$with_python_version ]
+)
+
+if test ! &quot;$PYTHON_PREFIX&quot; = &quot;&quot;
+then
+ &nbsp; &nbsp;PATH=&quot;$PYTHON_PREFIX/bin:$PATH&quot;
+fi
+
+if test ! &quot;$PYTHON_VERSION&quot; = &quot;&quot;
+then
+ &nbsp; &nbsp;PYTHON_EXEC=&quot;python$PYTHON_VERSION&quot;
+else
+ &nbsp; &nbsp;PYTHON_EXEC=&quot;python python2.1 python2.0 python1.5&quot;
+fi
+
+AC_PATH_PROGS(PYTHON, $PYTHON_EXEC, no, $PATH)
+
+if test &quot;$PYTHON&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;PYTHON_PREFIX=`$PYTHON -c 'import sys; print &quot;%s&quot; % (sys.prefix)'`
+ &nbsp; &nbsp;PYTHON_VERSION=`$PYTHON -c 'import sys; print &quot;%s&quot; % (sys.version[[:3]])'`
+
+ &nbsp; &nbsp;is_python_version_enough=`expr $python_version_required \&lt;= $PYTHON_VERSION`
+fi
+
+
+if test &quot;$PYTHON&quot; = &quot;no&quot; || test &quot;$is_python_version_enough&quot; != &quot;1&quot;
+then
+
+ &nbsp; &nbsp;if test &quot;$is_mandatory&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([Python $python_version_required must be installed (<A HREF="http://www.python.org">http://www.python.org</A>)])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;have_python=&quot;no&quot;
+ &nbsp; &nbsp;fi
+
+else
+
+ &nbsp; &nbsp;python_includes=&quot;$PYTHON_PREFIX/include/python$PYTHON_VERSION&quot;
+ &nbsp; &nbsp;python_libraries=&quot;$PYTHON_PREFIX/lib/python$PYTHON_VERSION/config&quot;
+ &nbsp; &nbsp;python_lib=&quot;python$PYTHON_VERSION&quot;
+
+ &nbsp; &nbsp;PYTHON_CFLAGS=&quot;-I$python_includes&quot;
+ &nbsp; &nbsp;PYTHON_LIBS=&quot;-L$python_libraries -l$python_lib&quot;
+
+ &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS ${PYTHON_CFLAGS}&quot;
+
+ &nbsp; &nbsp;dnl Test the headers
+ &nbsp; &nbsp;AC_MSG_CHECKING(for Python headers)
+
+ &nbsp; &nbsp;AC_EGREP_CPP( yo_python,
+ &nbsp; &nbsp;[#include &lt;Python.h&gt;
+ &nbsp; yo_python
+ &nbsp; &nbsp;],
+ &nbsp; &nbsp; &nbsp;have_python_headers=&quot;yes&quot;,
+ &nbsp; &nbsp; &nbsp;have_python_headers=&quot;no&quot; )
+
+ &nbsp; &nbsp;if test &quot;$have_python_headers&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$python_includes])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no)
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;dnl Test the libraries
+ &nbsp; &nbsp;AC_MSG_CHECKING(for Python libraries)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $PYTHON_CFLAGS&quot;
+
+ &nbsp; &nbsp;AC_TRY_LINK( , , have_python_libraries=&quot;yes&quot;, have_python_libraries=&quot;no&quot;)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+ &nbsp; &nbsp;if test &quot;$have_python_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$python_libraries&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$python_libraries])
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no)
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test &quot;$have_python_headers&quot; = &quot;yes&quot; \
+ &nbsp; &nbsp; &nbsp; &amp;&amp; test &quot;$have_python_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;have_python=&quot;yes&quot;
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;have_python=&quot;no&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test &quot;$have_python&quot; = &quot;no&quot; -a &quot;$is_mandatory&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([Python is needed to compile NeL (<A HREF="http://www.python.org">http://www.python.org</A>).])
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;AC_SUBST(PYTHON_CFLAGS)
+ &nbsp; &nbsp;AC_SUBST(PYTHON_LIBS)
+
+fi
+
+])
+
+
+# =========================================================================
+# AM_PATH_CCACHE : Ccache checking macros
+
+AC_DEFUN(AM_PATH_CCACHE,
+[
+
+AC_ARG_WITH( ccache,
+ &nbsp; &nbsp;[ &nbsp;--with-ccache &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; use ccache for compiling.],
+ &nbsp; &nbsp;[ using_ccache=$with_ccache ]
+)
+
+AC_PATH_PROG(CCACHE, ccache)
+if test &quot;$CCACHE&quot; -a &quot;$using_ccache&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;CC=&quot;ccache $CC&quot;
+ &nbsp; &nbsp;CXX=&quot;ccache $CXX&quot;
+fi
+
+])
+
+
+dnl =========================================================================
+dnl End of file
+
+</PRE> \ No newline at end of file
diff --git a/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup&only_with_tag=georges_v2/index.html b/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup&only_with_tag=georges_v2/index.html
new file mode 100644
index 00000000..cbacd811
--- /dev/null
+++ b/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup&only_with_tag=georges_v2/index.html
@@ -0,0 +1,1093 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
+<HEAD><style> A { color:black }</style>
+<!-- hennerik CVSweb $Revision: 1.93 $ -->
+<TITLE>code/nelns/acinclude.m4 - view - 1.14</TITLE></HEAD>
+<BODY BGCOLOR="#eeeeee">
+<table width="100%" border=0 cellspacing=0 cellpadding=1 bgcolor="#aaaaaa"><tr valign=bottom><td><a href="acinclude.m4?only_with_tag=georges_v2"><IMG SRC="http://www.nevrax.org/inc/img/picto-up.gif" ALT="[BACK]" BORDER="0" WIDTH="14" HEIGHT="13"></a> <b>Return to <A HREF="acinclude.m4?only_with_tag=georges_v2">acinclude.m4</A>
+ CVS log</b> <IMG SRC="http://www.nevrax.org/inc/img/picto-news.gif" ALT="[TXT]" BORDER="0" WIDTH="13" HEIGHT="15"></td><td align=right><IMG SRC="http://www.nevrax.org/inc/img/picto-dir.gif" ALT="[DIR]" BORDER="0" WIDTH="15" HEIGHT="13"> <b>Up to <a href="/cvs/cvsweb.cgi/?only_with_tag=georges_v2">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/?only_with_tag=georges_v2">code</a> / <a href="/cvs/cvsweb.cgi/code/nelns/?only_with_tag=georges_v2">nelns</a></b></td></tr></table><HR noshade><table width="100%"><tr><td bgcolor="#ffffff">File: <a href="/cvs/cvsweb.cgi/?only_with_tag=georges_v2">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/?only_with_tag=georges_v2">code</a> / <a href="/cvs/cvsweb.cgi/code/nelns/?only_with_tag=georges_v2">nelns</a> / <a href="/cvs/cvsweb.cgi/code/nelns/acinclude.m4?only_with_tag=georges_v2">acinclude.m4</a>&nbsp;(<A HREF="/cvs/cvsweb.cgi/~checkout~/code/nelns/acinclude.m4?rev=1.14&amp;only_with_tag=georges_v2" target="cvs_checkout" onClick="window.open('/cvs/cvsweb.cgi/~checkout~/code/nelns/acinclude.m4?rev=1.14','cvs_checkout','resizeable,scrollbars');"><b>download</b></A>)<BR>
+Revision <B>1.14</B>, <i>Thu Apr 25 17:52:16 2002 UTC</i> (2 months, 4 weeks ago) by <i>valignat</i>
+<BR>Branch: <b>MAIN</b>
+<BR>CVS Tags: <b>georges_v2, HEAD</b><BR>Changes since <b>1.13: +4 -1
+ lines</b><PRE>
+Added check on the 'pthread' library. SLTPort needs it.
+</PRE>
+</td></tr></table><HR noshade><PRE>dnl =========================================================================
+dnl
+dnl Macros used by Nevrax in configure.in files.
+dnl
+dnl $Id: acinclude.m4,v 1.14 2002/04/25 17:52:16 valignat Exp $
+dnl
+dnl =========================================================================
+
+dnl =========================================================================
+dnl WARNING: The original version of this file is placed in the $CVSROOT/code
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;directory.
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;There is links in the $CVSROOT/code sub-directories to that file
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(ex: $CVSROOT/code/nel), so be careful of the consequences of
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;any modification of that file.
+dnl =========================================================================
+
+dnl =========================================================================
+dnl Macros available in that file.
+dnl
+dnl
+dnl AM_NEL_DEBUG
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: manage the different debug and the release mode by setting
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; correctly the CFLAGS and CXXFLAGS variables.
+dnl
+dnl
+dnl AM_PATH_NEL
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the NeL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CXXFLAGS and LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_STLPORT
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the STLPort library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CXXFLAGS and LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_OPENGL
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the OpenGL library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OPENGL_CFLAGS and OPENGL_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_FREETYPE
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the Freetype library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FREETYPE_CFLAGS and FREETYPE_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_XF86VIDMODE
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; XF86VIDMODE_CFLAGS and XF86VIDMODE_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_OPENAL
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the OpenAL library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OPENAL_CFLAGS and OPENAL_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_PYTHON
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the Python library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PYTHON_CFLAGS and PYTHON_LIBS variables to use it.
+dnl
+dnl AM_PATH_CCACHE
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the Ccache utility.
+dnl
+dnl =========================================================================
+
+
+# =========================================================================
+# AM_NEL_DEBUG
+
+AC_DEFUN(AM_NEL_DEBUG,
+[
+
+MAX_C_OPTIMIZE=&quot;-O6&quot;
+
+STL_DEBUG=&quot;-D__STL_DEBUG&quot;
+
+NL_DEBUG=&quot;-DNL_DEBUG&quot;
+NL_DEBUG_FAST=&quot;-DNL_DEBUG_FAST&quot;
+NL_RELEASE_DEBUG=&quot;-DNL_RELEASE_DEBUG&quot;
+NL_RELEASE=&quot;-DNL_RELEASE&quot;
+
+AC_ARG_WITH(debug,
+ &nbsp; &nbsp;[ &nbsp;--with-debug[=full|medium|fast]
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Build a debug version (huge libraries).
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Full mode set only NeL and STL debug flags.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Medium mode set NeL debug flags with inline
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;optimization (default mode).
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Fast mode is like the Medium mode with some basic
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;optimization.
+ &nbsp;--without-debug &nbsp; &nbsp; &nbsp; &nbsp; Build without debugging code (default)],
+ &nbsp; &nbsp;[with_debug=$withval],
+ &nbsp; &nbsp;[with_debug=no])
+
+dnl Build optimized or debug version ?
+dnl First check for gcc and g++
+if test &quot;$ac_cv_prog_gcc&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;DEBUG_CFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CC=&quot;-O&quot;
+ &nbsp; &nbsp;OPTIMIZE_CFLAGS=&quot;$MAX_C_OPTIMIZE&quot;
+else
+ &nbsp; &nbsp;DEBUG_CFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CC=&quot;&quot;
+ &nbsp; &nbsp;OPTIMIZE_CFLAGS=&quot;-O&quot;
+fi
+
+if test &quot;$ac_cv_prog_cxx_g&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;DEBUG_CXXFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CXX=&quot;-O&quot;
+ &nbsp; &nbsp;OPTIMIZE_CXXFLAGS=&quot;-O3&quot;
+ &nbsp; &nbsp;OPTIMIZE_INLINE_CXXFLAGS=&quot;-finline-functions&quot;
+else
+ &nbsp; &nbsp;DEBUG_CXXFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CXX=&quot;&quot;
+ &nbsp; &nbsp;OPTIMIZE_CXXFLAGS=&quot;-O&quot;
+ &nbsp; &nbsp;OPTIMIZE_INLINE_CXXFLAGS=&quot;&quot;
+fi
+
+if test &quot;$with_debug&quot; = &quot;yes&quot; -o &quot;$with_debug&quot; = &quot;medium&quot;
+then
+ &nbsp; &nbsp;dnl Medium debug. Inline optimization
+ &nbsp; &nbsp;CFLAGS=&quot;$DEBUG_CFLAGS $OPTIMIZE_INLINE_CFLAGS $NL_DEBUG $NL_DEBUG_FAST $CFLAGS&quot;
+ &nbsp; &nbsp;CXXFLAGS=&quot;$DEBUG_CXXFLAGS $OPTIMIZE_INLINE_CXXFLAGS $NL_DEBUG $NL_DEBUG_FAST $CXXFLAGS&quot;
+else
+ &nbsp; &nbsp;if test &quot;$with_debug&quot; = &quot;full&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;dnl Full debug. Very slow in some cases
+ &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$DEBUG_CFLAGS $NL_DEBUG $STL_DEBUG $CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$DEBUG_CXXFLAGS $NL_DEBUG $STL_DEBUG $CXXFLAGS&quot;
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$with_debug&quot; = &quot;fast&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dnl Fast debug.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC $OPTIMIZE_INLINE_CFLAGS $NL_DEBUG $CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX $OPTIMIZE_INLINE_CXXFLAGS $NL_DEBUG $CXXFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dnl Optimized version. No debug
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$OPTIMIZE_CFLAGS $NL_RELEASE $CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$OPTIMIZE_CXXFLAGS $NL_RELEASE $CXXFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;fi
+fi
+
+dnl AC_MSG_RESULT([CFLAGS = $CFLAGS])
+dnl AC_MSG_RESULT([CXXGLAGS = $CXXFLAGS])
+
+])
+
+
+# =========================================================================
+# MY_NEL_HEADER_CHK : NeL header files checking macros
+
+AC_DEFUN(MY_NEL_HEADER_CHK,
+[ AC_REQUIRE_CPP()
+
+chk_message_obj=&quot;$1&quot;
+header=&quot;$2&quot;
+macro=&quot;$3&quot;
+is_mandatory=&quot;$4&quot;
+
+if test $is_mandatory = &quot;yes&quot;
+then
+
+ &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $NEL_CFLAGS&quot;
+
+ &nbsp; &nbsp;AC_MSG_CHECKING(for $header)
+
+ &nbsp; &nbsp;AC_EGREP_CPP( yo_header,
+[#include &lt;$header&gt;
+#ifdef $macro
+ &nbsp; yo_header
+#endif],
+ &nbsp;have_header=&quot;yes&quot;,
+ &nbsp;have_header=&quot;no&quot;)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+ &nbsp; &nbsp;if test &quot;$have_header&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$is_mandatory&quot; = &quot;yes&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([$chk_message_obj must be installed (<A HREF="http://www.nevrax.org">http://www.nevrax.org</A>).])
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no)
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;fi
+fi
+
+ &nbsp; &nbsp; &nbsp; &nbsp;
+])
+
+
+# =========================================================================
+# MY_NEL_LIB_CHK : NeL library checking macros
+
+AC_DEFUN(MY_NEL_LIB_CHK,
+[ AC_REQUIRE_CPP()
+
+chk_message_obj=&quot;$1&quot;
+nel_test_lib=&quot;$2&quot;
+is_mandatory=&quot;$3&quot;
+
+if test $is_mandatory = &quot;yes&quot;
+then
+
+ &nbsp; &nbsp;AC_CHECK_LIB($nel_test_lib, main,,[AC_MSG_ERROR([$chk_message_obj must be installed (<A HREF="http://www.nevrax.org">http://www.nevrax.org</A>).])])
+fi
+])
+
+
+# =========================================================================
+# AM_PATH_NEL : NeL checking macros
+AC_DEFUN(AM_PATH_NEL,
+[ AC_REQUIRE_CPP()
+
+AC_ARG_WITH( nel,
+ &nbsp; &nbsp;[ &nbsp;--with-nel=&lt;path&gt; &nbsp; &nbsp; &nbsp; path to the NeL install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/nel])
+
+AC_ARG_WITH( nel-include,
+ &nbsp; &nbsp;[ &nbsp;--with-nel-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the NeL header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/nel/include])
+
+AC_ARG_WITH( nel-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-nel-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the NeL library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/nel/lib])
+
+
+nelmisc_is_mandatory=&quot;$1&quot;
+nelnet_is_mandatory=&quot;$2&quot;
+nel3d_is_mandatory=&quot;$3&quot;
+nelpacs_is_mandatory=&quot;$4&quot;
+nelsound_is_mandatory=&quot;$5&quot;
+nelai_is_mandatory=&quot;$6&quot;
+nelgeorges_is_mandatory=&quot;$7&quot;
+
+dnl Check for nel-config
+AC_PATH_PROG(NEL_CONFIG, nel-config, no)
+
+dnl
+dnl Configure options (--with-nel*) have precendence
+dnl over nel-config only set variables if they are not
+dnl specified
+dnl
+if test &quot;$NEL_CONFIG&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;if test -z &quot;$with_nel&quot; -a -z &quot;$with_nel_include&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS `nel-config --cflags`&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test -z &quot;$with_nel&quot; -a -z &quot;$with_nel_lib&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;LDFLAGS=&quot;`nel-config --ldflags` $LDFLAGS&quot;
+ &nbsp; &nbsp;fi
+fi
+
+dnl
+dnl Set nel_libraries and nel_includes according to
+dnl user specification (--with-nel*) if any.
+dnl --with-nel-include and --with-nel-lib have precendence
+dnl over --with-nel
+dnl
+if test &quot;$with_nel&quot; = &quot;no&quot;
+then
+ &nbsp; &nbsp;dnl The user explicitly disabled the use of the NeL
+ &nbsp; &nbsp;AC_MSG_ERROR([NeL is mandatory: do not specify --without-nel])
+else
+ &nbsp; &nbsp;if test &quot;$with_nel&quot; -a &quot;$with_nel&quot; != &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;nel_includes=&quot;$with_nel/include&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;nel_libraries=&quot;$with_nel/lib&quot;
+ &nbsp; &nbsp;fi
+fi
+
+if test &quot;$with_nel_include&quot;
+then
+ &nbsp; &nbsp;nel_includes=&quot;$with_nel_include&quot;
+fi
+
+if test &quot;$with_nel_lib&quot;
+then
+ &nbsp; &nbsp;nel_libraries=&quot;$with_nel_lib&quot;
+fi
+
+dnl
+dnl Set compilation variables
+dnl
+if test &quot;$nel_includes&quot;
+then
+ &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS -I$nel_includes&quot;
+fi
+
+if test &quot;$nel_libraries&quot;
+then
+ &nbsp; &nbsp;LDFLAGS=&quot;-L$nel_libraries $LDFLAGS&quot;
+fi
+
+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 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 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 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
+
+MY_NEL_LIB_CHK([NeL Misc], [nelmisc], $nelmisc_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)
+
+])
+
+
+# =========================================================================
+# AM_PATH_STLPORT : STLPort checking macros
+
+AC_DEFUN(AM_PATH_STLPORT,
+[ AC_REQUIRE_CPP()
+
+AC_ARG_WITH( stlport,
+ &nbsp; &nbsp;[ &nbsp;--with-stlport=&lt;path&gt; &nbsp; path to the STLPort install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport])
+
+AC_ARG_WITH( stlport-include,
+ &nbsp; &nbsp;[ &nbsp;--with-stlport-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the STLPort header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport/stlport])
+
+AC_ARG_WITH( stlport-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-stlport-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the STLPort library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport/lib])
+
+if test &quot;$with_debug&quot; = &quot;full&quot;
+then
+ stlport_lib=&quot;stlport_gcc_stldebug&quot;
+else
+ stlport_lib=&quot;stlport_gcc&quot;
+fi
+
+if test &quot;$with_stlport&quot; = no
+then
+ &nbsp; &nbsp;dnl The user explicitly disabled the use of the STLPorts
+ &nbsp; &nbsp;AC_MSG_ERROR([STLPort is mandatory: do not specify --without-stlport])
+else
+ &nbsp; &nbsp;stlport_includes=&quot;/usr/include/stlport&quot;
+ &nbsp; &nbsp;if test &quot;$with_stlport&quot; -a &quot;$with_stlport&quot; != yes
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;stlport_includes=&quot;$with_stlport/stlport&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;stlport_libraries=&quot;$with_stlport/lib&quot;
+
+ &nbsp; &nbsp; &nbsp; &nbsp;if test ! -d &quot;$stlport_includes&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;stlport_includes=&quot;$with_stlport/include/stlport&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;fi
+fi
+
+if test &quot;$with_stlport_include&quot;
+then
+ &nbsp; &nbsp;stlport_includes=&quot;$with_stlport_include&quot;
+fi
+
+if test &quot;$with_stlport_lib&quot;
+then
+ &nbsp; &nbsp;stlport_libraries=&quot;$with_stlport_lib&quot;
+fi
+
+dnl Check for the 'pthread' library. SLTPort needs it.
+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
+if test &quot;$stlport_includes&quot;
+then
+ &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS -I$stlport_includes&quot;
+fi
+
+dnl Put STLPorts libraries directory in LIBS
+if test &quot;$stlport_libraries&quot;
+then
+ &nbsp; &nbsp;LIBS=&quot;-L$stlport_libraries $LIBS&quot;
+else
+ &nbsp; &nbsp;stlport_libraries='default'
+fi
+
+dnl Test the headers
+
+AC_CHECK_HEADER(algorithm,
+ &nbsp; &nbsp;have_stlport_headers=&quot;yes&quot;,
+ &nbsp; &nbsp;have_stlport_headers=&quot;no&quot; )
+
+AC_MSG_CHECKING(for STLPort headers)
+
+if test &quot;$have_stlport_headers&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT([$stlport_includes])
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+AC_CHECK_LIB($stlport_lib, main,, have_stlport_libraries=&quot;no&quot;)
+
+AC_MSG_CHECKING(for STLPort library)
+
+if test &quot;$have_stlport_libraries&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT([$stlport_libraries])
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+if test &quot;$have_stlport_headers&quot; = &quot;yes&quot; &amp;&amp;
+ &nbsp; &nbsp;test &quot;$have_stlport_libraries&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;have_stlport=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_stlport=&quot;no&quot;
+fi
+
+if test &quot;$have_stlport&quot; = &quot;no&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([STLPort must be installed (<A HREF="http://www.stlport.org">http://www.stlport.org</A>).])
+fi
+
+AC_LANG_RESTORE
+
+])
+
+
+# =========================================================================
+# AM_PATH_OPENGL : OpenGL checking macros
+
+AC_DEFUN(AM_PATH_OPENGL,
+[ AC_MSG_CHECKING(for OpenGL headers and GL Version &gt;= 1.2)
+
+is_mandatory=&quot;$1&quot;
+
+AC_REQUIRE_CPP()
+
+AC_ARG_WITH( opengl,
+ &nbsp; &nbsp;[ &nbsp;--with-opengl=&lt;path&gt; &nbsp; &nbsp;path to the OpenGL install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local])
+
+AC_ARG_WITH( opengl-include,
+ &nbsp; &nbsp;[ &nbsp;--with-opengl-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenGL header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/include])
+
+AC_ARG_WITH( opengl-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-opengl-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenGL library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/lib])
+
+opengl_lib=&quot;GL&quot;
+
+if test &quot;$with_opengl&quot;
+then
+ &nbsp; &nbsp;opengl_includes=&quot;$with_opengl/include&quot;
+ &nbsp; &nbsp;opengl_libraries=&quot;$with_opengl/lib&quot;
+fi
+
+if test &quot;$with_opengl_include&quot;
+then
+ &nbsp; &nbsp;opengl_includes=&quot;$with_opengl_include&quot;
+fi
+
+if test &quot;$with_opengl_lib&quot;
+then
+ &nbsp; &nbsp;opengl_libraries=&quot;$with_opengl_lib&quot;
+fi
+
+dnl Set OPENGL_CFLAGS
+if test &quot;$opengl_includes&quot;
+then
+ &nbsp; &nbsp;OPENGL_CFLAGS=&quot;-I$opengl_includes&quot;
+fi
+
+dnl Set OPENGL_LIBS
+if test &quot;$opengl_libraries&quot;
+then
+ &nbsp; &nbsp;OPENGL_LIBS=&quot;-L$opengl_libraries&quot;
+fi
+OPENGL_LIBS=&quot;$OPENGL_LIBS -l$opengl_lib&quot;
+
+dnl Test the headers
+_CPPFLAGS=&quot;$CPPFLAGS&quot;
+
+CPPFLAGS=&quot;$CXXFLAGS $OPENGL_CFLAGS&quot;
+
+AC_EGREP_CPP( yo_opengl,
+[#include &lt;GL/gl.h&gt; &nbsp; &nbsp; &nbsp;
+#if defined(GL_VERSION_1_2)
+ &nbsp; yo_opengl
+#endif],
+ &nbsp;have_opengl_headers=&quot;yes&quot;,
+ &nbsp;have_opengl_headers=&quot;no&quot; )
+
+if test &quot;$have_opengl_headers&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$opengl_includes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$opengl_includes])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+dnl Checking the GLEXT version &gt;= 7
+AC_MSG_CHECKING(for &lt;GL/glext.h&gt; and GLEXT version &gt;= 7)
+
+AC_EGREP_CPP( yo_glext_version,
+[#include &lt;GL/glext.h&gt;
+#ifdef GL_GLEXT_VERSION
+#if GL_GLEXT_VERSION &gt;= 7
+ &nbsp; yo_glext_version
+#endif
+#endif],
+ &nbsp;have_glext=&quot;yes&quot;,
+ &nbsp;have_glext=&quot;no&quot; )
+
+if test &quot;$have_glext&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT(yes)
+else
+ &nbsp; &nbsp;AC_MSG_RESULT([no, &lt;GL/glext.h&gt; can be downloaded from <A HREF="http://oss.sgi.com/projects/ogl-sample/ABI/">http://oss.sgi.com/projects/ogl-sample/ABI/</A>])
+fi
+ &nbsp; &nbsp;
+dnl Test the libraries
+AC_MSG_CHECKING(for OpenGL libraries)
+
+CPPFLAGS=&quot;$CXXFLAGS $OPENGL_LIBS&quot;
+
+AC_TRY_LINK( , , have_opengl_libraries=&quot;yes&quot;, have_opengl_libraries=&quot;no&quot;)
+
+CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+if test &quot;$have_opengl_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$opengl_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$opengl_libraries])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+opengl_libraries=&quot;$opengl_libraries&quot;
+
+if test &quot;$have_opengl_headers&quot; = &quot;yes&quot; \
+ &nbsp; &nbsp; &nbsp; &nbsp;-a &quot;$have_glext&quot; = &quot;yes&quot; \
+ &nbsp; &nbsp; &nbsp; &nbsp;-a &quot;$have_opengl_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;have_opengl=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_opengl=&quot;no&quot;
+fi
+
+if test &quot;$have_opengl&quot; = &quot;no&quot; -a &quot;$is_mandatory&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([OpenGL &gt;= 1.2 must be installed (<A HREF="http://www.mesa3d.org">http://www.mesa3d.org</A>)])
+fi
+
+AC_SUBST(OPENGL_CFLAGS)
+AC_SUBST(OPENGL_LIBS)
+
+])
+
+
+# =========================================================================
+# AM_PATH_FREETYPE : FreeType checking macros
+
+AC_DEFUN(AM_PATH_FREETYPE,
+[ is_mandatory=&quot;$1&quot;
+
+AC_REQUIRE_CPP()
+
+AC_ARG_WITH( freetype,
+ &nbsp; &nbsp;[ &nbsp;--with-freetype=&lt;path&gt; &nbsp; path to the FreeType install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/freetype])
+
+AC_ARG_WITH( freetype-include,
+ &nbsp; &nbsp;[ &nbsp;--with-freetype-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the FreeType header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/freetype/include])
+
+AC_ARG_WITH( freetype-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-freetype-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the FreeType library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/freetype/lib])
+
+freetype_lib=&quot;freetype&quot;
+
+
+AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
+ &nbsp;
+if test &quot;$FREETYPE_CONFIG&quot; = &quot;no&quot;
+then
+ &nbsp; &nbsp;have_freetype_config=&quot;no&quot;
+else
+ &nbsp; &nbsp;FREETYPE_CFLAGS=`freetype-config --cflags`
+ &nbsp; &nbsp;FREETYPE_LIBS=`freetype-config --libs`
+ &nbsp; &nbsp;have_freetype_config=&quot;yes&quot;
+fi
+
+if test &quot;$with_freetype&quot;
+then
+ &nbsp; &nbsp;freetype_includes=&quot;$with_freetype/include&quot;
+ &nbsp; &nbsp;freetype_libraries=&quot;$with_freetype/lib&quot;
+fi
+
+if test &quot;$with_freetype_include&quot;
+then
+ &nbsp; &nbsp;freetype_includes=&quot;$with_freetype_include&quot;
+fi
+
+if test &quot;$with_freetype_lib&quot;
+then
+ &nbsp; &nbsp;freetype_libraries=&quot;$with_freetype_lib&quot;
+fi
+
+if test &quot;$freetype_includes&quot;
+then
+ &nbsp; &nbsp;FREETYPE_CFLAGS=&quot;-I$freetype_includes&quot;
+fi
+
+dnl Checking the FreeType 2 instalation
+_CPPFLAGS=&quot;$CPPFLAGS&quot;
+CPPFLAGS=&quot; $FREETYPE_CFLAGS $CXXFLAGS&quot;
+
+AC_MSG_CHECKING(for FreeType version = 2)
+
+AC_EGREP_CPP( yo_freetype2,
+[#include &lt;freetype/freetype.h&gt;
+#if FREETYPE_MAJOR == 2
+ &nbsp; yo_freetype2
+#endif],
+ &nbsp;have_freetype2=&quot;yes&quot;,
+ &nbsp;have_freetype2=&quot;no&quot;)
+
+if test &quot;$have_freetype2&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT(yes)
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+ &nbsp; &nbsp;
+dnl Test the libraries
+AC_MSG_CHECKING(for FreeType libraries)
+ &nbsp; &nbsp; &nbsp; &nbsp;
+if test $freetype_libraries
+then
+ &nbsp; &nbsp;FREETYPE_LIBS=&quot;-L$freetype_libraries -l$freetype_lib&quot;
+fi
+
+CPPFLAGS=&quot;$FREETYPE_LIBS $CXXFLAGS&quot;
+ &nbsp; &nbsp;
+AC_TRY_LINK( , , have_freetype_libraries=&quot;yes&quot;, have_freetype_libraries=&quot;no&quot;)
+
+CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+if test &quot;$have_freetype_libraries&quot; = &quot;yes&quot;
+then &nbsp; &nbsp;
+ &nbsp; &nbsp;if test &quot;$freetype_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$freetype_libraries])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+if test &quot;$have_freetype2&quot; = &quot;yes&quot; &amp;&amp; test &quot;$have_freetype_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;have_freetype=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_freetype=&quot;no&quot;
+fi
+
+if test &quot;$have_freetype&quot; = &quot;no&quot; &amp;&amp; test &quot;$is_mandatory&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([FreeType 2 must be installed (<A HREF="http://freetype.sourceforge.net">http://freetype.sourceforge.net</A>)])
+fi
+
+AC_SUBST(FREETYPE_CFLAGS)
+AC_SUBST(FREETYPE_LIBS)
+
+])
+
+
+# =========================================================================
+# AM_PATH_XF86VIDMODE : XF86VidMode checking macros
+
+AC_DEFUN(AM_PATH_XF86VIDMODE,
+[ AC_MSG_CHECKING(for XF86VidMode extension)
+
+AC_REQUIRE_CPP()
+
+AC_ARG_WITH( xf86vidmode-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-xf86vidmode-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the XF86VidMode library.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/X11R6/lib] )
+
+xf86vidmode_lib=&quot;Xxf86vm&quot;
+
+if test &quot;$with_xf86vidmode_lib&quot; = no
+then
+ &nbsp; &nbsp;dnl The user explicitly disabled the use of XF86VidMode
+ &nbsp; &nbsp;have_xf86vidmode=&quot;disabled&quot;
+ &nbsp; &nbsp;AC_MSG_RESULT(disabled)
+else
+ &nbsp; &nbsp;if test &quot;$with_xf86vidmode_lib&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;xf86vidmode_libraries=&quot;$with_xf86vidmode_lib&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;XF86VIDMODE_CFLAGS=&quot;-DXF86VIDMODE&quot;
+fi
+
+if test -z &quot;$have_xf86vidmode&quot;
+dnl -a &quot;$with_xf86vidmode_lib&quot;
+then
+ &nbsp; &nbsp;if test &quot;$xf86vidmode_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;XF86VIDMODE_LIBS=&quot;-L$xf86vidmode_libraries&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;XF86VIDMODE_LIBS=&quot;$XF86VIDMODE_LIBS -l$xf86vidmode_lib&quot;
+
+ &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $XF86VIDMODE_LIBS&quot;
+
+ &nbsp; &nbsp;AC_TRY_LINK( , , have_xf86vidmode_libraries=&quot;yes&quot;, have_xf86vidmode_libraries=&quot;no&quot;)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+ &nbsp; &nbsp;if test &quot;$have_xf86vidmode_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;have_xf86vidmode=&quot;yes&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$xf86vidmode_libraries&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT($xf86vidmode_libraries)
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;have_xf86vidmode=&quot;no&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no, no fullscreen support available.)
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;xf86vidmode_libraries=&quot;$xf86vidmode_libraries&quot;
+
+fi
+
+AC_SUBST(XF86VIDMODE_CFLAGS)
+AC_SUBST(XF86VIDMODE_LIBS)
+
+])
+
+
+# =========================================================================
+# AM_PATH_OPENAL : OpenAL checking macros
+
+AC_DEFUN(AM_PATH_OPENAL,
+[ is_mandatory=&quot;$1&quot;
+
+AC_REQUIRE_CPP()
+
+dnl Get from the user option the path to the OpenAL files location
+AC_ARG_WITH( openal,
+ &nbsp; &nbsp;[ &nbsp;--with-openal=&lt;path&gt; &nbsp; path to the OpenAL install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local])
+
+AC_ARG_WITH( openal-include,
+ &nbsp; &nbsp;[ &nbsp;--with-openal-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenAL header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/include])
+
+AC_ARG_WITH( openal-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-openal-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenAL library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/lib])
+
+openal_lib=&quot;openal&quot;
+
+if test $with_openal
+then
+ &nbsp; &nbsp;openal_includes=&quot;$with_openal/include&quot;
+ &nbsp; &nbsp;openal_libraries=&quot;$with_openal/lib&quot;
+fi
+
+if test &quot;$with_openal_include&quot;
+then
+ &nbsp; &nbsp;openal_includes=&quot;$with_openal_include&quot;
+fi
+
+if test &quot;$with_openal_lib&quot;
+then
+ &nbsp; &nbsp;openal_libraries=&quot;$with_openal_lib&quot;
+fi
+
+
+dnl Set OPENAL_CFLAGS
+if test &quot;$openal_includes&quot;
+then
+ &nbsp; &nbsp;OPENAL_CFLAGS=&quot;-I$openal_includes&quot;
+fi
+
+dnl Set OPENAL_LIBS
+if test &quot;$openal_libraries&quot;
+then
+ &nbsp; &nbsp;OPENAL_LIBS=&quot;-L$openal_libraries&quot;
+fi
+OPENAL_LIBS=&quot;$OPENAL_LIBS -l$openal_lib&quot;
+
+_CPPFLAGS=&quot;$CPPFLAGS&quot;
+CPPFLAGS=&quot;$CXXFLAGS $OPENAL_CFLAGS&quot;
+
+AC_MSG_CHECKING(for OpenAL headers)
+AC_EGREP_CPP( yo_openal,
+[#include &lt;AL/altypes.h&gt;
+#ifdef AL_VERSION
+ &nbsp; yo_openal
+#endif],
+ &nbsp;have_openal_headers=&quot;yes&quot;,
+ &nbsp;have_openal_headers=&quot;no&quot; )
+
+if test &quot;$have_openal_headers&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$openal_includes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$openal_includes])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+dnl Test the libraries
+AC_MSG_CHECKING(for OpenAL libraries)
+
+CPPFLAGS=&quot;$CXXFLAGS $OPENAL_LIBS&quot;
+
+AC_TRY_LINK( , , have_openal_libraries=&quot;yes&quot;, have_openal_libraries=&quot;no&quot;)
+
+CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+if test &quot;$have_openal_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$openal_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$openal_libraries])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+openal_libraries=&quot;$openal_libraries&quot;
+
+if test &quot;$have_openal_headers&quot; = &quot;yes&quot; \
+ &nbsp; &amp;&amp; test &quot;$have_openal_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;have_openal=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_openal=&quot;no&quot;
+fi
+
+if test &quot;$have_openal&quot; = &quot;no&quot; -a &quot;$is_mandatory&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([OpenAL is needed to compile NeL (<A HREF="http://www.openal.org">http://www.openal.org</A>).])
+fi
+
+AC_SUBST(OPENAL_CFLAGS)
+AC_SUBST(OPENAL_LIBS)
+
+
+])
+
+
+# =========================================================================
+# AM_PATH_PYTHON : Python checking macros
+
+AC_DEFUN(AM_PATH_PYTHON,
+[ python_version_required=&quot;$1&quot;
+
+is_mandatory=&quot;$2&quot;
+
+AC_REQUIRE_CPP()
+
+dnl Get from the user option the path to the Python files location
+AC_ARG_WITH( python,
+ &nbsp; &nbsp;[ &nbsp;--with-python=&lt;path&gt; &nbsp; &nbsp;path to the Python prefix installation directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local],
+ &nbsp; &nbsp;[ PYTHON_PREFIX=$with_python ]
+)
+
+AC_ARG_WITH( python-version,
+ &nbsp; &nbsp;[ &nbsp;--with-python-version=&lt;version&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Python version to use, e.g. 1.5],
+ &nbsp; &nbsp;[ PYTHON_VERSION=$with_python_version ]
+)
+
+if test ! &quot;$PYTHON_PREFIX&quot; = &quot;&quot;
+then
+ &nbsp; &nbsp;PATH=&quot;$PYTHON_PREFIX/bin:$PATH&quot;
+fi
+
+if test ! &quot;$PYTHON_VERSION&quot; = &quot;&quot;
+then
+ &nbsp; &nbsp;PYTHON_EXEC=&quot;python$PYTHON_VERSION&quot;
+else
+ &nbsp; &nbsp;PYTHON_EXEC=&quot;python python2.1 python2.0 python1.5&quot;
+fi
+
+AC_PATH_PROGS(PYTHON, $PYTHON_EXEC, no, $PATH)
+
+if test &quot;$PYTHON&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;PYTHON_PREFIX=`$PYTHON -c 'import sys; print &quot;%s&quot; % (sys.prefix)'`
+ &nbsp; &nbsp;PYTHON_VERSION=`$PYTHON -c 'import sys; print &quot;%s&quot; % (sys.version[[:3]])'`
+
+ &nbsp; &nbsp;is_python_version_enough=`expr $python_version_required \&lt;= $PYTHON_VERSION`
+fi
+
+
+if test &quot;$PYTHON&quot; = &quot;no&quot; || test &quot;$is_python_version_enough&quot; != &quot;1&quot;
+then
+
+ &nbsp; &nbsp;if test &quot;$is_mandatory&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([Python $python_version_required must be installed (<A HREF="http://www.python.org">http://www.python.org</A>)])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;have_python=&quot;no&quot;
+ &nbsp; &nbsp;fi
+
+else
+
+ &nbsp; &nbsp;python_includes=&quot;$PYTHON_PREFIX/include/python$PYTHON_VERSION&quot;
+ &nbsp; &nbsp;python_libraries=&quot;$PYTHON_PREFIX/lib/python$PYTHON_VERSION/config&quot;
+ &nbsp; &nbsp;python_lib=&quot;python$PYTHON_VERSION&quot;
+
+ &nbsp; &nbsp;PYTHON_CFLAGS=&quot;-I$python_includes&quot;
+ &nbsp; &nbsp;PYTHON_LIBS=&quot;-L$python_libraries -l$python_lib&quot;
+
+ &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS ${PYTHON_CFLAGS}&quot;
+
+ &nbsp; &nbsp;dnl Test the headers
+ &nbsp; &nbsp;AC_MSG_CHECKING(for Python headers)
+
+ &nbsp; &nbsp;AC_EGREP_CPP( yo_python,
+ &nbsp; &nbsp;[#include &lt;Python.h&gt;
+ &nbsp; yo_python
+ &nbsp; &nbsp;],
+ &nbsp; &nbsp; &nbsp;have_python_headers=&quot;yes&quot;,
+ &nbsp; &nbsp; &nbsp;have_python_headers=&quot;no&quot; )
+
+ &nbsp; &nbsp;if test &quot;$have_python_headers&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$python_includes])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no)
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;dnl Test the libraries
+ &nbsp; &nbsp;AC_MSG_CHECKING(for Python libraries)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $PYTHON_CFLAGS&quot;
+
+ &nbsp; &nbsp;AC_TRY_LINK( , , have_python_libraries=&quot;yes&quot;, have_python_libraries=&quot;no&quot;)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+ &nbsp; &nbsp;if test &quot;$have_python_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$python_libraries&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$python_libraries])
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no)
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test &quot;$have_python_headers&quot; = &quot;yes&quot; \
+ &nbsp; &nbsp; &nbsp; &amp;&amp; test &quot;$have_python_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;have_python=&quot;yes&quot;
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;have_python=&quot;no&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test &quot;$have_python&quot; = &quot;no&quot; -a &quot;$is_mandatory&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([Python is needed to compile NeL (<A HREF="http://www.python.org">http://www.python.org</A>).])
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;AC_SUBST(PYTHON_CFLAGS)
+ &nbsp; &nbsp;AC_SUBST(PYTHON_LIBS)
+
+fi
+
+])
+
+
+# =========================================================================
+# AM_PATH_CCACHE : Ccache checking macros
+
+AC_DEFUN(AM_PATH_CCACHE,
+[
+
+AC_ARG_WITH( ccache,
+ &nbsp; &nbsp;[ &nbsp;--with-ccache &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; use ccache for compiling.],
+ &nbsp; &nbsp;[ using_ccache=$with_ccache ]
+)
+
+AC_PATH_PROG(CCACHE, ccache)
+if test &quot;$CCACHE&quot; -a &quot;$using_ccache&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;CC=&quot;ccache $CC&quot;
+ &nbsp; &nbsp;CXX=&quot;ccache $CXX&quot;
+fi
+
+])
+
+
+dnl =========================================================================
+dnl End of file
+
+</PRE> \ No newline at end of file
diff --git a/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup&sortby=author&only_with_tag=georges_v2/index.html b/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup&sortby=author&only_with_tag=georges_v2/index.html
new file mode 100644
index 00000000..5d335d00
--- /dev/null
+++ b/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup&sortby=author&only_with_tag=georges_v2/index.html
@@ -0,0 +1,1093 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
+<HEAD><style> A { color:black }</style>
+<!-- hennerik CVSweb $Revision: 1.93 $ -->
+<TITLE>code/nelns/acinclude.m4 - view - 1.14</TITLE></HEAD>
+<BODY BGCOLOR="#eeeeee">
+<table width="100%" border=0 cellspacing=0 cellpadding=1 bgcolor="#aaaaaa"><tr valign=bottom><td><a href="acinclude.m4?sortby=author&amp;only_with_tag=georges_v2"><IMG SRC="http://www.nevrax.org/inc/img/picto-up.gif" ALT="[BACK]" BORDER="0" WIDTH="14" HEIGHT="13"></a> <b>Return to <A HREF="acinclude.m4?sortby=author&amp;only_with_tag=georges_v2">acinclude.m4</A>
+ CVS log</b> <IMG SRC="http://www.nevrax.org/inc/img/picto-news.gif" ALT="[TXT]" BORDER="0" WIDTH="13" HEIGHT="15"></td><td align=right><IMG SRC="http://www.nevrax.org/inc/img/picto-dir.gif" ALT="[DIR]" BORDER="0" WIDTH="15" HEIGHT="13"> <b>Up to <a href="/cvs/cvsweb.cgi/?sortby=author&amp;only_with_tag=georges_v2">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/?sortby=author&amp;only_with_tag=georges_v2">code</a> / <a href="/cvs/cvsweb.cgi/code/nelns/?sortby=author&amp;only_with_tag=georges_v2">nelns</a></b></td></tr></table><HR noshade><table width="100%"><tr><td bgcolor="#ffffff">File: <a href="/cvs/cvsweb.cgi/?sortby=author&amp;only_with_tag=georges_v2">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/?sortby=author&amp;only_with_tag=georges_v2">code</a> / <a href="/cvs/cvsweb.cgi/code/nelns/?sortby=author&amp;only_with_tag=georges_v2">nelns</a> / <a href="/cvs/cvsweb.cgi/code/nelns/acinclude.m4?sortby=author&amp;only_with_tag=georges_v2">acinclude.m4</a>&nbsp;(<A HREF="/cvs/cvsweb.cgi/~checkout~/code/nelns/acinclude.m4?rev=1.14&amp;sortby=author&amp;only_with_tag=georges_v2" target="cvs_checkout" onClick="window.open('/cvs/cvsweb.cgi/~checkout~/code/nelns/acinclude.m4?rev=1.14','cvs_checkout','resizeable,scrollbars');"><b>download</b></A>)<BR>
+Revision <B>1.14</B>, <i>Thu Apr 25 17:52:16 2002 UTC</i> (3 months ago) by <i>valignat</i>
+<BR>Branch: <b>MAIN</b>
+<BR>CVS Tags: <b>georges_v2, HEAD</b><BR>Changes since <b>1.13: +4 -1
+ lines</b><PRE>
+Added check on the 'pthread' library. SLTPort needs it.
+</PRE>
+</td></tr></table><HR noshade><PRE>dnl =========================================================================
+dnl
+dnl Macros used by Nevrax in configure.in files.
+dnl
+dnl $Id: acinclude.m4,v 1.14 2002/04/25 17:52:16 valignat Exp $
+dnl
+dnl =========================================================================
+
+dnl =========================================================================
+dnl WARNING: The original version of this file is placed in the $CVSROOT/code
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;directory.
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;There is links in the $CVSROOT/code sub-directories to that file
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(ex: $CVSROOT/code/nel), so be careful of the consequences of
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;any modification of that file.
+dnl =========================================================================
+
+dnl =========================================================================
+dnl Macros available in that file.
+dnl
+dnl
+dnl AM_NEL_DEBUG
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: manage the different debug and the release mode by setting
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; correctly the CFLAGS and CXXFLAGS variables.
+dnl
+dnl
+dnl AM_PATH_NEL
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the NeL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CXXFLAGS and LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_STLPORT
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the STLPort library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CXXFLAGS and LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_OPENGL
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the OpenGL library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OPENGL_CFLAGS and OPENGL_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_FREETYPE
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the Freetype library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FREETYPE_CFLAGS and FREETYPE_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_XF86VIDMODE
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; XF86VIDMODE_CFLAGS and XF86VIDMODE_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_OPENAL
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the OpenAL library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OPENAL_CFLAGS and OPENAL_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_PYTHON
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the Python library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PYTHON_CFLAGS and PYTHON_LIBS variables to use it.
+dnl
+dnl AM_PATH_CCACHE
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the Ccache utility.
+dnl
+dnl =========================================================================
+
+
+# =========================================================================
+# AM_NEL_DEBUG
+
+AC_DEFUN(AM_NEL_DEBUG,
+[
+
+MAX_C_OPTIMIZE=&quot;-O6&quot;
+
+STL_DEBUG=&quot;-D__STL_DEBUG&quot;
+
+NL_DEBUG=&quot;-DNL_DEBUG&quot;
+NL_DEBUG_FAST=&quot;-DNL_DEBUG_FAST&quot;
+NL_RELEASE_DEBUG=&quot;-DNL_RELEASE_DEBUG&quot;
+NL_RELEASE=&quot;-DNL_RELEASE&quot;
+
+AC_ARG_WITH(debug,
+ &nbsp; &nbsp;[ &nbsp;--with-debug[=full|medium|fast]
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Build a debug version (huge libraries).
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Full mode set only NeL and STL debug flags.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Medium mode set NeL debug flags with inline
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;optimization (default mode).
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Fast mode is like the Medium mode with some basic
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;optimization.
+ &nbsp;--without-debug &nbsp; &nbsp; &nbsp; &nbsp; Build without debugging code (default)],
+ &nbsp; &nbsp;[with_debug=$withval],
+ &nbsp; &nbsp;[with_debug=no])
+
+dnl Build optimized or debug version ?
+dnl First check for gcc and g++
+if test &quot;$ac_cv_prog_gcc&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;DEBUG_CFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CC=&quot;-O&quot;
+ &nbsp; &nbsp;OPTIMIZE_CFLAGS=&quot;$MAX_C_OPTIMIZE&quot;
+else
+ &nbsp; &nbsp;DEBUG_CFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CC=&quot;&quot;
+ &nbsp; &nbsp;OPTIMIZE_CFLAGS=&quot;-O&quot;
+fi
+
+if test &quot;$ac_cv_prog_cxx_g&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;DEBUG_CXXFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CXX=&quot;-O&quot;
+ &nbsp; &nbsp;OPTIMIZE_CXXFLAGS=&quot;-O3&quot;
+ &nbsp; &nbsp;OPTIMIZE_INLINE_CXXFLAGS=&quot;-finline-functions&quot;
+else
+ &nbsp; &nbsp;DEBUG_CXXFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CXX=&quot;&quot;
+ &nbsp; &nbsp;OPTIMIZE_CXXFLAGS=&quot;-O&quot;
+ &nbsp; &nbsp;OPTIMIZE_INLINE_CXXFLAGS=&quot;&quot;
+fi
+
+if test &quot;$with_debug&quot; = &quot;yes&quot; -o &quot;$with_debug&quot; = &quot;medium&quot;
+then
+ &nbsp; &nbsp;dnl Medium debug. Inline optimization
+ &nbsp; &nbsp;CFLAGS=&quot;$DEBUG_CFLAGS $OPTIMIZE_INLINE_CFLAGS $NL_DEBUG $NL_DEBUG_FAST $CFLAGS&quot;
+ &nbsp; &nbsp;CXXFLAGS=&quot;$DEBUG_CXXFLAGS $OPTIMIZE_INLINE_CXXFLAGS $NL_DEBUG $NL_DEBUG_FAST $CXXFLAGS&quot;
+else
+ &nbsp; &nbsp;if test &quot;$with_debug&quot; = &quot;full&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;dnl Full debug. Very slow in some cases
+ &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$DEBUG_CFLAGS $NL_DEBUG $STL_DEBUG $CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$DEBUG_CXXFLAGS $NL_DEBUG $STL_DEBUG $CXXFLAGS&quot;
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$with_debug&quot; = &quot;fast&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dnl Fast debug.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC $OPTIMIZE_INLINE_CFLAGS $NL_DEBUG $CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX $OPTIMIZE_INLINE_CXXFLAGS $NL_DEBUG $CXXFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dnl Optimized version. No debug
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$OPTIMIZE_CFLAGS $NL_RELEASE $CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$OPTIMIZE_CXXFLAGS $NL_RELEASE $CXXFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;fi
+fi
+
+dnl AC_MSG_RESULT([CFLAGS = $CFLAGS])
+dnl AC_MSG_RESULT([CXXGLAGS = $CXXFLAGS])
+
+])
+
+
+# =========================================================================
+# MY_NEL_HEADER_CHK : NeL header files checking macros
+
+AC_DEFUN(MY_NEL_HEADER_CHK,
+[ AC_REQUIRE_CPP()
+
+chk_message_obj=&quot;$1&quot;
+header=&quot;$2&quot;
+macro=&quot;$3&quot;
+is_mandatory=&quot;$4&quot;
+
+if test $is_mandatory = &quot;yes&quot;
+then
+
+ &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $NEL_CFLAGS&quot;
+
+ &nbsp; &nbsp;AC_MSG_CHECKING(for $header)
+
+ &nbsp; &nbsp;AC_EGREP_CPP( yo_header,
+[#include &lt;$header&gt;
+#ifdef $macro
+ &nbsp; yo_header
+#endif],
+ &nbsp;have_header=&quot;yes&quot;,
+ &nbsp;have_header=&quot;no&quot;)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+ &nbsp; &nbsp;if test &quot;$have_header&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$is_mandatory&quot; = &quot;yes&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([$chk_message_obj must be installed (<A HREF="http://www.nevrax.org">http://www.nevrax.org</A>).])
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no)
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;fi
+fi
+
+ &nbsp; &nbsp; &nbsp; &nbsp;
+])
+
+
+# =========================================================================
+# MY_NEL_LIB_CHK : NeL library checking macros
+
+AC_DEFUN(MY_NEL_LIB_CHK,
+[ AC_REQUIRE_CPP()
+
+chk_message_obj=&quot;$1&quot;
+nel_test_lib=&quot;$2&quot;
+is_mandatory=&quot;$3&quot;
+
+if test $is_mandatory = &quot;yes&quot;
+then
+
+ &nbsp; &nbsp;AC_CHECK_LIB($nel_test_lib, main,,[AC_MSG_ERROR([$chk_message_obj must be installed (<A HREF="http://www.nevrax.org">http://www.nevrax.org</A>).])])
+fi
+])
+
+
+# =========================================================================
+# AM_PATH_NEL : NeL checking macros
+AC_DEFUN(AM_PATH_NEL,
+[ AC_REQUIRE_CPP()
+
+AC_ARG_WITH( nel,
+ &nbsp; &nbsp;[ &nbsp;--with-nel=&lt;path&gt; &nbsp; &nbsp; &nbsp; path to the NeL install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/nel])
+
+AC_ARG_WITH( nel-include,
+ &nbsp; &nbsp;[ &nbsp;--with-nel-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the NeL header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/nel/include])
+
+AC_ARG_WITH( nel-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-nel-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the NeL library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/nel/lib])
+
+
+nelmisc_is_mandatory=&quot;$1&quot;
+nelnet_is_mandatory=&quot;$2&quot;
+nel3d_is_mandatory=&quot;$3&quot;
+nelpacs_is_mandatory=&quot;$4&quot;
+nelsound_is_mandatory=&quot;$5&quot;
+nelai_is_mandatory=&quot;$6&quot;
+nelgeorges_is_mandatory=&quot;$7&quot;
+
+dnl Check for nel-config
+AC_PATH_PROG(NEL_CONFIG, nel-config, no)
+
+dnl
+dnl Configure options (--with-nel*) have precendence
+dnl over nel-config only set variables if they are not
+dnl specified
+dnl
+if test &quot;$NEL_CONFIG&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;if test -z &quot;$with_nel&quot; -a -z &quot;$with_nel_include&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS `nel-config --cflags`&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test -z &quot;$with_nel&quot; -a -z &quot;$with_nel_lib&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;LDFLAGS=&quot;`nel-config --ldflags` $LDFLAGS&quot;
+ &nbsp; &nbsp;fi
+fi
+
+dnl
+dnl Set nel_libraries and nel_includes according to
+dnl user specification (--with-nel*) if any.
+dnl --with-nel-include and --with-nel-lib have precendence
+dnl over --with-nel
+dnl
+if test &quot;$with_nel&quot; = &quot;no&quot;
+then
+ &nbsp; &nbsp;dnl The user explicitly disabled the use of the NeL
+ &nbsp; &nbsp;AC_MSG_ERROR([NeL is mandatory: do not specify --without-nel])
+else
+ &nbsp; &nbsp;if test &quot;$with_nel&quot; -a &quot;$with_nel&quot; != &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;nel_includes=&quot;$with_nel/include&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;nel_libraries=&quot;$with_nel/lib&quot;
+ &nbsp; &nbsp;fi
+fi
+
+if test &quot;$with_nel_include&quot;
+then
+ &nbsp; &nbsp;nel_includes=&quot;$with_nel_include&quot;
+fi
+
+if test &quot;$with_nel_lib&quot;
+then
+ &nbsp; &nbsp;nel_libraries=&quot;$with_nel_lib&quot;
+fi
+
+dnl
+dnl Set compilation variables
+dnl
+if test &quot;$nel_includes&quot;
+then
+ &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS -I$nel_includes&quot;
+fi
+
+if test &quot;$nel_libraries&quot;
+then
+ &nbsp; &nbsp;LDFLAGS=&quot;-L$nel_libraries $LDFLAGS&quot;
+fi
+
+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 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 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 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
+
+MY_NEL_LIB_CHK([NeL Misc], [nelmisc], $nelmisc_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)
+
+])
+
+
+# =========================================================================
+# AM_PATH_STLPORT : STLPort checking macros
+
+AC_DEFUN(AM_PATH_STLPORT,
+[ AC_REQUIRE_CPP()
+
+AC_ARG_WITH( stlport,
+ &nbsp; &nbsp;[ &nbsp;--with-stlport=&lt;path&gt; &nbsp; path to the STLPort install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport])
+
+AC_ARG_WITH( stlport-include,
+ &nbsp; &nbsp;[ &nbsp;--with-stlport-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the STLPort header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport/stlport])
+
+AC_ARG_WITH( stlport-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-stlport-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the STLPort library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport/lib])
+
+if test &quot;$with_debug&quot; = &quot;full&quot;
+then
+ stlport_lib=&quot;stlport_gcc_stldebug&quot;
+else
+ stlport_lib=&quot;stlport_gcc&quot;
+fi
+
+if test &quot;$with_stlport&quot; = no
+then
+ &nbsp; &nbsp;dnl The user explicitly disabled the use of the STLPorts
+ &nbsp; &nbsp;AC_MSG_ERROR([STLPort is mandatory: do not specify --without-stlport])
+else
+ &nbsp; &nbsp;stlport_includes=&quot;/usr/include/stlport&quot;
+ &nbsp; &nbsp;if test &quot;$with_stlport&quot; -a &quot;$with_stlport&quot; != yes
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;stlport_includes=&quot;$with_stlport/stlport&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;stlport_libraries=&quot;$with_stlport/lib&quot;
+
+ &nbsp; &nbsp; &nbsp; &nbsp;if test ! -d &quot;$stlport_includes&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;stlport_includes=&quot;$with_stlport/include/stlport&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;fi
+fi
+
+if test &quot;$with_stlport_include&quot;
+then
+ &nbsp; &nbsp;stlport_includes=&quot;$with_stlport_include&quot;
+fi
+
+if test &quot;$with_stlport_lib&quot;
+then
+ &nbsp; &nbsp;stlport_libraries=&quot;$with_stlport_lib&quot;
+fi
+
+dnl Check for the 'pthread' library. SLTPort needs it.
+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
+if test &quot;$stlport_includes&quot;
+then
+ &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS -I$stlport_includes&quot;
+fi
+
+dnl Put STLPorts libraries directory in LIBS
+if test &quot;$stlport_libraries&quot;
+then
+ &nbsp; &nbsp;LIBS=&quot;-L$stlport_libraries $LIBS&quot;
+else
+ &nbsp; &nbsp;stlport_libraries='default'
+fi
+
+dnl Test the headers
+
+AC_CHECK_HEADER(algorithm,
+ &nbsp; &nbsp;have_stlport_headers=&quot;yes&quot;,
+ &nbsp; &nbsp;have_stlport_headers=&quot;no&quot; )
+
+AC_MSG_CHECKING(for STLPort headers)
+
+if test &quot;$have_stlport_headers&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT([$stlport_includes])
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+AC_CHECK_LIB($stlport_lib, main,, have_stlport_libraries=&quot;no&quot;)
+
+AC_MSG_CHECKING(for STLPort library)
+
+if test &quot;$have_stlport_libraries&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT([$stlport_libraries])
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+if test &quot;$have_stlport_headers&quot; = &quot;yes&quot; &amp;&amp;
+ &nbsp; &nbsp;test &quot;$have_stlport_libraries&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;have_stlport=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_stlport=&quot;no&quot;
+fi
+
+if test &quot;$have_stlport&quot; = &quot;no&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([STLPort must be installed (<A HREF="http://www.stlport.org">http://www.stlport.org</A>).])
+fi
+
+AC_LANG_RESTORE
+
+])
+
+
+# =========================================================================
+# AM_PATH_OPENGL : OpenGL checking macros
+
+AC_DEFUN(AM_PATH_OPENGL,
+[ AC_MSG_CHECKING(for OpenGL headers and GL Version &gt;= 1.2)
+
+is_mandatory=&quot;$1&quot;
+
+AC_REQUIRE_CPP()
+
+AC_ARG_WITH( opengl,
+ &nbsp; &nbsp;[ &nbsp;--with-opengl=&lt;path&gt; &nbsp; &nbsp;path to the OpenGL install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local])
+
+AC_ARG_WITH( opengl-include,
+ &nbsp; &nbsp;[ &nbsp;--with-opengl-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenGL header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/include])
+
+AC_ARG_WITH( opengl-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-opengl-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenGL library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/lib])
+
+opengl_lib=&quot;GL&quot;
+
+if test &quot;$with_opengl&quot;
+then
+ &nbsp; &nbsp;opengl_includes=&quot;$with_opengl/include&quot;
+ &nbsp; &nbsp;opengl_libraries=&quot;$with_opengl/lib&quot;
+fi
+
+if test &quot;$with_opengl_include&quot;
+then
+ &nbsp; &nbsp;opengl_includes=&quot;$with_opengl_include&quot;
+fi
+
+if test &quot;$with_opengl_lib&quot;
+then
+ &nbsp; &nbsp;opengl_libraries=&quot;$with_opengl_lib&quot;
+fi
+
+dnl Set OPENGL_CFLAGS
+if test &quot;$opengl_includes&quot;
+then
+ &nbsp; &nbsp;OPENGL_CFLAGS=&quot;-I$opengl_includes&quot;
+fi
+
+dnl Set OPENGL_LIBS
+if test &quot;$opengl_libraries&quot;
+then
+ &nbsp; &nbsp;OPENGL_LIBS=&quot;-L$opengl_libraries&quot;
+fi
+OPENGL_LIBS=&quot;$OPENGL_LIBS -l$opengl_lib&quot;
+
+dnl Test the headers
+_CPPFLAGS=&quot;$CPPFLAGS&quot;
+
+CPPFLAGS=&quot;$CXXFLAGS $OPENGL_CFLAGS&quot;
+
+AC_EGREP_CPP( yo_opengl,
+[#include &lt;GL/gl.h&gt; &nbsp; &nbsp; &nbsp;
+#if defined(GL_VERSION_1_2)
+ &nbsp; yo_opengl
+#endif],
+ &nbsp;have_opengl_headers=&quot;yes&quot;,
+ &nbsp;have_opengl_headers=&quot;no&quot; )
+
+if test &quot;$have_opengl_headers&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$opengl_includes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$opengl_includes])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+dnl Checking the GLEXT version &gt;= 7
+AC_MSG_CHECKING(for &lt;GL/glext.h&gt; and GLEXT version &gt;= 7)
+
+AC_EGREP_CPP( yo_glext_version,
+[#include &lt;GL/glext.h&gt;
+#ifdef GL_GLEXT_VERSION
+#if GL_GLEXT_VERSION &gt;= 7
+ &nbsp; yo_glext_version
+#endif
+#endif],
+ &nbsp;have_glext=&quot;yes&quot;,
+ &nbsp;have_glext=&quot;no&quot; )
+
+if test &quot;$have_glext&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT(yes)
+else
+ &nbsp; &nbsp;AC_MSG_RESULT([no, &lt;GL/glext.h&gt; can be downloaded from <A HREF="http://oss.sgi.com/projects/ogl-sample/ABI/">http://oss.sgi.com/projects/ogl-sample/ABI/</A>])
+fi
+ &nbsp; &nbsp;
+dnl Test the libraries
+AC_MSG_CHECKING(for OpenGL libraries)
+
+CPPFLAGS=&quot;$CXXFLAGS $OPENGL_LIBS&quot;
+
+AC_TRY_LINK( , , have_opengl_libraries=&quot;yes&quot;, have_opengl_libraries=&quot;no&quot;)
+
+CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+if test &quot;$have_opengl_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$opengl_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$opengl_libraries])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+opengl_libraries=&quot;$opengl_libraries&quot;
+
+if test &quot;$have_opengl_headers&quot; = &quot;yes&quot; \
+ &nbsp; &nbsp; &nbsp; &nbsp;-a &quot;$have_glext&quot; = &quot;yes&quot; \
+ &nbsp; &nbsp; &nbsp; &nbsp;-a &quot;$have_opengl_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;have_opengl=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_opengl=&quot;no&quot;
+fi
+
+if test &quot;$have_opengl&quot; = &quot;no&quot; -a &quot;$is_mandatory&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([OpenGL &gt;= 1.2 must be installed (<A HREF="http://www.mesa3d.org">http://www.mesa3d.org</A>)])
+fi
+
+AC_SUBST(OPENGL_CFLAGS)
+AC_SUBST(OPENGL_LIBS)
+
+])
+
+
+# =========================================================================
+# AM_PATH_FREETYPE : FreeType checking macros
+
+AC_DEFUN(AM_PATH_FREETYPE,
+[ is_mandatory=&quot;$1&quot;
+
+AC_REQUIRE_CPP()
+
+AC_ARG_WITH( freetype,
+ &nbsp; &nbsp;[ &nbsp;--with-freetype=&lt;path&gt; &nbsp; path to the FreeType install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/freetype])
+
+AC_ARG_WITH( freetype-include,
+ &nbsp; &nbsp;[ &nbsp;--with-freetype-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the FreeType header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/freetype/include])
+
+AC_ARG_WITH( freetype-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-freetype-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the FreeType library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/freetype/lib])
+
+freetype_lib=&quot;freetype&quot;
+
+
+AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
+ &nbsp;
+if test &quot;$FREETYPE_CONFIG&quot; = &quot;no&quot;
+then
+ &nbsp; &nbsp;have_freetype_config=&quot;no&quot;
+else
+ &nbsp; &nbsp;FREETYPE_CFLAGS=`freetype-config --cflags`
+ &nbsp; &nbsp;FREETYPE_LIBS=`freetype-config --libs`
+ &nbsp; &nbsp;have_freetype_config=&quot;yes&quot;
+fi
+
+if test &quot;$with_freetype&quot;
+then
+ &nbsp; &nbsp;freetype_includes=&quot;$with_freetype/include&quot;
+ &nbsp; &nbsp;freetype_libraries=&quot;$with_freetype/lib&quot;
+fi
+
+if test &quot;$with_freetype_include&quot;
+then
+ &nbsp; &nbsp;freetype_includes=&quot;$with_freetype_include&quot;
+fi
+
+if test &quot;$with_freetype_lib&quot;
+then
+ &nbsp; &nbsp;freetype_libraries=&quot;$with_freetype_lib&quot;
+fi
+
+if test &quot;$freetype_includes&quot;
+then
+ &nbsp; &nbsp;FREETYPE_CFLAGS=&quot;-I$freetype_includes&quot;
+fi
+
+dnl Checking the FreeType 2 instalation
+_CPPFLAGS=&quot;$CPPFLAGS&quot;
+CPPFLAGS=&quot; $FREETYPE_CFLAGS $CXXFLAGS&quot;
+
+AC_MSG_CHECKING(for FreeType version = 2)
+
+AC_EGREP_CPP( yo_freetype2,
+[#include &lt;freetype/freetype.h&gt;
+#if FREETYPE_MAJOR == 2
+ &nbsp; yo_freetype2
+#endif],
+ &nbsp;have_freetype2=&quot;yes&quot;,
+ &nbsp;have_freetype2=&quot;no&quot;)
+
+if test &quot;$have_freetype2&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT(yes)
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+ &nbsp; &nbsp;
+dnl Test the libraries
+AC_MSG_CHECKING(for FreeType libraries)
+ &nbsp; &nbsp; &nbsp; &nbsp;
+if test $freetype_libraries
+then
+ &nbsp; &nbsp;FREETYPE_LIBS=&quot;-L$freetype_libraries -l$freetype_lib&quot;
+fi
+
+CPPFLAGS=&quot;$FREETYPE_LIBS $CXXFLAGS&quot;
+ &nbsp; &nbsp;
+AC_TRY_LINK( , , have_freetype_libraries=&quot;yes&quot;, have_freetype_libraries=&quot;no&quot;)
+
+CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+if test &quot;$have_freetype_libraries&quot; = &quot;yes&quot;
+then &nbsp; &nbsp;
+ &nbsp; &nbsp;if test &quot;$freetype_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$freetype_libraries])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+if test &quot;$have_freetype2&quot; = &quot;yes&quot; &amp;&amp; test &quot;$have_freetype_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;have_freetype=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_freetype=&quot;no&quot;
+fi
+
+if test &quot;$have_freetype&quot; = &quot;no&quot; &amp;&amp; test &quot;$is_mandatory&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([FreeType 2 must be installed (<A HREF="http://freetype.sourceforge.net">http://freetype.sourceforge.net</A>)])
+fi
+
+AC_SUBST(FREETYPE_CFLAGS)
+AC_SUBST(FREETYPE_LIBS)
+
+])
+
+
+# =========================================================================
+# AM_PATH_XF86VIDMODE : XF86VidMode checking macros
+
+AC_DEFUN(AM_PATH_XF86VIDMODE,
+[ AC_MSG_CHECKING(for XF86VidMode extension)
+
+AC_REQUIRE_CPP()
+
+AC_ARG_WITH( xf86vidmode-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-xf86vidmode-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the XF86VidMode library.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/X11R6/lib] )
+
+xf86vidmode_lib=&quot;Xxf86vm&quot;
+
+if test &quot;$with_xf86vidmode_lib&quot; = no
+then
+ &nbsp; &nbsp;dnl The user explicitly disabled the use of XF86VidMode
+ &nbsp; &nbsp;have_xf86vidmode=&quot;disabled&quot;
+ &nbsp; &nbsp;AC_MSG_RESULT(disabled)
+else
+ &nbsp; &nbsp;if test &quot;$with_xf86vidmode_lib&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;xf86vidmode_libraries=&quot;$with_xf86vidmode_lib&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;XF86VIDMODE_CFLAGS=&quot;-DXF86VIDMODE&quot;
+fi
+
+if test -z &quot;$have_xf86vidmode&quot;
+dnl -a &quot;$with_xf86vidmode_lib&quot;
+then
+ &nbsp; &nbsp;if test &quot;$xf86vidmode_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;XF86VIDMODE_LIBS=&quot;-L$xf86vidmode_libraries&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;XF86VIDMODE_LIBS=&quot;$XF86VIDMODE_LIBS -l$xf86vidmode_lib&quot;
+
+ &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $XF86VIDMODE_LIBS&quot;
+
+ &nbsp; &nbsp;AC_TRY_LINK( , , have_xf86vidmode_libraries=&quot;yes&quot;, have_xf86vidmode_libraries=&quot;no&quot;)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+ &nbsp; &nbsp;if test &quot;$have_xf86vidmode_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;have_xf86vidmode=&quot;yes&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$xf86vidmode_libraries&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT($xf86vidmode_libraries)
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;have_xf86vidmode=&quot;no&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no, no fullscreen support available.)
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;xf86vidmode_libraries=&quot;$xf86vidmode_libraries&quot;
+
+fi
+
+AC_SUBST(XF86VIDMODE_CFLAGS)
+AC_SUBST(XF86VIDMODE_LIBS)
+
+])
+
+
+# =========================================================================
+# AM_PATH_OPENAL : OpenAL checking macros
+
+AC_DEFUN(AM_PATH_OPENAL,
+[ is_mandatory=&quot;$1&quot;
+
+AC_REQUIRE_CPP()
+
+dnl Get from the user option the path to the OpenAL files location
+AC_ARG_WITH( openal,
+ &nbsp; &nbsp;[ &nbsp;--with-openal=&lt;path&gt; &nbsp; path to the OpenAL install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local])
+
+AC_ARG_WITH( openal-include,
+ &nbsp; &nbsp;[ &nbsp;--with-openal-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenAL header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/include])
+
+AC_ARG_WITH( openal-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-openal-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenAL library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/lib])
+
+openal_lib=&quot;openal&quot;
+
+if test $with_openal
+then
+ &nbsp; &nbsp;openal_includes=&quot;$with_openal/include&quot;
+ &nbsp; &nbsp;openal_libraries=&quot;$with_openal/lib&quot;
+fi
+
+if test &quot;$with_openal_include&quot;
+then
+ &nbsp; &nbsp;openal_includes=&quot;$with_openal_include&quot;
+fi
+
+if test &quot;$with_openal_lib&quot;
+then
+ &nbsp; &nbsp;openal_libraries=&quot;$with_openal_lib&quot;
+fi
+
+
+dnl Set OPENAL_CFLAGS
+if test &quot;$openal_includes&quot;
+then
+ &nbsp; &nbsp;OPENAL_CFLAGS=&quot;-I$openal_includes&quot;
+fi
+
+dnl Set OPENAL_LIBS
+if test &quot;$openal_libraries&quot;
+then
+ &nbsp; &nbsp;OPENAL_LIBS=&quot;-L$openal_libraries&quot;
+fi
+OPENAL_LIBS=&quot;$OPENAL_LIBS -l$openal_lib&quot;
+
+_CPPFLAGS=&quot;$CPPFLAGS&quot;
+CPPFLAGS=&quot;$CXXFLAGS $OPENAL_CFLAGS&quot;
+
+AC_MSG_CHECKING(for OpenAL headers)
+AC_EGREP_CPP( yo_openal,
+[#include &lt;AL/altypes.h&gt;
+#ifdef AL_VERSION
+ &nbsp; yo_openal
+#endif],
+ &nbsp;have_openal_headers=&quot;yes&quot;,
+ &nbsp;have_openal_headers=&quot;no&quot; )
+
+if test &quot;$have_openal_headers&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$openal_includes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$openal_includes])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+dnl Test the libraries
+AC_MSG_CHECKING(for OpenAL libraries)
+
+CPPFLAGS=&quot;$CXXFLAGS $OPENAL_LIBS&quot;
+
+AC_TRY_LINK( , , have_openal_libraries=&quot;yes&quot;, have_openal_libraries=&quot;no&quot;)
+
+CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+if test &quot;$have_openal_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$openal_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$openal_libraries])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+openal_libraries=&quot;$openal_libraries&quot;
+
+if test &quot;$have_openal_headers&quot; = &quot;yes&quot; \
+ &nbsp; &amp;&amp; test &quot;$have_openal_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;have_openal=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_openal=&quot;no&quot;
+fi
+
+if test &quot;$have_openal&quot; = &quot;no&quot; -a &quot;$is_mandatory&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([OpenAL is needed to compile NeL (<A HREF="http://www.openal.org">http://www.openal.org</A>).])
+fi
+
+AC_SUBST(OPENAL_CFLAGS)
+AC_SUBST(OPENAL_LIBS)
+
+
+])
+
+
+# =========================================================================
+# AM_PATH_PYTHON : Python checking macros
+
+AC_DEFUN(AM_PATH_PYTHON,
+[ python_version_required=&quot;$1&quot;
+
+is_mandatory=&quot;$2&quot;
+
+AC_REQUIRE_CPP()
+
+dnl Get from the user option the path to the Python files location
+AC_ARG_WITH( python,
+ &nbsp; &nbsp;[ &nbsp;--with-python=&lt;path&gt; &nbsp; &nbsp;path to the Python prefix installation directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local],
+ &nbsp; &nbsp;[ PYTHON_PREFIX=$with_python ]
+)
+
+AC_ARG_WITH( python-version,
+ &nbsp; &nbsp;[ &nbsp;--with-python-version=&lt;version&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Python version to use, e.g. 1.5],
+ &nbsp; &nbsp;[ PYTHON_VERSION=$with_python_version ]
+)
+
+if test ! &quot;$PYTHON_PREFIX&quot; = &quot;&quot;
+then
+ &nbsp; &nbsp;PATH=&quot;$PYTHON_PREFIX/bin:$PATH&quot;
+fi
+
+if test ! &quot;$PYTHON_VERSION&quot; = &quot;&quot;
+then
+ &nbsp; &nbsp;PYTHON_EXEC=&quot;python$PYTHON_VERSION&quot;
+else
+ &nbsp; &nbsp;PYTHON_EXEC=&quot;python python2.1 python2.0 python1.5&quot;
+fi
+
+AC_PATH_PROGS(PYTHON, $PYTHON_EXEC, no, $PATH)
+
+if test &quot;$PYTHON&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;PYTHON_PREFIX=`$PYTHON -c 'import sys; print &quot;%s&quot; % (sys.prefix)'`
+ &nbsp; &nbsp;PYTHON_VERSION=`$PYTHON -c 'import sys; print &quot;%s&quot; % (sys.version[[:3]])'`
+
+ &nbsp; &nbsp;is_python_version_enough=`expr $python_version_required \&lt;= $PYTHON_VERSION`
+fi
+
+
+if test &quot;$PYTHON&quot; = &quot;no&quot; || test &quot;$is_python_version_enough&quot; != &quot;1&quot;
+then
+
+ &nbsp; &nbsp;if test &quot;$is_mandatory&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([Python $python_version_required must be installed (<A HREF="http://www.python.org">http://www.python.org</A>)])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;have_python=&quot;no&quot;
+ &nbsp; &nbsp;fi
+
+else
+
+ &nbsp; &nbsp;python_includes=&quot;$PYTHON_PREFIX/include/python$PYTHON_VERSION&quot;
+ &nbsp; &nbsp;python_libraries=&quot;$PYTHON_PREFIX/lib/python$PYTHON_VERSION/config&quot;
+ &nbsp; &nbsp;python_lib=&quot;python$PYTHON_VERSION&quot;
+
+ &nbsp; &nbsp;PYTHON_CFLAGS=&quot;-I$python_includes&quot;
+ &nbsp; &nbsp;PYTHON_LIBS=&quot;-L$python_libraries -l$python_lib&quot;
+
+ &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS ${PYTHON_CFLAGS}&quot;
+
+ &nbsp; &nbsp;dnl Test the headers
+ &nbsp; &nbsp;AC_MSG_CHECKING(for Python headers)
+
+ &nbsp; &nbsp;AC_EGREP_CPP( yo_python,
+ &nbsp; &nbsp;[#include &lt;Python.h&gt;
+ &nbsp; yo_python
+ &nbsp; &nbsp;],
+ &nbsp; &nbsp; &nbsp;have_python_headers=&quot;yes&quot;,
+ &nbsp; &nbsp; &nbsp;have_python_headers=&quot;no&quot; )
+
+ &nbsp; &nbsp;if test &quot;$have_python_headers&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$python_includes])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no)
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;dnl Test the libraries
+ &nbsp; &nbsp;AC_MSG_CHECKING(for Python libraries)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $PYTHON_CFLAGS&quot;
+
+ &nbsp; &nbsp;AC_TRY_LINK( , , have_python_libraries=&quot;yes&quot;, have_python_libraries=&quot;no&quot;)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+ &nbsp; &nbsp;if test &quot;$have_python_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$python_libraries&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$python_libraries])
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no)
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test &quot;$have_python_headers&quot; = &quot;yes&quot; \
+ &nbsp; &nbsp; &nbsp; &amp;&amp; test &quot;$have_python_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;have_python=&quot;yes&quot;
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;have_python=&quot;no&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test &quot;$have_python&quot; = &quot;no&quot; -a &quot;$is_mandatory&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([Python is needed to compile NeL (<A HREF="http://www.python.org">http://www.python.org</A>).])
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;AC_SUBST(PYTHON_CFLAGS)
+ &nbsp; &nbsp;AC_SUBST(PYTHON_LIBS)
+
+fi
+
+])
+
+
+# =========================================================================
+# AM_PATH_CCACHE : Ccache checking macros
+
+AC_DEFUN(AM_PATH_CCACHE,
+[
+
+AC_ARG_WITH( ccache,
+ &nbsp; &nbsp;[ &nbsp;--with-ccache &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; use ccache for compiling.],
+ &nbsp; &nbsp;[ using_ccache=$with_ccache ]
+)
+
+AC_PATH_PROG(CCACHE, ccache)
+if test &quot;$CCACHE&quot; -a &quot;$using_ccache&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;CC=&quot;ccache $CC&quot;
+ &nbsp; &nbsp;CXX=&quot;ccache $CXX&quot;
+fi
+
+])
+
+
+dnl =========================================================================
+dnl End of file
+
+</PRE> \ No newline at end of file
diff --git a/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup&sortby=rev&only_with_tag=HEAD/index.html b/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup&sortby=rev&only_with_tag=HEAD/index.html
new file mode 100644
index 00000000..8dc12165
--- /dev/null
+++ b/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup&sortby=rev&only_with_tag=HEAD/index.html
@@ -0,0 +1,1093 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
+<HEAD><style> A { color:black }</style>
+<!-- hennerik CVSweb $Revision: 1.93 $ -->
+<TITLE>code/nelns/acinclude.m4 - view - 1.14</TITLE></HEAD>
+<BODY BGCOLOR="#eeeeee">
+<table width="100%" border=0 cellspacing=0 cellpadding=1 bgcolor="#aaaaaa"><tr valign=bottom><td><a href="acinclude.m4?sortby=rev&amp;only_with_tag=HEAD"><IMG SRC="http://www.nevrax.org/inc/img/picto-up.gif" ALT="[BACK]" BORDER="0" WIDTH="14" HEIGHT="13"></a> <b>Return to <A HREF="acinclude.m4?sortby=rev&amp;only_with_tag=HEAD">acinclude.m4</A>
+ CVS log</b> <IMG SRC="http://www.nevrax.org/inc/img/picto-news.gif" ALT="[TXT]" BORDER="0" WIDTH="13" HEIGHT="15"></td><td align=right><IMG SRC="http://www.nevrax.org/inc/img/picto-dir.gif" ALT="[DIR]" BORDER="0" WIDTH="15" HEIGHT="13"> <b>Up to <a href="/cvs/cvsweb.cgi/?sortby=rev&amp;only_with_tag=HEAD">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/?sortby=rev&amp;only_with_tag=HEAD">code</a> / <a href="/cvs/cvsweb.cgi/code/nelns/?sortby=rev&amp;only_with_tag=HEAD">nelns</a></b></td></tr></table><HR noshade><table width="100%"><tr><td bgcolor="#ffffff">File: <a href="/cvs/cvsweb.cgi/?sortby=rev&amp;only_with_tag=HEAD">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/?sortby=rev&amp;only_with_tag=HEAD">code</a> / <a href="/cvs/cvsweb.cgi/code/nelns/?sortby=rev&amp;only_with_tag=HEAD">nelns</a> / <a href="/cvs/cvsweb.cgi/code/nelns/acinclude.m4?sortby=rev&amp;only_with_tag=HEAD">acinclude.m4</a>&nbsp;(<A HREF="/cvs/cvsweb.cgi/~checkout~/code/nelns/acinclude.m4?rev=1.14&amp;sortby=rev&amp;only_with_tag=HEAD" target="cvs_checkout" onClick="window.open('/cvs/cvsweb.cgi/~checkout~/code/nelns/acinclude.m4?rev=1.14','cvs_checkout','resizeable,scrollbars');"><b>download</b></A>)<BR>
+Revision <B>1.14</B>, <i>Thu Apr 25 17:52:16 2002 UTC</i> (3 months ago) by <i>valignat</i>
+<BR>Branch: <b>MAIN</b>
+<BR>CVS Tags: <b>georges_v2, HEAD</b><BR>Changes since <b>1.13: +4 -1
+ lines</b><PRE>
+Added check on the 'pthread' library. SLTPort needs it.
+</PRE>
+</td></tr></table><HR noshade><PRE>dnl =========================================================================
+dnl
+dnl Macros used by Nevrax in configure.in files.
+dnl
+dnl $Id: acinclude.m4,v 1.14 2002/04/25 17:52:16 valignat Exp $
+dnl
+dnl =========================================================================
+
+dnl =========================================================================
+dnl WARNING: The original version of this file is placed in the $CVSROOT/code
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;directory.
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;There is links in the $CVSROOT/code sub-directories to that file
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(ex: $CVSROOT/code/nel), so be careful of the consequences of
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;any modification of that file.
+dnl =========================================================================
+
+dnl =========================================================================
+dnl Macros available in that file.
+dnl
+dnl
+dnl AM_NEL_DEBUG
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: manage the different debug and the release mode by setting
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; correctly the CFLAGS and CXXFLAGS variables.
+dnl
+dnl
+dnl AM_PATH_NEL
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the NeL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CXXFLAGS and LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_STLPORT
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the STLPort library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CXXFLAGS and LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_OPENGL
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the OpenGL library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OPENGL_CFLAGS and OPENGL_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_FREETYPE
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the Freetype library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FREETYPE_CFLAGS and FREETYPE_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_XF86VIDMODE
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; XF86VIDMODE_CFLAGS and XF86VIDMODE_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_OPENAL
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the OpenAL library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OPENAL_CFLAGS and OPENAL_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_PYTHON
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the Python library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PYTHON_CFLAGS and PYTHON_LIBS variables to use it.
+dnl
+dnl AM_PATH_CCACHE
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the Ccache utility.
+dnl
+dnl =========================================================================
+
+
+# =========================================================================
+# AM_NEL_DEBUG
+
+AC_DEFUN(AM_NEL_DEBUG,
+[
+
+MAX_C_OPTIMIZE=&quot;-O6&quot;
+
+STL_DEBUG=&quot;-D__STL_DEBUG&quot;
+
+NL_DEBUG=&quot;-DNL_DEBUG&quot;
+NL_DEBUG_FAST=&quot;-DNL_DEBUG_FAST&quot;
+NL_RELEASE_DEBUG=&quot;-DNL_RELEASE_DEBUG&quot;
+NL_RELEASE=&quot;-DNL_RELEASE&quot;
+
+AC_ARG_WITH(debug,
+ &nbsp; &nbsp;[ &nbsp;--with-debug[=full|medium|fast]
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Build a debug version (huge libraries).
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Full mode set only NeL and STL debug flags.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Medium mode set NeL debug flags with inline
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;optimization (default mode).
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Fast mode is like the Medium mode with some basic
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;optimization.
+ &nbsp;--without-debug &nbsp; &nbsp; &nbsp; &nbsp; Build without debugging code (default)],
+ &nbsp; &nbsp;[with_debug=$withval],
+ &nbsp; &nbsp;[with_debug=no])
+
+dnl Build optimized or debug version ?
+dnl First check for gcc and g++
+if test &quot;$ac_cv_prog_gcc&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;DEBUG_CFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CC=&quot;-O&quot;
+ &nbsp; &nbsp;OPTIMIZE_CFLAGS=&quot;$MAX_C_OPTIMIZE&quot;
+else
+ &nbsp; &nbsp;DEBUG_CFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CC=&quot;&quot;
+ &nbsp; &nbsp;OPTIMIZE_CFLAGS=&quot;-O&quot;
+fi
+
+if test &quot;$ac_cv_prog_cxx_g&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;DEBUG_CXXFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CXX=&quot;-O&quot;
+ &nbsp; &nbsp;OPTIMIZE_CXXFLAGS=&quot;-O3&quot;
+ &nbsp; &nbsp;OPTIMIZE_INLINE_CXXFLAGS=&quot;-finline-functions&quot;
+else
+ &nbsp; &nbsp;DEBUG_CXXFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CXX=&quot;&quot;
+ &nbsp; &nbsp;OPTIMIZE_CXXFLAGS=&quot;-O&quot;
+ &nbsp; &nbsp;OPTIMIZE_INLINE_CXXFLAGS=&quot;&quot;
+fi
+
+if test &quot;$with_debug&quot; = &quot;yes&quot; -o &quot;$with_debug&quot; = &quot;medium&quot;
+then
+ &nbsp; &nbsp;dnl Medium debug. Inline optimization
+ &nbsp; &nbsp;CFLAGS=&quot;$DEBUG_CFLAGS $OPTIMIZE_INLINE_CFLAGS $NL_DEBUG $NL_DEBUG_FAST $CFLAGS&quot;
+ &nbsp; &nbsp;CXXFLAGS=&quot;$DEBUG_CXXFLAGS $OPTIMIZE_INLINE_CXXFLAGS $NL_DEBUG $NL_DEBUG_FAST $CXXFLAGS&quot;
+else
+ &nbsp; &nbsp;if test &quot;$with_debug&quot; = &quot;full&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;dnl Full debug. Very slow in some cases
+ &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$DEBUG_CFLAGS $NL_DEBUG $STL_DEBUG $CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$DEBUG_CXXFLAGS $NL_DEBUG $STL_DEBUG $CXXFLAGS&quot;
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$with_debug&quot; = &quot;fast&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dnl Fast debug.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC $OPTIMIZE_INLINE_CFLAGS $NL_DEBUG $CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX $OPTIMIZE_INLINE_CXXFLAGS $NL_DEBUG $CXXFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dnl Optimized version. No debug
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$OPTIMIZE_CFLAGS $NL_RELEASE $CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$OPTIMIZE_CXXFLAGS $NL_RELEASE $CXXFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;fi
+fi
+
+dnl AC_MSG_RESULT([CFLAGS = $CFLAGS])
+dnl AC_MSG_RESULT([CXXGLAGS = $CXXFLAGS])
+
+])
+
+
+# =========================================================================
+# MY_NEL_HEADER_CHK : NeL header files checking macros
+
+AC_DEFUN(MY_NEL_HEADER_CHK,
+[ AC_REQUIRE_CPP()
+
+chk_message_obj=&quot;$1&quot;
+header=&quot;$2&quot;
+macro=&quot;$3&quot;
+is_mandatory=&quot;$4&quot;
+
+if test $is_mandatory = &quot;yes&quot;
+then
+
+ &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $NEL_CFLAGS&quot;
+
+ &nbsp; &nbsp;AC_MSG_CHECKING(for $header)
+
+ &nbsp; &nbsp;AC_EGREP_CPP( yo_header,
+[#include &lt;$header&gt;
+#ifdef $macro
+ &nbsp; yo_header
+#endif],
+ &nbsp;have_header=&quot;yes&quot;,
+ &nbsp;have_header=&quot;no&quot;)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+ &nbsp; &nbsp;if test &quot;$have_header&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$is_mandatory&quot; = &quot;yes&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([$chk_message_obj must be installed (<A HREF="http://www.nevrax.org">http://www.nevrax.org</A>).])
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no)
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;fi
+fi
+
+ &nbsp; &nbsp; &nbsp; &nbsp;
+])
+
+
+# =========================================================================
+# MY_NEL_LIB_CHK : NeL library checking macros
+
+AC_DEFUN(MY_NEL_LIB_CHK,
+[ AC_REQUIRE_CPP()
+
+chk_message_obj=&quot;$1&quot;
+nel_test_lib=&quot;$2&quot;
+is_mandatory=&quot;$3&quot;
+
+if test $is_mandatory = &quot;yes&quot;
+then
+
+ &nbsp; &nbsp;AC_CHECK_LIB($nel_test_lib, main,,[AC_MSG_ERROR([$chk_message_obj must be installed (<A HREF="http://www.nevrax.org">http://www.nevrax.org</A>).])])
+fi
+])
+
+
+# =========================================================================
+# AM_PATH_NEL : NeL checking macros
+AC_DEFUN(AM_PATH_NEL,
+[ AC_REQUIRE_CPP()
+
+AC_ARG_WITH( nel,
+ &nbsp; &nbsp;[ &nbsp;--with-nel=&lt;path&gt; &nbsp; &nbsp; &nbsp; path to the NeL install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/nel])
+
+AC_ARG_WITH( nel-include,
+ &nbsp; &nbsp;[ &nbsp;--with-nel-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the NeL header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/nel/include])
+
+AC_ARG_WITH( nel-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-nel-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the NeL library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/nel/lib])
+
+
+nelmisc_is_mandatory=&quot;$1&quot;
+nelnet_is_mandatory=&quot;$2&quot;
+nel3d_is_mandatory=&quot;$3&quot;
+nelpacs_is_mandatory=&quot;$4&quot;
+nelsound_is_mandatory=&quot;$5&quot;
+nelai_is_mandatory=&quot;$6&quot;
+nelgeorges_is_mandatory=&quot;$7&quot;
+
+dnl Check for nel-config
+AC_PATH_PROG(NEL_CONFIG, nel-config, no)
+
+dnl
+dnl Configure options (--with-nel*) have precendence
+dnl over nel-config only set variables if they are not
+dnl specified
+dnl
+if test &quot;$NEL_CONFIG&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;if test -z &quot;$with_nel&quot; -a -z &quot;$with_nel_include&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS `nel-config --cflags`&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test -z &quot;$with_nel&quot; -a -z &quot;$with_nel_lib&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;LDFLAGS=&quot;`nel-config --ldflags` $LDFLAGS&quot;
+ &nbsp; &nbsp;fi
+fi
+
+dnl
+dnl Set nel_libraries and nel_includes according to
+dnl user specification (--with-nel*) if any.
+dnl --with-nel-include and --with-nel-lib have precendence
+dnl over --with-nel
+dnl
+if test &quot;$with_nel&quot; = &quot;no&quot;
+then
+ &nbsp; &nbsp;dnl The user explicitly disabled the use of the NeL
+ &nbsp; &nbsp;AC_MSG_ERROR([NeL is mandatory: do not specify --without-nel])
+else
+ &nbsp; &nbsp;if test &quot;$with_nel&quot; -a &quot;$with_nel&quot; != &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;nel_includes=&quot;$with_nel/include&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;nel_libraries=&quot;$with_nel/lib&quot;
+ &nbsp; &nbsp;fi
+fi
+
+if test &quot;$with_nel_include&quot;
+then
+ &nbsp; &nbsp;nel_includes=&quot;$with_nel_include&quot;
+fi
+
+if test &quot;$with_nel_lib&quot;
+then
+ &nbsp; &nbsp;nel_libraries=&quot;$with_nel_lib&quot;
+fi
+
+dnl
+dnl Set compilation variables
+dnl
+if test &quot;$nel_includes&quot;
+then
+ &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS -I$nel_includes&quot;
+fi
+
+if test &quot;$nel_libraries&quot;
+then
+ &nbsp; &nbsp;LDFLAGS=&quot;-L$nel_libraries $LDFLAGS&quot;
+fi
+
+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 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 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 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
+
+MY_NEL_LIB_CHK([NeL Misc], [nelmisc], $nelmisc_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)
+
+])
+
+
+# =========================================================================
+# AM_PATH_STLPORT : STLPort checking macros
+
+AC_DEFUN(AM_PATH_STLPORT,
+[ AC_REQUIRE_CPP()
+
+AC_ARG_WITH( stlport,
+ &nbsp; &nbsp;[ &nbsp;--with-stlport=&lt;path&gt; &nbsp; path to the STLPort install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport])
+
+AC_ARG_WITH( stlport-include,
+ &nbsp; &nbsp;[ &nbsp;--with-stlport-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the STLPort header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport/stlport])
+
+AC_ARG_WITH( stlport-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-stlport-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the STLPort library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport/lib])
+
+if test &quot;$with_debug&quot; = &quot;full&quot;
+then
+ stlport_lib=&quot;stlport_gcc_stldebug&quot;
+else
+ stlport_lib=&quot;stlport_gcc&quot;
+fi
+
+if test &quot;$with_stlport&quot; = no
+then
+ &nbsp; &nbsp;dnl The user explicitly disabled the use of the STLPorts
+ &nbsp; &nbsp;AC_MSG_ERROR([STLPort is mandatory: do not specify --without-stlport])
+else
+ &nbsp; &nbsp;stlport_includes=&quot;/usr/include/stlport&quot;
+ &nbsp; &nbsp;if test &quot;$with_stlport&quot; -a &quot;$with_stlport&quot; != yes
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;stlport_includes=&quot;$with_stlport/stlport&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;stlport_libraries=&quot;$with_stlport/lib&quot;
+
+ &nbsp; &nbsp; &nbsp; &nbsp;if test ! -d &quot;$stlport_includes&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;stlport_includes=&quot;$with_stlport/include/stlport&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;fi
+fi
+
+if test &quot;$with_stlport_include&quot;
+then
+ &nbsp; &nbsp;stlport_includes=&quot;$with_stlport_include&quot;
+fi
+
+if test &quot;$with_stlport_lib&quot;
+then
+ &nbsp; &nbsp;stlport_libraries=&quot;$with_stlport_lib&quot;
+fi
+
+dnl Check for the 'pthread' library. SLTPort needs it.
+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
+if test &quot;$stlport_includes&quot;
+then
+ &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS -I$stlport_includes&quot;
+fi
+
+dnl Put STLPorts libraries directory in LIBS
+if test &quot;$stlport_libraries&quot;
+then
+ &nbsp; &nbsp;LIBS=&quot;-L$stlport_libraries $LIBS&quot;
+else
+ &nbsp; &nbsp;stlport_libraries='default'
+fi
+
+dnl Test the headers
+
+AC_CHECK_HEADER(algorithm,
+ &nbsp; &nbsp;have_stlport_headers=&quot;yes&quot;,
+ &nbsp; &nbsp;have_stlport_headers=&quot;no&quot; )
+
+AC_MSG_CHECKING(for STLPort headers)
+
+if test &quot;$have_stlport_headers&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT([$stlport_includes])
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+AC_CHECK_LIB($stlport_lib, main,, have_stlport_libraries=&quot;no&quot;)
+
+AC_MSG_CHECKING(for STLPort library)
+
+if test &quot;$have_stlport_libraries&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT([$stlport_libraries])
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+if test &quot;$have_stlport_headers&quot; = &quot;yes&quot; &amp;&amp;
+ &nbsp; &nbsp;test &quot;$have_stlport_libraries&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;have_stlport=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_stlport=&quot;no&quot;
+fi
+
+if test &quot;$have_stlport&quot; = &quot;no&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([STLPort must be installed (<A HREF="http://www.stlport.org">http://www.stlport.org</A>).])
+fi
+
+AC_LANG_RESTORE
+
+])
+
+
+# =========================================================================
+# AM_PATH_OPENGL : OpenGL checking macros
+
+AC_DEFUN(AM_PATH_OPENGL,
+[ AC_MSG_CHECKING(for OpenGL headers and GL Version &gt;= 1.2)
+
+is_mandatory=&quot;$1&quot;
+
+AC_REQUIRE_CPP()
+
+AC_ARG_WITH( opengl,
+ &nbsp; &nbsp;[ &nbsp;--with-opengl=&lt;path&gt; &nbsp; &nbsp;path to the OpenGL install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local])
+
+AC_ARG_WITH( opengl-include,
+ &nbsp; &nbsp;[ &nbsp;--with-opengl-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenGL header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/include])
+
+AC_ARG_WITH( opengl-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-opengl-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenGL library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/lib])
+
+opengl_lib=&quot;GL&quot;
+
+if test &quot;$with_opengl&quot;
+then
+ &nbsp; &nbsp;opengl_includes=&quot;$with_opengl/include&quot;
+ &nbsp; &nbsp;opengl_libraries=&quot;$with_opengl/lib&quot;
+fi
+
+if test &quot;$with_opengl_include&quot;
+then
+ &nbsp; &nbsp;opengl_includes=&quot;$with_opengl_include&quot;
+fi
+
+if test &quot;$with_opengl_lib&quot;
+then
+ &nbsp; &nbsp;opengl_libraries=&quot;$with_opengl_lib&quot;
+fi
+
+dnl Set OPENGL_CFLAGS
+if test &quot;$opengl_includes&quot;
+then
+ &nbsp; &nbsp;OPENGL_CFLAGS=&quot;-I$opengl_includes&quot;
+fi
+
+dnl Set OPENGL_LIBS
+if test &quot;$opengl_libraries&quot;
+then
+ &nbsp; &nbsp;OPENGL_LIBS=&quot;-L$opengl_libraries&quot;
+fi
+OPENGL_LIBS=&quot;$OPENGL_LIBS -l$opengl_lib&quot;
+
+dnl Test the headers
+_CPPFLAGS=&quot;$CPPFLAGS&quot;
+
+CPPFLAGS=&quot;$CXXFLAGS $OPENGL_CFLAGS&quot;
+
+AC_EGREP_CPP( yo_opengl,
+[#include &lt;GL/gl.h&gt; &nbsp; &nbsp; &nbsp;
+#if defined(GL_VERSION_1_2)
+ &nbsp; yo_opengl
+#endif],
+ &nbsp;have_opengl_headers=&quot;yes&quot;,
+ &nbsp;have_opengl_headers=&quot;no&quot; )
+
+if test &quot;$have_opengl_headers&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$opengl_includes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$opengl_includes])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+dnl Checking the GLEXT version &gt;= 7
+AC_MSG_CHECKING(for &lt;GL/glext.h&gt; and GLEXT version &gt;= 7)
+
+AC_EGREP_CPP( yo_glext_version,
+[#include &lt;GL/glext.h&gt;
+#ifdef GL_GLEXT_VERSION
+#if GL_GLEXT_VERSION &gt;= 7
+ &nbsp; yo_glext_version
+#endif
+#endif],
+ &nbsp;have_glext=&quot;yes&quot;,
+ &nbsp;have_glext=&quot;no&quot; )
+
+if test &quot;$have_glext&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT(yes)
+else
+ &nbsp; &nbsp;AC_MSG_RESULT([no, &lt;GL/glext.h&gt; can be downloaded from <A HREF="http://oss.sgi.com/projects/ogl-sample/ABI/">http://oss.sgi.com/projects/ogl-sample/ABI/</A>])
+fi
+ &nbsp; &nbsp;
+dnl Test the libraries
+AC_MSG_CHECKING(for OpenGL libraries)
+
+CPPFLAGS=&quot;$CXXFLAGS $OPENGL_LIBS&quot;
+
+AC_TRY_LINK( , , have_opengl_libraries=&quot;yes&quot;, have_opengl_libraries=&quot;no&quot;)
+
+CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+if test &quot;$have_opengl_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$opengl_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$opengl_libraries])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+opengl_libraries=&quot;$opengl_libraries&quot;
+
+if test &quot;$have_opengl_headers&quot; = &quot;yes&quot; \
+ &nbsp; &nbsp; &nbsp; &nbsp;-a &quot;$have_glext&quot; = &quot;yes&quot; \
+ &nbsp; &nbsp; &nbsp; &nbsp;-a &quot;$have_opengl_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;have_opengl=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_opengl=&quot;no&quot;
+fi
+
+if test &quot;$have_opengl&quot; = &quot;no&quot; -a &quot;$is_mandatory&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([OpenGL &gt;= 1.2 must be installed (<A HREF="http://www.mesa3d.org">http://www.mesa3d.org</A>)])
+fi
+
+AC_SUBST(OPENGL_CFLAGS)
+AC_SUBST(OPENGL_LIBS)
+
+])
+
+
+# =========================================================================
+# AM_PATH_FREETYPE : FreeType checking macros
+
+AC_DEFUN(AM_PATH_FREETYPE,
+[ is_mandatory=&quot;$1&quot;
+
+AC_REQUIRE_CPP()
+
+AC_ARG_WITH( freetype,
+ &nbsp; &nbsp;[ &nbsp;--with-freetype=&lt;path&gt; &nbsp; path to the FreeType install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/freetype])
+
+AC_ARG_WITH( freetype-include,
+ &nbsp; &nbsp;[ &nbsp;--with-freetype-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the FreeType header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/freetype/include])
+
+AC_ARG_WITH( freetype-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-freetype-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the FreeType library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/freetype/lib])
+
+freetype_lib=&quot;freetype&quot;
+
+
+AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
+ &nbsp;
+if test &quot;$FREETYPE_CONFIG&quot; = &quot;no&quot;
+then
+ &nbsp; &nbsp;have_freetype_config=&quot;no&quot;
+else
+ &nbsp; &nbsp;FREETYPE_CFLAGS=`freetype-config --cflags`
+ &nbsp; &nbsp;FREETYPE_LIBS=`freetype-config --libs`
+ &nbsp; &nbsp;have_freetype_config=&quot;yes&quot;
+fi
+
+if test &quot;$with_freetype&quot;
+then
+ &nbsp; &nbsp;freetype_includes=&quot;$with_freetype/include&quot;
+ &nbsp; &nbsp;freetype_libraries=&quot;$with_freetype/lib&quot;
+fi
+
+if test &quot;$with_freetype_include&quot;
+then
+ &nbsp; &nbsp;freetype_includes=&quot;$with_freetype_include&quot;
+fi
+
+if test &quot;$with_freetype_lib&quot;
+then
+ &nbsp; &nbsp;freetype_libraries=&quot;$with_freetype_lib&quot;
+fi
+
+if test &quot;$freetype_includes&quot;
+then
+ &nbsp; &nbsp;FREETYPE_CFLAGS=&quot;-I$freetype_includes&quot;
+fi
+
+dnl Checking the FreeType 2 instalation
+_CPPFLAGS=&quot;$CPPFLAGS&quot;
+CPPFLAGS=&quot; $FREETYPE_CFLAGS $CXXFLAGS&quot;
+
+AC_MSG_CHECKING(for FreeType version = 2)
+
+AC_EGREP_CPP( yo_freetype2,
+[#include &lt;freetype/freetype.h&gt;
+#if FREETYPE_MAJOR == 2
+ &nbsp; yo_freetype2
+#endif],
+ &nbsp;have_freetype2=&quot;yes&quot;,
+ &nbsp;have_freetype2=&quot;no&quot;)
+
+if test &quot;$have_freetype2&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT(yes)
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+ &nbsp; &nbsp;
+dnl Test the libraries
+AC_MSG_CHECKING(for FreeType libraries)
+ &nbsp; &nbsp; &nbsp; &nbsp;
+if test $freetype_libraries
+then
+ &nbsp; &nbsp;FREETYPE_LIBS=&quot;-L$freetype_libraries -l$freetype_lib&quot;
+fi
+
+CPPFLAGS=&quot;$FREETYPE_LIBS $CXXFLAGS&quot;
+ &nbsp; &nbsp;
+AC_TRY_LINK( , , have_freetype_libraries=&quot;yes&quot;, have_freetype_libraries=&quot;no&quot;)
+
+CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+if test &quot;$have_freetype_libraries&quot; = &quot;yes&quot;
+then &nbsp; &nbsp;
+ &nbsp; &nbsp;if test &quot;$freetype_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$freetype_libraries])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+if test &quot;$have_freetype2&quot; = &quot;yes&quot; &amp;&amp; test &quot;$have_freetype_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;have_freetype=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_freetype=&quot;no&quot;
+fi
+
+if test &quot;$have_freetype&quot; = &quot;no&quot; &amp;&amp; test &quot;$is_mandatory&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([FreeType 2 must be installed (<A HREF="http://freetype.sourceforge.net">http://freetype.sourceforge.net</A>)])
+fi
+
+AC_SUBST(FREETYPE_CFLAGS)
+AC_SUBST(FREETYPE_LIBS)
+
+])
+
+
+# =========================================================================
+# AM_PATH_XF86VIDMODE : XF86VidMode checking macros
+
+AC_DEFUN(AM_PATH_XF86VIDMODE,
+[ AC_MSG_CHECKING(for XF86VidMode extension)
+
+AC_REQUIRE_CPP()
+
+AC_ARG_WITH( xf86vidmode-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-xf86vidmode-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the XF86VidMode library.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/X11R6/lib] )
+
+xf86vidmode_lib=&quot;Xxf86vm&quot;
+
+if test &quot;$with_xf86vidmode_lib&quot; = no
+then
+ &nbsp; &nbsp;dnl The user explicitly disabled the use of XF86VidMode
+ &nbsp; &nbsp;have_xf86vidmode=&quot;disabled&quot;
+ &nbsp; &nbsp;AC_MSG_RESULT(disabled)
+else
+ &nbsp; &nbsp;if test &quot;$with_xf86vidmode_lib&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;xf86vidmode_libraries=&quot;$with_xf86vidmode_lib&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;XF86VIDMODE_CFLAGS=&quot;-DXF86VIDMODE&quot;
+fi
+
+if test -z &quot;$have_xf86vidmode&quot;
+dnl -a &quot;$with_xf86vidmode_lib&quot;
+then
+ &nbsp; &nbsp;if test &quot;$xf86vidmode_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;XF86VIDMODE_LIBS=&quot;-L$xf86vidmode_libraries&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;XF86VIDMODE_LIBS=&quot;$XF86VIDMODE_LIBS -l$xf86vidmode_lib&quot;
+
+ &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $XF86VIDMODE_LIBS&quot;
+
+ &nbsp; &nbsp;AC_TRY_LINK( , , have_xf86vidmode_libraries=&quot;yes&quot;, have_xf86vidmode_libraries=&quot;no&quot;)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+ &nbsp; &nbsp;if test &quot;$have_xf86vidmode_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;have_xf86vidmode=&quot;yes&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$xf86vidmode_libraries&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT($xf86vidmode_libraries)
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;have_xf86vidmode=&quot;no&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no, no fullscreen support available.)
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;xf86vidmode_libraries=&quot;$xf86vidmode_libraries&quot;
+
+fi
+
+AC_SUBST(XF86VIDMODE_CFLAGS)
+AC_SUBST(XF86VIDMODE_LIBS)
+
+])
+
+
+# =========================================================================
+# AM_PATH_OPENAL : OpenAL checking macros
+
+AC_DEFUN(AM_PATH_OPENAL,
+[ is_mandatory=&quot;$1&quot;
+
+AC_REQUIRE_CPP()
+
+dnl Get from the user option the path to the OpenAL files location
+AC_ARG_WITH( openal,
+ &nbsp; &nbsp;[ &nbsp;--with-openal=&lt;path&gt; &nbsp; path to the OpenAL install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local])
+
+AC_ARG_WITH( openal-include,
+ &nbsp; &nbsp;[ &nbsp;--with-openal-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenAL header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/include])
+
+AC_ARG_WITH( openal-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-openal-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenAL library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/lib])
+
+openal_lib=&quot;openal&quot;
+
+if test $with_openal
+then
+ &nbsp; &nbsp;openal_includes=&quot;$with_openal/include&quot;
+ &nbsp; &nbsp;openal_libraries=&quot;$with_openal/lib&quot;
+fi
+
+if test &quot;$with_openal_include&quot;
+then
+ &nbsp; &nbsp;openal_includes=&quot;$with_openal_include&quot;
+fi
+
+if test &quot;$with_openal_lib&quot;
+then
+ &nbsp; &nbsp;openal_libraries=&quot;$with_openal_lib&quot;
+fi
+
+
+dnl Set OPENAL_CFLAGS
+if test &quot;$openal_includes&quot;
+then
+ &nbsp; &nbsp;OPENAL_CFLAGS=&quot;-I$openal_includes&quot;
+fi
+
+dnl Set OPENAL_LIBS
+if test &quot;$openal_libraries&quot;
+then
+ &nbsp; &nbsp;OPENAL_LIBS=&quot;-L$openal_libraries&quot;
+fi
+OPENAL_LIBS=&quot;$OPENAL_LIBS -l$openal_lib&quot;
+
+_CPPFLAGS=&quot;$CPPFLAGS&quot;
+CPPFLAGS=&quot;$CXXFLAGS $OPENAL_CFLAGS&quot;
+
+AC_MSG_CHECKING(for OpenAL headers)
+AC_EGREP_CPP( yo_openal,
+[#include &lt;AL/altypes.h&gt;
+#ifdef AL_VERSION
+ &nbsp; yo_openal
+#endif],
+ &nbsp;have_openal_headers=&quot;yes&quot;,
+ &nbsp;have_openal_headers=&quot;no&quot; )
+
+if test &quot;$have_openal_headers&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$openal_includes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$openal_includes])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+dnl Test the libraries
+AC_MSG_CHECKING(for OpenAL libraries)
+
+CPPFLAGS=&quot;$CXXFLAGS $OPENAL_LIBS&quot;
+
+AC_TRY_LINK( , , have_openal_libraries=&quot;yes&quot;, have_openal_libraries=&quot;no&quot;)
+
+CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+if test &quot;$have_openal_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$openal_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$openal_libraries])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+openal_libraries=&quot;$openal_libraries&quot;
+
+if test &quot;$have_openal_headers&quot; = &quot;yes&quot; \
+ &nbsp; &amp;&amp; test &quot;$have_openal_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;have_openal=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_openal=&quot;no&quot;
+fi
+
+if test &quot;$have_openal&quot; = &quot;no&quot; -a &quot;$is_mandatory&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([OpenAL is needed to compile NeL (<A HREF="http://www.openal.org">http://www.openal.org</A>).])
+fi
+
+AC_SUBST(OPENAL_CFLAGS)
+AC_SUBST(OPENAL_LIBS)
+
+
+])
+
+
+# =========================================================================
+# AM_PATH_PYTHON : Python checking macros
+
+AC_DEFUN(AM_PATH_PYTHON,
+[ python_version_required=&quot;$1&quot;
+
+is_mandatory=&quot;$2&quot;
+
+AC_REQUIRE_CPP()
+
+dnl Get from the user option the path to the Python files location
+AC_ARG_WITH( python,
+ &nbsp; &nbsp;[ &nbsp;--with-python=&lt;path&gt; &nbsp; &nbsp;path to the Python prefix installation directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local],
+ &nbsp; &nbsp;[ PYTHON_PREFIX=$with_python ]
+)
+
+AC_ARG_WITH( python-version,
+ &nbsp; &nbsp;[ &nbsp;--with-python-version=&lt;version&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Python version to use, e.g. 1.5],
+ &nbsp; &nbsp;[ PYTHON_VERSION=$with_python_version ]
+)
+
+if test ! &quot;$PYTHON_PREFIX&quot; = &quot;&quot;
+then
+ &nbsp; &nbsp;PATH=&quot;$PYTHON_PREFIX/bin:$PATH&quot;
+fi
+
+if test ! &quot;$PYTHON_VERSION&quot; = &quot;&quot;
+then
+ &nbsp; &nbsp;PYTHON_EXEC=&quot;python$PYTHON_VERSION&quot;
+else
+ &nbsp; &nbsp;PYTHON_EXEC=&quot;python python2.1 python2.0 python1.5&quot;
+fi
+
+AC_PATH_PROGS(PYTHON, $PYTHON_EXEC, no, $PATH)
+
+if test &quot;$PYTHON&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;PYTHON_PREFIX=`$PYTHON -c 'import sys; print &quot;%s&quot; % (sys.prefix)'`
+ &nbsp; &nbsp;PYTHON_VERSION=`$PYTHON -c 'import sys; print &quot;%s&quot; % (sys.version[[:3]])'`
+
+ &nbsp; &nbsp;is_python_version_enough=`expr $python_version_required \&lt;= $PYTHON_VERSION`
+fi
+
+
+if test &quot;$PYTHON&quot; = &quot;no&quot; || test &quot;$is_python_version_enough&quot; != &quot;1&quot;
+then
+
+ &nbsp; &nbsp;if test &quot;$is_mandatory&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([Python $python_version_required must be installed (<A HREF="http://www.python.org">http://www.python.org</A>)])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;have_python=&quot;no&quot;
+ &nbsp; &nbsp;fi
+
+else
+
+ &nbsp; &nbsp;python_includes=&quot;$PYTHON_PREFIX/include/python$PYTHON_VERSION&quot;
+ &nbsp; &nbsp;python_libraries=&quot;$PYTHON_PREFIX/lib/python$PYTHON_VERSION/config&quot;
+ &nbsp; &nbsp;python_lib=&quot;python$PYTHON_VERSION&quot;
+
+ &nbsp; &nbsp;PYTHON_CFLAGS=&quot;-I$python_includes&quot;
+ &nbsp; &nbsp;PYTHON_LIBS=&quot;-L$python_libraries -l$python_lib&quot;
+
+ &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS ${PYTHON_CFLAGS}&quot;
+
+ &nbsp; &nbsp;dnl Test the headers
+ &nbsp; &nbsp;AC_MSG_CHECKING(for Python headers)
+
+ &nbsp; &nbsp;AC_EGREP_CPP( yo_python,
+ &nbsp; &nbsp;[#include &lt;Python.h&gt;
+ &nbsp; yo_python
+ &nbsp; &nbsp;],
+ &nbsp; &nbsp; &nbsp;have_python_headers=&quot;yes&quot;,
+ &nbsp; &nbsp; &nbsp;have_python_headers=&quot;no&quot; )
+
+ &nbsp; &nbsp;if test &quot;$have_python_headers&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$python_includes])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no)
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;dnl Test the libraries
+ &nbsp; &nbsp;AC_MSG_CHECKING(for Python libraries)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $PYTHON_CFLAGS&quot;
+
+ &nbsp; &nbsp;AC_TRY_LINK( , , have_python_libraries=&quot;yes&quot;, have_python_libraries=&quot;no&quot;)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+ &nbsp; &nbsp;if test &quot;$have_python_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$python_libraries&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$python_libraries])
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no)
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test &quot;$have_python_headers&quot; = &quot;yes&quot; \
+ &nbsp; &nbsp; &nbsp; &amp;&amp; test &quot;$have_python_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;have_python=&quot;yes&quot;
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;have_python=&quot;no&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test &quot;$have_python&quot; = &quot;no&quot; -a &quot;$is_mandatory&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([Python is needed to compile NeL (<A HREF="http://www.python.org">http://www.python.org</A>).])
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;AC_SUBST(PYTHON_CFLAGS)
+ &nbsp; &nbsp;AC_SUBST(PYTHON_LIBS)
+
+fi
+
+])
+
+
+# =========================================================================
+# AM_PATH_CCACHE : Ccache checking macros
+
+AC_DEFUN(AM_PATH_CCACHE,
+[
+
+AC_ARG_WITH( ccache,
+ &nbsp; &nbsp;[ &nbsp;--with-ccache &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; use ccache for compiling.],
+ &nbsp; &nbsp;[ using_ccache=$with_ccache ]
+)
+
+AC_PATH_PROG(CCACHE, ccache)
+if test &quot;$CCACHE&quot; -a &quot;$using_ccache&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;CC=&quot;ccache $CC&quot;
+ &nbsp; &nbsp;CXX=&quot;ccache $CXX&quot;
+fi
+
+])
+
+
+dnl =========================================================================
+dnl End of file
+
+</PRE> \ No newline at end of file
diff --git a/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup&sortby=rev/index.html b/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup&sortby=rev/index.html
new file mode 100644
index 00000000..42e7a3e2
--- /dev/null
+++ b/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup&sortby=rev/index.html
@@ -0,0 +1,1093 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
+<HEAD><style> A { color:black }</style>
+<!-- hennerik CVSweb $Revision: 1.93 $ -->
+<TITLE>code/nelns/acinclude.m4 - view - 1.14</TITLE></HEAD>
+<BODY BGCOLOR="#eeeeee">
+<table width="100%" border=0 cellspacing=0 cellpadding=1 bgcolor="#aaaaaa"><tr valign=bottom><td><a href="acinclude.m4?sortby=rev"><IMG SRC="http://www.nevrax.org/inc/img/picto-up.gif" ALT="[BACK]" BORDER="0" WIDTH="14" HEIGHT="13"></a> <b>Return to <A HREF="acinclude.m4?sortby=rev">acinclude.m4</A>
+ CVS log</b> <IMG SRC="http://www.nevrax.org/inc/img/picto-news.gif" ALT="[TXT]" BORDER="0" WIDTH="13" HEIGHT="15"></td><td align=right><IMG SRC="http://www.nevrax.org/inc/img/picto-dir.gif" ALT="[DIR]" BORDER="0" WIDTH="15" HEIGHT="13"> <b>Up to <a href="/cvs/cvsweb.cgi/?sortby=rev">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/?sortby=rev">code</a> / <a href="/cvs/cvsweb.cgi/code/nelns/?sortby=rev">nelns</a></b></td></tr></table><HR noshade><table width="100%"><tr><td bgcolor="#ffffff">File: <a href="/cvs/cvsweb.cgi/?sortby=rev">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/?sortby=rev">code</a> / <a href="/cvs/cvsweb.cgi/code/nelns/?sortby=rev">nelns</a> / <a href="/cvs/cvsweb.cgi/code/nelns/acinclude.m4?sortby=rev">acinclude.m4</a>&nbsp;(<A HREF="/cvs/cvsweb.cgi/~checkout~/code/nelns/acinclude.m4?rev=1.14&amp;sortby=rev" target="cvs_checkout" onClick="window.open('/cvs/cvsweb.cgi/~checkout~/code/nelns/acinclude.m4?rev=1.14','cvs_checkout','resizeable,scrollbars');"><b>download</b></A>)<BR>
+Revision <B>1.14</B>, <i>Thu Apr 25 17:52:16 2002 UTC</i> (7 weeks, 6 days ago) by <i>valignat</i>
+<BR>Branch: <b>MAIN</b>
+<BR>CVS Tags: <b>georges_v2, HEAD</b><BR>Changes since <b>1.13: +4 -1
+ lines</b><PRE>
+Added check on the 'pthread' library. SLTPort needs it.
+</PRE>
+</td></tr></table><HR noshade><PRE>dnl =========================================================================
+dnl
+dnl Macros used by Nevrax in configure.in files.
+dnl
+dnl $Id: acinclude.m4,v 1.14 2002/04/25 17:52:16 valignat Exp $
+dnl
+dnl =========================================================================
+
+dnl =========================================================================
+dnl WARNING: The original version of this file is placed in the $CVSROOT/code
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;directory.
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;There is links in the $CVSROOT/code sub-directories to that file
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(ex: $CVSROOT/code/nel), so be careful of the consequences of
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;any modification of that file.
+dnl =========================================================================
+
+dnl =========================================================================
+dnl Macros available in that file.
+dnl
+dnl
+dnl AM_NEL_DEBUG
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: manage the different debug and the release mode by setting
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; correctly the CFLAGS and CXXFLAGS variables.
+dnl
+dnl
+dnl AM_PATH_NEL
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the NeL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CXXFLAGS and LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_STLPORT
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the STLPort library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CXXFLAGS and LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_OPENGL
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the OpenGL library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OPENGL_CFLAGS and OPENGL_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_FREETYPE
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the Freetype library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FREETYPE_CFLAGS and FREETYPE_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_XF86VIDMODE
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; XF86VIDMODE_CFLAGS and XF86VIDMODE_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_OPENAL
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the OpenAL library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OPENAL_CFLAGS and OPENAL_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_PYTHON
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the Python library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PYTHON_CFLAGS and PYTHON_LIBS variables to use it.
+dnl
+dnl AM_PATH_CCACHE
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the Ccache utility.
+dnl
+dnl =========================================================================
+
+
+# =========================================================================
+# AM_NEL_DEBUG
+
+AC_DEFUN(AM_NEL_DEBUG,
+[
+
+MAX_C_OPTIMIZE=&quot;-O6&quot;
+
+STL_DEBUG=&quot;-D__STL_DEBUG&quot;
+
+NL_DEBUG=&quot;-DNL_DEBUG&quot;
+NL_DEBUG_FAST=&quot;-DNL_DEBUG_FAST&quot;
+NL_RELEASE_DEBUG=&quot;-DNL_RELEASE_DEBUG&quot;
+NL_RELEASE=&quot;-DNL_RELEASE&quot;
+
+AC_ARG_WITH(debug,
+ &nbsp; &nbsp;[ &nbsp;--with-debug[=full|medium|fast]
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Build a debug version (huge libraries).
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Full mode set only NeL and STL debug flags.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Medium mode set NeL debug flags with inline
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;optimization (default mode).
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Fast mode is like the Medium mode with some basic
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;optimization.
+ &nbsp;--without-debug &nbsp; &nbsp; &nbsp; &nbsp; Build without debugging code (default)],
+ &nbsp; &nbsp;[with_debug=$withval],
+ &nbsp; &nbsp;[with_debug=no])
+
+dnl Build optimized or debug version ?
+dnl First check for gcc and g++
+if test &quot;$ac_cv_prog_gcc&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;DEBUG_CFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CC=&quot;-O&quot;
+ &nbsp; &nbsp;OPTIMIZE_CFLAGS=&quot;$MAX_C_OPTIMIZE&quot;
+else
+ &nbsp; &nbsp;DEBUG_CFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CC=&quot;&quot;
+ &nbsp; &nbsp;OPTIMIZE_CFLAGS=&quot;-O&quot;
+fi
+
+if test &quot;$ac_cv_prog_cxx_g&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;DEBUG_CXXFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CXX=&quot;-O&quot;
+ &nbsp; &nbsp;OPTIMIZE_CXXFLAGS=&quot;-O3&quot;
+ &nbsp; &nbsp;OPTIMIZE_INLINE_CXXFLAGS=&quot;-finline-functions&quot;
+else
+ &nbsp; &nbsp;DEBUG_CXXFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CXX=&quot;&quot;
+ &nbsp; &nbsp;OPTIMIZE_CXXFLAGS=&quot;-O&quot;
+ &nbsp; &nbsp;OPTIMIZE_INLINE_CXXFLAGS=&quot;&quot;
+fi
+
+if test &quot;$with_debug&quot; = &quot;yes&quot; -o &quot;$with_debug&quot; = &quot;medium&quot;
+then
+ &nbsp; &nbsp;dnl Medium debug. Inline optimization
+ &nbsp; &nbsp;CFLAGS=&quot;$DEBUG_CFLAGS $OPTIMIZE_INLINE_CFLAGS $NL_DEBUG $NL_DEBUG_FAST $CFLAGS&quot;
+ &nbsp; &nbsp;CXXFLAGS=&quot;$DEBUG_CXXFLAGS $OPTIMIZE_INLINE_CXXFLAGS $NL_DEBUG $NL_DEBUG_FAST $CXXFLAGS&quot;
+else
+ &nbsp; &nbsp;if test &quot;$with_debug&quot; = &quot;full&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;dnl Full debug. Very slow in some cases
+ &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$DEBUG_CFLAGS $NL_DEBUG $STL_DEBUG $CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$DEBUG_CXXFLAGS $NL_DEBUG $STL_DEBUG $CXXFLAGS&quot;
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$with_debug&quot; = &quot;fast&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dnl Fast debug.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC $OPTIMIZE_INLINE_CFLAGS $NL_DEBUG $CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX $OPTIMIZE_INLINE_CXXFLAGS $NL_DEBUG $CXXFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dnl Optimized version. No debug
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$OPTIMIZE_CFLAGS $NL_RELEASE $CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$OPTIMIZE_CXXFLAGS $NL_RELEASE $CXXFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;fi
+fi
+
+dnl AC_MSG_RESULT([CFLAGS = $CFLAGS])
+dnl AC_MSG_RESULT([CXXGLAGS = $CXXFLAGS])
+
+])
+
+
+# =========================================================================
+# MY_NEL_HEADER_CHK : NeL header files checking macros
+
+AC_DEFUN(MY_NEL_HEADER_CHK,
+[ AC_REQUIRE_CPP()
+
+chk_message_obj=&quot;$1&quot;
+header=&quot;$2&quot;
+macro=&quot;$3&quot;
+is_mandatory=&quot;$4&quot;
+
+if test $is_mandatory = &quot;yes&quot;
+then
+
+ &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $NEL_CFLAGS&quot;
+
+ &nbsp; &nbsp;AC_MSG_CHECKING(for $header)
+
+ &nbsp; &nbsp;AC_EGREP_CPP( yo_header,
+[#include &lt;$header&gt;
+#ifdef $macro
+ &nbsp; yo_header
+#endif],
+ &nbsp;have_header=&quot;yes&quot;,
+ &nbsp;have_header=&quot;no&quot;)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+ &nbsp; &nbsp;if test &quot;$have_header&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$is_mandatory&quot; = &quot;yes&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([$chk_message_obj must be installed (<A HREF="http://www.nevrax.org">http://www.nevrax.org</A>).])
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no)
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;fi
+fi
+
+ &nbsp; &nbsp; &nbsp; &nbsp;
+])
+
+
+# =========================================================================
+# MY_NEL_LIB_CHK : NeL library checking macros
+
+AC_DEFUN(MY_NEL_LIB_CHK,
+[ AC_REQUIRE_CPP()
+
+chk_message_obj=&quot;$1&quot;
+nel_test_lib=&quot;$2&quot;
+is_mandatory=&quot;$3&quot;
+
+if test $is_mandatory = &quot;yes&quot;
+then
+
+ &nbsp; &nbsp;AC_CHECK_LIB($nel_test_lib, main,,[AC_MSG_ERROR([$chk_message_obj must be installed (<A HREF="http://www.nevrax.org">http://www.nevrax.org</A>).])])
+fi
+])
+
+
+# =========================================================================
+# AM_PATH_NEL : NeL checking macros
+AC_DEFUN(AM_PATH_NEL,
+[ AC_REQUIRE_CPP()
+
+AC_ARG_WITH( nel,
+ &nbsp; &nbsp;[ &nbsp;--with-nel=&lt;path&gt; &nbsp; &nbsp; &nbsp; path to the NeL install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/nel])
+
+AC_ARG_WITH( nel-include,
+ &nbsp; &nbsp;[ &nbsp;--with-nel-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the NeL header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/nel/include])
+
+AC_ARG_WITH( nel-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-nel-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the NeL library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/nel/lib])
+
+
+nelmisc_is_mandatory=&quot;$1&quot;
+nelnet_is_mandatory=&quot;$2&quot;
+nel3d_is_mandatory=&quot;$3&quot;
+nelpacs_is_mandatory=&quot;$4&quot;
+nelsound_is_mandatory=&quot;$5&quot;
+nelai_is_mandatory=&quot;$6&quot;
+nelgeorges_is_mandatory=&quot;$7&quot;
+
+dnl Check for nel-config
+AC_PATH_PROG(NEL_CONFIG, nel-config, no)
+
+dnl
+dnl Configure options (--with-nel*) have precendence
+dnl over nel-config only set variables if they are not
+dnl specified
+dnl
+if test &quot;$NEL_CONFIG&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;if test -z &quot;$with_nel&quot; -a -z &quot;$with_nel_include&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS `nel-config --cflags`&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test -z &quot;$with_nel&quot; -a -z &quot;$with_nel_lib&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;LDFLAGS=&quot;`nel-config --ldflags` $LDFLAGS&quot;
+ &nbsp; &nbsp;fi
+fi
+
+dnl
+dnl Set nel_libraries and nel_includes according to
+dnl user specification (--with-nel*) if any.
+dnl --with-nel-include and --with-nel-lib have precendence
+dnl over --with-nel
+dnl
+if test &quot;$with_nel&quot; = &quot;no&quot;
+then
+ &nbsp; &nbsp;dnl The user explicitly disabled the use of the NeL
+ &nbsp; &nbsp;AC_MSG_ERROR([NeL is mandatory: do not specify --without-nel])
+else
+ &nbsp; &nbsp;if test &quot;$with_nel&quot; -a &quot;$with_nel&quot; != &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;nel_includes=&quot;$with_nel/include&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;nel_libraries=&quot;$with_nel/lib&quot;
+ &nbsp; &nbsp;fi
+fi
+
+if test &quot;$with_nel_include&quot;
+then
+ &nbsp; &nbsp;nel_includes=&quot;$with_nel_include&quot;
+fi
+
+if test &quot;$with_nel_lib&quot;
+then
+ &nbsp; &nbsp;nel_libraries=&quot;$with_nel_lib&quot;
+fi
+
+dnl
+dnl Set compilation variables
+dnl
+if test &quot;$nel_includes&quot;
+then
+ &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS -I$nel_includes&quot;
+fi
+
+if test &quot;$nel_libraries&quot;
+then
+ &nbsp; &nbsp;LDFLAGS=&quot;-L$nel_libraries $LDFLAGS&quot;
+fi
+
+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 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 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 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
+
+MY_NEL_LIB_CHK([NeL Misc], [nelmisc], $nelmisc_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)
+
+])
+
+
+# =========================================================================
+# AM_PATH_STLPORT : STLPort checking macros
+
+AC_DEFUN(AM_PATH_STLPORT,
+[ AC_REQUIRE_CPP()
+
+AC_ARG_WITH( stlport,
+ &nbsp; &nbsp;[ &nbsp;--with-stlport=&lt;path&gt; &nbsp; path to the STLPort install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport])
+
+AC_ARG_WITH( stlport-include,
+ &nbsp; &nbsp;[ &nbsp;--with-stlport-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the STLPort header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport/stlport])
+
+AC_ARG_WITH( stlport-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-stlport-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the STLPort library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport/lib])
+
+if test &quot;$with_debug&quot; = &quot;full&quot;
+then
+ stlport_lib=&quot;stlport_gcc_stldebug&quot;
+else
+ stlport_lib=&quot;stlport_gcc&quot;
+fi
+
+if test &quot;$with_stlport&quot; = no
+then
+ &nbsp; &nbsp;dnl The user explicitly disabled the use of the STLPorts
+ &nbsp; &nbsp;AC_MSG_ERROR([STLPort is mandatory: do not specify --without-stlport])
+else
+ &nbsp; &nbsp;stlport_includes=&quot;/usr/include/stlport&quot;
+ &nbsp; &nbsp;if test &quot;$with_stlport&quot; -a &quot;$with_stlport&quot; != yes
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;stlport_includes=&quot;$with_stlport/stlport&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;stlport_libraries=&quot;$with_stlport/lib&quot;
+
+ &nbsp; &nbsp; &nbsp; &nbsp;if test ! -d &quot;$stlport_includes&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;stlport_includes=&quot;$with_stlport/include/stlport&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;fi
+fi
+
+if test &quot;$with_stlport_include&quot;
+then
+ &nbsp; &nbsp;stlport_includes=&quot;$with_stlport_include&quot;
+fi
+
+if test &quot;$with_stlport_lib&quot;
+then
+ &nbsp; &nbsp;stlport_libraries=&quot;$with_stlport_lib&quot;
+fi
+
+dnl Check for the 'pthread' library. SLTPort needs it.
+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
+if test &quot;$stlport_includes&quot;
+then
+ &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS -I$stlport_includes&quot;
+fi
+
+dnl Put STLPorts libraries directory in LIBS
+if test &quot;$stlport_libraries&quot;
+then
+ &nbsp; &nbsp;LIBS=&quot;-L$stlport_libraries $LIBS&quot;
+else
+ &nbsp; &nbsp;stlport_libraries='default'
+fi
+
+dnl Test the headers
+
+AC_CHECK_HEADER(algorithm,
+ &nbsp; &nbsp;have_stlport_headers=&quot;yes&quot;,
+ &nbsp; &nbsp;have_stlport_headers=&quot;no&quot; )
+
+AC_MSG_CHECKING(for STLPort headers)
+
+if test &quot;$have_stlport_headers&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT([$stlport_includes])
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+AC_CHECK_LIB($stlport_lib, main,, have_stlport_libraries=&quot;no&quot;)
+
+AC_MSG_CHECKING(for STLPort library)
+
+if test &quot;$have_stlport_libraries&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT([$stlport_libraries])
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+if test &quot;$have_stlport_headers&quot; = &quot;yes&quot; &amp;&amp;
+ &nbsp; &nbsp;test &quot;$have_stlport_libraries&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;have_stlport=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_stlport=&quot;no&quot;
+fi
+
+if test &quot;$have_stlport&quot; = &quot;no&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([STLPort must be installed (<A HREF="http://www.stlport.org">http://www.stlport.org</A>).])
+fi
+
+AC_LANG_RESTORE
+
+])
+
+
+# =========================================================================
+# AM_PATH_OPENGL : OpenGL checking macros
+
+AC_DEFUN(AM_PATH_OPENGL,
+[ AC_MSG_CHECKING(for OpenGL headers and GL Version &gt;= 1.2)
+
+is_mandatory=&quot;$1&quot;
+
+AC_REQUIRE_CPP()
+
+AC_ARG_WITH( opengl,
+ &nbsp; &nbsp;[ &nbsp;--with-opengl=&lt;path&gt; &nbsp; &nbsp;path to the OpenGL install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local])
+
+AC_ARG_WITH( opengl-include,
+ &nbsp; &nbsp;[ &nbsp;--with-opengl-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenGL header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/include])
+
+AC_ARG_WITH( opengl-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-opengl-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenGL library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/lib])
+
+opengl_lib=&quot;GL&quot;
+
+if test &quot;$with_opengl&quot;
+then
+ &nbsp; &nbsp;opengl_includes=&quot;$with_opengl/include&quot;
+ &nbsp; &nbsp;opengl_libraries=&quot;$with_opengl/lib&quot;
+fi
+
+if test &quot;$with_opengl_include&quot;
+then
+ &nbsp; &nbsp;opengl_includes=&quot;$with_opengl_include&quot;
+fi
+
+if test &quot;$with_opengl_lib&quot;
+then
+ &nbsp; &nbsp;opengl_libraries=&quot;$with_opengl_lib&quot;
+fi
+
+dnl Set OPENGL_CFLAGS
+if test &quot;$opengl_includes&quot;
+then
+ &nbsp; &nbsp;OPENGL_CFLAGS=&quot;-I$opengl_includes&quot;
+fi
+
+dnl Set OPENGL_LIBS
+if test &quot;$opengl_libraries&quot;
+then
+ &nbsp; &nbsp;OPENGL_LIBS=&quot;-L$opengl_libraries&quot;
+fi
+OPENGL_LIBS=&quot;$OPENGL_LIBS -l$opengl_lib&quot;
+
+dnl Test the headers
+_CPPFLAGS=&quot;$CPPFLAGS&quot;
+
+CPPFLAGS=&quot;$CXXFLAGS $OPENGL_CFLAGS&quot;
+
+AC_EGREP_CPP( yo_opengl,
+[#include &lt;GL/gl.h&gt; &nbsp; &nbsp; &nbsp;
+#if defined(GL_VERSION_1_2)
+ &nbsp; yo_opengl
+#endif],
+ &nbsp;have_opengl_headers=&quot;yes&quot;,
+ &nbsp;have_opengl_headers=&quot;no&quot; )
+
+if test &quot;$have_opengl_headers&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$opengl_includes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$opengl_includes])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+dnl Checking the GLEXT version &gt;= 7
+AC_MSG_CHECKING(for &lt;GL/glext.h&gt; and GLEXT version &gt;= 7)
+
+AC_EGREP_CPP( yo_glext_version,
+[#include &lt;GL/glext.h&gt;
+#ifdef GL_GLEXT_VERSION
+#if GL_GLEXT_VERSION &gt;= 7
+ &nbsp; yo_glext_version
+#endif
+#endif],
+ &nbsp;have_glext=&quot;yes&quot;,
+ &nbsp;have_glext=&quot;no&quot; )
+
+if test &quot;$have_glext&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT(yes)
+else
+ &nbsp; &nbsp;AC_MSG_RESULT([no, &lt;GL/glext.h&gt; can be downloaded from <A HREF="http://oss.sgi.com/projects/ogl-sample/ABI/">http://oss.sgi.com/projects/ogl-sample/ABI/</A>])
+fi
+ &nbsp; &nbsp;
+dnl Test the libraries
+AC_MSG_CHECKING(for OpenGL libraries)
+
+CPPFLAGS=&quot;$CXXFLAGS $OPENGL_LIBS&quot;
+
+AC_TRY_LINK( , , have_opengl_libraries=&quot;yes&quot;, have_opengl_libraries=&quot;no&quot;)
+
+CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+if test &quot;$have_opengl_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$opengl_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$opengl_libraries])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+opengl_libraries=&quot;$opengl_libraries&quot;
+
+if test &quot;$have_opengl_headers&quot; = &quot;yes&quot; \
+ &nbsp; &nbsp; &nbsp; &nbsp;-a &quot;$have_glext&quot; = &quot;yes&quot; \
+ &nbsp; &nbsp; &nbsp; &nbsp;-a &quot;$have_opengl_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;have_opengl=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_opengl=&quot;no&quot;
+fi
+
+if test &quot;$have_opengl&quot; = &quot;no&quot; -a &quot;$is_mandatory&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([OpenGL &gt;= 1.2 must be installed (<A HREF="http://www.mesa3d.org">http://www.mesa3d.org</A>)])
+fi
+
+AC_SUBST(OPENGL_CFLAGS)
+AC_SUBST(OPENGL_LIBS)
+
+])
+
+
+# =========================================================================
+# AM_PATH_FREETYPE : FreeType checking macros
+
+AC_DEFUN(AM_PATH_FREETYPE,
+[ is_mandatory=&quot;$1&quot;
+
+AC_REQUIRE_CPP()
+
+AC_ARG_WITH( freetype,
+ &nbsp; &nbsp;[ &nbsp;--with-freetype=&lt;path&gt; &nbsp; path to the FreeType install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/freetype])
+
+AC_ARG_WITH( freetype-include,
+ &nbsp; &nbsp;[ &nbsp;--with-freetype-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the FreeType header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/freetype/include])
+
+AC_ARG_WITH( freetype-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-freetype-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the FreeType library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/freetype/lib])
+
+freetype_lib=&quot;freetype&quot;
+
+
+AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
+ &nbsp;
+if test &quot;$FREETYPE_CONFIG&quot; = &quot;no&quot;
+then
+ &nbsp; &nbsp;have_freetype_config=&quot;no&quot;
+else
+ &nbsp; &nbsp;FREETYPE_CFLAGS=`freetype-config --cflags`
+ &nbsp; &nbsp;FREETYPE_LIBS=`freetype-config --libs`
+ &nbsp; &nbsp;have_freetype_config=&quot;yes&quot;
+fi
+
+if test &quot;$with_freetype&quot;
+then
+ &nbsp; &nbsp;freetype_includes=&quot;$with_freetype/include&quot;
+ &nbsp; &nbsp;freetype_libraries=&quot;$with_freetype/lib&quot;
+fi
+
+if test &quot;$with_freetype_include&quot;
+then
+ &nbsp; &nbsp;freetype_includes=&quot;$with_freetype_include&quot;
+fi
+
+if test &quot;$with_freetype_lib&quot;
+then
+ &nbsp; &nbsp;freetype_libraries=&quot;$with_freetype_lib&quot;
+fi
+
+if test &quot;$freetype_includes&quot;
+then
+ &nbsp; &nbsp;FREETYPE_CFLAGS=&quot;-I$freetype_includes&quot;
+fi
+
+dnl Checking the FreeType 2 instalation
+_CPPFLAGS=&quot;$CPPFLAGS&quot;
+CPPFLAGS=&quot; $FREETYPE_CFLAGS $CXXFLAGS&quot;
+
+AC_MSG_CHECKING(for FreeType version = 2)
+
+AC_EGREP_CPP( yo_freetype2,
+[#include &lt;freetype/freetype.h&gt;
+#if FREETYPE_MAJOR == 2
+ &nbsp; yo_freetype2
+#endif],
+ &nbsp;have_freetype2=&quot;yes&quot;,
+ &nbsp;have_freetype2=&quot;no&quot;)
+
+if test &quot;$have_freetype2&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT(yes)
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+ &nbsp; &nbsp;
+dnl Test the libraries
+AC_MSG_CHECKING(for FreeType libraries)
+ &nbsp; &nbsp; &nbsp; &nbsp;
+if test $freetype_libraries
+then
+ &nbsp; &nbsp;FREETYPE_LIBS=&quot;-L$freetype_libraries -l$freetype_lib&quot;
+fi
+
+CPPFLAGS=&quot;$FREETYPE_LIBS $CXXFLAGS&quot;
+ &nbsp; &nbsp;
+AC_TRY_LINK( , , have_freetype_libraries=&quot;yes&quot;, have_freetype_libraries=&quot;no&quot;)
+
+CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+if test &quot;$have_freetype_libraries&quot; = &quot;yes&quot;
+then &nbsp; &nbsp;
+ &nbsp; &nbsp;if test &quot;$freetype_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$freetype_libraries])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+if test &quot;$have_freetype2&quot; = &quot;yes&quot; &amp;&amp; test &quot;$have_freetype_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;have_freetype=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_freetype=&quot;no&quot;
+fi
+
+if test &quot;$have_freetype&quot; = &quot;no&quot; &amp;&amp; test &quot;$is_mandatory&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([FreeType 2 must be installed (<A HREF="http://freetype.sourceforge.net">http://freetype.sourceforge.net</A>)])
+fi
+
+AC_SUBST(FREETYPE_CFLAGS)
+AC_SUBST(FREETYPE_LIBS)
+
+])
+
+
+# =========================================================================
+# AM_PATH_XF86VIDMODE : XF86VidMode checking macros
+
+AC_DEFUN(AM_PATH_XF86VIDMODE,
+[ AC_MSG_CHECKING(for XF86VidMode extension)
+
+AC_REQUIRE_CPP()
+
+AC_ARG_WITH( xf86vidmode-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-xf86vidmode-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the XF86VidMode library.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/X11R6/lib] )
+
+xf86vidmode_lib=&quot;Xxf86vm&quot;
+
+if test &quot;$with_xf86vidmode_lib&quot; = no
+then
+ &nbsp; &nbsp;dnl The user explicitly disabled the use of XF86VidMode
+ &nbsp; &nbsp;have_xf86vidmode=&quot;disabled&quot;
+ &nbsp; &nbsp;AC_MSG_RESULT(disabled)
+else
+ &nbsp; &nbsp;if test &quot;$with_xf86vidmode_lib&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;xf86vidmode_libraries=&quot;$with_xf86vidmode_lib&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;XF86VIDMODE_CFLAGS=&quot;-DXF86VIDMODE&quot;
+fi
+
+if test -z &quot;$have_xf86vidmode&quot;
+dnl -a &quot;$with_xf86vidmode_lib&quot;
+then
+ &nbsp; &nbsp;if test &quot;$xf86vidmode_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;XF86VIDMODE_LIBS=&quot;-L$xf86vidmode_libraries&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;XF86VIDMODE_LIBS=&quot;$XF86VIDMODE_LIBS -l$xf86vidmode_lib&quot;
+
+ &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $XF86VIDMODE_LIBS&quot;
+
+ &nbsp; &nbsp;AC_TRY_LINK( , , have_xf86vidmode_libraries=&quot;yes&quot;, have_xf86vidmode_libraries=&quot;no&quot;)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+ &nbsp; &nbsp;if test &quot;$have_xf86vidmode_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;have_xf86vidmode=&quot;yes&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$xf86vidmode_libraries&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT($xf86vidmode_libraries)
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;have_xf86vidmode=&quot;no&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no, no fullscreen support available.)
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;xf86vidmode_libraries=&quot;$xf86vidmode_libraries&quot;
+
+fi
+
+AC_SUBST(XF86VIDMODE_CFLAGS)
+AC_SUBST(XF86VIDMODE_LIBS)
+
+])
+
+
+# =========================================================================
+# AM_PATH_OPENAL : OpenAL checking macros
+
+AC_DEFUN(AM_PATH_OPENAL,
+[ is_mandatory=&quot;$1&quot;
+
+AC_REQUIRE_CPP()
+
+dnl Get from the user option the path to the OpenAL files location
+AC_ARG_WITH( openal,
+ &nbsp; &nbsp;[ &nbsp;--with-openal=&lt;path&gt; &nbsp; path to the OpenAL install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local])
+
+AC_ARG_WITH( openal-include,
+ &nbsp; &nbsp;[ &nbsp;--with-openal-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenAL header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/include])
+
+AC_ARG_WITH( openal-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-openal-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenAL library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/lib])
+
+openal_lib=&quot;openal&quot;
+
+if test $with_openal
+then
+ &nbsp; &nbsp;openal_includes=&quot;$with_openal/include&quot;
+ &nbsp; &nbsp;openal_libraries=&quot;$with_openal/lib&quot;
+fi
+
+if test &quot;$with_openal_include&quot;
+then
+ &nbsp; &nbsp;openal_includes=&quot;$with_openal_include&quot;
+fi
+
+if test &quot;$with_openal_lib&quot;
+then
+ &nbsp; &nbsp;openal_libraries=&quot;$with_openal_lib&quot;
+fi
+
+
+dnl Set OPENAL_CFLAGS
+if test &quot;$openal_includes&quot;
+then
+ &nbsp; &nbsp;OPENAL_CFLAGS=&quot;-I$openal_includes&quot;
+fi
+
+dnl Set OPENAL_LIBS
+if test &quot;$openal_libraries&quot;
+then
+ &nbsp; &nbsp;OPENAL_LIBS=&quot;-L$openal_libraries&quot;
+fi
+OPENAL_LIBS=&quot;$OPENAL_LIBS -l$openal_lib&quot;
+
+_CPPFLAGS=&quot;$CPPFLAGS&quot;
+CPPFLAGS=&quot;$CXXFLAGS $OPENAL_CFLAGS&quot;
+
+AC_MSG_CHECKING(for OpenAL headers)
+AC_EGREP_CPP( yo_openal,
+[#include &lt;AL/altypes.h&gt;
+#ifdef AL_VERSION
+ &nbsp; yo_openal
+#endif],
+ &nbsp;have_openal_headers=&quot;yes&quot;,
+ &nbsp;have_openal_headers=&quot;no&quot; )
+
+if test &quot;$have_openal_headers&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$openal_includes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$openal_includes])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+dnl Test the libraries
+AC_MSG_CHECKING(for OpenAL libraries)
+
+CPPFLAGS=&quot;$CXXFLAGS $OPENAL_LIBS&quot;
+
+AC_TRY_LINK( , , have_openal_libraries=&quot;yes&quot;, have_openal_libraries=&quot;no&quot;)
+
+CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+if test &quot;$have_openal_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$openal_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$openal_libraries])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+openal_libraries=&quot;$openal_libraries&quot;
+
+if test &quot;$have_openal_headers&quot; = &quot;yes&quot; \
+ &nbsp; &amp;&amp; test &quot;$have_openal_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;have_openal=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_openal=&quot;no&quot;
+fi
+
+if test &quot;$have_openal&quot; = &quot;no&quot; -a &quot;$is_mandatory&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([OpenAL is needed to compile NeL (<A HREF="http://www.openal.org">http://www.openal.org</A>).])
+fi
+
+AC_SUBST(OPENAL_CFLAGS)
+AC_SUBST(OPENAL_LIBS)
+
+
+])
+
+
+# =========================================================================
+# AM_PATH_PYTHON : Python checking macros
+
+AC_DEFUN(AM_PATH_PYTHON,
+[ python_version_required=&quot;$1&quot;
+
+is_mandatory=&quot;$2&quot;
+
+AC_REQUIRE_CPP()
+
+dnl Get from the user option the path to the Python files location
+AC_ARG_WITH( python,
+ &nbsp; &nbsp;[ &nbsp;--with-python=&lt;path&gt; &nbsp; &nbsp;path to the Python prefix installation directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local],
+ &nbsp; &nbsp;[ PYTHON_PREFIX=$with_python ]
+)
+
+AC_ARG_WITH( python-version,
+ &nbsp; &nbsp;[ &nbsp;--with-python-version=&lt;version&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Python version to use, e.g. 1.5],
+ &nbsp; &nbsp;[ PYTHON_VERSION=$with_python_version ]
+)
+
+if test ! &quot;$PYTHON_PREFIX&quot; = &quot;&quot;
+then
+ &nbsp; &nbsp;PATH=&quot;$PYTHON_PREFIX/bin:$PATH&quot;
+fi
+
+if test ! &quot;$PYTHON_VERSION&quot; = &quot;&quot;
+then
+ &nbsp; &nbsp;PYTHON_EXEC=&quot;python$PYTHON_VERSION&quot;
+else
+ &nbsp; &nbsp;PYTHON_EXEC=&quot;python python2.1 python2.0 python1.5&quot;
+fi
+
+AC_PATH_PROGS(PYTHON, $PYTHON_EXEC, no, $PATH)
+
+if test &quot;$PYTHON&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;PYTHON_PREFIX=`$PYTHON -c 'import sys; print &quot;%s&quot; % (sys.prefix)'`
+ &nbsp; &nbsp;PYTHON_VERSION=`$PYTHON -c 'import sys; print &quot;%s&quot; % (sys.version[[:3]])'`
+
+ &nbsp; &nbsp;is_python_version_enough=`expr $python_version_required \&lt;= $PYTHON_VERSION`
+fi
+
+
+if test &quot;$PYTHON&quot; = &quot;no&quot; || test &quot;$is_python_version_enough&quot; != &quot;1&quot;
+then
+
+ &nbsp; &nbsp;if test &quot;$is_mandatory&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([Python $python_version_required must be installed (<A HREF="http://www.python.org">http://www.python.org</A>)])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;have_python=&quot;no&quot;
+ &nbsp; &nbsp;fi
+
+else
+
+ &nbsp; &nbsp;python_includes=&quot;$PYTHON_PREFIX/include/python$PYTHON_VERSION&quot;
+ &nbsp; &nbsp;python_libraries=&quot;$PYTHON_PREFIX/lib/python$PYTHON_VERSION/config&quot;
+ &nbsp; &nbsp;python_lib=&quot;python$PYTHON_VERSION&quot;
+
+ &nbsp; &nbsp;PYTHON_CFLAGS=&quot;-I$python_includes&quot;
+ &nbsp; &nbsp;PYTHON_LIBS=&quot;-L$python_libraries -l$python_lib&quot;
+
+ &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS ${PYTHON_CFLAGS}&quot;
+
+ &nbsp; &nbsp;dnl Test the headers
+ &nbsp; &nbsp;AC_MSG_CHECKING(for Python headers)
+
+ &nbsp; &nbsp;AC_EGREP_CPP( yo_python,
+ &nbsp; &nbsp;[#include &lt;Python.h&gt;
+ &nbsp; yo_python
+ &nbsp; &nbsp;],
+ &nbsp; &nbsp; &nbsp;have_python_headers=&quot;yes&quot;,
+ &nbsp; &nbsp; &nbsp;have_python_headers=&quot;no&quot; )
+
+ &nbsp; &nbsp;if test &quot;$have_python_headers&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$python_includes])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no)
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;dnl Test the libraries
+ &nbsp; &nbsp;AC_MSG_CHECKING(for Python libraries)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $PYTHON_CFLAGS&quot;
+
+ &nbsp; &nbsp;AC_TRY_LINK( , , have_python_libraries=&quot;yes&quot;, have_python_libraries=&quot;no&quot;)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+ &nbsp; &nbsp;if test &quot;$have_python_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$python_libraries&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$python_libraries])
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no)
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test &quot;$have_python_headers&quot; = &quot;yes&quot; \
+ &nbsp; &nbsp; &nbsp; &amp;&amp; test &quot;$have_python_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;have_python=&quot;yes&quot;
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;have_python=&quot;no&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test &quot;$have_python&quot; = &quot;no&quot; -a &quot;$is_mandatory&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([Python is needed to compile NeL (<A HREF="http://www.python.org">http://www.python.org</A>).])
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;AC_SUBST(PYTHON_CFLAGS)
+ &nbsp; &nbsp;AC_SUBST(PYTHON_LIBS)
+
+fi
+
+])
+
+
+# =========================================================================
+# AM_PATH_CCACHE : Ccache checking macros
+
+AC_DEFUN(AM_PATH_CCACHE,
+[
+
+AC_ARG_WITH( ccache,
+ &nbsp; &nbsp;[ &nbsp;--with-ccache &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; use ccache for compiling.],
+ &nbsp; &nbsp;[ using_ccache=$with_ccache ]
+)
+
+AC_PATH_PROG(CCACHE, ccache)
+if test &quot;$CCACHE&quot; -a &quot;$using_ccache&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;CC=&quot;ccache $CC&quot;
+ &nbsp; &nbsp;CXX=&quot;ccache $CXX&quot;
+fi
+
+])
+
+
+dnl =========================================================================
+dnl End of file
+
+</PRE> \ No newline at end of file
diff --git a/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup/index.html b/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup/index.html
new file mode 100644
index 00000000..7730ae70
--- /dev/null
+++ b/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.14&content-type=text/x-cvsweb-markup/index.html
@@ -0,0 +1,1093 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
+<HEAD><style> A { color:black }</style>
+<!-- hennerik CVSweb $Revision: 1.93 $ -->
+<TITLE>code/nelns/acinclude.m4 - view - 1.14</TITLE></HEAD>
+<BODY BGCOLOR="#eeeeee">
+<table width="100%" border=0 cellspacing=0 cellpadding=1 bgcolor="#aaaaaa"><tr valign=bottom><td><a href="acinclude.m4"><IMG SRC="http://www.nevrax.org/inc/img/picto-up.gif" ALT="[BACK]" BORDER="0" WIDTH="14" HEIGHT="13"></a> <b>Return to <A HREF="acinclude.m4">acinclude.m4</A>
+ CVS log</b> <IMG SRC="http://www.nevrax.org/inc/img/picto-news.gif" ALT="[TXT]" BORDER="0" WIDTH="13" HEIGHT="15"></td><td align=right><IMG SRC="http://www.nevrax.org/inc/img/picto-dir.gif" ALT="[DIR]" BORDER="0" WIDTH="15" HEIGHT="13"> <b>Up to <a href="/cvs/cvsweb.cgi/">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/">code</a> / <a href="/cvs/cvsweb.cgi/code/nelns/">nelns</a></b></td></tr></table><HR noshade><table width="100%"><tr><td bgcolor="#ffffff">File: <a href="/cvs/cvsweb.cgi/">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/">code</a> / <a href="/cvs/cvsweb.cgi/code/nelns/">nelns</a> / <a href="/cvs/cvsweb.cgi/code/nelns/acinclude.m4">acinclude.m4</a>&nbsp;(<A HREF="/cvs/cvsweb.cgi/~checkout~/code/nelns/acinclude.m4?rev=1.14" target="cvs_checkout" onClick="window.open('/cvs/cvsweb.cgi/~checkout~/code/nelns/acinclude.m4?rev=1.14','cvs_checkout','resizeable,scrollbars');"><b>download</b></A>)<BR>
+Revision <B>1.14</B>, <i>Thu Apr 25 17:52:16 2002 UTC</i> (5 weeks, 6 days ago) by <i>valignat</i>
+<BR>Branch: <b>MAIN</b>
+<BR>CVS Tags: <b>georges_v2, HEAD</b><BR>Changes since <b>1.13: +4 -1
+ lines</b><PRE>
+Added check on the 'pthread' library. SLTPort needs it.
+</PRE>
+</td></tr></table><HR noshade><PRE>dnl =========================================================================
+dnl
+dnl Macros used by Nevrax in configure.in files.
+dnl
+dnl $Id: acinclude.m4,v 1.14 2002/04/25 17:52:16 valignat Exp $
+dnl
+dnl =========================================================================
+
+dnl =========================================================================
+dnl WARNING: The original version of this file is placed in the $CVSROOT/code
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;directory.
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;There is links in the $CVSROOT/code sub-directories to that file
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(ex: $CVSROOT/code/nel), so be careful of the consequences of
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;any modification of that file.
+dnl =========================================================================
+
+dnl =========================================================================
+dnl Macros available in that file.
+dnl
+dnl
+dnl AM_NEL_DEBUG
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: manage the different debug and the release mode by setting
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; correctly the CFLAGS and CXXFLAGS variables.
+dnl
+dnl
+dnl AM_PATH_NEL
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the NeL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CXXFLAGS and LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_STLPORT
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the STLPort library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CXXFLAGS and LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_OPENGL
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the OpenGL library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OPENGL_CFLAGS and OPENGL_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_FREETYPE
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the Freetype library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FREETYPE_CFLAGS and FREETYPE_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_XF86VIDMODE
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; XF86VIDMODE_CFLAGS and XF86VIDMODE_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_OPENAL
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the OpenAL library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OPENAL_CFLAGS and OPENAL_LIBS variables to use it.
+dnl
+dnl
+dnl AM_PATH_PYTHON
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;&quot;yes&quot; if the use of the Python library is mandatory.
+dnl &nbsp; &nbsp;Description: check the instalation of the OpenGL library and set the
+dnl &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PYTHON_CFLAGS and PYTHON_LIBS variables to use it.
+dnl
+dnl AM_PATH_CCACHE
+dnl
+dnl &nbsp; &nbsp;Option: &nbsp; &nbsp; &nbsp;none.
+dnl &nbsp; &nbsp;Description: check the instalation of the Ccache utility.
+dnl
+dnl =========================================================================
+
+
+# =========================================================================
+# AM_NEL_DEBUG
+
+AC_DEFUN(AM_NEL_DEBUG,
+[
+
+MAX_C_OPTIMIZE=&quot;-O6&quot;
+
+STL_DEBUG=&quot;-D__STL_DEBUG&quot;
+
+NL_DEBUG=&quot;-DNL_DEBUG&quot;
+NL_DEBUG_FAST=&quot;-DNL_DEBUG_FAST&quot;
+NL_RELEASE_DEBUG=&quot;-DNL_RELEASE_DEBUG&quot;
+NL_RELEASE=&quot;-DNL_RELEASE&quot;
+
+AC_ARG_WITH(debug,
+ &nbsp; &nbsp;[ &nbsp;--with-debug[=full|medium|fast]
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Build a debug version (huge libraries).
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Full mode set only NeL and STL debug flags.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Medium mode set NeL debug flags with inline
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;optimization (default mode).
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Fast mode is like the Medium mode with some basic
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;optimization.
+ &nbsp;--without-debug &nbsp; &nbsp; &nbsp; &nbsp; Build without debugging code (default)],
+ &nbsp; &nbsp;[with_debug=$withval],
+ &nbsp; &nbsp;[with_debug=no])
+
+dnl Build optimized or debug version ?
+dnl First check for gcc and g++
+if test &quot;$ac_cv_prog_gcc&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;DEBUG_CFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CC=&quot;-O&quot;
+ &nbsp; &nbsp;OPTIMIZE_CFLAGS=&quot;$MAX_C_OPTIMIZE&quot;
+else
+ &nbsp; &nbsp;DEBUG_CFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CC=&quot;&quot;
+ &nbsp; &nbsp;OPTIMIZE_CFLAGS=&quot;-O&quot;
+fi
+
+if test &quot;$ac_cv_prog_cxx_g&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;DEBUG_CXXFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CXX=&quot;-O&quot;
+ &nbsp; &nbsp;OPTIMIZE_CXXFLAGS=&quot;-O3&quot;
+ &nbsp; &nbsp;OPTIMIZE_INLINE_CXXFLAGS=&quot;-finline-functions&quot;
+else
+ &nbsp; &nbsp;DEBUG_CXXFLAGS=&quot;-g&quot;
+ &nbsp; &nbsp;DEBUG_OPTIMIZE_CXX=&quot;&quot;
+ &nbsp; &nbsp;OPTIMIZE_CXXFLAGS=&quot;-O&quot;
+ &nbsp; &nbsp;OPTIMIZE_INLINE_CXXFLAGS=&quot;&quot;
+fi
+
+if test &quot;$with_debug&quot; = &quot;yes&quot; -o &quot;$with_debug&quot; = &quot;medium&quot;
+then
+ &nbsp; &nbsp;dnl Medium debug. Inline optimization
+ &nbsp; &nbsp;CFLAGS=&quot;$DEBUG_CFLAGS $OPTIMIZE_INLINE_CFLAGS $NL_DEBUG $NL_DEBUG_FAST $CFLAGS&quot;
+ &nbsp; &nbsp;CXXFLAGS=&quot;$DEBUG_CXXFLAGS $OPTIMIZE_INLINE_CXXFLAGS $NL_DEBUG $NL_DEBUG_FAST $CXXFLAGS&quot;
+else
+ &nbsp; &nbsp;if test &quot;$with_debug&quot; = &quot;full&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;dnl Full debug. Very slow in some cases
+ &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$DEBUG_CFLAGS $NL_DEBUG $STL_DEBUG $CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$DEBUG_CXXFLAGS $NL_DEBUG $STL_DEBUG $CXXFLAGS&quot;
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$with_debug&quot; = &quot;fast&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dnl Fast debug.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC $OPTIMIZE_INLINE_CFLAGS $NL_DEBUG $CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX $OPTIMIZE_INLINE_CXXFLAGS $NL_DEBUG $CXXFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dnl Optimized version. No debug
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$OPTIMIZE_CFLAGS $NL_RELEASE $CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$OPTIMIZE_CXXFLAGS $NL_RELEASE $CXXFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;fi
+fi
+
+dnl AC_MSG_RESULT([CFLAGS = $CFLAGS])
+dnl AC_MSG_RESULT([CXXGLAGS = $CXXFLAGS])
+
+])
+
+
+# =========================================================================
+# MY_NEL_HEADER_CHK : NeL header files checking macros
+
+AC_DEFUN(MY_NEL_HEADER_CHK,
+[ AC_REQUIRE_CPP()
+
+chk_message_obj=&quot;$1&quot;
+header=&quot;$2&quot;
+macro=&quot;$3&quot;
+is_mandatory=&quot;$4&quot;
+
+if test $is_mandatory = &quot;yes&quot;
+then
+
+ &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $NEL_CFLAGS&quot;
+
+ &nbsp; &nbsp;AC_MSG_CHECKING(for $header)
+
+ &nbsp; &nbsp;AC_EGREP_CPP( yo_header,
+[#include &lt;$header&gt;
+#ifdef $macro
+ &nbsp; yo_header
+#endif],
+ &nbsp;have_header=&quot;yes&quot;,
+ &nbsp;have_header=&quot;no&quot;)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+ &nbsp; &nbsp;if test &quot;$have_header&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$is_mandatory&quot; = &quot;yes&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([$chk_message_obj must be installed (<A HREF="http://www.nevrax.org">http://www.nevrax.org</A>).])
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no)
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;fi
+fi
+
+ &nbsp; &nbsp; &nbsp; &nbsp;
+])
+
+
+# =========================================================================
+# MY_NEL_LIB_CHK : NeL library checking macros
+
+AC_DEFUN(MY_NEL_LIB_CHK,
+[ AC_REQUIRE_CPP()
+
+chk_message_obj=&quot;$1&quot;
+nel_test_lib=&quot;$2&quot;
+is_mandatory=&quot;$3&quot;
+
+if test $is_mandatory = &quot;yes&quot;
+then
+
+ &nbsp; &nbsp;AC_CHECK_LIB($nel_test_lib, main,,[AC_MSG_ERROR([$chk_message_obj must be installed (<A HREF="http://www.nevrax.org">http://www.nevrax.org</A>).])])
+fi
+])
+
+
+# =========================================================================
+# AM_PATH_NEL : NeL checking macros
+AC_DEFUN(AM_PATH_NEL,
+[ AC_REQUIRE_CPP()
+
+AC_ARG_WITH( nel,
+ &nbsp; &nbsp;[ &nbsp;--with-nel=&lt;path&gt; &nbsp; &nbsp; &nbsp; path to the NeL install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/nel])
+
+AC_ARG_WITH( nel-include,
+ &nbsp; &nbsp;[ &nbsp;--with-nel-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the NeL header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/nel/include])
+
+AC_ARG_WITH( nel-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-nel-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the NeL library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/nel/lib])
+
+
+nelmisc_is_mandatory=&quot;$1&quot;
+nelnet_is_mandatory=&quot;$2&quot;
+nel3d_is_mandatory=&quot;$3&quot;
+nelpacs_is_mandatory=&quot;$4&quot;
+nelsound_is_mandatory=&quot;$5&quot;
+nelai_is_mandatory=&quot;$6&quot;
+nelgeorges_is_mandatory=&quot;$7&quot;
+
+dnl Check for nel-config
+AC_PATH_PROG(NEL_CONFIG, nel-config, no)
+
+dnl
+dnl Configure options (--with-nel*) have precendence
+dnl over nel-config only set variables if they are not
+dnl specified
+dnl
+if test &quot;$NEL_CONFIG&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;if test -z &quot;$with_nel&quot; -a -z &quot;$with_nel_include&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS `nel-config --cflags`&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test -z &quot;$with_nel&quot; -a -z &quot;$with_nel_lib&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;LDFLAGS=&quot;`nel-config --ldflags` $LDFLAGS&quot;
+ &nbsp; &nbsp;fi
+fi
+
+dnl
+dnl Set nel_libraries and nel_includes according to
+dnl user specification (--with-nel*) if any.
+dnl --with-nel-include and --with-nel-lib have precendence
+dnl over --with-nel
+dnl
+if test &quot;$with_nel&quot; = &quot;no&quot;
+then
+ &nbsp; &nbsp;dnl The user explicitly disabled the use of the NeL
+ &nbsp; &nbsp;AC_MSG_ERROR([NeL is mandatory: do not specify --without-nel])
+else
+ &nbsp; &nbsp;if test &quot;$with_nel&quot; -a &quot;$with_nel&quot; != &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;nel_includes=&quot;$with_nel/include&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;nel_libraries=&quot;$with_nel/lib&quot;
+ &nbsp; &nbsp;fi
+fi
+
+if test &quot;$with_nel_include&quot;
+then
+ &nbsp; &nbsp;nel_includes=&quot;$with_nel_include&quot;
+fi
+
+if test &quot;$with_nel_lib&quot;
+then
+ &nbsp; &nbsp;nel_libraries=&quot;$with_nel_lib&quot;
+fi
+
+dnl
+dnl Set compilation variables
+dnl
+if test &quot;$nel_includes&quot;
+then
+ &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS -I$nel_includes&quot;
+fi
+
+if test &quot;$nel_libraries&quot;
+then
+ &nbsp; &nbsp;LDFLAGS=&quot;-L$nel_libraries $LDFLAGS&quot;
+fi
+
+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 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 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 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
+
+MY_NEL_LIB_CHK([NeL Misc], [nelmisc], $nelmisc_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)
+
+])
+
+
+# =========================================================================
+# AM_PATH_STLPORT : STLPort checking macros
+
+AC_DEFUN(AM_PATH_STLPORT,
+[ AC_REQUIRE_CPP()
+
+AC_ARG_WITH( stlport,
+ &nbsp; &nbsp;[ &nbsp;--with-stlport=&lt;path&gt; &nbsp; path to the STLPort install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport])
+
+AC_ARG_WITH( stlport-include,
+ &nbsp; &nbsp;[ &nbsp;--with-stlport-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the STLPort header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport/stlport])
+
+AC_ARG_WITH( stlport-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-stlport-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the STLPort library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/stlport/lib])
+
+if test &quot;$with_debug&quot; = &quot;full&quot;
+then
+ stlport_lib=&quot;stlport_gcc_stldebug&quot;
+else
+ stlport_lib=&quot;stlport_gcc&quot;
+fi
+
+if test &quot;$with_stlport&quot; = no
+then
+ &nbsp; &nbsp;dnl The user explicitly disabled the use of the STLPorts
+ &nbsp; &nbsp;AC_MSG_ERROR([STLPort is mandatory: do not specify --without-stlport])
+else
+ &nbsp; &nbsp;stlport_includes=&quot;/usr/include/stlport&quot;
+ &nbsp; &nbsp;if test &quot;$with_stlport&quot; -a &quot;$with_stlport&quot; != yes
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;stlport_includes=&quot;$with_stlport/stlport&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;stlport_libraries=&quot;$with_stlport/lib&quot;
+
+ &nbsp; &nbsp; &nbsp; &nbsp;if test ! -d &quot;$stlport_includes&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;stlport_includes=&quot;$with_stlport/include/stlport&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;fi
+fi
+
+if test &quot;$with_stlport_include&quot;
+then
+ &nbsp; &nbsp;stlport_includes=&quot;$with_stlport_include&quot;
+fi
+
+if test &quot;$with_stlport_lib&quot;
+then
+ &nbsp; &nbsp;stlport_libraries=&quot;$with_stlport_lib&quot;
+fi
+
+dnl Check for the 'pthread' library. SLTPort needs it.
+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
+if test &quot;$stlport_includes&quot;
+then
+ &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS -I$stlport_includes&quot;
+fi
+
+dnl Put STLPorts libraries directory in LIBS
+if test &quot;$stlport_libraries&quot;
+then
+ &nbsp; &nbsp;LIBS=&quot;-L$stlport_libraries $LIBS&quot;
+else
+ &nbsp; &nbsp;stlport_libraries='default'
+fi
+
+dnl Test the headers
+
+AC_CHECK_HEADER(algorithm,
+ &nbsp; &nbsp;have_stlport_headers=&quot;yes&quot;,
+ &nbsp; &nbsp;have_stlport_headers=&quot;no&quot; )
+
+AC_MSG_CHECKING(for STLPort headers)
+
+if test &quot;$have_stlport_headers&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT([$stlport_includes])
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+AC_CHECK_LIB($stlport_lib, main,, have_stlport_libraries=&quot;no&quot;)
+
+AC_MSG_CHECKING(for STLPort library)
+
+if test &quot;$have_stlport_libraries&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT([$stlport_libraries])
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+if test &quot;$have_stlport_headers&quot; = &quot;yes&quot; &amp;&amp;
+ &nbsp; &nbsp;test &quot;$have_stlport_libraries&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;have_stlport=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_stlport=&quot;no&quot;
+fi
+
+if test &quot;$have_stlport&quot; = &quot;no&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([STLPort must be installed (<A HREF="http://www.stlport.org">http://www.stlport.org</A>).])
+fi
+
+AC_LANG_RESTORE
+
+])
+
+
+# =========================================================================
+# AM_PATH_OPENGL : OpenGL checking macros
+
+AC_DEFUN(AM_PATH_OPENGL,
+[ AC_MSG_CHECKING(for OpenGL headers and GL Version &gt;= 1.2)
+
+is_mandatory=&quot;$1&quot;
+
+AC_REQUIRE_CPP()
+
+AC_ARG_WITH( opengl,
+ &nbsp; &nbsp;[ &nbsp;--with-opengl=&lt;path&gt; &nbsp; &nbsp;path to the OpenGL install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local])
+
+AC_ARG_WITH( opengl-include,
+ &nbsp; &nbsp;[ &nbsp;--with-opengl-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenGL header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/include])
+
+AC_ARG_WITH( opengl-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-opengl-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenGL library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/lib])
+
+opengl_lib=&quot;GL&quot;
+
+if test &quot;$with_opengl&quot;
+then
+ &nbsp; &nbsp;opengl_includes=&quot;$with_opengl/include&quot;
+ &nbsp; &nbsp;opengl_libraries=&quot;$with_opengl/lib&quot;
+fi
+
+if test &quot;$with_opengl_include&quot;
+then
+ &nbsp; &nbsp;opengl_includes=&quot;$with_opengl_include&quot;
+fi
+
+if test &quot;$with_opengl_lib&quot;
+then
+ &nbsp; &nbsp;opengl_libraries=&quot;$with_opengl_lib&quot;
+fi
+
+dnl Set OPENGL_CFLAGS
+if test &quot;$opengl_includes&quot;
+then
+ &nbsp; &nbsp;OPENGL_CFLAGS=&quot;-I$opengl_includes&quot;
+fi
+
+dnl Set OPENGL_LIBS
+if test &quot;$opengl_libraries&quot;
+then
+ &nbsp; &nbsp;OPENGL_LIBS=&quot;-L$opengl_libraries&quot;
+fi
+OPENGL_LIBS=&quot;$OPENGL_LIBS -l$opengl_lib&quot;
+
+dnl Test the headers
+_CPPFLAGS=&quot;$CPPFLAGS&quot;
+
+CPPFLAGS=&quot;$CXXFLAGS $OPENGL_CFLAGS&quot;
+
+AC_EGREP_CPP( yo_opengl,
+[#include &lt;GL/gl.h&gt; &nbsp; &nbsp; &nbsp;
+#if defined(GL_VERSION_1_2)
+ &nbsp; yo_opengl
+#endif],
+ &nbsp;have_opengl_headers=&quot;yes&quot;,
+ &nbsp;have_opengl_headers=&quot;no&quot; )
+
+if test &quot;$have_opengl_headers&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$opengl_includes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$opengl_includes])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+dnl Checking the GLEXT version &gt;= 7
+AC_MSG_CHECKING(for &lt;GL/glext.h&gt; and GLEXT version &gt;= 7)
+
+AC_EGREP_CPP( yo_glext_version,
+[#include &lt;GL/glext.h&gt;
+#ifdef GL_GLEXT_VERSION
+#if GL_GLEXT_VERSION &gt;= 7
+ &nbsp; yo_glext_version
+#endif
+#endif],
+ &nbsp;have_glext=&quot;yes&quot;,
+ &nbsp;have_glext=&quot;no&quot; )
+
+if test &quot;$have_glext&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT(yes)
+else
+ &nbsp; &nbsp;AC_MSG_RESULT([no, &lt;GL/glext.h&gt; can be downloaded from <A HREF="http://oss.sgi.com/projects/ogl-sample/ABI/">http://oss.sgi.com/projects/ogl-sample/ABI/</A>])
+fi
+ &nbsp; &nbsp;
+dnl Test the libraries
+AC_MSG_CHECKING(for OpenGL libraries)
+
+CPPFLAGS=&quot;$CXXFLAGS $OPENGL_LIBS&quot;
+
+AC_TRY_LINK( , , have_opengl_libraries=&quot;yes&quot;, have_opengl_libraries=&quot;no&quot;)
+
+CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+if test &quot;$have_opengl_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$opengl_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$opengl_libraries])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+opengl_libraries=&quot;$opengl_libraries&quot;
+
+if test &quot;$have_opengl_headers&quot; = &quot;yes&quot; \
+ &nbsp; &nbsp; &nbsp; &nbsp;-a &quot;$have_glext&quot; = &quot;yes&quot; \
+ &nbsp; &nbsp; &nbsp; &nbsp;-a &quot;$have_opengl_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;have_opengl=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_opengl=&quot;no&quot;
+fi
+
+if test &quot;$have_opengl&quot; = &quot;no&quot; -a &quot;$is_mandatory&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([OpenGL &gt;= 1.2 must be installed (<A HREF="http://www.mesa3d.org">http://www.mesa3d.org</A>)])
+fi
+
+AC_SUBST(OPENGL_CFLAGS)
+AC_SUBST(OPENGL_LIBS)
+
+])
+
+
+# =========================================================================
+# AM_PATH_FREETYPE : FreeType checking macros
+
+AC_DEFUN(AM_PATH_FREETYPE,
+[ is_mandatory=&quot;$1&quot;
+
+AC_REQUIRE_CPP()
+
+AC_ARG_WITH( freetype,
+ &nbsp; &nbsp;[ &nbsp;--with-freetype=&lt;path&gt; &nbsp; path to the FreeType install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/freetype])
+
+AC_ARG_WITH( freetype-include,
+ &nbsp; &nbsp;[ &nbsp;--with-freetype-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the FreeType header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/freetype/include])
+
+AC_ARG_WITH( freetype-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-freetype-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the FreeType library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/freetype/lib])
+
+freetype_lib=&quot;freetype&quot;
+
+
+AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
+ &nbsp;
+if test &quot;$FREETYPE_CONFIG&quot; = &quot;no&quot;
+then
+ &nbsp; &nbsp;have_freetype_config=&quot;no&quot;
+else
+ &nbsp; &nbsp;FREETYPE_CFLAGS=`freetype-config --cflags`
+ &nbsp; &nbsp;FREETYPE_LIBS=`freetype-config --libs`
+ &nbsp; &nbsp;have_freetype_config=&quot;yes&quot;
+fi
+
+if test &quot;$with_freetype&quot;
+then
+ &nbsp; &nbsp;freetype_includes=&quot;$with_freetype/include&quot;
+ &nbsp; &nbsp;freetype_libraries=&quot;$with_freetype/lib&quot;
+fi
+
+if test &quot;$with_freetype_include&quot;
+then
+ &nbsp; &nbsp;freetype_includes=&quot;$with_freetype_include&quot;
+fi
+
+if test &quot;$with_freetype_lib&quot;
+then
+ &nbsp; &nbsp;freetype_libraries=&quot;$with_freetype_lib&quot;
+fi
+
+if test &quot;$freetype_includes&quot;
+then
+ &nbsp; &nbsp;FREETYPE_CFLAGS=&quot;-I$freetype_includes&quot;
+fi
+
+dnl Checking the FreeType 2 instalation
+_CPPFLAGS=&quot;$CPPFLAGS&quot;
+CPPFLAGS=&quot; $FREETYPE_CFLAGS $CXXFLAGS&quot;
+
+AC_MSG_CHECKING(for FreeType version = 2)
+
+AC_EGREP_CPP( yo_freetype2,
+[#include &lt;freetype/freetype.h&gt;
+#if FREETYPE_MAJOR == 2
+ &nbsp; yo_freetype2
+#endif],
+ &nbsp;have_freetype2=&quot;yes&quot;,
+ &nbsp;have_freetype2=&quot;no&quot;)
+
+if test &quot;$have_freetype2&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_RESULT(yes)
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+ &nbsp; &nbsp;
+dnl Test the libraries
+AC_MSG_CHECKING(for FreeType libraries)
+ &nbsp; &nbsp; &nbsp; &nbsp;
+if test $freetype_libraries
+then
+ &nbsp; &nbsp;FREETYPE_LIBS=&quot;-L$freetype_libraries -l$freetype_lib&quot;
+fi
+
+CPPFLAGS=&quot;$FREETYPE_LIBS $CXXFLAGS&quot;
+ &nbsp; &nbsp;
+AC_TRY_LINK( , , have_freetype_libraries=&quot;yes&quot;, have_freetype_libraries=&quot;no&quot;)
+
+CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+if test &quot;$have_freetype_libraries&quot; = &quot;yes&quot;
+then &nbsp; &nbsp;
+ &nbsp; &nbsp;if test &quot;$freetype_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$freetype_libraries])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+if test &quot;$have_freetype2&quot; = &quot;yes&quot; &amp;&amp; test &quot;$have_freetype_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;have_freetype=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_freetype=&quot;no&quot;
+fi
+
+if test &quot;$have_freetype&quot; = &quot;no&quot; &amp;&amp; test &quot;$is_mandatory&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([FreeType 2 must be installed (<A HREF="http://freetype.sourceforge.net">http://freetype.sourceforge.net</A>)])
+fi
+
+AC_SUBST(FREETYPE_CFLAGS)
+AC_SUBST(FREETYPE_LIBS)
+
+])
+
+
+# =========================================================================
+# AM_PATH_XF86VIDMODE : XF86VidMode checking macros
+
+AC_DEFUN(AM_PATH_XF86VIDMODE,
+[ AC_MSG_CHECKING(for XF86VidMode extension)
+
+AC_REQUIRE_CPP()
+
+AC_ARG_WITH( xf86vidmode-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-xf86vidmode-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the XF86VidMode library.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/X11R6/lib] )
+
+xf86vidmode_lib=&quot;Xxf86vm&quot;
+
+if test &quot;$with_xf86vidmode_lib&quot; = no
+then
+ &nbsp; &nbsp;dnl The user explicitly disabled the use of XF86VidMode
+ &nbsp; &nbsp;have_xf86vidmode=&quot;disabled&quot;
+ &nbsp; &nbsp;AC_MSG_RESULT(disabled)
+else
+ &nbsp; &nbsp;if test &quot;$with_xf86vidmode_lib&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;xf86vidmode_libraries=&quot;$with_xf86vidmode_lib&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;XF86VIDMODE_CFLAGS=&quot;-DXF86VIDMODE&quot;
+fi
+
+if test -z &quot;$have_xf86vidmode&quot;
+dnl -a &quot;$with_xf86vidmode_lib&quot;
+then
+ &nbsp; &nbsp;if test &quot;$xf86vidmode_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;XF86VIDMODE_LIBS=&quot;-L$xf86vidmode_libraries&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;XF86VIDMODE_LIBS=&quot;$XF86VIDMODE_LIBS -l$xf86vidmode_lib&quot;
+
+ &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $XF86VIDMODE_LIBS&quot;
+
+ &nbsp; &nbsp;AC_TRY_LINK( , , have_xf86vidmode_libraries=&quot;yes&quot;, have_xf86vidmode_libraries=&quot;no&quot;)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+ &nbsp; &nbsp;if test &quot;$have_xf86vidmode_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;have_xf86vidmode=&quot;yes&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$xf86vidmode_libraries&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT($xf86vidmode_libraries)
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;have_xf86vidmode=&quot;no&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no, no fullscreen support available.)
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;xf86vidmode_libraries=&quot;$xf86vidmode_libraries&quot;
+
+fi
+
+AC_SUBST(XF86VIDMODE_CFLAGS)
+AC_SUBST(XF86VIDMODE_LIBS)
+
+])
+
+
+# =========================================================================
+# AM_PATH_OPENAL : OpenAL checking macros
+
+AC_DEFUN(AM_PATH_OPENAL,
+[ is_mandatory=&quot;$1&quot;
+
+AC_REQUIRE_CPP()
+
+dnl Get from the user option the path to the OpenAL files location
+AC_ARG_WITH( openal,
+ &nbsp; &nbsp;[ &nbsp;--with-openal=&lt;path&gt; &nbsp; path to the OpenAL install files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local])
+
+AC_ARG_WITH( openal-include,
+ &nbsp; &nbsp;[ &nbsp;--with-openal-include=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenAL header files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/include])
+
+AC_ARG_WITH( openal-lib,
+ &nbsp; &nbsp;[ &nbsp;--with-openal-lib=&lt;path&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;path to the OpenAL library files directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local/lib])
+
+openal_lib=&quot;openal&quot;
+
+if test $with_openal
+then
+ &nbsp; &nbsp;openal_includes=&quot;$with_openal/include&quot;
+ &nbsp; &nbsp;openal_libraries=&quot;$with_openal/lib&quot;
+fi
+
+if test &quot;$with_openal_include&quot;
+then
+ &nbsp; &nbsp;openal_includes=&quot;$with_openal_include&quot;
+fi
+
+if test &quot;$with_openal_lib&quot;
+then
+ &nbsp; &nbsp;openal_libraries=&quot;$with_openal_lib&quot;
+fi
+
+
+dnl Set OPENAL_CFLAGS
+if test &quot;$openal_includes&quot;
+then
+ &nbsp; &nbsp;OPENAL_CFLAGS=&quot;-I$openal_includes&quot;
+fi
+
+dnl Set OPENAL_LIBS
+if test &quot;$openal_libraries&quot;
+then
+ &nbsp; &nbsp;OPENAL_LIBS=&quot;-L$openal_libraries&quot;
+fi
+OPENAL_LIBS=&quot;$OPENAL_LIBS -l$openal_lib&quot;
+
+_CPPFLAGS=&quot;$CPPFLAGS&quot;
+CPPFLAGS=&quot;$CXXFLAGS $OPENAL_CFLAGS&quot;
+
+AC_MSG_CHECKING(for OpenAL headers)
+AC_EGREP_CPP( yo_openal,
+[#include &lt;AL/altypes.h&gt;
+#ifdef AL_VERSION
+ &nbsp; yo_openal
+#endif],
+ &nbsp;have_openal_headers=&quot;yes&quot;,
+ &nbsp;have_openal_headers=&quot;no&quot; )
+
+if test &quot;$have_openal_headers&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$openal_includes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$openal_includes])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+dnl Test the libraries
+AC_MSG_CHECKING(for OpenAL libraries)
+
+CPPFLAGS=&quot;$CXXFLAGS $OPENAL_LIBS&quot;
+
+AC_TRY_LINK( , , have_openal_libraries=&quot;yes&quot;, have_openal_libraries=&quot;no&quot;)
+
+CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+if test &quot;$have_openal_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;if test &quot;$openal_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$openal_libraries])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;AC_MSG_RESULT(no)
+fi
+
+openal_libraries=&quot;$openal_libraries&quot;
+
+if test &quot;$have_openal_headers&quot; = &quot;yes&quot; \
+ &nbsp; &amp;&amp; test &quot;$have_openal_libraries&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;have_openal=&quot;yes&quot;
+else
+ &nbsp; &nbsp;have_openal=&quot;no&quot;
+fi
+
+if test &quot;$have_openal&quot; = &quot;no&quot; -a &quot;$is_mandatory&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;AC_MSG_ERROR([OpenAL is needed to compile NeL (<A HREF="http://www.openal.org">http://www.openal.org</A>).])
+fi
+
+AC_SUBST(OPENAL_CFLAGS)
+AC_SUBST(OPENAL_LIBS)
+
+
+])
+
+
+# =========================================================================
+# AM_PATH_PYTHON : Python checking macros
+
+AC_DEFUN(AM_PATH_PYTHON,
+[ python_version_required=&quot;$1&quot;
+
+is_mandatory=&quot;$2&quot;
+
+AC_REQUIRE_CPP()
+
+dnl Get from the user option the path to the Python files location
+AC_ARG_WITH( python,
+ &nbsp; &nbsp;[ &nbsp;--with-python=&lt;path&gt; &nbsp; &nbsp;path to the Python prefix installation directory.
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;e.g. /usr/local],
+ &nbsp; &nbsp;[ PYTHON_PREFIX=$with_python ]
+)
+
+AC_ARG_WITH( python-version,
+ &nbsp; &nbsp;[ &nbsp;--with-python-version=&lt;version&gt;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Python version to use, e.g. 1.5],
+ &nbsp; &nbsp;[ PYTHON_VERSION=$with_python_version ]
+)
+
+if test ! &quot;$PYTHON_PREFIX&quot; = &quot;&quot;
+then
+ &nbsp; &nbsp;PATH=&quot;$PYTHON_PREFIX/bin:$PATH&quot;
+fi
+
+if test ! &quot;$PYTHON_VERSION&quot; = &quot;&quot;
+then
+ &nbsp; &nbsp;PYTHON_EXEC=&quot;python$PYTHON_VERSION&quot;
+else
+ &nbsp; &nbsp;PYTHON_EXEC=&quot;python python2.1 python2.0 python1.5&quot;
+fi
+
+AC_PATH_PROGS(PYTHON, $PYTHON_EXEC, no, $PATH)
+
+if test &quot;$PYTHON&quot; != &quot;no&quot;
+then
+ &nbsp; &nbsp;PYTHON_PREFIX=`$PYTHON -c 'import sys; print &quot;%s&quot; % (sys.prefix)'`
+ &nbsp; &nbsp;PYTHON_VERSION=`$PYTHON -c 'import sys; print &quot;%s&quot; % (sys.version[[:3]])'`
+
+ &nbsp; &nbsp;is_python_version_enough=`expr $python_version_required \&lt;= $PYTHON_VERSION`
+fi
+
+
+if test &quot;$PYTHON&quot; = &quot;no&quot; || test &quot;$is_python_version_enough&quot; != &quot;1&quot;
+then
+
+ &nbsp; &nbsp;if test &quot;$is_mandatory&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([Python $python_version_required must be installed (<A HREF="http://www.python.org">http://www.python.org</A>)])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;have_python=&quot;no&quot;
+ &nbsp; &nbsp;fi
+
+else
+
+ &nbsp; &nbsp;python_includes=&quot;$PYTHON_PREFIX/include/python$PYTHON_VERSION&quot;
+ &nbsp; &nbsp;python_libraries=&quot;$PYTHON_PREFIX/lib/python$PYTHON_VERSION/config&quot;
+ &nbsp; &nbsp;python_lib=&quot;python$PYTHON_VERSION&quot;
+
+ &nbsp; &nbsp;PYTHON_CFLAGS=&quot;-I$python_includes&quot;
+ &nbsp; &nbsp;PYTHON_LIBS=&quot;-L$python_libraries -l$python_lib&quot;
+
+ &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS ${PYTHON_CFLAGS}&quot;
+
+ &nbsp; &nbsp;dnl Test the headers
+ &nbsp; &nbsp;AC_MSG_CHECKING(for Python headers)
+
+ &nbsp; &nbsp;AC_EGREP_CPP( yo_python,
+ &nbsp; &nbsp;[#include &lt;Python.h&gt;
+ &nbsp; yo_python
+ &nbsp; &nbsp;],
+ &nbsp; &nbsp; &nbsp;have_python_headers=&quot;yes&quot;,
+ &nbsp; &nbsp; &nbsp;have_python_headers=&quot;no&quot; )
+
+ &nbsp; &nbsp;if test &quot;$have_python_headers&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$python_includes])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no)
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;dnl Test the libraries
+ &nbsp; &nbsp;AC_MSG_CHECKING(for Python libraries)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $PYTHON_CFLAGS&quot;
+
+ &nbsp; &nbsp;AC_TRY_LINK( , , have_python_libraries=&quot;yes&quot;, have_python_libraries=&quot;no&quot;)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+ &nbsp; &nbsp;if test &quot;$have_python_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$python_libraries&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$python_libraries])
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(yes)
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no)
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test &quot;$have_python_headers&quot; = &quot;yes&quot; \
+ &nbsp; &nbsp; &nbsp; &amp;&amp; test &quot;$have_python_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;have_python=&quot;yes&quot;
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;have_python=&quot;no&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test &quot;$have_python&quot; = &quot;no&quot; -a &quot;$is_mandatory&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([Python is needed to compile NeL (<A HREF="http://www.python.org">http://www.python.org</A>).])
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;AC_SUBST(PYTHON_CFLAGS)
+ &nbsp; &nbsp;AC_SUBST(PYTHON_LIBS)
+
+fi
+
+])
+
+
+# =========================================================================
+# AM_PATH_CCACHE : Ccache checking macros
+
+AC_DEFUN(AM_PATH_CCACHE,
+[
+
+AC_ARG_WITH( ccache,
+ &nbsp; &nbsp;[ &nbsp;--with-ccache &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; use ccache for compiling.],
+ &nbsp; &nbsp;[ using_ccache=$with_ccache ]
+)
+
+AC_PATH_PROG(CCACHE, ccache)
+if test &quot;$CCACHE&quot; -a &quot;$using_ccache&quot; = &quot;yes&quot;
+then
+ &nbsp; &nbsp;CC=&quot;ccache $CC&quot;
+ &nbsp; &nbsp;CXX=&quot;ccache $CXX&quot;
+fi
+
+])
+
+
+dnl =========================================================================
+dnl End of file
+
+</PRE> \ No newline at end of file