1 |
pcg |
1.1 |
dnl# -*- sh -*- |
2 |
|
|
dnl# |
3 |
|
|
dnl# Process this file with autoconf to produce a configure script. |
4 |
|
|
dnl# |
5 |
|
|
AC_INIT(src/feature.h) |
6 |
|
|
AC_CONFIG_AUX_DIR(autoconf) |
7 |
|
|
AC_CONFIG_HEADER(config.h:autoconf/config.h.in) |
8 |
|
|
|
9 |
|
|
dnl RXVT version |
10 |
|
|
changequote(, )dnl |
11 |
|
|
VERSION=`sed -n -e 's/^.*[ \t]VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
12 |
|
|
DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
13 |
|
|
LSMDATE=`sed -n -e 's/^.*[ \t]LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
14 |
|
|
LIBVERSION=`sed -n -e 's/^.*[ \t]LIBVERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
15 |
|
|
changequote([, ])dnl |
16 |
|
|
AC_SUBST(VERSION)dnl |
17 |
|
|
AC_SUBST(DATE)dnl |
18 |
|
|
AC_SUBST(LSMDATE)dnl |
19 |
|
|
AC_SUBST(LIBVERSION)dnl |
20 |
|
|
echo "" |
21 |
|
|
echo "configuring for rxvt $VERSION" |
22 |
|
|
echo "" |
23 |
|
|
|
24 |
|
|
dnl# Checks for programs. |
25 |
|
|
dnl AC_MAKE_SET |
26 |
|
|
|
27 |
|
|
AC_PROG_CC |
28 |
|
|
AC_PROG_CXX |
29 |
|
|
AC_PROG_CPP |
30 |
|
|
AC_PROG_INSTALL |
31 |
|
|
AC_PROG_AWK |
32 |
|
|
|
33 |
pcg |
1.16 |
AC_LANG(C) |
34 |
|
|
|
35 |
|
|
LINKER="$CXX" |
36 |
|
|
if test x$GCC = xyes && test x$GXX = xyes; then |
37 |
|
|
AC_CHECK_LIB(supc++, main, [ |
38 |
|
|
LINKER="$CC" |
39 |
|
|
LIBS="$LIBS -lsupc++" |
40 |
|
|
]) |
41 |
|
|
fi |
42 |
|
|
AC_SUBST(LINKER,[$LINKER]) |
43 |
|
|
|
44 |
|
|
CPPFLAGS="-D_GNU_SOURCE -D_XOPEN_SOURCE" |
45 |
|
|
|
46 |
pcg |
1.24 |
dnl if test x$GXX = xyes; then |
47 |
|
|
dnl CXXFLAGS="$CXXFLAGS" dnl I once had -fno-exceptions, but I am using them now... |
48 |
|
|
dnl fi |
49 |
pcg |
1.16 |
|
50 |
|
|
AC_LANG(C++) |
51 |
|
|
|
52 |
pcg |
1.1 |
dnl# system hacks |
53 |
|
|
AC_AIX |
54 |
|
|
AC_ISC_POSIX |
55 |
|
|
|
56 |
pcg |
1.26 |
dnl# FreeBSD needs to link libxpg4 |
57 |
|
|
AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"]) |
58 |
|
|
|
59 |
|
|
dnl solaris needs to link libnsl and socket |
60 |
|
|
AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"]) |
61 |
|
|
AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"]) |
62 |
|
|
|
63 |
pcg |
1.1 |
AC_ENABLE_SHARED(no)dnl# libtool |
64 |
|
|
AC_ENABLE_STATIC(yes)dnl# libtool |
65 |
|
|
AC_PROG_LIBTOOL()dnl# libtool |
66 |
|
|
|
67 |
|
|
MALLOC_TYPE=S |
68 |
|
|
support_addstrings=no |
69 |
|
|
support_frills=no |
70 |
|
|
support_linespace=no |
71 |
|
|
support_inheritpixmap=no |
72 |
pcg |
1.25 |
support_tinting=no |
73 |
root |
1.28 |
support_fading=no |
74 |
pcg |
1.1 |
support_keepscrolling=no |
75 |
|
|
support_selectionscrolling=no |
76 |
|
|
support_menubar=no |
77 |
|
|
support_mousewheel=no |
78 |
|
|
support_mouseslipwheel=no |
79 |
|
|
support_utmp=no |
80 |
|
|
support_wtmp=no |
81 |
|
|
support_lastlog=no |
82 |
|
|
support_cursor_blink=no |
83 |
pcg |
1.6 |
support_text_blink=no |
84 |
pcg |
1.1 |
support_pointer_blank=no |
85 |
|
|
support_scroll_rxvt=no |
86 |
|
|
support_scroll_next=no |
87 |
|
|
support_scroll_xterm=no |
88 |
pcg |
1.11 |
support_scroll_plain=no |
89 |
pcg |
1.1 |
support_xim=no |
90 |
|
|
support_xpm=no |
91 |
|
|
support_xft=no |
92 |
|
|
support_unicode3=no |
93 |
pcg |
1.18 |
support_combining=no |
94 |
root |
1.27 |
support_8bitctrls=no |
95 |
pcg |
1.1 |
codesets= |
96 |
|
|
|
97 |
|
|
dnl# -------------------------------------------------------------------------- |
98 |
|
|
dnl# CHECKING COMMAND LINE OPTIONS |
99 |
|
|
dnl# -------------------------------------------------------------------------- |
100 |
|
|
|
101 |
|
|
if test "x$enable_shared" = xyes; then |
102 |
|
|
AC_DEFINE(LIBRXVT, 1, Build shared library version - specify via configure only) |
103 |
|
|
INSTALL_LIBRXVT=yes |
104 |
|
|
fi |
105 |
|
|
AC_SUBST(INSTALL_LIBRXVT) |
106 |
|
|
|
107 |
|
|
AC_ARG_ENABLE(everything, |
108 |
pcg |
1.15 |
[ --enable-everything enable standard non-multichoice features |
109 |
pcg |
1.1 |
NOTE: this option is order dependent |
110 |
|
|
NOTE: automatically enabled with --enable-shared], |
111 |
|
|
[if test x$enableval = xyes; then |
112 |
|
|
support_24bit=yes |
113 |
|
|
support_frills=yes |
114 |
|
|
support_linespace=yes |
115 |
|
|
support_inheritpixmap=yes |
116 |
pcg |
1.25 |
support_tinting=yes |
117 |
root |
1.28 |
support_fading=yes |
118 |
pcg |
1.1 |
support_keepscrolling=yes |
119 |
|
|
support_selectionscrolling=yes |
120 |
|
|
support_lastlog=yes |
121 |
|
|
support_menubar=yes |
122 |
|
|
support_mousewheel=yes |
123 |
|
|
support_mouseslipwheel=yes |
124 |
|
|
support_cursor_blink=yes |
125 |
pcg |
1.6 |
support_text_blink=yes |
126 |
pcg |
1.1 |
support_pointer_blank=yes |
127 |
|
|
support_scroll_rxvt=yes |
128 |
|
|
support_scroll_next=yes |
129 |
|
|
support_scroll_xterm=yes |
130 |
pcg |
1.11 |
support_scroll_plain=yes |
131 |
pcg |
1.1 |
support_utmp=yes |
132 |
|
|
support_wtmp=yes |
133 |
|
|
support_xim=yes |
134 |
|
|
support_xpm=yes |
135 |
|
|
support_xft=yes |
136 |
|
|
support_unicode3=yes |
137 |
pcg |
1.18 |
support_combining=yes |
138 |
root |
1.27 |
#support_8bitctrls=yes |
139 |
pcg |
1.1 |
codesets=all |
140 |
|
|
fi]) |
141 |
|
|
|
142 |
|
|
AC_ARG_ENABLE(unicode3, |
143 |
|
|
[ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters], |
144 |
pcg |
1.15 |
[if test x$enableval = xyes -o x$enableval = xno; then |
145 |
pcg |
1.1 |
support_unicode3=yes |
146 |
|
|
fi]) |
147 |
|
|
|
148 |
pcg |
1.18 |
AC_ARG_ENABLE(combining, |
149 |
|
|
[ --enable-combining enable composition of base and combining characters], |
150 |
|
|
[if test x$enableval = xyes -o x$enableval = xno; then |
151 |
|
|
support_combining=yes |
152 |
|
|
fi]) |
153 |
|
|
|
154 |
pcg |
1.1 |
AC_ARG_ENABLE(xft, |
155 |
pcg |
1.17 |
[ --enable-xft enable xft support on systems that have it], |
156 |
pcg |
1.15 |
[if test x$enableval = xyes -o x$enableval = xno; then |
157 |
pcg |
1.1 |
support_xft=yes |
158 |
|
|
fi]) |
159 |
|
|
|
160 |
|
|
AC_ARG_ENABLE(utmp, |
161 |
pcg |
1.8 |
[ --enable-utmp enable utmp (utmpx) support], |
162 |
pcg |
1.1 |
[if test x$enableval = xyes -o x$enableval = xno; then |
163 |
|
|
support_utmp=$enableval |
164 |
|
|
fi]) |
165 |
|
|
|
166 |
|
|
AC_ARG_ENABLE(wtmp, |
167 |
pcg |
1.8 |
[ --enable-wtmp enable wtmp (wtmpx) support (requires --enable-utmp)], |
168 |
pcg |
1.1 |
[if test x$enableval = xyes -o x$enableval = xno; then |
169 |
|
|
support_wtmp=$enableval |
170 |
|
|
fi]) |
171 |
|
|
|
172 |
|
|
AC_ARG_ENABLE(lastlog, |
173 |
pcg |
1.8 |
[ --enable-lastlog enable lastlog support (requires --enable-utmp)], |
174 |
pcg |
1.1 |
[if test x$enableval = xyes -o x$enableval = xno; then |
175 |
|
|
support_lastlog=$enableval |
176 |
|
|
fi]) |
177 |
|
|
|
178 |
|
|
AC_ARG_ENABLE(xpm-background, |
179 |
pcg |
1.8 |
[ --enable-xpm-background enable XPM background pixmaps], |
180 |
pcg |
1.1 |
[if test x$enableval = xyes -o x$enableval = xno; then |
181 |
|
|
support_xpm=$enableval |
182 |
|
|
fi]) |
183 |
|
|
|
184 |
|
|
AC_ARG_ENABLE(transparency, |
185 |
pcg |
1.8 |
[ --enable-transparency enable transparent backgrounds], |
186 |
pcg |
1.1 |
[if test x$enableval = xyes -o x$enableval = xno; then |
187 |
|
|
support_inheritpixmap=$enableval |
188 |
|
|
fi]) |
189 |
|
|
|
190 |
pcg |
1.25 |
AC_ARG_ENABLE(tinting, |
191 |
|
|
[ --enable-tinting enable tinting of transparent bg], |
192 |
|
|
[if test x$enableval = xyes -o x$enableval = xno; then |
193 |
|
|
support_tinting=$enableval |
194 |
|
|
fi]) |
195 |
|
|
|
196 |
root |
1.28 |
AC_ARG_ENABLE(fading, |
197 |
root |
1.29 |
[ --enable-fading enable colors fading when off focus], |
198 |
root |
1.28 |
[if test x$enableval = xyes -o x$enableval = xno; then |
199 |
|
|
support_fading=$enableval |
200 |
|
|
fi]) |
201 |
|
|
|
202 |
pcg |
1.1 |
AC_ARG_ENABLE(menubar, |
203 |
pcg |
1.8 |
[ --enable-menubar enable menubar], |
204 |
pcg |
1.1 |
[if test x$enableval = xyes -o x$enableval = xno; then |
205 |
|
|
support_menubar=$enableval |
206 |
|
|
fi]) |
207 |
|
|
|
208 |
|
|
AC_ARG_ENABLE(rxvt-scroll, |
209 |
pcg |
1.8 |
[ --enable-rxvt-scroll enable rxvt style scrollbar], |
210 |
pcg |
1.1 |
[if test x$enableval = xyes -o x$enableval = xno; then |
211 |
|
|
support_scroll_rxvt=$enableval |
212 |
|
|
fi]) |
213 |
|
|
|
214 |
|
|
AC_ARG_ENABLE(next-scroll, |
215 |
pcg |
1.8 |
[ --enable-next-scroll enable NeXT style scrollbar], |
216 |
pcg |
1.1 |
[if test x$enableval = xyes -o x$enableval = xno; then |
217 |
|
|
support_scroll_next=$enableval |
218 |
|
|
fi]) |
219 |
|
|
|
220 |
|
|
AC_ARG_ENABLE(xterm-scroll, |
221 |
pcg |
1.8 |
[ --enable-xterm-scroll enable Xterm style scrollbar], |
222 |
pcg |
1.1 |
[if test x$enableval = xyes -o x$enableval = xno; then |
223 |
|
|
support_scroll_xterm=$enableval |
224 |
|
|
fi]) |
225 |
|
|
|
226 |
pcg |
1.11 |
AC_ARG_ENABLE(plain-scroll, |
227 |
|
|
[ --enable-plain-scroll enable plain style scrollbar], |
228 |
|
|
[if test x$enableval = xyes -o x$enableval = xno; then |
229 |
|
|
support_scroll_plain=$enableval |
230 |
|
|
fi]) |
231 |
|
|
|
232 |
pcg |
1.1 |
AC_ARG_ENABLE(half-shadow, |
233 |
|
|
[ --enable-half-shadow use half width/height shadow on rxvt scrollbar], |
234 |
|
|
[if test x$enableval = xyes; then |
235 |
|
|
AC_DEFINE(HALFSHADOW, 1, Define if you want the depth of scrollbars and menus to be less) |
236 |
|
|
fi]) |
237 |
|
|
|
238 |
pcg |
1.17 |
AC_ARG_WITH(codesets, |
239 |
|
|
[ --with-codesets=NAME,.. compile in additional codesets (jp,jp_ext,kr,cn,cn_ext,all)], |
240 |
|
|
[codesets="$withval"]) |
241 |
|
|
|
242 |
pcg |
1.1 |
AC_ARG_ENABLE(xim, |
243 |
pcg |
1.8 |
[ --enable-xim XIM (X Input Method) protocol support], |
244 |
pcg |
1.1 |
[if test x$enableval = xyes -o x$enableval = xno; then |
245 |
|
|
support_xim=$enableval |
246 |
|
|
fi]) |
247 |
|
|
|
248 |
|
|
AC_ARG_ENABLE(ttygid, |
249 |
|
|
[ --enable-ttygid enable tty setting to group named "tty"], |
250 |
|
|
[if test x$enableval = xyes; then |
251 |
|
|
AC_DEFINE(TTY_GID_SUPPORT, 1, Define to change gid of ttys to group tty) |
252 |
|
|
fi]) |
253 |
|
|
|
254 |
|
|
AC_ARG_ENABLE(backspace-key, |
255 |
|
|
[ --disable-backspace-key disable handling of the backspace key], |
256 |
|
|
[if test x$enableval = xno; then |
257 |
|
|
AC_DEFINE(NO_BACKSPACE_KEY, 1, Define if you don't want support for the backspace key) |
258 |
|
|
fi]) |
259 |
|
|
|
260 |
|
|
AC_ARG_ENABLE(delete-key, |
261 |
|
|
[ --disable-delete-key disable handling of the delete key], |
262 |
|
|
[if test x$enableval = xno; then |
263 |
|
|
AC_DEFINE(NO_DELETE_KEY, 1, Define if you don't want support for the (non-keypad) delete key) |
264 |
|
|
fi]) |
265 |
|
|
|
266 |
|
|
AC_ARG_ENABLE(resources, |
267 |
|
|
[ --disable-resources disable all resource checking], |
268 |
|
|
[if test x$enableval = xno; then |
269 |
|
|
AC_DEFINE(NO_RESOURCES, 1, Define if you don't want any resources read) |
270 |
|
|
fi]) |
271 |
|
|
|
272 |
|
|
AC_ARG_ENABLE(xgetdefault, |
273 |
|
|
[ --enable-xgetdefault enable resources via X instead of our small version], |
274 |
|
|
[if test x$enableval = xyes; then |
275 |
|
|
AC_DEFINE(USE_XGETDEFAULT, 1, Define if you want to use XGetDefault instead of our internal version) |
276 |
|
|
fi]) |
277 |
|
|
|
278 |
root |
1.27 |
AC_ARG_ENABLE(8bitctrls, |
279 |
|
|
[ --enable-8bitctrls enable 8 bit control sequences (not recommended)], |
280 |
|
|
[if test x$enableval = xyes -o x$enableval = xno; then |
281 |
|
|
support_8bitctrls=yes |
282 |
|
|
fi]) |
283 |
|
|
|
284 |
pcg |
1.17 |
RESFALLBACK=Rxvt |
285 |
|
|
AC_ARG_ENABLE(fallback, |
286 |
|
|
[ --enable-fallback(=CLASS) fall back on CLASS resources in addition to URxvt ones (default: Rxvt)], |
287 |
|
|
[ |
288 |
|
|
test x$enableval = xyes && enableval=Rxvt |
289 |
|
|
test x$enableval = xno && enableval= |
290 |
|
|
RESFALLBACK="$enableval" |
291 |
|
|
]) |
292 |
|
|
|
293 |
|
|
if test x$RESFALLBACK != x; then |
294 |
|
|
AC_DEFINE_UNQUOTED(RESFALLBACK, "$RESFALLBACK", [Fallback resource class]) |
295 |
|
|
fi |
296 |
|
|
|
297 |
|
|
RESNAME=urxvt |
298 |
|
|
AC_ARG_WITH(res-name, |
299 |
|
|
[ --with-res-name=NAME use this as default resource name (default: urxvt)], |
300 |
|
|
[RESNAME="$withval"]) |
301 |
|
|
AC_DEFINE_UNQUOTED(RESNAME,"$RESNAME", [Default resource name]) |
302 |
|
|
|
303 |
|
|
RESCLASS=URxvt |
304 |
|
|
AC_ARG_WITH(res-class, |
305 |
|
|
[ --with-res-class=CLASS use this as the resource class (default: URxvt)], |
306 |
|
|
[RESCLASS="$withval"]) |
307 |
|
|
AC_DEFINE_UNQUOTED(RESCLASS,"$RESCLASS", [Resource class]) |
308 |
|
|
|
309 |
|
|
RXVTNAME=urxvt |
310 |
|
|
AC_ARG_WITH(name, |
311 |
|
|
[ --with-name=NAME set the basename for the installed binaries (default: urxvt)], |
312 |
|
|
[RXVTNAME="$withval"]) |
313 |
|
|
|
314 |
|
|
RXVTNAME=`echo "$RXVTNAME"|sed "$program_transform_name"` |
315 |
|
|
AC_SUBST(RXVTNAME) |
316 |
|
|
|
317 |
pcg |
1.1 |
AC_ARG_ENABLE(strings, |
318 |
|
|
[ --enable-strings enable some replacement system functions], |
319 |
|
|
[if test x$enableval = xyes -o x$enableval = xno; then |
320 |
|
|
support_addstrings=$enableval |
321 |
|
|
fi]) |
322 |
|
|
|
323 |
|
|
AC_ARG_ENABLE(swapscreen, |
324 |
|
|
[ --disable-swapscreen disable swap screen support], |
325 |
|
|
[if test x$enableval = xno; then |
326 |
|
|
AC_DEFINE(NO_SECONDARY_SCREEN, 1, Disable the secondary screen. Many programs use the secondary screen as their workplace) |
327 |
|
|
fi]) |
328 |
|
|
|
329 |
|
|
AC_ARG_ENABLE(frills, |
330 |
pcg |
1.8 |
[ --enable-frills enable support for rarely used features], |
331 |
pcg |
1.1 |
[if test x$enableval = xyes -o x$enableval = xno; then |
332 |
|
|
support_frills=$enableval |
333 |
|
|
fi]) |
334 |
|
|
|
335 |
|
|
AC_ARG_ENABLE(linespace, |
336 |
pcg |
1.8 |
[ --enable-linespace enable support for linespace], |
337 |
pcg |
1.1 |
[if test x$enableval = xyes -o x$enableval = xno; then |
338 |
|
|
support_linespace=$enableval |
339 |
|
|
fi]) |
340 |
|
|
|
341 |
|
|
AC_ARG_ENABLE(24bit, |
342 |
pcg |
1.8 |
[ --enable-24bit enable support for using 24bit visuals if available], |
343 |
pcg |
1.1 |
[if test x$enableval = xyes -o x$enableval = xno; then |
344 |
|
|
support_24bit=$enableval |
345 |
|
|
fi]) |
346 |
|
|
|
347 |
|
|
AC_ARG_ENABLE(keepscrolling, |
348 |
pcg |
1.8 |
[ --enable-keepscrolling enable continual scrolling on scrollbar arrow press], |
349 |
pcg |
1.1 |
[if test x$enableval = xyes -o x$enableval = xno; then |
350 |
|
|
support_keepscrolling=$enableval |
351 |
|
|
fi]) |
352 |
|
|
|
353 |
|
|
AC_ARG_ENABLE(selectionscrolling, |
354 |
pcg |
1.8 |
[ --enable-selectionscrolling enable scrolling during selections], |
355 |
pcg |
1.1 |
[if test x$enableval = xyes -o x$enableval = xno; then |
356 |
|
|
support_selectionscrolling=$enableval |
357 |
|
|
fi]) |
358 |
|
|
|
359 |
|
|
AC_ARG_ENABLE(mousewheel, |
360 |
pcg |
1.8 |
[ --enable-mousewheel enable scrolling via mouse wheel or buttons 4 & 5], |
361 |
pcg |
1.1 |
[if test x$enableval = xyes -o x$enableval = xno; then |
362 |
|
|
support_mousewheel=$enableval |
363 |
|
|
fi]) |
364 |
|
|
|
365 |
|
|
AC_ARG_ENABLE(slipwheeling, |
366 |
pcg |
1.8 |
[ --enable-slipwheeling enable slip wheel scrolling (requires previous)], |
367 |
pcg |
1.1 |
[if test x$enableval = xyes -o x$enableval = xno; then |
368 |
|
|
support_mouseslipwheel=$enableval |
369 |
|
|
fi]) |
370 |
|
|
|
371 |
|
|
AC_ARG_ENABLE(dmalloc, |
372 |
|
|
[ --enable-dmalloc enable Gray Watson's malloc - for debugging use], |
373 |
|
|
[if test x$enableval = xyes; then |
374 |
|
|
MALLOC_TYPE=G |
375 |
|
|
DEBUG=-DDEBUG_MALLOC |
376 |
|
|
DLIB="-L/usr/local/lib -ldmalloc" |
377 |
|
|
DINCLUDE=-I/usr/local/include |
378 |
|
|
fi]) |
379 |
|
|
|
380 |
|
|
AC_ARG_ENABLE(dlmalloc, |
381 |
|
|
[ --enable-dlmalloc enable Doug Lea's malloc - for production use |
382 |
|
|
NOTE: enable only one malloc package], |
383 |
|
|
[if test x$enableval = xyes; then |
384 |
|
|
MALLOC_TYPE=D |
385 |
|
|
DEBUG= |
386 |
|
|
DLIB="-L/usr/local/lib -ldlmalloc" |
387 |
|
|
DINCLUDE= |
388 |
|
|
fi]) |
389 |
|
|
|
390 |
|
|
AC_ARG_ENABLE(smart-resize, |
391 |
|
|
[ --enable-smart-resize enable smart growth/shrink behaviour], |
392 |
|
|
[if test x$enableval = xyes; then |
393 |
|
|
AC_DEFINE(SMART_RESIZE, 1, Define to use "smart" resize behavior) |
394 |
|
|
fi]) |
395 |
|
|
|
396 |
pcg |
1.5 |
AC_ARG_ENABLE(256-color, |
397 |
|
|
[ --enable-256-color enable 256-color support], |
398 |
|
|
[if test x$enableval = xyes; then |
399 |
|
|
AC_DEFINE(TTY_256COLOR, 1, Define if you want 256 colour support) |
400 |
|
|
fi]) |
401 |
pcg |
1.1 |
|
402 |
|
|
AC_ARG_ENABLE(cursor-blink, |
403 |
pcg |
1.6 |
[ --enable-cursor-blink enable blinking cursor], |
404 |
pcg |
1.1 |
[if test x$enableval = xyes -o x$enableval = xno; then |
405 |
|
|
support_cursor_blink=$enableval |
406 |
|
|
fi]) |
407 |
|
|
|
408 |
pcg |
1.6 |
AC_ARG_ENABLE(text-blink, |
409 |
pcg |
1.7 |
[ --enable-text-blink enable blinking text], |
410 |
pcg |
1.6 |
[if test x$enableval = xyes -o x$enableval = xno; then |
411 |
|
|
support_text_blink=$enableval |
412 |
|
|
fi]) |
413 |
|
|
|
414 |
pcg |
1.1 |
AC_ARG_ENABLE(pointer-blank, |
415 |
pcg |
1.6 |
[ --enable-pointer-blank enable pointer blank when typing or inactive pointer], |
416 |
pcg |
1.1 |
[if test x$enableval = xyes -o x$enableval = xno; then |
417 |
|
|
support_pointer_blank=$enableval |
418 |
|
|
fi]) |
419 |
|
|
|
420 |
|
|
AC_ARG_WITH(term, |
421 |
pcg |
1.17 |
[ --with-term=NAME set the terminal to NAME (default: rxvt)], |
422 |
pcg |
1.1 |
[if test x$withval != x; then |
423 |
|
|
AC_DEFINE_UNQUOTED(TERMENV, "$withval",Set TERM to the value given by configure) term="$withval" |
424 |
|
|
fi]) |
425 |
|
|
|
426 |
|
|
AC_ARG_WITH(terminfo, |
427 |
|
|
[ --with-terminfo=PATH set the path to the terminfo tree to PATH], |
428 |
|
|
[if test x$withval != x; then |
429 |
|
|
AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
430 |
|
|
fi]) |
431 |
|
|
|
432 |
|
|
dnl# -------------------------------------------------------------------------- |
433 |
|
|
|
434 |
|
|
AC_DEFINE(PROTOTYPES, 1, Define if you need function prototypes) |
435 |
|
|
|
436 |
|
|
dnl# -------------------------------------------------------------------------- |
437 |
|
|
dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure' |
438 |
|
|
dnl# |
439 |
|
|
if test -z "$CFLAGS"; then |
440 |
|
|
if test -z "$CCOPTS"; then |
441 |
|
|
CCOPTS='-O' |
442 |
|
|
dnl> if test "x$GCC" = xyes; then |
443 |
|
|
dnl> if test x$system = xLinux; then |
444 |
|
|
dnl> CCOPTS="$CCOPTS "'-O2 -fno-strength-reduce' |
445 |
|
|
dnl> fi |
446 |
|
|
dnl> fi |
447 |
|
|
fi |
448 |
|
|
CFLAGS="$CCOPTS" |
449 |
|
|
fi |
450 |
|
|
|
451 |
|
|
AC_PATH_PROG(MV, mv, mv) |
452 |
|
|
AC_PATH_PROG(RM, rm, rm) |
453 |
|
|
AC_PATH_PROG(CP, cp, cp) |
454 |
|
|
AC_PATH_PROG(LN, ln, ln) |
455 |
|
|
AC_PATH_PROG(SED, sed, sed) |
456 |
|
|
AC_PATH_PROG(ECHO, echo, echo) |
457 |
|
|
AC_PATH_PROG(CMP, cmp, cmp) |
458 |
|
|
AC_PATH_PROG(TBL, tbl) |
459 |
|
|
|
460 |
|
|
dnl# need a neat way to detect SVR4 or its features |
461 |
|
|
dnl# in src/command.c we use these functions: |
462 |
|
|
dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h> |
463 |
|
|
dnl# - but are these also defined for other systems? |
464 |
|
|
|
465 |
|
|
dnl# hack to find if this is SVR4 -- who knows? |
466 |
|
|
dnl## AC_MSG_CHECKING(for SVR4) |
467 |
|
|
dnl## AC_EGREP_CPP(yes, |
468 |
|
|
dnl## [#if defined (SVR4) || defined (_SVR4) || defined (__svr4__) |
469 |
|
|
dnl## yes; |
470 |
|
|
dnl## #endif |
471 |
|
|
dnl## ], [AC_MSG_RESULT(yes); AC_DEFINE(PERHAPS_SVR4)], AC_MSG_RESULT(perhaps not?)) |
472 |
|
|
|
473 |
|
|
AC_PATH_XTRA |
474 |
|
|
|
475 |
|
|
dnl# the only reasonable way to find libXpm is do-it-yourself |
476 |
|
|
dnl# only check if we want xpm-background |
477 |
|
|
|
478 |
|
|
if test x$support_xpm = xyes; then |
479 |
|
|
VT_FIND_LIBXPM |
480 |
|
|
if test x$no_xpm = xyes; then |
481 |
|
|
support_xpm=needsmanualspecification |
482 |
|
|
fi |
483 |
|
|
fi |
484 |
|
|
|
485 |
|
|
dnl# -------------------------------------------------------------------------- |
486 |
|
|
dnl# CHECKING FOR HEADER FILES |
487 |
|
|
dnl# -------------------------------------------------------------------------- |
488 |
|
|
AC_HEADER_SYS_WAIT |
489 |
|
|
AC_CHECK_HEADERS( \ |
490 |
|
|
assert.h \ |
491 |
|
|
fcntl.h \ |
492 |
|
|
grp.h \ |
493 |
|
|
libc.h \ |
494 |
|
|
lastlog.h \ |
495 |
|
|
stdarg.h \ |
496 |
|
|
stdlib.h \ |
497 |
|
|
string.h \ |
498 |
|
|
termios.h \ |
499 |
|
|
unistd.h \ |
500 |
|
|
sys/byteorder.h \ |
501 |
|
|
sys/ioctl.h \ |
502 |
|
|
sys/select.h \ |
503 |
|
|
sys/sockio.h \ |
504 |
|
|
sys/strredir.h \ |
505 |
|
|
sys/time.h \ |
506 |
|
|
utmp.h \ |
507 |
|
|
utmpx.h \ |
508 |
|
|
stdint.h \ |
509 |
|
|
) |
510 |
|
|
|
511 |
|
|
AC_HEADER_TIME |
512 |
|
|
|
513 |
|
|
dnl# check to allow both <termios.h> and <sys/ioctl.h> |
514 |
|
|
AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl, |
515 |
|
|
[AC_TRY_COMPILE([#include <stdio.h> |
516 |
|
|
#include <sys/ioctl.h> |
517 |
|
|
#ifdef HAVE_TERMIOS_H |
518 |
|
|
#include <termios.h> |
519 |
|
|
#endif], [int a = ECHO;], rxvt_cv_header_sysioctl=yes, rxvt_cv_header_sysioctl=no)]) |
520 |
|
|
|
521 |
|
|
dnl# ELF systems may want to store paths for dynamic libraries. |
522 |
|
|
dnl# Lets see if the compiler can accept "-Rpath" or "-Wl,-Rpath" |
523 |
|
|
dnl# At least one version of SunOS wants "-R path" but it's not checked yet. |
524 |
|
|
if test -n "$GCC"; then |
525 |
|
|
LDARG="-Wl," |
526 |
|
|
else |
527 |
|
|
LDARG="" |
528 |
|
|
fi |
529 |
|
|
changequote(, )dnl |
530 |
|
|
R_TRANSLATE='s/-L\([^ ]*\)/-L\1 '$LDARG'-rpath '$LDARG'\1/g' |
531 |
|
|
changequote([, ])dnl |
532 |
|
|
|
533 |
|
|
ac_save_CFLAGS=$CFLAGS |
534 |
|
|
ac_save_LIBS=$LIBS |
535 |
|
|
CFLAGS="$CFLAGS $X_CFLAGS" |
536 |
|
|
LIBS=`echo "$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"` |
537 |
|
|
AC_CACHE_CHECK([for -rpath dynamic library path recording], rxvt_cv_rpath, |
538 |
|
|
[AC_TRY_RUN([ |
539 |
|
|
main() |
540 |
|
|
{ |
541 |
|
|
exit(0); |
542 |
|
|
(void) XOpenDisplay("foobar"); |
543 |
|
|
}], rxvt_cv_rpath=yes, rxvt_cv_rpath=no, dnl |
544 |
|
|
AC_MSG_WARN([You may need to check the LIBS line]))]) |
545 |
|
|
if test x$rxvt_cv_rpath != xyes; then |
546 |
|
|
changequote(, )dnl |
547 |
|
|
R_TRANSLATE='s/-L\([^ ]*\)/-L\1 '$LDARG'-R\1/g' |
548 |
|
|
changequote([, ])dnl |
549 |
|
|
LIBS=`echo "$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"` |
550 |
|
|
AC_CACHE_CHECK([for -R dynamic library path recording], rxvt_cv_R, |
551 |
|
|
[AC_TRY_RUN([ |
552 |
|
|
main() |
553 |
|
|
{ |
554 |
|
|
exit(0); |
555 |
|
|
(void) XOpenDisplay("foobar"); |
556 |
|
|
}], rxvt_cv_R=yes, rxvt_cv_R=no, rxvt_cv_R=no)]) |
557 |
|
|
if test x$rxvt_cv_R != xyes; then |
558 |
|
|
LIBS="$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
559 |
|
|
fi |
560 |
|
|
fi |
561 |
|
|
|
562 |
|
|
AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
563 |
|
|
[AC_TRY_COMPILE([#include <X11/Xlib.h>], [XPointer dummy;], |
564 |
|
|
rxvt_cv_xpointer=yes, rxvt_cv_xpointer=no)]) |
565 |
|
|
if test x$rxvt_cv_xpointer = xyes; then |
566 |
|
|
AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
567 |
|
|
fi |
568 |
|
|
LIBS=$ac_save_LIBS |
569 |
|
|
CFLAGS=$ac_save_CFLAGS |
570 |
|
|
|
571 |
|
|
|
572 |
|
|
AC_C_CONST |
573 |
|
|
AC_C_INLINE |
574 |
|
|
|
575 |
|
|
dnl> AC_HEADER_STDC dnl# skip this test, Sun always fails anyhow. |
576 |
|
|
|
577 |
|
|
dnl# -------------------------------------------------------------------------- |
578 |
|
|
dnl# CHECKING FOR MISSING TYPEDEFS |
579 |
|
|
dnl# -------------------------------------------------------------------------- |
580 |
|
|
dnl# Missing typedefs and replacements |
581 |
|
|
AC_TYPE_MODE_T |
582 |
|
|
dnl> AC_CHECK_TYPE(umode_t, int) |
583 |
|
|
dnl> AC_CHECK_TYPE(off_t, long) |
584 |
|
|
AC_TYPE_PID_T |
585 |
|
|
AC_TYPE_UID_T |
586 |
|
|
|
587 |
|
|
|
588 |
|
|
AC_CHECK_SIZEOF(char, 1) |
589 |
|
|
AC_CHECK_SIZEOF(short, 2) |
590 |
|
|
AC_CHECK_SIZEOF(int, 4) |
591 |
|
|
AC_CHECK_SIZEOF(long, 4) |
592 |
|
|
AC_CHECK_SIZEOF(long long, 8) |
593 |
|
|
AC_CHECK_SIZEOF(int *, 4) |
594 |
|
|
|
595 |
|
|
dnl# see usage below |
596 |
|
|
AC_DEFUN(RXVT_CHECK_SIZE, |
597 |
|
|
[AC_CACHE_CHECK([for $2], $1, |
598 |
|
|
[AC_TRY_COMPILE([#include <stdint.h>], $2 dummy;, |
599 |
|
|
[$1=yes], |
600 |
|
|
[dnl |
601 |
|
|
if test $ac_cv_sizeof_char -ge $3; then |
602 |
|
|
$1="$4 char" |
603 |
|
|
else |
604 |
|
|
if test $ac_cv_sizeof_short -ge $3; then |
605 |
|
|
$1="$4 short" |
606 |
|
|
else |
607 |
|
|
if test $ac_cv_sizeof_int -ge $3; then |
608 |
|
|
$1="$4 int" |
609 |
|
|
else |
610 |
|
|
if test $ac_cv_sizeof_long -ge $3; then |
611 |
|
|
$1="$4 long" |
612 |
|
|
else |
613 |
|
|
if test $ac_cv_sizeof_long_long -ge $3; then |
614 |
|
|
$1="$4 long long" |
615 |
|
|
else |
616 |
|
|
$1="$4 $5" # we _must_ have a (possibly wrong) default |
617 |
|
|
fi |
618 |
|
|
fi |
619 |
|
|
fi |
620 |
|
|
fi |
621 |
|
|
fi])])] |
622 |
|
|
if test x"$$1" != xyes; then |
623 |
|
|
$6="typedef $$1 $2;" |
624 |
|
|
else |
625 |
|
|
if test x"$4" = x; then |
626 |
|
|
$6="/* typedef $5 $2; */" |
627 |
|
|
else |
628 |
|
|
$6="/* typedef $4 $5 $2; */" |
629 |
|
|
fi |
630 |
|
|
fi dnl |
631 |
|
|
) |
632 |
|
|
dnl# |
633 |
|
|
dnl# Look for types the system may know about anyway. |
634 |
|
|
dnl# |
635 |
|
|
RXVT_CHECK_SIZE(rxvt_cv_int16_t, int16_t, 2, , short, rxvt_int16_typedef) |
636 |
|
|
AC_SUBST(rxvt_int16_typedef) |
637 |
|
|
RXVT_CHECK_SIZE(rxvt_cv_uint16_t, uint16_t, 2, unsigned, short, rxvt_uint16_typedef) |
638 |
|
|
AC_SUBST(rxvt_uint16_typedef) |
639 |
|
|
RXVT_CHECK_SIZE(rxvt_cv_int32_t, int32_t, 4, , int, rxvt_int32_typedef) |
640 |
|
|
AC_SUBST(rxvt_int32_typedef) |
641 |
|
|
RXVT_CHECK_SIZE(rxvt_cv_uint32_t, uint32_t, 4, unsigned, int, rxvt_uint32_typedef) |
642 |
|
|
AC_SUBST(rxvt_uint32_typedef) |
643 |
|
|
dnl RXVT_CHECK_SIZE(rxvt_cv_int64_t, int64_t, 8, , long long, rxvt_int64_typedef) |
644 |
|
|
dnl AC_SUBST(rxvt_int64_typedef) |
645 |
|
|
dnl RXVT_CHECK_SIZE(rxvt_cv_uint64_t, uint64_t, 8, unsigned, long long, rxvt_uint64_typedef) |
646 |
|
|
dnl AC_SUBST(rxvt_uint64_typedef) |
647 |
|
|
dnl# |
648 |
|
|
dnl# Now look for another we use |
649 |
|
|
dnl# |
650 |
|
|
if test $ac_cv_sizeof_int_p -eq 8; then |
651 |
|
|
rxvt_intp_define="#define intp_t int64_t" |
652 |
|
|
rxvt_u_intp_define="#define u_intp_t u_int64_t" |
653 |
|
|
else |
654 |
|
|
if test $ac_cv_sizeof_int_p -eq 4; then |
655 |
|
|
rxvt_intp_define="#define intp_t int32_t" |
656 |
|
|
rxvt_u_intp_define="#define u_intp_t u_int32_t" |
657 |
|
|
else |
658 |
|
|
if test $ac_cv_sizeof_int_p -eq 2; then |
659 |
|
|
rxvt_intp_define="#define intp_t int16_t" |
660 |
|
|
rxvt_u_intp_define="#define u_intp_t u_int16_t" |
661 |
|
|
else |
662 |
|
|
rxvt_intp_define="#error set intp_t" |
663 |
|
|
rxvt_u_intp_define="#error set u_intp_t" |
664 |
|
|
fi |
665 |
|
|
fi |
666 |
|
|
fi |
667 |
|
|
AC_SUBST(rxvt_intp_define) |
668 |
|
|
AC_SUBST(rxvt_u_intp_define) |
669 |
|
|
|
670 |
|
|
dnl# -------------------------------------------------------------------------- |
671 |
|
|
dnl# CHECKING FOR LIBRARY FUNCTIONS |
672 |
|
|
dnl# -------------------------------------------------------------------------- |
673 |
|
|
AC_TYPE_SIGNAL |
674 |
|
|
dnl> AC_FUNC_VPRINTF |
675 |
|
|
|
676 |
|
|
dnl# Note: On Ultrix, setsid() does weirdo stuff, disable it |
677 |
|
|
case "$host_alias" in |
678 |
|
|
*ultrix) ac_cv_func_setsid='no' ;; |
679 |
|
|
*) break;; |
680 |
|
|
esac |
681 |
|
|
|
682 |
|
|
AC_CHECK_FUNCS( \ |
683 |
|
|
atexit \ |
684 |
|
|
revoke \ |
685 |
|
|
unsetenv \ |
686 |
|
|
setutent \ |
687 |
|
|
seteuid \ |
688 |
|
|
setreuid \ |
689 |
|
|
setsid \ |
690 |
|
|
setpgrp \ |
691 |
|
|
setpgid \ |
692 |
|
|
openpty \ |
693 |
|
|
_getpty \ |
694 |
|
|
grantpt \ |
695 |
|
|
unlockpt \ |
696 |
|
|
isastream \ |
697 |
|
|
on_exit \ |
698 |
|
|
nanosleep \ |
699 |
|
|
updwtmp \ |
700 |
|
|
ttyslot \ |
701 |
|
|
) |
702 |
|
|
dnl# Note: On NetBSD, openpty() exists in libutil. Don't pull it in |
703 |
|
|
|
704 |
|
|
dnl# -------------------------------------------------------------------------- |
705 |
|
|
dnl# DO ALL UTMP AND WTMP CHECKING |
706 |
|
|
dnl# -------------------------------------------------------------------------- |
707 |
|
|
dnl# check for host field in utmp structure |
708 |
|
|
|
709 |
|
|
dnl# -------------------------------------------- |
710 |
|
|
AC_CHECK_HEADER(utmp.h, |
711 |
|
|
[AC_CACHE_CHECK([for struct utmp], rxvt_cv_struct_utmp, |
712 |
|
|
[AC_TRY_COMPILE([#include <sys/types.h> |
713 |
|
|
#include <stdint.h> |
714 |
|
|
#include <utmp.h>], |
715 |
|
|
[struct utmp ut;], |
716 |
|
|
rxvt_cv_struct_utmp=yes, rxvt_cv_struct_utmp=no)]) |
717 |
|
|
if test x$rxvt_cv_struct_utmp = xyes; then |
718 |
|
|
AC_DEFINE(HAVE_STRUCT_UTMP, 1, Define if utmp.h has struct utmp) |
719 |
|
|
fi |
720 |
|
|
] |
721 |
|
|
|
722 |
|
|
AC_CACHE_CHECK(for ut_host in utmp struct, rxvt_cv_struct_utmp_host, |
723 |
|
|
[AC_TRY_COMPILE([#include <sys/types.h> |
724 |
|
|
#include <utmp.h>], |
725 |
|
|
[struct utmp ut; ut.ut_host;], |
726 |
|
|
rxvt_cv_struct_utmp_host=yes, rxvt_cv_struct_utmp_host=no)]) |
727 |
|
|
if test x$rxvt_cv_struct_utmp_host = xyes; then |
728 |
|
|
AC_DEFINE(HAVE_UTMP_HOST, 1, Define if struct utmp contains ut_host) |
729 |
|
|
fi |
730 |
|
|
|
731 |
|
|
AC_CACHE_CHECK(for ut_pid in utmp struct, rxvt_cv_struct_utmp_pid, |
732 |
|
|
[AC_TRY_COMPILE([#include <sys/types.h> |
733 |
|
|
#include <utmp.h>], |
734 |
|
|
[struct utmp ut; ut.ut_pid;], |
735 |
|
|
rxvt_cv_struct_utmp_pid=yes, rxvt_cv_struct_utmp_pid=no)]) |
736 |
|
|
if test x$rxvt_cv_struct_utmp_pid = xyes; then |
737 |
|
|
AC_DEFINE(HAVE_UTMP_PID, 1, Define if struct utmp contains ut_pid) |
738 |
|
|
fi |
739 |
|
|
) dnl# AC_CHECK_HEADER(utmp.h |
740 |
|
|
|
741 |
|
|
dnl# -------------------------------------------- |
742 |
|
|
|
743 |
|
|
AC_CHECK_HEADER(utmpx.h, |
744 |
|
|
[AC_CACHE_CHECK([for struct utmpx], rxvt_cv_struct_utmpx, |
745 |
|
|
[AC_TRY_COMPILE([#include <sys/types.h> |
746 |
|
|
#include <utmpx.h>], |
747 |
|
|
[struct utmpx ut;], |
748 |
|
|
rxvt_cv_struct_utmpx=yes, rxvt_cv_struct_utmpx=no)]) |
749 |
|
|
if test x$rxvt_cv_struct_utmpx = xyes; then |
750 |
|
|
AC_DEFINE(HAVE_STRUCT_UTMPX, 1, Define if utmpx.h has struct utmpx) |
751 |
|
|
fi |
752 |
|
|
] |
753 |
|
|
|
754 |
|
|
AC_CACHE_CHECK(for host in utmpx struct, rxvt_cv_struct_utmpx_host, |
755 |
|
|
[AC_TRY_COMPILE([#include <sys/types.h> |
756 |
|
|
#include <utmpx.h>], |
757 |
|
|
[struct utmpx utx; utx.ut_host;], |
758 |
|
|
rxvt_cv_struct_utmpx_host=yes, rxvt_cv_struct_utmpx_host=no)]) |
759 |
|
|
if test x$rxvt_cv_struct_utmpx_host = xyes; then |
760 |
|
|
AC_DEFINE(HAVE_UTMPX_HOST, 1, Define if struct utmpx contains ut_host) |
761 |
|
|
fi |
762 |
|
|
) dnl# AC_CHECK_HEADER(utmpx.h |
763 |
|
|
|
764 |
|
|
|
765 |
|
|
dnl# -------------------------------------------------------------------------- |
766 |
|
|
dnl# check for struct lastlog |
767 |
|
|
AC_CACHE_CHECK(for struct lastlog, rxvt_cv_struct_lastlog, |
768 |
|
|
[AC_TRY_COMPILE([#include <sys/types.h> |
769 |
|
|
#include <utmp.h> |
770 |
|
|
#ifdef HAVE_LASTLOG_H |
771 |
|
|
#include <lastlog.h> |
772 |
|
|
#endif |
773 |
|
|
], |
774 |
|
|
[struct lastlog ll;], |
775 |
|
|
rxvt_cv_struct_lastlog=yes, rxvt_cv_struct_lastlog=no)]) |
776 |
|
|
if test x$rxvt_cv_struct_lastlog = xyes; then |
777 |
|
|
AC_DEFINE(HAVE_STRUCT_LASTLOG, 1, Define if utmp.h or lastlog.h has struct lastlog) |
778 |
|
|
fi |
779 |
|
|
|
780 |
|
|
dnl# check for struct lastlogx |
781 |
|
|
AC_CACHE_CHECK(for struct lastlogx, rxvt_cv_struct_lastlogx, |
782 |
|
|
[AC_TRY_COMPILE([#include <sys/types.h> |
783 |
|
|
#include <utmpx.h> |
784 |
|
|
#ifdef HAVE_LASTLOG_H |
785 |
|
|
#include <lastlog.h> |
786 |
|
|
#endif |
787 |
|
|
], |
788 |
|
|
[struct lastlogx ll;], |
789 |
|
|
rxvt_cv_struct_lastlogx=yes, rxvt_cv_struct_lastlogx=no)]) |
790 |
|
|
if test x$rxvt_cv_struct_lastlogx = xyes; then |
791 |
|
|
AC_DEFINE(HAVE_STRUCT_LASTLOGX, 1, Define if utmpx.h or lastlog.h has struct lastlogx) |
792 |
|
|
fi |
793 |
|
|
|
794 |
|
|
dnl# -------------------------------------------------------------------------- |
795 |
|
|
dnl# FIND FILES |
796 |
|
|
dnl# -------------------------------------------------------------------------- |
797 |
|
|
|
798 |
|
|
dnl# find utmp |
799 |
|
|
AC_CACHE_CHECK(where utmp is located, rxvt_cv_path_utmp, |
800 |
|
|
[AC_TRY_RUN([#include <stdio.h> |
801 |
|
|
#include <sys/types.h> |
802 |
|
|
#include <utmp.h> |
803 |
|
|
#include <errno.h> |
804 |
|
|
main() |
805 |
|
|
{ |
806 |
|
|
char **u, *utmplist[] = { |
807 |
|
|
"/var/run/utmp", "/var/adm/utmp", "/etc/utmp", "/usr/etc/utmp", "/usr/adm/utmp", NULL }; |
808 |
|
|
FILE *a, *f=fopen("conftestval", "w"); |
809 |
|
|
if (!f) exit(1); |
810 |
|
|
#ifdef UTMP_FILE |
811 |
|
|
fprintf(f, "%s\n", UTMP_FILE); |
812 |
|
|
exit(0); |
813 |
|
|
#endif |
814 |
|
|
#ifdef _PATH_UTMP |
815 |
|
|
fprintf(f, "%s\n", _PATH_UTMP); |
816 |
|
|
exit(0); |
817 |
|
|
#endif |
818 |
|
|
for (u = utmplist; *u; u++) { |
819 |
|
|
if ((a = fopen(*u, "r")) != NULL || errno == EACCES) { |
820 |
|
|
fprintf(f, "%s\n", *u); |
821 |
|
|
exit(0); |
822 |
|
|
} |
823 |
|
|
} |
824 |
|
|
exit(0); |
825 |
|
|
}], rxvt_cv_path_utmp=`cat conftestval`, rxvt_cv_path_utmp=, dnl |
826 |
|
|
AC_MSG_WARN([Define RXVT_UTMP_FILE in config.h manually]))]) |
827 |
|
|
if test x$rxvt_cv_path_utmp != x; then |
828 |
|
|
AC_DEFINE_UNQUOTED(RXVT_UTMP_FILE, "$rxvt_cv_path_utmp", Define location of utmp) |
829 |
|
|
fi |
830 |
|
|
|
831 |
|
|
dnl# -------------------------------------------------------------------------- |
832 |
|
|
|
833 |
|
|
dnl# find utmpx - if a utmp file exists at the same location and is more than |
834 |
|
|
dnl# a day newer, then dump the utmpx. People leave lots of junk around. |
835 |
|
|
AC_CACHE_CHECK(where utmpx is located, rxvt_cv_path_utmpx, |
836 |
|
|
[AC_TRY_RUN([#include <stdio.h> |
837 |
|
|
#include <sys/types.h> |
838 |
|
|
#include <utmpx.h> |
839 |
|
|
#include <errno.h> |
840 |
|
|
#include <sys/stat.h> |
841 |
|
|
#ifdef HAVE_STRING_H |
842 |
|
|
#include <string.h> |
843 |
|
|
#endif |
844 |
|
|
main() |
845 |
|
|
{ |
846 |
|
|
char **u, *p, *utmplist[] = { |
847 |
|
|
#ifdef UTMPX_FILE |
848 |
|
|
UTMPX_FILE, |
849 |
|
|
#endif |
850 |
|
|
#ifdef _PATH_UTMPX |
851 |
|
|
_PATH_UTMPX, |
852 |
|
|
#endif |
853 |
|
|
"/var/adm/utmpx", "/etc/utmpx", NULL }; |
854 |
|
|
FILE *a, *f=fopen("conftestval", "w"); |
855 |
|
|
struct stat statu, statux; |
856 |
|
|
if (!f) exit(1); |
857 |
|
|
for (u = utmplist; *u; u++) { |
858 |
|
|
if ((a = fopen(*u, "r")) != NULL || errno == EACCES) { |
859 |
|
|
if (stat(*u, &statux) < 0) |
860 |
|
|
continue; |
861 |
|
|
p = strdup(*u); |
862 |
|
|
p[strlen(p) - 1] = '\0'; |
863 |
|
|
if (stat(p, &statu) >= 0 |
864 |
|
|
&& (statu.st_mtime - statux.st_mtime > 86400)) |
865 |
|
|
continue; |
866 |
|
|
fprintf(f, "%s\n", *u); |
867 |
|
|
exit(0); |
868 |
|
|
} |
869 |
|
|
} |
870 |
|
|
exit(0); |
871 |
|
|
}], rxvt_cv_path_utmpx=`cat conftestval`, rxvt_cv_path_utmpx=, dnl |
872 |
|
|
AC_MSG_WARN([Define RXVT_UTMPX_FILE in config.h manually]))]) |
873 |
|
|
if test x$rxvt_cv_path_utmpx != x; then |
874 |
|
|
AC_DEFINE_UNQUOTED(RXVT_UTMPX_FILE, "$rxvt_cv_path_utmpx", Define location of utmpx) |
875 |
|
|
fi |
876 |
|
|
|
877 |
|
|
dnl# -------------------------------------------------------------------------- |
878 |
|
|
|
879 |
|
|
dnl# find wtmp |
880 |
|
|
AC_CACHE_CHECK(where wtmp is located, rxvt_cv_path_wtmp, |
881 |
|
|
[AC_TRY_RUN([#include <stdio.h> |
882 |
|
|
#include <sys/types.h> |
883 |
|
|
#ifdef HAVE_UTMP_H |
884 |
|
|
#include <utmp.h> |
885 |
|
|
#endif |
886 |
|
|
#include <errno.h> |
887 |
|
|
main() |
888 |
|
|
{ |
889 |
|
|
char **w, *wtmplist[] = { |
890 |
|
|
"/var/log/wtmp", "/var/adm/wtmp", "/etc/wtmp", "/usr/etc/wtmp", "/usr/adm/wtmp", NULL }; |
891 |
|
|
FILE *a, *f=fopen("conftestval", "w"); |
892 |
|
|
if (!f) exit(1); |
893 |
|
|
#ifdef WTMP_FILE |
894 |
|
|
fprintf(f, "%s\n", WTMP_FILE); |
895 |
|
|
exit(0); |
896 |
|
|
#endif |
897 |
|
|
#ifdef _PATH_WTMP |
898 |
|
|
fprintf(f, "%s\n", _PATH_WTMP); |
899 |
|
|
exit(0); |
900 |
|
|
#endif |
901 |
|
|
for (w = wtmplist; *w; w++) { |
902 |
|
|
if ((a = fopen(*w, "r")) != NULL || errno == EACCES) { |
903 |
|
|
fprintf(f, "%s\n", *w); |
904 |
|
|
exit(0); |
905 |
|
|
} |
906 |
|
|
} |
907 |
|
|
exit(0); |
908 |
|
|
}], rxvt_cv_path_wtmp=`cat conftestval`, rxvt_cv_path_wtmp=, dnl |
909 |
|
|
AC_MSG_WARN([Define RXVT_WTMP_FILE in config.h manually]))]) |
910 |
|
|
if test x$rxvt_cv_path_wtmp != x; then |
911 |
|
|
AC_DEFINE_UNQUOTED(RXVT_WTMP_FILE, "$rxvt_cv_path_wtmp", Define location of wtmp) |
912 |
|
|
fi |
913 |
|
|
dnl# -------------------------------------------------------------------------- |
914 |
|
|
|
915 |
|
|
dnl# find wtmpx |
916 |
|
|
AC_CACHE_CHECK(where wtmpx is located, rxvt_cv_path_wtmpx, |
917 |
|
|
[AC_TRY_RUN([#include <stdio.h> |
918 |
|
|
#ifdef HAVE_UTMPX_H |
919 |
|
|
#include <utmpx.h> |
920 |
|
|
#endif |
921 |
|
|
#include <errno.h> |
922 |
|
|
main() |
923 |
|
|
{ |
924 |
|
|
char **w, *wtmplist[] = { |
925 |
|
|
"/var/log/wtmpx", "/var/adm/wtmpx", NULL }; |
926 |
|
|
FILE *a, *f=fopen("conftestval", "w"); |
927 |
|
|
if (!f) exit(1); |
928 |
|
|
#ifdef WTMPX_FILE |
929 |
|
|
fprintf(f, "%s\n", WTMPX_FILE); |
930 |
|
|
exit(0); |
931 |
|
|
#endif |
932 |
|
|
#ifdef _PATH_WTMPX |
933 |
|
|
fprintf(f, "%s\n", _PATH_WTMPX); |
934 |
|
|
exit(0); |
935 |
|
|
#endif |
936 |
|
|
for (w = wtmplist; *w; w++) { |
937 |
|
|
if ((a = fopen(*w, "r")) != NULL || errno == EACCES) { |
938 |
|
|
fprintf(f, "%s\n", *w); |
939 |
|
|
exit(0); |
940 |
|
|
} |
941 |
|
|
} |
942 |
|
|
exit(0); |
943 |
|
|
}], rxvt_cv_path_wtmpx=`cat conftestval`, rxvt_cv_path_wtmpx=, dnl |
944 |
|
|
AC_MSG_WARN([Define RXVT_WTMPX_FILE in config.h manually]))]) |
945 |
|
|
if test x$rxvt_cv_path_wtmpx != x; then |
946 |
|
|
AC_DEFINE_UNQUOTED(RXVT_WTMPX_FILE, "$rxvt_cv_path_wtmpx", Define location of wtmpx) |
947 |
|
|
fi |
948 |
|
|
dnl# -------------------------------------------------------------------------- |
949 |
|
|
|
950 |
|
|
dnl# find lastlog |
951 |
|
|
AC_CACHE_CHECK(where lastlog is located, rxvt_cv_path_lastlog, |
952 |
|
|
[AC_TRY_RUN([#include <stdio.h> |
953 |
|
|
#include <sys/types.h> |
954 |
|
|
#ifdef HAVE_UTMPX_H |
955 |
|
|
#include <utmpx.h> |
956 |
|
|
#elif defined(HAVE_UTMP_H) |
957 |
|
|
#include <utmp.h> |
958 |
|
|
#endif |
959 |
|
|
#ifdef HAVE_LASTLOG_H |
960 |
|
|
#include <lastlog.h> |
961 |
|
|
#endif |
962 |
|
|
#include <errno.h> |
963 |
|
|
main() |
964 |
|
|
{ |
965 |
|
|
char **w, *lastloglist[] = { "/var/log/lastlog", NULL }; |
966 |
|
|
FILE *a, *f=fopen("conftestval", "w"); |
967 |
|
|
if (!f) exit(1); |
968 |
|
|
#ifdef LASTLOG_FILE |
969 |
|
|
fprintf(f, "%s\n", LASTLOG_FILE); |
970 |
|
|
exit(0); |
971 |
|
|
#endif |
972 |
|
|
#ifdef _PATH_LASTLOG |
973 |
|
|
fprintf(f, "%s\n", _PATH_LASTLOG); |
974 |
|
|
exit(0); |
975 |
|
|
#endif |
976 |
|
|
for (w = lastloglist; *w; w++) { |
977 |
|
|
if ((a = fopen(*w, "r")) != NULL || errno == EACCES) { |
978 |
|
|
fprintf(f, "%s\n", *w); |
979 |
|
|
exit(0); |
980 |
|
|
} |
981 |
|
|
} |
982 |
|
|
exit(0); |
983 |
|
|
}], rxvt_cv_path_lastlog=`cat conftestval`, rxvt_cv_path_lastlog=, dnl |
984 |
|
|
AC_MSG_WARN([Define RXVT_LASTLOG_FILE in config.h manually]))]) |
985 |
|
|
if test x$rxvt_cv_path_lastlog != x; then |
986 |
|
|
AC_DEFINE_UNQUOTED(RXVT_LASTLOG_FILE, "$rxvt_cv_path_lastlog", Define location of lastlog) |
987 |
|
|
if test -d "$rxvt_cv_path_lastlog"; then |
988 |
|
|
AC_DEFINE(LASTLOG_IS_DIR, 1, Define if lastlog is provided via a directory) |
989 |
|
|
fi |
990 |
|
|
fi |
991 |
|
|
dnl# -------------------------------------------------------------------------- |
992 |
|
|
|
993 |
|
|
dnl# find lastlogx |
994 |
|
|
AC_CACHE_CHECK(where lastlogx is located, rxvt_cv_path_lastlogx, |
995 |
|
|
[AC_TRY_RUN([#include <stdio.h> |
996 |
|
|
#ifdef HAVE_UTMPX_H |
997 |
|
|
#include <utmpx.h> |
998 |
|
|
#endif |
999 |
|
|
#include <errno.h> |
1000 |
|
|
main() |
1001 |
|
|
{ |
1002 |
|
|
char **w, *wtmplist[] = { "/var/log/lastlogx", "/var/adm/lastlogx", NULL }; |
1003 |
|
|
FILE *a, *f=fopen("conftestval", "w"); |
1004 |
|
|
if (!f) exit(1); |
1005 |
|
|
#ifdef LASTLOGX_FILE |
1006 |
|
|
fprintf(f, "%s\n", LASTLOGX_FILE); |
1007 |
|
|
exit(0); |
1008 |
|
|
#endif |
1009 |
|
|
#ifdef _PATH_LASTLOGX |
1010 |
|
|
fprintf(f, "%s\n", _PATH_LASTLOGX); |
1011 |
|
|
exit(0); |
1012 |
|
|
#endif |
1013 |
|
|
for (w = wtmplist; *w; w++) { |
1014 |
|
|
if ((a = fopen(*w, "r")) != NULL || errno == EACCES) { |
1015 |
|
|
fprintf(f, "%s\n", *w); |
1016 |
|
|
exit(0); |
1017 |
|
|
} |
1018 |
|
|
} |
1019 |
|
|
exit(0); |
1020 |
|
|
}], rxvt_cv_path_lastlogx=`cat conftestval`, rxvt_cv_path_lastlogx=, dnl |
1021 |
|
|
AC_MSG_WARN([Define RXVT_LASTLOGX_FILE in config.h manually]))]) |
1022 |
|
|
if test x$rxvt_cv_path_lastlogx != x; then |
1023 |
|
|
AC_DEFINE_UNQUOTED(RXVT_LASTLOGX_FILE, "$rxvt_cv_path_lastlogx", Define location of lastlogx) |
1024 |
|
|
fi |
1025 |
|
|
|
1026 |
|
|
dnl# -------------------------------------------------------------------------- |
1027 |
|
|
|
1028 |
|
|
dnl# find ttys/ttytab |
1029 |
|
|
AC_CACHE_CHECK(where ttys/ttytab is located, rxvt_cv_path_ttytab, |
1030 |
|
|
[for ttys_file in dnl |
1031 |
|
|
/etc/ttys /etc/ttytab; |
1032 |
|
|
do |
1033 |
|
|
if test -f "$ttys_file" ; then |
1034 |
|
|
rxvt_cv_path_ttytab=$ttys_file |
1035 |
|
|
break |
1036 |
|
|
fi |
1037 |
|
|
done |
1038 |
|
|
]) |
1039 |
|
|
if test x$rxvt_cv_path_ttytab != x; then |
1040 |
|
|
AC_DEFINE_UNQUOTED(TTYTAB_FILENAME, "$rxvt_cv_path_ttytab", Define location of ttys/ttytab) |
1041 |
|
|
fi |
1042 |
|
|
|
1043 |
|
|
dnl# -------------------------------------------------------------------------- |
1044 |
|
|
dnl# -------------------------------------------------------------------------- |
1045 |
|
|
|
1046 |
|
|
dnl# this is a really hack test for some basic Xlocale stuff |
1047 |
|
|
ac_save_LIBS=$LIBS |
1048 |
|
|
ac_save_CFLAGS=$CFLAGS |
1049 |
|
|
CFLAGS="$CFLAGS $X_CFLAGS" |
1050 |
|
|
LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
1051 |
|
|
if test x$rxvt_cv_rpath = xyes -o x$rxvt_cv_R = xyes; then |
1052 |
|
|
LIBS=`echo $LIBS | sed "$R_TRANSLATE"` |
1053 |
|
|
fi |
1054 |
|
|
AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
1055 |
|
|
[AC_TRY_RUN([#include <X11/Xlib.h> |
1056 |
|
|
main() { |
1057 |
|
|
char *p; |
1058 |
|
|
if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) |
1059 |
|
|
exit (XSupportsLocale() ? 0 : 1); |
1060 |
|
|
else |
1061 |
|
|
exit (1);}], dnl |
1062 |
|
|
rxvt_cv_func_xlocale=yes, rxvt_cv_func_xlocale=no, dnl |
1063 |
|
|
AC_MSG_WARN([Define NO_XLOCALE in config.h manually]))]) |
1064 |
|
|
if test x$rxvt_cv_func_xlocale = xyes; then |
1065 |
|
|
AC_DEFINE(HAVE_XLOCALE, 1, Define if Xlocale support works) |
1066 |
|
|
fi |
1067 |
|
|
|
1068 |
|
|
AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale, |
1069 |
|
|
[AC_TRY_LINK([#define X_LOCALE 1 |
1070 |
|
|
#include <X11/Xlocale.h>], |
1071 |
|
|
[setlocale(LC_CTYPE, "");], |
1072 |
|
|
rxvt_cv_func_xsetlocale=yes, rxvt_cv_func_xsetlocale=no)]) |
1073 |
|
|
if test x$rxvt_cv_func_xsetlocale = xyes; then |
1074 |
|
|
AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works) |
1075 |
|
|
fi |
1076 |
|
|
LIBS=$ac_save_LIBS |
1077 |
|
|
CFLAGS=$ac_save_CFLAGS |
1078 |
|
|
|
1079 |
|
|
AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale, |
1080 |
pcg |
1.20 |
[AC_TRY_LINK([#include <clocale>], |
1081 |
pcg |
1.1 |
[setlocale(LC_CTYPE, "");], |
1082 |
|
|
rxvt_cv_func_setlocale=yes, rxvt_cv_func_setlocale=no)]) |
1083 |
|
|
if test x$rxvt_cv_func_setlocale = xyes; then |
1084 |
|
|
AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works) |
1085 |
|
|
fi |
1086 |
|
|
|
1087 |
|
|
AC_CACHE_CHECK(for working nl_langinfo, rxvt_cv_func_nl_langinfo, |
1088 |
|
|
[AC_TRY_LINK([#include <langinfo.h>], |
1089 |
|
|
[nl_langinfo(CODESET);], |
1090 |
|
|
rxvt_cv_func_nl_langinfo=yes, rxvt_cv_func_nl_langinfo=no)]) |
1091 |
|
|
if test x$rxvt_cv_func_nl_langinfo = xyes; then |
1092 |
|
|
AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works) |
1093 |
|
|
fi |
1094 |
|
|
|
1095 |
|
|
AC_CACHE_CHECK(for getpt, rxvt_cv_func_getpt, |
1096 |
|
|
[AC_TRY_LINK([#define _GNU_SOURCE |
1097 |
|
|
#ifdef HAVE_STDLIB_H |
1098 |
pcg |
1.20 |
# include <cstdlib> |
1099 |
pcg |
1.1 |
#endif], |
1100 |
|
|
[(void)getpt();], |
1101 |
|
|
rxvt_cv_func_getpt=yes, rxvt_cv_func_getpt=no)]) |
1102 |
|
|
if test x$rxvt_cv_func_getpt = xyes; then |
1103 |
|
|
AC_DEFINE(HAVE_GETPT, 1, Define if you have _GNU_SOURCE getpt() ) |
1104 |
|
|
fi |
1105 |
|
|
|
1106 |
|
|
dnl# if we don't guess right then it's up to the user |
1107 |
|
|
AC_CACHE_CHECK(for pty/tty type, rxvt_cv_ptys, |
1108 |
|
|
[if test x$ac_cv_func_openpty = xyes; then |
1109 |
|
|
rxvt_cv_ptys=OPENPTY |
1110 |
|
|
else if test x$ac_cv_func__getpty = xyes; then |
1111 |
|
|
rxvt_cv_ptys=SGI4 |
1112 |
|
|
else if test -c /dev/ttyp20; then |
1113 |
|
|
rxvt_cv_ptys=SCO |
1114 |
|
|
else if test -c /dev/ptym/clone; then |
1115 |
|
|
rxvt_cv_ptys=HPUX |
1116 |
|
|
else if test x$rxvt_cv_func_getpt = xyes; then |
1117 |
|
|
rxvt_cv_ptys=GLIBC |
1118 |
|
|
else if test -c /dev/ptc -a -c /dev/pts; then |
1119 |
|
|
rxvt_cv_ptys=PTC |
1120 |
|
|
else if test -c /dev/ptc -a -d /dev/pts; then |
1121 |
|
|
rxvt_cv_ptys=PTC |
1122 |
|
|
else if test -c /dev/ptmx -a -c /dev/pts/0; then |
1123 |
|
|
rxvt_cv_ptys=STREAMS |
1124 |
|
|
else if test x$ac_cv_func_grantpt = xyes && test x$ac_cv_func_unlockpt = xyes; then |
1125 |
|
|
dnl# catch CYGWIN |
1126 |
|
|
rxvt_cv_ptys=STREAMS |
1127 |
|
|
else |
1128 |
|
|
rxvt_cv_ptys=BSD |
1129 |
|
|
fi |
1130 |
|
|
fi |
1131 |
|
|
fi |
1132 |
|
|
fi |
1133 |
|
|
fi |
1134 |
|
|
fi |
1135 |
|
|
fi |
1136 |
|
|
fi |
1137 |
|
|
fi |
1138 |
|
|
]) |
1139 |
|
|
|
1140 |
|
|
if test x$rxvt_cv_ptys = xOPENPTY; then |
1141 |
|
|
AC_DEFINE(PTYS_ARE_OPENPTY, 1, Define for this pty type) |
1142 |
|
|
fi |
1143 |
|
|
if test x$rxvt_cv_ptys = xSCO; then |
1144 |
|
|
AC_DEFINE(PTYS_ARE_NUMERIC, 1, Define for this pty type) |
1145 |
|
|
fi |
1146 |
|
|
if test x$rxvt_cv_ptys = xSTREAMS; then |
1147 |
|
|
AC_DEFINE(PTYS_ARE_PTMX, 1, Define for this pty type) |
1148 |
|
|
fi |
1149 |
|
|
if test x$rxvt_cv_ptys = xPTC; then |
1150 |
|
|
AC_DEFINE(PTYS_ARE_PTC, 1, Define for this pty type) |
1151 |
|
|
fi |
1152 |
|
|
if test x$rxvt_cv_ptys = xSGI4; then |
1153 |
|
|
AC_DEFINE(PTYS_ARE__GETPTY, 1, Define for this pty type) |
1154 |
|
|
fi |
1155 |
|
|
if test x$rxvt_cv_ptys = xCONVEX; then |
1156 |
|
|
AC_DEFINE(PTYS_ARE_GETPTY, 1, Define for this pty type) |
1157 |
|
|
fi |
1158 |
|
|
if test x$rxvt_cv_ptys = xGLIBC; then |
1159 |
|
|
AC_DEFINE(PTYS_ARE_GETPT, 1, Define for this pty type) |
1160 |
|
|
fi |
1161 |
|
|
if test x$rxvt_cv_ptys = xHPUX; then |
1162 |
|
|
AC_DEFINE(PTYS_ARE_CLONE, 1, Define for this pty type) |
1163 |
|
|
fi |
1164 |
|
|
if test x$rxvt_cv_ptys = xBSD -o x$rxvt_cv_ptys = xHPUX -o x$rxvt_cv_ptys = xGLIBC; then |
1165 |
|
|
AC_DEFINE(PTYS_ARE_SEARCHED, 1, Define for this pty type) |
1166 |
|
|
fi |
1167 |
|
|
|
1168 |
|
|
|
1169 |
|
|
AC_CHECKING(for pty ranges) |
1170 |
|
|
ptys=`echo /dev/pty??` |
1171 |
|
|
pch1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'` |
1172 |
|
|
pch2=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'` |
1173 |
|
|
if test x$pch1 != x; then |
1174 |
|
|
AC_DEFINE_UNQUOTED(PTYCHAR1, "$pch1", Define for first char in devptyXX) |
1175 |
|
|
fi |
1176 |
|
|
if test x$pch2 != x; then |
1177 |
|
|
AC_DEFINE_UNQUOTED(PTYCHAR2, "$pch2", Define for second char in devptyXX) |
1178 |
|
|
fi |
1179 |
|
|
|
1180 |
|
|
dnl# -------------------------------------------------------------------------- |
1181 |
|
|
dnl# now add and remove other stuff |
1182 |
|
|
dnl# -------------------------------------------------------------------------- |
1183 |
root |
1.27 |
if test x$support_8bitctrls = xyes; then |
1184 |
|
|
AC_DEFINE(EIGHT_BIT_CONTROLS, 1, Define if you want 8 bit control sequences) |
1185 |
root |
1.28 |
fi |
1186 |
|
|
if test x$support_fading = xyes; then |
1187 |
|
|
AC_DEFINE(OFF_FOCUS_FADING, 1, Define if you want faded colors when focus is lost) |
1188 |
root |
1.27 |
fi |
1189 |
pcg |
1.25 |
if test x$support_tinting = xyes; then |
1190 |
|
|
AC_DEFINE(TINTING, 1, Define if you want your background to be tinted) |
1191 |
|
|
fi |
1192 |
pcg |
1.1 |
if test x$support_inheritpixmap = xyes; then |
1193 |
|
|
AC_DEFINE(TRANSPARENT, 1, Define if you want your background to use the parent window background) |
1194 |
|
|
fi |
1195 |
|
|
if test x$support_keepscrolling = xno; then |
1196 |
|
|
AC_DEFINE(NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING, 1, Define for continual scrolling when you keep the scrollbar button pressed) |
1197 |
|
|
fi |
1198 |
|
|
if test x$support_selectionscrolling = xyes; then |
1199 |
|
|
AC_DEFINE(SELECTION_SCROLLING, 1, Define to allow scrolling when the selection moves to the top or bottom of the screen) |
1200 |
|
|
fi |
1201 |
|
|
if test x$support_menubar = xyes; then |
1202 |
|
|
AC_DEFINE(MENUBAR, 1, Define if you want Menubar support) |
1203 |
|
|
fi |
1204 |
|
|
if test x$support_frills = xno; then |
1205 |
|
|
AC_DEFINE(NO_FRILLS, 1, Define if you don't want handling for rarely used features) |
1206 |
|
|
fi |
1207 |
|
|
if test x$support_linespace = xno; then |
1208 |
|
|
AC_DEFINE(NO_LINESPACE, 1, Define if you don't want support linespace) |
1209 |
|
|
fi |
1210 |
|
|
if test x$support_24bit = xyes; then |
1211 |
|
|
AC_DEFINE(PREFER_24BIT, 1, Define to use a 24 bit visual if the screen has 24 bit mode, even if the default is 8 bit) |
1212 |
|
|
fi |
1213 |
|
|
if test x$support_mousewheel = xyes; then |
1214 |
|
|
AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll) |
1215 |
|
|
fi |
1216 |
|
|
if test x$support_mouseslipwheel = xyes; then |
1217 |
|
|
AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling) |
1218 |
|
|
fi |
1219 |
|
|
if test x$support_utmp = xyes; then |
1220 |
|
|
AC_DEFINE(UTMP_SUPPORT, 1, Define if you want to have utmp/utmpx support) |
1221 |
|
|
fi |
1222 |
|
|
if test x$support_wtmp = xyes; then |
1223 |
|
|
AC_DEFINE(WTMP_SUPPORT, 1, Define if you want to have wtmp support when utmp/utmpx is enabled) |
1224 |
|
|
fi |
1225 |
|
|
if test x$support_lastlog = xyes; then |
1226 |
|
|
AC_DEFINE(LASTLOG_SUPPORT, 1, Define if you want to have lastlog support when utmp/utmpx is enabled) |
1227 |
|
|
fi |
1228 |
|
|
if test x$support_xim = xyes -o x$multichar_set = xyes; then |
1229 |
|
|
if test x$rxvt_cv_func_xlocale = xyes; then |
1230 |
|
|
AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) |
1231 |
|
|
fi |
1232 |
|
|
fi |
1233 |
|
|
if test x$support_xpm = xyes; then |
1234 |
|
|
AC_DEFINE(XPM_BACKGROUND, 1, Define if you want to have sexy-looking background pixmaps. Needs libXpm) |
1235 |
|
|
fi |
1236 |
|
|
if test x$support_scroll_rxvt = xyes; then |
1237 |
|
|
AC_DEFINE(RXVT_SCROLLBAR, 1, Support Rxvt original style scrollbars) |
1238 |
|
|
scrolltypes="rxvt" |
1239 |
|
|
fi |
1240 |
|
|
if test x$support_scroll_next = xyes; then |
1241 |
|
|
AC_DEFINE(NEXT_SCROLLBAR, 1, Support NeXT style scrollbars) |
1242 |
|
|
scrolltypes="$scrolltypes next" |
1243 |
|
|
fi |
1244 |
|
|
if test x$support_scroll_xterm = xyes; then |
1245 |
|
|
AC_DEFINE(XTERM_SCROLLBAR, 1, Support Xterm style scrollbars) |
1246 |
|
|
scrolltypes="$scrolltypes xterm" |
1247 |
|
|
fi |
1248 |
pcg |
1.11 |
if test x$support_scroll_plain = xyes; then |
1249 |
|
|
AC_DEFINE(PLAIN_SCROLLBAR, 1, Support plain style scrollbars) |
1250 |
|
|
scrolltypes="$scrolltypes plain" |
1251 |
|
|
fi |
1252 |
pcg |
1.1 |
if test x$support_pointer_blank = xyes; then |
1253 |
|
|
AC_DEFINE(POINTER_BLANK, 1, Define if you want hide the pointer while typing) |
1254 |
|
|
fi |
1255 |
|
|
if test x$support_cursor_blink = xyes; then |
1256 |
|
|
AC_DEFINE(CURSOR_BLINK, 1, Define if you want blinking cursor support) |
1257 |
|
|
fi |
1258 |
pcg |
1.7 |
if test x$support_text_blink = xyes; then |
1259 |
pcg |
1.6 |
AC_DEFINE(TEXT_BLINK, 1, Define if you want blinking text support) |
1260 |
|
|
fi |
1261 |
pcg |
1.1 |
if test x$support_unicode3 = xyes; then |
1262 |
|
|
AC_DEFINE(UNICODE_3, 1, Define if you want to represent unicode characters outside plane 0) |
1263 |
|
|
fi |
1264 |
pcg |
1.18 |
if test x$support_combining = xyes; then |
1265 |
pcg |
1.21 |
AC_DEFINE(ENABLE_COMBINING, 1, Define if you want to automatically compose combining characters) |
1266 |
pcg |
1.18 |
fi |
1267 |
pcg |
1.1 |
if test x$codesets = xall; then |
1268 |
pcg |
1.18 |
codesets=jp,jp-ext,kr,cn,cn-ext |
1269 |
pcg |
1.1 |
fi |
1270 |
|
|
for codeset in `echo $codesets | tr "[a-z,\\-]" "[A-Z _]"`; do |
1271 |
pcg |
1.9 |
AC_DEFINE(ENCODING_EU, 1, Define if you want european extended codesets) |
1272 |
pcg |
1.16 |
AC_DEFINE(ENCODING_VN, 1, Define if you want vietnamese codesets) |
1273 |
pcg |
1.1 |
case "$codeset" in |
1274 |
|
|
JP ) AC_DEFINE(ENCODING_JP, 1, Define if you want japanese codesets) ;; |
1275 |
|
|
JP_EXT ) AC_DEFINE(ENCODING_JP_EXT, 1, Define if you want extended japanese codesets) ;; |
1276 |
|
|
KR ) AC_DEFINE(ENCODING_KR, 1, Define if you want korean codesets) ;; |
1277 |
|
|
CN ) AC_DEFINE(ENCODING_CN, 1, Define if you want chinese codesets) ;; |
1278 |
|
|
CN_EXT ) AC_DEFINE(ENCODING_CN_EXT, 1, Define if you want extended chinese codesets) ;; |
1279 |
|
|
esac |
1280 |
|
|
done |
1281 |
|
|
|
1282 |
|
|
dnl> AC_CHECK_FUNCS(gettimeofday putenv select socket) |
1283 |
|
|
|
1284 |
|
|
CFLAGS=${CFLAGS--O} |
1285 |
|
|
LDFLAGS=${LDFLAGS--O} |
1286 |
|
|
|
1287 |
|
|
CPPFLAGS="$CPPFLAGS" |
1288 |
|
|
AC_SUBST(DEBUG) |
1289 |
|
|
AC_SUBST(DINCLUDE) |
1290 |
|
|
AC_SUBST(CFLAGS) |
1291 |
|
|
AC_SUBST(CPPFLAGS) |
1292 |
|
|
AC_SUBST(LDFLAGS) |
1293 |
|
|
AC_SUBST(X_CFLAGS) |
1294 |
|
|
|
1295 |
|
|
dnl# Attack the libs |
1296 |
|
|
if test x$rxvt_cv_rpath = xyes -o x$rxvt_cv_R = xyes; then |
1297 |
|
|
DLIB=`echo $DLIB | sed "$R_TRANSLATE"` |
1298 |
|
|
LIBS=`echo $LIBS | sed "$R_TRANSLATE"` |
1299 |
|
|
X_LIBS=`echo $X_LIBS | sed "$R_TRANSLATE"` |
1300 |
|
|
X_EXTRA_LIBS=`echo $X_EXTRA_LIBS | sed "$R_TRANSLATE"` |
1301 |
|
|
XPM_LIBS=`echo $XPM_LIBS | sed "$R_TRANSLATE"` |
1302 |
|
|
fi |
1303 |
|
|
AC_SUBST(DLIB) |
1304 |
|
|
AC_SUBST(LIBS) |
1305 |
|
|
AC_SUBST(X_LIBS) |
1306 |
|
|
AC_SUBST(X_EXTRA_LIBS) |
1307 |
|
|
|
1308 |
|
|
if test x$support_addstrings = xno; then |
1309 |
|
|
AC_DEFINE(NO_STRINGS, 1, Define if you don't need to use our replacement string functions) |
1310 |
|
|
fi |
1311 |
|
|
|
1312 |
|
|
dnl# common parts of the Makefile |
1313 |
|
|
MCOMMON=./autoconf/Make.common |
1314 |
|
|
AC_SUBST_FILE(MCOMMON) |
1315 |
|
|
|
1316 |
|
|
AC_ARG_PROGRAM |
1317 |
|
|
|
1318 |
|
|
dnl# test for "sun" or "__sun__" before include sys_ioctl |
1319 |
|
|
|
1320 |
|
|
dnl# revert HAVE_BLAH_H into a "#include <blah.h>" |
1321 |
|
|
AC_DEFUN(RXVT_DEFINE_TO_INCLUDE, dnl |
1322 |
|
|
[if test "$$3" = "$4" -o "$$5" = "$6"; then |
1323 |
|
|
$1="#include <$2>" |
1324 |
|
|
else |
1325 |
|
|
$1="/* #include <$2> */" |
1326 |
|
|
fi dnl |
1327 |
|
|
AC_SUBST($1)]) |
1328 |
|
|
|
1329 |
|
|
RXVT_DEFINE_TO_INCLUDE(include_stdint_h, stdint.h, ac_cv_header_stdint_h, yes, notset, dontmatch) |
1330 |
pcg |
1.20 |
RXVT_DEFINE_TO_INCLUDE(include_stdarg_h, cstdarg, ac_cv_header_stdarg_h, yes, notset, dontmatch) |
1331 |
|
|
RXVT_DEFINE_TO_INCLUDE(include_stdlib_h, cstdlib, ac_cv_header_stdlib_h, yes, notset, dontmatch) |
1332 |
pcg |
1.1 |
RXVT_DEFINE_TO_INCLUDE(include_unistd_h, unistd.h, ac_cv_header_unistd_h, yes, notset, dontmatch) |
1333 |
pcg |
1.20 |
RXVT_DEFINE_TO_INCLUDE(include_string_h, cstring, ac_cv_header_string_h, yes, notset, dontmatch) |
1334 |
pcg |
1.1 |
RXVT_DEFINE_TO_INCLUDE(include_fcntl_h, fcntl.h, ac_cv_header_fcntl_h, yes, notset, dontmatch) |
1335 |
|
|
RXVT_DEFINE_TO_INCLUDE(include_util_h, util.h, ac_cv_header_util_h, yes, notset, dontmatch) |
1336 |
|
|
RXVT_DEFINE_TO_INCLUDE(include_assert_h, assert.h, ac_cv_header_assert_h, yes, notset, dontmatch) |
1337 |
|
|
RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch) |
1338 |
|
|
RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch) |
1339 |
|
|
RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch) |
1340 |
|
|
RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch) |
1341 |
|
|
RXVT_DEFINE_TO_INCLUDE(include_time_h, time.h, ac_cv_header_sys_time_h, no, ac_cv_header_time, yes) |
1342 |
|
|
|
1343 |
|
|
if test x$support_xft = xyes; then |
1344 |
|
|
LIBS="$LIBS `pkg-config xft --libs`" |
1345 |
|
|
CFLAGS="$CFLAGS `pkg-config xft --cflags`" |
1346 |
|
|
CPPFLAGS="$CPPFLAGS `pkg-config xft --cflags`" |
1347 |
|
|
|
1348 |
|
|
AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
1349 |
|
|
AC_CHECK_LIB(Xft,XftDrawString32,,[support_xft=no]) |
1350 |
pcg |
1.5 |
|
1351 |
|
|
if test x$support_xft = xyes; then |
1352 |
|
|
AC_DEFINE(XFT, 1, Define to enable xft support) |
1353 |
|
|
fi |
1354 |
pcg |
1.1 |
fi |
1355 |
|
|
|
1356 |
|
|
AC_OUTPUT(autoconf/Make.common \ |
1357 |
|
|
Makefile \ |
1358 |
|
|
doc/Makefile \ |
1359 |
|
|
src/Makefile \ |
1360 |
|
|
src/test/Makefile \ |
1361 |
|
|
src/rxvtlib.h \ |
1362 |
|
|
W11/Makefile \ |
1363 |
|
|
) |
1364 |
|
|
|
1365 |
|
|
echo "Configuration: |
1366 |
|
|
|
1367 |
|
|
Rxvt version: $VERSION : $DATE |
1368 |
|
|
Source code location: $srcdir |
1369 |
|
|
Install path: ${prefix}/bin |
1370 |
pcg |
1.16 |
Compiler: $CXX |
1371 |
|
|
Compiler flags: $CFLAGS |
1372 |
|
|
Linker: $LINKER" |
1373 |
pcg |
1.1 |
|
1374 |
|
|
if test "$MALLOC_TYPE" = S; then |
1375 |
|
|
echo " malloc support: system default" |
1376 |
|
|
fi |
1377 |
|
|
if test "$MALLOC_TYPE" = G; then |
1378 |
|
|
echo " malloc support: Gray Watson's dmalloc" |
1379 |
|
|
fi |
1380 |
|
|
if test "$MALLOC_TYPE" = D; then |
1381 |
|
|
echo " malloc support: Doug Lea's malloc" |
1382 |
|
|
fi |
1383 |
|
|
|
1384 |
|
|
if test x$support_xpm = xyes; then |
1385 |
|
|
echo " Xpm library: $XPM_LIBS" |
1386 |
|
|
fi |
1387 |
|
|
|
1388 |
|
|
echo " |
1389 |
|
|
The following are set in config.h |
1390 |
|
|
" |
1391 |
|
|
echo " pty/tty type: "$rxvt_cv_ptys |
1392 |
|
|
if test x$support_utmp != xyes; then |
1393 |
pcg |
1.22 |
echo " utmp support: disabled" |
1394 |
|
|
echo |
1395 |
pcg |
1.1 |
else |
1396 |
|
|
echo " utmp support: enabled |
1397 |
|
|
utmp file: $rxvt_cv_path_utmp |
1398 |
|
|
utmpx file: $rxvt_cv_path_utmpx |
1399 |
|
|
wtmp file: $rxvt_cv_path_wtmp |
1400 |
|
|
wtmpx file: $rxvt_cv_path_wtmpx |
1401 |
|
|
lastlog file: $rxvt_cv_path_lastlog |
1402 |
pcg |
1.22 |
ttys/ttytab file: $rxvt_cv_path_ttytab" |
1403 |
|
|
echo |
1404 |
pcg |
1.1 |
fi |
1405 |
|
|
if test x$term != x; then |
1406 |
pcg |
1.19 |
echo " set TERM to: $term" |
1407 |
pcg |
1.1 |
fi |
1408 |
|
|
if test x$terminfo != x; then |
1409 |
pcg |
1.19 |
echo " set TERMINFO to: $terminfo" |
1410 |
|
|
fi |
1411 |
|
|
echo " default resource name: $RESNAME" |
1412 |
|
|
echo " resource class: $RESCLASS" |
1413 |
|
|
if test x$RESFALLBACK != x; then |
1414 |
|
|
echo " resource class fallback: $RESFALLBACK" |
1415 |
pcg |
1.1 |
fi |
1416 |
pcg |
1.19 |
echo |
1417 |
pcg |
1.1 |
if test x$rxvt_cv_ptys = xUNKNOWN; then |
1418 |
|
|
echo ".----------------------------------------------------------------." |
1419 |
|
|
echo ". WARNING: could not determine pty/tty type. Do not build until ." |
1420 |
|
|
echo ". the appropriate PTYS_ARE_* is defined in config.h ." |
1421 |
|
|
echo ".----------------------------------------------------------------." |
1422 |
|
|
fi |
1423 |
|
|
if test x$support_xpm = xneedsmanualspecification; then |
1424 |
|
|
echo ".----------------------------------------------------------------." |
1425 |
|
|
echo ". WARNING: --enable-xpm-background was specified however the ." |
1426 |
|
|
echo ". XPM includes files and libraries could not be found. ." |
1427 |
|
|
echo ". XPM backgrounds are now being DISABLED! If you want ." |
1428 |
|
|
echo ". to use them you should rerun configure with the ." |
1429 |
|
|
echo ". appropriate --with-xpm-includes=/path/to/xpm/includes ." |
1430 |
|
|
echo ". and --with-xpm-library=/path/to/xpm/library lines. ." |
1431 |
|
|
echo ".----------------------------------------------------------------." |
1432 |
|
|
fi |
1433 |
|
|
if test x$support_xim = xyes -a x$rxvt_cv_func_xlocale = xno; then |
1434 |
|
|
echo ".----------------------------------------------------------------." |
1435 |
|
|
echo ". WARNING: --enable-xim was specified however the locale support ." |
1436 |
|
|
echo ". functions could not be found. ." |
1437 |
|
|
echo ". XIM is now being DISABLED! ." |
1438 |
|
|
echo ".----------------------------------------------------------------." |
1439 |
|
|
fi |
1440 |
pcg |
1.22 |
|
1441 |
|
|
echo " *** Please check src/feature.h for further options ***" |
1442 |
|
|
echo |
1443 |
|
|
|
1444 |
|
|
echo ".----------------------------------------------------------------." |
1445 |
|
|
echo ". NOTE: most features are disabled by default, try ." |
1446 |
|
|
echo ". configure --help to get an idea of the optional features ." |
1447 |
|
|
echo ".----------------------------------------------------------------." |
1448 |
|
|
echo |
1449 |
|
|
|