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