aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2010-05-03 20:13:35 -0700
committerGlenn Morris2010-05-03 20:13:35 -0700
commit27a2cdfc50abe67b29740b1230559fa7d7142c22 (patch)
treeef7fc5db07c148685d5f24f953fb066bb7478e70
parenteb21eab59bbe301074cf478f43743d335254d97e (diff)
downloademacs-27a2cdfc50abe67b29740b1230559fa7d7142c22.tar.gz
emacs-27a2cdfc50abe67b29740b1230559fa7d7142c22.zip
Move LD_SWITCH_X_SITE_AUX from cpp to autoconf.
* configure.in (LD_SWITCH_X_SITE_AUX): Use AC_SUBST only, not AC_DEFINE as well. (LD_SWITCH_X_SITE_AUX_RPATH): New output variable. * nt/config.nt (LD_SWITCH_X_SITE_AUX): Remove. * src/s/gnu-linux.h (LD_SWITCH_SYSTEM): Use LD_SWITCH_X_SITE_AUX as a shell variable. * src/s/netbsd.h (LD_SWITCH_SYSTEM_tmp): Remove. (LD_SWITCH_SYSTEM): Use $LD_SWITCH_X_SITE_AUX_RPATH. * src/s/openbsd.h (LD_SWITCH_SYSTEM_tmp): Remove. (LD_SWITCH_SYSTEM): Use $LD_SWITCH_X_SITE_AUX_RPATH instead of LD_SWITCH_SYSTEM_tmp. * src/Makefile.in (LD_SWITCH_X_SITE_AUX, LD_SWITCH_X_SITE_AUX_RPATH): New variables, set by configure.
-rw-r--r--ChangeLog4
-rw-r--r--configure.in15
-rw-r--r--nt/ChangeLog4
-rw-r--r--nt/config.nt4
-rw-r--r--src/ChangeLog10
-rw-r--r--src/Makefile.in5
-rw-r--r--src/s/gnu-linux.h14
-rw-r--r--src/s/netbsd.h8
-rw-r--r--src/s/openbsd.h9
9 files changed, 38 insertions, 35 deletions
diff --git a/ChangeLog b/ChangeLog
index c9b61269fe0..c35a18aee37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
12010-05-04 Glenn Morris <rgm@gnu.org> 12010-05-04 Glenn Morris <rgm@gnu.org>
2 2
3 * configure.in (LD_SWITCH_X_SITE_AUX): Use AC_SUBST only, not AC_DEFINE
4 as well.
5 (LD_SWITCH_X_SITE_AUX_RPATH): New output variable.
6
3 * configure.in (LD_SWITCH_SYSTEM_TEMACS): New output variable. 7 * configure.in (LD_SWITCH_SYSTEM_TEMACS): New output variable.
4 8
5 * configure.in (C_SWITCH_MACHINE, C_SWITCH_SYSTEM): New output 9 * configure.in (C_SWITCH_MACHINE, C_SWITCH_SYSTEM): New output
diff --git a/configure.in b/configure.in
index 48dbff5254f..c7c880d939e 100644
--- a/configure.in
+++ b/configure.in
@@ -917,10 +917,6 @@ configure___ use_mmap_for_buffers=no
917#define LD_SWITCH_SYSTEM 917#define LD_SWITCH_SYSTEM
918#endif 918#endif
919 919
920#ifndef LD_SWITCH_X_SITE_AUX
921#define LD_SWITCH_X_SITE_AUX
922#endif
923
924configure___ ld_switch_system=LD_SWITCH_SYSTEM 920configure___ ld_switch_system=LD_SWITCH_SYSTEM
925 921
926#ifdef THIS_IS_CONFIGURE 922#ifdef THIS_IS_CONFIGURE
@@ -1326,17 +1322,19 @@ fi
1326## Workaround for bug in autoconf <= 2.62. 1322## Workaround for bug in autoconf <= 2.62.
1327## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html 1323## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
1328## No need to do anything special for these standard directories. 1324## No need to do anything special for these standard directories.
1329## This is an experiment, take it out if it causes problems.
1330if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then 1325if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
1331 1326
1332 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'` 1327 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
1333 1328
1334fi 1329fi
1335 1330
1331LD_SWITCH_X_SITE_AUX=
1332LD_SWITCH_X_SITE_AUX_RPATH=
1336if test "${x_libraries}" != NONE; then 1333if test "${x_libraries}" != NONE; then
1337 if test -n "${x_libraries}"; then 1334 if test -n "${x_libraries}"; then
1338 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"` 1335 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
1339 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"` 1336 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
1337 LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'`
1340 fi 1338 fi
1341 x_default_search_path="" 1339 x_default_search_path=""
1342 x_search_path=${x_libraries} 1340 x_search_path=${x_libraries}
@@ -1359,6 +1357,9 @@ ${x_library}/X11/%T/%N%S"
1359 fi 1357 fi
1360 done 1358 done
1361fi 1359fi
1360AC_SUBST(LD_SWITCH_X_SITE_AUX)
1361AC_SUBST(LD_SWITCH_X_SITE_AUX_RPATH)
1362
1362if test "${x_includes}" != NONE && test -n "${x_includes}"; then 1363if test "${x_includes}" != NONE && test -n "${x_includes}"; then
1363 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"` 1364 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
1364fi 1365fi
@@ -2829,7 +2830,6 @@ AC_SUBST(gamedir)
2829AC_SUBST(gameuser) 2830AC_SUBST(gameuser)
2830AC_SUBST(unexec) 2831AC_SUBST(unexec)
2831AC_SUBST(LD_SWITCH_X_SITE) 2832AC_SUBST(LD_SWITCH_X_SITE)
2832AC_SUBST(LD_SWITCH_X_SITE_AUX)
2833AC_SUBST(C_SWITCH_X_SITE) 2833AC_SUBST(C_SWITCH_X_SITE)
2834AC_SUBST(C_SWITCH_X_SYSTEM) 2834AC_SUBST(C_SWITCH_X_SYSTEM)
2835AC_SUBST(CFLAGS) 2835AC_SUBST(CFLAGS)
@@ -2863,9 +2863,6 @@ AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE},
2863 HAVE_X_WINDOWS above and your X libraries aren't in a place that 2863 HAVE_X_WINDOWS above and your X libraries aren't in a place that
2864 your loader can find on its own, you might want to add "-L/..." or 2864 your loader can find on its own, you might want to add "-L/..." or
2865 something similar.]) 2865 something similar.])
2866AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, ${LD_SWITCH_X_SITE_AUX},
2867 [Define LD_SWITCH_X_SITE_AUX with an -R option
2868 in case it's needed (for Solaris, for example).])
2869AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE}, 2866AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE},
2870[Define C_SWITCH_X_SITE to contain any special flags your compiler 2867[Define C_SWITCH_X_SITE to contain any special flags your compiler
2871 may need to deal with X Windows. For instance, if you've defined 2868 may need to deal with X Windows. For instance, if you've defined
diff --git a/nt/ChangeLog b/nt/ChangeLog
index 664d2be8b86..0e5d0a10cc1 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,7 @@
12010-05-04 Glenn Morris <rgm@gnu.org>
2
3 * config.nt (LD_SWITCH_X_SITE_AUX): Remove.
4
12010-04-20 Lewis Perin <perin@panix.com> (tiny change) 52010-04-20 Lewis Perin <perin@panix.com> (tiny change)
2 6
3 * emacs.manifest: Add trustInfo section to Windows manifest. 7 * emacs.manifest: Add trustInfo section to Windows manifest.
diff --git a/nt/config.nt b/nt/config.nt
index f000d53e412..9e223573ea3 100644
--- a/nt/config.nt
+++ b/nt/config.nt
@@ -325,10 +325,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
325 something similar. */ 325 something similar. */
326#undef LD_SWITCH_X_SITE 326#undef LD_SWITCH_X_SITE
327 327
328/* Define LD_SWITCH_X_SITE_AUX with an -R option
329 in case it's needed (for Solaris, for example). */
330#undef LD_SWITCH_X_SITE_AUX
331
332/* Define C_SWITCH_X_SITE to contain any special flags your compiler 328/* Define C_SWITCH_X_SITE to contain any special flags your compiler
333 may need to deal with X Windows. For instance, if you've defined 329 may need to deal with X Windows. For instance, if you've defined
334 HAVE_X_WINDOWS above and your X include files aren't in a place 330 HAVE_X_WINDOWS above and your X include files aren't in a place
diff --git a/src/ChangeLog b/src/ChangeLog
index cbd5088e173..4b24f856125 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,15 @@
12010-05-04 Glenn Morris <rgm@gnu.org> 12010-05-04 Glenn Morris <rgm@gnu.org>
2 2
3 * s/gnu-linux.h (LD_SWITCH_SYSTEM): Use LD_SWITCH_X_SITE_AUX as a shell
4 variable.
5 * s/netbsd.h (LD_SWITCH_SYSTEM_tmp): Remove.
6 (LD_SWITCH_SYSTEM): Use $LD_SWITCH_X_SITE_AUX_RPATH.
7 * s/openbsd.h (LD_SWITCH_SYSTEM_tmp): Remove.
8 (LD_SWITCH_SYSTEM): Use $LD_SWITCH_X_SITE_AUX_RPATH instead of
9 LD_SWITCH_SYSTEM_tmp.
10 * Makefile.in (LD_SWITCH_X_SITE_AUX, LD_SWITCH_X_SITE_AUX_RPATH):
11 New variables, set by configure.
12
3 * s/aix4-2.h (LD_SWITCH_SYSTEM_TEMACS): Move to configure.in. 13 * s/aix4-2.h (LD_SWITCH_SYSTEM_TEMACS): Move to configure.in.
4 * s/darwin.h (HEADERPAD_EXTRA, LIBS_NSGUI): Remove. 14 * s/darwin.h (HEADERPAD_EXTRA, LIBS_NSGUI): Remove.
5 (LD_SWITCH_SYSTEM_TEMACS): Move to configure.in. 15 (LD_SWITCH_SYSTEM_TEMACS): Move to configure.in.
diff --git a/src/Makefile.in b/src/Makefile.in
index fd6493aee29..60b6278f4b1 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -77,6 +77,11 @@ C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
77## This holds any special options for linking temacs only (ie, not 77## This holds any special options for linking temacs only (ie, not
78## used by configure). 78## used by configure).
79LD_SWITCH_SYSTEM_TEMACS=@LD_SWITCH_SYSTEM_TEMACS@ 79LD_SWITCH_SYSTEM_TEMACS=@LD_SWITCH_SYSTEM_TEMACS@
80## Next two must come before LD_SWITCH_SYSTEM.
81## If needed, a -R option that says where to find X windows at run time.
82LD_SWITCH_X_SITE_AUX=@LD_SWITCH_X_SITE_AUX@
83## As above, but using -rpath instead.
84LD_SWITCH_X_SITE_AUX_RPATH=@LD_SWITCH_X_SITE_AUX_RPATH@
80 85
81LIBTIFF=@LIBTIFF@ 86LIBTIFF=@LIBTIFF@
82LIBJPEG=@LIBJPEG@ 87LIBJPEG=@LIBJPEG@
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h
index 948f96a1e40..73241f0c21f 100644
--- a/src/s/gnu-linux.h
+++ b/src/s/gnu-linux.h
@@ -1,6 +1,7 @@
1/* This file is the configuration file for Linux-based GNU systems 1/* This file is the configuration file for Linux-based GNU systems
2 Copyright (C) 1985, 1986, 1992, 1994, 1996, 1999, 2001, 2002, 2003, 2004, 2 Copyright (C) 1985, 1986, 1992, 1994, 1996, 1999, 2001, 2002, 2003, 2004,
3 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 3 2005, 2006, 2007, 2008, 2009, 2010
4 Free Software Foundation, Inc.
4 5
5This file is part of GNU Emacs. 6This file is part of GNU Emacs.
6 7
@@ -171,12 +172,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
171#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o 172#define START_FILES pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o
172 173
173/* Here is how to find X Windows. LD_SWITCH_X_SITE_AUX gives an -R option 174/* Here is how to find X Windows. LD_SWITCH_X_SITE_AUX gives an -R option
174 says where to find X windows at run time. */ 175 that says where to find X windows at run time. */
175 176
176#ifdef __mips__ 177#ifdef __mips__
177#define LD_SWITCH_SYSTEM -G 0 LD_SWITCH_X_SITE_AUX 178#define LD_SWITCH_SYSTEM -G 0 $(LD_SWITCH_X_SITE_AUX)
178#else 179#else
179#define LD_SWITCH_SYSTEM LD_SWITCH_X_SITE_AUX 180#define LD_SWITCH_SYSTEM $(LD_SWITCH_X_SITE_AUX)
180#endif /* __mips__ */ 181#endif /* __mips__ */
181 182
182#ifdef emacs 183#ifdef emacs
@@ -192,11 +193,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
192#define LIB_GCC 193#define LIB_GCC
193#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o 194#define LIB_STANDARD -lgcc -lc -lgcc $(CRT_DIR)/crtn.o
194 195
195/* _BSD_SOURCE is redundant, at least in glibc2, since we define
196 _GNU_SOURCE. Left in in case it's relevant to libc5 systems and
197 anyone's still using Emacs on those. --fx 2002-12-14 */
198/* #define C_SWITCH_SYSTEM -D_BSD_SOURCE */
199
200#ifdef HAVE_LIBNCURSES 196#ifdef HAVE_LIBNCURSES
201#define TERMINFO 197#define TERMINFO
202#define LIBS_TERMCAP -lncurses 198#define LIBS_TERMCAP -lncurses
diff --git a/src/s/netbsd.h b/src/s/netbsd.h
index fd5ccc5fa87..2e48c3580d3 100644
--- a/src/s/netbsd.h
+++ b/src/s/netbsd.h
@@ -43,11 +43,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
43 43
44#define AMPERSAND_FULL_NAME 44#define AMPERSAND_FULL_NAME
45 45
46/* Here is how to find X Windows. LD_SWITCH_X_SITE_AUX gives an -R option 46/* LD_SWITCH_X_SITE_AUX_RPATH gives a -rpath option (which is what
47 says where to find X windows at run time. We convert it to a -rpath option 47 OSF1 uses) that says where to find X windows at run time. */
48 which is what OSF1 uses. */ 48#define LD_SWITCH_SYSTEM $(LD_SWITCH_X_SITE_AUX_RPATH) -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib
49#define LD_SWITCH_SYSTEM_tmp `echo LD_SWITCH_X_SITE_AUX | sed -e 's/-R/-Wl,-rpath,/'`
50#define LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_tmp -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib
51 49
52/* On post 1.3 releases of NetBSD, gcc -nostdlib also clears 50/* On post 1.3 releases of NetBSD, gcc -nostdlib also clears
53 the library search parth, i.e. it won't search /usr/lib 51 the library search parth, i.e. it won't search /usr/lib
diff --git a/src/s/openbsd.h b/src/s/openbsd.h
index 461af7f3964..a6eb837570c 100644
--- a/src/s/openbsd.h
+++ b/src/s/openbsd.h
@@ -3,13 +3,6 @@
3/* Mostly the same as NetBSD. */ 3/* Mostly the same as NetBSD. */
4#include "netbsd.h" 4#include "netbsd.h"
5 5
6/* This very-badly named symbol is conditionally defined in netbsd.h.
7 Better would be either to not need it in the first place, or to choose
8 a more descriptive name. */
9#ifndef LD_SWITCH_SYSTEM_tmp
10#define LD_SWITCH_SYSTEM_tmp /* empty */
11#endif
12
13/* David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this 6/* David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this
14 is necessary. Otherwise Emacs dumps core when run -nw. */ 7 is necessary. Otherwise Emacs dumps core when run -nw. */
15#undef LIBS_TERMCAP 8#undef LIBS_TERMCAP
@@ -21,7 +14,7 @@
21 14
22 /* Han Boetes <han@mijncomputer.nl> says this 15 /* Han Boetes <han@mijncomputer.nl> says this
23 is necessary, otherwise Emacs dumps core on elf systems. */ 16 is necessary, otherwise Emacs dumps core on elf systems. */
24#define LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_tmp -Z 17#define LD_SWITCH_SYSTEM $(LD_SWITCH_X_SITE_AUX_RPATH) -Z
25 18
26/* arch-tag: 7e3f65ca-3f48-4237-933f-2b208b21e8e2 19/* arch-tag: 7e3f65ca-3f48-4237-933f-2b208b21e8e2
27 (do not change this comment) */ 20 (do not change this comment) */