813 | | AC_PATH_PROG([PKG_CONFIG], [pkg-config]) |
814 | | if test "x$PKG_CONFIG" = "x" || ! $PKG_CONFIG --exists sqlite3; then |
815 | | # assume it's somewhere like /usr that needs no extra flags |
816 | | AC_CHECK_HEADER(sqlite3.h, [], [AC_MSG_ERROR([cannot find sqlite3 header])]) |
817 | | CFLAGS_SQLITE3="" |
818 | | LDFLAGS_SQLITE3="-lsqlite3" |
819 | | else |
820 | | CFLAGS_SQLITE3=$($PKG_CONFIG --cflags sqlite3) |
821 | | LDFLAGS_SQLITE3=$($PKG_CONFIG --libs sqlite3) |
822 | | # for tclsqlite below |
823 | | mp_sqlite3_dir=$($PKG_CONFIG --variable=prefix sqlite3) |
824 | | if test "x$mp_sqlite3_dir" != "x"; then |
825 | | mp_sqlite3_dir=${mp_sqlite3_dir}/lib/sqlite3 |
826 | | fi |
827 | | fi |
| 813 | # assume it's somewhere like /usr that needs no extra flags |
| 814 | AC_CHECK_HEADER(sqlite3.h, [],[ |
| 815 | AC_PATH_PROG([PKG_CONFIG], [pkg-config]) |
| 816 | if test "x$PKG_CONFIG" = "x" || ! $PKG_CONFIG --exists sqlite3; then |
| 817 | AC_MSG_ERROR([cannot find sqlite3 header]) |
| 818 | else |
| 819 | CFLAGS_SQLITE3=$($PKG_CONFIG --cflags sqlite3) |
| 820 | LDFLAGS_SQLITE3=$($PKG_CONFIG --libs sqlite3) |
| 821 | # for tclsqlite below |
| 822 | mp_sqlite3_dir=$($PKG_CONFIG --variable=prefix sqlite3) |
| 823 | if test "x$mp_sqlite3_dir" != "x"; then |
| 824 | mp_sqlite3_dir=${mp_sqlite3_dir}/lib/sqlite3 |
| 825 | fi |
| 826 | fi |
| 827 | ]) |
| 828 | if test "x$CFLAGS_SQLITE3" = "x"; then |
| 829 | CFLAGS_SQLITE3="" |
| 830 | LDFLAGS_SQLITE3="-lsqlite3" |
| 831 | fi |