forked from mirrors/linphone-iphone
Enable detection of SQLite3 without PKG_CONFIG
This commit is contained in:
parent
51a5189c76
commit
1ffb06aecc
1 changed files with 18 additions and 10 deletions
28
configure.ac
28
configure.ac
|
|
@ -767,23 +767,31 @@ AC_ARG_ENABLE(msg-storage,
|
|||
[enable_msg_storage=auto]
|
||||
)
|
||||
|
||||
|
||||
AM_CONDITIONAL(BUILD_MSG_STORAGE, test x$enable_msg_storage = xtrue)
|
||||
|
||||
if test x$enable_msg_storage != xfalse; then
|
||||
PKG_CHECK_MODULES(SQLITE3,[ sqlite3 >= 3.6.0],[
|
||||
PKG_CHECK_MODULES(SQLITE3,[sqlite3 >= 3.6.0],[found_sqlite=yes],[found_sqlite=no])
|
||||
if test "$found_sqlite" = "no"; then
|
||||
dnl Check the lib presence in case the PKG-CONFIG version is not found
|
||||
AC_CHECK_LIB(sqlite3, sqlite3_open, [SQLITE3_LIBS+=" -lsqlite3 "
|
||||
found_sqlite=yes],
|
||||
[AC_MSG_ERROR([No pkg-config or alternate SQLITE found, needed for message storage.])]
|
||||
)
|
||||
fi
|
||||
if test "$found_sqlite" = "yes"; then
|
||||
SQLITE3_CFLAGS+="-DMSG_STORAGE_ENABLED"
|
||||
AC_SUBST(SQLITE3_CFLAGS)
|
||||
AC_SUBST(SQLITE3_LIBS)
|
||||
enable_msg_storage=true
|
||||
],[
|
||||
if test x$enable_msg_storage = xtrue; then
|
||||
AC_MSG_ERROR([sqlite3 required for message storage not found.])
|
||||
else
|
||||
if test x$enable_msg_storage = xtrue; then
|
||||
AC_MSG_ERROR([sqlite3, required for message storage, not found])
|
||||
enable_msg_storage=false
|
||||
fi
|
||||
enable_msg_storage=false
|
||||
] )
|
||||
fi
|
||||
|
||||
AC_SUBST(SQLITE3_CFLAGS)
|
||||
AC_SUBST(SQLITE3_LIBS)
|
||||
fi
|
||||
|
||||
|
||||
|
||||
PKG_CHECK_MODULES(BELLESIP, [belle-sip >= 1.3.1])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue