diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2012-05-23 15:48:04 -0300 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2012-05-24 13:06:31 -0500 |
commit | 8ab1bf120d7fcf84f199679ad0d25acbc354c69c (patch) | |
tree | e5460f4cb8be6feccde96f578f68f261e686bd52 /configure | |
parent | aeb29b6459cb9496b38c820f3faff64cf2369d0d (diff) | |
download | hqemu-8ab1bf120d7fcf84f199679ad0d25acbc354c69c.zip hqemu-8ab1bf120d7fcf84f199679ad0d25acbc354c69c.tar.gz |
configure: check if environ is declared
Some systems may declare environ automatically, others don't. Check for it.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -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 <unistd.h> +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) |