mirror of
https://github.com/matrix-construct/construct
synced 2024-12-03 04:02:47 +01:00
configure: fix linking with shared sqlite on *BSD
This commit is contained in:
parent
a6ef3156ec
commit
cf1001a739
2 changed files with 44 additions and 10 deletions
23
configure
vendored
23
configure
vendored
|
@ -7259,6 +7259,17 @@ fi
|
||||||
|
|
||||||
if test "$shared_sqlite" = yes; then
|
if test "$shared_sqlite" = yes; then
|
||||||
|
|
||||||
|
saveCPPFLAGS="$CPPFLAGS"
|
||||||
|
saveLIBS="$LIBS"
|
||||||
|
|
||||||
|
OSNAME=`uname -s`
|
||||||
|
case $OSNAME in
|
||||||
|
*BSD)
|
||||||
|
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
|
||||||
|
LIBS="$LIBS -L/usr/local/lib"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
|
ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default"
|
||||||
if test "x$ac_cv_header_sqlite3_h" = xyes; then :
|
if test "x$ac_cv_header_sqlite3_h" = xyes; then :
|
||||||
|
|
||||||
|
@ -7300,8 +7311,7 @@ fi
|
||||||
$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
|
$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
|
||||||
if test "x$ac_cv_lib_sqlite3_sqlite3_open" = xyes; then :
|
if test "x$ac_cv_lib_sqlite3_sqlite3_open" = xyes; then :
|
||||||
|
|
||||||
SQLITE_LD=-lsqlite3
|
SQLITE_LD="$CPPFLAGS $LIBS -lsqlite3"
|
||||||
|
|
||||||
|
|
||||||
else
|
else
|
||||||
shared_sqlite=no
|
shared_sqlite=no
|
||||||
|
@ -7317,11 +7327,16 @@ fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$shared_sqlite" = no; then
|
if test "$shared_sqlite" = no; then
|
||||||
SQLITE_SRC=sqlite3.c
|
SQLITE_SRC="sqlite3.c"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CPPFLAGS="$saveCPPFLAGS"
|
||||||
|
LIBS="$saveLIBS"
|
||||||
|
|
||||||
|
|
||||||
# Check whether --enable-ports was given.
|
# Check whether --enable-ports was given.
|
||||||
if test "${enable_ports+set}" = set; then :
|
if test "${enable_ports+set}" = set; then :
|
||||||
enableval=$enable_ports; if test $enableval = yes; then
|
enableval=$enable_ports; if test $enableval = yes; then
|
||||||
|
|
27
configure.ac
27
configure.ac
|
@ -564,25 +564,44 @@ AC_CHECK_HEADER(zlib.h, [
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl Check for shared sqlite
|
||||||
|
dnl ======================
|
||||||
AC_ARG_WITH(shared-sqlite,
|
AC_ARG_WITH(shared-sqlite,
|
||||||
AC_HELP_STRING([--with-shared-sqlite],[Use shared sqlite]),
|
AC_HELP_STRING([--with-shared-sqlite],[Use shared sqlite]),
|
||||||
[shared_sqlite=$withval],[shared_sqlite=no])
|
[shared_sqlite=$withval],[shared_sqlite=no])
|
||||||
|
|
||||||
if test "$shared_sqlite" = yes; then
|
if test "$shared_sqlite" = yes; then
|
||||||
|
|
||||||
|
saveCPPFLAGS="$CPPFLAGS"
|
||||||
|
saveLIBS="$LIBS"
|
||||||
|
|
||||||
|
dnl XXX: *BSD uses /usr/local for shared sqlite libs and includes
|
||||||
|
OSNAME=`uname -s`
|
||||||
|
case $OSNAME in
|
||||||
|
*BSD)
|
||||||
|
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
|
||||||
|
LIBS="$LIBS -L/usr/local/lib"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
AC_CHECK_HEADER(sqlite3.h, [
|
AC_CHECK_HEADER(sqlite3.h, [
|
||||||
AC_CHECK_LIB(sqlite3, sqlite3_open,
|
AC_CHECK_LIB(sqlite3, sqlite3_open, [
|
||||||
[
|
SQLITE_LD="$CPPFLAGS $LIBS -lsqlite3"
|
||||||
AC_SUBST(SQLITE_LD, -lsqlite3)
|
|
||||||
], shared_sqlite=no)
|
], shared_sqlite=no)
|
||||||
], shared_sqlite=no)
|
], shared_sqlite=no)
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$shared_sqlite" = no; then
|
if test "$shared_sqlite" = no; then
|
||||||
AC_SUBST(SQLITE_SRC, sqlite3.c)
|
SQLITE_SRC="sqlite3.c"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_SUBST(SQLITE_LD)
|
||||||
|
AC_SUBST(SQLITE_SRC)
|
||||||
|
|
||||||
|
CPPFLAGS="$saveCPPFLAGS"
|
||||||
|
LIBS="$saveLIBS"
|
||||||
|
|
||||||
dnl IO Loop Selection
|
dnl IO Loop Selection
|
||||||
dnl =================
|
dnl =================
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue