* Makefile.in (LD_SWITCH_MACHINE): Remove definition, unused.
(TEMACS_LDFLAGS): Do not use LD_SWITCH_MACHINE.
* configure.in (LD_SWITCH_MACHINE, ld_switch_machine): Remove, unused.
(ac_link): Do not use ld_switch_machine.
* configure.in (OTHER_OBJ): Remove.
(PRE_ALLOC_OBJ, POST_ALLOC_OBJ): New output variables.
* configure: Regenerate.
* src/Makefile.in (gmallocobj, rallocobj, vmlimitobj): Initialize to null,
for clarity.
(OTHER_OBJ): Remove.
(PRE_ALLOC_OBJ, POST_ALLOC_OBJ): New, set by configure.
(otherobj): Use PRE_ALLOC_OBJ, POST_ALLOC_OBJ rather than OTHER_OBJ.
* configure.in (OTHER_OBJ): Always include vm-limit.o on Cygwin.
Elsewhere, maybe include it.
* src/Makefile.in (vmlimitobj) [!SYSTEM_MALLOC]: New variable.
(OTHER_OBJ): Define as a separate variable, for clarity.
* configure: Regenerate.
* configure.in (TOOLKIT_LIBW) [HAVE_GTK]: Set to $GTK_LIBS.
(OLDXMENU, LIBXMENU): New output variables.
* src/Makefile.in (OLDXMENU, LIBXMENU) [HAVE_MENUS]:
Set with configure, not cpp.
(LIBW): Remove, replace with $TOOLKIT_LIBW.
* configure.in (GPM_MOUSE_SUPPORT): New output variable.
* src/Makefile.in (GPM_MOUSE_SUPPORT): New, set by configure.
(MOUSE_SUPPORT) [!HAVE_MOUSE]: Use $GPM_MOUSE_SUPPORT.
* configure.in (LIBXMU): New output variable.
* src/Makefile.in (LIBXMU): Set with configure, not cpp.
* src/s/aix4-2.h (LIBXMU):
* src/s/hpux10-20.h (LIBXMU):
Remove definition, now set in configure.
See discussion in bug#5655.
* configure.in (machine, canonical): On amdx86-64, check for a 32-bit
userland and maybe change values to i386 (move test from s/amdx86-64.h).
* src/m/amdx86-64.h [i386]: Move this test to configure.in.
* configure.in (LIBXTR6): New output variable. Move unixware special
case here from src/s/unixware.h.
* src/Makefile.in (LIBXTR6): Set with configure, not cpp.
* src/s/unixware.h (NEED_LIBW): Remove definition.
* admin/CPP-DEFINES: Remove NEED_LIBW.
* configure.in (LUCID_LIBW, MOTIF_LIBW): No longer substitute in Makefiles.
(TOOLKIT_LIBW): New output variable, replacing LUCID_LIBW/MOTIF_LIBW.
* src/Makefile.in (LUCID_LIBW, MOTIF_LIBW): Remove, replacing by...
(TOOLKIT_LIBW): New, set by configure.
(@X_TOOLKIT_TYPE@): No longer define it.
* configure.in (HAVE_MOTIF_2_1): Remove unused variable.
(LIBXP): No longer substitute in Makefiles.
(MOTIF_LIBW): New output variable. Move system-specific settings here
from src/s files.
* src/Makefile.in (LIBXP): Remove, since included in MOTIF_LIBW.
(MOTIF_LIBW): Set with configure, not cpp.
* s/aix4-2.h (LIB_MOTIF):
* s/gnu-linux.h (LIB_MOTIF):
* s/unixware.h (LIB_MOTIF): Move to configure.in.
* admin/CPP-DEFINES: Remove LIB_MOTIF.
* Makefile.in (C_SWITCH_SYSTEM, C_SWITCH_MACHINE, C_SWITCH_X_SITE): Remove
definitions and undefs. Inline definitions in the only user.
(ALL_CFLAGS): Substitute C_SWITCH_X_SYSTEM using autoconf.
* Makefile.in (C_SWITCH_X_SYSTEM): Define using autoconf.
* Makefile.in (C_SWITCH_X_SYSTEM): Define using autoconf.
* configure.in (C_SWITCH_X_SYSTEM): Define using autoconf, not cpp.
* Makefile.in (LIB_X11_LIB): Remove, inline in the only user.
(obj): Use autoconf for unexec instead of cpp.
* configure.in (LIB_X11_LIB): Remove, inline in the only user.
(unexec): Define unconditionally, all platforms define
UNEXEC. AC_SUBST it.
(UNEXEC_SRC): Remove, unused.
* configure.in (--with-crt-dir): Doc fix (now valid for all platforms).
(CRT_DIR): On (powerpc64|sparc64)-*-linux-gnu*, default to /usr/lib64.
On hpux10-20, default to /lib.
* src/m/amdx86-64.h (START_FILES, LIB_STANDARD): Change the logic around,
since the defaults (set by the system file) are fine in most cases.
[GNU_LINUX, __OpenBSD__, __NetBSD__, __APPLE__]: Remove sections.
* src/m/ibms390x.h (START_FILES, LIB_STANDARD):
* src/m/macppc.h (START_FILES, LIB_STANDARD) [GNU_LINUX]:
* src/m/sparc.h (START_FILES, LIB_STANDARD) [__linux__]:
Remove definitions, since they are set correctly in s/gnu-linux.h.
* src/s/freebsd.h (START_FILES, LIB_STANDARD):
* src/s/gnu-linux.h (START_FILES, LIB_STANDARD):
* src/s/hpux10-20.h (START_FILES):
* src/s/netbsd.h (START_FILES, LIB_STANDARD, START_FILES_1, END_FILES_1):
Use $CRT_DIR in place of fixed /usr/lib, /lib directories.
* src/Makefile.in: Comment.
* configure.in (LUCID_LIBW, LIBXP, WIDGET_OBJ): New output variables.
* src/Makefile.in (LIBXP, LUCID_LIBW, WIDGET_OBJ): Set via configure.
(MOTIF_LIBW): Use $LIBXP.
(otherobj): Use $WIDGET_OBJ.
* s/darwin.h (LIB_MATH): Do not define here, move to configure.
* s/cygwin.h (LIB_MATH): Likewise.
* Makefile.in (LIB_MATH): Do not define with cpp.
(LIBES): Use autoconf for LIB_MATH.
* configure.in (LIB_MATH): New output variable. Set it for some systems.
* configure.in (CRT_DIR): New output variable.
(--with-crt-dir): New option. (Bug#5655)
(HAVE_LIB64_DIR): Remove.
* src/Makefile.in (CRT_DIR): New variable, set by configure.
* src/m/amdx86-64.h, m/ibms390x.h (START_FILES, LIB_STANDARD):
Use $CRT_DIR rather than HAVE_LIB64_DIR. (Bug#5655)
* configure.in (LIBSELINUX_LIBS): Always substitute in Makefiles.
(GTK_OBJ, DBUS_OBJ, LIBXSM, XMENU_OBJ, XOBJ): New output variables.
* src/Makefile.in (DBUS_OBJ, GTK_OBJ, XMENU_OBJ, XOBJ):
Define using autoconf, not cpp.
(LIBXSM): New variable, set by autoconf.
(LIBXT): Use $LIBXSM.
* configure.in: New option: --with(out)-selinux, on by default.
Set HAVE_LIBSELINUX if we find libselinux, and substitute
LIBSELINUX_LIBS in Makefiles.
* src/Makefile.in (LIBSELINUX_LIBS): New.
(LIBES): Add $LIBSELINUX_LIBS.
* src/eval.c, lisp.h (call7): New function.
* src/fileio.c [HAVE_LIBSELINUX]: Include selinux headers.
(Ffile_selinux_context, Fset_file_selinux_context):
New functions.
(Fcopy_file): New parameter preserve-selinux-context.
(Frename_file): Preserve selinux context when renaming by copy-file.
* lisp/files.el (backup-buffer): Handle SELinux context, and return it
if a backup was made by renaming.
(backup-buffer-copy): Set SELinux context to the target file.
(basic-save-buffer): Set SELinux context of the newly written file.
(basic-save-buffer-1): Now it also returns any SELinux context.
(basic-save-buffer-2): Set SELinux context of the newly created file,
and return it.
* lisp/net/tramp.el (tramp-file-name-for-operation):
Add file-selinux-context.
* Makefile.in (LIBX11_SYSTEM): Remove.
* s/msdos.h (LIBX11_SYSTEM): Do not define, define LIBS_SYSTEM
instead.
* configure.in: Remove all references to LIBX11_SYSTEM.
* s/unixware.h: Add the contents of s/usg-5-4-2.h.
* s/usg-5-4-2.h: Remove.
* configure.in: Remove support for old UNIX System V systems and
for Unixware on non-x86 machines.
* s/sol2-6.h: Add the contents of s/sol-2.3.h, s/sol-2.4.h, s/sol-2.5.h.
(LD_SWITCH_SYSTEM, USE_MMAP_FOR_BUFFERS): Remove #defines/#undef
that cancel each other.
* s/sol2-3.h:
* s/sol2-4.h:
* s/sol2-5.h: Remove.
* m/ibmrs6000.h: Remove code for USG5_4, this file is only used on AIX.
(NO_REMAP): Remove, unused.
(UNEXEC): Move definition ...
* s/aix4-2.h (UNEXEC): ... here.
* configure.in: Remove support for Solaris on PPC and for old versions.
* configure.in (--with-mmdf, --with-mail-unlink):
New options, off by default.
(--with-mailhost): New option to set default POP host.
(LIBXPM, LIBJPEG, LIBPNG, LIBTIFF, LIBGIF, LIBGPM, LIBS_MAIL)
(LIBHESIOD, LIBRESOLV, COM_ERRLIB, CRYPTOLIB, KRB5LIB, DESLIB, KRB4LIB):
New variables, substituted in Makefiles.
(try_libungif, ac_gif_lib_name): Replace with HAVE_GIF=maybe, LIBGIF.
(LIBGIF): Use AC_SUBST rather than AC_DEFINE.
(HAVE_LIBMAIL, HAVE_LIBLOCKFILE, HAVE_LIBCOM_ERR, HAVE_LIBCRYPTO)
(HAVE_LIBK5CRYPTO, HAVE_LIBKRB5, HAVE_LIBDES425, HAVE_LIBDES)
(HAVE_LIBKRB4, HAVE_LIBKRB): New AC_DEFINEs.
* lib-src/Makefile.in (KRB4LIB, DESLIB, KRB5LIB, CRYPTOLIB, COM_ERRLIB)
(HESIODLIB, LIBS_MAIL): Set using autoconf rather than cpp.
(BASE_CFLAGS): Remove (identical to CPP_CFLAGS).
* src/Makefile.in (XFT_LIBS, LIBXPM, LIBJPEG, LIBPNG, LIBTIFF, LIBGIF)
(LIBGPM, LIBRESOLV): Set using autoconf rather than cpp.
configure.in <AC_CHECK_HEADERS>: Remove termcap.h.
configure: Regenerated.
src/Makefilie.in (termcapobj): Move termcap.o from here...
(MSDOS_OBJ): ...to here.
(termcapobj) [!LIBS_TERMCAP]: Remove specialized value, as it is
now identical to when LIBS_TERMCAP is defined.
src/term.c: Remove (ifdef'ed away) inclusion of termcap.h.
src/cm.c: Remove (ifdef'ed away) inclusion of termcap.h.
src/config.in: Regenerated.
* configure.in: Check for utmp.h availability (FreeBSD 9.x lacks
this header file).
* filelock.c: Include utmp.h only when HAVE_UTMP_H (FreeBSD 9.x
lacks this header file).