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

📄 configure.in

📁 基于SDL实现的GUI
💻 IN
字号:
# This first line initializes autoconf and gives it a file that it can# look for to make sure the source distribution is complete.AC_INIT(README)# The AM_INIT_AUTOMAKE macro tells automake the name and version number# of the software package so it can generate rules for building a source# archive.AM_INIT_AUTOMAKE(SDL_gui_demos, 0.0.0)dnl Detect the canonical host and target build environmentAC_CANONICAL_HOSTAC_CANONICAL_TARGETdnl Check for toolsAC_PROG_MAKE_SETAC_PROG_CCAC_PROG_CXXAC_PROG_INSTALLdnl Check for compiler environmentAC_C_CONSTcase "$target" in    alpha*-*-linux*)        CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"        ;;    *-*-cygwin* | *-*-mingw*)        if test "$build" != "$target"; then # cross-compiling            ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc        fi        SYS_GL_LIBS="-lopengl32 -lglu32"        ;;    *-*-linux*)        SYS_GL_LIBS="-L/usr/X11R6/lib -lGL"        ;;    *)        SYS_GL_LIBS="-lGL"        ;;esac# Use the macro SDL provides to check the installed version of the SDL# development environment.  Abort the configuration process if the# minimum version we require isn't available.SDL_VERSION=1.1.2AM_PATH_SDL($SDL_VERSION,            :,	    AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]))# Add the SDL preprocessor flags and libraries to the build processCFLAGS="$CFLAGS $SDL_CFLAGS"LIBS="$LIBS $SDL_LIBS"# Look for a working SDL_image libraryAC_CHECK_LIB(SDL_image, IMG_Load_RW, have_SDL_image=yes)if test x$have_SDL_image != xyes; then    AC_MSG_ERROR([*** SDL_image library not found!Try: http://www.devolution.com/~slouken/SDL/projects/SDL_image/])fiLIBS="$LIBS -lSDL_image"# Look for a working SDL_ttf libraryAC_CHECK_LIB(SDL_ttf, TTF_FontDescent, have_SDL_ttf=yes)if test x$have_SDL_ttf != xyes; then  AC_MSG_ERROR([*** SDL_ttf library not found!Try: http://www.devolution.com/~slouken/SDL/projects/SDL_ttf/])fidnl Check for OpenGLAC_MSG_CHECKING(for OpenGL support)have_opengl=noAC_TRY_COMPILE([ #include <GL/gl.h>],[],[have_opengl=yes])AC_MSG_RESULT($have_opengl)if test x$have_opengl = xyes; then    GL_LIBS="$SDL_LIBS $SYS_GL_LIBS"else    AC_MSG_ERROR(Unable to find OpenGL headers and libraries)fiAC_SUBST(GL_LIBS)dnl Expand the include directories for building SDLCFLAGS="-Wall -Werror -I\$(top_srcdir)/include $CFLAGS"CXXFLAGS="$CXXFLAGS $CFLAGS"# Finally create all the generated files# The configure script takes "file.in" and substitutes variables to produce# "file".  In this case we are just generating the Makefiles, but this could# be used to generate any number of automatically generated files.AC_OUTPUT([Makefile])

⌨️ 快捷键说明

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