Christian Heimes <[email protected]> added the comment:
Your solution looks very similar to my WIP patch:
AC_CHECK_HEADERS([sqlite3.h],
[AC_SEARCH_LIBS([sqlite3_version], [sqlite3])]
)
AS_VAR_IF([ac_cv_search_sqlite3_version], [no], [], [
# found a working sqlite3.h and sqlite3 library
# ac_cv_search_sqlite3_version != no
LIBS="$LIBS $ac_cv_search_sqlite3_version"
AC_CACHE_CHECK([for sqlite3 version >= 3.7.15],
[ac_cv_lib_sqlite3_supported], [
AC_LINK_IFELSE([
AC_LANG_PROGRAM([
#include <sqlite3.h>
#if SQLITE_VERSION_NUMBER < 3007015
#error "sqlite version is too old"
#endif], []
)
], [ac_cv_lib_sqlite3_supported=yes], [ac_cv_lib_sqlite3_supported=no])
])
AC_CACHE_CHECK([for sqlite3_enable_load_extension],
[ac_cv_lib_sqlite3_sqlite3_enable_load_extension], [
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <sqlite3.h>], [void *x =
sqlite3_enable_load_extension])],
[ac_cv_lib_sqlite3_sqlite3_enable_load_extension=yes],
[ac_cv_lib_sqlite3_sqlite3_enable_load_extension=no])
])
])
LIBS=$LIBS_SAVE
AS_VAR_IF([ac_cv_lib_sqlite3_supported], [yes],
[AC_DEFINE([HAVE_LIBSQLITE3], [1], [Define to 1 if you have the `sqlite3'
library (-lsqlite3).])]
)
AS_VAR_IF([ac_cv_lib_sqlite3_sqlite3_enable_load_extension], [yes],
[AC_DEFINE([HAVE_SQLITE3_ENABLE_LOAD_EXTENSION], [1],
[Define to 1 if `sqlite3' library supports
sqlite3_enable_load_extension.])]
)
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue45774>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com