"Fossies" - the Fresh Open Source Software Archive

Member "xterm-379/configure.in" (12 Feb 2023, 40449 Bytes) of package /linux/misc/xterm-379.tgz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "configure.in": 377_vs_379.

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