ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/autoconf/configure.in
Revision: 1.56
Committed: Fri Dec 23 14:46:34 2005 UTC (18 years, 6 months ago) by root
Branch: MAIN
Changes since 1.55: +33 -0 lines
Log Message:
*** empty log message ***

File Contents

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