check secure_getenv for glibc 2.17

Use secure_getenv if it is available.
Fall back to __secure_getenv if it is not.
In glibc 2.17, __secure_getenv was renamed to secure_getenv.
So check also for it.
   Reference:
    http://sourceware.org/glibc/wiki/Tips_and_Tricks/secure_getenv
    http://marc.info/?t=134192618500001&r=1&w=2
- fix: add missing #endif
malloc check voodo portability quirk

Get rid of a non portable shell export VAR=VALUE
costruct. "Posix requires export to honor assignments
made as arguments, but older shells do not support this,
including /bin/sh in Solaris 10.
Portable scripts should separate assignments
and exports into different statements"
(from http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Limitations-of-Builtins.html)
Don't use MALLOC_CHECK_ and valgrind(memcheck) at the
same time

The test suite can use valgrind(memcheck) via 'configure --enable-valgrind'
Memcheck wraps client calls to malloc(), and puts a "red zone" on
each end of each block in order to detect access overruns.
Memcheck already detects double free() (up to the limit of the buffer
which remembers pending free()). Thus memcheck subsumes all the
documented coverage of MALLOC_CHECK_.
If MALLOC_CHECK_ is set non-zero when running memcheck, then the
overruns that might be detected by MALLOC_CHECK_ would be overruns
on the wrapped blocks which include the red zones.  Thus MALLOC_CHECK_
would be checking memcheck, and not the client.  This is not useful,
and actually is wasteful.  The only possible [documented] advantage
of using MALLOC_CHECK_ and memcheck together, would be if MALLOC_CHECK_
detected duplicate free() in more cases than memcheck because memcheck's
buffer is too small.
/tmp/m4
fail autogen.sh if autoreconf fail
- fix: permit reading aliases, remove left over "goto exit" replacing by assert.
- ignore "make distcheck" cruft.
- fix: remove duplicated /bin/sh (with bizarre error message).
Print to the end of the configure phase the options we have
enabled and their results on the basis of the target system.

Fix also some trivial quoting in configure.ac
- default to "make V=0" silent builds to get rid of endless spewage.
- ignore cruft.
drop expr syntax error in make check under dash

Submitted by: Elia Pinto
fix coverity CID 1057440: Unused pointer value (UNUSED_VALUE)
- spell corrections.
add cppcheck conditional makefile target
poptconfig: drop cppcheck false positive
cpptarget: missing local includedir
poptconfig.c: add some curly braces

In c89 declarations were only valid at the beginning of blocks.
poptconfig.c reduce variables scope (cppcheck warning)
poptint.c reduce variables scope (cppcheck warning)