Commit | Line | Data |
---|---|---|
3a707ba5 | 1 | /* This file is the configuration file for Linux-based GNU systems |
429ab54e | 2 | Copyright (C) 1985, 1986, 1992, 1994, 1996, 1999, 2001, 2002, 2003, 2004, |
01122546 | 3 | 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
566e3587 JB |
4 | |
5 | This file is part of GNU Emacs. | |
6 | ||
4b158629 | 7 | GNU Emacs is free software: you can redistribute it and/or modify |
566e3587 | 8 | it under the terms of the GNU General Public License as published by |
4b158629 GM |
9 | the Free Software Foundation, either version 3 of the License, or |
10 | (at your option) any later version. | |
566e3587 JB |
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 | |
4b158629 | 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
566e3587 | 19 | |
b49ef455 JB |
20 | /* This file was put together by Michael K. Johnson and Rik Faith. */ |
21 | ||
566e3587 JB |
22 | |
23 | /* | |
24 | * Define symbols to identify the version of Unix this is. | |
25 | * Define all the symbols that apply correctly. | |
26 | */ | |
27 | ||
566e3587 | 28 | #define USG |
8db5530a | 29 | #define GNU_LINUX |
566e3587 JB |
30 | |
31 | /* SYSTEM_TYPE should indicate the kind of system you are using. | |
32 | It sets the Lisp variable system-type. */ | |
33 | ||
3a707ba5 | 34 | #define SYSTEM_TYPE "gnu/linux" /* All the best software is free. */ |
566e3587 | 35 | |
65953053 RS |
36 | #ifndef NOT_C_CODE |
37 | #ifdef emacs | |
b764619d | 38 | #ifdef HAVE_LINUX_VERSION_H |
65953053 | 39 | #include <linux/version.h> |
566e3587 | 40 | |
85a71b37 | 41 | #if LINUX_VERSION_CODE >= 0x20400 |
c5e7567d DN |
42 | /* 21 Jun 06: Eric Hanchrow <offby1@blarg.net> says this works. */ |
43 | #define SIGNALS_VIA_CHARACTERS | |
85a71b37 | 44 | #endif /* LINUX_VERSION_CODE >= 0x20400 */ |
b764619d | 45 | #endif /* HAVE_LINUX_VERSION_H */ |
aa7fcbb0 RS |
46 | #endif /* emacs */ |
47 | #endif /* NOT_C_CODE */ | |
566e3587 | 48 | |
71125fb8 GM |
49 | #if defined HAVE_GRANTPT |
50 | #define UNIX98_PTYS | |
566e3587 | 51 | |
71125fb8 GM |
52 | /* Run only once. We need a `for'-loop because the code uses |
53 | `continue'. */ | |
566e3587 | 54 | |
71125fb8 | 55 | #define PTY_ITERATION for (i = 0; i < 1; i++) |
fdc5e0fc | 56 | |
71125fb8 GM |
57 | #ifdef HAVE_GETPT |
58 | #define PTY_NAME_SPRINTF | |
59 | #define PTY_OPEN fd = getpt () | |
60 | #else /* not HAVE_GETPT */ | |
61 | #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); | |
62 | #endif /* not HAVE_GETPT */ | |
63 | ||
64 | /* Note that grantpt and unlockpt may fork. We must block SIGCHLD to | |
65 | prevent sigchld_handler from intercepting the child's death. */ | |
66 | ||
67 | #define PTY_TTY_NAME_SPRINTF \ | |
68 | { \ | |
69 | char *ptyname; \ | |
70 | \ | |
71 | sigblock (sigmask (SIGCHLD)); \ | |
72 | if (grantpt (fd) == -1 || unlockpt (fd) == -1 \ | |
73 | || !(ptyname = ptsname(fd))) \ | |
74 | { \ | |
75 | sigunblock (sigmask (SIGCHLD)); \ | |
76 | close (fd); \ | |
77 | return -1; \ | |
78 | } \ | |
79 | strncpy (pty_name, ptyname, sizeof (pty_name)); \ | |
80 | pty_name[sizeof (pty_name) - 1] = 0; \ | |
81 | sigunblock (sigmask (SIGCHLD)); \ | |
82 | } | |
fdc5e0fc | 83 | |
dacbb818 | 84 | #else /* not HAVE_GRANTPT */ |
fdc5e0fc | 85 | |
71125fb8 GM |
86 | /* Letter to use in finding device name of first pty, |
87 | if system supports pty's. 'p' means it is /dev/ptyp0 */ | |
fdc5e0fc | 88 | |
71125fb8 | 89 | #define FIRST_PTY_LETTER 'p' |
fdc5e0fc | 90 | |
132d0475 | 91 | #endif /* not HAVE_GRANTPT */ |
fdc5e0fc | 92 | |
71125fb8 GM |
93 | /* Define HAVE_TERMIOS if the system provides POSIX-style |
94 | functions and macros for terminal control. */ | |
566e3587 JB |
95 | |
96 | #define HAVE_TERMIOS | |
97 | ||
71125fb8 | 98 | /* Define HAVE_PTYS if the system supports pty devices. */ |
566e3587 JB |
99 | |
100 | #define HAVE_PTYS | |
101 | ||
dad29761 | 102 | #define HAVE_SOCKETS |
566e3587 JB |
103 | |
104 | /* Define this symbol if your system has the functions bcopy, etc. */ | |
105 | ||
106 | #define BSTRING | |
107 | ||
40c5931c EZ |
108 | /* These are used in Flist_system_processes and Fsystem_process_attributes. */ |
109 | #define HAVE_PROCFS 1 | |
110 | #define LISTPROC procfs_list_system_processes | |
111 | #define PROCATTR procfs_system_process_attributes | |
112 | ||
566e3587 JB |
113 | /* define MAIL_USE_FLOCK if the mailer uses flock |
114 | to interlock access to /usr/spool/mail/$USER. | |
115 | The alternative is that a lock file named | |
116 | /usr/spool/mail/$USER.lock. */ | |
117 | ||
3a707ba5 RS |
118 | /* On GNU/Linux systems, both methods are used by various mail |
119 | programs. I assume that most people are using newer mailers that | |
120 | have heard of flock. Change this if you need to. */ | |
828a3791 DL |
121 | /* Debian contains a patch which says: ``On Debian/GNU/Linux systems, |
122 | configure gets the right answers, and that means *NOT* using flock. | |
123 | Using flock is guaranteed to be the wrong thing. See Debian Policy | |
124 | for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the | |
125 | Debian maintainer hasn't provided a clean fix for Emacs. | |
126 | movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and | |
127 | HAVE_MAILLOCK_H are defined, so the following appears to be the | |
128 | correct logic. -- fx */ | |
47a0ee40 RF |
129 | /* We must check for HAVE_LIBLOCKFILE too, as movemail does. |
130 | liblockfile is a Free Software replacement for libmail, used on | |
131 | Debian systems and elsewhere. -rfr */ | |
828a3791 | 132 | |
47a0ee40 RF |
133 | #if !((defined (HAVE_LIBMAIL) || defined (HAVE_LIBLOCKFILE)) && \ |
134 | defined (HAVE_MAILLOCK_H)) | |
566e3587 | 135 | #define MAIL_USE_FLOCK |
828a3791 | 136 | #endif |
566e3587 JB |
137 | |
138 | /* Define CLASH_DETECTION if you want lock files to be written | |
139 | so that Emacs can tell instantly when you try to modify | |
140 | a file that someone else has modified in his Emacs. */ | |
141 | ||
b2e209ba | 142 | #define CLASH_DETECTION |
566e3587 JB |
143 | |
144 | /* Here, on a separate page, add any special hacks needed | |
145 | to make Emacs work on this system. For example, | |
146 | you might define certain system call names that don't | |
147 | exist on your system, or that do different things on | |
148 | your system and must be used only through an encapsulation | |
149 | (Which you should place, by convention, in sysdep.c). */ | |
150 | \f | |
fde448f4 | 151 | /* This is needed for dispnew.c:update_frame */ |
566e3587 | 152 | |
5e5623c2 | 153 | #ifdef emacs |
a9c82aaf | 154 | #include <stdio.h> /* Get the definition of _IO_STDIO_H. */ |
4dee6d0d | 155 | #if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM) |
5e5623c2 | 156 | /* new C libio names */ |
c2c3f859 | 157 | #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ |
5e5623c2 RS |
158 | ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base) |
159 | #else /* !_IO_STDIO_H */ | |
160 | /* old C++ iostream names */ | |
c2c3f859 | 161 | #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ |
5e5623c2 RS |
162 | ((FILE)->_pptr - (FILE)->_pbase) |
163 | #endif /* !_IO_STDIO_H */ | |
164 | #endif /* emacs */ | |
566e3587 | 165 | |
5101db23 | 166 | /* Ask GCC where to find libgcc.a. */ |
08ddf771 | 167 | #define LIB_GCC `$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name` |
5101db23 | 168 | |
01b79236 | 169 | #define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o |
566e3587 | 170 | |
588a9a3e RS |
171 | /* Here is how to find X Windows. LD_SWITCH_X_SITE_AUX gives an -R option |
172 | says where to find X windows at run time. */ | |
a28c4a8e | 173 | |
f649aa04 RS |
174 | #ifdef __mips__ |
175 | #define LD_SWITCH_SYSTEM -G 0 LD_SWITCH_X_SITE_AUX | |
176 | #else | |
588a9a3e | 177 | #define LD_SWITCH_SYSTEM LD_SWITCH_X_SITE_AUX |
f649aa04 | 178 | #endif /* __mips__ */ |
854ad2d5 AS |
179 | |
180 | /* Link temacs with -z nocombreloc so that unexec works right, whether or | |
75bec752 | 181 | not -z combreloc is the default. GNU ld ignores unknown -z KEYWORD |
854ad2d5 AS |
182 | switches, so this also works with older versions that don't implement |
183 | -z combreloc. */ | |
184 | #define LD_SWITCH_SYSTEM_TEMACS -z nocombreloc | |
588a9a3e | 185 | |
566e3587 | 186 | #ifdef emacs |
65953053 | 187 | #define INTERRUPT_INPUT |
65953053 | 188 | #endif |
566e3587 | 189 | |
566e3587 | 190 | #define SYSV_SYSTEM_DIR /* use dirent.h */ |
566e3587 | 191 | |
1abbab7a | 192 | #define POSIX /* affects getpagesize.h and systty.h */ |
566e3587 JB |
193 | #define POSIX_SIGNALS |
194 | ||
566e3587 JB |
195 | /* Best not to include -lg, unless it is last on the command line */ |
196 | #define LIBS_DEBUG | |
08ddf771 | 197 | #undef LIB_GCC |
4dee6d0d | 198 | #define LIB_GCC |
01b79236 | 199 | #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o |
3233bbe1 | 200 | |
6f10bc9d RS |
201 | /* Don't use -g in test compiles in configure. |
202 | This is so we will use the same shared libs for that linking | |
203 | that are used when linking temacs. */ | |
204 | #ifdef THIS_IS_CONFIGURE | |
205 | #define C_DEBUG_SWITCH | |
206 | #endif | |
207 | ||
edb0cf8d RS |
208 | /* alane@wozzle.linet.org says that -lipc is not a separate library, |
209 | since libc-4.4.1. So -lipc was deleted. */ | |
1077bc04 | 210 | #define LIBS_SYSTEM |
e7b6b572 DL |
211 | /* _BSD_SOURCE is redundant, at least in glibc2, since we define |
212 | _GNU_SOURCE. Left in in case it's relevant to libc5 systems and | |
213 | anyone's still using Emacs on those. --fx 2002-12-14 */ | |
f83a1ae3 | 214 | #define C_SWITCH_SYSTEM -D_BSD_SOURCE |
cafdb68a | 215 | |
c7ce28ce RS |
216 | /* Paul Abrahams <abrahams@equinox.shaysnet.com> says this is needed. */ |
217 | #define LIB_MOTIF -lXm -lXpm | |
218 | ||
be1d1a1a | 219 | #ifdef HAVE_LIBNCURSES |
65953053 | 220 | #define TERMINFO |
565b8b0d | 221 | #define LIBS_TERMCAP -lncurses |
65953053 RS |
222 | #endif |
223 | ||
4dee6d0d | 224 | #define UNEXEC unexelf.o |
8427dec9 | 225 | |
639f52d8 RS |
226 | /* This is to work around mysterious gcc failures in some system versions. |
227 | It is unlikely that Emacs changes will work around this problem; | |
228 | therefore, this should remain permanently. */ | |
e3b89505 RS |
229 | #ifndef HAVE_XRMSETDATABASE |
230 | #define HAVE_XRMSETDATABASE | |
231 | #endif | |
e2000885 | 232 | |
3743c30c RS |
233 | /* Use BSD process groups, but use setpgid() instead of setpgrp() to |
234 | actually set a process group. */ | |
340074e9 | 235 | /* Interesting: only GNU/Linux defines this, but the BSDs do not... */ |
3743c30c | 236 | #define BSD_PGRPS |
e0a6ee5e | 237 | |
2327e4a0 GM |
238 | #define NARROWPROTO 1 |
239 | ||
e0a6ee5e RS |
240 | /* Use mmap directly for allocating larger buffers. */ |
241 | #ifdef DOUG_LEA_MALLOC | |
242 | #undef REL_ALLOC | |
243 | #endif | |
bb15bd9a DL |
244 | |
245 | /* Tell that garbage collector that setjmp is known to save all | |
246 | registers relevant for conservative garbage collection in the | |
247 | jmp_buf. */ | |
e7b6b572 DL |
248 | /* Not all the architectures are tested, but there are Debian packages |
249 | for SCM and/or Guile on them, so the technique must work. See also | |
250 | comments in alloc.c concerning setjmp and gcc. Fixme: it's | |
251 | probably safe to make this conditional just on GCC, except for ia64 | |
252 | register window-flushing. */ | |
a8f77aaa GM |
253 | /* Don't use #cpu here since in newest development versions of GCC, |
254 | we must call cpp with -traditional, and that disables #cpu. */ | |
255 | ||
e7b6b572 DL |
256 | #if defined __i386__ || defined __sparc__ || defined __mc68000__ \ |
257 | || defined __alpha__ || defined __mips__ || defined __s390__ \ | |
e3177e43 AS |
258 | || defined __arm__ || defined __powerpc__ || defined __amd64__ \ |
259 | || defined __ia64__ | |
bb15bd9a | 260 | #define GC_SETJMP_WORKS 1 |
ecf4d726 | 261 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS |
72bba9f2 AS |
262 | #ifdef __mc68000__ |
263 | #define GC_LISP_OBJECT_ALIGNMENT 2 | |
264 | #endif | |
e3177e43 AS |
265 | #ifdef __ia64__ |
266 | #define GC_MARK_SECONDARY_STACK() \ | |
267 | do { \ | |
268 | extern void *__libc_ia64_register_backing_store_base; \ | |
269 | __builtin_ia64_flushrs (); \ | |
270 | mark_memory (__libc_ia64_register_backing_store_base, \ | |
fbb7c02f | 271 | __builtin_ia64_bsp (), 0); \ |
e3177e43 AS |
272 | } while (0) |
273 | #endif | |
bb15bd9a | 274 | #endif |
ab5796a9 MB |
275 | |
276 | /* arch-tag: 6244ea2a-abd0-44ec-abec-ff3dcc9afea9 | |
277 | (do not change this comment) */ |