From: Luiz Capitulino Date: Wed, 23 May 2012 18:48:04 +0000 (-0300) Subject: configure: check if environ is declared X-Git-Tag: qemu-xen-4.3.0-rc1~1053^2~1 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8ab1bf120d7fcf84f199679ad0d25acbc354c69c;p=qemu-upstream-4.5-testing.git configure: check if environ is declared Some systems may declare environ automatically, others don't. Check for it. Signed-off-by: Luiz Capitulino Signed-off-by: Michael Roth --- diff --git a/configure b/configure index b55a792de..1f338f8dc 100755 --- a/configure +++ b/configure @@ -2831,6 +2831,21 @@ if compile_prog "" "" ; then linux_magic_h=yes fi +######################################## +# check if environ is declared + +has_environ=no +cat > $TMPC << EOF +#include +int main(void) { + environ = environ; + return 0; +} +EOF +if compile_prog "" "" ; then + has_environ=yes +fi + ########################################## # End of CC checks # After here, no more $cc or $ld runs @@ -3342,6 +3357,10 @@ if test "$linux_magic_h" = "yes" ; then echo "CONFIG_LINUX_MAGIC_H=y" >> $config_host_mak fi +if test "$has_environ" = "yes" ; then + echo "CONFIG_HAS_ENVIRON=y" >> $config_host_mak +fi + # USB host support case "$usb" in linux)