diff options
author | midipix <writeonce@midipix.org> | 2024-03-26 22:55:34 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2024-03-26 23:01:15 +0000 |
commit | 904d480211d8b0d6b721bdeafb5279a41264f878 (patch) | |
tree | 1c4d3ec0dc357989a05ab9f311efa6de26f7e394 /m4 | |
parent | dc73e4fb31f7fd48660c08adc1240197c56fd6c7 (diff) | |
download | slibtool-904d480211d8b0d6b721bdeafb5279a41264f878.tar.bz2 slibtool-904d480211d8b0d6b721bdeafb5279a41264f878.tar.xz |
slibtool: added SLIBTOOL_PROG_AR, use llvm-ar as a cross-compilation fallback.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/slibtool.m4 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/m4/slibtool.m4 b/m4/slibtool.m4 index 6b318ba..6d9438c 100644 --- a/m4/slibtool.m4 +++ b/m4/slibtool.m4 @@ -266,6 +266,30 @@ slibtool_options="${slibtool_options} disable-static" ]) +# SLIBTOOL_PROG_AR +# ---------------- +AC_DEFUN([SLIBTOOL_PROG_AR],[ + +# slibtool: SLIBTOOL_PROG_AR +# -------------------------- +if [[ -n "${host_alias}" ]]; then + AC_CHECK_PROG([AR],"${host_alias}-"[ar],"${host_alias}-"[ar]) +fi + +if [[ -n "${host}" ]] && [[ "${host}" != "${host_alias:-}" ]] && [[ -z "${AR}" ]]; then + AC_CHECK_PROG([AR],"${host}-"[ar],"${host}-"[ar]) +fi + +if [[ -n "${host}" ]] && [[ -z "${AR}" ]]; then + AC_CHECK_PROG([AR],[llvm-ar],[llvm-ar]) +fi + +if [[ -z "${host}" ]]; then + AC_CHECK_PROG([AR],[ar],[ar]) +fi +]) + + # SLIBTOOL_PROG_NM # ---------------- AC_DEFUN([SLIBTOOL_PROG_NM],[ @@ -411,6 +435,7 @@ AC_REQUIRE([AC_PROG_LEX]) AC_REQUIRE([AC_PROG_SED]) AC_REQUIRE([AC_PROG_YACC]) +AC_REQUIRE([AC_PROG_AR]) AC_REQUIRE([AC_PROG_RANLIB]) AC_REQUIRE([AC_PROG_LN_S]) @@ -438,6 +463,7 @@ AC_PROG_SED AC_PROG_YACC AC_PROG_RANLIB +AC_PROG_AR AC_PROG_NM AC_PROG_LN_S @@ -457,6 +483,9 @@ AC_DEFUN([AM_PROG_LIBTOOL], [SLIBTOOL_INIT($@)]) AC_DEFUN([AC_PROG_NM], [SLIBTOOL_PROG_NM($@)]) AC_DEFUN([AM_PROG_NM], [SLIBTOOL_PROG_NM($@)]) +AC_DEFUN([AC_PROG_AR], [SLIBTOOL_PROG_AR($@)]) +AC_DEFUN([AM_PROG_AR], [SLIBTOOL_PROG_AR($@)]) + AC_DEFUN([AC_ENABLE_SHARED], [SLIBTOOL_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_SHARED], [SLIBTOOL_ENABLE_SHARED($@)]) |