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

📄 acinclude.m4

📁 机器人足球AI设计比赛
💻 M4
📖 第 1 页 / 共 2 页
字号:
# RCSS_PATH_RUBY# Substitutes: @RUBY@		ruby command#              @RUBY_CPPFLAGS@  additional CPPFLAGS to use to get ruby.h#	       @RUBY_LDFLAGS@   additional LDFLAGS to use when linking libruby#	       @RUBY_LDADD@     additional libraries libruby depends on  ## original version from the Swig list (major changes by me /oliver)# at http://mailman.cs.uchicago.edu/mailman/listinfo/swig#-----------------------------------------------------------------------------AC_DEFUN([RCSS_PATH_RUBY], [	# --with-ruby=PATH	AC_ARG_WITH(ruby,		AC_HELP_STRING([--with-ruby=PATH],       	 		       [path to Ruby interpreter (default is ruby)]),		    [ruby="$withval"],		    [ruby="ruby"]	)        AC_PATH_PROGS(RUBY,[$ruby ruby],no)	# Test ruby interpreter		if test $ruby = no; then		AC_MSG_ERROR(Could not find Ruby Interpreter.  Please use --with-ruby option.)	fi	# check ruby headers	AC_CHECK_HEADER(ruby.h, 			[RUBY_CPPFLAGS=''],			[unset ac_cv_header_ruby_h		         ruby_tmp=$CPPFLAGS                         ruby_includedir=`$RUBY -rrbconfig -e "print Config::CONFIG[['archdir']]"`                         AC_MSG_NOTICE(trying again in $ruby_includedir)		         RUBY_CPPFLAGS="-I$ruby_includedir"                         CPPFLAGS="$CPPFLAGS $RUBY_CPPFLAGS"                         AC_CHECK_HEADER(ruby.h, [],                                         [AC_MSG_ERROR(check your ruby installation)]                         )                         CPPFLAGS=$ruby_tmp                        ]        )        # set ruby ldflags	AC_MSG_CHECKING(ruby library directory)	ruby_libdir=`$RUBY -rrbconfig -e "print Config::CONFIG[['archdir']]"`	AC_MSG_RESULT($ruby_libdir)	RUBY_LDFLAGS="-L$ruby_libdir -lruby"	# set ruby additional libraries	AC_MSG_CHECKING(libraries ruby depends on)	RUBY_LDADD=`$RUBY -rrbconfig -e "print Config::CONFIG[['LIBS']]"`	AC_MSG_RESULT($RUBY_LDADD)		AC_MSG_CHECKING([for libruby])	rcss_tmp="$LDFLAGS"	LDFLAGS="$LDFLAGS $RUBY_LDFLAGS" 	AC_LINK_IFELSE([int main() { return 0; }],		       [AC_MSG_RESULT([yes])],		       [AC_MSG_RESULT([no])		        AC_MSG_ERROR([libruby cannot be found. If you compile ruby on your own,	make sure to configure ruby with '--enable-shared' to create the library.])])	LDFLAGS="$rcss_tmp"	# Substitute Makefile Vars.	AC_SUBST(RUBY)	AC_SUBST(RUBY_CPPFLAGS)	AC_SUBST(RUBY_LDFLAGS)	AC_SUBST(RUBY_LDADD)]) # RCSS_PATH_RUBYAC_DEFUN([RCSS_CHECK_RUBY_VERSION], [	AC_MSG_CHECKING([ruby version])	AC_REQUIRE([RCSS_PATH_RUBY])	MAJOR="$1"	RUBY_MAJOR=`$RUBY -rrbconfig -e "print Config::CONFIG[['MAJOR']]"`	test -z "$1" && MAJOR="$RUBY_MAJOR"	MINOR="$2"	RUBY_MINOR=`$RUBY -rrbconfig -e "print Config::CONFIG[['MINOR']]"`	test -z "$2" && MINOR="$RUBY_MINOR"	TEENY="$3"	RUBY_TEENY=`$RUBY -rrbconfig -e "print Config::CONFIG[['TEENY']]"`	test -z "$3" && TEENY="$RUBY_TEENY"	AC_MSG_RESULT($RUBY_MAJOR.$RUBY_MINOR.$RUBY_TEENY)	if test \( "$RUBY_MAJOR" -lt "$MAJOR" \) -o \		\( "$RUBY_MAJOR" -eq "$MAJOR" -a "$RUBY_MINOR" -lt "$MINOR" \) -o \		\( "$RUBY_MAJOR" -eq "$MAJOR" -a "$RUBY_MINOR" -eq "$MINOR" -a "$RUBY_TEENY" -lt "$TEENY" \); then		AC_MSG_ERROR([Your ruby is too old. Use at least ruby-$MAJOR.$MINOR.$TEENY])	fi]) # RCSS_CHECK_RUBY_VERSION# RCSS_CHECK_RCSSBASE#-----------------------------------------------------------------------------AC_DEFUN([RCSS_CHECK_RCSSBASE], [	AC_ARG_VAR(RCSSBASE, [location of rcssbase installation])	if test $RCSSBASE; then	   CPPFLAGS="$CPPFLAGS -I$RCSSBASE/include"	   LDFLAGS="$LDFLAGS -L$RCSSBASE/lib"	fi	AC_CHECK_HEADERS([rcssbase/net/udpsocket.hpp],,[        		 AC_MSG_ERROR([The rcssbase headers (e.g. rcssbase/net/udpsocket.hpp) cannot be found. Please specify the location of the rcssbase installation, by using the RCSSBASE environment variable (e.g. ./configure RCSSBASE=$HOME/rcssbase)])])	AC_MSG_CHECKING([for the rcssnet library])	rcss_tmp="$LDFLAGS"	LDFLAGS="$LDFLAGS -lrcssnet" 	AC_LINK_IFELSE([int main() { return 0; }],		       [AC_MSG_RESULT([yes])],		       [AC_MSG_RESULT([no])		        AC_MSG_ERROR([The rcssnet library (librcssnet.a or librcssnet.so) cannot be found. Please specify the location of the rcssbase installation using the RCSSBASE environment variable (e.g. ./configure RCSSBASE=$HOME/rcssbase)])])	LDFLAGS="$rcss_tmp"]) # RCSS_CHECK_RCSSBASE# RCSS_CHECK_ODE#-----------------------------------------------------------------------------AC_DEFUN([RCSS_CHECK_ODE], [	AC_ARG_VAR(ODE, [location of ode installation])	if test $ODE; then	   CPPFLAGS="$CPPFLAGS -I$ODE/include"	   LDFLAGS="$LDFLAGS -L$ODE/lib"	fi	AC_CHECK_HEADERS([ode/ode.h],,[        		 AC_MSG_ERROR([The ode headers (e.g. ode/ode.h) cannot be found. Please specify the location of the ode installation, by using the ODE environment variable (e.g. ./configure ODE=$HOME/ode-0.03)])])	AC_MSG_CHECKING([for the ODE library])	rcss_tmp="$LDFLAGS"	LDFLAGS="$LDFLAGS -lode" 	AC_LINK_IFELSE([int main() { return 0; }],		       [AC_MSG_RESULT([yes])],		       [AC_MSG_RESULT([no])		        AC_MSG_ERROR([The ode library (libode.a or libode.so) cannot be found. Please specify the location of the ode installation using the ODE environment variable (e.g. ./configure ODE=$HOME/ode-0.03)])])	LDFLAGS="$rcss_tmp"]) # RCSS_CHECK_ODE# RCSS_PATH_FREETYPE# Substitutes: @FREETYPE_CPPFLAGS@ # 	       @FREETYPE_LIBADD@##-----------------------------------------------------------------------------AC_DEFUN([RCSS_PATH_FREETYPE], [	# --with-freetype=PATH	AC_ARG_WITH(freetype,		AC_HELP_STRING([--with-freetype=PATH],       	 		       [path to freetype-config (default is freetype-config)]),		    [freetype="$withval"],		    [freetype="freetype-config"]	)	RCSS_KEROSIN_IF_ELSE([	        AC_PATH_PROGS(FREETYPE,[$freetype freetype-config],no)		if test $FREETYPE = "no"; then			RCSS_BUILD_KEROSIN_ERROR([need freetype2 devel library to compile libkerosin])		else			rcss_freetype_cppflags=`$FREETYPE --cflags`			rcss_freetype_libadd=`$FREETYPE --libtool`			AC_MSG_CHECKING([freetype include flags])			AC_MSG_RESULT([$rcss_freetype_cppflags])			AC_SUBST(FREETYPE_CPPFLAGS, [$rcss_freetype_cppflags])			AC_MSG_CHECKING([freetype libtool file])			AC_MSG_RESULT([$rcss_freetype_libadd])			AC_SUBST(FREETYPE_LIBADD, [$rcss_freetype_libadd])		fi	])]) # RCSS_PATH_FREETYPE# RCSS_CHECK_GL# 	if rcss_build_kerosin is (still) set to 'yes', check for the GL#	headers and libraries.#	Substitutes: @GLDIR@ with the directory where the gl headers can be found#-----------------------------------------------------------------------------AC_DEFUN([RCSS_CHECK_GL], [	RCSS_KEROSIN_IF_ELSE([	# check for OpenGL location and used extensions    		AC_CHECK_HEADERS([GL/gl.h GL/glut.h],,                                RCSS_BUILD_KEROSIN_ERROR([not all required OpenGL headers could not be found. Please specify the location  of the OpenGL header directory using the CPPFLAGS environment variable]))		RCSS_KEROSIN_IF_ELSE([			AC_CHECK_HEADERS([GL/glx.h], AC_SUBST([GLTARGET], [x]),                        		 AC_CHECK_HEADERS([GL/wglext.h],                                   	 AC_SUBST([GLTARGET], [win32]),                                         RCSS_BUILD_KEROSIN_ERROR([could not find  X nor MS Windows GL extensions]), 				          [#include <GL/gl.h>]),                          [#include <GL/gl.h>])	# subst'ing the directory where the prepocessor finds gl.h        GLDIR=`echo "#include <GL/gl.h>" | /lib/cpp -M | awk '{ print @S|@2 }'`        GLDIR=`dirname "$GLDIR"`        AC_SUBST([GLDIR], [$GLDIR])	# checking if linking against libGL succeeds 	RCSS_KEROSIN_IF_ELSE([		AC_MSG_CHECKING([if linking against libGL succeeds])		rcss_tmp="$LDFLAGS"		LDFLAGS="$LDFLAGS -lGL" 		AC_LINK_IFELSE([#include <GL/gl.h>				int main() { glColor3f(0,0,0); }],				[AC_MSG_RESULT([yes])],				[AC_MSG_RESULT([no])				 RCSS_BUILD_KEROSIN_ERROR([to build libkerosin, set LDFLAGS so that libGL can be found])])		LDFLAGS="$rcss_tmp"		])    ])  ])]) # RCSS_CHECK_GL# RCSS_CHECK_DEVIL# 	if rcss_build_kerosin is (still) set to 'yes', check for the DEVIL#	headers and libraries.#	If DEVIL headers or libraries can not be found, building kerosin will #	be disabled.#-----------------------------------------------------------------------------AC_DEFUN([RCSS_CHECK_DEVIL], [

⌨️ 快捷键说明

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