File autoconf-pull-dynamic-and-not-static-libs-from-pkg-config.patch of Package mpich

commit cb75aa30781468b7cfa2f691d931c9113f7a2c74
Author: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
Date:   Thu Apr 1 10:11:45 2021 +0200

    autoconf: pull dynamic and not static libs from pkg-config
    
    Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>

diff --git confdb/aclocal_libs.m4 confdb/aclocal_libs.m4
index 6a1552461de4..61940d3bad96 100644
--- confdb/aclocal_libs.m4
+++ confdb/aclocal_libs.m4
@@ -214,12 +214,12 @@ dnl PAC_LIB_DEPS(library_name, library_pc_path)
 dnl library_pc_path is the path to the library pkg-config directory
 AC_DEFUN([PAC_LIB_DEPS],[
 if test "x$2" != "x"; then
-    ac_lib$1_deps=`pkg-config --static --libs $2/lib$1.pc 2>/dev/null`
+    ac_lib$1_deps=`pkg-config --libs $2/lib$1.pc 2>/dev/null`
     # remove the library itself in case it is embedded
     ac_lib$1_deps=`echo $ac_lib$1_deps | sed 's/-l$1//'`
 else
     # use system default
-    ac_lib$1_deps=`pkg-config --static --libs lib$1 2>/dev/null`
+    ac_lib$1_deps=`pkg-config --libs lib$1 2>/dev/null`
 fi
 ])
 
openSUSE Build Service is sponsored by