[MOAB-dev] r4415 - MOAB/trunk/config

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Tue Jan 4 12:31:45 CST 2011


Author: kraftche
Date: 2011-01-04 12:31:44 -0600 (Tue, 04 Jan 2011)
New Revision: 4415

Modified:
   MOAB/trunk/config/netcdf.m4
Log:
remove more C++ related stuff from netcdf configure and better support detecting static netcdf 4.x

Modified: MOAB/trunk/config/netcdf.m4
===================================================================
--- MOAB/trunk/config/netcdf.m4	2011-01-04 18:31:05 UTC (rev 4414)
+++ MOAB/trunk/config/netcdf.m4	2011-01-04 18:31:44 UTC (rev 4415)
@@ -38,15 +38,6 @@
 HAVE_NETCDF=no
 if test "xno" != "x$NETCDF_ARG"; then
   HAVE_NETCDF=yes
-
-    # Check for stream headers and set STRSTREAM_H_SPEC accordingly
-  AC_LANG_PUSH([C++])
-  AC_CHECK_HEADER( [strstream.h], [NETCDF_DEF="<strstream.h>"], [
-    AC_CHECK_HEADER( [sstream.h], [NETCDF_DEF="<sstream.h>"], [
-      AC_CHECK_HEADER( [strstream], [NETCDF_DEF="<strstream>"], [
-        AC_CHECK_HEADER( [sstream], [NETCDF_DEF="<sstream>"] )
-  ] ) ] ) ] )
-  AC_LANG_POP([C++])
   
     # if a path is specified, update LIBS and INCLUDES accordingly
   if test "xyes" != "x$NETCDF_ARG" && test "x" != "x$NETCDF_ARG"; then
@@ -91,43 +82,20 @@
       [AC_MSG_RESULT([no]); NETCDF_SUFFICIENT_DIMS_VARS=no])
   fi
   
-  AC_MSG_CHECKING([for netcdf.h])
-  HAVE_NETCDF_H=no
-  AC_TRY_COMPILE( 
-[#include "netcdf.h"], [], [HAVE_NETCDF_H=yes; NETCDF_DEF=], [
-    AC_TRY_COMPILE( 
-[#define STRSTREAM_H_SPEC $NETCDF_DEF
- #include "netcdf.h"], [], [HAVE_NETCDF_H=yes], [HAVE_NETCDF_H=no])])
-  AC_MSG_RESULT([$HAVE_NETCDF_H])
-  if test $HAVE_NETCDF_H != yes; then
-    AC_MSG_WARN([NetCDF C header not found])
-    HAVE_NETCDF=no
-  fi
-  if test "x$NETCDF_DEF" != "x"; then
-    NETCDF_CPPFLAGS="$NETCDF_CPPFLAGS -DSTRSTREAM_H_SPEC=$NETCDF_DEF"
-    CPPFLAGS="$CPPFLAGS -DSTRSTREAM_H_SPEC=$NETCDF_DEF"
-  fi
-  AC_MSG_CHECKING([[for netcdf library]])
-  old_LIBS="$LIBS"
-  LIBS="$LIBS -lnetcdf"
-  AC_TRY_LINK(
-    [#include <netcdf.h>], [int ncFile; nc_create("foo",NC_CLOBBER, &ncFile);],
-    [AC_MSG_RESULT([yes]); NETCDF_LIBS="-lnetcdf"], 
-    [AC_MSG_RESULT([no]);
-     AC_MSG_CHECKING([for netcdf library requiring HDF5-high-level])
-     LIBS="$LIBS -lhdf5_hl $HDF5_LIBS"
-     AC_TRY_LINK(
-           [#include <netcdf.h>], [int ncFile; nc_create("foo",NC_CLOBBER, &ncFile);],


More information about the moab-dev mailing list