From 1c0b94eff83a3f2147a09b25fe5a4b6bc48ad1b4 Mon Sep 17 00:00:00 2001 From: fche Date: Wed, 11 Jul 2007 15:48:29 +0000 Subject: [PATCH] 2007-07-11 Frank Ch. Eigler * configure.ac: Don't AC_MSG_ERROR if don't HAVE_LIBSQLITE3. * coveragedb.cxx: Compile to nothing unless HAVE_LIBSQLITE3. * main.cxx: Print no error message on -q if HAVE_LIBSQLITE3. * configure: Regenerated, looks rosier with HAVE_LIBSQLITE3. --- ChangeLog | 7 +++++++ configure | 5 ----- configure.ac | 3 +-- coveragedb.cxx | 4 ++++ main.cxx | 6 ++++++ 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index e72e93902..50a6e564d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-07-11 Frank Ch. Eigler + + * configure.ac: Don't AC_MSG_ERROR if don't HAVE_LIBSQLITE3. + * coveragedb.cxx: Compile to nothing unless HAVE_LIBSQLITE3. + * main.cxx: Print no error message on -q if HAVE_LIBSQLITE3. + * configure: Regenerated, looks rosier with HAVE_LIBSQLITE3. + 2007-07-08 William Cohen PR 4529 diff --git a/configure b/configure index 9fd6b86cd..99acf26a1 100755 --- a/configure +++ b/configure @@ -5991,11 +5991,6 @@ _ACEOF LIBS="-lsqlite3 $LIBS" -else - - { { echo "$as_me:$LINENO: error: missing sqlite development headers/libraries" >&5 -echo "$as_me: error: missing sqlite development headers/libraries" >&2;} - { (exit 1); exit 1; }; } fi sqlite3_LIBS="$LIBS" diff --git a/configure.ac b/configure.ac index f0c5c9c7b..90d93e017 100644 --- a/configure.ac +++ b/configure.ac @@ -75,8 +75,7 @@ fi]) SAVE_LIBS="$LIBS" -AC_CHECK_LIB(sqlite3, sqlite3_open,,[ - AC_MSG_ERROR([missing sqlite development headers/libraries])]) +AC_CHECK_LIB(sqlite3, sqlite3_open) sqlite3_LIBS="$LIBS" AC_SUBST(sqlite3_LIBS) LIBS="$SAVE_LIBS" diff --git a/coveragedb.cxx b/coveragedb.cxx index 11d0abf2b..bee84db97 100644 --- a/coveragedb.cxx +++ b/coveragedb.cxx @@ -14,6 +14,8 @@ #include "session.h" #include "util.h" +#ifdef HAVE_LIBSQLITE3 + #include #include #include @@ -363,3 +365,5 @@ void update_coverage_db(systemtap_session &s) sqlite3_close(db); } + +#endif /* HAVE_LIBSQLITE3 */ diff --git a/main.cxx b/main.cxx index 53f475131..d54713a69 100644 --- a/main.cxx +++ b/main.cxx @@ -100,7 +100,9 @@ usage (systemtap_session& s, int exitcode) << endl << " -x PID sets target() to PID" << endl << " -t collect probe timing information" << endl +#ifdef HAVE_LIBSQLITE3 << " -q generate information on tapset coverage" +#endif /* HAVE_LIBSQLITE3 */ << endl ; // -d: dump safety-related external references @@ -802,7 +804,11 @@ pass_5: // update the database information if (!rc && s.tapset_compile_coverage) { +#ifdef HAVE_LIBSQLITE3 update_coverage_db(s); +#else + cerr << "Coverage database not available without libsqlite3" << endl; +#endif } // Clean up temporary directory. Obviously, be careful with this. -- 2.43.5