⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 acinclude.m4

📁 机器人足球AI设计比赛
💻 M4
📖 第 1 页 / 共 2 页
字号:
	AC_ARG_VAR(DEVIL, [location of DevIL installation])	if test $DEVIL; then		CPPFLAGS="$CPPFLAGS -I$DEVIL/include"		LDFLAGS="$LDFLAGS -L$DEVIL/lib"	fi	RCSS_KEROSIN_IF_ELSE([                              AC_CHECK_HEADER([IL/il.h],,                              RCSS_BUILD_KEROSIN_ERROR([DevIL headers not found. Please set CPPFLAGS appropriately or you can specify the location of the DevIL installation using the DEVIL environment variable (e.g. ./configure DEVIL=$HOME/DevIL)]))                              ])	RCSS_KEROSIN_IF_ELSE([                              rcss_tmp="$LDFLAGS"                              LDFLAGS="$LDFLAGS -lIL"                              AC_LINK_IFELSE([#include <IL/il.h>#include <stdarg.h> /* _vsnprintf may be undefined (and it is needed by libIL) */extern "C" int _vsnprintf(char *str, size_t size, const char *format, va_list ap) { return 0;}                                              int main() { ilInit(); return 0; }],,        		      RCSS_BUILD_KEROSIN_ERROR([The DevIL library (libIL.a or libIL.so) cannot be found. Please set LDFLAGS appropriately or you can specify the location of the DevIL installation using the DEVIL environment variable (e.g. ./configure DEVIL=$HOME/DevIL)]))                              LDFLAGS="$rcss_tmp"                              ])]) # RCSS_CHECK_DEVIL# RCSS_CHECK_SDL# 	if rcss_build_kerosin is (still) set to 'yes', check for the SDL#	headers and libraries.#	If SDL headers or libraries can not be found, building kerosin will be#       disabled.#-----------------------------------------------------------------------------AC_DEFUN([RCSS_CHECK_SDL], [	AC_ARG_VAR(SDL, [location of SDL installation])	if test $SDL; then		CPPFLAGS="$CPPFLAGS -I$SDL/include"		LDFLAGS="$LDFLAGS -L$SDL/lib"	fi	RCSS_KEROSIN_IF_ELSE([                              AC_CHECK_HEADER([SDL/SDL.h],,                              RCSS_BUILD_KEROSIN_ERROR([Simple DirectMedia Layer (SDL) headers not found. Please set CPPFLAGS appropriately or you can specify the location of the SDL installation using the SDL environment variable (e.g. ./configure SDL=$HOME/SDL)]))                              ])	RCSS_KEROSIN_IF_ELSE([                              rcss_tmp="$LDFLAGS"                              LDFLAGS="$LDFLAGS -lSDL"                              AC_LINK_IFELSE([#include <SDL/SDL.h>                                              int main() { return SDL_Init(0); }],,        		      RCSS_BUILD_KEROSIN_ERROR([The SDL library (libSDL.a or libSDL.so) cannot be found. Please set LDFLAGS appropriately or you can specify the location of the SDL installation using the SDL environment variable (e.g. ./configure SDL=$HOME/SDL)]))                              LDFLAGS="$rcss_tmp"                              ])]) # RCSS_CHECK_SDL# RCSS_CHECK_SLANG#-----------------------------------------------------------------------------AC_DEFUN([RCSS_CHECK_SLANG], [	RCSS_KEROSIN_IF_ELSE([                              rcss_tmp="$LDFLAGS"                              LDFLAGS="$LDFLAGS -lslang"                              AC_LINK_IFELSE([int main() { return 0; }],,        		      RCSS_BUILD_KEROSIN_ERROR([The S-Lang library (libslang.a or libslang.so) cannot be found. Please set LDFLAGS appropriately.]))                              LDFLAGS="$rcss_tmp"	])]) # RCSS_CHECK_SLANG# RCSS_BUILD_SOUNDSYSTEMFMOD#	defines a conditional BUILD_SOUNDSYSTEMFMOD if the required header#	and library exists. Up to date, there is no version check for the #	fmod library.#-----------------------------------------------------------------------------AC_DEFUN([RCSS_BUILD_SOUNDSYSTEMFMOD], [	AC_CHECK_HEADER(fmod/fmod.h, 			[rcss_soundsystemfmod="true"], 			[rcss_soundsystemfmod="false" &&			 AC_MSG_WARN([FMOD Sound module will not be built])])	if test $rcss_soundsystemfmod = "true"; then		AC_MSG_CHECKING([if linking against libfmod is succeeds])		rcss_tmp="$LDFLAGS"		LDFLAGS="$LDFLAGS -lfmod" 		AC_LINK_IFELSE([#include <fmod/fmod.h>				int main() { return FSOUND_GetVolume(0); }],				[rcss_soundsystemfmod="true" && AC_MSG_RESULT([yes])],				[rcss_soundsystemfmod="false" && 				 AC_MSG_RESULT([no]) &&				 AC_MSG_WARN([there should be a link in one of your libdirs from libfmod.so to libfmod-X.YZ.so. If the link exists, try setting the LDFLAGS environment variable appropriately.])])		LDFLAGS="$rcss_tmp"	fi			AM_CONDITIONAL(BUILD_SOUNDSYSTEMFMOD, test x$rcss_soundsystemfmod = xtrue)]) # RCSS_BUILD_SOUNDSYSTEMFMOD# RCSS_BUILD_KEROSIN_INTERNAL# 	defines preprocessor symbol HAVE_KEROSIN_H if kerosin can be build#       set automake conditional BUILD_KEROSIN to true if kerosin can be build#-----------------------------------------------------------------------------AC_DEFUN([RCSS_BUILD_KEROSIN_INTERNAL], [	RCSS_CHECK_GL 	RCSS_PATH_FREETYPE	RCSS_CHECK_SDL	RCSS_CHECK_DEVIL	RCSS_CHECK_SLANG    	AC_MSG_CHECKING([if libkerosin will be build]) 	AC_MSG_RESULT([$rcss_build_kerosin])	RCSS_KEROSIN_IF_ELSE([AC_DEFINE(HAVE_KEROSIN_H, 1, [Define to 1 if using the kerosin header])],[ 		AC_MSG_ERROR([libkerosin cannot be build without all required libraries.])    		AC_MSG_ERROR([the list of libraries required for kerosin can be found in the documentation]) 	])]) # RCSS_BUILD_KEROSIN_INTERNAL# RCSS_BUILD_KEROSIN# 	set rcss_build_kerosin to 'yes'#-----------------------------------------------------------------------------AC_DEFUN([RCSS_BUILD_KEROSIN], [	# --enable-kerosin	AC_ARG_ENABLE(kerosin,		AC_HELP_STRING([--enable-kerosin=@<:@yes|no@:>@],       	 		       [whether to compile libkerosin (default is no)]),		    [rcss_build_kerosin="$enableval"],		    [rcss_build_kerosin=no]	)	if test "$rcss_build_kerosin" = yes; then		AC_MSG_NOTICE([Checking prerequisites for kerosin...])		AC_PATH_X		RCSS_BUILD_KEROSIN_INTERNAL	fi	AM_CONDITIONAL(BUILD_KEROSIN, test x$rcss_build_kerosin = xyes)	if test "$rcss_build_kerosin" = no; then		AC_MSG_NOTICE([libkerosin will not be build...]) 		AC_MSG_NOTICE([...you can enable it using the --enable-kerosin flag])	fi]) # RCSS_BUILD_KEROSIN# RCSS_BUILD_KEROSIN_ERROR# 	print a warning and set rcss_build_kerosin to 'no'#-----------------------------------------------------------------------------AC_DEFUN([RCSS_BUILD_KEROSIN_ERROR], [	AC_MSG_WARN($1)	rcss_build_kerosin=no]) # RCSS_BUILD_KEROSIN_ERROR# RCSS_KEROSIN_IF_ELSE# 	if rcss_build_kerosin is 'yes', execute the if part (first parameter)#	if rcss_build_kerosin is unequal to 'yes', execute the else part (2nd)#-----------------------------------------------------------------------------AC_DEFUN([RCSS_KEROSIN_IF_ELSE], [	if test "$rcss_build_kerosin" = yes; then		:		$1	else		:		$2	fi]) # RCSS_KEROSIN_IF_ELSE# AC_LIB_SPADES([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])# ---------------------------------------------------------# Checks for the spades libraryAC_DEFUN([AC_LIB_SPADES],[AS_VAR_PUSHDEF([ac_lib_spades], [ac_cv_lib_spades])dnlAC_CACHE_CHECK(whether the spades library is available, ac_cv_lib_spades,               [AC_LANG_PUSH(C++)                OLD_LDFLAGS="$LDFLAGS"                LDFLAGS="$LDFLAGS -lspades"                AC_LINK_IFELSE([@%:@include <spades/enginemain.hpp>                                int main()                                {                                    spades::SimulationEngineMain( 0, NULL, NULL );                                    return 0;                                }],                                [AS_VAR_SET(ac_lib_spades, yes)],                                 [AS_VAR_SET(ac_lib_spades, no)])                LDFLAGS="$OLD_LDFLAGS"                AC_LANG_POP(C++)                ])AS_IF([test AS_VAR_GET(ac_lib_spades) = yes], [$1], [$2])AS_VAR_POPDEF([ac_lib_spades])dnl])# AC_LIB_SPADES# RCSS_LIBRARY_VERSION_INFO#	define two variables for the library versions# ---------------------------------------------------------AC_DEFUN([RCSS_LIBRARY_VERSION_INFO], [$1=$3AC_SUBST([$1])$2=`echo $3 | tr : .`AC_SUBST([$2])]) # RCSS_LIBRARY_VERSION_INFO# RCSS_BOOST_REGEX([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])# ---------------------------------------------------------# Checks for the spades libraryAC_DEFUN([RCSS_BOOST_REGEX],[AS_VAR_PUSHDEF([rcss_boost_regex], [rcss_cv_boost_regex])dnlAC_CACHE_CHECK(if linking against boost_regex succeeds, rcss_cv_boost_regex,               [AC_LANG_PUSH(C++)                OLD_LDFLAGS="$LDFLAGS"                LDFLAGS="$LDFLAGS -lboost_regex"                AC_LINK_IFELSE([int main() { return 0; }],                               [AS_VAR_SET(rcss_boost_regex, yes)],                                [AS_VAR_SET(rcss_boost_regex, no)])                LDFLAGS="$OLD_LDFLAGS"                AC_LANG_POP(C++)                ])AS_IF([test AS_VAR_GET(rcss_boost_regex) = yes], [$1], [$2])AS_VAR_POPDEF([rcss_boost_regex])dnl])# RCSS_BOOST_REGEX

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -