Move LD_SWITCH_SYSTEM_TEMACS from cpp to autoconf.
* configure.in (LD_SWITCH_SYSTEM_TEMACS): New output variable. * src/s/aix4-2.h (LD_SWITCH_SYSTEM_TEMACS): Move to configure.in. * src/s/darwin.h (HEADERPAD_EXTRA, LIBS_NSGUI): Remove. (LD_SWITCH_SYSTEM_TEMACS): Move to configure.in. * src/Makefile.in (LD_SWITCH_SYSTEM_TEMACS): New variable, set by configure. (TEMACS_LDFLAGS): Use $LD_SWITCH_SYSTEM_TEMACS.
This commit is contained in:
parent
496287859b
commit
eb21eab59b
6 changed files with 37 additions and 22 deletions
|
|
@ -1,5 +1,7 @@
|
|||
2010-05-04 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* configure.in (LD_SWITCH_SYSTEM_TEMACS): New output variable.
|
||||
|
||||
* configure.in (C_SWITCH_MACHINE, C_SWITCH_SYSTEM): New output
|
||||
variables, replacing c_switch_machine, c_switch_system.
|
||||
|
||||
|
|
|
|||
24
configure.in
24
configure.in
|
|
@ -2992,6 +2992,30 @@ AC_SUBST(CYGWIN_OBJ)
|
|||
AC_SUBST(PRE_ALLOC_OBJ)
|
||||
AC_SUBST(POST_ALLOC_OBJ)
|
||||
|
||||
|
||||
case "$opsys" in
|
||||
aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
|
||||
|
||||
darwin)
|
||||
## The -headerpad option tells ld (see man page) to leave room at the
|
||||
## end of the header for adding load commands. Needed for dumping.
|
||||
## 0x690 is the total size of 30 segment load commands (at 56
|
||||
## each); under Cocoa 31 commands are required.
|
||||
if test "$HAVE_NS" = "yes"; then
|
||||
libs_nsgui="-framework AppKit"
|
||||
headerpad_extra=6C8
|
||||
else
|
||||
libs_nsgui=
|
||||
headerpad_extra=690
|
||||
fi
|
||||
LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
|
||||
;;
|
||||
|
||||
*) LD_SWITCH_SYSTEM_TEMACS= ;;
|
||||
esac
|
||||
AC_SUBST(LD_SWITCH_SYSTEM_TEMACS)
|
||||
|
||||
|
||||
AH_TOP([/* GNU Emacs site configuration template file.
|
||||
Copyright (C) 1988, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||
2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
2010-05-04 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* s/aix4-2.h (LD_SWITCH_SYSTEM_TEMACS): Move to configure.in.
|
||||
* s/darwin.h (HEADERPAD_EXTRA, LIBS_NSGUI): Remove.
|
||||
(LD_SWITCH_SYSTEM_TEMACS): Move to configure.in.
|
||||
* Makefile.in (LD_SWITCH_SYSTEM_TEMACS): New variable, set by configure.
|
||||
(TEMACS_LDFLAGS): Use $LD_SWITCH_SYSTEM_TEMACS.
|
||||
|
||||
* s/aix4-2.h (C_SWITCH_SYSTEM):
|
||||
* m/alpha.h (C_SWITCH_MACHINE):
|
||||
Move to configure.in.
|
||||
|
|
|
|||
|
|
@ -74,6 +74,9 @@ CRT_DIR=@CRT_DIR@
|
|||
C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
|
||||
## System-specific CFLAGS.
|
||||
C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
|
||||
## This holds any special options for linking temacs only (ie, not
|
||||
## used by configure).
|
||||
LD_SWITCH_SYSTEM_TEMACS=@LD_SWITCH_SYSTEM_TEMACS@
|
||||
|
||||
LIBTIFF=@LIBTIFF@
|
||||
LIBJPEG=@LIBJPEG@
|
||||
|
|
@ -201,12 +204,6 @@ DEPFLAGS = -MMD -MF deps/$*.d
|
|||
#endif /* (defined (BSD_SYSTEM) && !defined (COFF)) */
|
||||
#endif /* LD_SWITCH_SYSTEM */
|
||||
|
||||
/* This holds special options for linking temacs
|
||||
that should be used for linking anything else. */
|
||||
#ifndef LD_SWITCH_SYSTEM_TEMACS
|
||||
#define LD_SWITCH_SYSTEM_TEMACS
|
||||
#endif
|
||||
|
||||
/* These macros are for switches specifically related to X Windows. */
|
||||
#ifndef LD_SWITCH_X_SITE
|
||||
#define LD_SWITCH_X_SITE
|
||||
|
|
@ -326,7 +323,7 @@ LD=ld
|
|||
/* Flags to pass to LD only for temacs. */
|
||||
/* Do not split this line with a backslash. That can cause trouble with
|
||||
some cpps. */
|
||||
TEMACS_LDFLAGS = LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_TEMACS
|
||||
TEMACS_LDFLAGS = LD_SWITCH_SYSTEM $(LD_SWITCH_SYSTEM_TEMACS)
|
||||
|
||||
/* A macro which other sections of Makefile can redefine to munge the
|
||||
flags before they are passed to LD. This is helpful if you have
|
||||
|
|
|
|||
|
|
@ -100,9 +100,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
#define LIBS_SYSTEM -lrts -lIM -liconv
|
||||
#endif
|
||||
|
||||
#define LD_SWITCH_SYSTEM_TEMACS -Wl,-bnodelcsect
|
||||
|
||||
|
||||
|
||||
/* Use terminfo instead of termcap. */
|
||||
|
||||
|
|
|
|||
|
|
@ -163,13 +163,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
/* Definitions for how to compile & link. */
|
||||
|
||||
#ifdef HAVE_NS
|
||||
#define LIBS_NSGUI -framework AppKit
|
||||
#define SYSTEM_PURESIZE_EXTRA 200000
|
||||
#define HEADERPAD_EXTRA 6C8
|
||||
#else /* !HAVE_NS */
|
||||
#define LIBS_NSGUI
|
||||
#define HEADERPAD_EXTRA 690
|
||||
#endif /* !HAVE_NS */
|
||||
#endif
|
||||
|
||||
/* On Darwin, res_init appears not to be useful: see bug#562 and
|
||||
http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html */
|
||||
|
|
@ -177,12 +172,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
#undef HAVE_RES_INIT
|
||||
#undef HAVE_LIBRESOLV
|
||||
|
||||
/* The -headerpad option tells ld (see man page) to leave room at the
|
||||
end of the header for adding load commands. Needed for dumping.
|
||||
0x690 is the total size of 30 segment load commands (at 56
|
||||
each); under Cocoa 31 commands are required. */
|
||||
#define LD_SWITCH_SYSTEM_TEMACS -prebind LIBS_NSGUI -Xlinker -headerpad -Xlinker HEADERPAD_EXTRA
|
||||
|
||||
#ifdef emacs
|
||||
#define malloc unexec_malloc
|
||||
#define realloc unexec_realloc
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue