@@ -246,8 +246,6 @@ default_cflags='-O2 -g'
246
246
git_submodules_action=" update"
247
247
docs=" auto"
248
248
EXESUF=" "
249
- prefix=" /usr/local"
250
- qemu_suffix=" qemu"
251
249
system=" yes"
252
250
linux_user=" "
253
251
bsd_user=" "
@@ -256,7 +254,6 @@ subdirs=""
256
254
ninja=" "
257
255
python=
258
256
download=" enabled"
259
- bindir=" bin"
260
257
skip_meson=no
261
258
use_containers=" yes"
262
259
gdb_bin=$( command -v " gdb-multiarch" || command -v " gdb" )
583
580
584
581
if test " $targetos " = " windows" ; then
585
582
EXESUF=" .exe"
586
- prefix=" /qemu"
587
- bindir=" "
588
- qemu_suffix=" "
589
583
fi
590
584
591
585
meson_option_build_array () {
@@ -622,15 +616,21 @@ meson_option_parse() {
622
616
fi
623
617
}
624
618
619
+ meson_add_machine_file () {
620
+ if test " $cross_compile " = " yes" ; then
621
+ meson_option_add --cross-file " $1 "
622
+ else
623
+ meson_option_add --native-file " $1 "
624
+ fi
625
+ }
626
+
625
627
for opt do
626
628
optarg=$( expr " x$opt " : ' x[^=]*=\(.*\)' )
627
629
case " $opt " in
628
630
--help|-h) show_help=yes
629
631
;;
630
632
--version|-V) exec cat " $source_path /VERSION"
631
633
;;
632
- --prefix=* ) prefix=" $optarg "
633
- ;;
634
634
--cross-prefix=* )
635
635
;;
636
636
--cc=* )
@@ -701,10 +701,6 @@ for opt do
701
701
;;
702
702
--static) static=" yes"
703
703
;;
704
- --bindir=* ) bindir=" $optarg "
705
- ;;
706
- --with-suffix=* ) qemu_suffix=" $optarg "
707
- ;;
708
704
--host=* |--build=* |\
709
705
--disable-dependency-tracking|\
710
706
--sbindir=* |--sharedstatedir=* |\
@@ -861,7 +857,6 @@ Options: [defaults in brackets after descriptions]
861
857
862
858
Standard options:
863
859
--help print this message
864
- --prefix=PREFIX install in PREFIX [$prefix ]
865
860
--target-list=LIST set target list (default: build all)
866
861
$( echo Available targets: $default_target_list | \
867
862
fold -s -w 53 | sed -e ' s/^/ /' )
@@ -886,8 +881,6 @@ Advanced options (experts only):
886
881
--ninja=NINJA use specified ninja [$ninja ]
887
882
--smbd=SMBD use specified smbd [$smbd ]
888
883
--static enable static build [$static ]
889
- --bindir=PATH install binaries in PATH
890
- --with-suffix=SUFFIX suffix for QEMU data inside datadir/libdir/sysconfdir/docdir [$qemu_suffix ]
891
884
--without-default-features default all --enable-* options to "disabled"
892
885
--without-default-devices do not include any device that is not needed to
893
886
start the emulator (only use if you are including
@@ -1803,24 +1796,25 @@ if test "$skip_meson" = no; then
1803
1796
else
1804
1797
echo " endian = 'little'" >> $cross
1805
1798
fi
1806
- cross_arg=" --cross-file config-meson.cross"
1807
1799
1808
1800
native=" config-meson.native.new"
1809
1801
echo " # Automatically generated by configure - do not modify" > $native
1810
1802
echo " [binaries]" >> $native
1811
1803
echo " c = [$( meson_quote $host_cc ) ]" >> $native
1812
1804
mv $native config-meson.native
1813
- cross_arg=" $cross_arg --native-file config-meson.native"
1814
- else
1815
- cross_arg=" --native-file config-meson.cross"
1805
+ meson_option_add --native-file
1806
+ meson_option_add config-meson.native
1816
1807
fi
1817
1808
mv $cross config-meson.cross
1809
+ meson_add_machine_file config-meson.cross
1810
+ if test -f " $source_path /configs/meson/$targetos .txt" ; then
1811
+ meson_add_machine_file $source_path /configs/meson/$targetos .txt
1812
+ fi
1818
1813
1819
1814
rm -rf meson-private meson-info meson-logs
1820
1815
1821
1816
# Built-in options
1822
1817
test " $download " = " disabled" && meson_option_add " --wrap-mode=nodownload"
1823
- test " $bindir " ! = " bin" && meson_option_add " -Dbindir=$bindir "
1824
1818
test " $default_feature " = no && meson_option_add -Dauto_features=disabled
1825
1819
test " $static " = yes && meson_option_add -Dprefer_static=true
1826
1820
test " $pie " = no && meson_option_add -Db_pie=false
@@ -1831,11 +1825,10 @@ if test "$skip_meson" = no; then
1831
1825
test " $docs " ! = auto && meson_option_add " -Ddocs=$docs "
1832
1826
test -n " ${LIB_FUZZING_ENGINE+xxx} " && meson_option_add " -Dfuzzing_engine=$LIB_FUZZING_ENGINE "
1833
1827
test " $plugins " = yes && meson_option_add " -Dplugins=true"
1834
- test " $qemu_suffix " ! = qemu && meson_option_add " -Dqemu_suffix=$qemu_suffix "
1835
1828
test " $smbd " ! = ' ' && meson_option_add " -Dsmbd=$smbd "
1836
1829
test " $tcg " ! = enabled && meson_option_add " -Dtcg=$tcg "
1837
1830
run_meson () {
1838
- NINJA=$ninja $meson setup --prefix " $prefix " " $@ " $cross_arg " $PWD " " $source_path "
1831
+ NINJA=$ninja $meson setup " $@ " " $PWD " " $source_path "
1839
1832
}
1840
1833
eval run_meson $meson_options
1841
1834
if test " $? " -ne 0 ; then
0 commit comments