magics++ (2.10.0.dfsg-5.1) newconf.patch

Summary

 configure.ac    |   13 +++++--------
 src/Makefile.am |    6 +++---
 src/Makefile.in |    6 +++---
 3 files changed, 11 insertions(+), 14 deletions(-)

    
download this patch

Patch contents

Index: magics++-2.10.0.dfsg/configure.ac
===================================================================
--- magics++-2.10.0.dfsg.orig/configure.ac	2010-07-23 20:56:00.000000000 +0100
+++ magics++-2.10.0.dfsg/configure.ac	2010-07-23 20:59:22.000000000 +0100
@@ -466,14 +466,6 @@
   AC_DEFINE(MAGICS_JSON, 1)
 fi
 
-#
-#  TERRALIB support --enable-terralib
-#
-AC_ARG_ENABLE(terralib, [[ --enable-terralib	enable the TERRALIB support (TERRALIB) [default=yes]]],
-  terralib=$enableval, terralib=yes)
-if test "x$terralib" = "xno" ; then
-  AC_DEFINE(MAGICS_TERRALIB, 0)
-fi
 
 #
 #  apps compiltation --enable-apps
@@ -569,6 +561,11 @@
        [EMOS_LIB_NAME="$with_emos_libname"]
 )
 
+AC_ARG_WITH([terralib],
+	[AC_HELP_STRING([--with-terralib],[Location of Terralib @<:@default is one shipped with Magics++@:>@])],
+        [AC_DEFINE(MAGICS_TERRALIB, 0)]
+)
+
 AC_CHECK_LIB(${EMOS_LIB_NAME},pbopen,echo "EmosLib detected",
             AC_MSG_ERROR([Emoslib (${EMOS_LIB_NAME}) could not be linked! Try setting --with-emos-libraries and --with-emos-libname.]))
 
Index: magics++-2.10.0.dfsg/src/Makefile.am
===================================================================
--- magics++-2.10.0.dfsg.orig/src/Makefile.am	2010-07-24 00:12:11.000000000 +0100
+++ magics++-2.10.0.dfsg/src/Makefile.am	2010-07-24 00:12:43.000000000 +0100
@@ -5,10 +5,10 @@
 oda_lib			= oda/liboda.la
 endif
 
-#if MAGICS_TERRALIB
+if MAGICS_TERRALIB
 MAG_TERRALIB_DIR 	= terralib
-terralib_lib		= terralib/libterralib.la
-#endif
+terralib_lib		= -lterralib
+endif
 
 if MAGICS_JSON
 JSON_DIR		= web
Index: magics++-2.10.0.dfsg/src/Makefile.in
===================================================================
--- magics++-2.10.0.dfsg.orig/src/Makefile.in	2010-07-24 00:10:45.000000000 +0100
+++ magics++-2.10.0.dfsg/src/Makefile.in	2010-07-24 00:12:09.000000000 +0100
@@ -350,10 +350,10 @@
 @MAGICS_ODB_TRUE@MAG_ODB_DIR = oda
 @MAGICS_ODB_TRUE@oda_lib = oda/liboda.la
 
-#if MAGICS_TERRALIB
+ifdef MAGICS_TERRALIB
 MAG_TERRALIB_DIR = terralib
-terralib_lib = terralib/libterralib.la
-#endif
+terralib_lib = -lterralib
+endif
 @MAGICS_JSON_TRUE@JSON_DIR = web
 @MAGICS_JSON_TRUE@JSON_lib = web/libWeb.la
 @MAGICS_BUFR_TRUE@bufr_dir = MvObs