Update of /cvsroot/monetdb/MonetDB4
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22153

Modified Files:
        configure.ag 
Log Message:
Move NETCDF test to M4 configure since that is the only place it is needed.
Also, fix mnetcdf so that it can compile again on F8.

Index: configure.ag
===================================================================
RCS file: /cvsroot/monetdb/MonetDB4/configure.ag,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- configure.ag        7 Mar 2008 13:10:08 -0000       1.31
+++ configure.ag        11 Mar 2008 14:18:45 -0000      1.32
@@ -86,6 +86,45 @@
 
 AC_PROG_LIBTOOL
 
+dnl check for NetCDF io library (default /usr and /usr/local)
+have_netcdf=$dft_netcdf
+NETCDF_CFLAGS=""
+NETCDF_LIBS=""
+AC_ARG_WITH(netcdf,
+       AC_HELP_STRING([--with-netcdf=DIR],
+               [netcdf library is installed in DIR]),
+       have_netcdf="$withval")
+case "$have_netcdf" in
+yes|no|auto)
+       ;;
+*)
+       NETCDF_CFLAGS="-I$withval/include"
+       NETCDF_LIBS="-L$withval/lib"
+       ;;
+esac
+if test "x$have_netcdf" != xno; then
+       save_CPPFLAGS="$CPPFLAGS"
+       CPPFLAGS="$CPPFLAGS $NETCDF_CFLAGS"
+       save_LIBS="$LIBS"
+       LIBS="$LIBS $NETCDF_LIBS -lnetcdf"
+       AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <netcdf-3/netcdf.h>], [(void) 
nc_open("",0,(int*)0);]),
+               NETCDF_LIBS="$NETCDF_LIBS -lnetcdf",
+               [ if test "x$have_netcdf" != xauto; then AC_MSG_ERROR([netcdf 
library not found]); fi; have_netcdf=no ])
+       LIBS="$save_LIBS"
+       CPPFLAGS="$save_CPPFLAGS"
+fi
+if test "x$have_netcdf" != xno; then
+       AC_DEFINE(HAVE_LIBNETCDF, 1, [Define if you have the netcdf library])
+else
+       NETCDF_CFLAGS=""
+       NETCDF_LIBS=""
+fi
+AC_SUBST(NETCDF_CFLAGS)
+AC_SUBST(NETCDF_LIBS)
+AM_CONDITIONAL(HAVE_NETCDF, test "x$have_netcdf" != xno)
+NETCDF=$have_netcdf
+AC_SUBST(NETCDF)
+
 dnl provide different versions of the paths derived above
 AM_MONETDB_XQ_VARS_2()
 AC_DEFINE_UNQUOTED(MONETDB4_PREFIX,"$QXprefix",[architecture-independent 
files])


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to