worked on cegui loadtime problems
authorkazer_ <kazer_@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Wed, 14 Nov 2007 20:53:29 +0000 (20:53 +0000)
committerkazer_ <kazer_@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Wed, 14 Nov 2007 20:53:29 +0000 (20:53 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit@558 ffa7fe5e-494d-0410-b361-a75ebd5db220

configure.in

index 031d5df..4d34890 100644 (file)
@@ -162,6 +162,82 @@ AC_CHECK_HEADER(
 AC_SUBST(GLC_CFLAGS)
 AC_SUBST(GLC_LIBS)
 
+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
+
 AC_SUBST(CEGUI_CFLAGS)
 AC_SUBST(CEGUI_LIBS)