xref: /netbsd-src/external/gpl3/binutils/dist/config/dejagnu.m4 (revision cb63e24e8d6aae7ddac1859a9015f48b1d8bd90e)
1*cb63e24eSchristos# DEJAGNU_CHECK_VERSION DEJAGNU_CHECK_VERSION
2*cb63e24eSchristos# --------------------------------------------------------------
3*cb63e24eSchristos# Test whether there is an incompatibility between DejaGnu and GCC versions.
4*cb63e24eSchristos# Older versions ( <= 1.5.1 ) of dejagnu.h use GNU inline semantics improperly.
5*cb63e24eSchristos# The issue presents itself as link-time errors complaining about undefined
6*cb63e24eSchristos# references to 'pass' and 'fail'.
7*cb63e24eSchristosAC_DEFUN([DEJAGNU_CHECK_VERSION],
8*cb63e24eSchristos[
9*cb63e24eSchristos  AC_MSG_CHECKING([for incompatibility between DejaGnu and GCC])
10*cb63e24eSchristos  AC_MSG_RESULT([$ac_cv_dejagnu_compat])
11*cb63e24eSchristos
12*cb63e24eSchristos  AC_TRY_LINK([#include <dejagnu.h>],
13*cb63e24eSchristos	      [pass ("test foo");
14*cb63e24eSchristos	       return 0;],
15*cb63e24eSchristos	      [ac_cv_dejagnu_compat=yes],
16*cb63e24eSchristos	      [ac_cv_dejagnu_compat=no])
17*cb63e24eSchristos  AC_MSG_RESULT([$ac_cv_dejagnu_compat])
18*cb63e24eSchristos
19*cb63e24eSchristos  if test "$ac_cv_dejagnu_compat}" = no ; then
20*cb63e24eSchristos    AC_MSG_RESULT([detected incompatibility between dejagnu version and gcc])
21*cb63e24eSchristos  fi
22*cb63e24eSchristos])
23