Package: netatalk / 3.1.12~ds-3

106_fix_BerkeleyDB_multiarch_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
Description: Fix detect Berkeley DB installed in multiarch location.
Author: Helmut Grohne <helmut@subdivi.de>
Forwarded: no
Bug-Debian: https://bugs.debian.org/912091
Last-Update: 2018-12-22
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/macros/db3-check.m4
+++ b/macros/db3-check.m4
@@ -62,20 +62,13 @@
         ],[
             AC_MSG_RESULT(no)
         ],[
-            bdblibs=`ls $bdblibdir/lib$lib.* 2>/dev/null`
-            for bdblib in $bdblibs ; do
-                echo "Testing for lib file $bdblib" >&AS_MESSAGE_LOG_FD
-                if test -f "$bdblib" ; then
-                    AC_MSG_RESULT([yes (cross-compiling)])
-                    atalk_cv_bdb_version="yes"
-                    atalk_cv_lib_db="-l$lib"
-                    break
-                fi
-            done
-            if test "x$atalk_cv_bdb_version" = "xyes" ; then
-                break
-            fi
-            AC_MSG_RESULT([no (cross-compiling)])
+            AC_CHECK_LIB([$lib],[db_version],[
+                AC_MSG_RESULT([yes (cross-compiling)])
+                atalk_cv_bdb_version=yes
+                atalk_cv_lib_db="-l$lib"
+            ],[
+                AC_MSG_RESULT([no (cross-compiling)])
+            ])
         ])
     done
     LIBS="$savedlibs"