$NetBSD: patch-libraries_base_configure,v 1.3 2022/01/18 02:22:50 pho Exp $

Ensure libiconv can be found at runtime.

XXX: I don't think this is needed because rpath flags are handled by
Cabal. LDFLAGS is not used anyway. (pho@)

--- libraries/base/configure.orig	2021-12-25 13:14:24.000000000 +0000
+++ libraries/base/configure
@@ -4944,7 +4944,7 @@ fi
 # Check whether --with-iconv-libraries was given.
 if test ${with_iconv_libraries+y}
 then :
-  withval=$with_iconv_libraries; ICONV_LIB_DIRS=$withval; LDFLAGS="-L$withval $LDFLAGS"
+  withval=$with_iconv_libraries; ICONV_LIB_DIRS=$withval; LDFLAGS="-L$withval ${COMPILER_RPATH_FLAG}$withval $LDFLAGS"
 else $as_nop
   ICONV_LIB_DIRS=
 fi
