From: fche Date: Tue, 10 Oct 2006 17:40:10 +0000 (+0000) Subject: * partial rollback of mysql code in lket/b2a until configury problems are solved X-Git-Tag: release-0.5.10~20 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=da641cd3e8aa2792ab99a0ac41b4a657a94dccfa;p=systemtap.git * partial rollback of mysql code in lket/b2a until configury problems are solved --- diff --git a/ChangeLog b/ChangeLog index aa90e6057..60079008b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,13 @@ +2006-10-10 Frank Ch. Eigler + + * configure.ac: Override incomplete mysql checking for now. + * configure: Regenerated. + 2006-10-10 Li Guanglei * configure.ac: add the checking of mysql client library * Makefile.in, configure: regenerated + 2006-09-29 Li Guanglei * man: newly created dir for stapprobes diff --git a/configure b/configure index 900c1d621..380de7895 100755 --- a/configure +++ b/configure @@ -5225,8 +5225,12 @@ else fi +# This check is not sufficient. mysql_config may exist on machines +# that do not actually have the development headers/libraries installed. +# AM_CONDITIONAL(HAS_MYSQL, which mysql_config > /dev/null 2>&1) -if which mysql_config > /dev/null 2>&1; then + +if false; then HAS_MYSQL_TRUE= HAS_MYSQL_FALSE='#' else @@ -5242,6 +5246,7 @@ echo "$as_me: WARNING: glib2-devel is required to build lket-b2a. no glib2-devel found, skip building lket-b2a..." >&2;} fi +# AC_CHECK_LIB if ! which mysql_config > /dev/null 2>&1; then { echo "$as_me:$LINENO: WARNING: mysqlclient lib is required to build lket-b2a with database support. no mysqlclient lib is found, skip building lket-b2a with database support..." >&5 diff --git a/configure.ac b/configure.ac index 65b493cd0..8f2a05600 100644 --- a/configure.ac +++ b/configure.ac @@ -60,13 +60,18 @@ yes) AC_MSG_ERROR([--with-elfutils requires an argument]) ;; esac]) AM_CONDITIONAL(BUILD_ELFUTILS, test $build_elfutils = yes) AM_CONDITIONAL(BUILD_LKET_B2A, pkg-config --atleast-version 2.0.0 glib-2.0) -AM_CONDITIONAL(HAS_MYSQL, which mysql_config > /dev/null 2>&1) + +# This check is not sufficient. mysql_config may exist on machines +# that do not actually have the development headers/libraries installed. +# AM_CONDITIONAL(HAS_MYSQL, which mysql_config > /dev/null 2>&1) +AM_CONDITIONAL(HAS_MYSQL, false) if ! pkg-config --atleast-version 2.0.0 glib-2.0; then AC_MSG_WARN([glib2-devel is required to build lket-b2a. no glib2-devel found, skip building lket-b2a...]) fi +# AC_CHECK_LIB if ! which mysql_config > /dev/null 2>&1; then AC_MSG_WARN([mysqlclient lib is required to build lket-b2a with database support. no mysqlclient lib is found, skip building lket-b2a with database support...]) diff --git a/runtime/ChangeLog b/runtime/ChangeLog index 6f38ac92e..6871025f1 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,7 @@ +2006-10-10 Frank Ch. Eigler + + * runtime/lket/b2a/lket_b2a.c: Add several missing #ifdef HAS_MYSQL. + 2006-10-10 Li Guanglei * runtime/lket/b2a/lket_b2a.c, runtime/lket/b2a/lket_b2a.h: diff --git a/runtime/lket/b2a/lket_b2a.c b/runtime/lket/b2a/lket_b2a.c index ee9d4857c..eb4c2fc6c 100644 --- a/runtime/lket/b2a/lket_b2a.c +++ b/runtime/lket/b2a/lket_b2a.c @@ -1,4 +1,5 @@ // Copyright (C) 2005, 2006 IBM Corp. +// Copyright (C) 2006 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General @@ -299,9 +300,9 @@ failed: exit(-1); } } -#endif if(events_des[1][i][j]->entrytime) /* destroy entrytime tree */ g_tree_destroy(events_des[1][i][j]->entrytime); +#endif } } @@ -634,7 +635,9 @@ char *get_sqltype(char *fmt) void register_evt_desc(FILE *infp, size_t size) { +#ifdef HAS_MYSQL static int has_table = 0; +#endif int grpid, hookid; char *evt_body; evt_body = malloc(size); @@ -644,9 +647,9 @@ void register_evt_desc(FILE *infp, size_t size) if(!events_des[1][grpid][hookid]) events_des[1][grpid][hookid] = malloc(sizeof(event_desc)); +#ifdef HAS_MYSQL events_des[1][grpid][hookid]->entrytime = g_tree_new_full( compareFunc, NULL, NULL, destroyTreeData); -#ifdef HAS_MYSQL if(into_db) { if(!has_table) { snprintf(sql, 1024, "create table table_desc ( table_name \ @@ -708,10 +711,10 @@ void register_events(int evt_type, FILE *infp, size_t size) snprintf(sql, 1024, "alter table %d_%d ", grpid, hookid); } } -#endif if(size == 2) // skip if no event format is provided goto gen_sql; +#endif evt_fmt = evt_body+2;