bootstrap: honor --no-git

Based on a report by Chandrashekar Shastri, at
https://bugzilla.redhat.com/show_bug.cgi?id=979360

The intent behind the original addition of --no-git in commit
824f8d16 was to allow builds on a machine that either has no
git, or where git is prevented from using the network; yet where
the user had other means of checking out the correct version of
gnulib (such as using an NFS share).  But in practice, we were
still trying to use git, in spite of being told where gnulib-tool
already lives.  This fixes bootstrap to match the original
intent, by avoiding all direct use of git or submodules (any
indirect use of git, such as by autopoint, is beyond our control;
but at least that use does not require network access).  It is
still up to the end user to ensure that GNULIB_SRCDIR points
to the intended gnulib commit.

* build-aux/bootstrap: Don't even try to use git when user is
pointing to a static checkout.

Signed-off-by: Eric Blake <eblake@redhat.com>
nproc: relax license to LGPLv2+

nproc merely exposes alternatives to sysconf(_SC_NPROCESSORS_CONF),
which is part of glibc and thus LGPLv2+; it is not adding any value
that strategically requires LGPLv3+.  See also this thread.
https://lists.gnu.org/archive/html/bug-gnulib/2013-05/msg00105.html

* modules/nproc (License): Change from LGPLv3+.

Signed-off-by: Eric Blake <eblake@redhat.com>
xalloc-oversized: relax license to LGPLv2+

Unlike the bulk of xalloc* which calls exit() on allocation failure,
and thus is unacceptable in a library, the xalloc-oversized.h header
is a mere macro that makes checks for allocation overflow possible in
all sorts of portable code.  In fact, the LGPLv2+ module malloca
already has a copy of this check, arguing that this header is more
useful under a permissive license.  See also this thread.
https://lists.gnu.org/archive/html/bug-gnulib/2013-05/msg00092.html

* modules/xalloc-oversized (License): Change from GPLv3+.

Signed-off-by: Eric Blake <eblake@redhat.com>
mgetgroups: relax license to LGPLv2+

getgrouplist is part of glibc and LGPLv2+; the mgetgroups module
is merely an ease-of-use wrapper around this interface.  There's
nothing in the algorithm worth protecting by the more-restrictive
GPLv3+.  See also this thread.
https://lists.gnu.org/archive/html/bug-gnulib/2013-05/msg00092.html

* modules/getugroups (License): Change from GPLv3+.
* modules/mgetgroups (License): Likewise.
* modules/getgroups (License): Change from LGPLv3+.

Signed-off-by: Eric Blake <eblake@redhat.com>
pipe2: decouple from binary-io a bit

This is for Emacs, which needs pipe2 but not binary-io.
* lib/pipe2.c [!GNULIB_BINARY_IO]: Don't include binary-io.h.
* modules/binary-io (Depends-on): Add module indicator.
fnmatch: don't goto over declaration

* lib/fnmatch_loop.c (FCT): Hoist local up one level, to avoid
undefined behavior for goto over a declaration.
Problem reported by Charlie Brown in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-07/msg00009.html>.
stdalign, verify: port to FreeBSD 9.1, to C11, and to C++11

Problem reported by Ulrich Mueller in <http://bugs.gnu.org/14812>.
* lib/stdalign.in.h (_Alignas, _Alignof):
Port to FreeBSD 9.1, and to C11 and C++11.
(_Alignas): Also support ICC.
* lib/verify.h (_Static_assert): Undef if <stddef.h> defines it.
* m4/stdalign.m4 (gl_STDALIGN_H): Port to ICC and to C++11.
mountlist: add support for deallocating returned list entries

* lib/mountlist.c (free_mount_entry): A new exported function
to deallocate a mount list entry.
* lib/mountlist.h: Declare the new function.
(read_file_system_list): Refactor to use the new deallocation function.
Suggested by Anton Ovchinnikov.
accept4, dup3, pipe2: port to Cygwin

Problem reported for Emacs by Ken Brown in <http://bugs.gnu.org/14821>.
* lib/accept4.c (accept4) [O_BINARY]:
* lib/dup3.c (dup3) [O_BINARY]:
* lib/pipe2.c (pipe2) [O_BINARY]:
Use set_binary_mode, not setmode.
* lib/pipe2.c [!GNULIB_BINARY_IO]: Include binary-io.h.
* modules/binary-io (Depends-on): Remove module indicator.
These last two bits undo the previous change to pipe2 and binary-io.
regex: port to --with-included-regex --enable-gcc-warnings non-threaded

* lib/regex_internal.h (lock_fini, lock_lock): Rework to avoid
gcc warnings in the non-threaded case.  Reported by Charlie Brown in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-07/msg00015.html>.