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

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

---
 configure | 37 ++++++++++++++++++++++++++++++-------
 1 file changed, 30 insertions(+), 7 deletions(-)

diff --git a/configure b/configure
index 4fc60c3..793279f 100755
--- a/configure
+++ b/configure
@@ -1031,6 +1031,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
@@ -1301,6 +1304,9 @@ LDFLAGS
 LIBS
 CPPFLAGS
 CPP
+SSL_LDFLAGS
+LD_H2
+LD_BROTLI
 LT_SYS_LIBRARY_PATH'
 
 
@@ -2212,6 +2218,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.
 
@@ -15321,6 +15330,12 @@ need_version=unknown
 
 
 
+
+
+
+
+
+
 case $host_os in
 aix3*)
   version_type=linux # correct to gnu/linux during the next big refactor
@@ -24152,7 +24167,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
@@ -26423,8 +26440,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
@@ -26576,12 +26595,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
@@ -31064,15 +31085,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
-- 
2.43.2

openSUSE Build Service is sponsored by