From: Jennifer A. <jm...@co...> - 2008-07-25 13:16:54
|
I have got it to work by creating a new macro in acinclude.m4: dnl GA_SET_INCLUDE_VAR : Puts necessary options to compile with include directories given dnl into a shell variable. dnl args: : shell-variable-name, list-of-directories AC_DEFUN([GA_SET_INCLUDE_VAR], [ ga_include_prefix='-I$(supp_include_dir)/' for ga_include_name in $2 ; do $1="$$1 ${ga_include_prefix}${ga_include_name}" done ]) Now configure.ac has this: use_nc=no if test "$with_nc" != "no" ; then echo "Checking netcdf support..." GA_CHECK_NC([use_nc=yes], {}) fi if test $use_nc = "yes" ; then GA_SET_INCLUDE_VAR(nc_include, [netcdf]) AC_SUBST(nc_include) if test $use_hdf = "yes" ; then GA_SET_LIB_VAR(nc_libs, [netcdf]) else GA_SET_LIB_VAR(nc_libs, [netcdf udunits]) fi AC_SUBST(nc_libs) AC_DEFINE(USESDF, 1, [Enable netcdf]) echo "+ netcdf enabled" else AC_DEFINE(USESDF, 0, [Enable netcdf]) echo "- netcdf disabled" fi echo And my Makefile has this: nc_include = -I$(supp_include_dir)/netcdf --Jennifer -- Jennifer M. Adams IGES/COLA 4041 Powder Mill Road, Suite 302 Calverton, MD 20705 jm...@co... |