File 0001-Rebuild-configure-with-the-additional-LDFLAG-for-Bro.patch of Package libcurl

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tim Mullin <tim@cpanel.net>
Date: Tue, 23 May 2023 13:55:11 +0000
Subject: [PATCH] Rebuild configure with the additional LDFLAG for Brotli, H2,
 and SSL

---
 configure | 38 ++++++++++++++++++++++++++++++--------
 1 file changed, 30 insertions(+), 8 deletions(-)

diff --git a/configure b/configure
index 4a20c50..61e764a 100755
--- a/configure
+++ b/configure
@@ -1039,6 +1039,9 @@ CURL_LT_SHLIB_USE_VERSION_INFO_FALSE
 CURL_LT_SHLIB_USE_VERSION_INFO_TRUE
 RC
 LT_SYS_LIBRARY_PATH
+LD_BROTLI
+LD_H2
+SSL_LDFLAGS
 OTOOL64
 OTOOL
 LIPO
@@ -1322,6 +1325,9 @@ LDFLAGS
 LIBS
 CPPFLAGS
 CPP
+SSL_LDFLAGS
+LD_H2
+LD_BROTLI
 LT_SYS_LIBRARY_PATH'
 
 
@@ -2256,6 +2262,9 @@ Some influential environment variables:
   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
+  SSL_LDFLAGS User-defined LDFLAGS for SSL.
+  LD_H2       User-defined LDFLAGS for nghttp2.
+  LD_BROTLI   User-defined LDFLAGS for brotli.
   LT_SYS_LIBRARY_PATH
               User-defined run-time library search path.
 
@@ -15417,6 +15426,12 @@ need_version=unknown
 
 
 
+
+
+
+
+
+
 case $host_os in
 aix3*)
   version_type=linux # correct to gnu/linux during the next big refactor
@@ -24243,7 +24258,9 @@ printf "%s\n" "found" >&6; }
 
     if test -n "$PREFIX_BROTLI"; then
     LIB_BROTLI="-lbrotlidec"
-    LD_BROTLI=-L${PREFIX_BROTLI}/lib$libsuff
+    if test -z $LD_BROTLI; then
+        LD_BROTLI=-L${PREFIX_BROTLI}/lib$libsuff
+    fi
     CPP_BROTLI=-I${PREFIX_BROTLI}/include
     DIR_BROTLI=${PREFIX_BROTLI}/lib$libsuff
   fi
@@ -26527,8 +26544,10 @@ printf "%s\n" "$as_me: PKG_CONFIG_LIBDIR will be set to \"$OPENSSL_PCDIR\"" >&6;
 
                   LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
       if test "$PREFIX_OPENSSL" != "/usr" ; then
-        SSL_LDFLAGS="-L$LIB_OPENSSL"
-        SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
+	      if test -z $SSL_LDFLAGS; then
+	          SSL_LDFLAGS="-L$LIB_OPENSSL"
+	          SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include"
+	      fi
       fi
       ;;
   esac
@@ -26680,13 +26699,14 @@ printf "%s\n" "found" >&6; }
   fi
          $PKGCONFIG --libs-only-l --libs-only-other openssl 2>/dev/null`
 
-      SSL_LDFLAGS=`
+      if test -z $SSL_LDFLAGS; then
+        SSL_LDFLAGS=`
   if test -n "$OPENSSL_PCDIR"; then
     PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR"
     export PKG_CONFIG_LIBDIR
   fi
          $PKGCONFIG --libs-only-L openssl 2>/dev/null`
-
+	fi
       SSL_CPPFLAGS=`
   if test -n "$OPENSSL_PCDIR"; then
     PKG_CONFIG_LIBDIR="$OPENSSL_PCDIR"
@@ -31336,15 +31356,17 @@ printf "%s\n" "$as_me: -l is $LIB_H2" >&6;}
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -I is $CPP_H2" >&5
 printf "%s\n" "$as_me: -I is $CPP_H2" >&6;}
 
-    LD_H2=`
+    if test -z $LD_H2; then
+        LD_H2=`
   if test -n "$want_nghttp2_pkg_config_path"; then
     PKG_CONFIG_LIBDIR="$want_nghttp2_pkg_config_path"
     export PKG_CONFIG_LIBDIR
   fi
 
-      $PKGCONFIG --libs-only-L libnghttp2`
-    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -L is $LD_H2" >&5
+         $PKGCONFIG --libs-only-L libnghttp2`
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -L is $LD_H2" >&5
 printf "%s\n" "$as_me: -L is $LD_H2" >&6;}
+	fi
 
     DIR_H2=`echo $LD_H2 | $SED -e 's/^-L//'`
   elif test x"$want_nghttp2_path" != x; then
openSUSE Build Service is sponsored by