configure.in
changeset 989 475166d13b44
parent 978 3b1ba22f5a28
child 991 12b13601a544
     1.1 --- a/configure.in	Mon Nov 22 20:37:41 2004 +0000
     1.2 +++ b/configure.in	Thu Nov 25 15:47:49 2004 +0000
     1.3 @@ -1130,14 +1130,22 @@
     1.4  }
     1.5  
     1.6  dnl Check for Mesa offscreen rendering
     1.7 -CheckOSMesa()
     1.8 +CheckAtariOSMesa()
     1.9  {
    1.10 -    if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
    1.11 -        AC_CHECK_HEADER(GL/osmesa.h, have_osmesa_hdr=yes)
    1.12 -        AC_CHECK_LIB(OSMesa, OSMesaCreateContext, have_osmesa_lib=yes, have_osmesa_lib=no, -lm)
    1.13 -        if test x$have_osmesa_hdr = xyes -a x$have_osmesa_lib = xyes; then
    1.14 -    	    CFLAGS="$CFLAGS -DHAVE_OPENGL"
    1.15 -			SYSTEM_LIBS="$SYSTEM_LIBS -lOSMesa"
    1.16 +    if test "x$enable_video" = "xyes" -a "x$enable_video_opengl" = "xyes"; then
    1.17 +        AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)
    1.18 +        if test "x$OSMESA_CONFIG" = "xno" -o "x$enable_atari_ldg" = "xno"; then
    1.19 +            AC_CHECK_HEADER(GL/osmesa.h, have_osmesa_hdr=yes)
    1.20 +            AC_CHECK_LIB(OSMesa, OSMesaCreateContext, have_osmesa_lib=yes, have_osmesa_lib=no, -lm)
    1.21 +            if test "x$have_osmesa_hdr" = "xyes" -a "x$have_osmesa_lib" = "xyes"; then
    1.22 +    	        CFLAGS="$CFLAGS -DHAVE_OPENGL"
    1.23 +		    	SYSTEM_LIBS="$SYSTEM_LIBS -lOSMesa"
    1.24 +            fi
    1.25 +        else
    1.26 +            OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
    1.27 +            OSMESA_LIBS=`$OSMESA_CONFIG --libs`
    1.28 +        	CFLAGS="$CFLAGS -DHAVE_OPENGL $OSMESA_CFLAGS"
    1.29 +            SYSTEM_LIBS="$SYSTEM_LIBS $OSMESA_LIBS"
    1.30          fi
    1.31      fi
    1.32  }
    1.33 @@ -2584,8 +2592,8 @@
    1.34          CheckAtariGemVideo
    1.35          CheckAtariAudio
    1.36          CheckAtariLdg
    1.37 +		CheckAtariOSMesa
    1.38          CheckPTH
    1.39 -		CheckOSMesa
    1.40          # Set up files for the audio library
    1.41          if test x$enable_threads = xyes -a x$enable_pth = xyes; then
    1.42              if test x$enable_audio = xyes; then