Commit e6dbcbef authored by Ralf Mueller's avatar Ralf Mueller
Browse files

Added checking for nc-config with --has-nc2 and --has-nc4. Still testing

parent 7dedd11e
......@@ -174,6 +174,7 @@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NC_CONFIG = @NC_CONFIG@
NETCDF_INCLUDE = @NETCDF_INCLUDE@
NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
NM = @NM@
......
......@@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.66],,
[m4_warning([this file was generated for autoconf 2.66.
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
[m4_warning([this file was generated for autoconf 2.68.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
......
......@@ -153,6 +153,7 @@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NC_CONFIG = @NC_CONFIG@
NETCDF_INCLUDE = @NETCDF_INCLUDE@
NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
NM = @NM@
......
This diff is collapsed.
......@@ -182,6 +182,7 @@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NC_CONFIG = @NC_CONFIG@
NETCDF_INCLUDE = @NETCDF_INCLUDE@
NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
NM = @NM@
......
......@@ -170,6 +170,7 @@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NC_CONFIG = @NC_CONFIG@
NETCDF_INCLUDE = @NETCDF_INCLUDE@
NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
NM = @NM@
......@@ -662,17 +663,17 @@ uninstall-am: uninstall-binPROGRAMS
@ENABLE_PYTHON_TRUE@pythonLibTest: pythonLib
@ENABLE_PYTHON_TRUE@ @cd python; python testLib.py
# =========================================================
@ENABLE_PYTHON_TRUE@pythonObjWrapper: cdiobj.i
@ENABLE_PYTHON_TRUE@python/cdiobj_wrap.cpp: cdiobj.i
@ENABLE_PYTHON_TRUE@@ENABLE_SWIG_TRUE@ $(SWIG) -python -c++ -module CdiObj -o python/cdiobj_wrap.cpp $(AM_CPPFLAGS) cdiobj.i
@ENABLE_PYTHON_TRUE@pythonObj: pythonObjWrapper
@ENABLE_PYTHON_TRUE@pythonObj: python/cdiobj_wrap.cpp
@ENABLE_PYTHON_TRUE@ cd python; CC="$(CC)" CXX="$(CXX)" BUILDLIBDIR="$(top_builddir)/src/.libs" LIBDIR=$(libdir) CFLAGS="$(CFLAGS)" LIBS="$(LIBS)" LDFLAGS="-L../../src/.libs $(LDFLAGS)" INCFLAGS="-I../" python setupObj.py build_ext --inplace
@ENABLE_PYTHON_TRUE@pythonObjTest: pythonObj
@ENABLE_PYTHON_TRUE@ @cd python; python testObj.py
@ENABLE_PYTHON_TRUE@pythonObjInstall: pythonObj
@ENABLE_PYTHON_TRUE@ cd python; CC="$(CC)" CXX="$(CXX)" BUILDLIBDIR="$(top_builddir)/src/.libs" LIBDIR=$(libdir) CFLAGS="$(CFLAGS)" LIBS="$(LIBS)" LDFLAGS="-L../../src/.libs $(LDFLAGS)" INCFLAGS="-I../" python setupObj.py install
@ENABLE_PYTHON_TRUE@ cd python; CC="$(CC)" CXX="$(CXX)" BUILDLIBDIR="$(top_builddir)/src/.libs" LIBDIR=$(libdir) CFLAGS="$(CFLAGS)" LIBS="$(LIBS)" LDFLAGS="-L../../src/.libs $(LDFLAGS)" INCFLAGS="-I../" python setupObj.py install --prefix=$(prefix)
# =========================================================
help:
@echo "#=====================================================#"
......
This diff is collapsed.
......@@ -131,7 +131,18 @@ AC_ARG_WITH([netcdf],
[AC_DEFINE([HAVE_LIBNETCDF],[1],[Define to 1 for NETCDF support])],
[AC_MSG_ERROR([Could not link to netcdf library])])
AC_SUBST([NETCDF_LDFLAGS],[" -lnetcdf"])
AC_SUBST([NETCDF_INCLUDE],[""])],
AC_SUBST([NETCDF_INCLUDE],[""])
AC_CHECK_PROG(NC_CONFIG,nc-config,nc-config)
AS_IF([test "x$NC_CONFIG" != "x"],
[AC_MSG_CHECKING([netcdf's nc2 support])
AS_IF([test "x$($NC_CONFIG --has-nc2)" = "xyes"],
[AC_DEFINE([HAVE_NETCDF2],[1],[Define to 1 for NETCDF2 support])
AC_MSG_RESULT([yes])],[AC_MSG_RESULT([no])])
AC_MSG_CHECKING([netcdf's nc4 support])
AS_IF([test "x$($NC_CONFIG --has-nc4)" = "xyes"],
[AC_DEFINE([HAVE_NETCDF4],[1],[Define to 1 for NETCDF4 support])
AC_MSG_RESULT([yes])],[AC_MSG_RESULT([no])])],
[AS_ECHO([Could not find nc-config! go on with default configuration])])],
[*],[NETCDF_ROOT=$with_netcdf
AS_IF([test -d "$NETCDF_ROOT"],
[LDFLAGS="-L$NETCDF_ROOT/lib $LDFLAGS"
......@@ -142,7 +153,18 @@ AC_ARG_WITH([netcdf],
[AC_DEFINE([HAVE_LIBNETCDF],[1],[Define to 1 for NETCDF support])],
[AC_MSG_ERROR([Could not link to netcdf library])])
AC_SUBST([NETCDF_LDFLAGS],[" -L$NETCDF_ROOT/lib -lnetcdf"])
AC_SUBST([NETCDF_INCLUDE],[" -I$NETCDF_ROOT/include"])],
AC_SUBST([NETCDF_INCLUDE],[" -I$NETCDF_ROOT/include"])
AC_CHECK_PROG(NC_CONFIG,nc-config,nc-config)
AS_IF([test "x$NC_CONFIG" != "x"],
[AC_MSG_CHECKING([netcdf's nc2 support])
AS_IF([test "x$($NC_CONFIG --has-nc2)" = "xyes"],
[AC_DEFINE([HAVE_NETCDF2],[1],[Define to 1 for NETCDF2 support])
AC_MSG_RESULT([yes])],[AC_MSG_RESULT([no])])
AC_MSG_CHECKING([netcdf's nc4 support])
AS_IF([test "x$($NC_CONFIG --has-nc4)" = "xyes"],
[AC_DEFINE([HAVE_NETCDF4],[1],[Define to 1 for NETCDF4 support])
AC_MSG_RESULT([yes])],[AC_MSG_RESULT([no])])],
[AS_ECHO([Could not find nc-config! go on with default configuration])])],
[AC_MSG_NOTICE([$NETCDF_ROOT is not a directory! NETCDF suppressed])])])],
[AC_MSG_CHECKING([for NETCDF library])
AC_MSG_RESULT([suppressed])])
......
......@@ -176,6 +176,7 @@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NC_CONFIG = @NC_CONFIG@
NETCDF_INCLUDE = @NETCDF_INCLUDE@
NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
NM = @NM@
......
......@@ -78,6 +78,12 @@
/* Define to 1 if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define to 1 for NETCDF2 support */
#undef HAVE_NETCDF2
/* Define to 1 for NETCDF4 support */
#undef HAVE_NETCDF4
/* Define to 1 if you have the <netcdf.h> header file. */
#undef HAVE_NETCDF_H
......
......@@ -139,6 +139,7 @@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
NC_CONFIG = @NC_CONFIG@
NETCDF_INCLUDE = @NETCDF_INCLUDE@
NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
NM = @NM@
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment