From 1459bedb46de0082dab8c50291f52ef109e38001 Mon Sep 17 00:00:00 2001 From: Magnus Edenhill Date: Mon, 25 Apr 2022 12:04:52 +0200 Subject: [PATCH] mklove: need to include -framework .. in .pc files, et.al. When libcurl is linked statically it still needs to be dynamically linked to some OSX frameworks, this fix makes sure those frameworks are represented in .pc files, etc. --- mklove/modules/configure.base | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/mklove/modules/configure.base b/mklove/modules/configure.base index d38856a5..1e216692 100644 --- a/mklove/modules/configure.base +++ b/mklove/modules/configure.base @@ -846,21 +846,32 @@ function mkl_generate_late_vars { done } + +# Generate MKL_DYNAMIC_LIBS and MKL_STATIC_LIBS for Makefile.config +# +# Params: $LIBS +function mkl_generate_libs { + while [[ $# -gt 0 ]]; do + if [[ $1 == -l* ]]; then + mkl_mkvar_append "" MKL_DYNAMIC_LIBS $1 + elif [[ $1 == *.a ]]; then + mkl_mkvar_append "" MKL_STATIC_LIBS $1 + elif [[ $1 == -framework ]]; then + mkl_mkvar_append "" MKL_DYNAMIC_LIBS "$1 $2" + shift # two args + else + mkl_dbg "Ignoring arg $1 from LIBS while building STATIC and DYNAMIC lists" + fi + shift # remove arg + done +} + # Generate output files. # Must be called following a succesful configure run. function mkl_generate { # Generate MKL_STATIC_LIBS and MKL_DYNAMIC_LIBS from LIBS - local arg= - for arg in $LIBS ; do - if [[ $arg == -l* ]]; then - mkl_mkvar_append "" MKL_DYNAMIC_LIBS $arg - elif [[ $arg == *.a ]]; then - mkl_mkvar_append "" MKL_STATIC_LIBS $arg - else - mkl_dbg "Ignoring arg $arg from LIBS while building STATIC and DYNAMIC lists" - fi - done + mkl_generate_libs $LIBS local mf= for mf in $MKL_GENERATORS ; do