aboutsummaryrefslogtreecommitdiff
path: root/cvs/cvsweb.cgi/code/acinclude.m4?rev=1.15&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/acinclude.m4?rev=1.15&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/acinclude.m4?rev=1.15&content-type=text')
-rw-r--r--cvs/cvsweb.cgi/code/acinclude.m4?rev=1.15&content-type=text/x-cvsweb-markup/index.html1263
1 files changed, 1263 insertions, 0 deletions
diff --git a/cvs/cvsweb.cgi/code/acinclude.m4?rev=1.15&content-type=text/x-cvsweb-markup/index.html b/cvs/cvsweb.cgi/code/acinclude.m4?rev=1.15&content-type=text/x-cvsweb-markup/index.html
new file mode 100644
index 00000000..06dec8d1
--- /dev/null
+++ b/cvs/cvsweb.cgi/code/acinclude.m4?rev=1.15&content-type=text/x-cvsweb-markup/index.html
@@ -0,0 +1,1263 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
+<HEAD><style> A { color:black }</style>
+<!-- hennerik CVSweb $Revision: 1.93 $ -->
+<TITLE>code/acinclude.m4 - view - 1.15</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></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/acinclude.m4">acinclude.m4</a>&nbsp;(<A HREF="/cvs/cvsweb.cgi/~checkout~/code/acinclude.m4?rev=1.15" target="cvs_checkout" onClick="window.open('/cvs/cvsweb.cgi/~checkout~/code/acinclude.m4?rev=1.15','cvs_checkout','resizeable,scrollbars');"><b>download</b></A>)<BR>
+Revision <B>1.15</B>, <i>Mon Oct 21 10:19:03 2002 UTC</i> (10 months ago) by <i>lecroart</i>
+<BR>Branch: <b>MAIN</b>
+<BR>CVS Tags: <b>ryzom_0_7_2, ryzom_0_7_0, ryzom_0_6_2, ryzom_0_6_1, ryzom_0_5_9, ryzom_0_5_7, ryzom_0_5_6, ryzom_0_5_5, ryzom_0_5_4, ryzom_0_5_3, ryzom_0_5_2, ryzom_0_5_1, ryzom_0_5_0, branch_ryzom_0_7_2, branch_ryzom_0_7_0, branch_ryzom_0_5_9, branch_ryzom_0_5_0, RYZOM_0_4_2, RYZOM_0_4_0, HEAD</b><BR>Changes since <b>1.14: +175 -5
+ lines</b><PRE>
+ADDED: mysql detection for login_service
+</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.15 2002/10/21 10:19:03 lecroart 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;&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;&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_debug&quot;
+else
+ stlport_lib=&quot;stlport&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
+
+])
+
+# =========================================================================
+# AM_PATH_MYSQL : MySQL library
+
+dnl AM_PATH_MYSQL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl Test for MYSQL, and define MYSQL_CFLAGS and MYSQL_LIBS
+dnl
+AC_DEFUN(AM_PATH_MYSQL,
+[dnl
+dnl Get the cflags and libraries from the mysql_config script
+dnl
+AC_ARG_WITH(mysql-prefix,[ &nbsp;--with-mysql-prefix=PFX &nbsp; Prefix where MYSQL is installed (optional)],
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mysql_prefix=&quot;$withval&quot;, mysql_prefix=&quot;&quot;)
+AC_ARG_WITH(mysql-exec-prefix,[ &nbsp;--with-mysql-exec-prefix=PFX Exec prefix where MYSQL is installed (optional)],
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mysql_exec_prefix=&quot;$withval&quot;, mysql_exec_prefix=&quot;&quot;)
+AC_ARG_ENABLE(mysqltest, [ &nbsp;--disable-mysqltest &nbsp; &nbsp; &nbsp; Do not try to compile and run a test MYSQL program],
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;, enable_mysqltest=yes)
+
+ &nbsp;if test x$mysql_exec_prefix != x ; then
+ &nbsp; &nbsp; mysql_args=&quot;$mysql_args --exec-prefix=$mysql_exec_prefix&quot;
+ &nbsp; &nbsp; if test x${MYSQL_CONFIG+set} != xset ; then
+ &nbsp; &nbsp; &nbsp; &nbsp;MYSQL_CONFIG=$mysql_exec_prefix/bin/mysql_config
+ &nbsp; &nbsp; fi
+ &nbsp;fi
+ &nbsp;if test x$mysql_prefix != x ; then
+ &nbsp; &nbsp; mysql_args=&quot;$mysql_args --prefix=$mysql_prefix&quot;
+ &nbsp; &nbsp; if test x${MYSQL_CONFIG+set} != xset ; then
+ &nbsp; &nbsp; &nbsp; &nbsp;MYSQL_CONFIG=$mysql_prefix/bin/mysql_config
+ &nbsp; &nbsp; fi
+ &nbsp;fi
+
+ &nbsp;AC_REQUIRE([AC_CANONICAL_TARGET])
+ &nbsp;AC_PATH_PROG(MYSQL_CONFIG, mysql_config, no)
+ &nbsp;min_mysql_version=ifelse([$1], ,0.11.0,$1)
+ &nbsp;AC_MSG_CHECKING(for MYSQL - version &gt;= $min_mysql_version)
+ &nbsp;no_mysql=&quot;&quot;
+ &nbsp;if test &quot;$MYSQL_CONFIG&quot; = &quot;no&quot; ; then
+ &nbsp; &nbsp;no_mysql=yes
+ &nbsp;else
+ &nbsp; &nbsp;MYSQL_CFLAGS=`$MYSQL_CONFIG $mysqlconf_args --cflags | sed -e &quot;s/'//g&quot;`
+ &nbsp; &nbsp;MYSQL_LIBS=`$MYSQL_CONFIG $mysqlconf_args --libs | sed -e &quot;s/'//g&quot;`
+
+ &nbsp; &nbsp;mysql_major_version=`$MYSQL_CONFIG $mysql_args --version | \
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ &nbsp; &nbsp;mysql_minor_version=`$MYSQL_CONFIG $mysql_args --version | \
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ &nbsp; &nbsp;mysql_micro_version=`$MYSQL_CONFIG $mysql_config_args --version | \
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ &nbsp; &nbsp;if test &quot;x$enable_mysqltest&quot; = &quot;xyes&quot; ; then
+ &nbsp; &nbsp; &nbsp;ac_save_CFLAGS=&quot;$CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp;ac_save_LIBS=&quot;$LIBS&quot;
+ &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$CFLAGS $MYSQL_CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp;LIBS=&quot;$LIBS $MYSQL_LIBS&quot;
+dnl
+dnl Now check if the installed MYSQL is sufficiently new. (Also sanity
+dnl checks the results of mysql_config to some extent
+dnl
+ &nbsp; &nbsp; &nbsp;rm -f conf.mysqltest
+ &nbsp; &nbsp; &nbsp;AC_TRY_RUN([
+#include &lt;stdio.h&gt;
+#include &lt;stdlib.h&gt;
+#include &lt;string.h&gt;
+#include &lt;mysql.h&gt;
+
+char*
+my_strdup (char *str)
+{
+ &nbsp;char *new_str;
+ &nbsp;
+ &nbsp;if (str)
+ &nbsp; &nbsp;{
+ &nbsp; &nbsp; &nbsp;new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
+ &nbsp; &nbsp; &nbsp;strcpy (new_str, str);
+ &nbsp; &nbsp;}
+ &nbsp;else
+ &nbsp; &nbsp;new_str = NULL;
+ &nbsp;
+ &nbsp;return new_str;
+}
+
+int main (int argc, char *argv[])
+{
+ &nbsp;int major, minor, micro;
+ &nbsp;char *tmp_version;
+
+ &nbsp;/* This hangs on some systems (?)
+ &nbsp;system (&quot;touch conf.mysqltest&quot;);
+ &nbsp;*/
+ &nbsp;{ FILE *fp = fopen(&quot;conf.mysqltest&quot;, &quot;a&quot;); if ( fp ) fclose(fp); }
+
+ &nbsp;/* HP/UX 9 (%@#!) writes to sscanf strings */
+ &nbsp;tmp_version = my_strdup(&quot;$min_mysql_version&quot;);
+ &nbsp;if (sscanf(tmp_version, &quot;%d.%d.%d&quot;, &amp;major, &amp;minor, &amp;micro) != 3) {
+ &nbsp; &nbsp; printf(&quot;%s, bad version string\n&quot;, &quot;$min_mysql_version&quot;);
+ &nbsp; &nbsp; exit(1);
+ &nbsp; }
+
+ &nbsp; if (($mysql_major_version &gt; major) ||
+ &nbsp; &nbsp; &nbsp;(($mysql_major_version == major) &amp;&amp; ($mysql_minor_version &gt; minor)) ||
+ &nbsp; &nbsp; &nbsp;(($mysql_major_version == major) &amp;&amp; ($mysql_minor_version == minor) &amp;&amp; ($mysql_micro_version &gt;= micro)))
+ &nbsp; &nbsp;{
+ &nbsp; &nbsp; &nbsp;return 0;
+ &nbsp; &nbsp;}
+ &nbsp;else
+ &nbsp; &nbsp;{
+ &nbsp; &nbsp; &nbsp;printf(&quot;\n*** 'mysql_config --version' returned %d.%d.%d, but the minimum version\n&quot;, $mysql_major_version, $mysql_minor_version, $mysql_micro_version);
+ &nbsp; &nbsp; &nbsp;printf(&quot;*** of MYSQL required is %d.%d.%d. If mysql_config is correct, then it is\n&quot;, major, minor, micro);
+ &nbsp; &nbsp; &nbsp;printf(&quot;*** best to upgrade to the required version.\n&quot;);
+ &nbsp; &nbsp; &nbsp;printf(&quot;*** If mysql_config was wrong, set the environment variable MYSQL_CONFIG\n&quot;);
+ &nbsp; &nbsp; &nbsp;printf(&quot;*** to point to the correct copy of mysql_config, and remove the file\n&quot;);
+ &nbsp; &nbsp; &nbsp;printf(&quot;*** config.cache before re-running configure\n&quot;);
+ &nbsp; &nbsp; &nbsp;return 1;
+ &nbsp; &nbsp;}
+}
+
+],, no_mysql=yes,[echo $ac_n &quot;cross compiling; assumed OK... $ac_c&quot;])
+ &nbsp; &nbsp; &nbsp; CFLAGS=&quot;$ac_save_CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; LIBS=&quot;$ac_save_LIBS&quot;
+ &nbsp; &nbsp; fi
+ &nbsp;fi
+ &nbsp;if test &quot;x$no_mysql&quot; = x ; then
+ &nbsp; &nbsp; AC_MSG_RESULT(yes)
+ &nbsp; &nbsp; ifelse([$2], , :, [$2]) &nbsp; &nbsp;
+ &nbsp;else
+ &nbsp; &nbsp; AC_MSG_RESULT(no)
+ &nbsp; &nbsp; if test &quot;$MYSQL_CONFIG&quot; = &quot;no&quot; ; then
+ &nbsp; &nbsp; &nbsp; echo &quot;*** The mysql_config script installed by MYSQL could not be found&quot;
+ &nbsp; &nbsp; &nbsp; echo &quot;*** If MYSQL was installed in PREFIX, make sure PREFIX/bin is in&quot;
+ &nbsp; &nbsp; &nbsp; echo &quot;*** your path, or set the MYSQL_CONFIG environment variable to the&quot;
+ &nbsp; &nbsp; &nbsp; echo &quot;*** full path to mysql_config.&quot;
+ &nbsp; &nbsp; else
+ &nbsp; &nbsp; &nbsp; if test -f conf.mysqltest ; then
+ &nbsp; &nbsp; &nbsp; &nbsp;:
+ &nbsp; &nbsp; &nbsp; else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;*** Could not run MYSQL test program, checking why...&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$CFLAGS $MYSQL_CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LIBS=&quot;$LIBS $MYSQL_LIBS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AC_TRY_LINK([
+#include &lt;stdio.h&gt;
+#include &lt;mysql.h&gt;
+
+int main(int argc, char *argv[])
+{ return 0; }
+#undef &nbsp;main
+#define main K_and_R_C_main
+], &nbsp; &nbsp; &nbsp;[ return 0; ],
+ &nbsp; &nbsp; &nbsp; &nbsp;[ echo &quot;*** The test program compiled, but did not run. This usually means&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;*** that the run-time linker is not finding MYSQL or finding the wrong&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;*** version of MYSQL. If it is not finding MYSQL, you'll need to set your&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;*** to the installed location &nbsp;Also, make sure you have run ldconfig if that&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;*** is required on your system&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;***&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;*** If you have an old version installed, it is best to remove it, although&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;*** you may also be able to get things to work by modifying LD_LIBRARY_PATH&quot;],
+ &nbsp; &nbsp; &nbsp; &nbsp;[ echo &quot;*** The test program failed to compile or link. See the file config.log for the&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;*** exact error that occured. This usually means MYSQL was incorrectly installed&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;*** or that you have moved MYSQL since it was installed. In the latter case, you&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;*** may want to edit the mysql_config script: $MYSQL_CONFIG&quot; ])
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$ac_save_CFLAGS&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;LIBS=&quot;$ac_save_LIBS&quot;
+ &nbsp; &nbsp; &nbsp; fi
+ &nbsp; &nbsp; fi
+ &nbsp; &nbsp; MYSQL_CFLAGS=&quot;&quot;
+ &nbsp; &nbsp; MYSQL_LIBS=&quot;&quot;
+ &nbsp; &nbsp; ifelse([$3], , :, [$3])
+ &nbsp;fi
+ &nbsp;AC_SUBST(MYSQL_CFLAGS)
+ &nbsp;AC_SUBST(MYSQL_LIBS)
+ &nbsp;rm -f conf.mysqltest
+])
+
+dnl =========================================================================
+dnl End of file
+
+</PRE> \ No newline at end of file