From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXGbE-0005UF-Uv for qemu-devel@nongnu.org; Wed, 23 May 2012 14:47:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXGbD-0007fl-3S for qemu-devel@nongnu.org; Wed, 23 May 2012 14:47:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22092) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXGbC-0007fG-Qy for qemu-devel@nongnu.org; Wed, 23 May 2012 14:47:55 -0400 From: Luiz Capitulino Date: Wed, 23 May 2012 15:48:04 -0300 Message-Id: <1337798885-23070-2-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1337798885-23070-1-git-send-email-lcapitulino@redhat.com> References: <1337798885-23070-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 1/2] configure: check if environ is declared List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, eblake@redhat.com, mdroth@linux.vnet.ibm.com, afaerber@suse.de, kraxel@redhat.com Some systems may declare environ automatically, others don't. Check for it. Signed-off-by: Luiz Capitulino --- configure | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 +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.9.2.384.g4a92a