From 16eff71774fd37f1873d72ad51722892b8a5e3a9 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 31 Mar 2024 21:10:12 +0000 Subject: slibtool.m4: process and propagate the SLIBTOOL variable at configure time. --- m4/slibtool.m4 | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/m4/slibtool.m4 b/m4/slibtool.m4 index cc33f15..6b7b680 100644 --- a/m4/slibtool.m4 +++ b/m4/slibtool.m4 @@ -175,17 +175,43 @@ AC_BEFORE([$0],[SLIBTOOL_INIT]) # --------------------------------------------------------------------------- slibtool_set_flavor() { + _slibtool="${SLIBTOOL:-slibtool}" + + if [[ "${_slibtool%/*}" = "${_slibtool}" ]]; then + _slibtool_path= + else + _slibtool_path="${_slibtool%/*}/" + fi + + case "${_slibtool##*/}" in + 'rlibtool') + SLIBTOOL="${_slibtool_path}"'slibtool' + ;; + + 'rclibtool') + SLIBTOOL="${_slibtool_path}"'clibtool' + ;; + + 'rdlibtool') + SLIBTOOL="${_slibtool_path}"'dlibtool' + ;; + + 'rdclibtool') + SLIBTOOL="${_slibtool_path}"'dclibtool' + ;; + esac + case "_${slibtool_enable_shared}_${slibtool_enable_static}" in '_yes_yes') - SLIBTOOL='dlibtool' + SLIBTOOL="${SLIBTOOL:-slibtool}" ;; '_yes_no') - SLIBTOOL='dlibtool-shared' + SLIBTOOL="${SLIBTOOL:-slibtool}-shared" ;; '_no_yes') - SLIBTOOL='dlibtool-static' + SLIBTOOL="${SLIBTOOL:-slibtool}-static" ;; '_no_no') -- cgit v1.2.3