diff --git a/src/modules/Odbc/configure.in b/src/modules/Odbc/configure.in index b54dd9c6aeca30f297bc14eed4be4e2ee650740b..3d96a70ec5345f4873c3140d295e3a5236a8bc2a 100644 --- a/src/modules/Odbc/configure.in +++ b/src/modules/Odbc/configure.in @@ -1,5 +1,5 @@ # -# $Id: configure.in,v 1.17 1999/03/28 17:50:00 marcus Exp $ +# $Id: configure.in,v 1.18 2000/08/29 23:30:58 grubba Exp $ # # Configure script for the odbc-module # @@ -202,6 +202,43 @@ so that libodbc.so finds the appropriate files. EOF + AC_CHECKING(if the typedef SQLLEN exists.) + AC_CACHE_VAL(pike_cv_have_SQLLEN, [ + AC_TRY_COMPILE([ +#ifdef HAVE_ISQL_H +#include <isql.h> +#else /* !HAVE_ISQL_H */ +#ifdef HAVE_WINDOWS_H +#include <windows.h> +#else /* !HAVE_WINDOWS_H */ +#ifdef HAVE_QEODBC_H +#include <qeodbc.h> +#endif /* HAVE_QEODBC_H */ +#endif /* HAVE_WINDOWS_H */ +#endif /* HAVE_ISQL_H */ +#endif /* HAVE_ODBC */ +#ifndef HAVE_ISQL_H +#ifdef HAVE_SQL_H +#include <sql.h> +#endif /* HAVE_SQL_H */ +#endif /* !HAVE_ISQL_H */ +#ifdef HAVE_ISQLEXT_H +#include <isqlext.h> +#else /* !HAVE_ISQLEXT_H */ +#ifdef HAVE_SQLEXT_H +#include <sqlext.h> +#endif /* HAVE_SQLEXT_H */ +#endif /* HAVE_ISQLEXT_H */ + ], [ + SQLLEN len = 17; + ], [ pike_cv_have_SQLLEN=yes ], [ pike_cv_have_SQLLEN=no ]) + ]) + if test "x$pike_cv_have_SQLLEN" = "xyes"; then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SQLLEN) + else + AC_MSG_RESULT(no - try using SQLINTEGER) + fi fi fi else