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