[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/2] configure: check if environ is declared
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 1/2] configure: check if environ is declared |
Date: |
Thu, 24 May 2012 13:52:40 -0500 |
From: Luiz Capitulino <address@hidden>
Some systems may declare environ automatically, others don't. Check for it.
Signed-off-by: Luiz Capitulino <address@hidden>
Signed-off-by: Michael Roth <address@hidden>
---
configure | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/configure b/configure
index b55a792..1f338f8 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 <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)
--
1.7.4.1