76732998ec8a3f304b4cbcee2df13d768ff65bf3
[platform/upstream/bash.git] / config-bot.h
1 /* config-bot.h */
2 /* modify settings or make new ones based on what autoconf tells us. */
3
4 /* Copyright (C) 1989-2002 Free Software Foundation, Inc.
5
6    This file is part of GNU Bash, the Bourne Again SHell.
7
8    Bash is free software; you can redistribute it and/or modify it under
9    the terms of the GNU General Public License as published by the Free
10    Software Foundation; either version 2, or (at your option) any later
11    version.
12
13    Bash is distributed in the hope that it will be useful, but WITHOUT ANY
14    WARRANTY; without even the implied warranty of MERCHANTABILITY or
15    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
16    for more details.
17
18    You should have received a copy of the GNU General Public License along
19    with Bash; see the file COPYING.  If not, write to the Free Software
20    Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
21
22 #if !defined (HAVE_VPRINTF) && defined (HAVE_DOPRNT)
23 #  define USE_VFPRINTF_EMULATION
24 #  define HAVE_VPRINTF
25 #endif
26
27 /* Ultrix botches type-ahead when switching from canonical to
28    non-canonical mode, at least through version 4.3 */
29 #if !defined (HAVE_TERMIOS_H) || !defined (HAVE_TCGETATTR) || defined (ultrix)
30 #  define TERMIOS_MISSING
31 #endif
32
33 /* If we have a getcwd(3), but it calls popen(), #undef HAVE_GETCWD so
34    the replacement in getcwd.c will be built. */
35 #if defined (HAVE_GETCWD) && defined (GETCWD_BROKEN)
36 #  undef HAVE_GETCWD
37 #endif
38
39 #if defined (HAVE_SYS_RESOURCE_H) && defined (HAVE_GETRLIMIT)
40 #  define HAVE_RESOURCE
41 #endif
42
43 #if !defined (GETPGRP_VOID)
44 #  define HAVE_BSD_PGRP
45 #endif
46
47 #if !defined (HAVE_DEV_FD) && defined (NAMED_PIPES_MISSING)
48 #  undef PROCESS_SUBSTITUTION
49 #endif
50
51 /* If the shell is called by this name, it will become restricted. */
52 #if defined (RESTRICTED_SHELL)
53 #  define RESTRICTED_SHELL_NAME "rbash"
54 #endif
55
56 /* BANG_HISTORY requires HISTORY. */
57 #if defined (BANG_HISTORY) && !defined (HISTORY)
58 #  define HISTORY
59 #endif /* BANG_HISTORY && !HISTORY */
60
61 #if defined (READLINE) && !defined (HISTORY)
62 #  define HISTORY
63 #endif
64
65 #if defined (PROGRAMMABLE_COMPLETION) && !defined (READLINE)
66 #  undef PROGRAMMABLE_COMPLETION
67 #endif
68
69 #if !defined (V9_ECHO)
70 #  undef DEFAULT_ECHO_TO_XPG
71 #endif
72
73 #if defined (JOB_CONTROL_MISSING)
74 #  undef JOB_CONTROL
75 #endif
76
77 #if defined (__STDC__) && defined (HAVE_STDARG_H)
78 #  define PREFER_STDARG
79 #  define USE_VARARGS
80 #else
81 #  if defined (HAVE_VARARGS_H)
82 #    define PREFER_VARARGS
83 #    define USE_VARARGS
84 #  endif
85 #endif
86
87 #if defined (STRCOLL_BROKEN)
88 #  undef HAVE_STRCOLL
89 #endif
90
91 #if defined (HAVE_SYS_SOCKET_H) && defined (HAVE_GETPEERNAME) && defined (HAVE_NETINET_IN_H)
92 #  define HAVE_NETWORK
93 #endif
94
95 #if !defined (PROMPT_STRING_DECODE)
96 #  undef PPROMPT
97 #  define PPROMPT "$ "
98 #endif
99
100 /************************************************/
101 /* check multibyte capability for I18N code     */
102 /************************************************/
103
104 /* For platforms which support the ISO C amendement 1 functionality we
105    support user defined character classes.  */
106 /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.  */
107 #if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H)
108 #  include <wchar.h>
109 #  include <wctype.h>
110 #  if defined (HAVE_MBSRTOWCS) /* system is supposed to support XPG5 */
111 #    define HANDLE_MULTIBYTE      1
112 #  endif
113 #endif
114
115 /* Some systems, like BeOS, have multibyte encodings but lack mbstate_t.  */
116 #if HANDLE_MULTIBYTE && !defined (HAVE_MBSTATE_T)
117 #  define wcsrtombs(dest, src, len, ps) (wcsrtombs) (dest, src, len, 0)
118 #  define mbsrtowcs(dest, src, len, ps) (mbsrtowcs) (dest, src, len, 0)
119 #  define wcrtomb(s, wc, ps) (wcrtomb) (s, wc, 0)
120 #  define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
121 #  define mbrlen(s, n, ps) (mbrlen) (s, n, 0)
122 #  define mbstate_t int
123 #endif
124
125 /* Make sure MB_LEN_MAX is at least 16 (some systems define
126    MB_LEN_MAX as 1) */
127 #ifdef HANDLE_MULTIBYTE
128 #  include <limits.h>
129 #  if defined(MB_LEN_MAX) && (MB_LEN_MAX < 16)
130 #    undef MB_LEN_MAX
131 #  endif
132 #  if !defined (MB_LEN_MAX)
133 #    define MB_LEN_MAX 16
134 #  endif
135 #endif
136
137 /************************************************/
138 /* end of multibyte capability checks for I18N  */
139 /************************************************/