ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/autoconf/configure.in
(Generate patch)

Comparing rxvt-unicode/autoconf/configure.in (file contents):
Revision 1.30 by root, Fri Jul 30 16:04:05 2004 UTC vs.
Revision 1.34 by root, Tue Aug 17 08:47:56 2004 UTC

1dnl# -*- sh -*- 1dnl# -*- sh -*-
2dnl# 2dnl#
3dnl# Process this file with autoconf to produce a configure script. 3dnl# Process this file with autoconf to produce a configure script.
4dnl# 4dnl#
5AC_INIT(src/feature.h) 5AC_INIT
6AC_CONFIG_SRCDIR([src/feature.h])
6AC_CONFIG_AUX_DIR(autoconf) 7AC_CONFIG_AUX_DIR(autoconf)
7AC_CONFIG_HEADER(config.h:autoconf/config.h.in) 8AC_CONFIG_HEADER(config.h:autoconf/config.h.in)
8 9
9dnl RXVT version 10dnl RXVT version
10changequote(, )dnl 11changequote(, )dnl
90support_xpm=no 91support_xpm=no
91support_xft=no 92support_xft=no
92support_unicode3=no 93support_unicode3=no
93support_combining=no 94support_combining=no
94support_8bitctrls=no 95support_8bitctrls=no
96support_iso14755=no
95codesets= 97codesets=
96 98
97dnl# -------------------------------------------------------------------------- 99dnl# --------------------------------------------------------------------------
98dnl# CHECKING COMMAND LINE OPTIONS 100dnl# CHECKING COMMAND LINE OPTIONS
99dnl# -------------------------------------------------------------------------- 101dnl# --------------------------------------------------------------------------
134 support_xpm=yes 136 support_xpm=yes
135 support_xft=yes 137 support_xft=yes
136 support_unicode3=yes 138 support_unicode3=yes
137 support_combining=yes 139 support_combining=yes
138 #support_8bitctrls=yes 140 #support_8bitctrls=yes
141 support_iso14755=yes
139 codesets=all 142 codesets=all
140 fi]) 143 fi])
141 144
142AC_ARG_ENABLE(unicode3, 145AC_ARG_ENABLE(unicode3,
143 [ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters], 146 [ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters],
324 [ --disable-swapscreen disable swap screen support], 327 [ --disable-swapscreen disable swap screen support],
325 [if test x$enableval = xno; then 328 [if test x$enableval = xno; then
326 AC_DEFINE(NO_SECONDARY_SCREEN, 1, Disable the secondary screen. Many programs use the secondary screen as their workplace) 329 AC_DEFINE(NO_SECONDARY_SCREEN, 1, Disable the secondary screen. Many programs use the secondary screen as their workplace)
327 fi]) 330 fi])
328 331
332AC_ARG_ENABLE(iso14755,
333 [ --enable-iso14755 enable support for extended ISO 14755 modes],
334 [if test x$enableval = xyes -o x$enableval = xno; then
335 support_iso14755=$enableval
336 fi])
337
329AC_ARG_ENABLE(frills, 338AC_ARG_ENABLE(frills,
330 [ --enable-frills enable support for rarely used features], 339 [ --enable-frills enable support for rarely used features],
331 [if test x$enableval = xyes -o x$enableval = xno; then 340 [if test x$enableval = xyes -o x$enableval = xno; then
332 support_frills=$enableval 341 support_frills=$enableval
333 fi]) 342 fi])
389 398
390AC_ARG_ENABLE(smart-resize, 399AC_ARG_ENABLE(smart-resize,
391 [ --enable-smart-resize enable smart growth/shrink behaviour], 400 [ --enable-smart-resize enable smart growth/shrink behaviour],
392 [if test x$enableval = xyes; then 401 [if test x$enableval = xyes; then
393 AC_DEFINE(SMART_RESIZE, 1, Define to use "smart" resize behavior) 402 AC_DEFINE(SMART_RESIZE, 1, Define to use "smart" resize behavior)
394 fi])
395
396AC_ARG_ENABLE(256-color,
397 [ --enable-256-color enable 256-color support],
398 [if test x$enableval = xyes; then
399 AC_DEFINE(TTY_256COLOR, 1, Define if you want 256 colour support)
400 fi]) 403 fi])
401 404
402AC_ARG_ENABLE(cursor-blink, 405AC_ARG_ENABLE(cursor-blink,
403 [ --enable-cursor-blink enable blinking cursor], 406 [ --enable-cursor-blink enable blinking cursor],
404 [if test x$enableval = xyes -o x$enableval = xno; then 407 [if test x$enableval = xyes -o x$enableval = xno; then
500 sys/byteorder.h \ 503 sys/byteorder.h \
501 sys/ioctl.h \ 504 sys/ioctl.h \
502 sys/select.h \ 505 sys/select.h \
503 sys/sockio.h \ 506 sys/sockio.h \
504 sys/strredir.h \ 507 sys/strredir.h \
508 sys/stropts.h \
505 sys/time.h \ 509 sys/time.h \
506 utmp.h \ 510 utmp.h \
507 utmpx.h \ 511 utmpx.h \
508 stdint.h \ 512 stdint.h \
509) 513)
510 514
511AC_HEADER_TIME 515AC_HEADER_TIME
512 516
513dnl# check to allow both <termios.h> and <sys/ioctl.h> 517dnl# check to allow both <termios.h> and <sys/ioctl.h>
514AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl, 518AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl,
515[AC_TRY_COMPILE([#include <stdio.h> 519[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
516#include <sys/ioctl.h> 520#include <sys/ioctl.h>
517#ifdef HAVE_TERMIOS_H 521#ifdef HAVE_TERMIOS_H
518#include <termios.h> 522#include <termios.h>
519#endif], [int a = ECHO;], rxvt_cv_header_sysioctl=yes, rxvt_cv_header_sysioctl=no)]) 523#endif]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])])
520 524
521dnl# ELF systems may want to store paths for dynamic libraries. 525dnl# ELF systems may want to store paths for dynamic libraries.
522dnl# Lets see if the compiler can accept "-Rpath" or "-Wl,-Rpath" 526dnl# Lets see if the compiler can accept "-Rpath" or "-Wl,-Rpath"
523dnl# At least one version of SunOS wants "-R path" but it's not checked yet. 527dnl# At least one version of SunOS wants "-R path" but it's not checked yet.
524if test -n "$GCC"; then 528if test -n "$GCC"; then
533ac_save_CFLAGS=$CFLAGS 537ac_save_CFLAGS=$CFLAGS
534ac_save_LIBS=$LIBS 538ac_save_LIBS=$LIBS
535CFLAGS="$CFLAGS $X_CFLAGS" 539CFLAGS="$CFLAGS $X_CFLAGS"
536LIBS=`echo "$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"` 540LIBS=`echo "$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"`
537AC_CACHE_CHECK([for -rpath dynamic library path recording], rxvt_cv_rpath, 541AC_CACHE_CHECK([for -rpath dynamic library path recording], rxvt_cv_rpath,
538[AC_TRY_RUN([ 542[AC_RUN_IFELSE([AC_LANG_SOURCE([[
539main() 543main()
540{ 544{
541 exit(0); 545 exit(0);
542 (void) XOpenDisplay("foobar"); 546 (void) XOpenDisplay("foobar");
543}], rxvt_cv_rpath=yes, rxvt_cv_rpath=no, dnl 547}]])],[rxvt_cv_rpath=yes],[rxvt_cv_rpath=no],[dnl
544 AC_MSG_WARN([You may need to check the LIBS line]))]) 548 AC_MSG_WARN(You may need to check the LIBS line)])])
545if test x$rxvt_cv_rpath != xyes; then 549if test x$rxvt_cv_rpath != xyes; then
546 changequote(, )dnl 550 changequote(, )dnl
547 R_TRANSLATE='s/-L\([^ ]*\)/-L\1 '$LDARG'-R\1/g' 551 R_TRANSLATE='s/-L\([^ ]*\)/-L\1 '$LDARG'-R\1/g'
548 changequote([, ])dnl 552 changequote([, ])dnl
549 LIBS=`echo "$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"` 553 LIBS=`echo "$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"`
550 AC_CACHE_CHECK([for -R dynamic library path recording], rxvt_cv_R, 554 AC_CACHE_CHECK([for -R dynamic library path recording], rxvt_cv_R,
551[AC_TRY_RUN([ 555[AC_RUN_IFELSE([AC_LANG_SOURCE([[
552main() 556main()
553{ 557{
554 exit(0); 558 exit(0);
555 (void) XOpenDisplay("foobar"); 559 (void) XOpenDisplay("foobar");
556}], rxvt_cv_R=yes, rxvt_cv_R=no, rxvt_cv_R=no)]) 560}]])],[rxvt_cv_R=yes],[rxvt_cv_R=no],[rxvt_cv_R=no])])
557 if test x$rxvt_cv_R != xyes; then 561 if test x$rxvt_cv_R != xyes; then
558 LIBS="$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" 562 LIBS="$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11"
559 fi 563 fi
560fi 564fi
561 565
562AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, 566AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer,
563[AC_TRY_COMPILE([#include <X11/Xlib.h>], [XPointer dummy;], 567[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])])
564rxvt_cv_xpointer=yes, rxvt_cv_xpointer=no)])
565if test x$rxvt_cv_xpointer = xyes; then 568if test x$rxvt_cv_xpointer = xyes; then
566 AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) 569 AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef)
567fi 570fi
568LIBS=$ac_save_LIBS 571LIBS=$ac_save_LIBS
569CFLAGS=$ac_save_CFLAGS 572CFLAGS=$ac_save_CFLAGS
582dnl> AC_CHECK_TYPE(umode_t, int) 585dnl> AC_CHECK_TYPE(umode_t, int)
583dnl> AC_CHECK_TYPE(off_t, long) 586dnl> AC_CHECK_TYPE(off_t, long)
584AC_TYPE_PID_T 587AC_TYPE_PID_T
585AC_TYPE_UID_T 588AC_TYPE_UID_T
586 589
587
588AC_CHECK_SIZEOF(char, 1) 590AC_CHECK_SIZEOF(char, 1)
589AC_CHECK_SIZEOF(short, 2) 591AC_CHECK_SIZEOF(short, 2)
590AC_CHECK_SIZEOF(int, 4) 592AC_CHECK_SIZEOF(int, 4)
591AC_CHECK_SIZEOF(long, 4) 593AC_CHECK_SIZEOF(long, 4)
592AC_CHECK_SIZEOF(long long, 8) 594AC_CHECK_SIZEOF(long long, 8)
593AC_CHECK_SIZEOF(int *, 4) 595AC_CHECK_SIZEOF(int *, 4)
594 596
595dnl# see usage below 597dnl# see usage below
596AC_DEFUN(RXVT_CHECK_SIZE, 598AC_DEFUN(RXVT_CHECK_SIZE,
597 [AC_CACHE_CHECK([for $2], $1, 599 [AC_CACHE_CHECK([for $2], $1,
598 [AC_TRY_COMPILE([#include <stdint.h>], $2 dummy;, 600 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[$2 dummy;]])],[$1=yes],[dnl
599 [$1=yes],
600 [dnl
601if test $ac_cv_sizeof_char -ge $3; then 601if test $ac_cv_sizeof_char -ge $3; then
602 $1="$4 char" 602 $1="$4 char"
603else 603else
604 if test $ac_cv_sizeof_short -ge $3; then 604 if test $ac_cv_sizeof_short -ge $3; then
605 $1="$4 short" 605 $1="$4 short"
707dnl# check for host field in utmp structure 707dnl# check for host field in utmp structure
708 708
709dnl# -------------------------------------------- 709dnl# --------------------------------------------
710AC_CHECK_HEADER(utmp.h, 710AC_CHECK_HEADER(utmp.h,
711[AC_CACHE_CHECK([for struct utmp], rxvt_cv_struct_utmp, 711[AC_CACHE_CHECK([for struct utmp], rxvt_cv_struct_utmp,
712[AC_TRY_COMPILE([#include <sys/types.h> 712[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
713#include <stdint.h> 713#include <stdint.h>
714#include <utmp.h>], 714#include <utmp.h>]], [[struct utmp ut;]])],[rxvt_cv_struct_utmp=yes],[rxvt_cv_struct_utmp=no])])
715[struct utmp ut;],
716rxvt_cv_struct_utmp=yes, rxvt_cv_struct_utmp=no)])
717if test x$rxvt_cv_struct_utmp = xyes; then 715if test x$rxvt_cv_struct_utmp = xyes; then
718 AC_DEFINE(HAVE_STRUCT_UTMP, 1, Define if utmp.h has struct utmp) 716 AC_DEFINE(HAVE_STRUCT_UTMP, 1, Define if utmp.h has struct utmp)
719fi 717fi
720] 718]
721 719
722AC_CACHE_CHECK(for ut_host in utmp struct, rxvt_cv_struct_utmp_host, 720AC_CACHE_CHECK(for ut_host in utmp struct, rxvt_cv_struct_utmp_host,
723[AC_TRY_COMPILE([#include <sys/types.h> 721[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
724#include <utmp.h>], 722#include <utmp.h>]], [[struct utmp ut; ut.ut_host;]])],[rxvt_cv_struct_utmp_host=yes],[rxvt_cv_struct_utmp_host=no])])
725[struct utmp ut; ut.ut_host;],
726rxvt_cv_struct_utmp_host=yes, rxvt_cv_struct_utmp_host=no)])
727if test x$rxvt_cv_struct_utmp_host = xyes; then 723if test x$rxvt_cv_struct_utmp_host = xyes; then
728 AC_DEFINE(HAVE_UTMP_HOST, 1, Define if struct utmp contains ut_host) 724 AC_DEFINE(HAVE_UTMP_HOST, 1, Define if struct utmp contains ut_host)
729fi 725fi
730 726
731AC_CACHE_CHECK(for ut_pid in utmp struct, rxvt_cv_struct_utmp_pid, 727AC_CACHE_CHECK(for ut_pid in utmp struct, rxvt_cv_struct_utmp_pid,
732[AC_TRY_COMPILE([#include <sys/types.h> 728[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
733#include <utmp.h>], 729#include <utmp.h>]], [[struct utmp ut; ut.ut_pid;]])],[rxvt_cv_struct_utmp_pid=yes],[rxvt_cv_struct_utmp_pid=no])])
734[struct utmp ut; ut.ut_pid;],
735rxvt_cv_struct_utmp_pid=yes, rxvt_cv_struct_utmp_pid=no)])
736if test x$rxvt_cv_struct_utmp_pid = xyes; then 730if test x$rxvt_cv_struct_utmp_pid = xyes; then
737 AC_DEFINE(HAVE_UTMP_PID, 1, Define if struct utmp contains ut_pid) 731 AC_DEFINE(HAVE_UTMP_PID, 1, Define if struct utmp contains ut_pid)
738fi 732fi
739) dnl# AC_CHECK_HEADER(utmp.h 733) dnl# AC_CHECK_HEADER(utmp.h
740 734
741dnl# -------------------------------------------- 735dnl# --------------------------------------------
742 736
743AC_CHECK_HEADER(utmpx.h, 737AC_CHECK_HEADER(utmpx.h,
744[AC_CACHE_CHECK([for struct utmpx], rxvt_cv_struct_utmpx, 738[AC_CACHE_CHECK([for struct utmpx], rxvt_cv_struct_utmpx,
745[AC_TRY_COMPILE([#include <sys/types.h> 739[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
746#include <utmpx.h>], 740#include <utmpx.h>]], [[struct utmpx ut;]])],[rxvt_cv_struct_utmpx=yes],[rxvt_cv_struct_utmpx=no])])
747[struct utmpx ut;],
748rxvt_cv_struct_utmpx=yes, rxvt_cv_struct_utmpx=no)])
749if test x$rxvt_cv_struct_utmpx = xyes; then 741if test x$rxvt_cv_struct_utmpx = xyes; then
750 AC_DEFINE(HAVE_STRUCT_UTMPX, 1, Define if utmpx.h has struct utmpx) 742 AC_DEFINE(HAVE_STRUCT_UTMPX, 1, Define if utmpx.h has struct utmpx)
751fi 743fi
752] 744]
753 745
754AC_CACHE_CHECK(for host in utmpx struct, rxvt_cv_struct_utmpx_host, 746AC_CACHE_CHECK(for host in utmpx struct, rxvt_cv_struct_utmpx_host,
755[AC_TRY_COMPILE([#include <sys/types.h> 747[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
756#include <utmpx.h>], 748#include <utmpx.h>]], [[struct utmpx utx; utx.ut_host;]])],[rxvt_cv_struct_utmpx_host=yes],[rxvt_cv_struct_utmpx_host=no])])
757[struct utmpx utx; utx.ut_host;],
758rxvt_cv_struct_utmpx_host=yes, rxvt_cv_struct_utmpx_host=no)])
759if test x$rxvt_cv_struct_utmpx_host = xyes; then 749if test x$rxvt_cv_struct_utmpx_host = xyes; then
760 AC_DEFINE(HAVE_UTMPX_HOST, 1, Define if struct utmpx contains ut_host) 750 AC_DEFINE(HAVE_UTMPX_HOST, 1, Define if struct utmpx contains ut_host)
761fi 751fi
762) dnl# AC_CHECK_HEADER(utmpx.h 752) dnl# AC_CHECK_HEADER(utmpx.h
763 753
764 754
765dnl# -------------------------------------------------------------------------- 755dnl# --------------------------------------------------------------------------
766dnl# check for struct lastlog 756dnl# check for struct lastlog
767AC_CACHE_CHECK(for struct lastlog, rxvt_cv_struct_lastlog, 757AC_CACHE_CHECK(for struct lastlog, rxvt_cv_struct_lastlog,
768[AC_TRY_COMPILE([#include <sys/types.h> 758[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
769#include <utmp.h> 759#include <utmp.h>
770#ifdef HAVE_LASTLOG_H 760#ifdef HAVE_LASTLOG_H
771#include <lastlog.h> 761#include <lastlog.h>
772#endif 762#endif
773],
774[struct lastlog ll;],
775rxvt_cv_struct_lastlog=yes, rxvt_cv_struct_lastlog=no)]) 763]], [[struct lastlog ll;]])],[rxvt_cv_struct_lastlog=yes],[rxvt_cv_struct_lastlog=no])])
776if test x$rxvt_cv_struct_lastlog = xyes; then 764if test x$rxvt_cv_struct_lastlog = xyes; then
777 AC_DEFINE(HAVE_STRUCT_LASTLOG, 1, Define if utmp.h or lastlog.h has struct lastlog) 765 AC_DEFINE(HAVE_STRUCT_LASTLOG, 1, Define if utmp.h or lastlog.h has struct lastlog)
778fi 766fi
779 767
780dnl# check for struct lastlogx 768dnl# check for struct lastlogx
781AC_CACHE_CHECK(for struct lastlogx, rxvt_cv_struct_lastlogx, 769AC_CACHE_CHECK(for struct lastlogx, rxvt_cv_struct_lastlogx,
782[AC_TRY_COMPILE([#include <sys/types.h> 770[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
783#include <utmpx.h> 771#include <utmpx.h>
784#ifdef HAVE_LASTLOG_H 772#ifdef HAVE_LASTLOG_H
785#include <lastlog.h> 773#include <lastlog.h>
786#endif 774#endif
787],
788[struct lastlogx ll;],
789rxvt_cv_struct_lastlogx=yes, rxvt_cv_struct_lastlogx=no)]) 775]], [[struct lastlogx ll;]])],[rxvt_cv_struct_lastlogx=yes],[rxvt_cv_struct_lastlogx=no])])
790if test x$rxvt_cv_struct_lastlogx = xyes; then 776if test x$rxvt_cv_struct_lastlogx = xyes; then
791 AC_DEFINE(HAVE_STRUCT_LASTLOGX, 1, Define if utmpx.h or lastlog.h has struct lastlogx) 777 AC_DEFINE(HAVE_STRUCT_LASTLOGX, 1, Define if utmpx.h or lastlog.h has struct lastlogx)
792fi 778fi
793 779
794dnl# -------------------------------------------------------------------------- 780dnl# --------------------------------------------------------------------------
795dnl# FIND FILES 781dnl# FIND FILES
796dnl# -------------------------------------------------------------------------- 782dnl# --------------------------------------------------------------------------
797 783
798dnl# find utmp 784dnl# find utmp
799AC_CACHE_CHECK(where utmp is located, rxvt_cv_path_utmp, 785AC_CACHE_CHECK(where utmp is located, rxvt_cv_path_utmp,
800[AC_TRY_RUN([#include <stdio.h> 786[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
801#include <sys/types.h> 787#include <sys/types.h>
802#include <utmp.h> 788#include <utmp.h>
803#include <errno.h> 789#include <errno.h>
804main() 790main()
805{ 791{
820 fprintf(f, "%s\n", *u); 806 fprintf(f, "%s\n", *u);
821 exit(0); 807 exit(0);
822 } 808 }
823 } 809 }
824 exit(0); 810 exit(0);
825}], rxvt_cv_path_utmp=`cat conftestval`, rxvt_cv_path_utmp=, dnl 811}]])],[rxvt_cv_path_utmp=`cat conftestval`],[rxvt_cv_path_utmp=],[dnl
826 AC_MSG_WARN([Define RXVT_UTMP_FILE in config.h manually]))]) 812 AC_MSG_WARN(Define RXVT_UTMP_FILE in config.h manually)])])
827if test x$rxvt_cv_path_utmp != x; then 813if test x$rxvt_cv_path_utmp != x; then
828 AC_DEFINE_UNQUOTED(RXVT_UTMP_FILE, "$rxvt_cv_path_utmp", Define location of utmp) 814 AC_DEFINE_UNQUOTED(RXVT_UTMP_FILE, "$rxvt_cv_path_utmp", Define location of utmp)
829fi 815fi
830 816
831dnl# -------------------------------------------------------------------------- 817dnl# --------------------------------------------------------------------------
832 818
833dnl# find utmpx - if a utmp file exists at the same location and is more than 819dnl# find utmpx - if a utmp file exists at the same location and is more than
834dnl# a day newer, then dump the utmpx. People leave lots of junk around. 820dnl# a day newer, then dump the utmpx. People leave lots of junk around.
835AC_CACHE_CHECK(where utmpx is located, rxvt_cv_path_utmpx, 821AC_CACHE_CHECK(where utmpx is located, rxvt_cv_path_utmpx,
836[AC_TRY_RUN([#include <stdio.h> 822[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
837#include <sys/types.h> 823#include <sys/types.h>
838#include <utmpx.h> 824#include <utmpx.h>
839#include <errno.h> 825#include <errno.h>
840#include <sys/stat.h> 826#include <sys/stat.h>
841#ifdef HAVE_STRING_H 827#ifdef HAVE_STRING_H
866 fprintf(f, "%s\n", *u); 852 fprintf(f, "%s\n", *u);
867 exit(0); 853 exit(0);
868 } 854 }
869 } 855 }
870 exit(0); 856 exit(0);
871}], rxvt_cv_path_utmpx=`cat conftestval`, rxvt_cv_path_utmpx=, dnl 857}]])],[rxvt_cv_path_utmpx=`cat conftestval`],[rxvt_cv_path_utmpx=],[dnl
872 AC_MSG_WARN([Define RXVT_UTMPX_FILE in config.h manually]))]) 858 AC_MSG_WARN(Define RXVT_UTMPX_FILE in config.h manually)])])
873if test x$rxvt_cv_path_utmpx != x; then 859if test x$rxvt_cv_path_utmpx != x; then
874 AC_DEFINE_UNQUOTED(RXVT_UTMPX_FILE, "$rxvt_cv_path_utmpx", Define location of utmpx) 860 AC_DEFINE_UNQUOTED(RXVT_UTMPX_FILE, "$rxvt_cv_path_utmpx", Define location of utmpx)
875fi 861fi
876 862
877dnl# -------------------------------------------------------------------------- 863dnl# --------------------------------------------------------------------------
878 864
879dnl# find wtmp 865dnl# find wtmp
880AC_CACHE_CHECK(where wtmp is located, rxvt_cv_path_wtmp, 866AC_CACHE_CHECK(where wtmp is located, rxvt_cv_path_wtmp,
881[AC_TRY_RUN([#include <stdio.h> 867[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
882#include <sys/types.h> 868#include <sys/types.h>
883#ifdef HAVE_UTMP_H 869#ifdef HAVE_UTMP_H
884#include <utmp.h> 870#include <utmp.h>
885#endif 871#endif
886#include <errno.h> 872#include <errno.h>
903 fprintf(f, "%s\n", *w); 889 fprintf(f, "%s\n", *w);
904 exit(0); 890 exit(0);
905 } 891 }
906 } 892 }
907 exit(0); 893 exit(0);
908}], rxvt_cv_path_wtmp=`cat conftestval`, rxvt_cv_path_wtmp=, dnl 894}]])],[rxvt_cv_path_wtmp=`cat conftestval`],[rxvt_cv_path_wtmp=],[dnl
909 AC_MSG_WARN([Define RXVT_WTMP_FILE in config.h manually]))]) 895 AC_MSG_WARN(Define RXVT_WTMP_FILE in config.h manually)])])
910if test x$rxvt_cv_path_wtmp != x; then 896if test x$rxvt_cv_path_wtmp != x; then
911 AC_DEFINE_UNQUOTED(RXVT_WTMP_FILE, "$rxvt_cv_path_wtmp", Define location of wtmp) 897 AC_DEFINE_UNQUOTED(RXVT_WTMP_FILE, "$rxvt_cv_path_wtmp", Define location of wtmp)
912fi 898fi
913dnl# -------------------------------------------------------------------------- 899dnl# --------------------------------------------------------------------------
914 900
915dnl# find wtmpx 901dnl# find wtmpx
916AC_CACHE_CHECK(where wtmpx is located, rxvt_cv_path_wtmpx, 902AC_CACHE_CHECK(where wtmpx is located, rxvt_cv_path_wtmpx,
917[AC_TRY_RUN([#include <stdio.h> 903[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
918#ifdef HAVE_UTMPX_H 904#ifdef HAVE_UTMPX_H
919#include <utmpx.h> 905#include <utmpx.h>
920#endif 906#endif
921#include <errno.h> 907#include <errno.h>
922main() 908main()
938 fprintf(f, "%s\n", *w); 924 fprintf(f, "%s\n", *w);
939 exit(0); 925 exit(0);
940 } 926 }
941 } 927 }
942 exit(0); 928 exit(0);
943}], rxvt_cv_path_wtmpx=`cat conftestval`, rxvt_cv_path_wtmpx=, dnl 929}]])],[rxvt_cv_path_wtmpx=`cat conftestval`],[rxvt_cv_path_wtmpx=],[dnl
944 AC_MSG_WARN([Define RXVT_WTMPX_FILE in config.h manually]))]) 930 AC_MSG_WARN(Define RXVT_WTMPX_FILE in config.h manually)])])
945if test x$rxvt_cv_path_wtmpx != x; then 931if test x$rxvt_cv_path_wtmpx != x; then
946 AC_DEFINE_UNQUOTED(RXVT_WTMPX_FILE, "$rxvt_cv_path_wtmpx", Define location of wtmpx) 932 AC_DEFINE_UNQUOTED(RXVT_WTMPX_FILE, "$rxvt_cv_path_wtmpx", Define location of wtmpx)
947fi 933fi
948dnl# -------------------------------------------------------------------------- 934dnl# --------------------------------------------------------------------------
949 935
950dnl# find lastlog 936dnl# find lastlog
951AC_CACHE_CHECK(where lastlog is located, rxvt_cv_path_lastlog, 937AC_CACHE_CHECK(where lastlog is located, rxvt_cv_path_lastlog,
952[AC_TRY_RUN([#include <stdio.h> 938[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
953#include <sys/types.h> 939#include <sys/types.h>
954#ifdef HAVE_UTMPX_H 940#ifdef HAVE_UTMPX_H
955#include <utmpx.h> 941#include <utmpx.h>
956#elif defined(HAVE_UTMP_H) 942#elif defined(HAVE_UTMP_H)
957#include <utmp.h> 943#include <utmp.h>
978 fprintf(f, "%s\n", *w); 964 fprintf(f, "%s\n", *w);
979 exit(0); 965 exit(0);
980 } 966 }
981 } 967 }
982 exit(0); 968 exit(0);
983}], rxvt_cv_path_lastlog=`cat conftestval`, rxvt_cv_path_lastlog=, dnl 969}]])],[rxvt_cv_path_lastlog=`cat conftestval`],[rxvt_cv_path_lastlog=],[dnl
984 AC_MSG_WARN([Define RXVT_LASTLOG_FILE in config.h manually]))]) 970 AC_MSG_WARN(Define RXVT_LASTLOG_FILE in config.h manually)])])
985if test x$rxvt_cv_path_lastlog != x; then 971if test x$rxvt_cv_path_lastlog != x; then
986 AC_DEFINE_UNQUOTED(RXVT_LASTLOG_FILE, "$rxvt_cv_path_lastlog", Define location of lastlog) 972 AC_DEFINE_UNQUOTED(RXVT_LASTLOG_FILE, "$rxvt_cv_path_lastlog", Define location of lastlog)
987 if test -d "$rxvt_cv_path_lastlog"; then 973 if test -d "$rxvt_cv_path_lastlog"; then
988 AC_DEFINE(LASTLOG_IS_DIR, 1, Define if lastlog is provided via a directory) 974 AC_DEFINE(LASTLOG_IS_DIR, 1, Define if lastlog is provided via a directory)
989 fi 975 fi
990fi 976fi
991dnl# -------------------------------------------------------------------------- 977dnl# --------------------------------------------------------------------------
992 978
993dnl# find lastlogx 979dnl# find lastlogx
994AC_CACHE_CHECK(where lastlogx is located, rxvt_cv_path_lastlogx, 980AC_CACHE_CHECK(where lastlogx is located, rxvt_cv_path_lastlogx,
995[AC_TRY_RUN([#include <stdio.h> 981[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
996#ifdef HAVE_UTMPX_H 982#ifdef HAVE_UTMPX_H
997#include <utmpx.h> 983#include <utmpx.h>
998#endif 984#endif
999#include <errno.h> 985#include <errno.h>
1000main() 986main()
1015 fprintf(f, "%s\n", *w); 1001 fprintf(f, "%s\n", *w);
1016 exit(0); 1002 exit(0);
1017 } 1003 }
1018 } 1004 }
1019 exit(0); 1005 exit(0);
1020}], rxvt_cv_path_lastlogx=`cat conftestval`, rxvt_cv_path_lastlogx=, dnl 1006}]])],[rxvt_cv_path_lastlogx=`cat conftestval`],[rxvt_cv_path_lastlogx=],[dnl
1021 AC_MSG_WARN([Define RXVT_LASTLOGX_FILE in config.h manually]))]) 1007 AC_MSG_WARN(Define RXVT_LASTLOGX_FILE in config.h manually)])])
1022if test x$rxvt_cv_path_lastlogx != x; then 1008if test x$rxvt_cv_path_lastlogx != x; then
1023 AC_DEFINE_UNQUOTED(RXVT_LASTLOGX_FILE, "$rxvt_cv_path_lastlogx", Define location of lastlogx) 1009 AC_DEFINE_UNQUOTED(RXVT_LASTLOGX_FILE, "$rxvt_cv_path_lastlogx", Define location of lastlogx)
1024fi 1010fi
1025 1011
1026dnl# -------------------------------------------------------------------------- 1012dnl# --------------------------------------------------------------------------
1050LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" 1036LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11"
1051if test x$rxvt_cv_rpath = xyes -o x$rxvt_cv_R = xyes; then 1037if test x$rxvt_cv_rpath = xyes -o x$rxvt_cv_R = xyes; then
1052 LIBS=`echo $LIBS | sed "$R_TRANSLATE"` 1038 LIBS=`echo $LIBS | sed "$R_TRANSLATE"`
1053fi 1039fi
1054AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, 1040AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale,
1055[AC_TRY_RUN([#include <X11/Xlib.h> 1041[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h>
1056main() { 1042main() {
1057char *p; 1043char *p;
1058if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) 1044if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p)
1059exit (XSupportsLocale() ? 0 : 1); 1045exit (XSupportsLocale() ? 0 : 1);
1060else 1046else
1061exit (1);}], dnl 1047exit (1);}]])],[dnl
1062 rxvt_cv_func_xlocale=yes, rxvt_cv_func_xlocale=no, dnl 1048 rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl
1063 AC_MSG_WARN([Define NO_XLOCALE in config.h manually]))]) 1049 AC_MSG_WARN(Define NO_XLOCALE in config.h manually)])])
1064if test x$rxvt_cv_func_xlocale = xyes; then 1050if test x$rxvt_cv_func_xlocale = xyes; then
1065 AC_DEFINE(HAVE_XLOCALE, 1, Define if Xlocale support works) 1051 AC_DEFINE(HAVE_XLOCALE, 1, Define if Xlocale support works)
1066fi 1052fi
1067 1053
1068AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale, 1054AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale,
1069[AC_TRY_LINK([#define X_LOCALE 1 1055[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1
1070#include <X11/Xlocale.h>], 1056#include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])])
1071 [setlocale(LC_CTYPE, "");],
1072 rxvt_cv_func_xsetlocale=yes, rxvt_cv_func_xsetlocale=no)])
1073if test x$rxvt_cv_func_xsetlocale = xyes; then 1057if test x$rxvt_cv_func_xsetlocale = xyes; then
1074 AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works) 1058 AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works)
1075fi 1059fi
1076LIBS=$ac_save_LIBS 1060LIBS=$ac_save_LIBS
1077CFLAGS=$ac_save_CFLAGS 1061CFLAGS=$ac_save_CFLAGS
1078 1062
1079AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale, 1063AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale,
1080[AC_TRY_LINK([#include <clocale>], 1064[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <clocale>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_setlocale=yes],[rxvt_cv_func_setlocale=no])])
1081 [setlocale(LC_CTYPE, "");],
1082 rxvt_cv_func_setlocale=yes, rxvt_cv_func_setlocale=no)])
1083if test x$rxvt_cv_func_setlocale = xyes; then 1065if test x$rxvt_cv_func_setlocale = xyes; then
1084 AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works) 1066 AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works)
1085fi 1067fi
1086 1068
1087AC_CACHE_CHECK(for working nl_langinfo, rxvt_cv_func_nl_langinfo, 1069AC_CACHE_CHECK(for working nl_langinfo, rxvt_cv_func_nl_langinfo,
1088[AC_TRY_LINK([#include <langinfo.h>], 1070[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]], [[nl_langinfo(CODESET);]])],[rxvt_cv_func_nl_langinfo=yes],[rxvt_cv_func_nl_langinfo=no])])
1089 [nl_langinfo(CODESET);],
1090 rxvt_cv_func_nl_langinfo=yes, rxvt_cv_func_nl_langinfo=no)])
1091if test x$rxvt_cv_func_nl_langinfo = xyes; then 1071if test x$rxvt_cv_func_nl_langinfo = xyes; then
1092 AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works) 1072 AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works)
1093fi 1073fi
1094 1074
1095AC_CACHE_CHECK(for broken XIM callback, rxvt_broken_ximcb, 1075AC_CACHE_CHECK(for broken XIM callback, rxvt_broken_ximcb,
1107if test x$rxvt_broken_ximcb = xyes; then 1087if test x$rxvt_broken_ximcb = xyes; then
1108 AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.) 1088 AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.)
1109fi 1089fi
1110 1090
1111AC_CACHE_CHECK(for getpt, rxvt_cv_func_getpt, 1091AC_CACHE_CHECK(for getpt, rxvt_cv_func_getpt,
1112[AC_TRY_LINK([#define _GNU_SOURCE 1092[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE
1113#ifdef HAVE_STDLIB_H 1093#ifdef HAVE_STDLIB_H
1114# include <cstdlib> 1094# include <cstdlib>
1115#endif], 1095#endif]], [[(void)getpt();]])],[rxvt_cv_func_getpt=yes],[rxvt_cv_func_getpt=no])])
1116 [(void)getpt();],
1117 rxvt_cv_func_getpt=yes, rxvt_cv_func_getpt=no)])
1118if test x$rxvt_cv_func_getpt = xyes; then 1096if test x$rxvt_cv_func_getpt = xyes; then
1119 AC_DEFINE(HAVE_GETPT, 1, Define if you have _GNU_SOURCE getpt() ) 1097 AC_DEFINE(HAVE_GETPT, 1, Define if you have _GNU_SOURCE getpt() )
1120fi 1098fi
1121 1099
1122dnl# if we don't guess right then it's up to the user 1100dnl# if we don't guess right then it's up to the user
1180if test x$rxvt_cv_ptys = xBSD -o x$rxvt_cv_ptys = xHPUX -o x$rxvt_cv_ptys = xGLIBC; then 1158if test x$rxvt_cv_ptys = xBSD -o x$rxvt_cv_ptys = xHPUX -o x$rxvt_cv_ptys = xGLIBC; then
1181 AC_DEFINE(PTYS_ARE_SEARCHED, 1, Define for this pty type) 1159 AC_DEFINE(PTYS_ARE_SEARCHED, 1, Define for this pty type)
1182fi 1160fi
1183 1161
1184 1162
1185AC_CHECKING(for pty ranges) 1163AS_MESSAGE(checking for pty ranges...)
1186ptys=`echo /dev/pty??` 1164ptys=`echo /dev/pty??`
1187pch1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'` 1165pch1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
1188pch2=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'` 1166pch2=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
1189if test x$pch1 != x; then 1167if test x$pch1 != x; then
1190 AC_DEFINE_UNQUOTED(PTYCHAR1, "$pch1", Define for first char in devptyXX) 1168 AC_DEFINE_UNQUOTED(PTYCHAR1, "$pch1", Define for first char in devptyXX)
1194fi 1172fi
1195 1173
1196dnl# -------------------------------------------------------------------------- 1174dnl# --------------------------------------------------------------------------
1197dnl# now add and remove other stuff 1175dnl# now add and remove other stuff
1198dnl# -------------------------------------------------------------------------- 1176dnl# --------------------------------------------------------------------------
1177if test x$support_iso14755 = xyes; then
1178 AC_DEFINE(ISO_14755, 1, Define if you want ISO 14755 extended support)
1179fi
1199if test x$support_8bitctrls = xyes; then 1180if test x$support_8bitctrls = xyes; then
1200 AC_DEFINE(EIGHT_BIT_CONTROLS, 1, Define if you want 8 bit control sequences) 1181 AC_DEFINE(EIGHT_BIT_CONTROLS, 1, Define if you want 8 bit control sequences)
1201fi 1182fi
1202if test x$support_fading = xyes; then 1183if test x$support_fading = xyes; then
1203 AC_DEFINE(OFF_FOCUS_FADING, 1, Define if you want faded colors when focus is lost) 1184 AC_DEFINE(OFF_FOCUS_FADING, 1, Define if you want faded colors when focus is lost)
1215 AC_DEFINE(SELECTION_SCROLLING, 1, Define to allow scrolling when the selection moves to the top or bottom of the screen) 1196 AC_DEFINE(SELECTION_SCROLLING, 1, Define to allow scrolling when the selection moves to the top or bottom of the screen)
1216fi 1197fi
1217if test x$support_menubar = xyes; then 1198if test x$support_menubar = xyes; then
1218 AC_DEFINE(MENUBAR, 1, Define if you want Menubar support) 1199 AC_DEFINE(MENUBAR, 1, Define if you want Menubar support)
1219fi 1200fi
1220if test x$support_frills = xno; then 1201if test x$support_frills = xyes; then
1221 AC_DEFINE(NO_FRILLS, 1, Define if you don't want handling for rarely used features) 1202 AC_DEFINE(ENABLE_FRILLS, 1, Define if you want handling for rarely used but handy features)
1222fi 1203fi
1223if test x$support_linespace = xno; then 1204if test x$support_linespace = xno; then
1224 AC_DEFINE(NO_LINESPACE, 1, Define if you don't want support linespace) 1205 AC_DEFINE(NO_LINESPACE, 1, Define if you don't want support linespace)
1225fi 1206fi
1226if test x$support_24bit = xyes; then 1207if test x$support_24bit = xyes; then
1281 AC_DEFINE(ENABLE_COMBINING, 1, Define if you want to automatically compose combining characters) 1262 AC_DEFINE(ENABLE_COMBINING, 1, Define if you want to automatically compose combining characters)
1282fi 1263fi
1283if test x$codesets = xall; then 1264if test x$codesets = xall; then
1284 codesets=jp,jp-ext,kr,cn,cn-ext 1265 codesets=jp,jp-ext,kr,cn,cn-ext
1285fi 1266fi
1267AC_DEFINE(ENCODING_EU, 1, Define if you want european extended codesets)
1268AC_DEFINE(ENCODING_VN, 1, Define if you want vietnamese codesets)
1286for codeset in `echo $codesets | tr "[a-z,\\-]" "[A-Z _]"`; do 1269for codeset in `echo $codesets | tr "[a-z,\\-]" "[A-Z _]"`; do
1287 AC_DEFINE(ENCODING_EU, 1, Define if you want european extended codesets)
1288 AC_DEFINE(ENCODING_VN, 1, Define if you want vietnamese codesets)
1289 case "$codeset" in 1270 case "$codeset" in
1290 JP ) AC_DEFINE(ENCODING_JP, 1, Define if you want japanese codesets) ;; 1271 JP ) AC_DEFINE(ENCODING_JP, 1, Define if you want japanese codesets) ;;
1291 JP_EXT ) AC_DEFINE(ENCODING_JP_EXT, 1, Define if you want extended japanese codesets) ;; 1272 JP_EXT ) AC_DEFINE(ENCODING_JP_EXT, 1, Define if you want extended japanese codesets) ;;
1292 KR ) AC_DEFINE(ENCODING_KR, 1, Define if you want korean codesets) ;; 1273 KR ) AC_DEFINE(ENCODING_KR, 1, Define if you want korean codesets) ;;
1293 CN ) AC_DEFINE(ENCODING_CN, 1, Define if you want chinese codesets) ;; 1274 CN ) AC_DEFINE(ENCODING_CN, 1, Define if you want chinese codesets) ;;
1367 if test x$support_xft = xyes; then 1348 if test x$support_xft = xyes; then
1368 AC_DEFINE(XFT, 1, Define to enable xft support) 1349 AC_DEFINE(XFT, 1, Define to enable xft support)
1369 fi 1350 fi
1370fi 1351fi
1371 1352
1372AC_OUTPUT(autoconf/Make.common \ 1353AC_CONFIG_FILES([autoconf/Make.common \
1373Makefile \ 1354Makefile \
1374doc/Makefile \ 1355doc/Makefile \
1375src/Makefile \ 1356src/Makefile \
1376src/test/Makefile \ 1357src/test/Makefile \
1377src/rxvtlib.h \ 1358src/rxvtlib.h \
1378W11/Makefile \ 1359W11/Makefile \
1379) 1360])
1361AC_OUTPUT
1380 1362
1381echo "Configuration: 1363echo "Configuration:
1382 1364
1383 Rxvt version: $VERSION : $DATE 1365 Rxvt version: $VERSION : $DATE
1384 Source code location: $srcdir 1366 Source code location: $srcdir

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines