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