41 lines
1.1 KiB
Plaintext
41 lines
1.1 KiB
Plaintext
$NetBSD: patch-aa,v 1.4 2012/03/07 16:29:45 adam Exp $
|
|
|
|
--- configure.ac.orig 2008-03-16 10:18:52.000000000 -0400
|
|
+++ configure.ac 2008-09-04 01:45:01.000000000 -0400
|
|
@@ -302,28 +302,13 @@ GRI_DETERMINE_ENDIAN
|
|
|
|
AC_CHECK_HEADERS(unistd.h)
|
|
|
|
-
|
|
-dnl Check for netcdf library. It might be in one of several places,
|
|
-dnl so check several locations, reporting the location if found.
|
|
-define(CHECK_FOR_NETCDF, [
|
|
- AC_MSG_CHECKING(for netcdf library)
|
|
- for d in /opt/netcdf /usr/local /usr; do
|
|
- if test -f $d/include/netcdf.h; then
|
|
- AM_CXXFLAGS="$AM_CXXFLAGS -I$d/include"
|
|
- EXTRA_CFLAGS_TEMPLATE="$EXTRA_CFLAGS_TEMPLATE -I$d/include"
|
|
- DEFS="$DEFS -I$d/include"
|
|
- LIBS="$LIBS -L$d/lib -lnetcdf"
|
|
- if test $gri_cv_is_sun = yes ; then
|
|
- LIBS="$LIBS -lnsl"
|
|
- fi
|
|
- AC_DEFINE(HAVE_LIBNETCDF)
|
|
- AC_MSG_RESULT(yes, in $d/include/netcdf.h and $d/lib/libnetcdf.a)
|
|
- fi
|
|
- done
|
|
- AC_MSG_RESULT(done)
|
|
-])dnl
|
|
-dnl
|
|
-CHECK_FOR_NETCDF
|
|
+AC_CHECK_LIB(netcdf, nc_open, HAVE_LIBNETCDF="YES", HAVE_LIBNETCDF="")
|
|
+[
|
|
+if test -n "$HAVE_LIBNETCDF" ; then
|
|
+ ] AC_DEFINE(HAVE_LIBNETCDF) [
|
|
+ LIBS="-lnetcdf $LIBS"
|
|
+fi
|
|
+]
|
|
|
|
dnl use this??
|
|
dnl AC_SUBST(EXTRA_CXXFLAGS)
|