rpms/grads/devel libnc-dap_header.m4,NONE,1.1 grads.spec,1.13,1.14

Patrice Dumas (pertusus) fedora-extras-commits at redhat.com
Sat Jul 22 15:56:00 UTC 2006


Author: pertusus

Update of /cvs/extras/rpms/grads/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5009

Modified Files:
	grads.spec 
Added Files:
	libnc-dap_header.m4 
Log Message:
add libnc-dap_header.m4


--- NEW FILE libnc-dap_header.m4 ---
# Check for the netcdf header.
# AC_CHECK_NETCDF_DAP_HEADER([INCLUDE-DIR],[ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND],[INTERFACE-NR])
# if interface number is given, check for a specific interface
# sets NC_CPPFLAGS and maybe NC_NETCDF_3_CPPFLAG
AC_DEFUN([AC_CHECK_NETCDF_DAP_HEADER],
[
  NC_CPPFLAGS=
  ac_netcdf_h='no'
  ac_netcdf_h_compile='no'
  ac_netcdf_h_preproc='no'
  ac_nc_include_dir=
  ac_nc_header_interface=
  
  ac_nc_save_CPPFLAGS=$CPPFLAGS
  m4_if([$1],[],[:],[
    ac_nc_include_dir="$1"
    AS_IF([test "z$ac_nc_include_dir" != "z"],
       [CPPFLAGS="$CPPFLAGS -I$ac_nc_include_dir"])
  ])
  m4_if([$4],[],[:],[ac_nc_header_interface=$4])
dnl dont use AC_CHECK_HEADERS to avoid autoconf internal caching
  AC_MSG_CHECKING([for netcdf.h with compiler])
  AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <netcdf.h>]])],
    [
      AC_MSG_RESULT([yes])
      ac_netcdf_h_compile='yes'
    ],
    [
      AC_MSG_RESULT([no])
      ac_netcdf_h_compile='no'
    ])
    AC_MSG_CHECKING([for netcdf.h with preprocessor])
    AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <netcdf.h>]])],
    [
      AC_MSG_RESULT([yes])
      ac_netcdf_h_preproc='yes'
    ],
    [
      AC_MSG_RESULT([no])
      ac_netcdf_h_preproc='no'
    ])
  CPPFLAGS="$ac_nc_save_CPPFLAGS"
  AS_IF([test $ac_netcdf_h_compile = 'yes'],
    [ac_netcdf_h='yes'
    AS_IF([test "z$ac_nc_header_interface" = 'z3'],
      [AC_CHECK_NETCDF_3_DAP_HEADER([$1],
         [ac_netcdf_h='yes'],[ac_netcdf_h='no'])])
    ])

  AS_IF([test "$ac_netcdf_h" = 'yes'],
    [
      AS_IF([test "z$ac_nc_include_dir" != "z"],
        [NC_CPPFLAGS="-I$ac_nc_include_dir"])
      m4_if([$2], [], [:], [$2])
    ],
    [m4_if([$3], [], [:], [$3])])

  AC_SUBST([NC_CPPFLAGS])
])

AC_DEFUN([AC_CHECK_NETCDF_3_DAP_HEADER],
[
  NC_NETCDF_3_CPPFLAG=
  ac_check_netcdf_3_include=
  ac_check_netcdf_3_header='no'
  ac_nc_save_CPPFLAGS=$CPPFLAGS
  AC_MSG_CHECKING([for netcdf 3 interface])
  m4_if([$1],[],[:],[
    ac_check_netcdf_3_include="$1"
  ])
  AS_IF([test "z$ac_check_netcdf_3_include" != "z"],
    [CPPFLAGS="$CPPFLAGS -I$ac_check_netcdf_3_include"])
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netcdf.h>]],
    [[int status;
int ncid;
char vernum;
status = nc_open("foo.nc", 0, &ncid);
vernum = *nc_inq_libvers();]])],
    [
      AS_IF([test "z$ac_check_netcdf_3_include" != "z"],
        [NC_NETCDF_3_CPPFLAG="-I$ac_check_netcdf_3_include"])
      ac_check_netcdf_3_header='yes'
    ],[ac_check_netcdf_3_header='no'])
  CPPFLAGS=$ac_nc_save_CPPFLAGS
  AS_IF([test "$ac_check_netcdf_3_header" = 'yes'],
    [
      AC_MSG_RESULT([yes])
      m4_if([$2], [], [:], [$2])
    ],
    [
      AC_MSG_RESULT([no])
      m4_if([$3], [], [:], [$3])
    ])
  
  AC_SUBST([NC_NETCDF_3_CPPFLAG])
])


Index: grads.spec
===================================================================
RCS file: /cvs/extras/rpms/grads/devel/grads.spec,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- grads.spec	22 Jul 2006 15:51:43 -0000	1.13
+++ grads.spec	22 Jul 2006 15:56:00 -0000	1.14
@@ -1,6 +1,6 @@
 Name:           grads
 Version:        1.9b4
-Release:        13%{?dist}
+Release:        14%{?dist}
 Summary:        Tool for easy acces, manipulation, and visualization of data
 
 Group:          Applications/Engineering
@@ -107,7 +107,7 @@
 %doc COPYRIGHT NOTICE.wgrib html README.xorg grads-copyright_summary
 
 %changelog
-* Sat Jul 22 2006 Patrice Dumas <pertusus at free.fr> 1.9b4-13
+* Sat Jul 22 2006 Patrice Dumas <pertusus at free.fr> 1.9b4-14
 - Update for newer libnc-dap
 
 * Fri Jul  7 2006 Patrice Dumas <dumas at centre-cired.fr> 1.9b4-12




More information about the fedora-extras-commits mailing list