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

tautges at mcs.anl.gov tautges at mcs.anl.gov
Fri Dec 10 12:20:02 CST 2010


Author: tautges
Date: 2010-12-10 12:20:01 -0600 (Fri, 10 Dec 2010)
New Revision: 4350

Modified:
   MOAB/trunk/config/netcdf.m4
Log:
Removing support for C++ netcdf library.



Modified: MOAB/trunk/config/netcdf.m4
===================================================================
--- MOAB/trunk/config/netcdf.m4	2010-12-10 18:07:00 UTC (rev 4349)
+++ MOAB/trunk/config/netcdf.m4	2010-12-10 18:20:01 UTC (rev 4350)
@@ -1,5 +1,5 @@
 #######################################################################################
-# Check for NetCDF library ((C++)
+# Check for NetCDF library
 # Sets HAVE_NETCDF to 'yes' or 'no'
 # If HAVE_NETCDF == yes, then exports:
 #   NETCDF_CPPFLAGS
@@ -91,39 +91,38 @@
       [AC_MSG_RESULT([no]); NETCDF_SUFFICIENT_DIMS_VARS=no])
   fi
   
-  AC_MSG_CHECKING([for netcdf.hh])
-  AC_LANG_PUSH([C++])
-  HAVE_NETCDF_HH=no
+  AC_MSG_CHECKING([for netcdf.h])
+  HAVE_NETCDF_H=no
   AC_TRY_COMPILE( 
-[#include "netcdf.hh"], [], [HAVE_NETCDF_HH=yes; NETCDF_DEF=], [
+[#include "netcdf.h"], [], [HAVE_NETCDF_H=yes; NETCDF_DEF=], [
     AC_TRY_COMPILE( 
 [#define STRSTREAM_H_SPEC $NETCDF_DEF
- #include "netcdf.hh"], [], [HAVE_NETCDF_HH=yes], [NAVE_NETCDF_HH=no])])
-  AC_MSG_RESULT([$HAVE_NETCDF_HH])
-  if test $HAVE_NETCDF_HH != yes; then
-    AC_MSG_WARN([NetCDF C++ header not found])
+ #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_c++ library]])
+  AC_MSG_CHECKING([[for netcdf library]])
   old_LIBS="$LIBS"
-  LIBS="$LIBS -lnetcdf_c++ -lnetcdf"
+  LIBS="$LIBS -lnetcdf"
   AC_TRY_LINK(
-    [#include <netcdf.hh>], [NcFile ncf("foo",NcFile::ReadOnly);],
-    [AC_MSG_RESULT([yes]); NETCDF_LIBS="-lnetcdf_c++ -lnetcdf"], 
+    [#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_c++ library requiring HDF5-high-level])


More information about the moab-dev mailing list