diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | Makefile.in | 4 | ||||
-rwxr-xr-x | configure | 555 | ||||
-rw-r--r-- | configure.ac | 37 | ||||
-rw-r--r-- | runtime/lket/b2a/Makefile.am | 9 | ||||
-rw-r--r-- | runtime/lket/b2a/Makefile.in | 16 | ||||
-rw-r--r-- | testsuite/Makefile.in | 4 |
7 files changed, 603 insertions, 30 deletions
@@ -1,3 +1,11 @@ +2006-10-16 Li Guanglei <guanglei@cn.ibm.com> + * configure.ac: add the checking for mysql_config, + mysqlclient library and header files + * runtime/lket/b2a/Makefile.am: set compile flags + according to the existance of mysql_config + * Makefile.in, configure, testsuite/Makefile.in, + runtime/lket/b2a/Makefile.in: regenerated + 2006-10-12 Martin Hunt <hunt@redhat.com> * translate.cxx (emit_common_header): Add a diff --git a/Makefile.in b/Makefile.in index c1bb6fef..20f97fed 100644 --- a/Makefile.in +++ b/Makefile.in @@ -156,6 +156,7 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -167,6 +168,8 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +HAS_MYSQL_CONFIG_FALSE = @HAS_MYSQL_CONFIG_FALSE@ +HAS_MYSQL_CONFIG_TRUE = @HAS_MYSQL_CONFIG_TRUE@ HAS_MYSQL_FALSE = @HAS_MYSQL_FALSE@ HAS_MYSQL_TRUE = @HAS_MYSQL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ @@ -182,6 +185,7 @@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MYSQL_CONFIG = @MYSQL_CONFIG@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -310,7 +310,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CPP EGREP U ANSI2KNR RANLIB ac_ct_RANLIB BUILD_ELFUTILS_TRUE BUILD_ELFUTILS_FALSE BUILD_LKET_B2A_TRUE BUILD_LKET_B2A_FALSE HAS_MYSQL_TRUE HAS_MYSQL_FALSE stap_LIBS DATE LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CPP EGREP U ANSI2KNR RANLIB ac_ct_RANLIB BUILD_ELFUTILS_TRUE BUILD_ELFUTILS_FALSE BUILD_LKET_B2A_TRUE BUILD_LKET_B2A_FALSE MYSQL_CONFIG CXXCPP HAS_MYSQL_TRUE HAS_MYSQL_FALSE HAS_MYSQL_CONFIG_TRUE HAS_MYSQL_CONFIG_FALSE stap_LIBS DATE LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -779,6 +779,10 @@ ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP +ac_env_CXXCPP_set=${CXXCPP+set} +ac_env_CXXCPP_value=$CXXCPP +ac_cv_env_CXXCPP_set=${CXXCPP+set} +ac_cv_env_CXXCPP_value=$CXXCPP # # Report the --help message. @@ -880,6 +884,7 @@ Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor + CXXCPP C++ preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -5225,12 +5230,519 @@ 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) +mysql=false +SAVE_LDFLAGS=$LDFLAGS +SAVE_CPPFLAGS=$CPPFLAG -if false; then +# Extract the first word of "mysql_config", so it can be a program name with args. +set dummy mysql_config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MYSQL_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MYSQL_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MYSQL_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_MYSQL_CONFIG" && ac_cv_path_MYSQL_CONFIG="no" + ;; +esac +fi +MYSQL_CONFIG=$ac_cv_path_MYSQL_CONFIG + +if test -n "$MYSQL_CONFIG"; then + echo "$as_me:$LINENO: result: $MYSQL_CONFIG" >&5 +echo "${ECHO_T}$MYSQL_CONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test "$MYSQL_CONFIG" = "no"; then + { echo "$as_me:$LINENO: *** Cannot find mysql_config executable. Check your MySQL installation." >&5 +echo "$as_me: *** Cannot find mysql_config executable. Check your MySQL installation." >&6;} + CPPFLAGS="-I/usr/include/mysql $CPPFLAGS" + LDFLAGS="-L/usr/lib/mysql $LDFLAGS -L/usr/lib64/mysql" +else + CPPFLAGS="`mysql_config --cflags` $CPPFLAGS" + LDFLAGS="`mysql_config --libs` $LDFLAGS" +fi + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6 +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + +for ac_header in mysql/mysql.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------- ## +## Report this to systemtap@sources.redhat.com ## +## ------------------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + echo "$as_me:$LINENO: checking for mysql_init in -lmysqlclient" >&5 +echo $ECHO_N "checking for mysql_init in -lmysqlclient... $ECHO_C" >&6 +if test "${ac_cv_lib_mysqlclient_mysql_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmysqlclient $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char mysql_init (); +int +main () +{ +mysql_init (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_mysqlclient_mysql_init=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_mysqlclient_mysql_init=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlclient_mysql_init" >&5 +echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_init" >&6 +if test $ac_cv_lib_mysqlclient_mysql_init = yes; then + mysql=true +else + { echo "$as_me:$LINENO: *** Cannot find mysqlclient lib. Check your MySQL installation." >&5 +echo "$as_me: *** Cannot find mysqlclient lib. Check your MySQL installation." >&6;} +fi + +else + { echo "$as_me:$LINENO: *** Cannot find mysql header file. Check your MySQL installation." >&5 +echo "$as_me: *** Cannot find mysql header file. Check your MySQL installation." >&6;} +fi + +done + + + + +if test "$mysql" = "true"; then HAS_MYSQL_TRUE= HAS_MYSQL_FALSE='#' else @@ -5239,6 +5751,19 @@ else fi + +if test "$MYSQL_CONFIG" != "no"; then + HAS_MYSQL_CONFIG_TRUE= + HAS_MYSQL_CONFIG_FALSE='#' +else + HAS_MYSQL_CONFIG_TRUE='#' + HAS_MYSQL_CONFIG_FALSE= +fi + + +LDFLAGS=$SAVE_LDFLAGS +CPPFLAG=$SAVE_CPPFLAGS + if ! pkg-config --atleast-version 2.0.0 glib-2.0; then { echo "$as_me:$LINENO: WARNING: glib2-devel is required to build lket-b2a. no glib2-devel found, skip building lket-b2a..." >&5 @@ -5246,15 +5771,6 @@ 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 -echo "$as_me: WARNING: mysqlclient lib is required to build lket-b2a with database support. - no mysqlclient lib is found, skip building lket-b2a with database support..." >&2;} -fi - - if test $build_elfutils = no; then # Need libdwfl-capable recent elfutils from Fedora save_LIBS="$LIBS" @@ -5505,6 +6021,13 @@ echo "$as_me: error: conditional \"HAS_MYSQL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${HAS_MYSQL_CONFIG_TRUE}" && test -z "${HAS_MYSQL_CONFIG_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAS_MYSQL_CONFIG\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAS_MYSQL_CONFIG\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files @@ -6115,8 +6638,12 @@ s,@BUILD_ELFUTILS_TRUE@,$BUILD_ELFUTILS_TRUE,;t t s,@BUILD_ELFUTILS_FALSE@,$BUILD_ELFUTILS_FALSE,;t t s,@BUILD_LKET_B2A_TRUE@,$BUILD_LKET_B2A_TRUE,;t t s,@BUILD_LKET_B2A_FALSE@,$BUILD_LKET_B2A_FALSE,;t t +s,@MYSQL_CONFIG@,$MYSQL_CONFIG,;t t +s,@CXXCPP@,$CXXCPP,;t t s,@HAS_MYSQL_TRUE@,$HAS_MYSQL_TRUE,;t t s,@HAS_MYSQL_FALSE@,$HAS_MYSQL_FALSE,;t t +s,@HAS_MYSQL_CONFIG_TRUE@,$HAS_MYSQL_CONFIG_TRUE,;t t +s,@HAS_MYSQL_CONFIG_FALSE@,$HAS_MYSQL_CONFIG_FALSE,;t t s,@stap_LIBS@,$stap_LIBS,;t t s,@DATE@,$DATE,;t t s,@LIBOBJS@,$LIBOBJS,;t t diff --git a/configure.ac b/configure.ac index 8f2a0560..fb0287b9 100644 --- a/configure.ac +++ b/configure.ac @@ -61,23 +61,38 @@ esac]) AM_CONDITIONAL(BUILD_ELFUTILS, test $build_elfutils = yes) AM_CONDITIONAL(BUILD_LKET_B2A, pkg-config --atleast-version 2.0.0 glib-2.0) -# 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) +mysql=false + +SAVE_LDFLAGS=$LDFLAGS +SAVE_CPPFLAGS=$CPPFLAG + +AC_PATH_PROG(MYSQL_CONFIG, mysql_config, no) +if test "$MYSQL_CONFIG" = "no"; then + AC_MSG_NOTICE([*** Cannot find mysql_config executable. Check your MySQL installation.]) + CPPFLAGS="-I/usr/include/mysql $CPPFLAGS" + LDFLAGS="-L/usr/lib/mysql $LDFLAGS -L/usr/lib64/mysql" +else + CPPFLAGS="`mysql_config --cflags` $CPPFLAGS" + LDFLAGS="`mysql_config --libs` $LDFLAGS" +fi + +AC_CHECK_HEADERS(mysql/mysql.h, + AC_CHECK_LIB(mysqlclient, mysql_init, + mysql=true, + AC_MSG_NOTICE([*** Cannot find mysqlclient lib. Check your MySQL installation.]), []), + AC_MSG_NOTICE([*** Cannot find mysql header file. Check your MySQL installation.]), []) + +AM_CONDITIONAL(HAS_MYSQL, test "$mysql" = "true") +AM_CONDITIONAL(HAS_MYSQL_CONFIG, test "$MYSQL_CONFIG" != "no") + +LDFLAGS=$SAVE_LDFLAGS +CPPFLAG=$SAVE_CPPFLAGS 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...]) -fi - - if test $build_elfutils = no; then # Need libdwfl-capable recent elfutils from Fedora save_LIBS="$LIBS" diff --git a/runtime/lket/b2a/Makefile.am b/runtime/lket/b2a/Makefile.am index 1225ba95..01472f6a 100644 --- a/runtime/lket/b2a/Makefile.am +++ b/runtime/lket/b2a/Makefile.am @@ -5,7 +5,14 @@ lket_b2a_LDFLAGS = `pkg-config --libs glib-2.0` lket_b2a_CFLAGS = -O2 -D_GNU_SOURCE -Wall `pkg-config --cflags glib-2.0` if HAS_MYSQL +lket_b2a_CFLAGS += -DHAS_MYSQL +if HAS_MYSQL_CONFIG lket_b2a_LDFLAGS += `mysql_config --libs` lket_b2a_CFLAGS += `mysql_config --cflags` -lket_b2a_CFLAGS += -DHAS_MYSQL +else +lket_b2a_CFLAGS += -I/usr/include/mysql -g -pipe -fsigned-char -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing +lket_b2a_LDFLAGS += -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib -lssl -lcrypto +endif endif + + diff --git a/runtime/lket/b2a/Makefile.in b/runtime/lket/b2a/Makefile.in index 81765acd..c4eb730f 100644 --- a/runtime/lket/b2a/Makefile.in +++ b/runtime/lket/b2a/Makefile.in @@ -35,8 +35,11 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = lket-b2a$(EXEEXT) -@HAS_MYSQL_TRUE@am__append_1 = `mysql_config --libs` -@HAS_MYSQL_TRUE@am__append_2 = `mysql_config --cflags` -DHAS_MYSQL +@HAS_MYSQL_TRUE@am__append_1 = -DHAS_MYSQL +@HAS_MYSQL_CONFIG_TRUE@@HAS_MYSQL_TRUE@am__append_2 = `mysql_config --libs` +@HAS_MYSQL_CONFIG_TRUE@@HAS_MYSQL_TRUE@am__append_3 = `mysql_config --cflags` +@HAS_MYSQL_CONFIG_FALSE@@HAS_MYSQL_TRUE@am__append_4 = -I/usr/include/mysql -g -pipe -fsigned-char -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing +@HAS_MYSQL_CONFIG_FALSE@@HAS_MYSQL_TRUE@am__append_5 = -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib -lssl -lcrypto subdir = runtime/lket/b2a DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -82,6 +85,7 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -93,6 +97,8 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +HAS_MYSQL_CONFIG_FALSE = @HAS_MYSQL_CONFIG_FALSE@ +HAS_MYSQL_CONFIG_TRUE = @HAS_MYSQL_CONFIG_TRUE@ HAS_MYSQL_FALSE = @HAS_MYSQL_FALSE@ HAS_MYSQL_TRUE = @HAS_MYSQL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ @@ -108,6 +114,7 @@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MYSQL_CONFIG = @MYSQL_CONFIG@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -158,9 +165,10 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ lket_b2a_SOURCES = lket_b2a.c lket_b2a_DEPENDENCIES = lket_b2a.h -lket_b2a_LDFLAGS = `pkg-config --libs glib-2.0` $(am__append_1) +lket_b2a_LDFLAGS = `pkg-config --libs glib-2.0` $(am__append_2) \ + $(am__append_5) lket_b2a_CFLAGS = -O2 -D_GNU_SOURCE -Wall `pkg-config --cflags \ - glib-2.0` $(am__append_2) + glib-2.0` $(am__append_1) $(am__append_3) $(am__append_4) all: all-am .SUFFIXES: diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in index 88f4054a..e40a6139 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -69,6 +69,7 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ +CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ @@ -80,6 +81,8 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +HAS_MYSQL_CONFIG_FALSE = @HAS_MYSQL_CONFIG_FALSE@ +HAS_MYSQL_CONFIG_TRUE = @HAS_MYSQL_CONFIG_TRUE@ HAS_MYSQL_FALSE = @HAS_MYSQL_FALSE@ HAS_MYSQL_TRUE = @HAS_MYSQL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ @@ -95,6 +98,7 @@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MYSQL_CONFIG = @MYSQL_CONFIG@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ |