diff options
author | midipix <writeonce@midipix.org> | 2024-03-31 21:10:12 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-03-31 21:25:18 +0000 |
commit | 16eff71774fd37f1873d72ad51722892b8a5e3a9 (patch) | |
tree | d970b5d732a6f69703bfb84fbafdde0c5a7b4439 | |
parent | 5319a3a561e1cd14ff23b7e5c8878c4dba808051 (diff) | |
download | slibtool-16eff71774fd37f1873d72ad51722892b8a5e3a9.tar.bz2 slibtool-16eff71774fd37f1873d72ad51722892b8a5e3a9.tar.xz |
slibtool.m4: process and propagate the SLIBTOOL variable at configure time.
-rw-r--r-- | m4/slibtool.m4 | 32 |
1 files 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') |