canonicalize-lgpl: use native realpath if it works
Forward-looking to when more platforms comply with POSIX 2008,
but don't provide glibc extensions. For example, this could
fix // handling in cygwin 1.7 (well, if cygwin didn't have bugs
in .. handling). canonicalize can't use native realpath, for
the same reason that it does not use resolvepath.
* lib/canonicalize-lgpl.c (realpath): Guard with
FUNC_REALPATH_WORKS.
* lib/stdlib.in.h (realpath): Make declaration optional based on
HAVE_REALPATH.
* m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL): Check whether
native realpath works.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Provide default.
* modules/stdlib (Makefile.am): Substitute witness.
Signed-off-by: Eric Blake <ebb9@byu.net>