Mercurial > emacs
changeset 108228:385494b60342
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.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Mon, 03 May 2010 20:06:27 -0700 |
parents | 135e34f90ef1 |
children | 0c1c81ee223e |
files | ChangeLog configure.in src/ChangeLog src/Makefile.in src/s/aix4-2.h src/s/darwin.h |
diffstat | 6 files changed, 37 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon May 03 19:56:19 2010 -0700 +++ b/ChangeLog Mon May 03 20:06:27 2010 -0700 @@ -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.
--- a/configure.in Mon May 03 19:56:19 2010 -0700 +++ b/configure.in Mon May 03 20:06:27 2010 -0700 @@ -2992,6 +2992,30 @@ 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.
--- a/src/ChangeLog Mon May 03 19:56:19 2010 -0700 +++ b/src/ChangeLog Mon May 03 20:06:27 2010 -0700 @@ -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.
--- a/src/Makefile.in Mon May 03 19:56:19 2010 -0700 +++ b/src/Makefile.in Mon May 03 20:06:27 2010 -0700 @@ -74,6 +74,9 @@ 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 @@ #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 @@ /* 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
--- a/src/s/aix4-2.h Mon May 03 19:56:19 2010 -0700 +++ b/src/s/aix4-2.h Mon May 03 20:06:27 2010 -0700 @@ -100,9 +100,6 @@ #define LIBS_SYSTEM -lrts -lIM -liconv #endif -#define LD_SWITCH_SYSTEM_TEMACS -Wl,-bnodelcsect - - /* Use terminfo instead of termcap. */
--- a/src/s/darwin.h Mon May 03 19:56:19 2010 -0700 +++ b/src/s/darwin.h Mon May 03 20:06:27 2010 -0700 @@ -163,13 +163,8 @@ /* 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 @@ #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