3 define([AC_CACHE_LOAD], )dnl
4 define([AC_CACHE_SAVE], )dnl
6 dnl Process this file with autoconf to produce a configure script.
9 AM_INIT_AUTOMAKE(tree-puzzle, 5.0)
11 dnl Checks for programs.
18 AC_DEFUN(AC_TEST_MPICC,[dnl
19 if test "$1" != "" ; then
20 if test "$MPICCSET" = "" ; then
21 cat > conftest.c <<EOF
23 int main (int argc, char **argv)
25 MPI_Init(&argc,&argv);
33 dnl if test "$MPICC" != "$CC" ; then
37 if test "$MPICC" != "" ; then
38 AC_MSG_CHECKING(whether $MPICC works as MPI compiler)
39 $MPICC conftest.c -o conftest > /dev/null 2>&1
48 AC_MSG_CHECKING(whether $MPICC needs -lmpi)
49 $MPICC conftest.c -o conftest -lmpi > /dev/null 2>&1
69 if test "$MPICC" != "" ; then
70 AC_PATH_PROG(MPICC0, $MPICC)
72 AC_PATH_PROG(MPICC1, mpcc)
73 AC_PATH_PROG(MPICC2, hcc)
74 AC_PATH_PROG(MPICC3, mpicc)
75 AC_PATH_PROG(MPICC4, mpicc_lam)
76 AC_PATH_PROG(MPICC5, mpicc_mpich)
78 AC_TEST_MPICC($MPICC0)
79 AC_TEST_MPICC($MPICC1)
80 AC_TEST_MPICC($MPICC2)
81 AC_TEST_MPICC($MPICC3)
82 AC_TEST_MPICC($MPICC4)
83 AC_TEST_MPICC($MPICC5)
85 ac_cv_prog_MPICC=$MPICC
93 dnl Checks for libraries.
94 dnl Replace `main' with a function in -lm:
96 dnl AC_CHECK_LIB(mpi, main)
98 dnl Checks for header files.
100 AC_CHECK_HEADERS(limits.h)
101 dnl AC_HAVE_HEADERS(mpi.h)
103 dnl AC_HAVE_HEADERS(rpc/xdr.h)
106 dnl Checks for typedefs, structures, and compiler characteristics.
110 dnl Checks for library functions.
111 dnl AC_CHECK_FUNCS(xdr_u_char)
112 dnl AC_CHECK_FUNCS(xdr_double)
113 dnl AC_CHECK_FUNCS(xdrstdio_create)
114 dnl AC_CHECK_FUNCS(xdr_destroy)
115 dnl AC_CHECK_FUNCS(xdr_inline)
117 AC_OUTPUT(Makefile src/Makefile src/test doc/Makefile data/Makefile)