source: rtems/aclocal/check-newlib.m4 @ 73defea0

4.104.114.84.9
Last change on this file since 73defea0 was 86f12bc, checked in by Ralf Corsepius <ralf.corsepius@…>, on Nov 19, 2002 at 5:05:34 PM

2002-11-19 Ralf Corsepius <corsepiu@…>

  • automake/compile.am: Remove LD_PATHS (Unused).
  • aclocal/check-newlib.m4: Adaptation to autoconf-2.5x (AC_TRY_LINK is announced obsolete).
  • Property mode set to 100644
File size: 909 bytes
Line 
1dnl $Id$
2
3AC_DEFUN(RTEMS_CHECK_NEWLIB,
4[dnl
5AC_REQUIRE([RTEMS_PROG_CC_FOR_TARGET])dnl
6AC_REQUIRE([RTEMS_CANONICALIZE_TOOLS])dnl
7AC_CACHE_CHECK([for RTEMS newlib],
8  rtems_cv_use_newlib,
9  [
10dnl some versions of newlib provide not_required_by_rtems
11    AC_LINK_IFELSE(
12      [AC_LANG_PROGRAM([[extern void not_required_by_rtems() ;]],
13        [[not_required_by_rtems()]])],
14      [rtems_cv_use_newlib="yes"],[])
15
16dnl some versions of newlib provide rtems_provides_crt0()
17    AS_IF([test -z "$rtems_cv_use_newlib"],
18      [AC_LINK_IFELSE(
19         [AC_LANG_PROGRAM([[extern void rtems_provides_crt0() ;]],
20           [[rtems_provides_crt0()]])],
21         [rtems_cv_use_newlib="yes"],[rtems_cv_use_newlib="no"])
22    ])
23  ])
24  RTEMS_USE_NEWLIB="$rtems_cv_use_newlib"
25  AC_SUBST(RTEMS_USE_NEWLIB)
26
27  AS_IF([test x"${RTEMS_USE_NEWLIB}" = x"yes"],
28    [ AC_DEFINE_UNQUOTED(RTEMS_NEWLIB,1,[if using newlib])]
29  )
30])
Note: See TracBrowser for help on using the repository browser.