mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Add --with-wasi-sdk=DIR flag to configure.ac. This mode compiles but fails to link the DLL because libtool is apparently hard-coded to gcc for the DLL.
FossilOrigin-Name: 39c9f441519d3b3c365c52293a73cdf4af86de639e0009170c27725aad6653f6
This commit is contained in:
88
configure
vendored
88
configure
vendored
@ -827,6 +827,7 @@ TEMP_STORE
|
||||
ALLOWRELEASE
|
||||
SQLITE_THREADSAFE
|
||||
BUILD_CC
|
||||
HAVE_WASI_SDK
|
||||
RELEASE
|
||||
VERSION
|
||||
program_prefix
|
||||
@ -919,6 +920,7 @@ enable_fast_install
|
||||
with_gnu_ld
|
||||
enable_libtool_lock
|
||||
enable_largefile
|
||||
with_wasi_sdk
|
||||
enable_threadsafe
|
||||
enable_releasemode
|
||||
enable_tempstore
|
||||
@ -1614,6 +1616,8 @@ Optional Packages:
|
||||
--with-pic try to use only PIC/non-PIC objects [default=use
|
||||
both]
|
||||
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
|
||||
--with-wasi-sdk=DIR directory containing the WASI SDK. Triggers
|
||||
cross-compile to WASM.
|
||||
--with-tcl=DIR directory containing tcl configuration
|
||||
(tclConfig.sh)
|
||||
--with-readline-lib specify readline library
|
||||
@ -4458,13 +4462,13 @@ then :
|
||||
else $as_nop
|
||||
lt_cv_nm_interface="BSD nm"
|
||||
echo "int some_variable = 0;" > conftest.$ac_ext
|
||||
(eval echo "\"\$as_me:4461: $ac_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:4465: $ac_compile\"" >&5)
|
||||
(eval "$ac_compile" 2>conftest.err)
|
||||
cat conftest.err >&5
|
||||
(eval echo "\"\$as_me:4464: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
|
||||
(eval echo "\"\$as_me:4468: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
|
||||
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
|
||||
cat conftest.err >&5
|
||||
(eval echo "\"\$as_me:4467: output\"" >&5)
|
||||
(eval echo "\"\$as_me:4471: output\"" >&5)
|
||||
cat conftest.out >&5
|
||||
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
|
||||
lt_cv_nm_interface="MS dumpbin"
|
||||
@ -5715,7 +5719,7 @@ ia64-*-hpux*)
|
||||
;;
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '#line 5718 "configure"' > conftest.$ac_ext
|
||||
echo '#line 5722 "configure"' > conftest.$ac_ext
|
||||
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
@ -7058,11 +7062,11 @@ else $as_nop
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:7061: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:7065: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:7065: \$? = $ac_status" >&5
|
||||
echo "$as_me:7069: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
@ -7398,11 +7402,11 @@ else $as_nop
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:7401: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:7405: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:7405: \$? = $ac_status" >&5
|
||||
echo "$as_me:7409: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
@ -7505,11 +7509,11 @@ else $as_nop
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:7508: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:7512: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:7512: \$? = $ac_status" >&5
|
||||
echo "$as_me:7516: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
@ -7561,11 +7565,11 @@ else $as_nop
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:7564: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:7568: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:7568: \$? = $ac_status" >&5
|
||||
echo "$as_me:7572: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
@ -9949,7 +9953,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 9952 "configure"
|
||||
#line 9956 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -10046,7 +10050,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 10049 "configure"
|
||||
#line 10053 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -10879,6 +10883,62 @@ RELEASE=`cat $srcdir/VERSION`
|
||||
printf "%s\n" "$as_me: Release set to $RELEASE" >&6;}
|
||||
|
||||
|
||||
##########
|
||||
# Handle --with-wasi-sdk=DIR
|
||||
#
|
||||
# This must be early because it changes the toolchain.
|
||||
#
|
||||
|
||||
# Check whether --with-wasi-sdk was given.
|
||||
if test ${with_wasi_sdk+y}
|
||||
then :
|
||||
withval=$with_wasi_sdk; with_wasisdk=${withval}
|
||||
fi
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for WASI SDK directory" >&5
|
||||
printf %s "checking for WASI SDK directory... " >&6; }
|
||||
if test ${ac_cv_c_wasi_sdk+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else $as_nop
|
||||
|
||||
# First check to see if --with-tcl was specified.
|
||||
if test x"${with_wasi_sdk}" != x ; then
|
||||
if ! test -d "${with_wasi_sdk}" ; then
|
||||
as_fn_error $? "${with_wasi_sdk} directory doesn't exist" "$LINENO" 5
|
||||
fi
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${with_wasi_sdk}: using wasi-sdk clang, disabling tcl, disabling sqlite3 CLI app" >&5
|
||||
printf "%s\n" "${with_wasi_sdk}: using wasi-sdk clang, disabling tcl, disabling sqlite3 CLI app" >&6; }
|
||||
use_wasi_sdk=yes
|
||||
else
|
||||
use_wasi_sdk=no
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if test "${use_wasi_sdk}" = "no" ; then
|
||||
HAVE_WASI_SDK=""
|
||||
else
|
||||
HAVE_WASI_SDK=1
|
||||
# Changing --host and --target have no effect here except to possibly
|
||||
# cause confusion. autoconf has finished processing them by this
|
||||
# point.
|
||||
#
|
||||
# host_alias=wasm32-wasi
|
||||
# target=wasm32-wasi
|
||||
#
|
||||
# Merely changing CC and LD to the wasi-sdk's is enough to get
|
||||
# sqlite3.o building in WASM format.
|
||||
CC="${with_wasi_sdk}/bin/clang"
|
||||
LD="${with_wasi_sdk}/bin/wasm-ld"
|
||||
cross_compiling=yes
|
||||
enable_threadsafe=no
|
||||
use_tcl=no
|
||||
enable_tcl=no
|
||||
fi
|
||||
|
||||
|
||||
|
||||
#########
|
||||
# Locate a compiler for the build machine. This compiler should
|
||||
# generate command-line programs that run on the build machine.
|
||||
|
Reference in New Issue
Block a user