do not fail when no MPI library is found
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@381 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
49058f2b72
commit
54b919fe5a
@ -173,8 +173,7 @@ ENGINE_OBJECTS = \
|
|||||||
exec.o grow.o heapgc.o index.o init.o \
|
exec.o grow.o heapgc.o index.o init.o \
|
||||||
iopreds.o depth_bound.o mavar.o modules.o other.o \
|
iopreds.o depth_bound.o mavar.o modules.o other.o \
|
||||||
parser.o save.o scanner.o sort.o stdpreds.o sysbits.o tracer.o \
|
parser.o save.o scanner.o sort.o stdpreds.o sysbits.o tracer.o \
|
||||||
unify.o userpreds.o utilpreds.o write.o ypsocks.o ypstdio.o \
|
unify.o userpreds.o utilpreds.o write.o ypsocks.o ypstdio.o @MPI_OBJS@
|
||||||
mpi.o mpe.o
|
|
||||||
|
|
||||||
C_INTERFACE_OBJECTS = \
|
C_INTERFACE_OBJECTS = \
|
||||||
load_foreign.o load_dl.o load_dld.o \
|
load_foreign.o load_dl.o load_dld.o \
|
||||||
@ -459,7 +458,7 @@ startup: yap $(PL_SOURCES)
|
|||||||
echo "['$(srcdir)/pl/init.yap']. save_program(startup)." | @CROSS_SIMULATOR@ ./yap -b $(srcdir)/pl/boot.yap
|
echo "['$(srcdir)/pl/init.yap']. save_program(startup)." | @CROSS_SIMULATOR@ ./yap -b $(srcdir)/pl/boot.yap
|
||||||
|
|
||||||
yap: $(HEADERS) yap.o @YAPLIB@
|
yap: $(HEADERS) yap.o @YAPLIB@
|
||||||
$(MPI_CC) $(STANDARD_CFLAGS) $(LDFLAGS) -o yap yap.o @YAPLIB@ $(LIBS)
|
$(MPI_CC) $(STANDARD_CFLAGS) $(LDFLAGS) -o yap yap.o @YAPLIB@ $(LIBS) @MPI_LIBS@
|
||||||
|
|
||||||
libYap.a: $(LIB_OBJECTS)
|
libYap.a: $(LIB_OBJECTS)
|
||||||
-rm -f libYap.a
|
-rm -f libYap.a
|
||||||
|
26
configure.in
26
configure.in
@ -287,18 +287,20 @@ then
|
|||||||
[AC_DEFINE(HAVE_LIBMPI, 0)])
|
[AC_DEFINE(HAVE_LIBMPI, 0)])
|
||||||
if test "$ac_cv_lib_mpi_MPI_Init" = yes
|
if test "$ac_cv_lib_mpi_MPI_Init" = yes
|
||||||
then
|
then
|
||||||
#LIBS="$LIBS -lpmpich"
|
#YAPMPILIB=YapMPI.a
|
||||||
YAPMPILIB=YapMPI.a
|
MPI_OBJS=mpi.o
|
||||||
else
|
else
|
||||||
AC_CHECK_LIB(mpich,MPI_Init,
|
AC_CHECK_LIB(mpich,MPI_Init,
|
||||||
[AC_DEFINE(HAVE_LIBMPICH, 1)],
|
[AC_DEFINE(HAVE_LIBMPICH, 1)],
|
||||||
[AC_DEFINE(HAVE_LIBMPICH, 0)])
|
[AC_DEFINE(HAVE_LIBMPICH, 0)])
|
||||||
if test "$ac_cv_lib_mpi_MPI_Init" = yes
|
if test "$ac_cv_lib_mpi_MPI_Init" = yes
|
||||||
then
|
then
|
||||||
#LIBS="$LIBS -lpmpich"
|
#YAPMPILIB=YapMPI.a
|
||||||
YAPMPILIB=YapMPI.a
|
MPI_OBJS=mpi.o
|
||||||
else
|
else
|
||||||
YAPMPILIB=
|
#YAPMPILIB=
|
||||||
|
MPI_OBJS=
|
||||||
|
MPI_CC='$(CC)'
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
CC=${OLD_CC}
|
CC=${OLD_CC}
|
||||||
@ -308,11 +310,23 @@ if test "$yap_cv_mpe" != "no"
|
|||||||
then
|
then
|
||||||
OLD_CC=${CC}
|
OLD_CC=${CC}
|
||||||
CC=${MPI_CC}
|
CC=${MPI_CC}
|
||||||
AC_CHECK_LIB(mpe,MPE_Init_log)
|
AC_CHECK_LIB(mpe,MPE_Init_log,
|
||||||
|
[AC_DEFINE(HAVE_LIBMPE, 1)],
|
||||||
|
[AC_DEFINE(HAVE_LIBMPE, 0)])
|
||||||
|
if test "$ac_cv_lib_mpe_MPE_Init_log" = yes
|
||||||
|
then
|
||||||
|
MPI_LIBS="-lmpe"
|
||||||
|
MPI_OBJS="$MPI_OBJS mpe.o"
|
||||||
|
else
|
||||||
|
MPI_LIBS=
|
||||||
|
MPI_OBJS=
|
||||||
|
fi
|
||||||
CC=${OLD_CC}
|
CC=${OLD_CC}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(YAPMPILIB)
|
AC_SUBST(YAPMPILIB)
|
||||||
|
AC_SUBST(MPI_OBJS)
|
||||||
|
AC_SUBST(MPI_LIBS)
|
||||||
|
|
||||||
AC_PROG_CPP
|
AC_PROG_CPP
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user