+if test x"$cegui" = xyes
+ then
+ # Save the LIBS into a temp var since AC_CHECK_LIB adds the lib into LIBS
+ # and we want just to check and use CEGUI_LIBS
+ libstemp="$LIBS"
+ # For CEGUI, we have to check the presence of some libraries.
+ # The following are mandatory (used by navit)
+ # If the user installed NavIt without, issue a warning and disable CEGUI
+ AC_CHECK_LIB(CEGUIBase, main,
+ [],
+ [
+ echo "Error! Something is wrong with CEGUIBase. Do you have at least cegui-0.5?"
+ exit -1
+ ])
+ AC_CHECK_LIB(CEGUIOpenGLRenderer, main,
+ [],
+ [
+ echo "Error! Something is wrong with CEGUIOpenGLRenderer. Do you have at least cegui-0.5? "
+ exit -1
+ ], $OPENGL_LIBS )
+ AC_CHECK_LIB(CEGUIFalagardWRBase, main,
+ [],
+ [
+ echo "Error! Something is wrong with CEGUIFalagardWRBase. Do you have at least cegui-0.5?"
+ 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
+ libssilly="$OPENGL_LIBS -lpng"
+ AC_CHECK_LIB(CEGUISILLYImageCodec, createImageCodec,
+ [CEGUI_LIBS="$CEGUI_LIBS -lCEGUISILLYImageCodec"],
+ [echo "CEGUISILLYImageCodec not found/not working, disabled."],
+ $libssilly
+ )
+
+ AC_CHECK_LIB(CEGUIXercesParser, main,
+ [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIXercesParser"],
+ [echo "CEGUIXercesParser not found/not working, disabled."],
+ $OPENGL_LIBS
+ )
+
+ AC_CHECK_LIB(CEGUIExpatParser, main,
+ [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIExpatParser"],
+ [echo "CEGUIExpatParser not found/not working, disabled."],
+ $OPENGL_LIBS
+ )
+
+ AC_CHECK_LIB(CEGUILibxmlParser, main,
+ [CEGUI_LIBS="$CEGUI_LIBS -lCEGUILibxmlParser"],
+ [echo "CEGUILibxmlParser not found/not working, disabled."],
+ $OPENGL_LIBS
+ )
+
+ AC_CHECK_LIB(CEGUITinyXMLParser, main,
+ [CEGUI_LIBS="$CEGUI_LIBS -lCEGUITinyXMLParser"],
+ [echo "CEGUITinyXMLParser not found/not working, disabled."],
+ $OPENGL_LIBS
+ )
+
+ AC_CHECK_LIB(CEGUIDevILImageCodec, main,
+ [CEGUI_LIBS="$CEGUI_LIBS -lCEGUIDevILImageCodec"],
+ [echo "CEGUIDevILImageCodec not found/not working, disabled."],
+ $OPENGL_LIBS
+ )
+
+ AC_CHECK_LIB(CEGUITGAImageCodec, createImageCodec,
+ [CEGUI_LIBS="$CEGUI_LIBS -lCEGUITGAImageCodec"],
+ [echo "GUITGAImageCodec not found/not working, disabled."],
+ $OPENGL_LIBS
+ )
+
+ LIBS="$libstemp"
+ echo "LIBS : $CEGUI_LIBS"
+ fi
+