From: alex <aba...@us...> - 2005-12-15 22:14:01
|
Update of /cvsroot/octave/octave-forge/main/octcdf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29857 Modified Files: configure.add Makeconf.add Makefile Log Message: OPeNDAP is not detected by configure using ncdap-config Index: configure.add =================================================================== RCS file: /cvsroot/octave/octave-forge/main/octcdf/configure.add,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- configure.add 14 Dec 2005 22:49:18 -0000 1.1 +++ configure.add 15 Dec 2005 22:13:52 -0000 1.2 @@ -4,13 +4,41 @@ STATUS=noinstall else + AC_SUBST(HAVE_NETCDF) + AC_SUBST(OCTCDF_LIBS) + AC_SUBST(OCTCDF_CFLAGS) + + OCTCDF_LIBS="$LDFLAGS" + OCTCDF_CFLAGS="$CPPFLAGS" + + dnl checking for opendap support + + AC_MSG_CHECKING([for nc-dap]) + + if ncdap-config --version > /dev/null 2>&1; then + OCTCDF_LIBS="$OCTCDF_LIBS `ncdap-config --libs`" + OCTCDF_CFLAGS="$OCTCDF_CFLAGS `ncdap-config --cflags`" + HAVE_NCDAP=yes + AC_MSG_RESULT([yes]) + else + HAVE_NCDAP=no + AC_MSG_RESULT([no]) + fi + + dnl Checking if the NetCDF library exists. - AC_SUBST(HAVE_NETCDF) - AC_CHECK_HEADER(netcdf.h, HAVE_NETCDF=yes, HAVE_NETCDF=no) + AC_CHECK_LIB(netcdf,nc_open, HAVE_NETCDF=yes, HAVE_NETCDF=no,) if test $HAVE_NETCDF = yes ; then - AC_CHECK_LIB(netcdf,nc_open, HAVE_NETCDF=yes, HAVE_NETCDF=no,) + OCTCDF_LIBS="$OCTCDF_LIBS -lnetcdf" + fi + + dnl if we don't have nc-dap then we have to check for netcdf.h + dnl otherwise it is already given by ncdap-config --cflags + + if test $HAVE_NCDAP = no ; then + AC_CHECK_HEADER(netcdf.h, HAVE_NETCDF=yes, HAVE_NETCDF=no) fi if test $HAVE_NETCDF = yes ; then Index: Makefile =================================================================== RCS file: /cvsroot/octave/octave-forge/main/octcdf/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile 14 Dec 2005 22:49:18 -0000 1.1 +++ Makefile 15 Dec 2005 22:13:52 -0000 1.2 @@ -21,20 +21,20 @@ NETCDF_INC=/usr/include/netcdf-3 NETCDF_LIB=/usr/lib64/netcdf-3 - CPPFLAGS := $(CPPFLAGS) -I$(NETCDF_INC) - LDFLAGS := $(LDFLAGS) -L$(NETCDF_LIB) + OCTCDF_CFLAGS := $(CPPFLAGS) -I$(NETCDF_INC) + OCTCDF_LIBS := $(LDFLAGS) -L$(NETCDF_LIB) -lnetcdf LN_S=ln -s RM = rm -f endif -MOFLAGS = $(CPPFLAGS) +MOFLAGS = $(OCTCDF_CFLAGS) # # comment this line out if your octave installation does not have integer types. # MOFLAGS := $(MOFLAGS) -DHAVE_OCTAVE_INT -EXTRALIBS = $(LDFLAGS) -lnetcdf +EXTRALIBS = $(OCTCDF_LIBS) # To enable OPeNDAP support you have to use to following libraries (or similar ones) #EXTRALIBS = $(LDFLAGS) -lnc-dods -ldap++ -lnetcdf -lxml2 -lcurl Index: Makeconf.add =================================================================== RCS file: /cvsroot/octave/octave-forge/main/octcdf/Makeconf.add,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makeconf.add 14 Dec 2005 22:49:18 -0000 1.1 +++ Makeconf.add 15 Dec 2005 22:13:52 -0000 1.2 @@ -1,2 +1,4 @@ HAVE_NETCDF=@HAVE_NETCDF@ -LDFLAGS=@LDFLAGS@ +OCTCDF_LIBS=@OCTCDF_LIBS@ +OCTCDF_CFLAGS=@OCTCDF_CFLAGS@ + |