| AC_DEFUN(SIM_CHECK_OPENGL,[
| dnl Autoconf is a developer tool, so don't bother to support older versions.
| AC_PREREQ([2.14.1])
Please, don't depend on this, it does not exist.
| case "$host_os" in
Where does this come from?
| for i in -lMesaGL -lGL "-lMesaGLU -lMesaGL" "-lGLU -lGL"; do
Beware of common variable names such as i.
| if test "x$sim_cv_lib_gl" != "xUNRESOLVED"; then
| sim_ac_gl_libs="$sim_cv_lib_gl"
| LIBS="$sim_ac_gl_libs $sim_ac_save_libs"
| sim_ac_gl_avail=yes
| AC_CACHE_CHECK([whether OpenGL libraries are the Mesa libraries],
| sim_cv_lib_gl_ismesa,
| [AC_TRY_LINK([#include <GL/gl.h>],
| [#ifndef MESA
| #error not mesa
I've heard some CPP will choke on #error, even in
#if 0
# error
#endif.
In Autoconf `Choke me.' is used.
Also, I don't think it is portable to let the `#' be at a different
column than the first.
| #endif],
| sim_cv_lib_gl_ismesa=yes,
| sim_cv_lib_gl_ismesa=no)])
| if test x"$sim_cv_lib_gl_ismesa" = xyes; then
| sim_ac_gl_is_mesa=yes
| fi
|
| ifelse($1, , :, $1)
Why not just $1? Also, inside a macro call, arguments should be
quoted, especially $1 etc., ifelse([$1], , :, [$1]).
| else
| CPPFLAGS=$sim_ac_save_cppflags
| LDFLAGS=$sim_ac_save_ldflags
| LIBS=$sim_ac_save_libs
| ifelse($2, , :, $2)
Same here.
Akim