Differences From
Artifact [33f65977be]:
75 75 ${MAKE:-make} V=1 || exit 1
76 76
77 77 echo "Running: ${MAKE:-make} V=1 install"
78 78 ${MAKE:-make} V=1 install || exit 1
79 79 ) || return 1
80 80
81 81 SSLDIR="$(pwd)/libressl-${version}/INST"
82 + addlibs="$(PKG_CONFIG_PATH="$(pwd)/libressl-${version}/INST/lib/pkgconfig" "${PKG_CONFIG:-pkg-config}" libssl libcrypto --libs --static)"
82 83 }
83 84
84 85 (
85 86 cd 'build' || exit 1
86 87
87 88 if [ ! -d '../buildsrc' ]; then
88 89 gzip -dc "../${SRC}" | tar -xf -
................................................................................
214 215
215 216 # Determine name of static object
216 217 LINKADDFILE="$(find "${INSTDIR}" -name '*.a' | head -n 1)"
217 218 if [ -n "${LINKADDFILE}" ]; then
218 219 LINKADDFILE="${LINKADDFILE}.linkadd"
219 220
220 221 ## XXX: TODO: Determine what we actually need to link against
221 - addlibs="-L${SSL_LIB_DIR:-/lib} -lssl -lcrypto ${KC_TLS_LINKADD}"
222 - addlibs_staticOnly=""
222 + if [ -z "${addlibs}" ]; then
223 + if [ "${KC_TLS_LINKSSLSTATIC}" = '1' ]; then
224 + addlibs="$("${PKG_CONFIG:-pkg-config}" libssl libcrypto --libs --static)"
225 + else
226 + addlibs="$("${PKG_CONFIG:-pkg-config}" libssl libcrypto --libs)"
227 + fi
228 + fi
229 +
230 + if [ -z "${addlibs}" ]; then
231 + addlibs="-L${SSL_LIB_DIR:-/lib} -lssl -lcrypto"
232 + addlibs_staticOnly=""
233 + fi
234 +
235 + addlibs="${addlibs} ${KC_TLS_LINKADD}"
236 +
223 237 if [ "${KC_TLS_LINKSSLSTATIC}" = '1' ]; then
224 238 echo "-Wl,-Bstatic ${addlibs} ${addlibs_staticOnly} -Wl,-Bdynamic"
225 239 else
226 240 echo "${addlibs}"
227 241 fi > "${LINKADDFILE}"
228 242 fi
229 243