* lib/math.in.h (totalordermag): New declaration.
* lib/totalordermag.c: New file, based on lib/totalorder.c.
* m4/totalordermag.m4: New file, based on m4/totalorder.m4.
* m4/math_h.m4 (gl_MATH_H): Test whether totalordermag is declared.
(gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_TOTALORDERMAG.
(gl_MATH_H_DEFAULTS): Initialize HAVE_TOTALORDERMAG,
REPLACE_TOTALORDERMAG.
* modules/math (Makefile.am): Substitute GNULIB_TOTALORDERMAG,
HAVE_TOTALORDERMAG, REPLACE_TOTALORDERMAG.
* modules/totalordermag: New file, based on modules/totalorder.
* doc/posix-functions/totalordermag.texi: Mention the new module.