0
|
1 /* This file is the configuration file for the GNU/Linux operating system,
|
|
2 prior to version 1.1.56.
|
|
3 Copyright (C) 1985, 1986, 1992, 1994 Free Software Foundation, Inc.
|
|
4
|
|
5 This file is part of GNU Emacs.
|
|
6
|
|
7 GNU Emacs is free software; you can redistribute it and/or modify
|
|
8 it under the terms of the GNU General Public License as published by
|
|
9 the Free Software Foundation; either version 2, or (at your option)
|
|
10 any later version.
|
|
11
|
|
12 GNU Emacs is distributed in the hope that it will be useful,
|
|
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15 GNU General Public License for more details.
|
|
16
|
|
17 You should have received a copy of the GNU General Public License
|
|
18 along with XEmacs; see the file COPYING. If not, write to
|
|
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
20 Boston, MA 02111-1307, USA. */
|
|
21
|
|
22 /* Synched up with: FSF 19.31 (called, ahem ... lignux.h in FSF). */
|
|
23
|
|
24 /* This file was put together by Michael K. Johnson and Rik Faith. */
|
|
25
|
|
26
|
|
27 /*
|
|
28 * Define symbols to identify the version of Unix this is.
|
|
29 * Define all the symbols that apply correctly.
|
|
30 */
|
|
31
|
|
32 /* #define UNIPLUS */
|
|
33 /* #define USG5 */
|
|
34 #define USG
|
|
35 /* #define BSD */
|
|
36 #define LINUX
|
|
37
|
|
38 /* SYSTEM_TYPE should indicate the kind of system you are using.
|
|
39 It sets the Lisp variable system-type. */
|
|
40
|
|
41 #define SYSTEM_TYPE "linux" /* All the best software is free. */
|
|
42
|
|
43 /* Letter to use in finding device name of first pty,
|
|
44 if system supports pty's. 'p' means it is /dev/ptyp0 */
|
|
45
|
|
46 #define FIRST_PTY_LETTER 'p'
|
|
47
|
|
48 /*
|
|
49 * Define HAVE_PTYS if the system supports pty devices.
|
|
50 */
|
|
51
|
|
52 #define HAVE_PTYS
|
|
53
|
|
54 /* define MAIL_USE_FLOCK if the mailer uses flock
|
|
55 to interlock access to /usr/spool/mail/$USER.
|
|
56 The alternative is that a lock file named
|
|
57 /usr/spool/mail/$USER.lock. */
|
|
58
|
|
59 /* Both are used in Linux by different mail programs. I assume that most
|
|
60 people are using newer mailers that have heard of flock. Change this
|
|
61 if you need to. */
|
|
62
|
24
|
63 /*#define MAIL_USE_FLOCK*/
|
0
|
64
|
|
65 /* Here, on a separate page, add any special hacks needed
|
|
66 to make Emacs work on this system. For example,
|
|
67 you might define certain system call names that don't
|
|
68 exist on your system, or that do different things on
|
|
69 your system and must be used only through an encapsulation
|
|
70 (Which you should place, by convention, in sysdep.c). */
|
|
71
|
|
72 /* On POSIX systems the system calls are interruptible by signals
|
|
73 that the user program has elected to catch. Thus the system call
|
|
74 must be retried in these cases. To handle this without massive
|
|
75 changes in the source code, we remap the standard system call names
|
|
76 to names for our own functions in sysdep.c that do the system call
|
|
77 with retries. */
|
|
78
|
|
79 #define INTERRUPTIBLE_OPEN
|
|
80 #define INTERRUPTIBLE_CLOSE
|
|
81 #define INTERRUPTIBLE_IO
|
|
82
|
|
83 /* If you mount the proc file system somewhere other than /proc
|
|
84 you will have to uncomment the following and make the proper
|
|
85 changes */
|
|
86
|
|
87 /* #define LINUX_LDAV_FILE "/proc/loadavg" */
|
|
88
|
|
89 /* This is needed for dispnew.c:update_frame */
|
|
90
|
|
91 #ifdef emacs
|
|
92 #include <stdio.h> /* Get the definition of _IO_STDIO_H. */
|
|
93 #if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM)
|
|
94 /* new C libio names */
|
|
95 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
|
|
96 ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)
|
|
97 #else /* !_IO_STDIO_H */
|
|
98 /* old C++ iostream names */
|
|
99 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
|
|
100 ((FILE)->_pptr - (FILE)->_pbase)
|
|
101 #endif /* !_IO_STDIO_H */
|
|
102 #endif /* emacs */
|
|
103
|
|
104 /* Ask GCC where to find libgcc.a. */
|
|
105 #define LIB_GCC `$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name`
|
|
106
|
|
107 #ifndef __ELF__
|
|
108 /* Linux has crt0.o in a non-standard place */
|
|
109 #define START_FILES pre-crt0.o /usr/lib/crt0.o
|
|
110 #else
|
|
111 #define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
|
|
112 #endif
|
|
113
|
|
114 /* Check the version number of Linux--if it is at least 1.1.56,
|
|
115 it is safe to use SIGIO. If we can't find version.h (could happen
|
|
116 if the user did a `make distclean' or something similar on the
|
|
117 kernel distribution) just assume that SIGIO works, because nearly
|
|
118 everybody should be running Linux 1.2 or later by now. */
|
|
119 #ifndef NOT_C_CODE
|
|
120 #ifdef emacs
|
|
121 #ifdef HAVE_LINUX_VERSION_H
|
|
122 #include <linux/version.h>
|
|
123
|
|
124 #if LINUX_VERSION_CODE < 0x10138
|
|
125 #define BROKEN_SIGIO
|
|
126 #endif /* LINUX_VERSION_CODE < 0x10138 */
|
|
127 #endif /* HAVE_LINUX_VERSION_H */
|
|
128 #endif /* emacs */
|
|
129 #endif /* NOT_C_CODE */
|
|
130
|
|
131 /* This is needed for sysdep.c */
|
|
132
|
|
133 #define NO_SIOCTL_H /* don't have sioctl.h */
|
|
134
|
|
135 #define HAVE_SYS_SIGLIST
|
|
136 #define HAVE_WAIT_HEADER
|
|
137
|
|
138 #define POSIX /* affects getpagesize.h and systty.h */
|
|
139
|
|
140 /* Best not to include -lg, unless it is last on the command line */
|
|
141 #define LIBS_DEBUG
|
|
142 #define LIBS_TERMCAP -ltermcap -lcurses /* save some space with shared libs*/
|
|
143 #ifndef __ELF__
|
|
144 #define LIB_STANDARD -lc /* avoid -lPW */
|
|
145 #else
|
|
146 #undef LIB_GCC
|
|
147 #define LIB_GCC
|
|
148 #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o
|
|
149 #endif
|
|
150
|
|
151 /* Don't use -g in test compiles in configure.
|
|
152 This is so we will use the same shared libs for that linking
|
|
153 that are used when linking temacs. */
|
|
154 #ifdef THIS_IS_CONFIGURE
|
|
155 #define C_DEBUG_SWITCH
|
|
156 #endif
|
|
157
|
|
158 /* Let's try this out, just in case.
|
|
159 Nah. Rik Faith <faith@cs.unc.edu> says it doesn't work well. */
|
|
160 /* #define SIGNALS_VIA_CHARACTERS */
|
|
161
|
|
162 #ifdef TERM
|
|
163 #define LIBS_SYSTEM -lclient
|
|
164 #define C_SWITCH_SYSTEM -D_BSD_SOURCE -I/usr/src/term
|
|
165 #else
|
|
166 /* alane@wozzle.linet.org says that -lipc is not a separate library,
|
|
167 since libc-4.4.1. So -lipc was deleted. */
|
|
168 #define LIBS_SYSTEM
|
|
169
|
|
170 /* XFree86 is built with -DFUNCPROTO=11 -DNARROWPROTO so we better build
|
|
171 XEmacs with these switches too so that X functions get called correctly.
|
|
172 At least XawScrollbarSetThumb needs this. */
|
|
173 #define C_SWITCH_SYSTEM -DFUNCPROTO=11 -DNARROWPROTO -D_BSD_SOURCE
|
|
174 #endif
|
|
175
|
|
176 /* XEmacs change: configure doesn't find this because math.h aliases
|
|
177 rint to __rint so that it's not found. */
|
|
178 #define HAVE_RINT 1
|
|
179
|
|
180 #ifdef __ELF__
|
|
181 #define UNEXEC unexelf.o
|
|
182 #define UNEXEC_USE_MAP_PRIVATE
|
|
183 #endif
|
|
184
|
|
185 #ifdef LINUX_QMAGIC
|
|
186
|
|
187 #define HAVE_TEXT_START
|
|
188 #define UNEXEC unexsunos4.o
|
|
189 #define N_PAGSIZ(x) PAGE_SIZE
|
|
190
|
|
191 #else /* not LINUX_QMAGIC */
|
|
192
|
|
193 #define A_TEXT_OFFSET(hdr) (N_MAGIC(hdr) == QMAGIC ? sizeof (struct exec) : 0)
|
|
194 #define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr))
|
|
195 #define ADJUST_EXEC_HEADER \
|
|
196 unexec_text_start = N_TXTADDR(ohdr) + A_TEXT_OFFSET(ohdr)
|
|
197
|
|
198 #endif /* not LINUX_QMAGIC */
|
|
199
|
|
200 #if 0
|
|
201 /* In 19.23 and 19.24, configure sometimes fails to define these.
|
|
202 It has to do with the fact that configure uses CFLAGS when linking
|
|
203 while Makefile.in.in (erroneously) fails to do so when linking temacs. */
|
|
204 #ifndef HAVE_GETTIMEOFDAY
|
|
205 #define HAVE_GETTIMEOFDAY
|
|
206 #endif
|
|
207 #ifndef HAVE_MKDIR
|
|
208 #define HAVE_MKDIR
|
|
209 #endif
|
|
210 #ifndef HAVE_RMDIR
|
|
211 #define HAVE_RMDIR
|
|
212 #endif
|
|
213 #ifndef HAVE_XSCREENNUMBEROFSCREEN
|
|
214 #define HAVE_XSCREENNUMBEROFSCREEN
|
|
215 #endif
|
|
216 #endif /* 0 */
|
|
217
|
|
218 /* This is to work around mysterious gcc failures in some system versions.
|
|
219 It is unlikely that Emacs changes will work around this problem;
|
|
220 therefore, this should remain permanently. */
|
|
221 #ifndef HAVE_XRMSETDATABASE
|
|
222 #define HAVE_XRMSETDATABASE
|
|
223 #endif
|
|
224
|
|
225 /* XEmacs addition: */
|
|
226 /* Linux defines these in <values.h>, but they can't be used in #if's
|
108
|
227 Include values.h now so that we don't get complaints if it's included
|
|
228 later. This loses with glibc-2 (libc-6) */
|
|
229
|
|
230 /* # include <features.h> */
|
|
231 #if 0
|
|
232 #if !(defined (__GLIBC__) && (__GLIBC__ >= 2))
|
0
|
233
|
|
234 #include <values.h>
|
|
235 #undef SHORTBITS
|
|
236 #undef INTBITS
|
|
237 #undef LONGBITS
|
|
238
|
108
|
239 #endif
|
|
240 #endif
|
0
|
241 /* The regex.o routines are a part of the GNU C-library used with Linux. */
|
|
242 /* However, sometimes they disagree with the src/regex.h that comes with Emacs,
|
|
243 and that can make trouble in etags.c because it gets the regex.h from Emacs
|
|
244 and the function definitions in libc. So turn this off. */
|
|
245 /* XEmacs: in any case, Mule uses different regex routines. */
|
|
246 /* #define REGEXP_IN_LIBC */
|
|
247
|
|
248 /* XEmacs change: the standard linux libc includes regex routines in
|
|
249 it. We have to use our own and have to avoid name conflicts. */
|
|
250
|
|
251 #define re_compile_pattern sys_re_compile_pattern
|
|
252 #define re_search sys_re_search
|
|
253 #define re_search_2 sys_re_search_2
|
|
254 #define re_match_2 sys_re_match_2
|
|
255 #define re_max_failures sys_re_max_failures
|
|
256 #define re_set_syntax sys_re_set_syntax
|
|
257 #define re_set_registers sys_re_set_registers
|
|
258 #define re_compile_fastmap sys_re_compile_fastmap
|
|
259 #define re_match sys_re_match
|
|
260 #define regcomp sys_regcomp
|
|
261 #define regexec sys_regexec
|
|
262 #define regerror sys_regerror
|
|
263 #define regfree sys_regfree
|
|
264
|
|
265 /* XEmacs: Damon Lipparelli says that he incorrectly gets this
|
|
266 defined on his system */
|
|
267 #undef GETTIMEOFDAY_ONE_ARGUMENT
|
|
268
|
|
269 /* Use BSD process groups, but use setpgid() instead of setpgrp() to
|
|
270 actually set a process group. */
|
|
271
|
|
272 /* Formerly "BSD_PGRPS" */
|
|
273
|
|
274 #if 0 /* XEmacs (ben): I'm not convinced this is necessary and it has
|
|
275 lots of possibility of fuckup. */
|
|
276 #define SIGIO_REQUIRES_SEPARATE_PROCESS_GROUP
|
|
277 #endif
|
|
278 /* XEmacs: removed setpgrp() definition because we use setpgid() when
|
|
279 it's available, and autodetect it. */
|
116
|
280
|
|
281 /* glibc fuckage */
|
|
282 #if defined __GLIBC__ && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || __GLIBC__ > 2)
|
|
283 # define GETPGRP_NEEDS_ARG
|
|
284 #endif
|