Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | From b4943594654cd340b95aabdc2f3750a4705cc0de Mon Sep 17 00:00:00 2001 |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 2 | From: Jim Somerville <Jim.Somerville@windriver.com> |
| 3 | Date: Mon, 21 Oct 2013 12:50:44 -0400 |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 4 | Subject: [PATCH] Fix flawed dynamic -ldb link test in configure |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 5 | |
| 6 | The test uses dbopen, but just ignores the fact |
| 7 | that this function may not exist in the db version |
| 8 | used. This leads to the dynamic link test failing |
| 9 | and the configure script just making assumptions |
| 10 | about why and setting the need for -ldb incorrectly. |
| 11 | |
| 12 | Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 13 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 14 | --- |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 15 | configure.ac | 12 ++++++++++-- |
| 16 | 1 file changed, 10 insertions(+), 2 deletions(-) |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 17 | |
| 18 | diff --git a/configure.ac b/configure.ac |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 19 | index 57cd1ac..3827222 100644 |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 20 | --- a/configure.ac |
| 21 | +++ b/configure.ac |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 22 | @@ -3229,8 +3229,16 @@ AC_CHECK_DECL(dbopen,,,[ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 23 | #include <db.h> |
| 24 | #endif]) |
| 25 | |
| 26 | -dnl 1.85 |
| 27 | -SQUID_CHECK_DBOPEN_NEEDS_LIBDB |
| 28 | +if test "x$ac_cv_have_decl_dbopen" = "xyes"; then |
| 29 | + dnl 1.85 |
| 30 | + SQUID_CHECK_DBOPEN_NEEDS_LIBDB |
| 31 | +else |
| 32 | + # dbopen isn't there. So instead of running a compile/link test that |
| 33 | + # uses it and is thus guaranteed to fail, we just assume that we will |
| 34 | + # need to link in the db library, rather than fabricate some other |
| 35 | + # dynamic compile/link test. |
| 36 | + ac_cv_dbopen_libdb="yes" |
| 37 | +fi |
| 38 | if test "x$ac_cv_dbopen_libdb" = "xyes"; then |
| 39 | LIB_DB="-ldb" |
| 40 | fi |