summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure143
1 files changed, 46 insertions, 97 deletions
diff --git a/configure b/configure
index eb74510940..70c41b0fad 100755
--- a/configure
+++ b/configure
@@ -546,7 +546,7 @@ Haiku)
if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
audio_possible_drivers="$audio_possible_drivers fmod"
fi
- QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers $QEMU_INCLUDES"
+ QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers -I$(pwd)/linux-headers $QEMU_INCLUDES"
;;
esac
@@ -587,7 +587,7 @@ EOF
qemu_docdir="\${prefix}"
bindir="\${prefix}"
sysconfdir="\${prefix}"
- local_statedir="\${prefix}"
+ local_statedir=
confsuffix=""
libs_qga="-lws2_32 -lwinmm -lpowrprof $libs_qga"
fi
@@ -974,78 +974,22 @@ EXTRA_CFLAGS="$CPU_CFLAGS $EXTRA_CFLAGS"
default_target_list=""
-# these targets are portable
-if [ "$softmmu" = "yes" ] ; then
- default_target_list="\
-i386-softmmu \
-x86_64-softmmu \
-alpha-softmmu \
-arm-softmmu \
-cris-softmmu \
-lm32-softmmu \
-m68k-softmmu \
-microblaze-softmmu \
-microblazeel-softmmu \
-mips-softmmu \
-mipsel-softmmu \
-mips64-softmmu \
-mips64el-softmmu \
-moxie-softmmu \
-or32-softmmu \
-ppc-softmmu \
-ppcemb-softmmu \
-ppc64-softmmu \
-sh4-softmmu \
-sh4eb-softmmu \
-sparc-softmmu \
-sparc64-softmmu \
-s390x-softmmu \
-xtensa-softmmu \
-xtensaeb-softmmu \
-unicore32-softmmu \
-"
-fi
-# the following are Linux specific
-if [ "$linux_user" = "yes" ] ; then
- default_target_list="${default_target_list}\
-i386-linux-user \
-x86_64-linux-user \
-alpha-linux-user \
-arm-linux-user \
-armeb-linux-user \
-cris-linux-user \
-m68k-linux-user \
-microblaze-linux-user \
-microblazeel-linux-user \
-mips-linux-user \
-mipsel-linux-user \
-mips64-linux-user \
-mips64el-linux-user \
-mipsn32-linux-user \
-mipsn32el-linux-user \
-or32-linux-user \
-ppc-linux-user \
-ppc64-linux-user \
-ppc64abi32-linux-user \
-sh4-linux-user \
-sh4eb-linux-user \
-sparc-linux-user \
-sparc64-linux-user \
-sparc32plus-linux-user \
-unicore32-linux-user \
-s390x-linux-user \
-"
-fi
-# the following are BSD specific
-if [ "$bsd_user" = "yes" ] ; then
- default_target_list="${default_target_list}\
-i386-bsd-user \
-x86_64-bsd-user \
-sparc-bsd-user \
-sparc64-bsd-user \
-"
+mak_wilds=""
+
+if [ "$softmmu" = "yes" ]; then
+ mak_wilds="${mak_wilds} $source_path/default-configs/*-softmmu.mak"
+fi
+if [ "$linux_user" = "yes" ]; then
+ mak_wilds="${mak_wilds} $source_path/default-configs/*-linux-user.mak"
+fi
+if [ "$bsd_user" = "yes" ]; then
+ mak_wilds="${mak_wilds} $source_path/default-configs/*-bsd-user.mak"
fi
+for config in $mak_wilds; do
+ default_target_list="${default_target_list} $(basename "$config" .mak)"
+done
+
if test x"$show_help" = x"yes" ; then
cat << EOF
@@ -1082,7 +1026,7 @@ echo " --docdir=PATH install documentation in PATH$confsuffix"
echo " --bindir=PATH install binaries in PATH"
echo " --libdir=PATH install libraries in PATH"
echo " --sysconfdir=PATH install config in PATH$confsuffix"
-echo " --localstatedir=PATH install local state in PATH"
+echo " --localstatedir=PATH install local state in PATH (set at runtime on win32)"
echo " --with-confsuffix=SUFFIX suffix for QEMU data inside datadir and sysconfdir [$confsuffix]"
echo " --enable-debug-tcg enable TCG debugging"
echo " --disable-debug-tcg disable TCG debugging (default)"
@@ -1399,6 +1343,19 @@ if test -z "${target_list+xxx}" ; then
else
target_list=`echo "$target_list" | sed -e 's/,/ /g'`
fi
+
+# Check that we recognised the target name; this allows a more
+# friendly error message than if we let it fall through.
+for target in $target_list; do
+ case " $default_target_list " in
+ *" $target "*)
+ ;;
+ *)
+ error_exit "Unknown target name '$target'"
+ ;;
+ esac
+done
+
# see if system emulation was really requested
case " $target_list " in
*"-softmmu "*) softmmu=yes
@@ -2153,13 +2110,12 @@ fi
##########################################
# curses probe
-if test "$mingw32" = "yes" ; then
- curses_list="-lpdcurses"
-else
- curses_list="-lncurses:-lcurses:$($pkg_config --libs ncurses 2>/dev/null)"
-fi
-
if test "$curses" != "no" ; then
+ if test "$mingw32" = "yes" ; then
+ curses_list="-lpdcurses"
+ else
+ curses_list="$($pkg_config --libs ncurses 2>/dev/null):-lncurses:-lcurses"
+ fi
curses_found=no
cat > $TMPC << EOF
#include <curses.h>
@@ -2191,14 +2147,12 @@ fi
##########################################
# curl probe
-
-if $pkg_config libcurl --modversion >/dev/null 2>&1; then
- curlconfig="$pkg_config libcurl"
-else
- curlconfig=curl-config
-fi
-
if test "$curl" != "no" ; then
+ if $pkg_config libcurl --modversion >/dev/null 2>&1; then
+ curlconfig="$pkg_config libcurl"
+ else
+ curlconfig=curl-config
+ fi
cat > $TMPC << EOF
#include <curl/curl.h>
int main(void) { curl_easy_init(); curl_multi_setopt(0, 0, 0); return 0; }
@@ -3487,10 +3441,12 @@ echo "library directory `eval echo $libdir`"
echo "libexec directory `eval echo $libexecdir`"
echo "include directory `eval echo $includedir`"
echo "config directory `eval echo $sysconfdir`"
-echo "local state directory `eval echo $local_statedir`"
if test "$mingw32" = "no" ; then
+echo "local state directory `eval echo $local_statedir`"
echo "Manual directory `eval echo $mandir`"
echo "ELF interp prefix $interp_prefix"
+else
+echo "local state directory queried at runtime"
fi
echo "Source path $source_path"
echo "C compiler $cc"
@@ -3611,7 +3567,9 @@ echo "sysconfdir=$sysconfdir" >> $config_host_mak
echo "qemu_confdir=$qemu_confdir" >> $config_host_mak
echo "qemu_datadir=$qemu_datadir" >> $config_host_mak
echo "qemu_docdir=$qemu_docdir" >> $config_host_mak
-echo "qemu_localstatedir=$local_statedir" >> $config_host_mak
+if test "$mingw32" = "no" ; then
+ echo "qemu_localstatedir=$local_statedir" >> $config_host_mak
+fi
echo "qemu_helperdir=$libexecdir" >> $config_host_mak
echo "extra_cflags=$EXTRA_CFLAGS" >> $config_host_mak
echo "extra_ldflags=$EXTRA_LDFLAGS" >> $config_host_mak
@@ -4103,17 +4061,8 @@ if test "$gcov" = "yes" ; then
fi
# generate list of library paths for linker script
-
$ld --verbose -v 2> /dev/null | grep SEARCH_DIR > ${config_host_ld}
-if test -f ${config_host_ld}~ ; then
- if cmp -s $config_host_ld ${config_host_ld}~ ; then
- mv ${config_host_ld}~ $config_host_ld
- else
- rm ${config_host_ld}~
- fi
-fi
-
# use included Linux headers
if test "$linux" = "yes" ; then
mkdir -p linux-headers