Changes between Version 2 and Version 3 of Ticket #63074, comment 8


Ignore:
Timestamp:
Jun 23, 2021, 3:03:45 PM (3 years ago)
Author:
mojca (Mojca Miklavec)
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #63074, comment 8

    v2 v3  
    6767
    6868You can easily verify the behaviour easily by using any `gcc-mp-X` on macOS.
     69
     70The following code seems weird to me:
     71{{{
     72        AC_CACHE_VAL([mp_cv_sqlite_version], [
     73                AC_PREPROC_IFELSE(
     74                        [AC_LANG_SOURCE(
     75                                [[
     76                                        #include <sqlite3.h>
     77                                        #ifndef SQLITE_VERSION_NUMBER
     78                                        #  error "SQLITE_VERSION_NUMBER undefined"
     79                                        #else
     80                                        int mp_sqlite_version = SQLITE_VERSION_NUMBER;
     81                                        #endif
     82                                ]]
     83                        )],
     84                        [mp_cv_sqlite_version=`grep '^[[[:space:]]]*int mp_sqlite_version = [[0-9]]*;$' conftest.i | sed -E 's/[[^0-9]]*([[0-9]]+);/\1/'`],
     85                        [AC_MSG_ERROR("SQLITE_VERSION_NUMBER undefined or sqlite3.h not found")]
     86                )
     87        ])
     88}}}
     89I'm pretty sure that we could replace the preprocessor followed by `grep` by printing something to the output and using that.