diff options
author | dillo <dillo@pkgsrc.org> | 2002-10-02 21:38:01 +0000 |
---|---|---|
committer | dillo <dillo@pkgsrc.org> | 2002-10-02 21:38:01 +0000 |
commit | 73d3b1bf94c9dd3722e20b9578d811dc78c263de (patch) | |
tree | e629d0382e099f4ebc345d7ff59b7bff0fb229e5 /graphics/gri/patches | |
parent | 18b0d121be081d33277bca038e4f56d793826ee1 (diff) | |
download | pkgsrc-73d3b1bf94c9dd3722e20b9578d811dc78c263de.tar.gz |
get rid of autoconf build dependency by patching configure
Diffstat (limited to 'graphics/gri/patches')
-rw-r--r-- | graphics/gri/patches/patch-ag | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/graphics/gri/patches/patch-ag b/graphics/gri/patches/patch-ag new file mode 100644 index 00000000000..89097ec4fb6 --- /dev/null +++ b/graphics/gri/patches/patch-ag @@ -0,0 +1,116 @@ +$NetBSD: patch-ag,v 1.1 2002/10/02 21:38:02 dillo Exp $ + +--- configure.orig Wed Oct 2 23:34:47 2002 ++++ configure +@@ -1455,66 +1453,58 @@ done + + + +-echo $ac_n "checking for netcdf library""... $ac_c" 1>&6 +-echo "configure:1460: checking for netcdf library" >&5 ++echo $ac_n "checking for ncvarid in -lnetcdf""... $ac_c" 1>&6 ++echo "configure:1458: checking for ncvarid in -lnetcdf" >&5 ++ac_lib_var=`echo netcdf'_'ncvarid | sed 'y%./+-%__p_%'` ++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ ac_save_LIBS="$LIBS" ++LIBS="-lnetcdf $LIBS" ++cat > conftest.$ac_ext <<EOF ++#line 1466 "configure" ++#include "confdefs.h" ++/* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char ncvarid(); + +- if test -d /opt/netcdf/include ; then +- # +- # Solaris often has it here +- CXXFLAGS="$CXXFLAGS -I/opt/netcdf/include" +- LIBS="$LIBS -L/opt/netcdf/lib -lnetcdf" +- if test $gri_cv_is_sun = yes ; then +- LIBS="$LIBS -lnsl" +- fi +- cat >> confdefs.h <<\EOF +-#define HAVE_LIBNETCDF 1 ++int main() { ++ncvarid() ++; return 0; } + EOF ++if { (eval echo configure:1480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=yes" ++else ++ echo "configure: failed program was:" >&5 ++ cat conftest.$ac_ext >&5 ++ rm -rf conftest* ++ eval "ac_cv_lib_$ac_lib_var=no" ++fi ++rm -f conftest* ++LIBS="$ac_save_LIBS" + +- echo "yes (in /opt/netcdf/include/netcdf.h and /opt/netcdf/lib/libnetcdf.a)" +- else +- if test -f /usr/local/include/netcdf.h ; then +- CXXFLAGS="$CPPFLAGS -I/usr/local/include" +- LIBS="$LIBS -L/usr/local/lib -lnetcdf" +- if test $gri_cv_is_sun = yes ; then +- LIBS="$LIBS -lnsl" +- fi +- cat >> confdefs.h <<\EOF +-#define HAVE_LIBNETCDF 1 +-EOF ++fi ++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ++ echo "$ac_t""yes" 1>&6 ++ HAVE_LIBNETCDF="YES" ++else ++ echo "$ac_t""no" 1>&6 ++HAVE_LIBNETCDF="" ++fi + +- echo "yes (in /usr/local/include/netcdf.h and /usr/local/lib/libnetcdf.a)" +- else +- # +- # Linux/debian often has it here. +- if test -f /usr/include/netcdf.h ; then +- CXXFLAGS="$CPPFLAGS -I/usr/include/netcdf" +- LIBS="$LIBS -L/usr/lib/netcdf -lnetcdf" +- if test $gri_cv_is_sun = yes ; then +- LIBS="$LIBS -lnsl" +- fi +- cat >> confdefs.h <<\EOF +-#define HAVE_LIBNETCDF 1 +-EOF + +- echo "yes (in /usr/include/netcdf.h and /usr/lib/libnetcdf.a)" +- else +- if test -f /boot/home/lib/netcdf ; then +- CXXFLAGS="$CPPFLAGS -I/boot/home/include/netcdf" +- LIBS="$LIBS -L/boot/home/lib/netcdf -lnetcdf" +- if test $gri_cv_is_sun = yes ; then +- LIBS="$LIBS -lnsl" +- fi +- echo "yes (in /boot/home/netcdf)" +- cat >> confdefs.h <<\EOF ++if test -n "$HAVE_LIBNETCDF" ; then ++ cat >> confdefs.h <<\EOF + #define HAVE_LIBNETCDF 1 + EOF +- +- else +- echo "no" +- fi +- fi +- fi +- fi ++ ++ LIBS="-lnetcdf $LIBS" ++fi + + + echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 |