]> git.ipfire.org Git - thirdparty/bash.git/blame - config-bot.h
fix for SIGINT in sourced script
[thirdparty/bash.git] / config-bot.h
CommitLineData
28ef6c31 1/* config-bot.h */
ccc6cda3
JA
2/* modify settings or make new ones based on what autoconf tells us. */
3
3185942a 4/* Copyright (C) 1989-2009 Free Software Foundation, Inc.
7117c2d2
JA
5
6 This file is part of GNU Bash, the Bourne Again SHell.
7
3185942a
JA
8 Bash is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
7117c2d2 12
3185942a
JA
13 Bash is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
7117c2d2 17
3185942a
JA
18 You should have received a copy of the GNU General Public License
19 along with Bash. If not, see <http://www.gnu.org/licenses/>.
20*/
7117c2d2 21
b80f6443
JA
22/*********************************************************/
23/* Modify or set defines based on the configure results. */
24/*********************************************************/
25
ccc6cda3
JA
26#if !defined (HAVE_VPRINTF) && defined (HAVE_DOPRNT)
27# define USE_VFPRINTF_EMULATION
28# define HAVE_VPRINTF
29#endif
30
b80f6443
JA
31#if defined (HAVE_SYS_RESOURCE_H) && defined (HAVE_GETRLIMIT)
32# define HAVE_RESOURCE
33#endif
34
35#if !defined (GETPGRP_VOID)
36# define HAVE_BSD_PGRP
37#endif
38
39/* Try this without testing __STDC__ for the time being. */
40#if defined (HAVE_STDARG_H)
41# define PREFER_STDARG
42# define USE_VARARGS
43#else
44# if defined (HAVE_VARARGS_H)
45# define PREFER_VARARGS
46# define USE_VARARGS
47# endif
48#endif
49
50#if defined (HAVE_SYS_SOCKET_H) && defined (HAVE_GETPEERNAME) && defined (HAVE_NETINET_IN_H)
51# define HAVE_NETWORK
52#endif
53
54#if defined (HAVE_REGEX_H) && defined (HAVE_REGCOMP) && defined (HAVE_REGEXEC)
55# define HAVE_POSIX_REGEXP
56#endif
57
58/* backwards compatibility between different autoconf versions */
59#if HAVE_DECL_SYS_SIGLIST && !defined (SYS_SIGLIST_DECLARED)
60# define SYS_SIGLIST_DECLARED
61#endif
62
63/***********************************************************************/
64/* Unset defines based on what configure reports as missing or broken. */
65/***********************************************************************/
66
ccc6cda3
JA
67/* Ultrix botches type-ahead when switching from canonical to
68 non-canonical mode, at least through version 4.3 */
69#if !defined (HAVE_TERMIOS_H) || !defined (HAVE_TCGETATTR) || defined (ultrix)
70# define TERMIOS_MISSING
71#endif
72
f1be666c
JA
73/* If we have a getcwd(3), but one that does not dynamically allocate memory,
74 #undef HAVE_GETCWD so the replacement in getcwd.c will be built. We do
75 not do this on Solaris, because their implementation of loopback mounts
76 breaks the traditional file system assumptions that getcwd uses. */
77#if defined (HAVE_GETCWD) && defined (GETCWD_BROKEN) && !defined (SOLARIS)
ccc6cda3
JA
78# undef HAVE_GETCWD
79#endif
80
b80f6443
JA
81#if !defined (HAVE_DEV_FD) && defined (NAMED_PIPES_MISSING)
82# undef PROCESS_SUBSTITUTION
ccc6cda3
JA
83#endif
84
b80f6443
JA
85#if defined (JOB_CONTROL_MISSING)
86# undef JOB_CONTROL
ccc6cda3
JA
87#endif
88
b80f6443
JA
89#if defined (STRCOLL_BROKEN)
90# undef HAVE_STRCOLL
91#endif
92
93#if !defined (HAVE_POSIX_REGEXP)
94# undef COND_REGEXP
ccc6cda3
JA
95#endif
96
a0c0a00f
CR
97#if !HAVE_MKSTEMP
98# undef USE_MKSTEMP
99#endif
100
ccc6cda3
JA
101/* If the shell is called by this name, it will become restricted. */
102#if defined (RESTRICTED_SHELL)
103# define RESTRICTED_SHELL_NAME "rbash"
104#endif
105
b80f6443
JA
106/***********************************************************/
107/* Make sure feature defines have necessary prerequisites. */
108/***********************************************************/
109
ccc6cda3
JA
110/* BANG_HISTORY requires HISTORY. */
111#if defined (BANG_HISTORY) && !defined (HISTORY)
112# define HISTORY
113#endif /* BANG_HISTORY && !HISTORY */
114
115#if defined (READLINE) && !defined (HISTORY)
116# define HISTORY
117#endif
118
bb70624e
JA
119#if defined (PROGRAMMABLE_COMPLETION) && !defined (READLINE)
120# undef PROGRAMMABLE_COMPLETION
121#endif
122
ccc6cda3 123#if !defined (V9_ECHO)
bb70624e 124# undef DEFAULT_ECHO_TO_XPG
ccc6cda3
JA
125#endif
126
b72432fd 127#if !defined (PROMPT_STRING_DECODE)
bb70624e 128# undef PPROMPT
b72432fd
JA
129# define PPROMPT "$ "
130#endif
7117c2d2 131
0001803f
CR
132#if !defined (HAVE_SYSLOG) || !defined (HAVE_SYSLOG_H)
133# undef SYSLOG_HISTORY
134#endif
135
7117c2d2
JA
136/************************************************/
137/* check multibyte capability for I18N code */
138/************************************************/
139
140/* For platforms which support the ISO C amendement 1 functionality we
141 support user defined character classes. */
142/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
0628567a 143#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) && defined (HAVE_LOCALE_H)
7117c2d2
JA
144# include <wchar.h>
145# include <wctype.h>
0628567a
JA
146# if defined (HAVE_ISWCTYPE) && \
147 defined (HAVE_ISWLOWER) && \
148 defined (HAVE_ISWUPPER) && \
149 defined (HAVE_MBSRTOWCS) && \
150 defined (HAVE_MBRTOWC) && \
151 defined (HAVE_MBRLEN) && \
152 defined (HAVE_TOWLOWER) && \
153 defined (HAVE_TOWUPPER) && \
154 defined (HAVE_WCHAR_T) && \
155 defined (HAVE_WCTYPE_T) && \
156 defined (HAVE_WINT_T) && \
157 defined (HAVE_WCWIDTH) && \
158 defined (HAVE_WCTYPE)
b80f6443 159 /* system is supposed to support XPG5 */
7117c2d2
JA
160# define HANDLE_MULTIBYTE 1
161# endif
162#endif
163
b80f6443
JA
164/* If we don't want multibyte chars even on a system that supports them, let
165 the configuring user turn multibyte support off. */
166#if defined (NO_MULTIBYTE_SUPPORT)
167# undef HANDLE_MULTIBYTE
168#endif
169
7117c2d2
JA
170/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
171#if HANDLE_MULTIBYTE && !defined (HAVE_MBSTATE_T)
172# define wcsrtombs(dest, src, len, ps) (wcsrtombs) (dest, src, len, 0)
173# define mbsrtowcs(dest, src, len, ps) (mbsrtowcs) (dest, src, len, 0)
174# define wcrtomb(s, wc, ps) (wcrtomb) (s, wc, 0)
175# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
176# define mbrlen(s, n, ps) (mbrlen) (s, n, 0)
177# define mbstate_t int
178#endif
179
180/* Make sure MB_LEN_MAX is at least 16 (some systems define
181 MB_LEN_MAX as 1) */
182#ifdef HANDLE_MULTIBYTE
183# include <limits.h>
184# if defined(MB_LEN_MAX) && (MB_LEN_MAX < 16)
185# undef MB_LEN_MAX
186# endif
187# if !defined (MB_LEN_MAX)
188# define MB_LEN_MAX 16
189# endif
190#endif
191
192/************************************************/
193/* end of multibyte capability checks for I18N */
194/************************************************/
b80f6443
JA
195
196/******************************************************************/
197/* Placeholder for builders to #undef any unwanted features from */
198/* config-top.h or created by configure (such as the default mail */
199/* file for mail checking). */
200/******************************************************************/
201
202/* If you don't want bash to provide a default mail file to check. */
203/* #undef DEFAULT_MAIL_DIRECTORY */