]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
be more flexible with a lack of -ldb on a system (just skip test 010).
authorNathan Scott <nathans@sgi.com>
Tue, 27 Mar 2001 06:57:37 +0000 (06:57 +0000)
committerNathan Scott <nathans@sgi.com>
Tue, 27 Mar 2001 06:57:37 +0000 (06:57 +0000)
010
configure.in
include/builddefs.in
src/Makefile

diff --git a/010 b/010
index d9e1d14efd990455b7f4897ab304264ce0d73ba7..74ffefce315a77d9f978df64c3c79bb30dec7551 100755 (executable)
--- a/010
+++ b/010
@@ -65,6 +65,8 @@ _filter_dbtest()
 . ./common.rc
 . ./common.filter
 
+[ -x $here/src/dbtest ] || _notrun "dbtest was not built for this platform"
+
 # real QA test starts here
 cd $TEST_DIR
 $here/src/dbtest -l 5 -n 3000 | _filter_dbtest
index ad2be9df2e087ab6b198b5c150a9522721a9f6f4..3863e9da5085a282c09c8c62a961166e3f744f32 100644 (file)
@@ -180,21 +180,14 @@ libacl="/usr/lib/libacl.a"
 AC_SUBST(libacl)
 
 dnl Checks for GNU database manager header and library.
-AC_CHECK_HEADER(gdbm.h,, [
-       echo
-       echo 'FATAL ERROR: could not find a valid GNU database manager header.'
-       echo 'Install either the gdbm-devel (rpm) or the libgdbmg1-dev (deb) package.'
-       exit 1
-])
-AC_CHECK_LIB(gdbm, gdbm_open,, [
-       echo
-       echo 'FATAL ERROR: could not find a valid GNU database manager library.'
-       echo 'Install either the gdbm-devel (rpm) or the libgdbmg1-dev (deb) package.'
-       exit 1
-])
-libgdbm="/usr/lib/libgdbm.a"
+libgdbm=""
+have_db=true
+AC_CHECK_HEADER(gdbm/ndbm.h,, [ have_db=false ])
+if test $have_db = "true" -a -f /usr/lib/libgdbm.a; then
+       libgdbm="/usr/lib/libgdbm.a"
+fi
 AC_SUBST(libgdbm)
-
+AC_SUBST(have_db)
 
 dnl alternate root and usr prefixes
 test -z "$ROOT_PREFIX" && ROOT_PREFIX=""
index 707a9ce5e811e7e2799e065552f850545c63a46a..22c3b021c66e7374ae5791e3a10bd17b1bf9a83a 100644 (file)
@@ -45,6 +45,7 @@ LIBATTR = @libattr@
 LIBGDBM = @libgdbm@
 LIBUUID = @libuuid@
 LIBHANDLE = @libhdl@
+HAVE_DB = @have_db@
 CPPFLAGS = -I/usr/include/xfs -I/usr/include/attr
 
 BUILDRULES = $(TOPDIR)/include/buildrules
index 104ea380f02cc5dd20ba5ff831a5d10af1f44175..061ef20f9a5de1de6f9631219009df21af655ed3 100644 (file)
 TOPDIR = ..
 include $(TOPDIR)/include/builddefs
 
-TARGETS = alloc bstat dbtest devzero dirstress fault feature fsstress \
+TARGETS = alloc bstat devzero dirstress fault feature fsstress \
          fill fill2 holes ioctl loggen lstat64 nametest permname \
          randholes truncfile usemem runas
+ifeq ($(HAVE_DB), true)
+TARGETS += dbtest
+endif
+
 CFILES = $(TARGETS:=.c) random.c
 HFILES = global.h
 LDIRT = $(TARGETS)