2019-12-03 21:47:54 +00:00
|
|
|
# SYNOPSIS
|
|
|
|
#
|
|
|
|
# GS_RUNTIME_ABI([default_runtime_abi])
|
|
|
|
#
|
|
|
|
# DESCRIPTION
|
|
|
|
#
|
2019-12-06 21:29:31 +00:00
|
|
|
# This macro determine the correct runtime ABI to use.
|
2019-12-03 21:47:54 +00:00
|
|
|
#
|
|
|
|
AC_DEFUN([GS_RUNTIME_ABI],dnl
|
|
|
|
[AC_REQUIRE([GS_LIBRARY_COMBO])
|
2019-12-04 07:52:22 +00:00
|
|
|
AC_REQUIRE([GS_CHECK_RUNTIME_ABI20_SUPPORT])
|
|
|
|
AC_REQUIRE([GS_CHECK_CC_IS_CLANG])
|
|
|
|
AC_REQUIRE([GS_CHECK_GCC_VERSION])
|
2019-12-04 01:17:39 +00:00
|
|
|
case "$OBJC_RUNTIME_LIB" in
|
2019-12-03 21:47:54 +00:00
|
|
|
gnu) default_runtime_abi=gcc ;;
|
|
|
|
ng) default_runtime_abi=gnustep-1.8 ;;
|
|
|
|
*) default_runtime_abi="(unknown)" ;;
|
|
|
|
esac
|
|
|
|
if test ! x"$1" = x""; then
|
|
|
|
default_runtime_abi="$1"
|
2019-12-04 07:52:22 +00:00
|
|
|
elif test x"$OBJC_RUNTIME_LIB" = x"ng" -a x"$libobjc_SUPPORTS_ABI20" = x"yes" -a x"$CLANG_CC" = x"yes" -a "${gs_cv_gcc_major_version}" -ge "8"; then
|
|
|
|
default_runtime_abi=gnustep-2.0
|
2019-12-03 21:47:54 +00:00
|
|
|
fi
|
|
|
|
AC_ARG_WITH([runtime-abi],
|
|
|
|
[AS_HELP_STRING([--with-runtime-abi], [
|
|
|
|
When using the ng runtime library, allows control over the -fobjc-runtime= flag passed to clang.
|
|
|
|
])],,
|
|
|
|
[with_runtime_abi=]${default_runtime_abi})
|
2019-12-04 01:17:39 +00:00
|
|
|
AC_CACHE_CHECK([for runtime ABI],[_gs_cv_runtime_abi], [
|
2019-12-03 21:47:54 +00:00
|
|
|
_gs_cv_runtime_abi=${with_runtime_abi}
|
|
|
|
])
|
|
|
|
AS_VAR_IF([_gs_cv_runtime_abi], ["(unknown)"], [AS_UNSET(gs_cv_runtime_abi)], [AS_VAR_SET([gs_cv_runtime_abi], [${_gs_cv_runtime_abi}])])
|
|
|
|
AC_SUBST([gs_cv_runtime_abi])
|
|
|
|
])
|