diff options
Diffstat (limited to 'config/gcc-plugin.m4')
-rw-r--r-- | config/gcc-plugin.m4 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4 index c5b72e9..ca98d67 100644 --- a/config/gcc-plugin.m4 +++ b/config/gcc-plugin.m4 @@ -145,6 +145,18 @@ for plugin in $plugin_names; do break fi done +dnl Check if ${AR} $plugin_option rc works. +AC_CHECK_TOOL(AR, ar) +if test "${AR}" = "" ; then + AC_MSG_ERROR([Required archive tool 'ar' not found on PATH.]) +fi +touch conftest.c +${AR} $plugin_option rc conftest.a conftest.c +if test "$?" != 0; then + AC_MSG_WARN([Failed: $AR $plugin_option rc]) + plugin_option= +fi +rm -f conftest.* if test -n "$plugin_option"; then $1="$plugin_option" AC_MSG_RESULT($plugin_option) |