This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients christian.heimes, erlendaasland
Date 2021-11-09.22:46:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1636498010.52.0.401098376238.issue45774@roundup.psfhosted.org>
In-reply-to
Content
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.])]
)
History
Date User Action Args
2021-11-09 22:46:50christian.heimessetrecipients: + christian.heimes, erlendaasland
2021-11-09 22:46:50christian.heimessetmessageid: <1636498010.52.0.401098376238.issue45774@roundup.psfhosted.org>
2021-11-09 22:46:50christian.heimeslinkissue45774 messages
2021-11-09 22:46:50christian.heimescreate