Enable static library linking for MinGW builds (#152)
This change allows to build Windows binaries without dependencies on toolchain-specific libraries (like `libc++.dll`). It allows to perform version updates by copying of single `bochs.exe`, without the need for searching and distribution of linked DLLs. --------- Co-authored-by: Volker Ruppert <Volker.Ruppert@t-online.de>
This commit is contained in:
parent
d9bee7d87a
commit
5147c20eaa
@ -18,6 +18,7 @@ export CXXFLAGS
|
||||
./configure --enable-sb16 \
|
||||
--enable-ne2000 \
|
||||
--enable-all-optimizations \
|
||||
--enable-static-link \
|
||||
--enable-cpu-level=6 \
|
||||
--enable-x86-64 \
|
||||
--enable-vmx=2 \
|
||||
|
@ -21,6 +21,7 @@ export DLLTOOL
|
||||
--enable-sb16 \
|
||||
--enable-ne2000 \
|
||||
--enable-all-optimizations \
|
||||
--enable-static-link \
|
||||
--enable-cpu-level=6 \
|
||||
--enable-x86-64 \
|
||||
--enable-vmx=2 \
|
||||
|
71
bochs/configure
vendored
71
bochs/configure
vendored
@ -1028,6 +1028,7 @@ SHELL'
|
||||
ac_subst_files=''
|
||||
ac_user_opts='
|
||||
enable_option_checking
|
||||
enable_static_link
|
||||
enable_static
|
||||
enable_shared
|
||||
enable_fast_install
|
||||
@ -1751,6 +1752,7 @@ Optional Features:
|
||||
--disable-option-checking ignore unrecognized --enable/--with options
|
||||
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||
--enable-static-link link libraries statically [default=disabled]
|
||||
--enable-static[=PKGS] build static libraries [default=no]
|
||||
--enable-shared[=PKGS] build shared libraries [default=yes]
|
||||
--enable-fast-install[=PKGS]
|
||||
@ -3937,6 +3939,16 @@ printf "%s\n" "no" >&6; }
|
||||
cross_configure=0
|
||||
fi
|
||||
|
||||
# Check whether --enable-static-link was given.
|
||||
if test ${enable_static_link+y}
|
||||
then :
|
||||
enableval=$enable_static_link; enable_static_link="$enableval"
|
||||
else $as_nop
|
||||
enable_static_link=no
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# this case statement defines the compile flags which are needed to
|
||||
# compile bochs on a platform. Don't put things like optimization settings
|
||||
# into the configure.in file, since people will want to be able to change
|
||||
@ -3963,6 +3975,9 @@ case "$target" in
|
||||
;;
|
||||
*-cygwin* | *-mingw32* | *-msys)
|
||||
NO_LT=1 # do not use libtool at all
|
||||
if test "$enable_static_link" = yes; then
|
||||
EXTRA_LINK_OPTS="${EXTRA_LINK_OPTS} -static"
|
||||
fi
|
||||
if test "$with_term" = yes; then
|
||||
# ncurses won't compile with -DWIN32
|
||||
# also, I can't get it to link without this -DBROKEN_LINKER=1 hack.
|
||||
@ -6146,7 +6161,7 @@ ia64-*-hpux*)
|
||||
;;
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '#line 6149 "configure"' > conftest.$ac_ext
|
||||
echo '#line 6164 "configure"' > conftest.$ac_ext
|
||||
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
@ -7643,11 +7658,11 @@ else $as_nop
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:7646: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:7661: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:7650: \$? = $ac_status" >&5
|
||||
echo "$as_me:7665: \$? = $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
|
||||
@ -7877,11 +7892,11 @@ else $as_nop
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:7880: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:7895: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:7884: \$? = $ac_status" >&5
|
||||
echo "$as_me:7899: \$? = $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
|
||||
@ -7945,11 +7960,11 @@ else $as_nop
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:7948: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:7963: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:7952: \$? = $ac_status" >&5
|
||||
echo "$as_me:7967: \$? = $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
|
||||
@ -9770,7 +9785,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 9773 "configure"
|
||||
#line 9788 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -9865,7 +9880,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 9868 "configure"
|
||||
#line 9883 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -11983,11 +11998,11 @@ else $as_nop
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:11986: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:12001: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:11990: \$? = $ac_status" >&5
|
||||
echo "$as_me:12005: \$? = $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
|
||||
@ -12051,11 +12066,11 @@ else $as_nop
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:12054: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:12069: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:12058: \$? = $ac_status" >&5
|
||||
echo "$as_me:12073: \$? = $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
|
||||
@ -13074,7 +13089,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 13077 "configure"
|
||||
#line 13092 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -13169,7 +13184,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 13172 "configure"
|
||||
#line 13187 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -13989,11 +14004,11 @@ else $as_nop
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:13992: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:14007: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:13996: \$? = $ac_status" >&5
|
||||
echo "$as_me:14011: \$? = $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
|
||||
@ -14057,11 +14072,11 @@ else $as_nop
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:14060: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:14075: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:14064: \$? = $ac_status" >&5
|
||||
echo "$as_me:14079: \$? = $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
|
||||
@ -16025,11 +16040,11 @@ else $as_nop
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:16028: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:16043: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:16032: \$? = $ac_status" >&5
|
||||
echo "$as_me:16047: \$? = $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
|
||||
@ -16259,11 +16274,11 @@ else $as_nop
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:16262: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:16277: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:16266: \$? = $ac_status" >&5
|
||||
echo "$as_me:16281: \$? = $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
|
||||
@ -16327,11 +16342,11 @@ else $as_nop
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:16330: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:16345: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:16334: \$? = $ac_status" >&5
|
||||
echo "$as_me:16349: \$? = $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
|
||||
@ -18152,7 +18167,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 18155 "configure"
|
||||
#line 18170 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -18247,7 +18262,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 18250 "configure"
|
||||
#line 18265 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -20053,7 +20068,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 20056 "configure"
|
||||
#line 20071 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -35,6 +35,13 @@ else
|
||||
cross_configure=0
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([static-link],
|
||||
[AS_HELP_STRING([--enable-static-link],
|
||||
[link libraries statically @<:@default=disabled@:>@])],
|
||||
[enable_static_link="$enableval"],
|
||||
[enable_static_link=no]
|
||||
)
|
||||
|
||||
# this case statement defines the compile flags which are needed to
|
||||
# compile bochs on a platform. Don't put things like optimization settings
|
||||
# into the configure.in file, since people will want to be able to change
|
||||
@ -59,6 +66,9 @@ case "$target" in
|
||||
;;
|
||||
*-cygwin* | *-mingw32* | *-msys)
|
||||
NO_LT=1 # do not use libtool at all
|
||||
if test "$enable_static_link" = yes; then
|
||||
EXTRA_LINK_OPTS="${EXTRA_LINK_OPTS} -static"
|
||||
fi
|
||||
if test "$with_term" = yes; then
|
||||
# ncurses won't compile with -DWIN32
|
||||
# also, I can't get it to link without this -DBROKEN_LINKER=1 hack.
|
||||
|
Loading…
x
Reference in New Issue
Block a user