[Ocfs2-tools-commits] manish commits r277 - trunk

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Sep 28 22:50:28 CDT 2004


Author: manish
Date: 2004-09-28 22:50:26 -0500 (Tue, 28 Sep 2004)
New Revision: 277

Modified:
   trunk/Config.make.in
   trunk/Makefile
   trunk/configure.in
Log:
Make glib2 dependent tools optional


Modified: trunk/Config.make.in
===================================================================
--- trunk/Config.make.in	2004-09-29 03:47:21 UTC (rev 276)
+++ trunk/Config.make.in	2004-09-29 03:50:26 UTC (rev 277)
@@ -59,6 +59,7 @@
 
 BUILD_OCFSTOOL = @BUILD_OCFSTOOL@
 
+BUILD_OCFS2CDSL = @BUILD_OCFS2CDSL@
 BUILD_DEBUGOCFS2 = @BUILD_DEBUGOCFS2@
 
 OCFS_DEBUG = @OCFS_DEBUG@

Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2004-09-29 03:47:21 UTC (rev 276)
+++ trunk/Makefile	2004-09-29 03:50:26 UTC (rev 277)
@@ -22,8 +22,12 @@
 $(error could not detect architecture for tools)
 endif
 
-SUBDIRS = libocfs2 fsck.ocfs2 mkfs.ocfs2 mounted.ocfs2 ocfs2cdsl extras load_ocfs ocfs_uid_gen patches
+SUBDIRS = libocfs2 fsck.ocfs2 mkfs.ocfs2 mounted.ocfs2 extras load_ocfs ocfs_uid_gen patches
 
+ifdef BUILD_OCFS2CDSL
+SUBDIRS += ocfs2cdsl
+endif
+
 ifdef BUILD_DEBUGOCFS2
 SUBDIRS += debugfs.ocfs2
 endif

Modified: trunk/configure.in
===================================================================
--- trunk/configure.in	2004-09-29 03:47:21 UTC (rev 276)
+++ trunk/configure.in	2004-09-29 03:50:26 UTC (rev 277)
@@ -129,26 +129,39 @@
 GTK_REQUIRED_VERSION=2.2.4
 PYGTK_REQUIRED_VERSION=1.99.16
 
-AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :,
-  AC_MSG_ERROR([Glib $GLIB_REQUIRED_VERSION or better is required.]))
+AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, have_glib=yes, have_glib=no)
 
+if test "x$have_glib" != "xyes"; then
+  AC_MSG_WARN([Glib $GLIB_REQUIRED_VERSION or better not found, some tools won't be built])
+fi
+
+BUILD_OCFS2CDSL=
 BUILD_DEBUGOCFS2=
 
-ocfs_tools_save_LIBS=$LIBS
-LIBS="$LIBS -lncurses"
-AC_CHECK_LIB(readline, readline,
-  [AC_CHECK_HEADER(readline/readline.h,
-    BUILD_DEBUGOCFS2=yes,
-    [AC_MSG_WARN([readline not found, debugfs.ocfs2 will not be built])])],
-  [AC_MSG_WARN([readline not found, debugfs.ocfs2 will not be built])])
-LIBS=$ocfs_tools_save_LIBS
+if test "x$have_glib" = "xyes"; then
+  BUILD_OCFS2CDSL=yes
+  
+  ocfs_tools_save_LIBS=$LIBS
+  LIBS="$LIBS -lncurses"
+  AC_CHECK_LIB(readline, readline,
+    [AC_CHECK_HEADER(readline/readline.h,
+      BUILD_DEBUGOCFS2=yes,
+      [AC_MSG_WARN([readline not found, debugfs.ocfs2 will not be built])])],
+    [AC_MSG_WARN([readline not found, debugfs.ocfs2 will not be built])])
+  LIBS=$ocfs_tools_save_LIBS
+fi
 
+AC_SUBST(BUILD_OCFS2CDSL)
 AC_SUBST(BUILD_DEBUGOCFS2)
 
 BUILD_OCFSTOOL=
 dnl AC_ARG_ENABLE(ocfstool, [  --enable-ocfstool=[yes/no]       Build GUI frontend [default=yes]],,enable_ocfstool=yes)
 AC_ARG_ENABLE(ocfstool, [  --enable-ocfstool=[yes/no]       Build GUI frontend [default=no]],,enable_ocfstool=no)
 
+if test "x$have_glib" != "xyes"; then
+  enable_ocfstool=no
+fi
+
 if test "x$enable_ocfstool" = "xyes"; then
   dnl check for Python
   AM_PATH_PYTHON(2.2)



More information about the Ocfs2-tools-commits mailing list