From 995ee1dbbc0ee9af7bbb24728f09ec022696bba0 Mon Sep 17 00:00:00 2001
From: Nicolas Williams <nico@cryptonector.com>
Date: Sat, 11 Aug 2018 15:52:19 -0500
Subject: [PATCH] Keep rpath et. al. from xml2-config --libs

Instead of looking for -L* words to put in to LDFLAGS and everthing else
into LIBS, look for -l* words to put into LIBS and everything else into
LDFLAGS.
---
 configure    | 3 ++-
 configure.in | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 2665213..210f739 100755
--- a/configure
+++ b/configure
@@ -8009,7 +8009,8 @@ fi
     done
     for pgac_option in `$XML2_CONFIG --libs`; do
       case $pgac_option in
-        -L*) LDFLAGS="$LDFLAGS $pgac_option";;
+        -l*) LIBS="$LIBS $pgac_option";;
+        *) LDFLAGS="$LDFLAGS $pgac_option";;
       esac
     done
   fi
diff --git a/configure.in b/configure.in
index 397f6bc..b3f5c6c 100644
--- a/configure.in
+++ b/configure.in
@@ -902,7 +902,8 @@ if test "$with_libxml" = yes ; then
     done
     for pgac_option in `$XML2_CONFIG --libs`; do
       case $pgac_option in
-        -L*) LDFLAGS="$LDFLAGS $pgac_option";;
+        -l*) LIBS="$LIBS $pgac_option";;
+        *) LDFLAGS="$LDFLAGS $pgac_option";;
       esac
     done
   fi
-- 
2.7.4

