diff -u grub-0.94/INSTALL grub-0.94-reiser4/INSTALL --- grub-0.94/INSTALL 2003-10-19 19:15:45.000000000 +0200 +++ grub-0.94-reiser4/INSTALL 2004-04-11 18:38:35.270274979 +0200 @@ -207,6 +207,9 @@ `--disable-reiserfs' Omit the ReiserFS support in Stage 2. +`--disable-reiser4' + Omit the Reiser4 support in Stage 2. + `--disable-vstafs' Omit the VSTa filesystem support in Stage 2. diff -u grub-0.94/config.h.in grub-0.94-reiser4/config.h.in --- grub-0.94/config.h.in 2003-10-19 19:27:16.000000000 +0200 +++ grub-0.94-reiser4/config.h.in 2004-04-11 18:38:35.167298053 +0200 @@ -50,6 +50,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the `aal-alone' library (-laal-alone). */ +#undef HAVE_LIBAAL_ALONE + +/* Define to 1 if you have the `reiser4-alone' library (-lreiser4-alone). */ +#undef HAVE_LIBREISER4_ALONE + /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H diff -u grub-0.94/configure.ac grub-0.94-reiser4/configure.ac --- grub-0.94/configure.ac 2004-04-11 19:05:34.555429539 +0200 +++ grub-0.94-reiser4/configure.ac 2004-04-11 18:38:35.216287076 +0200 @@ -241,6 +241,77 @@ FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_REISERFS=1" fi +dnl Checking for reiser4 +REISER4_LIBS="" +REISER4_CFLAGS="" + +OLD_LIBS=$LIBS +OLD_CFLAGS=$CFLAGS +LIBS="" +CFLAGS="" + +AC_ARG_ENABLE(reiser4, + [ --disable-reiser4 disable Reiser4 support in Stage 2]) + +enable_reiser4_support=yes + +AC_CHECK_LIB(aal-alone, aal_mem_init, , + AC_MSG_WARN( +Reiser4 support is disabled due to inability find libaal-alone with +memory manager support turned on.) + enable_reiser4_support=no +) + +if test x"$enable_reiser4_support" != xno; then + AC_CHECK_HEADER(aal/libaal.h, , + AC_MSG_WARN( +Libaal header files are not found. Reiser4 support is disabled + ) + enable_reiser4_support=no) +fi + +if test x"$enable_reiser4_support" != xno; then + AC_CHECK_LIB(reiser4-alone, reiser4_fs_open, , + AC_MSG_WARN( +Reiser4 support is disabled due to inability find valid libreiser4-alone.) + enable_reiser4_support=no, + -laal-alone + ) +fi + +if test x"$enable_reiser4_support" != xno; then + AC_CHECK_HEADER(reiser4/libreiser4.h, , + AC_MSG_WARN( +Reiser4 header files are not found. Reiser4 support is disabled. + ) + enable_reiser4_support=no) +fi + +if test x"$enable_reiser4_support" != xno; then + REISER4_CFLAGS="$REISER4_CFLAGS -DFSYS_REISER4=1" + REISER4_LIBS=$LIBS +fi + +if test x"$enable_reiser4_support" != xno; then + AC_CHECK_LIB(reiser4-alone, __sym40_plug_init, + REISER4_CFLAGS="$REISER4_CFLAGS -DENABLE_SYMLINKS=1", +AC_MSG_WARN(Reiser4 symlinks support is disabled.), + -laal-alone + ) +fi + +LIBS=$OLD_LIBS +CFLAGS=$OLD_CFLAGS + +if test x"$enable_reiser4" != xno; then + (test x"$enable_reiser4_support" != xno) && + FSYS_CFLAGS="$FSYS_CFLAGS $REISER4_CFLAGS" +fi + +AC_SUBST(REISER4_LIBS) +AC_SUBST(REISER4_CFLAGS) +AM_CONDITIONAL(ENABLE_REISER4_SUPPORT, test x"$enable_reiser4_support" != xno) + AC_ARG_ENABLE(vstafs, [ --disable-vstafs disable VSTa FS support in Stage 2])