dnl -*- shell-script -*- # # $Id: lam_check_prototype.m4,v 1.1 2000/10/17 12:05:17 jsquyres Exp $ # # This file is part of the University of Notre Dame implementation of # LAM/MPI. See the LICENSE file in the top-level directory for # license and copyright details. define([LAM_CHECK_PROTOTYPE],[ AC_MSG_CHECKING([for prototype of $1]) func=$1 rm -f conftest.c cat > conftest.c < #include #include #include #include #include #include int main(int argc, char **argv) { return 0; } EOF echo configure:__oline__: $CPP $CFLAGS conftest.c >&5 $CPP $CPPFLAGS conftest.c > conftest.out 2>&5 e1="egrep '[[^A-Za-z0-9_]]$func[[ ]]*\(' conftest.out" e2="egrep '^$func[[ ]]*\(' conftest.out" if test "`eval $e1`" != "" -o "`eval $e2`" != ""; then AC_DEFINE_UNQUOTED(LAM_HAVE_${func}_PROTO, 1) AC_MSG_RESULT([yes]) else echo configure:__oline__: here is the program that failed: >&5 cat conftest.c >&5 AC_DEFINE_UNQUOTED(LAM_HAVE_${func}_PROTO, 0) AC_MSG_RESULT([no]) fi rm -f conftest* ])dnl