[mapserver-commits] r12910 - in trunk/mapserver: . m4 mapscript/java

svn at osgeo.org svn at osgeo.org
Fri Dec 23 06:43:56 EST 2011


Author: tbonfort
Date: 2011-12-23 03:43:56 -0800 (Fri, 23 Dec 2011)
New Revision: 12910

Added:
   trunk/mapserver/m4/ax_jni_include_dir.m4
Modified:
   trunk/mapserver/Makefile.in
   trunk/mapserver/configure
   trunk/mapserver/configure.in
   trunk/mapserver/mapscript/java/Makefile.in
Log:
java mapscript building update to libtool


Modified: trunk/mapserver/Makefile.in
===================================================================
--- trunk/mapserver/Makefile.in	2011-12-23 10:03:37 UTC (rev 12909)
+++ trunk/mapserver/Makefile.in	2011-12-23 11:43:56 UTC (rev 12910)
@@ -251,7 +251,7 @@
 LT_LDFLAGS= -release $(MS_VERSION) $(RUNPATHS)
 LINK=$(LTLD) $(LD) $(LT_LDFLAGS)
 
-DEFINES = $(IGNORE_MISSING_DATA) $(USE_POINT_Z_M) $(STRINGS) @ALL_ENABLED@ -DDISABLE_CVSID
+DEFINES = @ALL_ENABLED@ 
 
 INCLUDES = $(FT_INC) $(REGEX_INC) $(PNG_INC) $(GIF_INC) $(JPEG_INC) $(GD_INC) \
         $(AGG_INC) $(OGL_INC) $(FTGL_INC) $(PROJ_INC) $(EGIS_INC) \

Modified: trunk/mapserver/configure
===================================================================
--- trunk/mapserver/configure	2011-12-23 10:03:37 UTC (rev 12909)
+++ trunk/mapserver/configure	2011-12-23 11:43:56 UTC (rev 12910)
@@ -618,6 +618,8 @@
 ALL_INC
 ALL_ENABLED
 OS_INCLUDE_DIR
+JAVA_INCLUDE
+_ACJNI_JAVAC
 MAKE_PHPMS_CLEAN
 MAKE_PHPMS
 USE_PHP_REGEX
@@ -11081,7 +11083,81 @@
 
 
 
+# ===========================================================================
+#    http://www.gnu.org/software/autoconf-archive/ax_jni_include_dir.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_JNI_INCLUDE_DIR
+#
+# DESCRIPTION
+#
+#   AX_JNI_INCLUDE_DIR finds include directories needed for compiling
+#   programs using the JNI interface.
+#
+#   JNI include directories are usually in the java distribution This is
+#   deduced from the value of JAVAC. When this macro completes, a list of
+#   directories is left in the variable JNI_INCLUDE_DIRS.
+#
+#   Example usage follows:
+#
+#     AX_JNI_INCLUDE_DIR
+#
+#     for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
+#     do
+#             CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR"
+#     done
+#
+#   If you want to force a specific compiler:
+#
+#   - at the configure.in level, set JAVAC=yourcompiler before calling
+#   AX_JNI_INCLUDE_DIR
+#
+#   - at the configure level, setenv JAVAC
+#
+#   Note: This macro can work with the autoconf M4 macros for Java programs.
+#   This particular macro is not part of the original set of macros.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Don Anderson <dda at sleepycat.com>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved. This file is offered as-is, without any
+#   warranty.
 
+#serial 7
+
+# This is what autoupdate's m4 run will expand.  It fires
+# the warning (with _au_warn_XXX), outputs it into the
+# updated configure.ac (with AC_DIAGNOSE), and then outputs
+# the replacement expansion.
+
+
+# This is an auxiliary macro that is also run when
+# autoupdate runs m4.  It simply calls m4_warning, but
+# we need a wrapper so that each warning is emitted only
+# once.  We break the quoting in m4_warning's argument in
+# order to expand this macro's arguments, not AU_DEFUN's.
+
+
+# Finally, this is the expansion that is picked up by
+# autoconf.  It tells the user to run autoupdate, and
+# then outputs the replacement expansion.  We do not care
+# about autoupdate's warning because that contains
+# information on what to do *after* running autoupdate.
+
+
+
+# _ACJNI_FOLLOW_SYMLINKS <path>
+# Follows symbolic links on <path>,
+# finally setting variable _ACJNI_FOLLOWED
+# ----------------------------------------
+# _ACJNI
+
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -15747,6 +15823,7 @@
 
 STRINGS=$STRINGS
 
