aboutsummaryrefslogtreecommitdiff
path: root/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.1&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.1&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.1&content-type=text')
-rw-r--r--cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.1&content-type=text/x-cvsweb-markup&only_with_tag=MAIN/index.html1082
1 files changed, 1082 insertions, 0 deletions
diff --git a/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.1&content-type=text/x-cvsweb-markup&only_with_tag=MAIN/index.html b/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.1&content-type=text/x-cvsweb-markup&only_with_tag=MAIN/index.html
new file mode 100644
index 00000000..f407b5dd
--- /dev/null
+++ b/cvs/cvsweb.cgi/code/nelns/acinclude.m4?rev=1.1&content-type=text/x-cvsweb-markup&only_with_tag=MAIN/index.html
@@ -0,0 +1,1082 @@
+<!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.1</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.1&amp;only_with_tag=MAIN" target="cvs_checkout" onClick="window.open('/cvs/cvsweb.cgi/~checkout~/code/nelns/acinclude.m4?rev=1.1','cvs_checkout','resizeable,scrollbars');"><b>download</b></A>)<BR>
+Revision <B>1.1</B>, <i>Mon Jan 7 16:09:52 2002 UTC</i> (6 months, 2 weeks ago) by <i>valignat</i>
+<BR>Branch: <b>MAIN</b>
+<PRE>
+Rewrited NeL, NeLNS, and Snowballs configure.in scripts.
+ADDED an 'acinclude.m4' file which contain all M4 macros to check paths of the libraries that we need and macros to check the intalation of NeL. This file is placed in the code directory and there is symbolic links to that file in the 'nel', 'nelns' and 'snowballs2' directories.
+</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.1 2002/01/07 16:09:52 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_LIB 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_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;
+dnl 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_dir_lnk=&quot;$2&quot;
+nel_libraries=&quot;$3&quot;
+nel_test_lib=&quot;$4&quot;
+is_mandatory=&quot;$5&quot;
+
+if test $is_mandatory = &quot;yes&quot;
+then
+
+ &nbsp; &nbsp;AC_MSG_CHECKING(for -l$nel_test_lib)
+ &nbsp; &nbsp; &nbsp; &nbsp;
+ &nbsp; &nbsp;if test $nel_libraries
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;NEL_TEST_LIB=&quot;-L$nel_libraries -l$nel_test_lib&quot;
+
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;NEL_TEST_LIB=&quot;$nel_dir_lnk -l$nel_test_lib&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $NEL_TEST_LIBS&quot;
+
+ &nbsp; &nbsp;AC_TRY_LINK( , , have_nel_test_libraries=&quot;yes&quot;, have_nel_test_libraries=&quot;no&quot;)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+ &nbsp; &nbsp;if test &quot;$have_nel_test_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then &nbsp; &nbsp;
+ &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
+])
+
+
+# =========================================================================
+# 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/stlport])
+
+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])
+
+
+nel_misc_lib=&quot;nelmisc&quot;
+nel_net_lib=&quot;nelnet&quot;
+nel_3d_lib=&quot;nel3d&quot;
+nel_pacs_lib=&quot;nelpacs&quot;
+nel_sound_lib=&quot;nelsound&quot;
+nel_ai_lib=&quot;nelai&quot;
+
+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;
+
+nelconfig_libs_args=&quot;&quot;
+
+if test &quot;$nelnet_is_mandatory&quot; != &quot;yes&quot;
+then
+ &nbsp; &nbsp;nelconfig_libs_args=&quot;$nelconfig_libs_args --without-network&quot;
+fi
+
+if test &quot;$nel3d_is_mandatory&quot; != &quot;yes&quot;
+then
+ &nbsp; &nbsp;nelconfig_libs_args=&quot;$nelconfig_libs_args --without-3d&quot;
+fi
+
+if test &quot;$nelpacs_is_mandatory&quot; != &quot;yes&quot;
+then
+ &nbsp; &nbsp;nelconfig_libs_args=&quot;$nelconfig_libs_args --without-pacs&quot;
+fi
+
+if test &quot;$nelsound_is_mandatory&quot; != &quot;yes&quot;
+then
+ &nbsp; &nbsp;nelconfig_libs_args=&quot;$nelconfig_libs_args --without-sound&quot;
+fi
+
+if test &quot;$nelai_is_mandatory&quot; != &quot;yes&quot;
+then
+ &nbsp; &nbsp;nelconfig_libs_args=&quot;$nelconfig_libs_args --without-ai&quot;
+fi
+
+dnl Check for nel-config
+AC_PATH_PROG(NEL_CONFIG, nel-config, no)
+
+if test &quot;$NEL_CONFIG&quot; = &quot;no&quot;
+then
+ &nbsp; &nbsp;have_nel_config=&quot;no&quot;
+else
+ &nbsp; &nbsp;NEL_CFLAGS=`nel-config --cflags`
+ &nbsp; &nbsp;NEL_LIBS=`nel-config --libs $nelconfig_libs_args`
+
+ &nbsp; &nbsp;nel_dir_lnk=`echo '$NEL_LIBS' | sed -e 's/[[:space:]]*-l[^[:space:]]*//g'`
+
+ &nbsp; &nbsp;have_nel_config=&quot;yes&quot;
+fi
+
+if test &quot;$with_nel&quot;
+then
+ &nbsp; &nbsp;nel_includes=&quot;$with_nel/include&quot;
+ &nbsp; &nbsp;nel_libraries=&quot;$with_nel/lib&quot;
+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
+
+if test &quot;$nel_includes&quot;
+then
+ &nbsp; &nbsp;NEL_CFLAGS=&quot;-I$nel_includes&quot;
+fi
+
+dnl Checking for NeL headers
+MY_NEL_HEADER_CHK([NeL Misc], [nel/misc/types_nl.h], [NL_TYPES_H], $nelmisc_is_mandatory)
+MY_NEL_HEADER_CHK([NeL 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)
+
+dnl Checking for NeL libraries
+MY_NEL_LIB_CHK([NeL Misc], $nel_dir_lnk, $nel_libraries, $nel_misc_lib, $nelmisc_is_mandatory)
+MY_NEL_LIB_CHK([NeL Network], $nel_dir_lnk, $nel_libraries, $nel_net_lib, $nelnet_is_mandatory)
+MY_NEL_LIB_CHK([NeL 3D], $nel_dir_lnk, $nel_libraries, $nel_3d_lib, $nel3d_is_mandatory)
+MY_NEL_LIB_CHK([NeL PACS], $nel_dir_lnk, $nel_libraries, $nel_pacs_lib, $nelpacs_is_mandatory)
+MY_NEL_LIB_CHK([NeL Sound], $nel_dir_lnk, $nel_libraries, $nel_sound_lib, $nelsound_is_mandatory)
+MY_NEL_LIB_CHK([NeL AI], $nel_dir_lnk, $nel_libraries, $nel_ai_lib, $nelai_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])
+
+stlport_lib=&quot;stlport_gcc&quot;
+
+if test &quot;$with_stlport&quot; = no
+then
+ &nbsp; &nbsp;dnl The user explicitly disabled the use of the STLPorts
+ &nbsp; &nbsp;AC_MSG_CHECKING(STLPort)
+ &nbsp; &nbsp;have_stlport=&quot;disabled&quot;
+ &nbsp; &nbsp;AC_MSG_RESULT(disabled (*** EXPERIMENTAL ***))
+else
+ &nbsp; &nbsp;if test &quot;$with_stlport&quot;
+ &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;fi
+fi
+
+if test -z &quot;$have_stlport&quot; -a &quot;$with_stlport_include&quot;
+then
+ &nbsp; &nbsp;stlport_includes=&quot;$with_stlport_include&quot;
+fi
+
+if test -z &quot;$have_stlport&quot; -a &quot;$with_stlport_lib&quot;
+then
+ &nbsp; &nbsp;stlport_libraries=&quot;$with_stlport_lib&quot;
+fi
+
+if test -z &quot;$have_stlport&quot;
+then
+ &nbsp; &nbsp;dnl Put STLPorts includes in CXXFLAGS
+ &nbsp; &nbsp;if test &quot;$stlport_includes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;CXXFLAGS=&quot;$CXXFLAGS -I$stlport_includes&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;dnl Put STLPorts libraries in LIBS
+ &nbsp; &nbsp;if test &quot;$stlport_libraries&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;LIBS=&quot;-L$stlport_libraries $LIBS -l$stlport_lib&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;dnl Test the headers
+ &nbsp; &nbsp;AC_MSG_CHECKING(for STLPort headers)
+
+ &nbsp; &nbsp;_CPPFLAGS=&quot;$CPPFLAGS&quot;
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS&quot;
+
+ &nbsp; &nbsp;AC_EGREP_CPP( yo_stlport,
+ &nbsp; &nbsp;[#include &lt;algorithm&gt;
+#ifdef __SGI_STL_PORT
+ &nbsp; yo_stlport
+#endif],
+ &nbsp; &nbsp; &nbsp;have_stlport_headers=&quot;yes&quot;,
+ &nbsp; &nbsp; &nbsp;have_stlport_headers=&quot;no&quot; )
+
+ &nbsp; &nbsp;if test &quot;$have_stlport_headers&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$stlport_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 STLPort libraries)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$CXXFLAGS $LIBS&quot;
+
+ &nbsp; &nbsp;AC_TRY_LINK( , , have_stlport_libraries=&quot;yes&quot;, have_stlport_libraries=&quot;no&quot;)
+
+ &nbsp; &nbsp;CPPFLAGS=&quot;$_CPPFLAGS&quot;
+
+ &nbsp; &nbsp;if test &quot;$have_stlport_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT([$stlport_libraries])
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_RESULT(no)
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test &quot;$have_stlport_headers&quot; = &quot;yes&quot; \
+ &nbsp; &nbsp; &nbsp; &amp;&amp; test &quot;$have_stlport_libraries&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;have_stlport=&quot;yes&quot;
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;have_stlport=&quot;no&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test &quot;$have_stlport&quot; = &quot;no&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([STLPort must be installed (<A HREF="http://www.stlport.org">http://www.stlport.org</A>).])
+ &nbsp; &nbsp;fi
+
+fi
+
+])
+
+
+# =========================================================================
+# 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;$CXXFLAGS $FREETYPE_CFLAGS&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;$CXXFLAGS $FREETYPE_LIBS&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_LIB=&quot;$OPENAL_LIB -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_LIB&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_LIB)
+
+
+])
+
+
+# =========================================================================
+# AM_PATH_PYTHON : Python checking macros
+
+AC_DEFUN(AM_PATH_PYTHON,
+[ is_mandatory=&quot;$1&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.0 python1.5&quot;
+fi
+
+AC_PATH_PROGS(PYTHON, $PYTHON_EXEC, no, $PATH)
+
+if test &quot;$PYTHON&quot; = &quot;no&quot;
+then
+
+ &nbsp; &nbsp;if test &quot;$is_mandatory&quot; = &quot;yes&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;AC_MSG_ERROR([Python 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_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;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
+
+])
+
+
+dnl =========================================================================
+dnl End of file
+</PRE> \ No newline at end of file