| 69 | |
| 70 | The 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 | }}} |
| 89 | I'm pretty sure that we could replace the preprocessor followed by `grep` by printing something to the output and using that. |