Adding a new configure option to enable/disable getenv redefinition
From:
Vicente Olivert Riera
Subject:
Adding a new configure option to enable/disable getenv redefinition
Date:
Wed, 8 Oct 2014 15:30:11 +0100
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.8.0
Hello,
when bash is being cross-compiled it can't detect if getenv can be
redefined...
configure:14432: checking to see if getenv can be redefined
configure:14438: WARNING: cannot check getenv redefinition if cross
compiling -- defaulting to yes
configure:14489: result: yes
...so it defaults to 'yes', and can cause build failures like this one:
getenv.c:(.text+0x0): multiple definition of `getenv'
./lib/sh/libsh.a(getenv.o):getenv.c:(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
What do you think about adding a new configure option like
"--with-getenv=yes|no" to explicitly state if getenv has to be redefined?