2010-10-08 Ralf Corsépius <ralf.corsepius@rtems.org>

* aclocal/check-func.m4: Linearize checks.
	Add missing $2 to AC_CHECK_DECL.
This commit is contained in:
Ralf Corsepius
2010-10-08 09:42:11 +00:00
parent acd08dd1b1
commit b2b13e8af2
2 changed files with 15 additions and 11 deletions

View File

@@ -1,3 +1,8 @@
2010-10-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* aclocal/check-func.m4: Linearize checks.
Add missing $2 to AC_CHECK_DECL.
2010-10-04 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Revert accident commit adding libdbm to

View File

@@ -6,17 +6,16 @@
# RTEMS_CHECK_FUNC(FUNCTION[,INCLUDES])
AC_DEFUN([RTEMS_CHECK_FUNC],
[AC_REQUIRE([RTEMS_CHECK_NEWLIB])
AC_CHECK_DECLS([$1],
[
AC_CACHE_CHECK([for $1],[ac_cv_$1],[
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[$2]],[[rtems_stub_$1()]])],
[ac_cv_$1="stub"],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[$2]],[[$1()]])],
[ac_cv_$1="yes"],
[ac_cv_$1="no"])
])
AC_CHECK_DECLS([$1],,,[$2])
AC_CACHE_CHECK([for $1],[ac_cv_$1],[
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[$2]],[[rtems_stub_$1()]])],
[ac_cv_$1="stub"],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[$2]],[[$1()]])],
[ac_cv_$1="yes"],
[ac_cv_$1="no"])
])
])
AS_IF([test "$ac_cv_$1" = yes],