Whamcloud - gitweb
Land b_smallfix onto HEAD (20040414_1359)
[fs/lustre-release.git] / lustre / configure.in
index 88b11e9..47977cc 100644 (file)
@@ -31,14 +31,6 @@ AC_ARG_ENABLE([tests],
        [],[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,
@@ -113,11 +105,43 @@ AC_ARG_WITH([sysio],
                        [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])