77 |
slirp="yes" |
slirp="yes" |
78 |
adlib="no" |
adlib="no" |
79 |
oss="no" |
oss="no" |
80 |
|
dsound="no" |
81 |
|
coreaudio="no" |
82 |
|
alsa="no" |
83 |
fmod="no" |
fmod="no" |
84 |
fmod_lib="" |
fmod_lib="" |
85 |
fmod_inc="" |
fmod_inc="" |
118 |
bsd="yes" |
bsd="yes" |
119 |
darwin="yes" |
darwin="yes" |
120 |
;; |
;; |
121 |
*) |
*) |
122 |
oss="yes" |
oss="yes" |
123 |
linux="yes" |
linux="yes" |
124 |
if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then |
if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then |
134 |
fi |
fi |
135 |
|
|
136 |
# find source path |
# find source path |
137 |
# XXX: we assume an absolute path is given when launching configure, |
# XXX: we assume an absolute path is given when launching configure, |
138 |
# except in './configure' case. |
# except in './configure' case. |
139 |
source_path=${0%configure} |
source_path=${0%configure} |
140 |
source_path=${source_path%/} |
source_path=${source_path%/} |
174 |
;; |
;; |
175 |
--disable-sdl) sdl="no" |
--disable-sdl) sdl="no" |
176 |
;; |
;; |
177 |
|
--enable-coreaudio) coreaudio="yes" |
178 |
|
;; |
179 |
|
--enable-alsa) alsa="yes" |
180 |
|
;; |
181 |
|
--enable-dsound) dsound="yes" |
182 |
|
;; |
183 |
--enable-fmod) fmod="yes" |
--enable-fmod) fmod="yes" |
184 |
;; |
;; |
185 |
--fmod-lib=*) fmod_lib=${opt#--fmod-lib=} |
--fmod-lib=*) fmod_lib=${opt#--fmod-lib=} |
187 |
--fmod-inc=*) fmod_inc=${opt#--fmod-inc=} |
--fmod-inc=*) fmod_inc=${opt#--fmod-inc=} |
188 |
;; |
;; |
189 |
--enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-" |
--enable-mingw32) mingw32="yes" ; cross_prefix="i386-mingw32-" |
190 |
;; |
;; |
191 |
--disable-slirp) slirp="no" |
--disable-slirp) slirp="no" |
192 |
;; |
;; |
193 |
--enable-adlib) adlib="yes" |
--enable-adlib) adlib="yes" |
194 |
;; |
;; |
195 |
--disable-kqemu) kqemu="no" |
--disable-kqemu) kqemu="no" |
196 |
;; |
;; |
197 |
--kernel-path=*) kernel_path=${opt#--kernel-path=} |
--kernel-path=*) kernel_path=${opt#--kernel-path=} |
198 |
;; |
;; |
199 |
--enable-cocoa) cocoa="yes" ; sdl="no" |
--enable-cocoa) cocoa="yes" ; coreaudio="yes" ; sdl="no" |
200 |
;; |
;; |
201 |
--disable-gfx-check) check_gfx="no" |
--disable-gfx-check) check_gfx="no" |
202 |
;; |
;; |
203 |
esac |
esac |
240 |
cat > $TMPC << EOF |
cat > $TMPC << EOF |
241 |
#include <inttypes.h> |
#include <inttypes.h> |
242 |
int main(int argc, char ** argv){ |
int main(int argc, char ** argv){ |
243 |
volatile uint32_t i=0x01234567; |
volatile uint32_t i=0x01234567; |
244 |
return (*((uint8_t*)(&i))) == 0x67; |
return (*((uint8_t*)(&i))) == 0x67; |
245 |
} |
} |
246 |
EOF |
EOF |
247 |
|
|
355 |
echo " --static enable static build [$static]" |
echo " --static enable static build [$static]" |
356 |
echo " --enable-mingw32 enable Win32 cross compilation with mingw32" |
echo " --enable-mingw32 enable Win32 cross compilation with mingw32" |
357 |
echo " --enable-adlib enable Adlib emulation" |
echo " --enable-adlib enable Adlib emulation" |
358 |
echo " --enable-fmod enable FMOD audio output driver" |
echo " --enable-coreaudio enable Coreaudio audio driver" |
359 |
|
echo " --enable-alsa enable ALSA audio driver" |
360 |
|
echo " --enable-fmod enable FMOD audio driver" |
361 |
|
echo " --enabled-dsound enable DirectSound audio driver" |
362 |
echo " --fmod-lib path to FMOD library" |
echo " --fmod-lib path to FMOD library" |
363 |
echo " --fmod-inc path to FMOD includes" |
echo " --fmod-inc path to FMOD includes" |
364 |
echo "" |
echo "" |
387 |
# kqemu support |
# kqemu support |
388 |
if test $kqemu = "yes" ; then |
if test $kqemu = "yes" ; then |
389 |
# test if the source code is installed |
# test if the source code is installed |
390 |
if test '!' -f "kqemu/Makefile" ; then |
if test '!' -f "kqemu/Makefile" ; then |
391 |
kqemu="no" |
kqemu="no" |
392 |
fi |
fi |
393 |
fi |
fi |
394 |
|
|
395 |
# Linux specific kqemu configuration |
# Linux specific kqemu configuration |
396 |
if test $kqemu = "yes" -a $linux = "yes" ; then |
if test $kqemu = "yes" -a $linux = "yes" ; then |
397 |
# find the kernel path |
# find the kernel path |
398 |
if test -z "$kernel_path" ; then |
if test -z "$kernel_path" ; then |
399 |
kernel_version=`uname -r` |
kernel_version=`uname -r` |
400 |
kernel_path="/lib/modules/$kernel_version/build" |
kernel_path="/lib/modules/$kernel_version/build" |
401 |
if test '!' -d "$kernel_path/include" ; then |
if test '!' -d "$kernel_path/include" ; then |
402 |
kernel_path="/usr/src/linux" |
kernel_path="/usr/src/linux" |
403 |
if test '!' -d "$kernel_path/include" ; then |
if test '!' -d "$kernel_path/include" ; then |
404 |
echo "Could not find kernel includes in /lib/modules or /usr/src/linux - cannot build the kqemu module" |
echo "Could not find kernel includes in /lib/modules or /usr/src/linux - cannot build the kqemu module" |
405 |
kqemu="no" |
kqemu="no" |
406 |
fi |
fi |
413 |
if test '!' -f "$kernel_path/Makefile" ; then |
if test '!' -f "$kernel_path/Makefile" ; then |
414 |
echo "No Makefile file present in $kernel_path - kqemu cannot be built" |
echo "No Makefile file present in $kernel_path - kqemu cannot be built" |
415 |
kqemu="no" |
kqemu="no" |
416 |
fi |
fi |
417 |
|
|
418 |
# find build system (2.6 or legacy) |
# find build system (2.6 or legacy) |
419 |
kbuild26="yes" |
kbuild26="yes" |
451 |
fi |
fi |
452 |
echo "mingw32 support $mingw32" |
echo "mingw32 support $mingw32" |
453 |
echo "Adlib support $adlib" |
echo "Adlib support $adlib" |
454 |
|
echo "CoreAudio support $coreaudio" |
455 |
|
echo "ALSA support $alsa" |
456 |
|
echo "DSound support $dsound" |
457 |
echo -n "FMOD support $fmod" |
echo -n "FMOD support $fmod" |
458 |
if test $fmod = "yes"; then |
if test "$fmod" = "yes"; then |
459 |
|
if test -z $fmod_lib || test -z $fmod_inc; then |
460 |
|
echo |
461 |
|
echo "Error: You must specify path to FMOD library and headers" |
462 |
|
echo "Example: --fmod-inc=/path/include/fmod --fmod-lib=/path/lib/libfmod-3.74.so" |
463 |
|
echo |
464 |
|
exit 1 |
465 |
|
fi |
466 |
echo -n " (lib='$fmod_lib' include='$fmod_inc')" |
echo -n " (lib='$fmod_lib' include='$fmod_inc')" |
467 |
fi |
fi |
468 |
echo "" |
echo "" |
590 |
echo "CONFIG_OSS=yes" >> $config_mak |
echo "CONFIG_OSS=yes" >> $config_mak |
591 |
echo "#define CONFIG_OSS 1" >> $config_h |
echo "#define CONFIG_OSS 1" >> $config_h |
592 |
fi |
fi |
593 |
|
if test "$coreaudio" = "yes" ; then |
594 |
|
echo "CONFIG_COREAUDIO=yes" >> $config_mak |
595 |
|
echo "#define CONFIG_COREAUDIO 1" >> $config_h |
596 |
|
fi |
597 |
|
if test "$alsa" = "yes" ; then |
598 |
|
echo "CONFIG_ALSA=yes" >> $config_mak |
599 |
|
echo "#define CONFIG_ALSA 1" >> $config_h |
600 |
|
fi |
601 |
|
if test "$dsound" = "yes" ; then |
602 |
|
echo "CONFIG_DSOUND=yes" >> $config_mak |
603 |
|
echo "#define CONFIG_DSOUND 1" >> $config_h |
604 |
|
fi |
605 |
if test "$fmod" = "yes" ; then |
if test "$fmod" = "yes" ; then |
606 |
echo "CONFIG_FMOD=yes" >> $config_mak |
echo "CONFIG_FMOD=yes" >> $config_mak |
607 |
echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak |
echo "CONFIG_FMOD_LIB=$fmod_lib" >> $config_mak |
634 |
echo "#define _BSD 1" >> $config_h |
echo "#define _BSD 1" >> $config_h |
635 |
fi |
fi |
636 |
|
|
637 |
for target in $target_list; do |
for target in $target_list; do |
638 |
|
|
639 |
target_dir="$target" |
target_dir="$target" |
640 |
config_mak=$target_dir/config.mak |
config_mak=$target_dir/config.mak |
657 |
fi |
fi |
658 |
|
|
659 |
if test "$target_user_only" = "no" -a "$check_gfx" = "yes" \ |
if test "$target_user_only" = "no" -a "$check_gfx" = "yes" \ |
660 |
-a "$sdl" = "no" -a "$cocoa" = "no" ; then |
-a "$sdl" = "no" -a "$cocoa" = "no" ; then |
661 |
echo "ERROR: QEMU requires SDL or Cocoa for graphical output" |
echo "ERROR: QEMU requires SDL or Cocoa for graphical output" |
662 |
echo "To build QEMU with graphical output configure with --disable-gfx-check" |
echo "To build QEMU with graphical output configure with --disable-gfx-check" |
663 |
echo "Note that this will disable all output from the virtual graphics card." |
echo "Note that this will disable all output from the virtual graphics card." |