On Tue, 06 Apr 2004 13:52:28 -0700
Andy Ross <[EMAIL PROTECTED]> wrote:

> Curtis L. Olson wrote:
> > Probably the best short term solution is to make sure we can build
> > with both SDL and glut and let the builder decide?
> 
> Sure.  This should work right now.  The only bits missing are the
> autotools magic to do the detection and set up the makefiles
> appropriately.  I fear autoconf, I really do...  Does someone with a
> more solid handle on these things want to help out? :)

For starters we could change the glut test in configure.ac to something like:
---
dnl Check for SDL if enabled.
AC_ARG_ENABLE(sdl, [  --enable-sdl    Configure to use SDL instead of GLUT],
        enable_sdl="yes", enable_sdl="")

if test "x$enable_sdl" = "xyes" ; then
  sdl_version=1.2.0
  AM_PATH_SDL($sdl_version, use_sdl=yes, use_sdl="")
  CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"
  LIBS="$LIBS $SDL_LIBS"
else
 dnl check for glut location
 AC_CHECK_HEADER(GL/glut.h)
 if test "x$ac_cv_header_GL_glut_h" = "xyes"; then
    AC_DEFINE([FG_GLUT_H], <GL/glut.h>, [Define as glut.h include location])
 else
    AC_CHECK_HEADER(GLUT/glut.h)
    if test "x$ac_cv_header_GLUT_glut_h" = "xyes"; then
        AC_DEFINE([FG_GLUT_H], <GLUT/glut.h>, [Define as glut.h include
location])    else
        echo "Neither GL/glut.h nor GLUT/glut.h found.  Cannot continue"
        exit
    fi
 fi
fi
---

Bernie

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to