Package: dx / 1:4.4.4-12

40-hdfalt-support.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From: Daniel Kobras <kobras@debian.org>
Subject: Add support for Debian-specific library hdf4-alt that provides an
 alternative ABI suitable for linking both libhdf4 and netcdf into the
 same binary without namespace clashes.

diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' dx~/configure.ac dx/configure.ac
--- dx~/configure.ac	2010-03-25 19:27:17.000000000 +0100
+++ dx/configure.ac	2010-03-25 19:29:17.000000000 +0100
@@ -680,7 +680,16 @@
     fi
 dnl -- check for unix
 else
-    AC_CHECK_LIB(df,Hopen,passed=`expr $passed + 1`,failed=`expr $failed + 1`,[ -lz -ljpeg ])
+    for libname in df dfalt
+    do
+        AC_CHECK_LIB($libname,Hopen,[found=1; break],found=0,[ -lz -ljpeg ])
+    done
+    if test $found -eq 1
+    then
+        passed=`expr $passed + 1`
+    else
+        failed=`expr $failed + 1`
+    fi
     AC_MSG_CHECKING(if HDF package is complete)
     if test $passed -gt 0
     then
@@ -689,9 +698,9 @@
 	AC_MSG_RESULT(no -- some components failed test)
         have_hdf='no (failed tests)'
     else
-	LIB_HDF='-ldf'
+	LIB_HDF="-l$libname"
 	LIBS="$LIB_HDF $LIBS"
-	FMT_LIBS="$FMT_LIBS libdf.a"
+	FMT_LIBS="$FMT_LIBS lib${libname}.a"
 	AC_DEFINE(HAVE_LIBDF, 1, [Define to 1 if you have the HDF libraries])
 	AC_MSG_RESULT(yes)
 	have_hdf='yes'