Sorry, forgot to attach the patch!

On Sat, Nov 1, 2014 at 11:34 AM, Darshit Shah <[email protected]> wrote:
> On Arch Linux, I realized that adding --with-libpsl to the configure code
> caused Wget to be compiled without libpsl support. Upon investigating, it
> turns out that the configure.ac code for libpsl did nothing in the case
> where --with{,out}-libpsl statements were added to the configure command.
>
> I've attached a patch that fixes this. I know gscrivano is against using the
> with_* variables, but it seems to be the cleanest way forward. If you know
> of anything better, please do let me know.
>
> --
> Thanking You,
> Darshit Shah



-- 
Thanking You,
Darshit Shah
From 9d1ff8351b4a7073780f9b32445003ea96719ee3 Mon Sep 17 00:00:00 2001
From: Darshit Shah <[email protected]>
Date: Sat, 1 Nov 2014 11:20:39 +0530
Subject: [PATCH] Fix libpsl configure code

---
 ChangeLog    | 4 ++++
 configure.ac | 8 +++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b7bd5fb..87366e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-11-01  Darshit Shah  <[email protected]>
+
+	* configure.ac: Fix check for libpsl
+
 2014-10-31  Pär Karlsson <[email protected]>
 	* WgetTests.pm: Proper conditional operators, tidied up code, idiomatic
 	improvements as per modern Perl best practices.
diff --git a/configure.ac b/configure.ac
index 88401cf..5d063df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,15 +61,17 @@ dnl
 dnl Process features.
 dnl
 
-ENABLE_PSL=no
 AC_ARG_WITH(libpsl,
     AS_HELP_STRING([--without-libpsl],
                    [disable support for libpsl cookie checking.]),
     [],
+    [with_libpsl=yes])
+
+AS_IF([test "x$with_libpsl" = xyes],
     [AC_SEARCH_LIBS(psl_builtin, psl,
                     [ENABLE_PSL=yes; AC_DEFINE([HAVE_LIBPSL], [1], [PSL Support Enabled])],
-                    [AC_MSG_WARN(*** libpsl not found. Falling back to Wget builtin cookie checking.)])
-    ])
+                    [ENABLE_PSL=no; AC_MSG_WARN(*** libpsl not found. Falling back to Wget builtin cookie checking.)])],
+    [ENABLE_PSL=no])
 
 AC_ARG_WITH(ssl,
 [[  --without-ssl           disable SSL autodetection
-- 
2.1.2

Reply via email to