From e167cdfa4c1ea5ea297248384cb465704d064d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Wed, 9 Jul 2014 12:52:55 -0500 Subject: [PATCH] more config fixes, this time check again for mysql, but in the rifht place. --- config.h.in | 3 +++ configure | 24 +++++++++++++++++++----- packages/myddas/configure.in | 3 ++- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/config.h.in b/config.h.in index 8046c0d00..cfb3113f7 100644 --- a/config.h.in +++ b/config.h.in @@ -477,6 +477,9 @@ /* Older versions of MPZ didn't have XOR */ #undef HAVE_MPZ_XOR +/* Define to 1 if you have the header file. */ +#undef HAVE_MYSQL_MYSQL_H + /* Define to 1 if you have the `nanosleep' function. */ #undef HAVE_NANOSLEEP diff --git a/configure b/configure index cf8547c88..7cb4160ec 100755 --- a/configure +++ b/configure @@ -10116,6 +10116,20 @@ else yap_cv_mysql="no" fi + for ac_header in mysql/mysql.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "mysql/mysql.h" "ac_cv_header_mysql_mysql_h" "$ac_includes_default" +if test "x$ac_cv_header_mysql_mysql_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MYSQL_MYSQL_H 1 +_ACEOF + +else + yap_cv_mysql="no" +fi + +done + if test "$yap_cv_mysql" = yes then YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_MYSQL" @@ -10273,7 +10287,7 @@ if test "x$ac_cv_header_sql_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SQL_H 1 _ACEOF - yap_cv_odbc="yes" + else yap_cv_odbc="no" fi @@ -13250,7 +13264,7 @@ else JAVA_TEST=Test.java CLASS_TEST=Test.class cat << \EOF > $JAVA_TEST -/* #line 13253 "configure" */ +/* #line 13267 "configure" */ public class Test { } EOF @@ -13426,7 +13440,7 @@ EOF if uudecode$EXEEXT Test.uue; then ac_cv_prog_uudecode_base64=yes else - echo "configure: 13429: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 + echo "configure: 13443: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 echo "configure: failed file was:" >&5 cat Test.uue >&5 ac_cv_prog_uudecode_base64=no @@ -13557,7 +13571,7 @@ else JAVA_TEST=Test.java CLASS_TEST=Test.class cat << \EOF > $JAVA_TEST -/* #line 13560 "configure" */ +/* #line 13574 "configure" */ public class Test { } EOF @@ -13592,7 +13606,7 @@ JAVA_TEST=Test.java CLASS_TEST=Test.class TEST=Test cat << \EOF > $JAVA_TEST -/* [#]line 13595 "configure" */ +/* [#]line 13609 "configure" */ public class Test { public static void main (String args[]) { System.exit (0); diff --git a/packages/myddas/configure.in b/packages/myddas/configure.in index 4a044ef1c..371c9d79f 100644 --- a/packages/myddas/configure.in +++ b/packages/myddas/configure.in @@ -37,6 +37,7 @@ then PKG_MYDDAS="packages/myddas" dnl check for mysql AC_SEARCH_LIBS(mysql_init, [mysqlclient], [yap_cv_mysql="yes"], [yap_cv_mysql="no"]) + AC_CHECK_HEADERS(mysql/mysql.h, [], [yap_cv_mysql="no"]) if test "$yap_cv_mysql" = yes then YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_MYSQL" @@ -63,7 +64,7 @@ then fi #from SWI ODBC library. AC_CHECK_HEADERS(windef.h) - AC_CHECK_HEADERS(sql.h, [yap_cv_odbc="yes"], [yap_cv_odbc="no"]) + AC_CHECK_HEADERS(sql.h, [ ], [yap_cv_odbc="no"]) if test "$yap_cv_odbc" = yes then YAP_EXTRAS="$YAP_EXTRAS -DMYDDAS_ODBC"