Index: configure.in =================================================================== RCS file: /cvsroot/navit/navit/configure.in,v retrieving revision 1.38 diff -u -r1.38 configure.in --- configure.in 30 Oct 2007 13:19:27 -0000 1.38 +++ configure.in 30 Oct 2007 17:43:26 -0000 @@ -28,7 +28,13 @@ test x"${AVOID_FLOAT}" = xyes && AC_DEFINE(AVOID_FLOAT,[],Define to avoid floating point) AC_ARG_ENABLE(libgps, [ --disable-libgps don't use libgps], USE_LIBGPS=$enableval, USE_LIBGPS=yes) - +AC_PATH_X +if test x"$have_x" != xyes; then + echo "Can not find X" + exit -1 +fi +X_CFLAGS="-I$x_includes" +X_LIBS="-L$ac_x_libraries" PKG_CHECK_MODULES(NAVIT, [glib-2.0 gmodule-2.0]) AC_SUBST(NAVIT_CFLAGS) @@ -101,6 +107,34 @@ exit 1 ) +AC_CHECK_HEADER( + GL/gl.h, + AC_DEFINE( + [HAVE_OPENGL], + [], + Define to 1 if you have the header file. + ) + OPENGL_LIBS="$X_LIBS -lGL -lGLU" + opengl=yes, + AC_MSG_WARN([*** no GL/gl.h -- opengl and SDL support disabled]) +) +AC_SUBST(OPENGL_CFLAGS) +AC_SUBST(OPENGL_LIBS) + +AC_CHECK_HEADER( + GL/glc.h, + AC_DEFINE( + [HAVE_GLC], + [], + Define to 1 if you have the header file. + ) + GLC_LIBS="-lGLC" + glc=yes, + AC_MSG_WARN([*** no GL/glc.h -- opengl and SDL support disabled]) +) +AC_SUBST(GLC_CFLAGS) +AC_SUBST(GLC_LIBS) + if test x"$sdl" = xyes then # Save the LIBS into a temp var since AC_CHECK_LIB adds the lib into LIBS @@ -115,34 +149,43 @@ echo "Error! Something is wrong with CEGUIBase." exit -1 ]) -AC_CHECK_LIB(CEGUIOpenGLRenderer, OpenGLRendererdoRender, +AC_CHECK_LIB(CEGUIOpenGLRenderer, main, [], [ echo "Error! Something is wrong with CEGUIOpenGLRenderer." #exit -1 - ]) + ], $OPENGL_LIBS ) AC_CHECK_LIB(CEGUIFalagardWRBase, main, [], [ echo "Error! Something is wrong with CEGUIFalagardWRBase." exit -1 - ]) + ], $OPENGL_LIBS) CEGUI_LIBS="-lCEGUIBase -lCEGUIOpenGLRenderer -lCEGUIFalagardWRBase" # The following are optionnal, but we need to link against them if cegui was built with them AC_CHECK_LIB(CEGUISILLYImageCodec, main, [CEGUI_LIBS="$CEGUI_LIBS -lCEGUISILLYImageCodec"], - [echo "CEGUISILLYImageCodec not found/not working, disabled."] + [echo "CEGUISILLYImageCodec not found/not working, disabled."], + $OPENGL_LIBS ) AC_CHECK_LIB(CEGUIExpatParser, main, [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIExpatParser"], - [echo "CEGUIExpatParser not found/not working, disabled."] + [echo "CEGUIExpatParser not found/not working, disabled."], + $OPENGL_LIBS ) AC_CHECK_LIB(CEGUIDevILImageCodec, main, [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIDevILImageCodec"], - [echo "CEGUIDevILImageCodec not found/not working, disabled."] + [echo "CEGUIDevILImageCodec not found/not working, disabled."], + $OPENGL_LIBS +) + +AC_CHECK_LIB(CEGUITGAImageCodec, main, + [CEGUI_LIBS="$CEGUI_LIBS -lCEGUITGAImageCodec"], + [echo "GUITGAImageCodec not found/not working, disabled."], + $OPENGL_LIBS ) LIBS="$libstemp" @@ -152,34 +195,6 @@ AC_SUBST(CEGUI_CFLAGS) AC_SUBST(CEGUI_LIBS) -AC_CHECK_HEADER( - GL/gl.h, - AC_DEFINE( - [HAVE_OPENGL], - [], - Define to 1 if you have the header file. - ) - OPENGL_LIBS="-lGL -lGLU" - opengl=yes, - AC_MSG_WARN([*** no GL/gl.h -- opengl and SDL support disabled]) -) -AC_SUBST(OPENGL_CFLAGS) -AC_SUBST(OPENGL_LIBS) - -AC_CHECK_HEADER( - GL/glc.h, - AC_DEFINE( - [HAVE_GLC], - [], - Define to 1 if you have the header file. - ) - GLC_LIBS="-lGLC" - glc=yes, - AC_MSG_WARN([*** no GL/glc.h -- opengl and SDL support disabled]) -) -AC_SUBST(GLC_CFLAGS) -AC_SUBST(GLC_LIBS) - AM_CONDITIONAL(GUI_SDL, [test "x$sdl" = "xyes" -a "x$cegui" = "xyes" -a "x$opengl" = "xyes" -a "x$glc" = "xyes" ]) AM_CONDITIONAL(GRAPHICS_OPENGL, [test "x$opengl" = "xyes" -a "x$glc" = "xyes" ])