summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/slibtool.m432
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')