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> 2010-10-04 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Revert accident commit adding libdbm to * Makefile.am, configure.ac: Revert accident commit adding libdbm to

View File

@@ -6,9 +6,9 @@
# RTEMS_CHECK_FUNC(FUNCTION[,INCLUDES]) # RTEMS_CHECK_FUNC(FUNCTION[,INCLUDES])
AC_DEFUN([RTEMS_CHECK_FUNC], AC_DEFUN([RTEMS_CHECK_FUNC],
[AC_REQUIRE([RTEMS_CHECK_NEWLIB]) [AC_REQUIRE([RTEMS_CHECK_NEWLIB])
AC_CHECK_DECLS([$1], AC_CHECK_DECLS([$1],,,[$2])
[
AC_CACHE_CHECK([for $1],[ac_cv_$1],[ AC_CACHE_CHECK([for $1],[ac_cv_$1],[
AC_LINK_IFELSE( AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[$2]],[[rtems_stub_$1()]])], [AC_LANG_PROGRAM([[$2]],[[rtems_stub_$1()]])],
[ac_cv_$1="stub"], [ac_cv_$1="stub"],
@@ -18,7 +18,6 @@ AC_CHECK_DECLS([$1],
[ac_cv_$1="no"]) [ac_cv_$1="no"])
]) ])
]) ])
])
AS_IF([test "$ac_cv_$1" = yes], AS_IF([test "$ac_cv_$1" = yes],
[AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_]$1),[1],[Define to 1 if you have the `$1' function.])]) [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_]$1),[1],[Define to 1 if you have the `$1' function.])])
]) ])