aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2010-05-03 19:56:19 -0700
committerGlenn Morris2010-05-03 19:56:19 -0700
commit496287859b525d24bf38ef19a38ea2fd7d309bd1 (patch)
tree834b0172fea80021902a60f2febec10d6a709706
parent7dff330b76dd3421febadb5e11509d36ddaf39ed (diff)
downloademacs-496287859b525d24bf38ef19a38ea2fd7d309bd1.tar.gz
emacs-496287859b525d24bf38ef19a38ea2fd7d309bd1.zip
Move C_SWITCH_MACHINE, C_SWITCH_SYSTEM from cpp to autoconf.
* configure.in (C_SWITCH_MACHINE, C_SWITCH_SYSTEM): New output variables, replacing c_switch_machine, c_switch_system. * src/s/aix4-2.h (C_SWITCH_SYSTEM): * src/m/alpha.h (C_SWITCH_MACHINE): Move to configure.in. * src/Makefile.in (C_SWITCH_MACHINE, C_SWITCH_SYSTEM): New variables, set by configure. (ALL_CFLAGS): Use $C_SWITCH_MACHINE and $C_SWITCH_SYSTEM in place of $c_switch_machine and $c_switch_system. * lib-src/Makefile.in: Use @C_SWITCH_SYSTEM@, @C_SWITCH_MACHINE@ rather than @c_switch_system@, @c_switch_machine@.
-rw-r--r--ChangeLog5
-rw-r--r--configure.in43
-rw-r--r--lib-src/ChangeLog5
-rw-r--r--lib-src/Makefile.in4
-rw-r--r--src/ChangeLog10
-rw-r--r--src/Makefile.in9
-rw-r--r--src/m/alpha.h10
-rw-r--r--src/s/aix4-2.h11
8 files changed, 63 insertions, 34 deletions
diff --git a/ChangeLog b/ChangeLog
index 3e26dc47626..efcc5991fb7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
12010-05-04 Glenn Morris <rgm@gnu.org>
2
3 * configure.in (C_SWITCH_MACHINE, C_SWITCH_SYSTEM): New output
4 variables, replacing c_switch_machine, c_switch_system.
5
12010-05-03 Glenn Morris <rgm@gnu.org> 62010-05-03 Glenn Morris <rgm@gnu.org>
2 7
3 * configure.in (LIBXT_OTHER, LIBX_OTHER): New output variables. 8 * configure.in (LIBXT_OTHER, LIBX_OTHER): New output variables.
diff --git a/configure.in b/configure.in
index 34358a2cea1..184dbef6ff1 100644
--- a/configure.in
+++ b/configure.in
@@ -883,15 +883,7 @@ echo '
883#ifndef LIBS_SYSTEM 883#ifndef LIBS_SYSTEM
884#define LIBS_SYSTEM 884#define LIBS_SYSTEM
885#endif 885#endif
886#ifndef C_SWITCH_SYSTEM
887#define C_SWITCH_SYSTEM
888#endif
889#ifndef C_SWITCH_MACHINE
890#define C_SWITCH_MACHINE
891#endif
892configure___ libsrc_libs=LIBS_SYSTEM 886configure___ libsrc_libs=LIBS_SYSTEM
893configure___ c_switch_system=C_SWITCH_SYSTEM
894configure___ c_switch_machine=C_SWITCH_MACHINE
895 887
896configure___ LIBX=-lX11 888configure___ LIBX=-lX11
897 889
@@ -969,12 +961,43 @@ rm ${tempcname}
969 961
970ac_link="$ac_link $ld_switch_system" 962ac_link="$ac_link $ld_switch_system"
971 963
964
965C_SWITCH_MACHINE=
966if test "$machine" = "alpha"; then
967 AC_CHECK_DECL([__ELF__])
968 if test "$ac_cv_have_decl___ELF__" = "yes"; then
969 ## With ELF, make sure that all common symbols get allocated to in the
970 ## data section. Otherwise, the dump of temacs may miss variables in
971 ## the shared library that have been initialized. For example, with
972 ## GNU libc, __malloc_initialized would normally be resolved to the
973 ## shared library's .bss section, which is fatal.
974 if test "x$GCC" = "xyes"; then
975 C_SWITCH_MACHINE="-fno-common"
976 else
977 AC_MSG_ERROR([What gives? Fix me if DEC Unix supports ELF now.])
978 fi
979 fi
980fi
981AC_SUBST(C_SWITCH_MACHINE)
982
983
984C_SWITCH_SYSTEM=
985## Some programs in src produce warnings saying certain subprograms
986## are too complex and need a MAXMEM value greater than 2000 for
987## additional optimization. --nils@exp-math.uni-essen.de
988test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
989 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
990## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
991## It is redundant in glibc2, since we define _GNU_SOURCE.
992AC_SUBST(C_SWITCH_SYSTEM)
993
994
972### Make sure subsequent tests use flags consistent with the build flags. 995### Make sure subsequent tests use flags consistent with the build flags.
973 996
974if test x"${OVERRIDE_CPPFLAGS}" != x; then 997if test x"${OVERRIDE_CPPFLAGS}" != x; then
975 CPPFLAGS="${OVERRIDE_CPPFLAGS}" 998 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
976else 999else
977 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS" 1000 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
978fi 1001fi
979 1002
980dnl For AC_FUNC_GETLOADAVG, at least: 1003dnl For AC_FUNC_GETLOADAVG, at least:
@@ -2804,8 +2827,6 @@ AC_SUBST(docdir)
2804AC_SUBST(bitmapdir) 2827AC_SUBST(bitmapdir)
2805AC_SUBST(gamedir) 2828AC_SUBST(gamedir)
2806AC_SUBST(gameuser) 2829AC_SUBST(gameuser)
2807AC_SUBST(c_switch_system)
2808AC_SUBST(c_switch_machine)
2809AC_SUBST(unexec) 2830AC_SUBST(unexec)
2810AC_SUBST(LD_SWITCH_X_SITE) 2831AC_SUBST(LD_SWITCH_X_SITE)
2811AC_SUBST(LD_SWITCH_X_SITE_AUX) 2832AC_SUBST(LD_SWITCH_X_SITE_AUX)
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 53db1767487..9178af0f366 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,8 @@
12010-05-04 Glenn Morris <rgm@gnu.org>
2
3 * Makefile.in: Use @C_SWITCH_SYSTEM@, @C_SWITCH_MACHINE@ rather than
4 @c_switch_system@, @c_switch_machine@.
5
12010-04-26 Dan Nicolaescu <dann@ics.uci.edu> 62010-04-26 Dan Nicolaescu <dann@ics.uci.edu>
2 7
3 * Makefile.in (LIBS_MACHINE): Remove all uses, unused. 8 * Makefile.in (LIBS_MACHINE): Remove all uses, unused.
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index 4bbe894a794..634ac8bcb44 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -34,8 +34,8 @@ CFLAGS=@CFLAGS@
34version=@version@ 34version=@version@
35configuration=@configuration@ 35configuration=@configuration@
36EXEEXT=@EXEEXT@ 36EXEEXT=@EXEEXT@
37C_SWITCH_SYSTEM=@c_switch_system@ 37C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
38C_SWITCH_MACHINE=@c_switch_machine@ 38C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
39 39
40# Program name transformation. 40# Program name transformation.
41TRANSFORM = @program_transform_name@ 41TRANSFORM = @program_transform_name@
diff --git a/src/ChangeLog b/src/ChangeLog
index ab5780106b7..33d550e7824 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
12010-05-04 Glenn Morris <rgm@gnu.org>
2
3 * s/aix4-2.h (C_SWITCH_SYSTEM):
4 * m/alpha.h (C_SWITCH_MACHINE):
5 Move to configure.in.
6 * Makefile.in (C_SWITCH_MACHINE, C_SWITCH_SYSTEM):
7 New variables, set by configure.
8 (ALL_CFLAGS): Use $C_SWITCH_MACHINE and $C_SWITCH_SYSTEM in place of
9 $c_switch_machine and $c_switch_system.
10
12010-05-04 Dan Nicolaescu <dann@ics.uci.edu> 112010-05-04 Dan Nicolaescu <dann@ics.uci.edu>
2 12
3 * s/hpux10-20.h (LIB_STANDARD): New definition. 13 * s/hpux10-20.h (LIB_STANDARD): New definition.
diff --git a/src/Makefile.in b/src/Makefile.in
index a7ad10446e2..220eac61c1f 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -70,6 +70,11 @@ OTHER_FILES = @OTHER_FILES@
70 70
71CRT_DIR=@CRT_DIR@ 71CRT_DIR=@CRT_DIR@
72 72
73## Machine-specific CFLAGS.
74C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
75## System-specific CFLAGS.
76C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
77
73LIBTIFF=@LIBTIFF@ 78LIBTIFF=@LIBTIFF@
74LIBJPEG=@LIBJPEG@ 79LIBJPEG=@LIBJPEG@
75LIBPNG=@LIBPNG@ 80LIBPNG=@LIBPNG@
@@ -232,7 +237,7 @@ shared=no
232 237
233/* C_SWITCH_X_SITE must come before C_SWITCH_X_SYSTEM 238/* C_SWITCH_X_SITE must come before C_SWITCH_X_SYSTEM
234 since it may have -I options that should override those two. */ 239 since it may have -I options that should override those two. */
235ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} @c_switch_machine@ @c_switch_system@ @C_SWITCH_X_SITE@ @C_SWITCH_X_SYSTEM@ ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${GCONF_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@ ${DEPFLAGS} 240ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} ${C_SWITCH_MACHINE} ${C_SWITCH_SYSTEM} @C_SWITCH_X_SITE@ @C_SWITCH_X_SYSTEM@ ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${GCONF_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@ ${DEPFLAGS}
236ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@ 241ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@
237 242
238.SUFFIXES: .m 243.SUFFIXES: .m
@@ -968,7 +973,7 @@ window.o: window.c indent.h commands.h frame.h window.h buffer.h termchar.h \
968 keymap.h blockinput.h atimer.h systime.h $(INTERVALS_H) \ 973 keymap.h blockinput.h atimer.h systime.h $(INTERVALS_H) \
969 xterm.h w32term.h nsterm.h nsgui.h lisp.h $(config_h) 974 xterm.h w32term.h nsterm.h nsgui.h lisp.h $(config_h)
970xdisp.o: xdisp.c macros.h commands.h process.h indent.h buffer.h dispextern.h \ 975xdisp.o: xdisp.c macros.h commands.h process.h indent.h buffer.h dispextern.h \
971 coding.h termchar.h frame.h window.h disptab.h termhooks.h character.h \ 976 coding.h termchar.h frame.h window.h disptab.h termhooks.h character.h \
972 charset.h lisp.h $(config_h) keyboard.h $(INTERVALS_H) region-cache.h \ 977 charset.h lisp.h $(config_h) keyboard.h $(INTERVALS_H) region-cache.h \
973 xterm.h w32term.h nsterm.h nsgui.h msdos.h composite.h fontset.h ccl.h \ 978 xterm.h w32term.h nsterm.h nsgui.h msdos.h composite.h fontset.h ccl.h \
974 blockinput.h atimer.h systime.h keymap.h font.h 979 blockinput.h atimer.h systime.h keymap.h font.h
diff --git a/src/m/alpha.h b/src/m/alpha.h
index 80f9d6c02fe..ec0ed92e24a 100644
--- a/src/m/alpha.h
+++ b/src/m/alpha.h
@@ -77,16 +77,6 @@ NOTE-END
77/* #define SYSTEM_MALLOC */ 77/* #define SYSTEM_MALLOC */
78 78
79#ifdef __ELF__ 79#ifdef __ELF__
80/* With ELF, make sure that all common symbols get allocated to in the
81 data section. Otherwise, the dump of temacs may miss variables in
82 the shared library that have been initialized. For example, with
83 GNU libc, __malloc_initialized would normally be resolved to the
84 shared library's .bss section, which is fatal. */
85# ifdef __GNUC__
86# define C_SWITCH_MACHINE -fno-common
87# else
88# error What gives? Fix me if DEC Unix supports ELF now.
89# endif
90 80
91#undef UNEXEC 81#undef UNEXEC
92#define UNEXEC unexelf.o 82#define UNEXEC unexelf.o
diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h
index 2c7f8c06157..f6ed94828d4 100644
--- a/src/s/aix4-2.h
+++ b/src/s/aix4-2.h
@@ -1,6 +1,6 @@
1/* 1/*
2Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 2Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
3 Free Software Foundation, Inc. 3 2010 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -118,13 +118,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
118/* AIX doesn't define this. */ 118/* AIX doesn't define this. */
119#define unix 1 119#define unix 1
120 120
121#ifndef __GNUC__
122/* Some programs in src produce warnings saying certain subprograms
123 are to comples and need a MAXMEM value greater than 2000 for
124 additional optimization. --nils@exp-math.uni-essen.de */
125#define C_SWITCH_SYSTEM -ma -qmaxmem=4000
126#endif
127
128/* string.h defines rindex as a macro, at least with native cc, so we 121/* string.h defines rindex as a macro, at least with native cc, so we
129 lose declaring char * rindex without this. 122 lose declaring char * rindex without this.
130 It is just a guess which versions of AIX need this definition. */ 123 It is just a guess which versions of AIX need this definition. */