[],[enable_tests='yes'])
AC_MSG_RESULT([$enable_tests])
-AC_MSG_CHECKING([whether to build Lustre library])
-AC_ARG_ENABLE([liblustre],
- AC_HELP_STRING([--disable-liblustre],
- [disable building of Lustre library]),
- [],[enable_liblustre='yes'])
-AC_MSG_RESULT([$enable_liblustre])
-AM_CONDITIONAL(LIBLUSTRE, test x$enable_liblustre = xyes)
-
# specify wether to build doc or not
AC_MSG_CHECKING([whether to build docs])
AC_ARG_ENABLE(doc,
[set path to libsysio source (default=../libsysio)]),
[
SYSIO=$with_sysio
+ SYSIO_PATH=$SYSIO
],[
SYSIO='$(top_srcdir)/../libsysio'
+ SYSIO_PATH='../libsysio'
])
-AC_MSG_RESULT([$SYSIO])
-AC_SUBST(SYSIO)
+AC_MSG_RESULT([$SYSIO_PATH])
+
+AC_MSG_CHECKING([libsysio exists and ready for use])
+
+if test -r $SYSIO_PATH/src/libsysio.a; then
+ valid_libsysio=yes
+ AC_MSG_RESULT([yes])
+ AC_SUBST(SYSIO)
+else
+ valid_libsysio=no
+ AC_MSG_RESULT([no])
+fi
+
+AC_MSG_CHECKING([whether to build Lustre library])
+AC_ARG_ENABLE([liblustre],
+ AC_HELP_STRING([--disable-liblustre],
+ [disable building of Lustre library]),
+ [],[enable_liblustre='yes'])
+
+if test x$valid_libsysio != xyes; then
+ enable_liblustre=no
+ AC_MSG_RESULT([$enable_liblustre])
+
+ echo "Nevertheless liblustre was enabled for build, \
+no valid libsysio is found and liblustre building will be \
+disabled. Make sure that valid libsysio exists and built \
+at $SYSIO_PATH."
+else
+ AC_MSG_RESULT([$enable_liblustre])
+fi
+
+AM_CONDITIONAL(LIBLUSTRE, test x$enable_liblustre = xyes)
#build mpi-tests
AC_MSG_CHECKING([whether to build mpitests])