source: rtems/aclocal/check-newlib.m4 @ 8262fda

4.104.114.84.9
Last change on this file since 8262fda was 823938f, checked in by Joel Sherrill <joel.sherrill@…>, on Jul 7, 2000 at 5:01:29 PM

Patch rtems-rc-20000707-1-cvs.diff from Ralf Corsepius
<corsepiu@…> that adds a piece of the
*-rc-20000705-? series that was not added to CVS accidentally.

  • Property mode set to 100644
File size: 957 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 newlib],
8  rtems_cv_use_newlib,
9  [
10    rtems_save_CC=$CC
11    CC=$CC_FOR_TARGET
12
13dnl some versions of newlib provide not_required_by_rtems
14    AC_TRY_LINK(
15      [extern void not_required_by_rtems() ;],
16      [not_required_by_rtems()],
17      rtems_cv_use_newlib="yes")
18
19dnl some versions of newlib provide rtems_provides_crt0()
20    if test -z "$rtems_cv_use_newlib"; then
21      AC_TRY_LINK(
22        [extern void rtems_provides_crt0() ;],
23        [rtems_provides_crt0()],
24        rtems_cv_use_newlib="yes",
25        rtems_cv_use_newlib="no")
26    fi
27  CC=$rtems_save_CC])
28RTEMS_USE_NEWLIB="$rtems_cv_use_newlib"
29AC_SUBST(RTEMS_USE_NEWLIB)
30
31if test x"${RTEMS_USE_NEWLIB}" = x"yes";
32then
33  AC_DEFINE_UNQUOTED(RTEMS_NEWLIB,1,[if using newlib])
34  AC_DEFINE_UNQUOTED(MALLOC_PROVIDED,1,[if malloc is provided])
35fi
36])
37
Note: See TracBrowser for help on using the repository browser.