* lib/stdlib.in.h (print_stack_trace): Make part of the stack-trace
module.
* lib/stack-trace-impl.h: New file, based on lib/abort-debug.c.
* lib/stack-trace.c: New file, based on lib/abort-debug.c.
* lib/abort-debug.c: Include stack-trace-impl.h. Remove definitions
moved to stack-trace-impl.h.
(print_stack_trace): Remove function.
* m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize
GNULIB_STACK_TRACE.
(gl_STDLIB_H_DEFAULTS): Initialize CAN_PRINT_STACK_TRACE.
* m4/stack-trace.m4: New file, based on m4/abort-debug.m4.
* m4/abort-debug.m4 (gl_ABORT_DEBUG_EARLY): Remove macro.
(gl_ABORT_DEBUG): Require gl_STDLIB_H_DEFAULTS, gl_STACK_TRACE_EARLY.
Set REPLACE_ABORT here.
* modules/stdlib (Makefile.am): Substitute GNULIB_STACK_TRACE,
CAN_PRINT_STACK_TRACE.
* modules/stack-trace: New file.
* modules/abort-debug (Depends-on): Add stack-trace. Remove execinfo.
(configure.ac-early): Remove section.
* DEPENDENCIES: Update.