diff options
author | Karl Berry <karl@freefriends.org> | 2011-06-18 22:32:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-06-18 22:32:52 +0000 |
commit | 98f7836b6d90b603493db0711e2034eb1b9b4a11 (patch) | |
tree | 8d205987af09a3c4681887297504bf9270b43d49 /Build/source/utils/asymptote/configure.ac | |
parent | d5ba3cbe3e11d400bd14a4dead31fb850516595f (diff) |
asy 2.11 sources
git-svn-id: svn://tug.org/texlive/trunk@23044 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/configure.ac')
-rw-r--r-- | Build/source/utils/asymptote/configure.ac | 85 |
1 files changed, 54 insertions, 31 deletions
diff --git a/Build/source/utils/asymptote/configure.ac b/Build/source/utils/asymptote/configure.ac index 77396d7751d..d9f4c377bd1 100644 --- a/Build/source/utils/asymptote/configure.ac +++ b/Build/source/utils/asymptote/configure.ac @@ -3,7 +3,7 @@ # this file. AC_PREREQ(2) -AC_INIT([Asymptote],[2.10],[http://sourceforge.net/projects/asymptote]) +AC_INIT([Asymptote],[2.11],[http://sourceforge.net/projects/asymptote]) VERSION=$PACKAGE_VERSION AC_SUBST(VERSION) @@ -197,6 +197,11 @@ AC_ARG_ENABLE(gc-full-debug, fi ]) +if test "$OSTYPE" = "cygwin"; then +INCL=$INCL" -I/usr/include/tirpc" +CPPFLAGS=$CPPFLAGS" $INCL" +fi + AC_CHECK_FUNC(getopt_long_only, AC_DEFINE(HAVE_GNU_GETOPT_H, 1, [Define if getopt.h is the GNU version]), getopt="getopt getopt1",) @@ -225,7 +230,7 @@ AC_ARG_ENABLE(readline, [AS_HELP_STRING(--enable-readline[[[=yes]]],enable GNU Readline Library)]) if test "x$enable_readline" != "xno"; then -AC_COMPILE_IFELSE(AC_LANG_PROGRAM([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #include <stdio.h> #include <unistd.h> #include <readline/readline.h> @@ -233,7 +238,7 @@ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([ #ifndef RL_READLINE_VERSION abort #endif -]),AC_CHECK_LIB([readline], [rl_completion_matches],, +])],AC_CHECK_LIB([readline], [rl_completion_matches],, AC_MSG_NOTICE(*** Could not find GNU readline 4.3 or later: will compile without readline support ***))) fi @@ -243,7 +248,7 @@ AC_CHECK_HEADERS([fenv.h stddef.h libintl.h]) AC_CHECK_HEADERS([ncurses/curses.h ncurses.h curses.h], [break]) AC_CHECK_HEADERS(fpu_control.h) -AC_COMPILE_IFELSE(AC_LANG_PROGRAM([#include "xstream.h"]), +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include "xstream.h"])], [AC_SEARCH_LIBS([xdrstdio_create],[nsl rpc]) AC_DEFINE(HAVE_RPC_RPC_H, 1, [Define if you have a working <rpc/rpc.h> header file])], @@ -273,32 +278,44 @@ fi AC_ARG_ENABLE(gl, [AS_HELP_STRING(--enable-gl[[[=yes]]],enable OpenGL Library)]) +AC_ARG_ENABLE(offscreen, +[AS_HELP_STRING(--enable-offscreen[[[=no]]],enable offscreen rendering using OSMesa library)]) + +# First check if GL is enabled. If so, then: +# onscreen rendering requires GL, glut, and GLU libraries +# offscreen rendering require OSMesa and GLU libraries + if test "x$enable_gl" != "xno"; then case "$OSTYPE" in - cygwin) AC_CHECK_HEADER(GL/glut.h, - [AC_DEFINE(HAVE_LIBGLUT, 1, - [Define if you have the `freeglut' library (-lfreeglut).]) - LIBS=$LIBS"-lfreeglut "], - AC_MSG_NOTICE([*** Could not find libfreeglut: will compile without OpenGL support ***])) - AC_CHECK_HEADER(GL/gl.h, - [AC_DEFINE(HAVE_LIBGL, 1, - [Define if you have the `opengl32' library (-lopengl32).]) - LIBS=$LIBS"-lopengl32 "], - AC_MSG_NOTICE([*** Could not find libopengl32: will compile without OpenGL support ***])) - AC_CHECK_LIB([GLU], [gluNewNurbsRenderer],[AC_DEFINE(HAVE_LIBGLU, 1, - [Define to 1 if you have the `glu32' library (-lglu32).]) LIBS=$LIBS"-lglu32 "], - AC_MSG_NOTICE([*** Could not find libglu32: will compile without OpenGL support ***])) + cygwin) + if test "x$enable_offscreen" != "xyes"; then + AC_CHECK_HEADER(GL/gl.h, + [AC_DEFINE(HAVE_LIBGL, 1, + [Define if you have the `opengl32' library (-lopengl32).]) + LIBS=$LIBS"-lopengl32 "], + AC_MSG_NOTICE([*** Could not find libopengl32: will compile without OpenGL support ***])) + fi + AC_CHECK_LIB([GLU], [gluNewNurbsRenderer],[AC_DEFINE(HAVE_LIBGLU, 1, + [Define to 1 if you have the `glu32' library (-lglu32).]) LIBS=$LIBS"-lglu32 "], + AC_MSG_NOTICE([*** Could not find libglu32: will compile without OpenGL support ***])) + AC_CHECK_HEADER(GL/glut.h, + [AC_DEFINE(HAVE_LIBGLUT, 1, + [Define if you have the `freeglut' library (-lfreeglut).]) + LIBS=$LIBS"-lfreeglut "], + AC_MSG_NOTICE([*** Could not find libfreeglut: will compile without GLUT support ***])) ;; - darwin*) AC_CHECK_HEADER(OpenGL/gl.h, - [AC_DEFINE(HAVE_LIBGL, 1, - [Define if you have the `OpenGL' library.])]) + darwin*) + if test "x$enable_offscreen" != "xyes"; then + AC_CHECK_HEADER(OpenGL/gl.h, + [AC_DEFINE(HAVE_LIBGL, 1, + [Define if you have the `OpenGL' library.])]) + fi AC_CHECK_HEADER(OpenGL/glu.h, - [AC_DEFINE(HAVE_LIBGLU, 1, - [Define if you have the `GLU' library.])]) - AC_CHECK_HEADER(GLUT/glut.h, - [AC_DEFINE(HAVE_LIBGLUT, 1, + [AC_DEFINE(HAVE_LIBGLU, 1, + [Define if you have the `GLU' library.])]) + AC_CHECK_HEADER(GLUT/glut.h, [AC_DEFINE(HAVE_LIBGLUT, 1, [Define if you have the `GLUT' library.]) -AC_COMPILE_IFELSE(AC_LANG_PROGRAM([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ #include <OpenGL/gl.h> #include <OpenGL/glu.h> #ifndef GLU_TESS_CALLBACK_TRIPLEDOT @@ -307,16 +324,22 @@ void f(void) { gluNurbsCallback(gluNewNurbsRenderer(),GLU_NURBS_BEGIN,(_GLUfuncptr) glBegin); } #endif -]),[AC_DEFINE(GLU_TESS_CALLBACK_TRIPLEDOT, 1, [Define if gluNurbsCallback expects a variadic function.])]) +])],[AC_DEFINE(GLU_TESS_CALLBACK_TRIPLEDOT, 1, [Define if gluNurbsCallback expects a variadic function.])]) LIBS=$LIBS"-framework GLUT -framework OpenGL -framework Cocoa"], - AC_MSG_NOTICE([*** Could not find glut: will compile without OpenGL support ***])) + AC_MSG_NOTICE([*** Could not find glut: will compile without GLUT support ***])) ;; - *) AC_CHECK_LIB([glut], [glutMainLoop],, - AC_MSG_NOTICE([*** Could not find libglut: will compile without OpenGL support ***])) + *) if test "x$enable_offscreen" != "xyes"; then + AC_CHECK_LIB([GL], [glDepthMask]) + fi AC_CHECK_LIB([GLU], [gluNewNurbsRenderer],, - AC_MSG_NOTICE([*** Could not find libGLU: will compile without OpenGL support ***])) - AC_CHECK_LIB([GL], [glDepthMask]) + AC_MSG_NOTICE([*** Could not find libGLU: will compile without OpenGL support ***])) + AC_CHECK_LIB([glut], [glutMainLoop],, + AC_MSG_NOTICE([*** Could not find libglut: will compile without GLUT support ***])) esac + if test "x$enable_offscreen" == "xyes"; then + AC_CHECK_LIB([OSMesa],OSMesaCreateContext,, + AC_MSG_NOTICE([*** Could not find libOSMesa: will compile without offscreen rendering support ***])) + fi fi # Checks for typedefs, structures, and compiler characteristics. |