[mapserver-commits] r9669 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Tue Jan 5 09:58:01 EST 2010


Author: aboudreault
Date: 2010-01-05 09:58:01 -0500 (Tue, 05 Jan 2010)
New Revision: 9669

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/configure
   trunk/mapserver/configure.in
   trunk/mapserver/mapoglrenderer.h
Log:
Fixed configure to support FTGL 2.1.2 (#3247)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2010-01-05 14:54:33 UTC (rev 9668)
+++ trunk/mapserver/HISTORY.TXT	2010-01-05 14:58:01 UTC (rev 9669)
@@ -14,6 +14,8 @@
 Current Version (SVN trunk):
 ----------------------------
 
+- Fixed configure to support FTGL 2.1.2 (#3247)
+
 - Changed msSaveImageBufferGD to be in accordance with msSaveImageGD (#3201)
 
 - PHP/Mapscript: added layerObj units property (#3249)

Modified: trunk/mapserver/configure
===================================================================
--- trunk/mapserver/configure	2010-01-05 14:54:33 UTC (rev 9668)
+++ trunk/mapserver/configure	2010-01-05 14:58:01 UTC (rev 9669)
@@ -8965,11 +8965,17 @@
   fi
 
 
-  test -f $FTGL_DIR/include/FTGL/ftgl.h -a -f $FTGL_DIR/include/FTGL/FTGLTextureFont.h && FTGL_INCLUDE="-I$FTGL_DIR/include/FTGL/"
+  FTGL_FLAG=""
+  if  test -f $FTGL_DIR/include/FTGL/ftgl.h -a -f $FTGL_DIR/include/FTGL/FTGLTextureFont.h ; then
+      FTGL_INCLUDE="-I$FTGL_DIR/include/FTGL/"
+  elif  test -f $FTGL_DIR/include/FTGL/FTGL.h -a -f $FTGL_DIR/include/FTGL/FTGLTextureFont.h ; then
+      FTGL_INCLUDE="-I$FTGL_DIR/include/FTGL/"
+      FTGL_FLAG="-DUSE_FTGL_2_1_2"
+  fi
 
   if test -z "$FTGL_INCLUDE" ; then
-      { { echo "$as_me:$LINENO: error: \"could not find ftgl.h in $FTGL_DIR/include/FTGL.\"" >&5
-echo "$as_me: error: \"could not find ftgl.h in $FTGL_DIR/include/FTGL.\"" >&2;}
+      { { echo "$as_me:$LINENO: error: \"could not find ftgl.h/FTGL.h in $FTGL_DIR/include/FTGL.\"" >&5
+echo "$as_me: error: \"could not find ftgl.h/FTGL.h in $FTGL_DIR/include/FTGL.\"" >&2;}
    { (exit 1); exit 1; }; }
   fi
 
@@ -8984,7 +8990,7 @@
 
 
 
-    FTGL_ENABLED="-DUSE_FTGL"
+    FTGL_ENABLED="-DUSE_FTGL $FTGL_FLAG"
   FTGL_INC="$FTGL_INCLUDE"
   FTGL_LIB="-L$FTGL_LIBDIR -lftgl"
 

Modified: trunk/mapserver/configure.in
===================================================================
--- trunk/mapserver/configure.in	2010-01-05 14:54:33 UTC (rev 9668)
+++ trunk/mapserver/configure.in	2010-01-05 14:58:01 UTC (rev 9669)
@@ -849,10 +849,16 @@
 
   AC_EXPAND_PATH($with_ftgl, FTGL_DIR)
 
-  test -f $FTGL_DIR/include/FTGL/ftgl.h -a -f $FTGL_DIR/include/FTGL/FTGLTextureFont.h && FTGL_INCLUDE="-I$FTGL_DIR/include/FTGL/"
+  FTGL_FLAG=""
+  if [ test -f $FTGL_DIR/include/FTGL/ftgl.h -a -f $FTGL_DIR/include/FTGL/FTGLTextureFont.h ]; then
+      FTGL_INCLUDE="-I$FTGL_DIR/include/FTGL/"
+  elif [ test -f $FTGL_DIR/include/FTGL/FTGL.h -a -f $FTGL_DIR/include/FTGL/FTGLTextureFont.h ]; then
+      FTGL_INCLUDE="-I$FTGL_DIR/include/FTGL/"
+      FTGL_FLAG="-DUSE_FTGL_2_1_2"
+  fi
 
   if test -z "$FTGL_INCLUDE" ; then
-      AC_MSG_ERROR("could not find ftgl.h in $FTGL_DIR/include/FTGL.")
+      AC_MSG_ERROR("could not find ftgl.h/FTGL.h in $FTGL_DIR/include/FTGL.")
   fi
   
   test -f $FTGL_DIR/lib/libftgl.so && FTGL_LIBDIR="$FTGL_DIR/lib"
@@ -865,7 +871,7 @@
   
 
   dnl If we got this far all is well!
-  FTGL_ENABLED="-DUSE_FTGL"
+  FTGL_ENABLED="-DUSE_FTGL $FTGL_FLAG"
   FTGL_INC="$FTGL_INCLUDE"
   FTGL_LIB="-L$FTGL_LIBDIR -lftgl"
   AC_ADD_RUNPATH("$FTGL_LIBDIR")

Modified: trunk/mapserver/mapoglrenderer.h
===================================================================
--- trunk/mapserver/mapoglrenderer.h	2010-01-05 14:54:33 UTC (rev 9668)
+++ trunk/mapserver/mapoglrenderer.h	2010-01-05 14:58:01 UTC (rev 9669)
@@ -6,7 +6,14 @@
 
 #include <vector>
 #include <map>
-#include <FTGL/ftgl.h>
+
+#ifdef USE_FTGL_2_1_2
+#include <FTGL/FTGL.h>
+ 
+#else
+#include <FTGL/ftgl.h>
+ 
+#endif
 #include <FTGL/FTGLTextureFont.h>
 
 #include "mapoglcontext.h"



More information about the mapserver-commits mailing list