aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure46
1 files changed, 26 insertions, 20 deletions
diff --git a/configure b/configure
index 6587e8014b..38f1710c80 100755
--- a/configure
+++ b/configure
@@ -264,6 +264,7 @@ cc_i386=i386-pc-linux-gnu-gcc
libs_qga=""
debug_info="yes"
stack_protector=""
+git_submodules=""
# Don't accept a target_list environment variable.
unset target_list
@@ -3584,27 +3585,30 @@ EOF
if compile_prog "" "$fdt_libs" ; then
# system DTC is good - use it
fdt=yes
- elif test -d ${source_path}/dtc/libfdt ; then
- # have submodule DTC - use it
- fdt=yes
- dtc_internal="yes"
- mkdir -p dtc
- if [ "$pwd_is_source_path" != "y" ] ; then
- symlink "$source_path/dtc/Makefile" "dtc/Makefile"
- symlink "$source_path/dtc/scripts" "dtc/scripts"
- fi
- fdt_cflags="-I\$(SRC_PATH)/dtc/libfdt"
- fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs"
- elif test "$fdt" = "yes" ; then
- # have neither and want - prompt for system/submodule install
- error_exit "DTC (libfdt) version >= 1.4.2 not present. Your options:" \
- " (1) Preferred: Install the DTC (libfdt) devel package" \
- " (2) Fetch the DTC submodule, using:" \
- " git submodule update --init dtc"
else
- # don't have and don't want
- fdt_libs=
- fdt=no
+ # have GIT checkout, so activate dtc submodule
+ if test -e "${source_path}/.git" ; then
+ git_submodules="${git_submodules} dtc"
+ fi
+ if test -d "${source_path}/dtc/libfdt" || test -e "${source_path}/.git" ; then
+ fdt=yes
+ dtc_internal="yes"
+ mkdir -p dtc
+ if [ "$pwd_is_source_path" != "y" ] ; then
+ symlink "$source_path/dtc/Makefile" "dtc/Makefile"
+ symlink "$source_path/dtc/scripts" "dtc/scripts"
+ fi
+ fdt_cflags="-I\$(SRC_PATH)/dtc/libfdt"
+ fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs"
+ elif test "$fdt" = "yes" ; then
+ # Not a git build & no libfdt found, prompt for system install
+ error_exit "DTC (libfdt) version >= 1.4.2 not present." \
+ "Please install the DTC (libfdt) devel package"
+ else
+ # don't have and don't want
+ fdt_libs=
+ fdt=no
+ fi
fi
fi
@@ -5295,6 +5299,7 @@ echo "local state directory queried at runtime"
echo "Windows SDK $win_sdk"
fi
echo "Source path $source_path"
+echo "GIT submodules $git_submodules"
echo "C compiler $cc"
echo "Host C compiler $host_cc"
echo "C++ compiler $cxx"
@@ -5483,6 +5488,7 @@ echo "extra_cxxflags=$EXTRA_CXXFLAGS" >> $config_host_mak
echo "extra_ldflags=$EXTRA_LDFLAGS" >> $config_host_mak
echo "qemu_localedir=$qemu_localedir" >> $config_host_mak
echo "libs_softmmu=$libs_softmmu" >> $config_host_mak
+echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak
echo "ARCH=$ARCH" >> $config_host_mak