1dnl# 2dnl# All portions of code are copyright by their respective author/s. 3dnl# Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com> 4dnl# Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com> 5dnl# Copyright (c) 2004 Hiramatsu Yoshifumi 6dnl# Copyright (c) 2004-2005 Jingmin Zhou <jimmyzhou@users.sourceforge.net> 7dnl# 8dnl# This program is free software; you can redistribute it and/or 9dnl# modify it under the terms of the GNU General Public License as 10dnl# published by the Free Software Foundation; either version 2 of 11dnl# the License, or (at your option) any later version. 12dnl# 13dnl# This program is distributed in the hope that it will be useful, 14dnl# but WITHOUT ANY WARRANTY; without even the implied warranty of 15dnl# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16dnl# GNU General Public License for more details. 17dnl# 18dnl# You should have received a copy of the GNU General Public License 19dnl# along with this program; if not, write to the Free Software 20dnl# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21dnl# 22dnl# 23dnl# $Id: configure.ac,v 1.96 2005/10/07 23:25:26 cvs Exp $ 24dnl# 25dnl# 26 27AC_INIT(mrxvt, 0.4.2, [jimmyzhou@users.sourceforge.net]) 28AM_INIT_AUTOMAKE(mrxvt, 0.4.2) 29 30AM_CONFIG_HEADER(config.h) 31AC_CONFIG_SRCDIR([src/main.c]) 32 33 34AM_MAINTAINER_MODE 35 36 37dnl Check OS 38AC_CANONICAL_HOST 39local_os_type="unknown" 40case "$host" in 41*-cygwin*) 42 AC_DEFINE(OS_CYGWIN, [], [set OS to cygwin]) 43 local_os_type="cygwin" 44 ;; 45*-linux*) 46 AC_DEFINE(OS_LINUX, [], [set OS to linux]) 47 dnl hack for some 64-bit systems 48 AC_DEFINE(_GNU_SOURCE, [], [set GNU source flag for linux]) 49 local_os_type="linux" 50 ;; 51*-irix*) 52 AC_DEFINE(OS_IRIX, [], [set OS to irix]) 53 local_os_type="irix" 54 ;; 55*-sunos*) 56 AC_DEFINE(OS_SUNOS, [], [set OS to sunos]) 57 local_os_type="sunos" 58 ;; 59*-solaris*) 60 AC_DEFINE(OS_SOLARIS, [], [set OS to solaris]) 61 local_os_type="solaris" 62 ;; 63*-aix*) 64 AC_DEFINE(OS_AIX, [], [set OS to aix]) 65 local_os_type="aix" 66 ;; 67*-hpux*) 68 AC_DEFINE(OS_HPUX, [], [set OS to hp-ux]) 69 local_os_type="hpux" 70 ;; 71*-freebsd*) 72 AC_DEFINE(OS_BSD, [], [set OS to bsd]) 73 AC_DEFINE(OS_FREEBSD, [], [set OS to freebsd]) 74 local_os_type="freebsd" 75 76 dnl our hack for freebsd system 77 CFLAGS="$CFLAGS -I/usr/local/include" 78 LIBS="$LIBS -L/usr/local/lib" 79 ;; 80*-netbsd*) 81 AC_DEFINE(OS_BSD, [], [set OS to bsd]) 82 AC_DEFINE(OS_NETBSD, [], [set OS to netbsd]) 83 local_os_type="netbsd" 84 85 dnl our hack for netbsd system 86 CFLAGS="$CFLAGS -I/usr/local/include" 87 LIBS="$LIBS -L/usr/local/lib" 88 ;; 89*-openbsd*) 90 AC_DEFINE(OS_BSD, [], [set OS to bsd]) 91 AC_DEFINE(OS_OPENBSD, [], [set OS to openbsd]) 92 local_os_type="openbsd" 93 94 dnl our hack for openbsd system 95 CFLAGS="$CFLAGS -I/usr/local/include" 96 LIBS="$LIBS -L/usr/local/lib" 97 ;; 98*-osf*) 99 AC_DEFINE(OS_OSF, [], [set OS to osf]) 100 local_os_type="osf" 101 ;; 102*-darwin*) 103 AC_DEFINE(OS_BSD, [], [set OS to bsd]) 104 AC_DEFINE(OS_DARWIN, [], [set OS to darwin]) 105 local_os_type="darwin" 106 ;; 107*-sco*) 108 AC_DEFINE(OS_SCO, [], [set OS to sco]) 109 AC_DEFINE(OS_SVR4, [], [set OS to svr4]) 110 local_os_type="sco" 111 AC_MSG_ERROR([Mrxvt does not support f*cking SCO's products!]) 112esac 113 114 115dnl Configuration options 116support_everything=no 117support_minimal=no 118support_debug=no 119support_ourstrings=no 120support_frills=no 121support_keepscrolling=yes 122support_selectionscrolling=yes 123support_mousewheel=yes 124support_mouseslipwheel=no 125support_scroll_rxvt=yes 126support_scroll_next=yes 127support_scroll_xterm=yes 128support_scroll_plain=yes 129support_scroll_sgi=yes 130support_half_shadow=yes 131support_utmp=yes 132support_wtmp=yes 133support_lastlog=yes 134support_sessionmgr=yes 135support_utempter=no 136support_linespace=yes 137support_24bits=no 138support_256colors=yes 139support_cursor_blink=yes 140support_pointer_blank=yes 141support_text_shadow=no 142support_smart_resize=no 143support_menubar=no 144support_background_image=yes 145support_transparency=yes 146support_fading=yes 147support_tinting=yes 148support_xpm=yes 149support_jpeg=yes 150support_png=yes 151support_xft=no 152support_xim=no 153support_greek=no 154support_cjk=no 155support_thai=no 156support_ttygid=yes 157support_backspace_key=yes 158support_delete_key=yes 159support_resources=yes 160support_xgetdefault=no 161support_swapscreen=yes 162support_old_selection=no 163 164 165 166AC_ARG_ENABLE( 167 everything, 168 AC_HELP_STRING([--enable-everything],[enable all options [[no]]]), 169 [support_everything=$enableval], 170 [support_everything=no] 171) 172if test "x$support_everything" = "xyes"; then 173 support_debug=yes 174 support_ourstrings=yes 175 support_frills=yes 176 support_keepscrolling=yes 177 support_selectionscrolling=yes 178 support_mousewheel=yes 179 support_mouseslipwheel=yes 180 support_scroll_rxvt=yes 181 support_scroll_next=yes 182 support_scroll_sgi=yes 183 support_scroll_xterm=yes 184 support_scroll_plain=yes 185 support_half_shadow=yes 186 support_utmp=yes 187 support_wtmp=yes 188 support_lastlog=yes 189 support_sessionmgr=yes 190 support_utempter=yes 191 support_linespace=yes 192 support_24bits=yes 193 support_256colors=yes 194 support_cursor_blink=yes 195 support_pointer_blank=yes 196 support_text_shadow=yes 197 support_smart_resize=yes 198 support_menubar=yes 199 support_background_image=yes 200 support_transparency=yes 201 support_fading=yes 202 support_tinting=yes 203 support_xpm=yes 204 support_jpeg=yes 205 support_png=yes 206 support_xft=yes 207 support_xim=yes 208 support_greek=yes 209 support_cjk=yes 210 support_thai=yes 211 support_ttygid=yes 212 support_backspace_key=yes 213 support_delete_key=yes 214 support_resources=yes 215 support_xgetdefault=no 216 support_swapscreen=yes 217 support_old_selection=no 218fi 219 220AC_ARG_ENABLE( 221 minimal, 222 AC_HELP_STRING([--enable-minimal],[enable minimal options [[no]]]), 223 [support_minimal=$enableval], 224 [support_minimal=no] 225) 226if test "x$support_minimal" = "xyes"; then 227 support_debug=no 228 support_ourstrings=no 229 support_frills=no 230 support_keepscrolling=no 231 support_selectionscrolling=no 232 support_mousewheel=no 233 support_mouseslipwheel=no 234 support_scroll_rxvt=no 235 support_scroll_next=no 236 support_scroll_sgi=no 237 support_scroll_xterm=yes 238 support_scroll_plain=no 239 support_half_shadow=no 240 support_utmp=no 241 support_wtmp=no 242 support_lastlog=no 243 support_sessionmgr=no 244 support_utempter=no 245 support_linespace=no 246 support_24bits=no 247 support_256colors=no 248 support_cursor_blink=no 249 support_pointer_blank=no 250 support_text_shadow=no 251 support_smart_resize=no 252 support_menubar=no 253 support_background_image=no 254 support_transparency=no 255 support_fading=no 256 support_tinting=no 257 support_xpm=no 258 support_jpeg=no 259 support_png=no 260 support_xft=no 261 support_xim=no 262 support_greek=no 263 support_cjk=no 264 support_thai=no 265 support_ttygid=yes 266 support_backspace_key=yes 267 support_delete_key=yes 268 support_resources=yes 269 support_xgetdefault=no 270 support_swapscreen=yes 271 support_old_selection=no 272fi 273 274 275AC_ARG_ENABLE( 276 debug, 277 AC_HELP_STRING([--enable-debug],[enable debug mode - for developper [[no]]]), 278 [support_debug=$enableval] 279) 280if test "x$support_debug" = "xyes"; then 281 AC_DEFINE(DEBUG, [], [set DEBUG mode]) 282 CFLAGS="$CFLAGS -g" 283else 284 AC_DEFINE(NDEBUG, [], [unset DEBUG mode]) 285fi 286 287 288AC_ARG_ENABLE( 289 ourstrings, 290 AC_HELP_STRING([--enable-ourstrings],[enable our strings functions [[no]]]), 291 [support_ourstrings=$enableval] 292) 293if test "x$support_ourstrings" = "xyes"; then 294 AC_DEFINE(OUR_STRINGS, [], [use our own string functions]) 295fi 296 297 298AC_ARG_ENABLE( 299 frills, 300 AC_HELP_STRING([--enable-frills],[enable rarely used features [[no]]]), 301 [support_frills=$enableval] 302) 303if test "x$support_frills" != "xyes"; then 304 AC_DEFINE(NO_FRILLS, [], [enable rarely used features]) 305fi 306 307 308AC_ARG_ENABLE( 309 keepscrolling, 310 AC_HELP_STRING([--enable-keepscrolling],[enable continual scrolling on scrollbar arrow press [[yes]]]), 311 [support_keepscrolling=$enableval] 312) 313if test "x$support_keepscrolling" != "xyes"; then 314 AC_DEFINE(NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING, [], [enable continual scrolling on scrollbar arrow press]) 315fi 316 317 318AC_ARG_ENABLE( 319 selectionscrolling, 320 AC_HELP_STRING([--enable-selectionscrolling],[enable continual scrolling on selection [[yes]]]), 321 [support_selectionscrolling=$enableval] 322) 323if test "x$support_selectionscrolling" = "xyes"; then 324 AC_DEFINE(SELECTION_SCROLLING, [], [enable continual scrolling on selection]) 325fi 326 327 328AC_ARG_ENABLE( 329 mousewheel, 330 AC_HELP_STRING([--enable-mousewheel],[enable scrolling via mouse wheel or buttons 4 & 5 [[yes]]]), 331 [support_mousewheel=$enableval] 332) 333if test "x$support_mousewheel" = "xyes"; then 334 AC_DEFINE(MOUSE_WHEEL, [], [enable scrolling via mouse wheel]) 335fi 336 337 338AC_ARG_ENABLE( 339 mouseslipwheel, 340 AC_HELP_STRING([--enable-mouseslipwheel],[enable slip scrolling via mouse wheel or buttons 4 & 5 [[no]]]), 341 [support_mouseslipwheel=$enableval] 342) 343if test "x$support_mousewheel x$support_mouseslipwheel" = "xyes xyes"; then 344 AC_DEFINE(MOUSE_SLIP_WHEELING, [], [enable slip scrolling via mouse wheel]) 345fi 346 347 348AC_ARG_ENABLE( 349 rxvt-scroll, 350 AC_HELP_STRING([--enable-rxvt-scroll],[enable rxvt style scrollbar [[yes]]]), 351 [support_scroll_rxvt=$enableval] 352) 353if test "x$support_scroll_rxvt" = "xyes"; then 354 AC_DEFINE(RXVT_SCROLLBAR, [], [set rxvt style scroll bar]) 355 AC_DEFINE(HAVE_SCROLLBARS, [], [set scroll bar support]) 356 support_scroll="yes" 357fi 358 359 360AC_ARG_ENABLE( 361 next-scroll, 362 AC_HELP_STRING([--enable-next-scroll],[enable NeXT style scrollbar [[yes]]]), 363 [support_scroll_next=$enableval] 364) 365if test "x$support_scroll_next" = "xyes"; then 366 AC_DEFINE(NEXT_SCROLLBAR, [], [set next style scroll bar]) 367 AC_DEFINE(HAVE_SCROLLBARS, [], [set scroll bar support]) 368 support_scroll="yes" 369fi 370 371 372AC_ARG_ENABLE( 373 xterm-scroll, 374 AC_HELP_STRING([--enable-xterm-scroll],[enable Xterm style scrollbar [[yes]]]), 375 [support_scroll_xterm=$enableval] 376) 377if test "x$support_scroll_xterm" = "xyes"; then 378 AC_DEFINE(XTERM_SCROLLBAR, [], [set xterm style scroll bar]) 379 AC_DEFINE(HAVE_SCROLLBARS, [], [set scroll bar support]) 380 support_scroll="yes" 381fi 382 383 384AC_ARG_ENABLE( 385 plain-scroll, 386 AC_HELP_STRING([--enable-plain-scroll],[enable plain style scrollbar [[yes]]]), 387 [support_scroll_plain=$enableval] 388) 389if test "x$support_scroll_plain" = "xyes"; then 390 AC_DEFINE(PLAIN_SCROLLBAR, [], [set plain style scroll bar]) 391 AC_DEFINE(HAVE_SCROLLBARS, [], [set scroll bar support]) 392 support_scroll="yes" 393fi 394 395 396AC_ARG_ENABLE( 397 sgi-scroll, 398 AC_HELP_STRING([--enable-sgi-scroll],[enable SGI IRIX style scrollbar [[yes]]]), 399 [support_scroll_sgi=$enableval] 400) 401if test "x$support_scroll_sgi" = "xyes"; then 402 AC_DEFINE(SGI_SCROLLBAR, [], [set sgi style scroll bar]) 403 AC_DEFINE(HAVE_SCROLLBARS, [], [set scroll bar support]) 404 support_scroll="yes" 405fi 406 407 408AM_CONDITIONAL(RXVT_SCROLLBAR, test "x$support_scroll_rxvt" = "xyes") 409AM_CONDITIONAL(NEXT_SCROLLBAR, test "x$support_scroll_next" = "xyes") 410AM_CONDITIONAL(XTERM_SCROLLBAR, test "x$support_scroll_xterm" = "xyes") 411AM_CONDITIONAL(PLAIN_SCROLLBAR, test "x$support_scroll_plain" = "xyes") 412AM_CONDITIONAL(SGI_SCROLLBAR, test "x$support_scroll_sgi" = "xyes") 413 414 415 416AC_ARG_ENABLE( 417 half-shadow, 418 AC_HELP_STRING([--enable-half-shadow],[enable half width/height shadow on rxvt scrollbar [[yes]]]), 419 [support_half_shadow=$enableval] 420) 421if test "x$support_scroll_rxvt x$support_half_shadow" = "xyes xyes"; then 422 AC_DEFINE(HALFSHADOW, [], [set half shadow rxvt scrollbar support]) 423fi 424 425 426AC_ARG_ENABLE( 427 utmp, 428 AC_HELP_STRING([--enable-utmp],[enable utmp/utmpx support [[yes]]]), 429 [support_utmp=$enableval] 430) 431if test "x$support_utmp" = "xyes"; then 432 AC_DEFINE(UTMP_SUPPORT, [], [set utmp support]) 433fi 434 435 436AC_ARG_ENABLE( 437 wtmp, 438 AC_HELP_STRING([--enable-wtmp],[enable wtmp support (need utmp support) [[yes]]]), 439 [support_wtmp=$enableval] 440) 441dnl depends on utmp support 442if test "x$support_utmp x$support_wtmp" = "xyes xyes"; then 443 AC_DEFINE(WTMP_SUPPORT, [], [set wtmp support]) 444fi 445 446 447AC_ARG_ENABLE( 448 lastlog, 449 AC_HELP_STRING([--enable-lastlog],[enable lastlog support [[yes]]]), 450 [support_lastlog=$enableval] 451) 452dnl depends on utmp support 453if test "x$support_utmp x$support_lastlog" = "xyes xyes"; then 454 AC_DEFINE(LASTLOG_SUPPORT, [], [set lastlog support]) 455fi 456AM_CONDITIONAL(UTMP_SUPPORT, test "x$support_utmp" = "xyes") 457 458 459AC_ARG_ENABLE( 460 sessionmgr, 461 AC_HELP_STRING([--enable-sessionmgr],[enable X session manager [[yes]]]), 462 [support_sessionmgr=$enableval], 463) 464 465 466AC_ARG_ENABLE( 467 utempter, 468 AC_HELP_STRING([--enable-utempter],[enable utempter library for utmp/wtmp/lastlog [[no]]]), 469 [support_utempter=$enableval], 470) 471 472 473AC_ARG_ENABLE( 474 linespace, 475 AC_HELP_STRING([--enable-linespace],[enable linespace support [[yes]]]), 476 [support_linespace=$enableval] 477) 478if test "x$support_linespace" != "xyes"; then 479 AC_DEFINE(NO_LINESPACE, [], [unset linespace support]) 480fi 481 482 483AC_ARG_ENABLE( 484 24bits, 485 AC_HELP_STRING([--enable-24bits],[prefer 24 bits color [[no]]]), 486 [support_24bits=$enableval] 487) 488if test "x$support_24bits" = "xyes"; then 489 AC_DEFINE(PREFER_24BIT, [], [set 24 bits color support]) 490fi 491 492 493AC_ARG_ENABLE( 494 256colors, 495 AC_HELP_STRING([--enable-256colors],[use 256 color [[yes]]]), 496 [support_256colors=$enableval] 497) 498if test "x$support_256colors" = "xyes"; then 499 AC_DEFINE(TTY_256COLOR, [], [set 256 color support]) 500fi 501 502 503AC_ARG_ENABLE( 504 cursor-blink, 505 AC_HELP_STRING([--enable-cursor-blink],[enable cursor blinking [[yes]]]), 506 [support_cursor_blink=$enableval] 507) 508if test "x$support_cursor_blink" = "xyes"; then 509 AC_DEFINE(CURSOR_BLINK, [], [set cursor blinking support]) 510fi 511 512 513AC_ARG_ENABLE( 514 pointer-blank, 515 AC_HELP_STRING([--enable-pointer-blank],[enable blank pointer [[yes]]]), 516 [support_pointer_blank=$enableval] 517) 518if test "x$support_pointer_blank" = "xyes"; then 519 AC_DEFINE(POINTER_BLANK, [], [set blank pointer support]) 520fi 521 522 523AC_ARG_ENABLE( 524 text-shadow, 525 AC_HELP_STRING([--enable-text-shadow],[enable colors shadow for text [[no]]]), 526 [support_text_shadow=$enableval] 527) 528if test "x$support_text_shadow" = "xyes"; then 529 AC_DEFINE(TEXT_SHADOW, [], [set text shadow support]) 530fi 531 532 533AC_ARG_ENABLE( 534 smart-resize, 535 AC_HELP_STRING([--enable-smart-resize],[enable smart resizing [[no]]]), 536 [support_smart_resize=$enableval] 537) 538if test "x$support_smart_resize" = "xyes"; then 539 AC_DEFINE(SMART_RESIZE, [], [set smart resizing support]) 540fi 541 542 543AC_ARG_ENABLE( 544 menubar, 545 AC_HELP_STRING([--enable-menubar],[enable menu bar [[no]]]), 546 [support_menubar=$enableval] 547) 548if test "x$support_menubar" = "xyes"; then 549 AC_DEFINE(HAVE_MENUBAR, [], [set menu bar]) 550fi 551 552 553AC_ARG_ENABLE( 554 transparency, 555 AC_HELP_STRING([--enable-transparency],[enable transparent background [[yes]]]), 556 [support_transparency=$enableval] 557) 558if test "x$support_transparency" = "xyes"; then 559 AC_DEFINE(TRANSPARENT, [], [set transparent background]) 560fi 561 562 563AC_ARG_ENABLE( 564 fading, 565 AC_HELP_STRING([--enable-fading],[enable colors fading when off focus [[yes]]]), 566 [support_fading=$enableval] 567) 568if test "x$support_fading" = "xyes"; then 569 AC_DEFINE(OFF_FOCUS_FADING, [], [set fading support]) 570fi 571 572 573AC_ARG_ENABLE( 574 tinting, 575 AC_HELP_STRING([--enable-tinting],[enable colors tinting [[yes]]]), 576 [support_tinting=$enableval] 577) 578if test "x$support_tinting" = "xyes"; then 579 AC_DEFINE(TINTING_SUPPORT, [], [set tinting support]) 580fi 581 582 583AC_ARG_ENABLE( 584 xpm, 585 AC_HELP_STRING([--enable-xpm],[enable XPM background pixmaps [[yes]]]), 586 [support_xpm=$enableval], 587) 588 589 590AC_ARG_ENABLE( 591 jpeg, 592 AC_HELP_STRING([--enable-jpeg],[enable JPEG background pixmaps [[yes]]]), 593 [support_jpeg=$enableval], 594) 595 596 597AC_ARG_ENABLE( 598 png, 599 AC_HELP_STRING([--enable-png],[enable PNG background pixmaps [[yes]]]), 600 [support_png=$enableval], 601) 602 603 604AC_ARG_ENABLE( 605 xft, 606 AC_HELP_STRING([--enable-xft],[enable freetype font support [[no]]]), 607 [support_xft=$enableval] 608) 609 610 611AC_ARG_ENABLE( 612 xim, 613 AC_HELP_STRING([--enable-xim],[enable XIM support [[no]]]), 614 [support_xim=$enableval] 615) 616 617 618AC_ARG_ENABLE( 619 greek, 620 AC_HELP_STRING([--enable-greek],[enable Greek keyboard support [[no]]]), 621 [support_greek=$enableval] 622) 623if test "x$support_greek" = "xyes"; then 624 AC_DEFINE(GREEK_SUPPORT, [], [set Greek keyboard support]) 625fi 626AM_CONDITIONAL(GREEK, test "x$support_greek" = "xyes") 627 628 629AC_ARG_ENABLE( 630 cjk, 631 AC_HELP_STRING([--enable-cjk],[enable CJK multichar language support [[no]]]), 632 [support_cjk=$enableval] 633) 634 635 636AC_ARG_ENABLE( 637 thai, 638 AC_HELP_STRING([--enable-thai],[enable thai support [[no]]]), 639 [support_thai=$enableval] 640) 641if test "x$support_thai" = "xyes"; then 642 AC_DEFINE(THAI, [], [set thai support]) 643fi 644AM_CONDITIONAL(THAI, test "x$support_thai" = "xyes") 645 646 647AC_ARG_ENABLE( 648 ttygid, 649 AC_HELP_STRING([--enable-ttygid],[enable ttygid to group tty [[yes]]]), 650 [support_ttygid=$enableval] 651) 652if test "x$support_ttygid" = "xyes"; then 653 AC_DEFINE(TTY_GID_SUPPORT, [], [set ttygid support]) 654fi 655 656 657AC_ARG_ENABLE( 658 backspace-key, 659 AC_HELP_STRING([--enable-backspace-key],[enable handling of the backspace key [[yes]]]), 660 [support_backspace_key=$enableval] 661) 662if test "x$support_backspace_key" != "xyes"; then 663 AC_DEFINE(NO_BACKSPACE_KEY, [], [disable handling of backspace key]) 664fi 665 666 667AC_ARG_ENABLE( 668 delete-key, 669 AC_HELP_STRING([--enable-delete-key],[enable handling of the delete key [[yes]]]), 670 [support_delete_key=$enableval] 671) 672if test "x$support_delete_key" != "xyes"; then 673 AC_DEFINE(NO_DELETE_KEY, [], [disable handling of the delete key]) 674fi 675 676 677AC_ARG_ENABLE( 678 resources, 679 AC_HELP_STRING([--enable-resources],[enable all resource checking [[yes]]]), 680 [support_resources=$enableval] 681) 682if test "x$support_resources" != "xyes"; then 683 AC_DEFINE(NO_RESOURCES, [], [disable all resource checking]) 684fi 685 686 687AC_ARG_ENABLE( 688 xgetdefault, 689 AC_HELP_STRING([--enable-xgetdefault],[enable resources via X instead of our small version [[no]]]), 690 [support_xgetdefault=$enableval] 691) 692if test "x$support_xgetdefault x$support_resources" = "xyes xyes"; then 693 AC_DEFINE(USE_XGETDEFAULT, [], [enable resources via X instead of our small version]) 694fi 695 696 697AC_ARG_ENABLE( 698 swapscreen, 699 AC_HELP_STRING([--enable-swapscreen],[enable swap screen support [[yes]]]), 700 [support_swapscreen=$enableval] 701) 702if test "x$support_swapscreen" != "xyes"; then 703 AC_DEFINE(NO_SECONDARY_SCREEN, [], [disable swap screen support]) 704fi 705 706 707AC_ARG_ENABLE( 708 old-selection, 709 AC_HELP_STRING([--enable-old-selection],[enable old mouse selection code [[no]]]), 710 [support_old_selection=$enableval] 711) 712if test "x$support_old_selection" = "xyes"; then 713 AC_DEFINE(NO_NEW_SELECTION, [], [enable old mouse selection]) 714else 715 AC_DEFINE(NO_OLD_SELECTION, [], [disable old mouse selection]) 716fi 717 718 719AC_ARG_WITH( 720 term, 721 AC_HELP_STRING([--with-term=NAME],[set the terminal to NAME [[xterm]]]), 722 [term_name_option=$withval], 723 [term_name_option=xterm] 724) 725AC_DEFINE_UNQUOTED(TERMENV, "$term_name_option", [term name]) 726 727 728AC_ARG_WITH( 729 line-space, 730 AC_HELP_STRING([--with-line-space=NUM],[set the space between lines [[0]]]), 731 [line_space_option=$withval], 732 [line_space_option=0] 733) 734AC_DEFINE_UNQUOTED(LINESPACE, $line_space_option, [the space between lines]) 735 736 737AC_ARG_WITH( 738 int-border, 739 AC_HELP_STRING([--with-int-border=NUM],[set the width of internal border, frills option must be enabled [[0]]]), 740 [int_border_option=$withval], 741 [int_border_option=0] 742) 743AC_DEFINE_UNQUOTED(INTERNALBORDERWIDTH, $int_border_option, [the width of internal border]) 744 745 746AC_ARG_WITH( 747 ext-border, 748 AC_HELP_STRING([--with-ext-border=NUM],[set the width of external border, frills option must be enabled [[0]]]), 749 [ext_border_option=$withval], 750 [ext_border_option=0] 751) 752AC_DEFINE_UNQUOTED(EXTERNALBORDERWIDTH, $ext_border_option, [the width of external border]) 753 754 755AC_ARG_WITH( 756 save-lines, 757 AC_HELP_STRING([--with-save-lines=NUM],[set the lines to save in scroll [[100]]]), 758 [save_lines_option=$withval], 759 [save_lines_option=100] 760) 761AC_DEFINE_UNQUOTED(SAVELINES, $save_lines_option, [the lines to save in scroll]) 762 763 764AC_ARG_WITH( 765 max-term, 766 AC_HELP_STRING([--with-max-term=NUM],[set the max number of terminal [[15]]]), 767 [max_term_option=$withval], 768 [max_term_option=15] 769) 770AC_DEFINE_UNQUOTED(MAX_PAGES, $max_term_option, [the max number of vt that can be open]) 771 772 773AC_ARG_WITH( 774 terminfo, 775 AC_HELP_STRING([--with-terminfo=PATH],[set the path to the terminfo tree to PATH]), 776 [terminfo_option=$withval], 777 [terminfo_option="/usr/share/terminfo"] 778) 779if test "x$withval" != "x"; then 780 AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$terminfo_option", [terminfo path]) 781fi 782 783 784AC_ARG_WITH( 785 encoding, 786 AC_HELP_STRING([--with-encoding=NAME],[set language default encoding (eucj|sjis|big5|gb|gbk|kr|noenc) to NAME (default is noenc)]), 787 [encoding_option=$withval], 788 [encoding_option="noenc"] 789) 790 791 792 793dnl Checks for programs. 794AC_PROG_CC(gcc cc egcs) 795dnl AX_CFLAGS_WARN_ALL 796if test "x$GCC" = "xyes"; then 797 CFLAGS="$CFLAGS -Wall -fPIC" 798fi 799AC_PROG_MAKE_SET 800AC_PROG_INSTALL 801#AM_PROG_LIBTOOL 802 803 804 805dnl Checks for libraries. 806 807dnl FreeBSD needs to link libutil for openpty and libxpg4 for 808dnl setlocale. Why this looks only necessary after FreeBSD 809dnl 5.2.1?!!! 810if test "x$local_os_type" = "xfreebsd" -o \ 811 "x$local_os_type" = "xopenbsd" -o \ 812 "x$local_os_type" = "xnetbsd"; then 813 AC_CHECK_LIB(xpg4, setlocale) 814 AC_CHECK_LIB(util, openpty) 815fi 816 817 818AC_PATH_X 819if test "x$no_x" = "xyes"; then 820 AC_MSG_ERROR([Mrxvt requires the X Window System libraries and headers.]) 821fi 822 823dnl Warn if the detected path differs from the supplied 824if test "x$x_includes" != "x" -a \ 825 "x$ac_x_includes" != "x" -a \ 826 "$x_includes" != "$ac_x_includes"; then 827 AC_MSG_WARN([X includes path detected differs from the supplied!]) 828fi 829if test "x$x_libraries" != "x" -a \ 830 "x$ac_x_libraries" != "x" -a \ 831 "$x_libraries" != "$ac_x_libraries"; then 832 AC_MSG_WARN([X libraries path detected differs from the supplied!]) 833fi 834 835dnl In case x_includes and x_libraries are not empty 836test "x$x_includes" = "x" && x_includes="$ac_x_includes" 837test "x$x_libraries" = "x" && x_libraries="$ac_x_libraries" 838 839test "x$x_includes" != "x" && CFLAGS="$CFLAGS -I$x_includes" 840dnl To pass linking, we must define both LDFLAGS and LIBS 841test "x$x_libraries" != "x" && LDFLAGS="$LDFLAGS -L$x_libraries" 842test "x$x_libraries" != "x" && LIBS="$LIBS -L$x_libraries" 843 844 845AC_CHECK_LIB( 846 X11, 847 XOpenDisplay, 848 [], 849 AC_MSG_ERROR([Mrxvt requires the libX11 libraries.]) 850) 851 852dnl AC_CHECK_LIB( 853dnl Xext, 854dnl XextAddDisplay, 855dnl [], 856dnl AC_MSG_ERROR([Mrxvt requires the libXext libraries.]) 857dnl ) 858 859 860if test "x$support_xim" = "xyes"; then 861 AC_CHECK_LIB( 862 X11, 863 XRegisterIMInstantiateCallback, 864 AC_DEFINE(USE_XIM, [], [set XIM support]), 865 [support_xim=no] 866 ) 867fi 868 869 870if test "x$support_sessionmgr" = "xyes"; then 871 AC_CHECK_LIB( 872 SM, 873 SmcOpenConnection, 874 [], 875 [support_sessionmgr=no] 876 ) 877 AC_CHECK_LIB( 878 ICE, 879 IceConnectionNumber, 880 [], 881 [support_sessionmgr=no] 882 ) 883fi 884AM_CONDITIONAL(SESSION_SUPPORT, test "x$support_sessionmgr" = "xyes") 885 886 887if test "x$support_utempter" = "xyes"; then 888 AC_CHECK_LIB( 889 utempter, 890 utempter_add_record, 891 [], 892 [support_utempter=no] 893 ) 894fi 895if test "x$support_utempter" = "xyes"; then 896 AC_DEFINE(UTEMPTER_SUPPORT, [], [set utempter library support]) 897fi 898 899 900if test "x$support_xpm" = "xyes"; then 901 AC_CHECK_LIB( 902 Xpm, 903 XpmCreateImageFromXpmImage, 904 [], 905 [support_xpm=no] 906 ) 907fi 908 909 910if test "x$support_jpeg" = "xyes"; then 911 AC_CHECK_LIB( 912 jpeg, 913 jpeg_read_header, 914 [], 915 [support_jpeg=no] 916 ) 917fi 918if test "x$support_jpeg" = "xyes"; then 919 AC_DEFINE(USE_JPEG, [], [set JPEG background]) 920fi 921AM_CONDITIONAL(USE_JPEG, test "x$support_jpeg" = "xyes") 922 923 924if test "x$support_png" = "xyes"; then 925 AC_CHECK_LIB( 926 png, 927 png_check_sig, 928 [], 929 [support_png=no], 930 [-lz -lm] 931 ) 932fi 933if test "x$support_png" = "xyes"; then 934 AC_DEFINE(USE_PNG, [], [set PNG background]) 935 LIBS="$LIBS -lz -lm" 936fi 937AM_CONDITIONAL(USE_PNG, test "x$support_png" = "xyes") 938 939 940if test "x$support_xpm" != "xyes" -a "x$support_jpeg" != "xyes" -a "x$support_png" != "xyes"; then 941 support_background_image=no 942fi 943if test "x$support_background_image" = "xyes"; then 944 AC_DEFINE(BACKGROUND_IMAGE, [], [set background image]) 945fi 946 947 948if test "x$support_xft" = "xyes"; then 949 dnl Backup variables 950 OLD_LIBS="$LIBS" 951 OLD_CFLAGS="$CFLAGS" 952 OLD_LDFLAGS="$LDFLAGS" 953 954 dnl Get new variables 955 LIBS="$LIBS `xft-config --libs`" 956 CFLAGS="$CFLAGS `xft-config --cflags`" 957 LDFLAGS="$LDFLAGS `xft-config --libs`" 958 dnl If xft-config is not found, try pkg-config instead 959 if test "$LIBS" = "$OLD_LIBS"; then 960 LIBS="$LIBS `pkg-config --libs xft`" 961 CFLAGS="$CFLAGS `pkg-config --cflags xft`" 962 LDFLAGS="$LDFLAGS `pkg-config --libs xft`" 963 fi 964 965 dnl Solaris has wired include directory for freetype.h 966 if test "x$local_os_type" = "xsolaris"; then 967 CFLAGS="$CFLAGS -I/usr/sfw/include -I/usr/sfw/include/freetype2" 968 fi 969 970 AC_CHECK_HEADERS(fontconfig/fontconfig.h X11/Xft/Xft.h, , 971 [support_xft=no], 972 [[#include <X11/Xlib.h> 973 #include <fontconfig/fontconfig.h> 974 ]] 975 ) 976 AC_CHECK_LIB( 977 fontconfig, 978 FcPatternAddInteger, 979 [], 980 [support_xft=no] 981 ) 982 AC_CHECK_LIB( 983 Xft, 984 XftDrawString16, 985 [], 986 [support_xft=no] 987 ) 988 989 if test "x$support_xft x$support_cjk" = "xyes xyes"; then 990 dnl BSD and Cygwin needs libiconv 991 AC_CHECK_LIB(iconv, iconv_open) 992 dnl hack for Mac OS X 993 if test "x$local_os_type" = "xdarwin"; then 994 LIBS="$LIBS -liconv" 995 fi 996 dnl hack for Cygwin 997 if test "x$local_os_type" = "xcygwin"; then 998 LIBS="$LIBS -liconv" 999 fi 1000 dnl hack for Cygwin 1001 if test "x$local_os_type" = "xopenbsd"; then 1002 LIBS="$LIBS -liconv" 1003 fi 1004 fi 1005 1006 if test "x$support_xft" = "xyes"; then 1007 AC_DEFINE(XFT_SUPPORT, [], [set XFT support]) 1008 else 1009 dnl Restore backup copy variables 1010 LIBS="$OLD_LIBS" 1011 CFLAGS="$OLD_CFLAGS" 1012 LDFLAGS="$OLD_LDFLAGS" 1013 fi 1014fi 1015 1016if test "x$support_cjk" = "xyes"; then 1017 AC_DEFINE(MULTICHAR_SET, [], [set CJK multichar set support]) 1018 AC_DEFINE_UNQUOTED(MULTICHAR_ENCODING, "$encoding_option", [default encoding]) 1019fi 1020 1021 1022 1023AC_HEADER_STDC 1024AC_HEADER_SYS_WAIT 1025 1026AC_CHECK_HEADERS([stdlib.h], [], [], 1027 [#include <stdio.h> 1028 ]) 1029 1030AC_CHECK_HEADERS([sys/socket.h], [], [], 1031 [#include <stdio.h> 1032 #ifdef STDC_HEADERS 1033 # include <stdlib.h> 1034 # include <stddef.h> 1035 #else 1036 # ifdef HAVE_STDLIB_H 1037 # include <stdlib.h> 1038 # endif 1039 #endif 1040 ]) 1041 1042AC_CHECK_HEADERS( \ 1043 arpa/inet.h \ 1044 assert.h \ 1045 fcntl.h \ 1046 iconv.h \ 1047 inttypes.h \ 1048 lastlog.h \ 1049 limits.h \ 1050 locale.h \ 1051 langinfo.h \ 1052 netinet/in.h \ 1053 pty.h \ 1054 sgtty.h \ 1055 stdarg.h \ 1056 stdlib.h \ 1057 string.h \ 1058 sys/byteorder.h \ 1059 sys/ioctl.h \ 1060 sys/select.h \ 1061 sys/sockio.h \ 1062 sys/stropts.h \ 1063 sys/strredir.h \ 1064 sys/stat.h \ 1065 sys/time.h \ 1066 sys/times.h \ 1067 sys/types.h \ 1068 sys/wait.h \ 1069 time.h \ 1070 termios.h \ 1071 unistd.h \ 1072 utmp.h \ 1073 utmpx.h \ 1074 wchar.h \ 1075) 1076 1077if test "x$support_sessionmgr" = "xyes"; then 1078 AC_CHECK_HEADERS(X11/SM/SMlib.h) 1079fi 1080 1081AC_CHECK_HEADERS([net/if.h], [], [], 1082 [#include <stdio.h> 1083 #ifdef STDC_HEADERS 1084 # include <stdlib.h> 1085 # include <stddef.h> 1086 #else 1087 # ifdef HAVE_STDLIB_H 1088 # include <stdlib.h> 1089 # endif 1090 #endif 1091 #if HAVE_SYS_SOCKET_H 1092 # include <sys/socket.h> 1093 #endif 1094 ]) 1095 1096AC_CHECK_HEADERS([net/if_arp.h], [], [], 1097 [#include <stdio.h> 1098 #ifdef STDC_HEADERS 1099 # include <stdlib.h> 1100 # include <stddef.h> 1101 #else 1102 # ifdef HAVE_STDLIB_H 1103 # include <stdlib.h> 1104 # endif 1105 #endif 1106 #if HAVE_SYS_SOCKET_H 1107 # include <sys/socket.h> 1108 #endif 1109 ]) 1110 1111dnl Checks for typedefs, structures, and compiler characteristics. 1112AC_C_CONST 1113AC_C_INLINE 1114AC_HEADER_TIME 1115 1116 1117AC_STRUCT_TM 1118 1119AC_TYPE_MODE_T 1120AC_TYPE_UID_T 1121AC_TYPE_PID_T 1122AC_TYPE_SIGNAL 1123 1124 1125AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, 1126[AC_TRY_COMPILE([#include <X11/Xlib.h>], [XPointer dummy;], 1127rxvt_cv_xpointer=yes, rxvt_cv_xpointer=no)]) 1128if test "x$rxvt_cv_xpointer" = "xyes"; then 1129 AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) 1130fi 1131 1132 1133if test "x$support_utmp" = "xyes"; then 1134 AC_CACHE_CHECK([for struct utmp], rxvt_cv_struct_utmp, 1135 [AC_TRY_COMPILE([#include <sys/types.h> 1136 #include <utmp.h>], 1137 [struct utmp ut;], 1138 rxvt_cv_struct_utmp=yes, rxvt_cv_struct_utmp=no)]) 1139 if test "x$rxvt_cv_struct_utmp" = "xyes"; then 1140 AC_DEFINE(HAVE_STRUCT_UTMP, 1, Define if utmp.h has struct utmp) 1141 fi 1142 1143 AC_CACHE_CHECK(for ut_host in utmp struct, rxvt_cv_struct_utmp_host, 1144 [AC_TRY_COMPILE([#include <sys/types.h> 1145 #include <utmp.h>], 1146 [struct utmp ut; ut.ut_host;], 1147 rxvt_cv_struct_utmp_host=yes, rxvt_cv_struct_utmp_host=no)]) 1148 if test "x$rxvt_cv_struct_utmp_host" = "xyes"; then 1149 AC_DEFINE(HAVE_UTMP_HOST, 1, Define if struct utmp contains ut_host) 1150 fi 1151 1152 AC_CACHE_CHECK(for ut_pid in utmp struct, rxvt_cv_struct_utmp_pid, 1153 [AC_TRY_COMPILE([#include <sys/types.h> 1154 #include <utmp.h>], 1155 [struct utmp ut; ut.ut_pid;], 1156 rxvt_cv_struct_utmp_pid=yes, rxvt_cv_struct_utmp_pid=no)]) 1157 if test "x$rxvt_cv_struct_utmp_pid" = "xyes"; then 1158 AC_DEFINE(HAVE_UTMP_PID, 1, Define if struct utmp contains ut_pid) 1159 fi 1160 1161 AC_CACHE_CHECK([for struct utmpx], rxvt_cv_struct_utmpx, 1162 [AC_TRY_COMPILE([#include <sys/types.h> 1163 #include <utmpx.h>], 1164 [struct utmpx ut;], 1165 rxvt_cv_struct_utmpx=yes, rxvt_cv_struct_utmpx=no)]) 1166 if test "x$rxvt_cv_struct_utmpx" = "xyes"; then 1167 AC_DEFINE(HAVE_STRUCT_UTMPX, 1, Define if utmpx.h has struct utmpx) 1168 fi 1169 1170 AC_CACHE_CHECK(for ut_host in utmpx struct, rxvt_cv_struct_utmpx_host, 1171 [AC_TRY_COMPILE([#include <sys/types.h> 1172 #include <utmpx.h>], 1173 [struct utmpx utx; utx.ut_host;], 1174 rxvt_cv_struct_utmpx_host=yes, rxvt_cv_struct_utmpx_host=no)]) 1175 if test "x$rxvt_cv_struct_utmpx_host" = "xyes"; then 1176 AC_DEFINE(HAVE_UTMPX_HOST, 1, Define if struct utmpx contains ut_host) 1177 fi 1178 1179 AC_CACHE_CHECK(for ut_session in utmpx struct, rxvt_cv_struct_utmpx_session, 1180 [AC_TRY_COMPILE([#include <sys/types.h> 1181 #include <utmpx.h>], 1182 [struct utmpx utx; utx.ut_session;], 1183 rxvt_cv_struct_utmpx_session=yes, rxvt_cv_struct_utmpx_session=no)]) 1184 if test "x$rxvt_cv_struct_utmpx_session" = "xyes"; then 1185 AC_DEFINE(HAVE_UTMPX_SESSION, 1, Define if struct utmpx contains ut_session) 1186 fi 1187fi 1188 1189 1190if test "x$support_utmp x$support_lastlog" = "xyes xyes"; then 1191 AC_CACHE_CHECK(for struct lastlog, rxvt_cv_struct_lastlog, 1192 [AC_TRY_COMPILE([#include <sys/types.h> 1193 #include <utmp.h> 1194 #ifdef HAVE_LASTLOG_H 1195 #include <lastlog.h> 1196 #endif 1197 ], 1198 [struct lastlog ll;], 1199 rxvt_cv_struct_lastlog=yes, rxvt_cv_struct_lastlog=no)]) 1200 if test "x$rxvt_cv_struct_lastlog" = "xyes"; then 1201 AC_DEFINE(HAVE_STRUCT_LASTLOG, 1, Define if utmp.h or lastlog.h has struct lastlog) 1202 fi 1203fi 1204 1205 1206 1207 1208AC_CHECK_SIZEOF(char, 1) 1209AC_CHECK_SIZEOF(short, 2) 1210AC_CHECK_SIZEOF(int, 4) 1211AC_CHECK_SIZEOF(long, 4) 1212AC_CHECK_SIZEOF(long long, 8) 1213AC_CHECK_SIZEOF(int *, 4) 1214 1215 1216if test $ac_cv_sizeof_char -ge 2; then 1217 RINT16T=char 1218 AC_DEFINE(RINT16T, char,[typedef]) 1219 AC_DEFINE(RUINT16T, unsigned char,[typedef]) 1220else 1221 if test $ac_cv_sizeof_short -ge 2; then 1222 RINT16T=short 1223 AC_DEFINE(RINT16T, short,[typedef]) 1224 AC_DEFINE(RUINT16T, unsigned short,[typedef]) 1225 else 1226 if test $ac_cv_sizeof_int -ge 2; then 1227 RINT16T=int 1228 AC_DEFINE(RINT16T, int,[typedef]) 1229 AC_DEFINE(RUINT16T, unsigned int,[typedef]) 1230 else dnl What a fantastic system ? 1231 RINT16T=long 1232 AC_DEFINE(RINT16T, long,[typedef]) 1233 AC_DEFINE(RUINT16T, unsigned long,[typedef]) 1234 fi 1235 fi 1236fi 1237if test $ac_cv_sizeof_char -ge 4; then 1238 RINT32T=char 1239 AC_DEFINE(RINT32T, char,[typedef]) 1240 AC_DEFINE(RUINT32T, unsigned char,[typedef]) 1241else 1242 if test $ac_cv_sizeof_short -ge 4; then 1243 RINT32T=short 1244 AC_DEFINE(RINT32T, short,[typedef]) 1245 AC_DEFINE(RUINT32T, unsigned short,[typedef]) 1246 else 1247 if test $ac_cv_sizeof_int -ge 4; then 1248 RINT32T=int 1249 AC_DEFINE(RINT32T, int,[typedef]) 1250 AC_DEFINE(RUINT32T, unsigned int,[typedef]) 1251 else dnl What a fantastic system ? 1252 RINT32T=long 1253 AC_DEFINE(RINT32T, long,[typedef]) 1254 AC_DEFINE(RUINT32T, unsigned long,[typedef]) 1255 fi 1256 fi 1257fi 1258if test $ac_cv_sizeof_char -eq $ac_cv_sizeof_int_p; then 1259 RINTPT=char 1260 AC_DEFINE(RINTPT, char,[typedef]) 1261 AC_DEFINE(RUINTPT, unsigned char,[typedef]) 1262else 1263 if test $ac_cv_sizeof_short -eq $ac_cv_sizeof_int_p; then 1264 RINTPT=short 1265 AC_DEFINE(RINTPT, short,[typedef]) 1266 AC_DEFINE(RUINTPT, unsigned short,[typedef]) 1267 else 1268 if test $ac_cv_sizeof_int -eq $ac_cv_sizeof_int_p; then 1269 RINTPT=int 1270 AC_DEFINE(RINTPT, int,[typedef]) 1271 AC_DEFINE(RUINTPT, unsigned int,[typedef]) 1272 else dnl what next? long long? quad? 1273 RINTPT=long 1274 AC_DEFINE(RINTPT, long,[typedef]) 1275 AC_DEFINE(RUINTPT, unsigned long,[typedef]) 1276 fi 1277 fi 1278fi 1279 1280 1281 1282dnl Checks for library functions. 1283AC_FUNC_CHOWN 1284AC_FUNC_FORK 1285AC_PROG_GCC_TRADITIONAL 1286AC_FUNC_LSTAT 1287dnl AC_FUNC_MALLOC 1288AC_FUNC_SETPGRP 1289AC_FUNC_VPRINTF 1290 1291 1292dnl Now to check functions 1293AC_CHECK_FUNCS( 1294 getcwd \ 1295 getpt \ 1296 _getpty \ 1297 getpwuid \ 1298 grantpt \ 1299 isastream \ 1300 nanosleep \ 1301 openpty \ 1302 putenv \ 1303 revoke \ 1304 select \ 1305 setlocale \ 1306 seteuid \ 1307 setpgrp \ 1308 setpgid \ 1309 setreuid \ 1310 setsid \ 1311 setutent \ 1312 socket \ 1313 strchr \ 1314 strdup \ 1315 strndup \ 1316 strrchr \ 1317 ttyslot \ 1318 unlockpt \ 1319 unsetenv \ 1320 updwtmp \ 1321 updwtmpx \ 1322 xsetlocale \ 1323) 1324 1325 1326dnl Now to set tty options 1327dnl echo "*** ac_cv_func_getpt = $ac_cv_func_getpt" 1328dnl Check PTY/TTY types 1329if test "x$ac_cv_func_openpty" = "xyes"; then 1330 rxvt_cv_ptys=OPENPTY 1331else if test "x$ac_cv_func__getpty" = "xyes"; then 1332 rxvt_cv_ptys=SGI4 1333else if test -c /dev/ttyp20; then 1334 rxvt_cv_ptys=SCO 1335else if test -c /dev/ptym/clone; then 1336 rxvt_cv_ptys=HPUX 1337else if test "x$ac_cv_func_getpt" = "xyes"; then 1338 rxvt_cv_ptys=GLIBC 1339else if test -c /dev/ptc -a -c /dev/pts; then 1340 rxvt_cv_ptys=PTC 1341else if test -c /dev/ptc -a -d /dev/pts; then 1342 rxvt_cv_ptys=PTC 1343else if test -c /dev/ptmx -a -c /dev/pts/0; then 1344 rxvt_cv_ptys=STREAMS 1345else if test "x$ac_cv_func_grantpt x$ac_cv_func_unlockpt" = "xyes xyes"; then 1346 rxvt_cv_ptys=STREAMS 1347else 1348 rxvt_cv_ptys=BSD 1349fi 1350fi 1351fi 1352fi 1353fi 1354fi 1355fi 1356fi 1357fi 1358 1359 1360dnl echo "*** rxvt_cv_ptys = $rxvt_cv_ptys" 1361if test "x$rxvt_cv_ptys" = "xOPENPTY"; then 1362 AC_DEFINE(PTYS_ARE_OPENPTY, 1, Define for this pty type) 1363fi 1364if test "x$rxvt_cv_ptys" = "xSCO"; then 1365 AC_DEFINE(PTYS_ARE_NUMERIC, 1, Define for this pty type) 1366fi 1367if test "x$rxvt_cv_ptys" = "xSTREAMS"; then 1368 AC_DEFINE(PTYS_ARE_PTMX, 1, Define for this pty type) 1369fi 1370if test "x$rxvt_cv_ptys" = "xPTC"; then 1371 AC_DEFINE(PTYS_ARE_PTC, 1, Define for this pty type) 1372fi 1373if test "x$rxvt_cv_ptys" = "xSGI4"; then 1374 AC_DEFINE(PTYS_ARE__GETPTY, 1, Define for this pty type) 1375fi 1376if test "x$rxvt_cv_ptys" = "xCONVEX"; then 1377 AC_DEFINE(PTYS_ARE_GETPTY, 1, Define for this pty type) 1378fi 1379if test "x$rxvt_cv_ptys" = "xGLIBC"; then 1380 AC_DEFINE(PTYS_ARE_GETPT, 1, Define for this pty type) 1381fi 1382if test "x$rxvt_cv_ptys" = "xHPUX"; then 1383 AC_DEFINE(PTYS_ARE_CLONE, 1, Define for this pty type) 1384fi 1385if test "x$rxvt_cv_ptys" = "xBSD" -o "x$rxvt_cv_ptys" = "xHPUX" -o "x$rxvt_cv_ptys" = "xGLIBC"; then 1386 AC_DEFINE(PTYS_ARE_SEARCHED, 1, Define for this pty type) 1387fi 1388 1389AC_CHECKING(for pty ranges) 1390ptys=`echo /dev/pty??` 1391pch1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'` 1392pch2=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'` 1393if test x$pch1 != x; then 1394 AC_DEFINE_UNQUOTED(PTYCHAR1, "$pch1", Define for first char in devptyXX) 1395fi 1396if test x$pch2 != x; then 1397 AC_DEFINE_UNQUOTED(PTYCHAR2, "$pch2", Define for second char in devptyXX) 1398fi 1399 1400 1401 1402dnl Now to generate Makefiles 1403AC_SUBST(CC) 1404AC_SUBST(CFLAGS) 1405AC_SUBST(LDFLAGS) 1406AC_SUBST(LIBS) 1407AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile]) 1408AC_OUTPUT 1409 1410 1411dnl Now to dump configuration options 1412dnl echo "CFLAGS: $CFLAGS" 1413dnl echo "LDFLAGS: $LDFLAGS" 1414dnl echo "LIBS: $LIBS" 1415 1416echo 1417echo 1418echo "Configurations:" 1419echo 1420echo 1421echo "Maintenance:" 1422echo "Debug mode : $support_debug" 1423echo "Private string functions : $support_ourstrings" 1424echo "Rarely used features : $support_frills" 1425echo 1426echo "Scroll features:" 1427echo "Keep scroll : $support_keepscrolling" 1428echo "Scroll on selection : $support_selectionscrolling" 1429echo "Mouse wheel scroll : $support_mousewheel" 1430if test "x$support_mousewheel" = "xyes"; then 1431 echo "Slip mouse wheel scroll : $support_mouseslipwheel" 1432fi 1433if test "x$support_scroll" = "xyes"; then 1434 echo "RXVT style scrollbar : $support_scroll_rxvt" 1435 echo "NeXT style scrollbar : $support_scroll_next" 1436 echo "Xterm style scrollbar : $support_scroll_xterm" 1437 echo "Plain style scrollbar : $support_scroll_plain" 1438 echo "SGI IRIX style scrollbar : $support_scroll_sgi" 1439 if test "x$support_scroll_rxvt" = "xyes"; then 1440 echo "Half shadow scrollbar : $support_half_shadow" 1441 fi 1442fi 1443echo 1444echo "Logging features:" 1445echo "Support utmp records : $support_utmp" 1446echo "Support wtmp records : $support_wtmp" 1447echo "Support lastlog records : $support_lastlog" 1448echo "Support X session manager : $support_sessionmgr" 1449echo "Use utempter library : $support_utempter" 1450echo 1451echo "Visual features:" 1452echo "Support line space : $support_linespace" 1453echo "24 bits color mode : $support_24bits" 1454echo "256 color mode : $support_256colors" 1455echo "Blink cursor : $support_cursor_blink" 1456echo "Blank pointer : $support_pointer_blank" 1457echo "Color text shadow : $support_text_shadow" 1458echo "Smart resize : $support_smart_resize" 1459echo "Menu bar : $support_menubar" 1460echo 1461echo "Background features:" 1462echo "Background image : $support_background_image" 1463echo "XPM background image : $support_xpm" 1464echo "JPEG background image : $support_jpeg" 1465echo "PNG background image : $support_png" 1466echo "Transparent background : $support_transparency" 1467echo "Off focus fading : $support_fading" 1468echo "Background tinting : $support_tinting" 1469echo 1470echo "Multi-language and font features:" 1471echo "Freetype Font : $support_xft" 1472echo "X Input Method : $support_xim" 1473echo "Greek keyboard : $support_greek" 1474echo "CJK multichar language : $support_cjk" 1475if test "x$support_cjk" = "xyes"; then 1476 echo "Default encoding method : $encoding_option" 1477fi 1478echo "Thai support : $support_thai" 1479echo 1480echo "System features:" 1481echo "TTY/PTY type : $rxvt_cv_ptys" 1482echo "TTY gid : $support_ttygid" 1483echo "Backspace key : $support_backspace_key" 1484echo "Delete key : $support_delete_key" 1485echo "X resources : $support_resources" 1486echo "X default resources : $support_xgetdefault" 1487echo "Swap screen : $support_swapscreen" 1488echo "Old selection : $support_old_selection" 1489echo 1490echo "Options:" 1491echo "Terminal name : $term_name_option" 1492echo "Maximal tabs : $max_term_option" 1493if test "x$support_linespace" = "xyes"; then 1494 echo "Line space : $line_space_option" 1495fi 1496if test "x$support_frills" = "xyes"; then 1497 echo "Internal border width : $int_border_option" 1498 echo "External border width : $ext_border_option" 1499fi 1500if test "x$support_scroll" = "xyes"; then 1501 echo "Saved lines in scroll : $save_lines_option" 1502fi 1503echo 1504