configure.in revision 2e4f8982
1dnl $XTermId: configure.in,v 1.340 2016/05/28 16:51:40 tom Exp $
2dnl
3dnl -----------------------------------------------------------------------------
4dnl this file is part of xterm
5dnl
6dnl Copyright 1997-2015,2016 by Thomas E. Dickey
7dnl 
8dnl                         All Rights Reserved
9dnl 
10dnl Permission is hereby granted, free of charge, to any person obtaining a
11dnl copy of this software and associated documentation files (the
12dnl "Software"), to deal in the Software without restriction, including
13dnl without limitation the rights to use, copy, modify, merge, publish,
14dnl distribute, sublicense, and/or sell copies of the Software, and to
15dnl permit persons to whom the Software is furnished to do so, subject to
16dnl the following conditions:
17dnl 
18dnl The above copyright notice and this permission notice shall be included
19dnl in all copies or substantial portions of the Software.
20dnl 
21dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24dnl IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
25dnl CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26dnl TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27dnl SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28dnl 
29dnl Except as contained in this notice, the name(s) of the above copyright
30dnl holders shall not be used in advertising or otherwise to promote the
31dnl sale, use or other dealings in this Software without prior written
32dnl authorization.
33dnl ---------------------------------------------------------------------------
34dnl Process this file with autoconf to produce a configure script.
35dnl
36AC_PREREQ(2.52.20121002)
37AC_INIT
38AC_CONFIG_SRCDIR([charproc.c])
39AC_CONFIG_HEADER(xtermcfg.h:xtermcfg.hin)
40CF_CHECK_CACHE
41
42###	checks for alternative programs
43
44dnl Only add to this case statement when a system has a compiler that is not
45dnl detected by AC_PROG_CC.
46case "$host_os" in
47(openedition)	: ${CFLAGS="-O2 -Wc,dll -Wl,EDIT=NO"}
48		: ${CPPFLAGS="-D_ALL_SOURCE"}
49		: ${LIBS="/usr/lib/Xaw.x /usr/lib/SM.x /usr/lib/ICE.x /usr/lib/X11.x"}
50		: ${CC=c89};;
51(darwin*)
52		: ${LDFLAGS}="${LDFLAGS} -Wl,-bind_at_load";;
53esac
54
55CF_PROG_CC
56AC_PROG_CPP
57AC_PROG_AWK
58AC_PROG_INSTALL
59AC_PROG_LN_S
60AC_ARG_PROGRAM
61CF_PROG_LINT
62
63###	checks for compiler characteristics
64CF_XOPEN_SOURCE
65CF_SIGWINCH
66
67###	checks for header files
68AC_CHECK_HEADERS( \
69ncurses/curses.h \
70ncurses/term.h \
71stdlib.h \
72sys/ptem.h sys/ttydefaults.h \
73term.h \
74termios.h \
75unistd.h \
76wchar.h \
77)
78AC_HEADER_TIME
79AM_LANGINFO_CODESET
80
81###	checks for typedefs
82CF_SIG_ATOMIC_T
83AC_CHECK_TYPE(time_t, long)
84CF_TYPE_CC_T
85AC_TYPE_MODE_T
86AC_TYPE_PID_T
87AC_TYPE_UID_T
88AC_TYPE_OFF_T
89
90###	checks for library functions
91AC_CHECK_FUNCS( \
92	gethostname \
93	getlogin \
94	initgroups \
95	mkdtemp \
96	putenv \
97	unsetenv \
98	sched_yield \
99	setpgid \
100	strftime \
101	tcgetattr \
102	waitpid \
103	wcswidth \
104	wcwidth )
105CF_UTMP
106CF_STRUCT_LASTLOG
107CF_POSIX_SAVED_IDS
108
109CF_HELP_MESSAGE(Compile/Install Options:)
110CF_FUNC_TGETENT
111
112CF_WITH_APP_CLASS(XTerm)
113CF_WITH_APP_DEFAULTS
114CF_WITH_ICON_NAME(xterm-color)
115CF_WITH_ICON_SYMLINK(xterm)
116CF_WITH_ICON_THEME([icons/$ICON_NAME icons/${ICON_NAME}_48x48],,,icons/${ICON_NAME}_48x48)
117CF_DISABLE_DESKTOP(xterm)
118CF_WITH_DESKTOP_CATEGORY(xterm,
119	[*rxvt*|konsole|*-terminal],
120	[System|TerminalEmulator|Utility|*])
121
122AC_MSG_CHECKING(for install-permissions reference)
123AC_ARG_WITH(reference,
124	[  --with-reference=XXX    program to use as permissions-reference],
125	[with_reference=$withval],
126	[with_reference=xterm])
127AC_MSG_RESULT($with_reference)
128
129with_full_paths=yes
130CF_PATH_PROG(XTERM_PATH,$with_reference)
131
132# If any of --program-prefix, --program-suffix or --program-transform-name is
133# given, accept an option tell the makefile to create a symbolic link, e.g.,
134# to "xterm" on install.
135XTERM_SYMLINK=NONE
136AC_SUBST(XTERM_SYMLINK)
137if test "$program_transform_name" != "'s,,,'" ; then
138cf_name=`echo "$program_transform_name" | sed -e '[s,\\$\\$,$,g]'`
139cf_name=`echo xterm |sed -e "$cf_name"`
140AC_MSG_CHECKING(for symbolic link to create to $cf_name)
141AC_ARG_WITH(xterm-symlink,
142	[  --with-xterm-symlink=XXX make symbolic link to installed xterm],
143	[with_symlink=$withval],
144	[with_symlink=xterm])
145AC_MSG_RESULT($with_symlink)
146test "$with_symlink" = yes && with_symlink=xterm
147test -n "$with_symlink" && \
148	test "$with_symlink" != no && \
149	test "$with_symlink" != $cf_name && \
150	XTERM_SYMLINK="$with_symlink"
151fi
152
153AC_MSG_CHECKING(if you want to disable openpty)
154CF_ARG_DISABLE(openpty,
155	[  --disable-openpty       disable openpty, prefer other interfaces],
156	[disable_openpty=yes],
157	[disable_openpty=no],
158	no)
159AC_MSG_RESULT($disable_openpty)
160
161AC_MSG_CHECKING(if you want to disable setuid)
162CF_ARG_DISABLE(setuid,
163	[  --disable-setuid        disable setuid in xterm, do not install setuid/setgid],
164	[disable_setuid=yes],
165	[disable_setuid=no],
166	no)
167AC_MSG_RESULT($disable_setuid)
168
169AC_MSG_CHECKING(if you want to disable setgid)
170CF_ARG_DISABLE(setgid,
171	[  --disable-setgid        disable setgid in xterm, do not install setuid/setgid],
172	[disable_setgid=yes],
173	[disable_setgid=no],
174	no)
175AC_MSG_RESULT($disable_setgid)
176
177AC_MSG_CHECKING(if you want to run xterm setuid to a given user)
178AC_ARG_WITH(setuid,
179	[  --with-setuid=XXX       use the given setuid user],
180	[use_given_setuid=$withval],
181	[use_given_setuid=no])
182AC_MSG_RESULT($use_given_setuid)
183
184if test "$use_given_setuid" != no ; then
185	if test "$use_given_setuid" = yes ; then
186		cf_cv_given_setuid=root
187	else
188		cf_cv_given_setuid=$use_given_setuid
189	fi
190	# inherit SINSTALL_OPTS from environment to allow packager to customize it.
191	SINSTALL_OPTS="$SINSTALL_OPTS u+s -u $cf_cv_given_setuid"
192fi
193
194AC_MSG_CHECKING(if you want to run xterm setgid to match utmp/utmpx file)
195AC_ARG_WITH(utmp-setgid,
196	[  --with-utmp-setgid=XXX  use setgid to match utmp/utmpx file],
197	[use_utmp_setgid=$withval],
198	[use_utmp_setgid=no])
199AC_MSG_RESULT($use_utmp_setgid)
200
201if test "$use_utmp_setgid" != no ; then
202	if test "$use_utmp_setgid" = yes ; then
203		CF_UTMP_GROUP
204	else
205		cf_cv_utmp_group=$use_utmp_setgid
206	fi
207	if test "$cf_cv_posix_saved_ids" != yes ; then
208		AC_MSG_ERROR(Your system does not support POSIX saved-ids)
209	fi
210	AC_DEFINE(USE_UTMP_SETGID,1,[Define to 1 if we should use setgid to access utmp/utmpx])
211	SINSTALL_OPTS="$SINSTALL_OPTS g+s -g $cf_cv_utmp_group"
212fi
213
214AC_SUBST(SINSTALL_OPTS)
215
216AC_MSG_CHECKING(if you want to link with utempter)
217AC_ARG_WITH(utempter,
218	[  --with-utempter         use utempter library for access to utmp],
219	[use_utempter=$withval],
220	[use_utempter=no])
221AC_MSG_RESULT($use_utempter)
222
223if test "$use_utempter" = yes ; then
224	CF_UTEMPTER
225	test "$cf_cv_have_utempter" != yes && use_utempter=no
226else
227	use_utempter=no
228fi
229
230# Some configurations permit (or require) either setuid or setgid mode.
231# Let the user decide.
232if test "$use_utempter" = yes ; then
233	if test "${enable_setuid+set}" != set ; then
234		disable_setuid=yes
235		CF_VERBOSE([No --disable-setuid option given, force to yes])
236	fi
237fi
238
239###	checks for external data
240CF_ERRNO
241CF_TTY_GROUP
242
243###	checks for system services and user specified options
244
245CF_POSIX_WAIT
246CF_SYSV
247CF_SVR4
248CF_X_TOOLKIT
249
250AC_CHECK_HEADERS( \
251	X11/DECkeysym.h \
252	X11/Sunkeysym.h \
253	X11/XF86keysym.h \
254	X11/XKBlib.h \
255	X11/Xpoll.h \
256	X11/extensions/XKB.h \
257	)
258
259CF_WITH_XPM
260CF_WITH_XINERAMA
261CF_X_ATHENA
262CF_TYPE_FD_MASK
263CF_TERMIO_C_ISPEED
264
265# If we notice Xcursor, there is a workaround needed.
266AC_CHECK_LIB(Xcursor, XcursorGetTheme,[AC_DEFINE(HAVE_LIB_XCURSOR)])
267
268LIBS="$LIBS $X_EXTRA_LIBS"
269
270CF_FUNC_GRANTPT
271CF_XKB_QUERY_EXTENSION
272CF_XKB_KEYCODE_TO_KEYSYM
273CF_XKB_BELL_EXT
274
275AC_CHECK_FUNCS(Xutf8LookupString, [],[
276	EXTRAHDRS="$EXTRAHDRS xutf8.h"
277	EXTRASRCS="$EXTRASRCS xutf8.c"
278	EXTRAOBJS="$EXTRAOBJS xutf8.o"
279])
280
281CF_WITH_IMAKE_CFLAGS($(MAIN_DEFINES) $(VENDORMANDEFS))
282CF_WITH_MAN2HTML
283
284# If we have already established that there is a full termcap implementation,
285# suppress the definitions for terminfo that we make have imported from the
286# imake-file.
287if test "x$cf_cv_lib_tgetent" != xno || test "x$cf_cv_lib_part_tgetent" != xno ; then
288	case "$IMAKE_CFLAGS" in
289	(*-DUSE_TERMINFO\ -DHAVE_TIGETSTR*)
290		CF_UNDO_CFLAGS(IMAKE_CFLAGS,terminfo,[-DUSE_TERMINFO[[ 	]]*-DHAVE_TIGETSTR[[ 	]]*])
291		CF_UNDO_CFLAGS(CPPFLAGS,terminfo,[-DUSE_TERMINFO[[ 	]]*-DHAVE_TIGETSTR[[ 	]]*])
292		;;
293	esac
294fi
295
296CF_HELP_MESSAGE(Terminal Configuration:)
297
298AC_MSG_CHECKING(for default terminal-id)
299AC_ARG_WITH(terminal-id,
300	[  --with-terminal-id=V    set default decTerminalID (default: vt420)],
301	[default_termid=$withval],
302	[default_termid=vt420])
303AC_MSG_RESULT($default_termid)
304case $default_termid in
305(vt*)	default_termid=`echo $default_termid | sed -e 's/^..//'`
306	;;
307esac
308AC_DEFINE_UNQUOTED(DFT_DECID,"$default_termid",[default terminal-id])
309AC_SUBST(default_termid)
310
311AC_MSG_CHECKING(for default terminal-type)
312AC_ARG_WITH(terminal-type,
313	[  --with-terminal-type=T  set default $TERM (default: xterm)],
314	[default_TERM=$withval],
315	[default_TERM=xterm])
316AC_MSG_RESULT($default_TERM)
317AC_DEFINE_UNQUOTED(DFT_TERMTYPE,"$default_TERM",[default terminal-type])
318AC_SUBST(default_TERM)
319
320###############################################################################
321AC_MSG_CHECKING(if backarrow-key should be BS)
322CF_ARG_DISABLE(backarrow-key,
323	[  --enable-backarrow-key  set default backarrowKey resource (default: true)],
324	[backarrow_is_bs=$enableval],
325	[backarrow_is_bs=yes])
326CF_XBOOL_RESULT(DEF_BACKARO_BS,backarrow_is_bs,[Define to 1 if backarrow-key should be BS])
327
328AC_MSG_CHECKING(if backarrow-key should be treated as erase)
329CF_ARG_ENABLE(backarrow-is-erase,
330	[  --enable-backarrow-is-erase set default backarrowKeyIsErase resource (default: false)],
331	[backarrow_is_erase=$enableval],
332	[backarrow_is_erase=no])
333CF_XBOOL_RESULT(DEF_BACKARO_ERASE,backarrow_is_erase,[Define to 1 if backarrow-key should be treated as erase])
334
335AC_MSG_CHECKING(for default backspace/DEL setting)
336AC_ARG_ENABLE(delete-is-del,
337	[  --enable-delete-is-del  set default deleteIsDEL resource (default: maybe)],
338	[delete_is_del=$enableval],
339	[delete_is_del=maybe])
340CF_XBOOL_RESULT(DEFDELETE_DEL,delete_is_del,[Define to 1 if default backspace/DEL setting is DEL])
341
342AC_MSG_CHECKING(for default pty initial erase setting)
343AC_ARG_ENABLE(pty-erase,
344	[  --enable-pty-erase      set default ptyInitialErase resource (default: maybe)],
345	[initial_erase=$enableval],
346	[initial_erase=False])
347CF_XBOOL_RESULT(DEF_INITIAL_ERASE,initial_erase,[Define to 1 if default pty initial erase setting is TRUE])
348
349AC_MSG_CHECKING(if alt should send ESC)
350CF_ARG_ENABLE(alt-sends-esc,
351	[  --enable-alt-sends-esc  set default altSendsEscape resource (default: no)],
352	[alt_sends_esc=$enableval],
353	[alt_sends_esc=no])
354CF_XBOOL_RESULT(DEF_ALT_SENDS_ESC,alt_sends_esc,[Define to 1 if alt should send ESC])
355
356AC_MSG_CHECKING(if meta should send ESC)
357CF_ARG_ENABLE(meta-sends-esc,
358	[  --enable-meta-sends-esc set default metaSendsEscape resource (default: no)],
359	[meta_sends_esc=$enableval],
360	[meta_sends_esc=no])
361CF_XBOOL_RESULT(DEF_META_SENDS_ESC,meta_sends_esc,[Define to 1 if meta should send ESC])
362
363###############################################################################
364AC_CHECK_PROG(cf_tic_prog,tic,yes,no)
365if test "$cf_tic_prog" = yes ; then
366	AC_MSG_CHECKING(for private terminfo-directory)
367	AC_ARG_WITH(own-terminfo,
368		[  --with-own-terminfo=P   set default $TERMINFO (default: from environment)],
369		[TERMINFO_DIR=$withval],
370		[TERMINFO_DIR=${TERMINFO-none}])
371	AC_MSG_RESULT($TERMINFO_DIR)
372	if test "$TERMINFO_DIR" = yes ; then
373		AC_MSG_WARN(no value given)
374	elif test "$TERMINFO_DIR" != none ; then
375		if test -d $TERMINFO_DIR ; then
376			AC_DEFINE_UNQUOTED(OWN_TERMINFO_DIR,"$TERMINFO_DIR",[Define to override default TERMINFO value])
377		else
378			AC_MSG_WARN(not a directory)
379		fi
380	elif test "$prefix" != NONE ; then
381		TERMINFO_DIR='${prefix}/lib/terminfo'
382	elif test -d /usr/lib/terminfo ; then
383		TERMINFO_DIR=/usr/lib/terminfo
384	else
385		TERMINFO_DIR=
386	fi
387	SET_TERMINFO=
388	if test -n "$TERMINFO_DIR" ; then
389		TERMINFO_DIR='$(DESTDIR)'$TERMINFO_DIR
390		SET_TERMINFO='TERMINFO=$(TERMINFO_DIR)'
391	fi
392	no_ticprog=
393else
394	no_ticprog="#"
395	TERMINFO_DIR=
396	SET_TERMINFO=
397fi
398AC_SUBST(no_ticprog)
399AC_SUBST(TERMINFO_DIR)
400AC_SUBST(SET_TERMINFO)
401
402###############################################################################
403CF_HELP_MESSAGE(Optional Features:)
404
405AC_MSG_CHECKING(if you want active-icons)
406CF_ARG_DISABLE(active-icon,
407	[  --disable-active-icon   disable X11R6.3 active-icon feature],
408	[enable_active_icon=no],
409	[enable_active_icon=yes])
410AC_MSG_RESULT($enable_active_icon)
411if test "$enable_active_icon" = no ; then
412	AC_DEFINE(NO_ACTIVE_ICON,1,[Define to 1 to disable X11R6.3 active-icon feature])
413fi
414
415AC_MSG_CHECKING(if you want ANSI color)
416CF_ARG_DISABLE(ansi-color,
417	[  --disable-ansi-color    disable ANSI color],
418	[enable_ansi_color=no],
419	[enable_ansi_color=yes])
420AC_MSG_RESULT($enable_ansi_color)
421test "$enable_ansi_color" = no && AC_DEFINE(OPT_ISO_COLORS,0,[Define to 0 to disable ANSI color])
422
423if test "$enable_ansi_color" = yes ; then
424
425	AC_MSG_CHECKING(if you want 16 colors like aixterm)
426	CF_ARG_DISABLE(16-color,
427		[  --disable-16-color      disable 16-color support],
428		[enable_16_color=no],
429		[enable_16_color=yes])
430	AC_MSG_RESULT($enable_16_color)
431	test "$enable_16_color" = no && AC_DEFINE(OPT_AIX_COLORS,0,[Define to 0 to disable 16-color support])
432
433	AC_MSG_CHECKING(if you want 256 colors)
434	CF_ARG_ENABLE(256-color,
435		[  --enable-256-color      enable 256-color support],
436		[enable_256_color=yes],
437		[enable_256_color=no])
438	AC_MSG_RESULT($enable_256_color)
439	if test "$enable_256_color" = yes ; then
440		CHARPROC_DEPS="$CHARPROC_DEPS 256colres.h"
441		EXTRAHDRS="$EXTRAHDRS 256colres.h"
442		AC_DEFINE(OPT_256_COLORS,1,[Define to 1 to enable 256-color support])
443	else
444	AC_MSG_CHECKING(if you want 88 colors)
445	CF_ARG_ENABLE(88-color,
446		[  --enable-88-color       enable 88-color support],
447		[enable_88_color=yes],
448		[enable_88_color=no])
449	AC_MSG_RESULT($enable_88_color)
450	if test "$enable_88_color" = yes ; then
451		CHARPROC_DEPS="$CHARPROC_DEPS 88colres.h"
452		EXTRAHDRS="$EXTRAHDRS 88colres.h"
453		AC_DEFINE(OPT_88_COLORS,1,[Define to 1 to enable 88-color support])
454	fi
455	fi
456
457fi
458
459AC_MSG_CHECKING(if you want blinking cursor)
460CF_ARG_DISABLE(blink-cursor,
461	[  --disable-blink-cursor  disable support for blinking cursor],
462	[enable_blink_curs=no],
463	[enable_blink_curs=yes])
464AC_MSG_RESULT($enable_blink_curs)
465test "$enable_blink_curs" = no && AC_DEFINE(OPT_BLINK_CURS,0,[Define to 0 to disable support for blinking cursor])
466
467AC_MSG_CHECKING(if you want to ignore Linux's broken palette-strings)
468
469case $host_os in
470(linux*)
471	assume_broken_osc=yes ;;
472(*)
473	assume_broken_osc=no ;;
474esac
475
476CF_ARG_OPTION(broken-osc,
477	[  --enable-broken-osc     allow broken Linux OSC-strings],
478	[enable_broken_osc=$enableval],
479	[enable_broken_osc=$enableval],
480	[$assume_broken_osc])
481AC_MSG_RESULT($enable_broken_osc)
482if test "$enable_broken_osc" = yes ; then
483	AC_DEFINE(OPT_BROKEN_OSC,1,[Define to 1 to allow broken Linux OSC-strings])
484else
485	AC_DEFINE(OPT_BROKEN_OSC,0,[Define to 0 to allow broken Linux OSC-strings])
486fi
487
488AC_MSG_CHECKING(if you want to allow broken string-terminators)
489CF_ARG_ENABLE(broken-st,
490	[  --disable-broken-st     disallow broken string-terminators],
491	[enable_broken_st=no],
492	[enable_broken_st=yes])
493AC_MSG_RESULT($enable_broken_st)
494test "$enable_broken_st" = no && AC_DEFINE(OPT_BROKEN_ST,0,[Define to 0 to disallow broken string-terminators])
495
496AC_MSG_CHECKING(if you want to compile-in icon data)
497CF_ARG_ENABLE(builtin-xpms,
498	[  --enable-builtin-xpms   compile-in icon data],
499	[enable_builtin_xpms=yes],
500	[enable_builtin_xpms=no])
501AC_MSG_RESULT($enable_builtin_xpms)
502test "$enable_builtin_xpms" = yes && AC_DEFINE(OPT_BUILTIN_XPMS,1,[Define to 1 to compile-in icon data])
503
504AC_MSG_CHECKING(if you want printable 128-159)
505CF_ARG_DISABLE(c1-print,
506	[  --disable-c1-print      disallow -k8 option for printable 128-159],
507	[enable_c1_print=no],
508	[enable_c1_print=yes])
509AC_MSG_RESULT($enable_c1_print)
510test "$enable_c1_print" = no && AC_DEFINE(OPT_C1_PRINT,0,[Define to 0 to disallow -k8 option for printable 128-159])
511
512if test "$enable_ansi_color" = yes ; then
513
514	AC_MSG_CHECKING(if you want bold colors mapped like IBM PC)
515	CF_ARG_DISABLE(bold-color,
516		[  --disable-bold-color    disable PC-style mapping of bold colors],
517		[enable_pc_color=no],
518		[enable_pc_color=yes])
519	AC_MSG_RESULT($enable_pc_color)
520	test "$enable_pc_color" = no && AC_DEFINE(OPT_PC_COLORS,0,[Define to 0 to disable PC-style mapping of bold colors])
521
522	AC_MSG_CHECKING(if you want separate color-classes)
523	CF_ARG_DISABLE(color-class,
524		[  --disable-color-class   disable separate color class resources],
525		[enable_color_class=no],
526		[enable_color_class=yes])
527	AC_MSG_RESULT($enable_color_class)
528	test "$enable_color_class" = no && AC_DEFINE(OPT_COLOR_CLASS,0,[Define to 0 to disable separate color class resources])
529
530	AC_MSG_CHECKING(if you want color-mode enabled by default)
531	CF_ARG_DISABLE(color-mode,
532		[  --disable-color-mode    disable default colorMode resource],
533		[default_colormode=no],
534		[default_colormode=yes])
535	AC_MSG_RESULT($default_colormode)
536	test "$default_colormode" = no && AC_DEFINE(DFT_COLORMODE,0,[Define to 0 if you want color-mode enabled by default])
537
538fi
539
540AC_MSG_CHECKING(if you want support for color highlighting)
541CF_ARG_DISABLE(highlighting,
542	[  --disable-highlighting  disable support for color highlighting],
543	[default_highlight=no],
544	[default_highlight=yes])
545AC_MSG_RESULT($default_highlight)
546test "$default_highlight" = no && AC_DEFINE(OPT_HIGHLIGHT_COLOR,0,[Define to 1 if you want support for color highlighting])
547
548AC_MSG_CHECKING(if you want support for doublesize characters)
549CF_ARG_DISABLE(doublechars,
550	[  --disable-doublechars   disable support for double-size chars],
551	[enable_doublechars=no],
552	[enable_doublechars=yes])
553AC_MSG_RESULT($enable_doublechars)
554test "$enable_doublechars" = no && AC_DEFINE(OPT_DEC_CHRSET,0,[Define to 0 to disable support for double-size chars])
555
556AC_MSG_CHECKING(if you want fallback-support for box characters)
557CF_ARG_DISABLE(boxchars,
558	[  --disable-boxchars      disable fallback-support for box chars],
559	[enable_boxchars=no],
560	[enable_boxchars=yes])
561AC_MSG_RESULT($enable_boxchars)
562test "$enable_boxchars" = no && AC_DEFINE(OPT_BOX_CHARS,0,[Define to 0 to disable fallback-support for box chars])
563
564AC_MSG_CHECKING(if you want to allow spawning new xterms)
565CF_ARG_ENABLE(exec-xterm,
566	[  --enable-exec-xterm     enable "spawn-new-terminal" action],
567	[enable_exec_xterm=yes],
568	[enable_exec_xterm=no])
569AC_MSG_RESULT($enable_exec_xterm)
570if test "$enable_exec_xterm" = yes ; then
571	CF_PROCFS_CWD
572	if test "$cf_cv_procfs_cwd" = no ; then
573		AC_MSG_WARN(no suitable proc filesystem found)
574	else
575		AC_DEFINE_UNQUOTED(PROCFS_ROOT,"$cf_cv_procfs_cwd",[This is defined via the --enable-exec-xterm option])
576		AC_DEFINE(OPT_EXEC_XTERM,1,[Define to 1 to enable "spawn-new-terminal" action])
577	fi
578fi
579
580AC_MSG_CHECKING(if you want to use double-buffering)
581CF_ARG_ENABLE(double-buffer,
582	[  --enable-double-buffer  enable double-buffering],
583	[enable_double_bfr=yes],
584	[enable_double_bfr=no])
585AC_MSG_RESULT($enable_double_bfr)
586if test "$enable_double_bfr" = yes ; then
587	case "x$LIBS" in
588	(*Xext*)
589		;;
590	(*)
591		CF_X_EXT 
592		;;
593	esac
594	AC_DEFINE(OPT_DOUBLE_BUFFER,1,[Define to 1 to enable double-buffering])
595fi
596
597AC_MSG_CHECKING(if you want to use FreeType library)
598CF_ARG_DISABLE(freetype,
599	[  --disable-freetype      disable freetype library-support],
600	[enable_freetype=no],
601	[enable_freetype=yes])
602AC_MSG_RESULT($enable_freetype)
603if test "$enable_freetype" = yes ; then
604	CF_X_FONTCONFIG
605else
606	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
607fi
608
609AC_MSG_CHECKING(if you want support for HP-style function keys)
610CF_ARG_ENABLE(hp-fkeys,
611	[  --enable-hp-fkeys       enable support for HP-style function keys],
612	[enable_hp_fkeys=yes],
613	[enable_hp_fkeys=no])
614AC_MSG_RESULT($enable_hp_fkeys)
615if test "$enable_hp_fkeys" = yes ; then
616	AC_DEFINE(OPT_HP_FUNC_KEYS,1,[Define to 1 to enable support for HP-style function keys])
617fi
618
619AC_MSG_CHECKING(if you want support for SCO-style function keys)
620CF_ARG_ENABLE(sco-fkeys,
621	[  --enable-sco-fkeys      enable support for SCO-style function keys],
622	[enable_sco_fkeys=yes],
623	[enable_sco_fkeys=no])
624AC_MSG_RESULT($enable_sco_fkeys)
625if test "$enable_sco_fkeys" = yes ; then
626	AC_DEFINE(OPT_SCO_FUNC_KEYS,1,[Define to 1 to enable support for SCO-style function keys])
627fi
628
629AC_MSG_CHECKING(if you want support for Sun-style function keys)
630CF_ARG_DISABLE(sun-fkeys,
631	[  --disable-sun-fkeys     disable support for Sun-style function keys],
632	[enable_sun_fkeys=no],
633	[enable_sun_fkeys=yes])
634AC_MSG_RESULT($enable_sun_fkeys)
635if test "$enable_sun_fkeys" = no ; then
636	AC_DEFINE(OPT_SUN_FUNC_KEYS,0,[Define to 0 to disable support for Sun-style function keys])
637fi
638
639AC_MSG_CHECKING(if you want saved-lines stored as a FIFO)
640CF_ARG_DISABLE(fifo-lines,
641	[  --disable-fifo-lines    disable FIFO-storage for saved-lines],
642	[enable_fifo_lines=no],
643	[enable_fifo_lines=yes])
644AC_MSG_RESULT($enable_fifo_lines)
645if test "$enable_fifo_lines" = yes ; then
646	AC_DEFINE(OPT_FIFO_LINES,1,[Define to 1 to disable FIFO-storage for saved-lines])
647fi
648
649AC_MSG_CHECKING(if you want support for internationalization)
650CF_ARG_DISABLE(i18n,
651	[  --disable-i18n          disable internationalization],
652	[enable_i18n=no],
653	[enable_i18n=yes])
654AC_MSG_RESULT($enable_i18n)
655if test "$enable_i18n" = no ; then
656	AC_DEFINE(OPT_I18N_SUPPORT,0,[Define to 0 to disable internationalization])
657fi
658
659AC_MSG_CHECKING(if you want support for initial-erase setup)
660CF_ARG_DISABLE(initial-erase,
661	[  --disable-initial-erase disable setup for stty erase],
662	[enable_ie=no],
663	[enable_ie=yes])
664AC_MSG_RESULT($enable_ie)
665if test "$enable_ie" = no ; then
666	AC_DEFINE(OPT_INITIAL_ERASE,0,[Define to 0 to disable setup for stty erase])
667fi
668
669AC_MSG_CHECKING(if you want support for input-method)
670CF_ARG_DISABLE(input-method,
671	[  --disable-input-method  disable input-method],
672	[enable_ximp=no],
673	[enable_ximp=yes])
674AC_MSG_RESULT($enable_ximp)
675CF_INPUT_METHOD
676test "$cf_cv_input_method" = no && enable_ximp=no
677if test "$enable_ximp" = no ; then
678	AC_DEFINE(OPT_INPUT_METHOD,0,[Define to 0 to disable input-method])
679fi
680
681AC_MSG_CHECKING(if you want support for load-vt-fonts)
682CF_ARG_ENABLE(load-vt-fonts,
683	[  --enable-load-vt-fonts  enable load-vt-fonts() action],
684	[enable_load_vt_fonts=yes],
685	[enable_load_vt_fonts=no])
686AC_MSG_RESULT($enable_load_vt_fonts)
687if test "$enable_load_vt_fonts" = yes ; then
688	AC_DEFINE(OPT_LOAD_VTFONTS,1,[Define to 1 to enable load-vt-fonts() action])
689fi
690
691AC_MSG_CHECKING(if you want support for logging)
692CF_ARG_ENABLE(logging,
693	[  --enable-logging        enable logging],
694	[enable_logging=yes],
695	[enable_logging=no])
696AC_MSG_RESULT($enable_logging)
697if test "$enable_logging" = yes ; then
698	AC_DEFINE(ALLOWLOGGING,1,[if you want support for logging])
699	AC_MSG_CHECKING(if you want to allow logging via a pipe)
700	CF_ARG_ENABLE(logfile-exec,
701		[  --enable-logfile-exec   enable exec'd logfile filter],
702		[enable_log_exec=yes],
703		[enable_log_exec=no])
704	AC_MSG_RESULT($enable_log_exec)
705	if test "$enable_log_exec" = yes ; then
706		AC_DEFINE(ALLOWLOGFILEEXEC,1,[if you want to allow logging via a pipe])
707	fi
708fi
709
710AC_MSG_CHECKING(if you want support for iconify/maximize translations)
711CF_ARG_DISABLE(maximize,
712	[  --disable-maximize      disable actions for iconify/deiconify/maximize/restore],
713	[enable_maximize=no],
714	[enable_maximize=yes])
715AC_MSG_RESULT($enable_maximize)
716test "$enable_maximize" = no && AC_DEFINE(OPT_MAXIMIZE,0,[Define to 0 to disable actions for iconify/deiconify/maximize/restore])
717
718AC_MSG_CHECKING(if you want NumLock to override keyboard tables)
719CF_ARG_DISABLE(num-lock,
720	[  --disable-num-lock      disable NumLock keypad support],
721	[enable_numlock=no],
722	[enable_numlock=yes])
723AC_MSG_RESULT($enable_numlock)
724test "$enable_numlock" = no && AC_DEFINE(OPT_NUM_LOCK,0,[Define to 0 to disable NumLock keypad support])
725
726AC_MSG_CHECKING(if you want support for get/set of base64 selection data)
727
728CF_ARG_DISABLE(paste64,
729	[  --disable-paste64       disable get/set base64 selection data],
730	[enable_paste64=no],
731	[enable_paste64=yes])
732AC_MSG_RESULT($enable_paste64)
733if test "$enable_paste64" = yes ; then
734	AC_DEFINE(OPT_PASTE64,1,[Define to 1 to disable get/set base64 selection data])
735else
736	AC_DEFINE(OPT_PASTE64,0,[Define to 0 to disable get/set base64 selection data])
737fi
738
739AC_MSG_CHECKING(if you want support for pty-handshaking)
740
741CF_ARG_DISABLE(pty-handshake,
742	[  --disable-pty-handshake disable pty-handshake support],
743	[enable_pty_handshake=no],
744	[enable_pty_handshake=yes])
745AC_MSG_RESULT($enable_pty_handshake)
746if test "$enable_pty_handshake" = yes ; then
747	AC_DEFINE(OPT_PTY_HANDSHAKE,1,[Define to 1 to disable pty-handshake support])
748else
749	AC_DEFINE(OPT_PTY_HANDSHAKE,0,[Define to 0 to disable pty-handshake support])
750fi
751
752AC_MSG_CHECKING(if you want support for mouse in readline applications)
753CF_ARG_ENABLE(readline-mouse,
754	[  --enable-readline-mouse enable support for mouse in readline applications],
755	[enable_readline_mouse=yes],
756	[enable_readline_mouse=no])
757AC_MSG_RESULT($enable_readline_mouse)
758if test "$enable_readline_mouse" = yes ; then
759	AC_DEFINE(OPT_READLINE,1,[Define to 1 to enable support for mouse in readline applications])
760fi
761
762AC_MSG_CHECKING(if you want support for regular-expression selections)
763CF_ARG_DISABLE(regex,
764	[  --disable-regex         disable regular-expression selections],
765	[enable_regex=no],
766	[enable_regex=yes])
767AC_MSG_RESULT($enable_regex)
768if test "$enable_regex" = yes ; then
769	CF_WITH_PCRE
770	if test "$with_pcre" = no ; then
771		CF_REGEX
772		if test "X$cf_cv_regex_hdrs" != "Xregex.h" ; then
773			AC_MSG_ERROR(Only POSIX or PCRE regular expressions are supported)
774		fi
775	fi
776	AC_DEFINE(OPT_SELECT_REGEX,1,[Define to 1 to enable regular-expression selections])
777fi
778
779AC_MSG_CHECKING(if you want support for right-scrollbar)
780CF_ARG_DISABLE(rightbar,
781	[  --disable-rightbar      disable right-scrollbar support],
782	[enable_rightbar=no],
783	[enable_rightbar=yes])
784AC_MSG_RESULT($enable_rightbar)
785if test "$enable_rightbar" = yes ; then
786	AC_DEFINE(SCROLLBAR_RIGHT,1,[Define to 1 to enable right-scrollbar support])
787fi
788
789AC_MSG_CHECKING(if you want check for redundant name-change)
790CF_ARG_DISABLE(samename,
791	[  --disable-samename      disable check for redundant name-change],
792	[enable_samename=no],
793	[enable_samename=yes])
794AC_MSG_RESULT($enable_samename)
795test "$enable_samename" = no && AC_DEFINE(OPT_SAME_NAME,0,[Define to 0 to disable check for redundant name-change])
796
797AC_MSG_CHECKING(if you want support for selection-actions)
798CF_ARG_DISABLE(selection-ops,
799	[  --disable-selection-ops disable selection-action operations],
800	[enable_selection_ops=no],
801	[enable_selection_ops=yes])
802AC_MSG_RESULT($enable_selection_ops)
803test "$enable_selection_ops" = no && AC_DEFINE(OPT_SELECTION_OPS,0,[Define to 0 disable selection-action operations])
804
805AC_MSG_CHECKING(if you want support for session management)
806CF_ARG_DISABLE(session-mgt,
807	[  --disable-session-mgt   disable support for session management],
808	[enable_session_mgt=no],
809	[enable_session_mgt=yes])
810AC_MSG_RESULT($enable_session_mgt)
811test "$enable_session_mgt" = no && AC_DEFINE(OPT_SESSION_MGT,0,[Define to 0 to disable support for session management])
812
813AC_MSG_CHECKING(if you want to use termcap function-keys)
814CF_ARG_DISABLE(tcap-fkeys,
815	[  --disable-tcap-fkeys    disable termcap function-keys support],
816	[enable_tcap_fkeys=no],
817	[enable_tcap_fkeys=yes])
818AC_MSG_RESULT($enable_tcap_fkeys)
819test "$enable_tcap_fkeys" = yes && AC_DEFINE(OPT_TCAP_FKEYS,1,[Define to 1 to disable termcap function-keys support])
820
821AC_MSG_CHECKING(if you want to use termcap-query/report)
822CF_ARG_DISABLE(tcap-query,
823	[  --disable-tcap-query    disable compiled-in termcap-query support],
824	[enable_tcap_query=no],
825	[enable_tcap_query=yes])
826AC_MSG_RESULT($enable_tcap_query)
827test "$enable_tcap_query" = yes && AC_DEFINE(OPT_TCAP_QUERY,1,[Define to 1 to disable compiled-in termcap-query support])
828
829AC_MSG_CHECKING(if you want support for tek4014)
830CF_ARG_DISABLE(tek4014,
831	[  --disable-tek4014       disable tek4014 emulation],
832	[enable_tek4014=no],
833	[enable_tek4014=yes])
834AC_MSG_RESULT($enable_tek4014)
835if test "$enable_tek4014" = no ; then
836	AC_DEFINE(OPT_TEK4014,0,[Define to 0 to disable tek4014 emulation])
837else
838	EXTRAHDRS="$EXTRAHDRS Tekparse.h"
839	EXTRASRCS="$EXTRASRCS TekPrsTbl.c Tekproc.c"
840	EXTRAOBJS="$EXTRAOBJS TekPrsTbl.o Tekproc.o"
841fi
842
843AC_MSG_CHECKING(if you want pulldown menus with a toolbar)
844CF_ARG_ENABLE(toolbar,
845	[  --enable-toolbar        compile-in toolbar for pulldown menus],
846	[enable_toolbar=yes],
847	[enable_toolbar=no])
848AC_MSG_RESULT($enable_toolbar)
849if test "$enable_toolbar" = yes ; then
850	AC_DEFINE(OPT_TOOLBAR,1,[Define to 1 to compile-in toolbar for pulldown menus])
851fi
852
853AC_MSG_CHECKING(if you want VT52 emulation)
854CF_ARG_DISABLE(vt52,
855	[  --disable-vt52          disable VT52 emulation],
856	[enable_vt52=no],
857	[enable_vt52=yes])
858AC_MSG_RESULT($enable_vt52)
859test "$enable_vt52" = no && AC_DEFINE(OPT_VT52_MODE,0,[Define to 0 to disable VT52 emulation])
860
861AC_MSG_CHECKING(if you want wide-attribute support)
862CF_ARG_DISABLE(wide-attrs,
863	[  --disable-wide-attrs    disable wide-attribute support],
864	[enable_wattr=no],
865	[enable_wattr=yes])
866AC_MSG_RESULT($enable_wattr)
867
868AC_MSG_CHECKING(if you want wide-character support)
869CF_ARG_DISABLE(wide-chars,
870	[  --disable-wide-chars    disable wide-character support],
871	[enable_wchar=no],
872	[enable_wchar=yes])
873AC_MSG_RESULT($enable_wchar)
874test "$enable_wattr" = no && AC_DEFINE(OPT_WIDE_ATTRS,0,[Define to 0 to disable rarely-used SGR features])
875
876AC_MSG_CHECKING(if you want only 16-bit character support)
877CF_ARG_ENABLE(16bit-chars,
878	[  --enable-16bit-chars    enable 16-bit character support],
879	[enable_16bit_chars=yes],
880	[enable_16bit_chars=no])
881AC_MSG_RESULT($enable_16bit_chars)
882
883if test "$enable_16bit_chars" = yes ; then
884	AC_DEFINE(OPT_WIDER_ICHAR,0,[Define to 0 to enable 16-bit character support])
885	enable_wchar=yes
886fi
887
888if test "$enable_wchar" = yes ; then
889
890AC_MSG_CHECKING(if you want to use mini-luit/Latin9 built-in support)
891CF_ARG_ENABLE(mini-luit,
892	[  --enable-mini-luit      enable mini-luit (built-in Latin9 support)],
893	[enable_mini_luit=yes],
894	[enable_mini_luit=no])
895AC_MSG_RESULT($enable_mini_luit)
896if test "$enable_mini_luit" = yes ; then
897	AC_DEFINE(OPT_MINI_LUIT,1,[Define to 1 to enable mini-luit (built-in Latin9 support)])
898fi
899
900AC_MSG_CHECKING(if you want to use luit)
901CF_ARG_DISABLE(luit,
902	[  --disable-luit          enable luit filter (Unicode translation)],
903	[enable_luit=no],
904	[enable_luit=yes])
905AC_MSG_RESULT($enable_luit)
906if test "$enable_luit" = yes ; then
907	AC_DEFINE(OPT_LUIT_PROG,1,[Define to 1 to enable luit filter (Unicode translation)])
908	CF_PATH_PROG(LUIT,xterm-filter,bluit luit)
909fi
910
911	AC_DEFINE(OPT_WIDE_CHARS,1,[Define to 1 to enable wide-character support])
912	EXTRAHDRS="$EXTRAHDRS charclass.h precompose.h wcwidth.h"
913	EXTRASRCS="$EXTRASRCS charclass.c precompose.c wcwidth.c"
914	EXTRAOBJS="$EXTRAOBJS charclass.o precompose.o wcwidth.o"
915fi
916
917AC_MSG_CHECKING(if you want dynamic-abbreviation support)
918CF_ARG_ENABLE(dabbrev,
919	[  --enable-dabbrev        enable dynamic-abbreviation support],
920	[enable_dabbrev=yes],
921	[enable_dabbrev=no])
922AC_MSG_RESULT($enable_dabbrev)
923if test "$enable_dabbrev" = yes ; then
924	AC_DEFINE(OPT_DABBREV,1,[Define to 1 to enable dynamic-abbreviation support])
925fi
926
927AC_MSG_CHECKING(if you want DECterm Locator support)
928CF_ARG_ENABLE(dec-locator,
929	[  --enable-dec-locator    enable DECterm Locator support],
930	[enable_dec_locator=yes],
931	[enable_dec_locator=no])
932AC_MSG_RESULT($enable_dec_locator)
933if test "$enable_dec_locator" = yes ; then
934	AC_DEFINE(OPT_DEC_LOCATOR,1,[Define to 1 to enable DECterm Locator support])
935fi
936
937AC_MSG_CHECKING(if you want XHTML and SVG screen dump support)
938CF_ARG_ENABLE(screen-dumps,
939	[  --enable-screen-dumps   enable XHTML and SVG screen dumps],
940	[enable_screen_dumps=yes],
941	[enable_screen_dumps=no])
942AC_MSG_RESULT($enable_screen_dumps)
943if test "$enable_screen_dumps" = yes ; then
944	AC_DEFINE(OPT_SCREEN_DUMPS,1,[Define to 1 to enable XHTML and SVG screen dump support])
945	EXTRASRCS="$EXTRASRCS html.c svg.c"
946	EXTRAOBJS="$EXTRAOBJS html.o svg.o"
947fi
948
949AC_MSG_CHECKING(if you want ReGIS graphics support)
950CF_ARG_ENABLE(regis-graphics,
951	[  --enable-regis-graphics enable ReGIS graphics support],
952	[enable_regis_graphics=yes],
953	[enable_regis_graphics=no])
954AC_MSG_RESULT($enable_regis_graphics)
955if test "$enable_regis_graphics" = yes ; then
956	AC_DEFINE(OPT_REGIS_GRAPHICS,1,[Define to 1 to enable ReGIS graphics support])
957	EXTRAHDRS="$EXTRAHDRS graphics_regis.h"
958	EXTRASRCS="$EXTRASRCS graphics_regis.c"
959	EXTRAOBJS="$EXTRAOBJS graphics_regis.o"
960	CF_MATH_LIB
961fi
962
963AC_MSG_CHECKING(if you want sixel graphics support)
964CF_ARG_ENABLE(sixel-graphics,
965	[  --enable-sixel-graphics enable sixel graphics support],
966	[enable_sixel_graphics=yes],
967	[enable_sixel_graphics=no])
968AC_MSG_RESULT($enable_sixel_graphics)
969if test "$enable_sixel_graphics" = yes ; then
970	AC_DEFINE(OPT_SIXEL_GRAPHICS,1,[Define to 1 to enable sixel graphics support])
971	EXTRAHDRS="$EXTRAHDRS graphics_sixel.h"
972	EXTRASRCS="$EXTRASRCS graphics_sixel.c"
973	EXTRAOBJS="$EXTRAOBJS graphics_sixel.o"
974fi
975
976if test "$enable_regis_graphics" = yes || test "$enable_sixel_graphics" = yes ; then
977	AC_DEFINE(OPT_GRAPHICS,1,[Defined to 1 to if any graphics mode is enabled])
978	EXTRAHDRS="$EXTRAHDRS graphics.h"
979	EXTRASRCS="$EXTRASRCS graphics.c"
980	EXTRAOBJS="$EXTRAOBJS graphics.o"
981fi
982
983AC_MSG_CHECKING(if you want VT420 rectangle support)
984CF_ARG_DISABLE(rectangles,
985	[  --disable-rectangles    disable VT420 rectangle support],
986	[enable_rectangles=no],
987	[enable_rectangles=yes])
988AC_MSG_RESULT($enable_rectangles)
989if test "$enable_rectangles" = yes ; then
990	AC_DEFINE(OPT_DEC_RECTOPS,1,[Define to 1 to disable VT420 rectangle support])
991fi
992
993AC_MSG_CHECKING(if you want -ziconbeep option)
994CF_ARG_DISABLE(ziconbeep,
995	[  --disable-ziconbeep     disable -ziconbeep option],
996	[enable_ziconbeep=no],
997	[enable_ziconbeep=yes])
998AC_MSG_RESULT($enable_ziconbeep)
999test "$enable_ziconbeep" = no && AC_DEFINE(OPT_ZICONBEEP,0,[Define to 0 to disable -ziconbeep option])
1000
1001###############################################################################
1002CF_HELP_MESSAGE(Testing/development Options:)
1003
1004AC_MSG_CHECKING(if you want debugging traces)
1005CF_ARG_ENABLE(trace,
1006	[  --enable-trace          test: set to enable debugging traces],
1007	[enable_trace=yes],
1008	[enable_trace=no])
1009AC_MSG_RESULT($enable_trace)
1010if test "$enable_trace" = yes ; then
1011	AC_DEFINE(OPT_TRACE,1,[Define to 1 to enable debugging traces])
1012	EXTRASRCS="$EXTRASRCS trace.c"
1013	EXTRAOBJS="$EXTRAOBJS trace.o"
1014fi
1015
1016CF_DISABLE_LEAKS
1017CF_DISABLE_ECHO
1018
1019AC_MSG_CHECKING(if you want magic cookie emulation)
1020CF_ARG_ENABLE(xmc-glitch,
1021	[  --enable-xmc-glitch     test: enable xmc magic-cookie emulation],
1022	[enable_xmc=yes],
1023	[enable_xmc=no])
1024AC_MSG_RESULT($enable_xmc)
1025if test "$enable_xmc" = yes ; then
1026	AC_DEFINE(OPT_XMC_GLITCH,1,[Define to 1 to enable xmc magic-cookie emulation])
1027	EXTRASRCS="$EXTRASRCS testxmc.c"
1028	EXTRAOBJS="$EXTRAOBJS testxmc.o"
1029fi
1030
1031dnl FIXME - extra test needed to make tcap-fkeys work on HPUX
1032AC_CHECK_FUNCS(tigetstr)
1033
1034dnl only check for ncurses' use_extended_names if really not using termcap
1035if test -n "$cf_cv_lib_part_tgetent"; then
1036    AC_CHECK_FUNCS(use_extended_names)
1037fi
1038
1039if test -n "$GCC" ; then
1040AC_MSG_CHECKING(if you want to turn on gcc warnings)
1041CF_ARG_ENABLE(warnings,
1042	[  --enable-warnings       test: turn on GCC compiler warnings],
1043	[with_warnings=yes],
1044	[with_warnings=no])
1045AC_MSG_RESULT($with_warnings)
1046if test "$with_warnings" = yes
1047then
1048	CF_GCC_ATTRIBUTES
1049	CF_GCC_WARNINGS(Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum)
1050fi
1051fi
1052
1053AC_SUBST(EXTRA_CFLAGS)
1054AC_SUBST(CHARPROC_DEPS)
1055AC_SUBST(EXTRAHDRS)
1056AC_SUBST(EXTRASRCS)
1057AC_SUBST(EXTRAOBJS)
1058
1059test "$disable_setuid" = yes && AC_DEFINE(DISABLE_SETUID,1,[Define to 1 if you want to disable setuid])
1060test "$disable_setgid" = yes && AC_DEFINE(DISABLE_SETGID,1,[Define to 1 if you want to disable setgid])
1061
1062if test $disable_setuid = yes ; then
1063	MAY_SETUID="#"
1064	NOT_SETUID=
1065elif test $disable_setgid = yes ; then
1066	MAY_SETUID="#"
1067	NOT_SETUID=
1068else
1069	MAY_SETUID=
1070	NOT_SETUID="#"
1071fi
1072
1073AC_SUBST(MAY_SETUID)
1074AC_SUBST(NOT_SETUID)
1075
1076###	remove from CPPFLAGS the optional features we define in xtermcfg.h
1077###	or other conflicting symbols that may be defined via imake:
1078for cf_def in \
1079	__STDC__ \
1080	ALLOWLOGGING \
1081	ALLOWLOGFILEEXEC \
1082	OPT_LUIT_PROG \
1083	OPT_WIDE_CHARS \
1084	SCROLLBAR_RIGHT \
1085	USE_TTY_GROUP \
1086	USE_UTEMPTER \
1087	XRENDERFONT
1088do
1089	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-D$cf_def//`
1090done
1091
1092CF_MAKE_TAGS
1093CF_DISABLE_RPATH_HACK
1094
1095# Force plink.sh to not trim pcre's libraries, which have the same symbol
1096# names as the system regexp.
1097if test "$with_pcre" != no
1098then
1099	LIBS=`echo "$LIBS" | sed -e 's/-lpcre/-kpcre/g'`
1100fi
1101
1102###	output xtermcfg.h, etc
1103AC_CONFIG_FILES([Makefile df-install minstall:minstall.in])
1104AC_OUTPUT
1105