+ALL_ENABLED="$STRINGS $ALL_ENABLED"
 
 
 
@@ -21691,6 +21768,7 @@
 fi
 IGNORE_MISSING_DATA=$IGNORE_MISSING_DATA
 
+ALL_ENABLED="$IGNORE_MISSING_DATA $ALL_ENABLED"
 
 
 # Check whether --enable-point-z-m was given.
@@ -22451,11 +22529,132 @@
 $as_echo "no, autodetected $OS_INCLUDE_DIR" >&6; }
 fi
 
+if test -z $JAVAC; then
+   JAVAC="javac"
+fi
+
+
+JNI_INCLUDE_DIRS=""
+
+test "x$JAVAC" = x && as_fn_error $? "'\$JAVAC' undefined" "$LINENO" 5
+# Extract the first word of "$JAVAC", so it can be a program name with args.
+set dummy $JAVAC; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path__ACJNI_JAVAC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $_ACJNI_JAVAC in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path__ACJNI_JAVAC="$_ACJNI_JAVAC" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path__ACJNI_JAVAC="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path__ACJNI_JAVAC" && ac_cv_path__ACJNI_JAVAC="no"
+  ;;
+esac
+fi
+_ACJNI_JAVAC=$ac_cv_path__ACJNI_JAVAC
+if test -n "$_ACJNI_JAVAC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_ACJNI_JAVAC" >&5
+$as_echo "$_ACJNI_JAVAC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test "x$_ACJNI_JAVAC" = xno; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC could not be found in path" >&5
+$as_echo "$JAVAC could not be found in path" >&6; }
+else
+
+# find the include directory relative to the javac executable
+_cur=""$_ACJNI_JAVAC""
+while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking symlink for $_cur" >&5
+$as_echo_n "checking symlink for $_cur... " >&6; }
+        _slink=`ls -ld "$_cur" | sed 's/.* -> //'`
+        case "$_slink" in
+        /*) _cur="$_slink";;
+        # 'X' avoids triggering unwanted echo options.
+        *) _cur=`echo "X$_cur" | sed -e 's/^X//' -e 's:[^/]*$::'`"$_slink";;
+        esac
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cur" >&5
+$as_echo "$_cur" >&6; }
+done
+_ACJNI_FOLLOWED="$_cur"
+
+   _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[^/]*$::'`
+   case "$host_os" in
+           darwin*)        _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[^/]*$::'`
+                           _JINC="$_JTOPDIR/Headers";;
+           *)              _JINC="$_JTOPDIR/include";;
+   esac
+   $as_echo "$as_me:${as_lineno-$LINENO}: _JTOPDIR=$_JTOPDIR" >&5
+   $as_echo "$as_me:${as_lineno-$LINENO}: _JINC=$_JINC" >&5
+
+   # On Mac OS X 10.6.4, jni.h is a symlink:
+   # /System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/jni.h
+   # -> ../../CurrentJDK/Headers/jni.h.
+   if test -f "$_JINC/jni.h" || test -L "$_JINC/jni.h"; then
+           JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JINC"
+   else
+           _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[^/]*$::'`
+           if test -f "$_JTOPDIR/include/jni.h"; then
+                   JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include"
+           else
+                   as_fn_error $? "cannot find java include files" "$LINENO" 5
+           fi
+   fi
+
+   # get the likely subdirectories for system specific java includes
+   case "$host_os" in
+   bsdi*)          _JNI_INC_SUBDIRS="bsdos";;
+   linux*)         _JNI_INC_SUBDIRS="linux genunix";;
+   osf*)           _JNI_INC_SUBDIRS="alpha";;
+   solaris*)       _JNI_INC_SUBDIRS="solaris";;
+   mingw*)		_JNI_INC_SUBDIRS="win32";;
+   cygwin*)	_JNI_INC_SUBDIRS="win32";;
+   *)              _JNI_INC_SUBDIRS="genunix";;
+   esac
+
+   # add any subdirectories that are present
+   for JINCSUBDIR in $_JNI_INC_SUBDIRS
+   do
+       if test -d "$_JTOPDIR/include/$JINCSUBDIR"; then
+            JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include/$JINCSUBDIR"
+       fi
+   done
+fi
+
+for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
+do
+   JAVA_INCLUDE="$JAVA_INCLUDE -I$JNI_INCLUDE_DIR"
+done
+JAVA_INCLUDE=$JAVA_INCLUDE
+
+
+
 OS_INCLUDE_DIR=$OS_INCLUDE_DIR
 
 
 
-ALL_ENABLED=$ALL_ENABLED
+ALL_ENABLED="$ALL_ENABLED -DDISABLE_CVSID"
 
 ALL_INC=$ALL_INC
 

Modified: trunk/mapserver/configure.in
===================================================================
--- trunk/mapserver/configure.in	2011-12-23 10:03:37 UTC (rev 12909)
+++ trunk/mapserver/configure.in	2011-12-23 11:43:56 UTC (rev 12910)
@@ -34,6 +34,7 @@
 AC_CONFIG_MACRO_DIR([m4/])
 m4_include([m4/mapserver.m4])
 m4_include([m4/apache.m4])
+m4_include([m4/ax_jni_include_dir.m4])
 AC_CONFIG_SRCDIR([mapserv.c])
 dnl Checks for programs.
 AC_PROG_CC
@@ -82,6 +83,7 @@
 AC_CHECK_FUNC(strlcpy, ,      STRINGS="-DNEED_STRLCPY $STRINGS")
 AC_CHECK_FUNC(vsnprintf, STRINGS="-DHAVE_VSNPRINTF $STRINGS", )
 AC_SUBST(STRINGS, $STRINGS)
+ALL_ENABLED="$STRINGS $ALL_ENABLED"
 
 
 dnl ---------------------------------------------------------------------
@@ -2410,6 +2412,7 @@
   AC_MSG_RESULT([Compiling with -DIGNORE_MISSING_DATA.])
 fi
 AC_SUBST(IGNORE_MISSING_DATA, $IGNORE_MISSING_DATA)
+ALL_ENABLED="$IGNORE_MISSING_DATA $ALL_ENABLED"
 
 dnl ---------------------------------------------------------------------
 dnl Check USE_POINT_Z_M option (OFF by default)
@@ -2748,13 +2751,24 @@
 AC_MSG_RESULT([no, autodetected $OS_INCLUDE_DIR])
 fi
 
+if test -z $JAVAC; then
+   JAVAC="javac"
+fi
+AX_JNI_INCLUDE_DIR
+for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
+do
+   JAVA_INCLUDE="$JAVA_INCLUDE -I$JNI_INCLUDE_DIR"
+done
+AC_SUBST(JAVA_INCLUDE,$JAVA_INCLUDE)
+
+
 AC_SUBST(OS_INCLUDE_DIR, $OS_INCLUDE_DIR)
 
 dnl ---------------------------------------------------------------------
 dnl Generate output files
 dnl ---------------------------------------------------------------------
 
-AC_SUBST(ALL_ENABLED, $ALL_ENABLED)
+AC_SUBST(ALL_ENABLED, "$ALL_ENABLED -DDISABLE_CVSID")
 AC_SUBST(ALL_INC, $ALL_INC)
 AC_SUBST(ALL_LIB, $ALL_LIB)
 AC_SUBST(ALL_STATIC_LIB, $ALL_STATIC_LIB)

Added: trunk/mapserver/m4/ax_jni_include_dir.m4
===================================================================
--- trunk/mapserver/m4/ax_jni_include_dir.m4	                        (rev 0)
+++ trunk/mapserver/m4/ax_jni_include_dir.m4	2011-12-23 11:43:56 UTC (rev 12910)
@@ -0,0 +1,121 @@
+# ===========================================================================
+#    http://www.gnu.org/software/autoconf-archive/ax_jni_include_dir.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_JNI_INCLUDE_DIR
+#
+# DESCRIPTION
+#
+#   AX_JNI_INCLUDE_DIR finds include directories needed for compiling
+#   programs using the JNI interface.
+#
+#   JNI include directories are usually in the java distribution This is
+#   deduced from the value of JAVAC. When this macro completes, a list of
+#   directories is left in the variable JNI_INCLUDE_DIRS.
+#
+#   Example usage follows:
+#
+#     AX_JNI_INCLUDE_DIR
+#
+#     for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
+#     do
+#             CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR"
+#     done
+#
+#   If you want to force a specific compiler:
+#
+#   - at the configure.in level, set JAVAC=yourcompiler before calling
+#   AX_JNI_INCLUDE_DIR
+#
+#   - at the configure level, setenv JAVAC
+#
+#   Note: This macro can work with the autoconf M4 macros for Java programs.
+#   This particular macro is not part of the original set of macros.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Don Anderson <dda at sleepycat.com>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved. This file is offered as-is, without any
+#   warranty.
+
+#serial 7
+
+AU_ALIAS([AC_JNI_INCLUDE_DIR], [AX_JNI_INCLUDE_DIR])
+AC_DEFUN([AX_JNI_INCLUDE_DIR],[
+
+JNI_INCLUDE_DIRS=""
+
+test "x$JAVAC" = x && AC_MSG_ERROR(['\$JAVAC' undefined])
+AC_PATH_PROG([_ACJNI_JAVAC], [$JAVAC], [no])
+if test "x$_ACJNI_JAVAC" = xno; then
+   AC_MSG_RESULT([$JAVAC could not be found in path])
+else
+   _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
+   _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
+   case "$host_os" in
+           darwin*)        _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
+                           _JINC="$_JTOPDIR/Headers";;
+           *)              _JINC="$_JTOPDIR/include";;
+   esac
+   _AS_ECHO_LOG([_JTOPDIR=$_JTOPDIR])
+   _AS_ECHO_LOG([_JINC=$_JINC])
+   
+   # On Mac OS X 10.6.4, jni.h is a symlink:
+   # /System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/jni.h
+   # -> ../../CurrentJDK/Headers/jni.h.
+   if test -f "$_JINC/jni.h" || test -L "$_JINC/jni.h"; then
+           JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JINC"
+   else
+           _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
+           if test -f "$_JTOPDIR/include/jni.h"; then
+                   JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include"
+           else
+                   AC_MSG_ERROR([cannot find java include files])
+           fi
+   fi
+   
+   # get the likely subdirectories for system specific java includes
+   case "$host_os" in
+   bsdi*)          _JNI_INC_SUBDIRS="bsdos";;
+   linux*)         _JNI_INC_SUBDIRS="linux genunix";;
+   osf*)           _JNI_INC_SUBDIRS="alpha";;
+   solaris*)       _JNI_INC_SUBDIRS="solaris";;
+   mingw*)		_JNI_INC_SUBDIRS="win32";;
+   cygwin*)	_JNI_INC_SUBDIRS="win32";;
+   *)              _JNI_INC_SUBDIRS="genunix";;
+   esac
+   
+   # add any subdirectories that are present
+   for JINCSUBDIR in $_JNI_INC_SUBDIRS
+   do
+       if test -d "$_JTOPDIR/include/$JINCSUBDIR"; then
+            JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include/$JINCSUBDIR"
+       fi
+   done
+fi
+])
+
+# _ACJNI_FOLLOW_SYMLINKS <path>
+# Follows symbolic links on <path>,
+# finally setting variable _ACJNI_FOLLOWED
+# ----------------------------------------
+AC_DEFUN([_ACJNI_FOLLOW_SYMLINKS],[
+# find the include directory relative to the javac executable
+_cur="$1"
+while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do
+        AC_MSG_CHECKING([symlink for $_cur])
+        _slink=`ls -ld "$_cur" | sed 's/.* -> //'`
+        case "$_slink" in
+        /*) _cur="$_slink";;
+        # 'X' avoids triggering unwanted echo options.
+        *) _cur=`echo "X$_cur" | sed -e 's/^X//' -e 's:[[^/]]*$::'`"$_slink";;
+        esac
+        AC_MSG_RESULT([$_cur])
+done
+_ACJNI_FOLLOWED="$_cur"
+])# _ACJNI

Modified: trunk/mapserver/mapscript/java/Makefile.in
===================================================================
--- trunk/mapserver/mapscript/java/Makefile.in	2011-12-23 10:03:37 UTC (rev 12909)
+++ trunk/mapserver/mapscript/java/Makefile.in	2011-12-23 11:43:56 UTC (rev 12910)
@@ -3,248 +3,15 @@
 
 prefix		=	@prefix@
 exec_prefix	=	@exec_prefix@
-INST_PREFIX	=	@exec_prefix@
-INST_LIB	=	@libdir@
-INST_BIN	=	@bindir@
-
-#
-# If you want to ignore missing datafile errors uncomment the following
-# line. This is especially useful with large tiled datasets that may not
-# have complete data for each tile.
-#
-#IGNORE_MISSING_DATA=-DIGNORE_MISSING_DATA
-IGNORE_MISSING_DATA = @IGNORE_MISSING_DATA@
-
-#
-# If you want to use shape Z and M parameter this option must be set.
-# It's OFF by default.
-#
-#USE_POINT_Z_M=-DUSE_POINT_Z_M
-USE_POINT_Z_M = @USE_POINT_Z_M@
-
-#
-# If you want to use disable fast versions of NINT (used by default) then
-# define the following
-# It's OFF by default.
-#
-#USE_NINT=-DUSE_GENERIC_MS_NINT
-USE_NINT = @USE_NINT@
-
-#
-# Apparently these aren't as commonplace as I'd hoped. Edit the
-# following line to reflect the missing functions on your platform.
-#
-# STRINGS=-DNEED_STRCASECMP -DNEED_STRNCASECMP -DNEED_STRDUP -DNEED_STRLCAT
-STRINGS= @STRINGS@
-
-# Proj.4 distribution (cartographic projection routines). Not required for normal use. (EXPERIMENTAL)
-PROJ_INC= @PROJ_INC@
-PROJ_LIBS= @PROJ_LIBS@
-PROJ=     @PROJ_ENABLED@
-
-# GD distribution (graphics library GIF and/or PNG support). (REQUIRED)
-#
-#   - Versions 1.3 to 1.5 write non-LZW GIF (-DUSE_GD_1_3).
-#   - Versions 1.6 and greater write PNG (-DUSE_GD_1_6). Add -lpng -lz to GD_LIB line.
-#
-#
-GDFONT_OBJ=gd-1.2/gdfontt.o gd-1.2/gdfonts.o gd-1.2/gdfontmb.o gd-1.2/gdfontl.o gd-1.2/gdfontg.o
-GD_INC=  @GD_INC@
-GD_LIB=  @GD_LIB@
-GD=      @GD_DEF@
-GD_STATIC = @GD_STATIC@
-
-#
-# Optional Anti-Grain Geometry Support.
-#
-#AGG=     @AGG_ENABLED@ commented because it breaks the build
-AGG_INC=  @AGG_INC@
-AGG_OBJ=  @AGG_OBJ@
-AGG_LIB= @AGG_LIB@
-
-#
-# Optional Opengl Support.
-#
-FTGL=     @FTGL_ENABLED@
-FTGL_LIB=  @FTGL_LIB@
-FTGL_INC=  @FTGL_INC@
-
-#Freetype support
-FT_ENABLE=     @FT_ENABLED@
-FT_LIB=  @FT_LIB@
-FT_INC=  @FT_INC@
-
-#
-# Optional Opengl Support.
-#
-OGL=     @OGL_ENABLED@
-OGL_LIB=  @OGL_LIB@
-OGL_INC=  @OGL_INC@
-
-PNG_INC= @PNG_INC@
-PNG_LIB= @PNG_LIB@
-
-#
-# Giflib support
-#
-GIF_INC= @GIF_INC@
-GIF_LIB= @GIF_LIB@
-GIF=     @GIF_ENABLED@
-
-# 
-# ZLIB option (compressed SVG)
-#
-ZLIB_INC=  @ZLIB_INC@
-ZLIB_LIB=  @ZLIB_LIB@
-ZLIB=      @ZLIB_ENABLED@
-
-# JPEG distribution (raster support for grayscale JPEG images, INPUT ONLY).
-JPEG_INC= @JPEG_INC@
-JPEG_LIB= @JPEG_LIB@
-JPEG=     @JPEG_ENABLED@
-
-# ESRI SDE Support. You MUST have the SDE Client libraries and include files
-# on your system someplace. The actual SDE server you wish to connect to can
-# be elsewhere.
-SDE=	  @SDE_ENABLED@
-SDE_LIB=  @SDE_LIB@
-SDE_INC=  @SDE_INC@
-
-# Optional OGR Support.  OGC Simple Feature inspired interface for vector
-# formats.  See http://ogr.maptools.org/
-# Note that since OGR is part of the GDAL library, it uses GDAL_LIB + GDAL_INC
-OGR=	  @OGR_ENABLED@
-
-# Optional GDAL Support (provides read access to a variety of raster formats)
-# See http://www.remotesensing.org/gdal/
-GDAL=	  @GDAL_ENABLED@
-GDAL_LIB=  @GDAL_LIB@
-GDAL_INC=  @GDAL_INC@
-
-# Optional GEOS Support.
-# See http://geos.refractions.net/
-GEOS=     @GEOS_ENABLED@
-GEOS_LIB=  @GEOS_LIB@
-GEOS_INC=  @GEOS_INC@
-
-# Optional PostGIS Support.  See http://postgis.refractions.net/
-POSTGIS=      @POSTGIS_ENABLED@
-POSTGIS_LIB=  @POSTGIS_LIB@
-POSTGIS_INC=  @POSTGIS_INC@
-
-# Optional Mysql Support.  See http://postgis.refractions.net/
-MYSQL=      @MYSQL_ENABLED@
-MYSQL_LIB=  @MYSQL_LIB@
-MYSQL_INC=  @MYSQL_INC@
-
-# Optional ORACLESPATIAL Support. Contact: cabral at cttmar.univali.br
-ORACLESPATIAL=@ORACLESPATIAL_ENABLED@
-ORACLESPATIAL_LIB=@ORACLESPATIAL_LIB@
-ORACLESPATIAL_INC=@ORACLESPATIAL_INC@
-
-# libcurl ... required for WMS/WFS Client Connections
-CURL_INC=@CURL_INC@
-CURL_LIB=@CURL_LIB@
-
-# libfribibi ... 
-FRIBIDI=@FRIBIDI_ENABLED@
-FRIBIDI_INC=@FRIBIDI_INC@
-FRIBIDI_LIB=@FRIBIDI_LIB@
-
-
-# libxml2 ... required for OGC SOS Server
-XML2_INC=@XML2_INC@
-XML2_LIB=@XML2_LIB@
-
-# libxslt ... required for xml mapfile
-XSLT_INC=@XSLT_INC@
-XSLT_LIB=@XSLT_LIB@
-
-# libexslt ... required for xml mapfile
-EXSLT_INC=@EXSLT_INC@
-EXSLT_LIB=@EXSLT_LIB@
-
-# OWS: OGC Web Services support
-# OGC WMS Server:  -DUSE_WMS_SVR (Requires PROJ4 support)
-# OGC WMS Client Connections:  -DUSE_WMS_LYR (Requires PROJ4 and libcurl)
-# OGC WFS Server: -DUSE_WFS_SVR (Requires OGR, PROJ4 recommended)
-# OGC WFS Client: -DUSE_WFS_LYR (Requires OGR, PROJ4 and libcurl)
-# OGC WCS Server: -DUSE_WCS_SVR (Requires GDAL and PROJ4)
-# OGC SOS Server: -DUSE_SOS_SVR (Requires PROJ4 and libxml2)
-OWS=@WMS_SVR_ENABLED@ @WMS_LYR_ENABLED@ @WFS_SVR_ENABLED@ @WFS_LYR_ENABLED@ @WCS_SVR_ENABLED@ @SOS_SVR_ENABLED@
-
-#
-# IMPORTANT NOTE ABOUT REGEX FOR PHP_MAPSCRIPT USERS:
-#
-# In order to compile the PHP_MAPSCRIPT module, we have to make MapServer
-# uses the same version of the REGEX library that PHP was compiled with:
-#
-REGEX_OBJ=@PHP_REGEX_OBJ@
-REGEX_INC=@PHP_REGEX_INC@
-
-#
-# Multithreading support.
-#
-THREAD=@THREAD_FLAG@
-THREAD_LIB=@THREAD_LIB@
-
-#
-# libiconv - Enables Internationalization
-#
-ICONV=@ICONV_ENABLED@
-ICONV_LIB=@ICONV_LIB@
-ICONV_INC=@ICONV_INC@
-
-CAIRO=@CAIRO_ENABLED@
-CAIRO_LIB=@CAIRO_LIB@
-CAIRO_INC=@CAIRO_INC@
-
-#
-# Pick a compiler, etc. Flex and bison are only required if you need to modify the mapserver lexer (maplexer.l) or expression parser (mapparser.y).
-#
+libdir	=	@libdir@
+bindir	=	@bindir@
+top_builddir = @top_builddir@
+SHELL = @SHELL@
 CXX=	@CXX@
 CC=     @CC@
 LD=     @CXX@
-AR= ar rc
-RANLIB= @RANLIB@
-LEX=    @LEX@
-YACC=   @YACC@
-LD_SHARED = @LD_SHARED@
-
-XTRALIBS= @XTRALIBS@
-RUNPATHS= @RPATHS@
-
-CCFLAGS= @CFLAGS@ @DEBUG_FLAGS@ \
-        $(IGNORE_MISSING_DATA) $(STRINGS) $(PROJ) $(OWS) \
-	$(ORACLESPATIAL) $(JPEG) $(GD) $(AGG) $(PDF) $(SDE) $(OGR) $(GDAL) $(GEOS) $(ICONV) \
-	$(POSTGIS) $(MYSQL) $(THREAD) $(GD_INC) $(AGG_INC) \
-	$(PROJ_INC) $(JPEG_INC) $(EGIS_INC) $(SDE_INC) \
-	$(REGEX_INC) $(GDAL_INC) $(POSTGIS_INC) $(MYSQL_INC) \
-	$(CURL_INC) $(ORACLESPATIAL_INC) $(GEOS_INC) $(ICONV_INC) $(XML2_INC) \
-	$(FRIBIDI_INC) $(CAIRO_INC) $(OGL_INC) $(FTGL_INC)
-
-# Link flags and shared libs only
-SUP_LIBS =  $(FT_LIB) $(GD_LIB) $(AGG_LIB) $(OGL_LIB) $(FTGL_LIB) $(PROJ_LIBS) \
-          $(JPEG_LIB) $(PNG_LIB) $(GIF_LIB) $(SDE_LIB) $(GDAL_LIB) $(POSTGIS_LIB) \
-	  $(MYSQL_LIB) $(CURL_LIB) $(ORACLESPATIAL_LIB) $(GEOS_LIB) \
-          $(THREAD_LIB) $(ICONV_LIB) $(FASTCGI_LIB) $(XSLT_LIB) $(EXSLT_LIB) \
-          $(ZLIB_LIB) $(XML2_LIB) $(FRIBIDI_LIB) $(XTRALIBS) $(CAIRO_LIB)
-
-# STATIC_LIBS is full filename with path of libs that will be statically linked
-STATIC_LIBS= $(GD_STATIC)
-
-EXE_LDFLAGS =	$(RUNPATHS) -L. -lmapserver $(SUP_LIBS) $(STATIC_LIBS)
-
-LDFLAGS= $(RUNPATHS) -L../.. -lmapserver $(SUP_LIBS) $(STATIC_LIBS)
-
-LIBMAPSCRIPT_SHARED= libmapscript. at SO_EXT@
-LD_SHARED= @LD_SHARED@
-
-# END OF CONFIGURE----
-
-#
-# SWIG Stuff
-#
+LIBTOOL=@LIBTOOL@
+INSTALL=@INSTALL@
 SWIG=swig
 
 #
@@ -254,45 +21,56 @@
 JAVAC=javac
 JAVA=java
 JAR=jar
-JAVA_INCLUDE=-I${JAVA_HOME}/include -I${JAVA_HOME}/include/@OS_INCLUDE_DIR@
+JAVA_INCLUDE=@JAVA_INCLUDE@
 
-CC=gcc
+LTCC=$(LIBTOOL) --mode=compile --tag=CC
+LTCXX=$(LIBTOOL) --mode=compile --tag=CXX
+LTLD=$(LIBTOOL) --mode=link --tag=CXX
+LTINSTALL=$(LIBTOOL) --mode=install
 
-#
-# --- You shouldn't have to edit anything else. ---
-#
-all: mapscript_jar
+XTRALIBS= @XTRALIBS@
 
-# This target is for users who are generating their own interface
-# with SWIG versions lower than 1.3.19 (no -outdir)
-# It is here for bacwkards compatibilty as swig <1.3.24 is no longer supported
-interface: interface_release
+RUNPATH= -rpath $(libdir)
+DEFINES=@ALL_ENABLED@
+CFLAGS = $(DEFINES) @CFLAGS@ -I$(PYINCDIR) @MS_INC@ @ALL_INC@
 
-interface_release: mapscript_wrap.c
+LT_LDFLAGS= $(RUNPATH) -module
+OBJ_SUFFIX=lo
+LINK=$(LTLD) $(LD) $(LT_LDFLAGS)
+MS_LIB =   $(top_builddir)/libmapserver.la
 
-# This target will be used in the release script
+
+.SUFFIXES:
+.SUFFIXES: .cpp .c .$(OBJ_SUFFIX)
+
+all: mapscript.jar
+
+libmapscript.la: mapscript_wrap.lo $(MS_LIB)
+	$(LINK) -o $@ mapscript_wrap.lo $(MS_LIB)
+
+%.lo: %.c
+	$(LTCC) $(CC) $(CFLAGS) $(JAVA_INCLUDE) -c -o $@ $<
+
 mapscript_wrap.c: ../mapscript.i
 	mkdir -p edu/umn/gis/mapscript 
-	$(SWIG) -java -package edu.umn.gis.mapscript -outdir edu/umn/gis/mapscript -o mapscript_wrap.c ../mapscript.i
+	$(SWIG) -java -package edu.umn.gis.mapscript $(DEFINES) -outdir edu/umn/gis/mapscript -o mapscript_wrap.c ../mapscript.i
 
-mapscript_so: mapscript_wrap.c
-	$(CC) -fpic -c $(CCFLAGS) $(JAVA_INCLUDE) -fno-strict-aliasing mapscript_wrap.c
-	$(LD_SHARED) -fpic mapscript_wrap.o -o $(LIBMAPSCRIPT_SHARED) $(LDFLAGS)
-
 mapscript_java: mapscript_wrap.c
 	$(JAVAC) edu/umn/gis/mapscript/*.java
 
 mapscript_javadoc: mapscript_wrap.c
 	$(JAVADOC) -d doc -sourcepath edu/umn/gis/mapscript/*.java
 
-mapscript_jar: mapscript_java mapscript_so
+mapscript.jar: mapscript_java libmapscript.la
 	$(JAR) cf mapscript.jar edu
 
 clean:
+	-rm -rf .libs *.lo *.la *.so *.o pygdioctx/*.o pygdioctx/*.lo
 	rm -rf edu *.o *.c *. at SO_EXT@ *.java *.jar *.png
 	rm -rf examples/*.class
 	rm -rf tests/threadtest/*.class
 
+
 ifneq ($(PROJ),)
 ifneq ($(GDAL),)
 test:



More information about the mapserver-commits mailing list