From: Jennifer A. <jm...@co...> - 2008-07-25 15:52:42
|
On Jul 25, 2008, at 11:01 AM, Arlindo da Silva wrote: > On Fri, Jul 25, 2008 at 9:16 AM, Jennifer Adams <jm...@co...> > wrote: >> I have got it to work by creating a new macro in acinclude.m4: >> > > This works and is more flexible than what I had done which was to have > this macro in Makefile.am that assumed a prescribed supplib structure: > > INCLUDES = -I$(supp_include_dir) \ > -I$(supp_include_dir)/curl \ > -I$(supp_include_dir)/xml2 \ > -I$(supp_include_dir)/gd \ > -I$(supp_include_dir)/gadap \ > -I$(supp_include_dir)/udunits \ > -I$(supp_include_dir)/hdf \ > -I$(supp_include_dir)/jpeg \ > -I$(supp_include_dir)/libpng \ > -I$(supp_include_dir)/zlib \ > -I$(supp_include_dir)/X11/neXtaw \ > -I$(supp_include_dir)/libsx \ > -I$(supp_include_dir)/grib2c \ > -I$(supp_include_dir)/jasper \ > $(X_CFLAGS) $(XAW_CFLAGS) $(GD_CFLAGS) \ > $(HDF4_CFLAGS) > > Where are you defining the list of subdirectories to be searched? At the moment, this list of include subdirectories is still in Makefile.am, and is fixed for compiling everything regardless if there's anything relevant in those subdirectories. (As I mentioned earlier, I change things slowly, so I can track the problems more readily.) For now, I'm using the GA_SET_INCLUDE_VAR macro just for isolating ./dap/netcdf.h and ./netcdf/netcdf.h. By the way, I don't think the subdirs /curl and /xml2 are needed to build anything for GrADS, and I use /dap which contains the netcdf.h from libnc-dap and the *.h files from the gadap library. > How would you handle the cases when netcdf is not coming from the > supplibs? For the moment, I am trying to get everything working to my understanding and satisfaction assuming everything is coming from the supplibs. I will add the dynamic library detection on top of that when I am ready. > In our case, NC_CFLAGS/NCDAP_CFLAGS are defined outside the > Makefile. Pat has macros to either use the supplibs or else discover > netcdf in the system and set NC_CFLAGS accordingly; so this logic is > outside the Makefile. I noticed that Pat's code adds a supplibs/bin directory that contains programs like dap-config and ncdap-config. That's a clever way to get around the problem of different dap_libs for different operating systems. > > Note: "Why then the INCLUDES macro above with the list of directories > under the supplibs?", you ask. In this case the suplibs would not be > found (could set SUPPLIBS to /dev/null). Having INCLUDES in > configure.ac, or even in the m4 macro GA_DEF_SUPPLIBS would be a > better solution. Yes, the more you can avoid hard-coded solutions, the better. By the way, I have added library versions and URLs to the 'q config' output. Like this: This version of GrADS has been configured with the following options: o Built on a LITTLE ENDIAN machine o Command line editing ENABLED readline-5.0 http://tiswww.case.edu/php/chet/readline/rltop.html o printim command for image output ENABLED zlib-1.2.3 http://www.zlib.net/ libpng-1.2.18 http://www.libpng.org/pub/png/libpng.html gd-2.0.34 http://www.libgd.org/Main_Page o GRIB2 interface ENABLED g2clib-1.0.5 http://www.nco.ncep.noaa.gov/pmb/codes/GRIB2 jasper-1.701.0 http://www.ece.uvic.ca/~mdadams/jasper jpeg-6b 27-Mar-1998 http://www.ijg.org o NetCDF interface ENABLED libnc-dap "3.7.0" of Feb 15 2007 09:14:25 $ http:// www.opendap.org o NCSA HDF interface ENABLED HDF4.2r3 http://hdf.ncsa.uiuc.edu o Athena Widget GUI DISABLED o OPeNDAP gridded data interface ENABLED libdap 3.7.8 http://www.opendap.org o OPeNDAP station data interface ENABLED libgadap 2.0 http://iges.org/grads/gadoc/supplibs.html I am also getting ready to release libgadap-2.0, which will go with GrADS 2.0 and GDS 2.0 and will have the new copyright. --Jennifer |