Ticket #671: configure.in.diff

File configure.in.diff, 2.1 KB (added by tegzed, 12 years ago)

patch for configure.in to support opengl changes

  • configure.in

     
    485485                [],
    486486                Define to 1 if you have the <GL/gl.h> header file.
    487487                )
    488                 OPENGL_LIBS="$X_LIBS -lGL -lGLU"
     488                OPENGL_LIBS="$X_LIBS -lGL -lGLU -lglut -lfreeimage"
    489489                opengl=yes,
    490490        AC_MSG_WARN([*** no GL/gl.h -- opengl graphics support disabled];graphics_opengl=no;graphics_opengl_reason="GL/gl.h header missing")
    491491)
     
    501501        AC_MSG_WARN([*** no GL/glut.h -- opengl graphics support disabled]);graphics_opengl=no;graphics_opengl_reason="GL/glut.h header missing"
    502502)
    503503
     504AC_CHECK_HEADER(
     505        GL/freeglut.h,
     506        AC_DEFINE(
     507                [HAVE_FREEGLUT],
     508                [],
     509                Define to 1 if you have the <GL/freeglut.h> header file.
     510                )
     511                freeglut=yes,
     512        AC_MSG_WARN([*** no GL/freeglut.h -- opengl support disabled]);graphics_opengl=no;graphics_opengl_reason="Headers missing"
     513)
     514
    504515AC_SUBST(OPENGL_CFLAGS)
    505516AC_SUBST(OPENGL_LIBS)
    506517
     
    515526                glc=yes,
    516527        AC_MSG_WARN([*** no GL/glc.h -- opengl graphics support disabled]);graphics_opengl=no;graphics_opengl_reason="GL/glc.h header missing"
    517528)
     529AC_CHECK_HEADER(
     530        FreeImage.h,
     531        AC_DEFINE(
     532                [HAVE_FREEIMAGE],
     533                [],
     534                Define to 1 if you have the <FreeImage.h> header file.
     535                )
     536                FREEIMAGE_LIBS="-lfreeimage"
     537                freeimage=yes,
     538        AC_MSG_WARN([*** no FreeImage.h -- opengl support disabled]);graphics_opengl=no;graphics_opengl_reason="Headers missing"
     539)
     540AC_SUBST(FREEIMAGE_LIBS)
    518541AC_SUBST(GLC_CFLAGS)
    519542AC_SUBST(GLC_LIBS)
    520543fi
    521544
    522 AM_CONDITIONAL(GRAPHICS_OPENGL, [test "x$glut" = "xyes" -a "x$opengl" = "xyes" -a "x$glc" = "xyes" ])
     545AM_CONDITIONAL(GRAPHICS_OPENGL, [test "x$glut" = "xyes" -a "x$freeglut" = "xyes" -a "x$opengl" = "xyes" -a "x$freeimage" = "xyes" -a "x$glc" = "xyes" ])
    523546
    524547system_shapefile=no
    525548AC_CHECK_HEADERS(
     
    532555                SHAPEFILE_LIBS="-lshp"
    533556                system_shapefile=yes
    534557                )
    535 AC_SUBST(SHAPEFILE_CFLAGS)
     558AC_SUBST(SHAPEFILE_CFLAGS) -a "x$freeimage" = "xyes"
    536559AC_SUBST(SHAPEFILE_LIBS)
    537560AM_CONDITIONAL(HAVE_SYSTEM_SHAPEFILELIB, [test "x$system_shapefile" = "xyes" ])
    538561if test x"${system_shapefile}" = xno