Commit | Line | Data |
---|---|---|
5101db23 | 1 | /* This file is the configuration file for GNU/Linux operating systems. |
3a22ee35 | 2 | Copyright (C) 1985, 1986, 1992, 1994 Free Software Foundation, Inc. |
566e3587 JB |
3 | |
4 | This file is part of GNU Emacs. | |
5 | ||
6 | GNU Emacs is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 2, or (at your option) | |
9 | any later version. | |
10 | ||
11 | GNU Emacs is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with GNU Emacs; see the file COPYING. If not, write to | |
3b7ad313 EN |
18 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
19 | Boston, MA 02111-1307, USA. */ | |
566e3587 | 20 | |
b49ef455 JB |
21 | /* This file was put together by Michael K. Johnson and Rik Faith. */ |
22 | ||
566e3587 JB |
23 | |
24 | /* | |
25 | * Define symbols to identify the version of Unix this is. | |
26 | * Define all the symbols that apply correctly. | |
27 | */ | |
28 | ||
29 | /* #define UNIPLUS */ | |
30 | /* #define USG5 */ | |
31 | #define USG | |
d391fe09 | 32 | /* #define BSD */ |
566e3587 JB |
33 | #define LINUX |
34 | ||
35 | /* SYSTEM_TYPE should indicate the kind of system you are using. | |
36 | It sets the Lisp variable system-type. */ | |
37 | ||
38 | #define SYSTEM_TYPE "linux" /* All the best software is free. */ | |
39 | ||
40 | /* Emacs can read input using SIGIO and buffering characters itself, | |
41 | or using CBREAK mode and making C-g cause SIGINT. | |
42 | The choice is controlled by the variable interrupt_input. | |
43 | Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO) | |
44 | ||
45 | SIGIO can be used only on systems that implement it (4.2 and 4.3). | |
eb8c3be9 | 46 | CBREAK mode has two disadvantages |
566e3587 JB |
47 | 1) At least in 4.2, it is impossible to handle the Meta key properly. |
48 | I hear that in system V this problem does not exist. | |
49 | 2) Control-G causes output to be discarded. | |
50 | I do not know whether this can be fixed in system V. | |
51 | ||
52 | Another method of doing input is planned but not implemented. | |
53 | It would have Emacs fork off a separate process | |
54 | to read the input and send it to the true Emacs process | |
55 | through a pipe. | |
56 | */ | |
57 | ||
58 | /* There have been suggestions made to add SIGIO to Linux. If this | |
59 | is done, you may, at your discretion, uncomment the line below. | |
60 | */ | |
61 | ||
62 | /* #define INTERRUPT_INPUT */ | |
63 | ||
64 | /* Letter to use in finding device name of first pty, | |
65 | if system supports pty's. 'p' means it is /dev/ptyp0 */ | |
66 | ||
67 | #define FIRST_PTY_LETTER 'p' | |
68 | ||
69 | /* | |
70 | * Define HAVE_TERMIOS if the system provides POSIX-style | |
71 | * functions and macros for terminal control. | |
72 | */ | |
73 | ||
74 | #define HAVE_TERMIOS | |
75 | ||
566e3587 JB |
76 | /* |
77 | * Define HAVE_PTYS if the system supports pty devices. | |
78 | */ | |
79 | ||
80 | #define HAVE_PTYS | |
81 | ||
82 | /* Uncomment this later when other problems are dealt with -mkj */ | |
83 | ||
dad29761 | 84 | #define HAVE_SOCKETS |
566e3587 JB |
85 | |
86 | /* Define this symbol if your system has the functions bcopy, etc. */ | |
87 | ||
88 | #define BSTRING | |
89 | ||
90 | /* subprocesses should be defined if you want to | |
91 | have code for asynchronous subprocesses | |
92 | (as used in M-x compile and M-x shell). | |
93 | This is generally OS dependent, and not supported | |
94 | under most USG systems. */ | |
95 | ||
96 | #define subprocesses | |
97 | ||
98 | /* define MAIL_USE_FLOCK if the mailer uses flock | |
99 | to interlock access to /usr/spool/mail/$USER. | |
100 | The alternative is that a lock file named | |
101 | /usr/spool/mail/$USER.lock. */ | |
102 | ||
103 | /* Both are used in Linux by different mail programs. I assume that most | |
104 | people are using newer mailers that have heard of flock. Change this | |
105 | if you need to. */ | |
106 | ||
107 | #define MAIL_USE_FLOCK | |
108 | ||
109 | /* Define CLASH_DETECTION if you want lock files to be written | |
110 | so that Emacs can tell instantly when you try to modify | |
111 | a file that someone else has modified in his Emacs. */ | |
112 | ||
b2e209ba | 113 | #define CLASH_DETECTION |
566e3587 JB |
114 | |
115 | /* Here, on a separate page, add any special hacks needed | |
116 | to make Emacs work on this system. For example, | |
117 | you might define certain system call names that don't | |
118 | exist on your system, or that do different things on | |
119 | your system and must be used only through an encapsulation | |
120 | (Which you should place, by convention, in sysdep.c). */ | |
121 | \f | |
d391fe09 RS |
122 | /* On POSIX systems the system calls are interruptible by signals |
123 | that the user program has elected to catch. Thus the system call | |
124 | must be retried in these cases. To handle this without massive | |
125 | changes in the source code, we remap the standard system call names | |
126 | to names for our own functions in sysdep.c that do the system call | |
127 | with retries. */ | |
128 | ||
129 | #define read sys_read | |
130 | #define write sys_write | |
131 | #define open sys_open | |
132 | #define close sys_close | |
133 | ||
134 | #define INTERRUPTIBLE_OPEN | |
135 | #define INTERRUPTIBLE_CLOSE | |
136 | #define INTERRUPTIBLE_IO | |
566e3587 JB |
137 | |
138 | /* If you mount the proc file system somewhere other than /proc | |
139 | you will have to uncomment the following and make the proper | |
140 | changes */ | |
141 | ||
142 | /* #define LINUX_LDAV_FILE "/proc/loadavg" */ | |
143 | ||
a9c82aaf | 144 | /* This is needed for disknew.c:update_frame */ |
566e3587 | 145 | |
5e5623c2 | 146 | #ifdef emacs |
a9c82aaf | 147 | #include <stdio.h> /* Get the definition of _IO_STDIO_H. */ |
4dee6d0d | 148 | #if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM) |
5e5623c2 | 149 | /* new C libio names */ |
c2c3f859 | 150 | #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ |
5e5623c2 RS |
151 | ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base) |
152 | #else /* !_IO_STDIO_H */ | |
153 | /* old C++ iostream names */ | |
c2c3f859 | 154 | #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ |
5e5623c2 RS |
155 | ((FILE)->_pptr - (FILE)->_pbase) |
156 | #endif /* !_IO_STDIO_H */ | |
157 | #endif /* emacs */ | |
566e3587 | 158 | |
5101db23 | 159 | /* Ask GCC where to find libgcc.a. */ |
08ddf771 | 160 | #define LIB_GCC `$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name` |
5101db23 | 161 | |
4dee6d0d | 162 | #ifndef __ELF__ |
566e3587 JB |
163 | /* Linux has crt0.o in a non-standard place */ |
164 | #define START_FILES pre-crt0.o /usr/lib/crt0.o | |
4dee6d0d KH |
165 | #else |
166 | #define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o | |
167 | #endif | |
566e3587 | 168 | |
00364e4e RS |
169 | /* As of version 1.1.51, Linux does not actually implement SIGIO. */ |
170 | /* Here we assume that signal.h is already included. */ | |
566e3587 | 171 | #ifdef emacs |
566e3587 | 172 | #undef SIGIO |
0f2256ef RS |
173 | /* Some versions of Linux define SIGURG and SIGPOLL as aliases for SIGIO. |
174 | This prevents lossage in process.c. */ | |
175 | #undef SIGURG | |
176 | #undef SIGPOLL | |
566e3587 JB |
177 | #endif |
178 | ||
179 | /* This is needed for sysdep.c */ | |
180 | ||
566e3587 JB |
181 | #define NO_SIOCTL_H /* don't have sioctl.h */ |
182 | ||
566e3587 JB |
183 | #define HAVE_VFORK |
184 | #define HAVE_SYS_SIGLIST | |
185 | #define HAVE_GETWD /* cure conflict with getcwd? */ | |
186 | ||
566e3587 | 187 | #define SYSV_SYSTEM_DIR /* use dirent.h */ |
566e3587 | 188 | |
1abbab7a | 189 | #define POSIX /* affects getpagesize.h and systty.h */ |
566e3587 JB |
190 | #define POSIX_SIGNALS |
191 | ||
566e3587 JB |
192 | /* Best not to include -lg, unless it is last on the command line */ |
193 | #define LIBS_DEBUG | |
4dee6d0d | 194 | #ifndef __ELF__ |
566e3587 | 195 | #define LIB_STANDARD -lc /* avoid -lPW */ |
4dee6d0d | 196 | #else |
08ddf771 | 197 | #undef LIB_GCC |
4dee6d0d KH |
198 | #define LIB_GCC |
199 | #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o | |
200 | #endif | |
3233bbe1 | 201 | |
6f10bc9d RS |
202 | /* Don't use -g in test compiles in configure. |
203 | This is so we will use the same shared libs for that linking | |
204 | that are used when linking temacs. */ | |
205 | #ifdef THIS_IS_CONFIGURE | |
206 | #define C_DEBUG_SWITCH | |
207 | #endif | |
208 | ||
9e479734 JB |
209 | /* Let's try this out, just in case. |
210 | Nah. Rik Faith <faith@cs.unc.edu> says it doesn't work well. */ | |
211 | /* #define SIGNALS_VIA_CHARACTERS */ | |
9199fa7f JB |
212 | |
213 | /* Rob Malouf <malouf@csli.stanford.edu> says: | |
214 | SYSV IPC is standard a standard part of Linux since version 0.99pl10, | |
215 | and is a very common addition to previous versions. */ | |
cafdb68a RS |
216 | |
217 | #ifdef TERM | |
1077bc04 | 218 | #define LIBS_SYSTEM -lclient |
cafdb68a RS |
219 | #define C_SWITCH_SYSTEM -D_BSD_SOURCE -I/usr/src/term |
220 | #else | |
edb0cf8d RS |
221 | /* alane@wozzle.linet.org says that -lipc is not a separate library, |
222 | since libc-4.4.1. So -lipc was deleted. */ | |
1077bc04 | 223 | #define LIBS_SYSTEM |
cafdb68a RS |
224 | #define C_SWITCH_SYSTEM -D_BSD_SOURCE |
225 | #endif | |
226 | ||
c7ce28ce RS |
227 | /* Paul Abrahams <abrahams@equinox.shaysnet.com> says this is needed. */ |
228 | #define LIB_MOTIF -lXm -lXpm | |
229 | ||
9199fa7f | 230 | #define HAVE_SYSVIPC |
b04101bb | 231 | |
4dee6d0d KH |
232 | #ifdef __ELF__ |
233 | #define UNEXEC unexelf.o | |
baea3bdd | 234 | #define UNEXEC_USE_MAP_PRIVATE |
4dee6d0d KH |
235 | #endif |
236 | ||
8427dec9 RS |
237 | #ifdef LINUX_QMAGIC |
238 | ||
239 | #define HAVE_TEXT_START | |
240 | #define UNEXEC unexsunos4.o | |
241 | #define N_PAGSIZ(x) PAGE_SIZE | |
242 | ||
243 | #else /* not LINUX_QMAGIC */ | |
244 | ||
b04101bb RS |
245 | #define A_TEXT_OFFSET(hdr) (N_MAGIC(hdr) == QMAGIC ? sizeof (struct exec) : 0) |
246 | #define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr)) | |
247 | #define ADJUST_EXEC_HEADER \ | |
248 | unexec_text_start = N_TXTADDR(ohdr) + A_TEXT_OFFSET(ohdr) | |
967ac200 | 249 | |
8427dec9 RS |
250 | #endif /* not LINUX_QMAGIC */ |
251 | ||
6f10bc9d | 252 | #if 0 |
967ac200 RS |
253 | /* In 19.23 and 19.24, configure sometimes fails to define these. |
254 | It has to do with the fact that configure uses CFLAGS when linking | |
255 | while Makefile.in.in (erroneously) fails to do so when linking temacs. */ | |
256 | #ifndef HAVE_GETTIMEOFDAY | |
257 | #define HAVE_GETTIMEOFDAY | |
258 | #endif | |
259 | #ifndef HAVE_MKDIR | |
260 | #define HAVE_MKDIR | |
261 | #endif | |
262 | #ifndef HAVE_RMDIR | |
263 | #define HAVE_RMDIR | |
264 | #endif | |
265 | #ifndef HAVE_XSCREENNUMBEROFSCREEN | |
266 | #define HAVE_XSCREENNUMBEROFSCREEN | |
267 | #endif | |
639f52d8 RS |
268 | #endif /* 0 */ |
269 | ||
270 | /* This is to work around mysterious gcc failures in some system versions. | |
271 | It is unlikely that Emacs changes will work around this problem; | |
272 | therefore, this should remain permanently. */ | |
e3b89505 RS |
273 | #ifndef HAVE_XRMSETDATABASE |
274 | #define HAVE_XRMSETDATABASE | |
275 | #endif | |
e2000885 RS |
276 | |
277 | /* The regex.o routines are a part of the GNU C-library used with Linux. */ | |
ea18e284 RS |
278 | /* However, sometimes they disagree with the src/regex.h that comes with Emacs, |
279 | and that can make trouble in etags.c because it gets the regex.h from Emacs | |
280 | and the function definitions in libc. So turn this off. */ | |
281 | /* #define REGEXP_IN_LIBC */ | |
282 |