Message406061
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.])]
) |
|
Date |
User |
Action |
Args |
2021-11-09 22:46:50 | christian.heimes | set | recipients:
+ christian.heimes, erlendaasland |
2021-11-09 22:46:50 | christian.heimes | set | messageid: <1636498010.52.0.401098376238.issue45774@roundup.psfhosted.org> |
2021-11-09 22:46:50 | christian.heimes | link | issue45774 messages |
2021-11-09 22:46:50 | christian.heimes | create | |
|