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
|
Move back to AC_TRY_LINK...
Index: netatalk-2.0.5/macros/db3-check.m4
===================================================================
--- netatalk-2.0.5.orig/macros/db3-check.m4 2010-03-05 17:57:14.000000000 +0100
+++ netatalk-2.0.5/macros/db3-check.m4 2010-03-05 18:33:08.000000000 +0100
@@ -33,25 +33,13 @@
for lib in $atalk_cv_bdb_try_libs ; do
LIBS="$lib $savedlibs"
AC_MSG_CHECKING([Berkeley DB library ($lib)])
- AC_TRY_RUN([
+ AC_TRY_LINK([
#include <stdio.h>
#include <db.h>
- int main(void) {
- int major, minor, patch;
+ ], [
+ int minor, major, patch;
char *version_str;
version_str = db_version(&major, &minor, &patch);
- if (major < DB_MAJOR_REQ || minor < DB_MINOR_REQ || patch < DB_PATCH_REQ) {
- printf("linking wrong library version (%d.%d.%d), ",major, minor, patch);
- return (2);
- }
- if ( major != DB_VERSION_MAJOR || minor != DB_VERSION_MINOR || patch != DB_VERSION_PATCH) {
- printf("header/library version mismatch (%d.%d.%d/%d.%d.%d), ",
- DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH, major, minor, patch);
- return (3);
- }
- printf("%d.%d.%d ... ",major, minor, patch);
- return (0);
- }
],[
AC_MSG_RESULT(yes)
|