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

📄 acinclude.m4

📁 shrike is a utility application that acts as a testbed for shaders written in Sh
💻 M4
字号:
# Various checks for GL# GL_WITH_GL_DIR# Adds a --with-gl option to specify the GL installation directoryAC_DEFUN([GL_WITH_GL_DIR], [  AC_ARG_WITH([gl], AC_HELP_STRING([--with-gl=DIR], [specify that OpenGL is installed in DIR]),    [CPPFLAGS="$CPPFLAGS -I${withval}/include"     CXXFLAGS="$CXXFLAGS -I${withval}/include"     LDFLAGS="$LDFLAGS -L${withval}/lib"],    [])])# GL_CHECK_GL_HEADERS(if-available, if-not-available)# Finds GL headers in GL/ or OpenGL/.#AC_DEFUN([GL_CHECK_GL_HEADERS], [  # If we are OSX, OpenGL is included and we need -framework OpenGL  case $host_os in  darwin*)    AC_MSG_NOTICE([using Apple OpenGL framework])    AC_DEFINE([HAVE_GL_GL_H], [1])    AC_DEFINE([HAVE_GL_GLEXT_H], [1])    have_gl_gl_h=true    have_gl_glext_h=true    gl_gl_dir=OpenGL    gl_glext_dir=OpenGL    GL_LIBS="-framework OpenGL"    GLUT_LIBS="-framework GLUT"    ;;  # other systems  *)    # First check for GL/gl.h and GL/glext.h    AC_CHECK_HEADERS([GL/gl.h], [have_gl_gl_h=true gl_gl_dir=GL], [have_gl_gl_h=false])    AC_CHECK_HEADERS([GL/glext.h], [have_gl_glext_h=true gl_glext_dir=GL], [have_gl_glext_h=false],      [#if HAVE_GL_GL_H      #include <GL/gl.h>    #endif])    GL_LIBS="-lGL"    GLUT_LIBS="-lglut"    ;;  esac  if test "x$have_gl_gl_h" = "xtrue" -a "x$have_gl_glext_h" = "xtrue" ; then    found_gl_headers=true  fi  # Finally check if we've found any headers at all and act appropriately.  if test "x$found_gl_headers" = "xtrue" ; then    :; $1  else    :; $2  fi  AC_SUBST(GL_LIBS)  AC_SUBST(GLUT_LIBS)])# GL_CHECK_GLEXT_VERSION(version, if-avail, if-not-avail)#AC_DEFUN([GL_CHECK_GLEXT_VERSION], [  AC_MSG_CHECKING([for glext.h version >= $1])  AC_RUN_IFELSE(    AC_LANG_PROGRAM([#if HAVE_GL_GLEXT_H# include <$gl_gl_dir/gl.h># include <$gl_glext_dir/glext.h>#else# define GL_GLEXT_VERSION 0#endif],    [#if GL_GLEXT_VERSION >= $1  return 0;#else  return 1;#endif]),  [AC_MSG_RESULT([yes])   $2],  [AC_MSG_RESULT([no])   $3])])# GL_CHECK_GLEXT_EXTENSION(extension, if-avail, if-not-avail)#AC_DEFUN([GL_CHECK_GLEXT_EXTENSION], [  AC_MSG_CHECKING([for OpenGL extension $1])  AC_RUN_IFELSE(    AC_LANG_PROGRAM([#if HAVE_GL_GLEXT_H# include <$gl_gl_dir/gl.h># include <$gl_glext_dir/glext.h>#endif],    [#ifdef GL_$1  return 0;#else  return 1;#endif]),  [AC_MSG_RESULT([yes])   $2],  [AC_MSG_RESULT([no])   $3])])# SH_CHECK_BACKEND(BACKEND_NAME, DESCRIPTIVE_NAME, DEFAULT=true)AC_DEFUN([SH_CHECK_BACKEND],[AC_ARG_ENABLE([$1-backend],               AC_HELP_STRING([--enable-$1-backend],                              [compile $2 backend (default=yes)]),               [case "${enableval}" in	         yes) ac_backend_$1=true ;;		 no)  ac_backend_$1=false ;;                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-$1-backend) ;;              esac],[ac_backend_$1=m4_default([$3], true)])])# SH_WITH_SH_DIR# Adds a --with-sh option to specify the Sh installation directoryAC_DEFUN([SH_WITH_SH_DIR], [  AC_MSG_CHECKING([where Sh is installed])  AC_ARG_WITH([sh], AC_HELP_STRING([--with-sh=DIR], [specify that Sh is installed in DIR]),    [AC_MSG_RESULT([in ${withval}])     CPPFLAGS="$CPPFLAGS -I${withval}/include"     CXXFLAGS="$CXXFLAGS -I${withval}/include"     LDFLAGS="$LDFLAGS -L${withval}/lib"],    [AC_MSG_RESULT([in default directory])])])# SH_CHECK_SH_HEADERS(TRUE, FALSE)# Checks whether Sh header files are present.AC_DEFUN([SH_CHECK_SH_HEADERS], [  AC_CHECK_HEADER([sh/sh.hpp], [$1],    [$2])])AC_DEFUN([SHMEDIA_WITH_SHMEDIA_DIR], [  AC_ARG_WITH([shmedia], AC_HELP_STRING([--with-shmedia=DIR],	      [specify that shmedia is in DIR (default=PREFIX/share/shmedia)]),	      [shmedia_dir="${withval}"],              [if test x${prefix} != xNONE ; then		 shmedia_dir="${prefix}/share/shmedia"	       else		 shmedia_dir="`pwd`/${srcdir}/../shmedia"	       fi])  AC_DEFINE_UNQUOTED([SHMEDIA_DIR], "${shmedia_dir}", [shmedia install location])])AC_DEFUN([WX_CONFIG_WITH_WX_CONFIG], [  AC_ARG_WITH([wxconfig], AC_HELP_STRING([--with-wxconfig=FILE],	      [specify the name of the wx-config program (default=wx-config)]),	      [wx_config_binary="`basename ${withval}`"],	      [wx_config_binary="wx-config"])  AC_DEFINE_UNQUOTED([WX_CONFIG_BINARY], "${wx_config_binary}", [wx-config program name])])AC_DEFUN([WX_FIND_WX_CONFIG], [  AC_PATH_PROG(WX_CONFIG, "$wx_config_binary", no)  if [[ x"${WX_CONFIG}" = "xno" ]] ; then    AC_MSG_ERROR([shrike requires WxWindows. Could not find wx-config. You might need to use the --with-wxconfig option (e.g. ./configure --with-wxconfig=wx-config-2.4) if this program has a different name on your system.])  fi])AC_DEFUN([WX_CONFIG_GL_LIBS], [  AC_MSG_CHECKING([whether WxWindows was compiled with OpenGL support.])  old_cppflags="$CPPFLAGS"  CPPFLAGS="`${wx_config_binary} --cppflags`"  AC_RUN_IFELSE(    AC_LANG_PROGRAM([#include <wx/setup.h>], [#if wxUSE_OPENGL  return 0;#else  return 1;#endif]),    AC_MSG_RESULT([yes]),    [AC_MSG_RESULT([no])     AC_MSG_ERROR([WxWindows must be recompiled with the "--with-opengl" option.])]  )  CPPFLAGS="$old_cppflags"])

⌨️ 快捷键说明

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