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.29 by root, Fri Jul 30 15:06:49 2004 UTC vs.
Revision 1.31 by root, Tue Aug 10 22:36:30 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
510 511
511AC_HEADER_TIME 512AC_HEADER_TIME
512 513
513dnl# check to allow both <termios.h> and <sys/ioctl.h> 514dnl# 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, 515AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl,
515[AC_TRY_COMPILE([#include <stdio.h> 516[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
516#include <sys/ioctl.h> 517#include <sys/ioctl.h>
517#ifdef HAVE_TERMIOS_H 518#ifdef HAVE_TERMIOS_H
518#include <termios.h> 519#include <termios.h>
519#endif], [int a = ECHO;], rxvt_cv_header_sysioctl=yes, rxvt_cv_header_sysioctl=no)]) 520#endif]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])])
520 521
521dnl# ELF systems may want to store paths for dynamic libraries. 522dnl# ELF systems may want to store paths for dynamic libraries.
522dnl# Lets see if the compiler can accept "-Rpath" or "-Wl,-Rpath" 523dnl# 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. 524dnl# At least one version of SunOS wants "-R path" but it's not checked yet.
524if test -n "$GCC"; then 525if test -n "$GCC"; then
533ac_save_CFLAGS=$CFLAGS 534ac_save_CFLAGS=$CFLAGS
534ac_save_LIBS=$LIBS 535ac_save_LIBS=$LIBS
535CFLAGS="$CFLAGS $X_CFLAGS" 536CFLAGS="$CFLAGS $X_CFLAGS"
536LIBS=`echo "$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"` 537LIBS=`echo "$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"`
537AC_CACHE_CHECK([for -rpath dynamic library path recording], rxvt_cv_rpath, 538AC_CACHE_CHECK([for -rpath dynamic library path recording], rxvt_cv_rpath,
538[AC_TRY_RUN([ 539[AC_RUN_IFELSE([AC_LANG_SOURCE([[
539main() 540main()
540{ 541{
541 exit(0); 542 exit(0);
542 (void) XOpenDisplay("foobar"); 543 (void) XOpenDisplay("foobar");
543}], rxvt_cv_rpath=yes, rxvt_cv_rpath=no, dnl 544}]])],[rxvt_cv_rpath=yes],[rxvt_cv_rpath=no],[dnl
544 AC_MSG_WARN([You may need to check the LIBS line]))]) 545 AC_MSG_WARN(You may need to check the LIBS line)])])
545if test x$rxvt_cv_rpath != xyes; then 546if test x$rxvt_cv_rpath != xyes; then
546 changequote(, )dnl 547 changequote(, )dnl
547 R_TRANSLATE='s/-L\([^ ]*\)/-L\1 '$LDARG'-R\1/g' 548 R_TRANSLATE='s/-L\([^ ]*\)/-L\1 '$LDARG'-R\1/g'
548 changequote([, ])dnl 549 changequote([, ])dnl
549 LIBS=`echo "$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"` 550 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, 551 AC_CACHE_CHECK([for -R dynamic library path recording], rxvt_cv_R,
551[AC_TRY_RUN([ 552[AC_RUN_IFELSE([AC_LANG_SOURCE([[
552main() 553main()
553{ 554{
554 exit(0); 555 exit(0);
555 (void) XOpenDisplay("foobar"); 556 (void) XOpenDisplay("foobar");
556}], rxvt_cv_R=yes, rxvt_cv_R=no, rxvt_cv_R=no)]) 557}]])],[rxvt_cv_R=yes],[rxvt_cv_R=no],[rxvt_cv_R=no])])
557 if test x$rxvt_cv_R != xyes; then 558 if test x$rxvt_cv_R != xyes; then
558 LIBS="$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" 559 LIBS="$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11"
559 fi 560 fi
560fi 561fi
561 562
562AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, 563AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer,
563[AC_TRY_COMPILE([#include <X11/Xlib.h>], [XPointer dummy;], 564[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 565if test x$rxvt_cv_xpointer = xyes; then
566 AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) 566 AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef)
567fi 567fi
568LIBS=$ac_save_LIBS 568LIBS=$ac_save_LIBS
569CFLAGS=$ac_save_CFLAGS 569CFLAGS=$ac_save_CFLAGS
593AC_CHECK_SIZEOF(int *, 4) 593AC_CHECK_SIZEOF(int *, 4)
594 594
595dnl# see usage below 595dnl# see usage below
596AC_DEFUN(RXVT_CHECK_SIZE, 596AC_DEFUN(RXVT_CHECK_SIZE,
597 [AC_CACHE_CHECK([for $2], $1, 597 [AC_CACHE_CHECK([for $2], $1,
598 [AC_TRY_COMPILE([#include <stdint.h>], $2 dummy;, 598 [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 599if test $ac_cv_sizeof_char -ge $3; then
602 $1="$4 char" 600 $1="$4 char"
603else 601else
604 if test $ac_cv_sizeof_short -ge $3; then 602 if test $ac_cv_sizeof_short -ge $3; then
605 $1="$4 short" 603 $1="$4 short"
707dnl# check for host field in utmp structure 705dnl# check for host field in utmp structure
708 706
709dnl# -------------------------------------------- 707dnl# --------------------------------------------
710AC_CHECK_HEADER(utmp.h, 708AC_CHECK_HEADER(utmp.h,
711[AC_CACHE_CHECK([for struct utmp], rxvt_cv_struct_utmp, 709[AC_CACHE_CHECK([for struct utmp], rxvt_cv_struct_utmp,
712[AC_TRY_COMPILE([#include <sys/types.h> 710[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
713#include <stdint.h> 711#include <stdint.h>
714#include <utmp.h>], 712#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 713if test x$rxvt_cv_struct_utmp = xyes; then
718 AC_DEFINE(HAVE_STRUCT_UTMP, 1, Define if utmp.h has struct utmp) 714 AC_DEFINE(HAVE_STRUCT_UTMP, 1, Define if utmp.h has struct utmp)
719fi 715fi
720] 716]
721 717
722AC_CACHE_CHECK(for ut_host in utmp struct, rxvt_cv_struct_utmp_host, 718AC_CACHE_CHECK(for ut_host in utmp struct, rxvt_cv_struct_utmp_host,
723[AC_TRY_COMPILE([#include <sys/types.h> 719[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
724#include <utmp.h>], 720#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 721if test x$rxvt_cv_struct_utmp_host = xyes; then
728 AC_DEFINE(HAVE_UTMP_HOST, 1, Define if struct utmp contains ut_host) 722 AC_DEFINE(HAVE_UTMP_HOST, 1, Define if struct utmp contains ut_host)
729fi 723fi
730 724
731AC_CACHE_CHECK(for ut_pid in utmp struct, rxvt_cv_struct_utmp_pid, 725AC_CACHE_CHECK(for ut_pid in utmp struct, rxvt_cv_struct_utmp_pid,
732[AC_TRY_COMPILE([#include <sys/types.h> 726[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
733#include <utmp.h>], 727#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 728if test x$rxvt_cv_struct_utmp_pid = xyes; then
737 AC_DEFINE(HAVE_UTMP_PID, 1, Define if struct utmp contains ut_pid) 729 AC_DEFINE(HAVE_UTMP_PID, 1, Define if struct utmp contains ut_pid)
738fi 730fi
739) dnl# AC_CHECK_HEADER(utmp.h 731) dnl# AC_CHECK_HEADER(utmp.h
740 732
741dnl# -------------------------------------------- 733dnl# --------------------------------------------
742 734
743AC_CHECK_HEADER(utmpx.h, 735AC_CHECK_HEADER(utmpx.h,
744[AC_CACHE_CHECK([for struct utmpx], rxvt_cv_struct_utmpx, 736[AC_CACHE_CHECK([for struct utmpx], rxvt_cv_struct_utmpx,
745[AC_TRY_COMPILE([#include <sys/types.h> 737[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
746#include <utmpx.h>], 738#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 739if test x$rxvt_cv_struct_utmpx = xyes; then
750 AC_DEFINE(HAVE_STRUCT_UTMPX, 1, Define if utmpx.h has struct utmpx) 740 AC_DEFINE(HAVE_STRUCT_UTMPX, 1, Define if utmpx.h has struct utmpx)
751fi 741fi
752] 742]
753 743
754AC_CACHE_CHECK(for host in utmpx struct, rxvt_cv_struct_utmpx_host, 744AC_CACHE_CHECK(for host in utmpx struct, rxvt_cv_struct_utmpx_host,
755[AC_TRY_COMPILE([#include <sys/types.h> 745[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
756#include <utmpx.h>], 746#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 747if test x$rxvt_cv_struct_utmpx_host = xyes; then
760 AC_DEFINE(HAVE_UTMPX_HOST, 1, Define if struct utmpx contains ut_host) 748 AC_DEFINE(HAVE_UTMPX_HOST, 1, Define if struct utmpx contains ut_host)
761fi 749fi
762) dnl# AC_CHECK_HEADER(utmpx.h 750) dnl# AC_CHECK_HEADER(utmpx.h
763 751
764 752
765dnl# -------------------------------------------------------------------------- 753dnl# --------------------------------------------------------------------------
766dnl# check for struct lastlog 754dnl# check for struct lastlog
767AC_CACHE_CHECK(for struct lastlog, rxvt_cv_struct_lastlog, 755AC_CACHE_CHECK(for struct lastlog, rxvt_cv_struct_lastlog,
768[AC_TRY_COMPILE([#include <sys/types.h> 756[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
769#include <utmp.h> 757#include <utmp.h>
770#ifdef HAVE_LASTLOG_H 758#ifdef HAVE_LASTLOG_H
771#include <lastlog.h> 759#include <lastlog.h>
772#endif 760#endif
773],
774[struct lastlog ll;],
775rxvt_cv_struct_lastlog=yes, rxvt_cv_struct_lastlog=no)]) 761]], [[struct lastlog ll;]])],[rxvt_cv_struct_lastlog=yes],[rxvt_cv_struct_lastlog=no])])
776if test x$rxvt_cv_struct_lastlog = xyes; then 762if 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) 763 AC_DEFINE(HAVE_STRUCT_LASTLOG, 1, Define if utmp.h or lastlog.h has struct lastlog)
778fi 764fi
779 765
780dnl# check for struct lastlogx 766dnl# check for struct lastlogx
781AC_CACHE_CHECK(for struct lastlogx, rxvt_cv_struct_lastlogx, 767AC_CACHE_CHECK(for struct lastlogx, rxvt_cv_struct_lastlogx,
782[AC_TRY_COMPILE([#include <sys/types.h> 768[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
783#include <utmpx.h> 769#include <utmpx.h>
784#ifdef HAVE_LASTLOG_H 770#ifdef HAVE_LASTLOG_H
785#include <lastlog.h> 771#include <lastlog.h>
786#endif 772#endif
787],
788[struct lastlogx ll;],
789rxvt_cv_struct_lastlogx=yes, rxvt_cv_struct_lastlogx=no)]) 773]], [[struct lastlogx ll;]])],[rxvt_cv_struct_lastlogx=yes],[rxvt_cv_struct_lastlogx=no])])
790if test x$rxvt_cv_struct_lastlogx = xyes; then 774if 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) 775 AC_DEFINE(HAVE_STRUCT_LASTLOGX, 1, Define if utmpx.h or lastlog.h has struct lastlogx)
792fi 776fi
793 777
794dnl# -------------------------------------------------------------------------- 778dnl# --------------------------------------------------------------------------
795dnl# FIND FILES 779dnl# FIND FILES
796dnl# -------------------------------------------------------------------------- 780dnl# --------------------------------------------------------------------------
797 781
798dnl# find utmp 782dnl# find utmp
799AC_CACHE_CHECK(where utmp is located, rxvt_cv_path_utmp, 783AC_CACHE_CHECK(where utmp is located, rxvt_cv_path_utmp,
800[AC_TRY_RUN([#include <stdio.h> 784[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
801#include <sys/types.h> 785#include <sys/types.h>
802#include <utmp.h> 786#include <utmp.h>
803#include <errno.h> 787#include <errno.h>
804main() 788main()
805{ 789{
820 fprintf(f, "%s\n", *u); 804 fprintf(f, "%s\n", *u);
821 exit(0); 805 exit(0);
822 } 806 }
823 } 807 }
824 exit(0); 808 exit(0);
825}], rxvt_cv_path_utmp=`cat conftestval`, rxvt_cv_path_utmp=, dnl 809}]])],[rxvt_cv_path_utmp=`cat conftestval`],[rxvt_cv_path_utmp=],[dnl
826 AC_MSG_WARN([Define RXVT_UTMP_FILE in config.h manually]))]) 810 AC_MSG_WARN(Define RXVT_UTMP_FILE in config.h manually)])])
827if test x$rxvt_cv_path_utmp != x; then 811if test x$rxvt_cv_path_utmp != x; then
828 AC_DEFINE_UNQUOTED(RXVT_UTMP_FILE, "$rxvt_cv_path_utmp", Define location of utmp) 812 AC_DEFINE_UNQUOTED(RXVT_UTMP_FILE, "$rxvt_cv_path_utmp", Define location of utmp)
829fi 813fi
830 814
831dnl# -------------------------------------------------------------------------- 815dnl# --------------------------------------------------------------------------
832 816
833dnl# find utmpx - if a utmp file exists at the same location and is more than 817dnl# 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. 818dnl# a day newer, then dump the utmpx. People leave lots of junk around.
835AC_CACHE_CHECK(where utmpx is located, rxvt_cv_path_utmpx, 819AC_CACHE_CHECK(where utmpx is located, rxvt_cv_path_utmpx,
836[AC_TRY_RUN([#include <stdio.h> 820[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
837#include <sys/types.h> 821#include <sys/types.h>
838#include <utmpx.h> 822#include <utmpx.h>
839#include <errno.h> 823#include <errno.h>
840#include <sys/stat.h> 824#include <sys/stat.h>
841#ifdef HAVE_STRING_H 825#ifdef HAVE_STRING_H
866 fprintf(f, "%s\n", *u); 850 fprintf(f, "%s\n", *u);
867 exit(0); 851 exit(0);
868 } 852 }
869 } 853 }
870 exit(0); 854 exit(0);
871}], rxvt_cv_path_utmpx=`cat conftestval`, rxvt_cv_path_utmpx=, dnl 855}]])],[rxvt_cv_path_utmpx=`cat conftestval`],[rxvt_cv_path_utmpx=],[dnl
872 AC_MSG_WARN([Define RXVT_UTMPX_FILE in config.h manually]))]) 856 AC_MSG_WARN(Define RXVT_UTMPX_FILE in config.h manually)])])
873if test x$rxvt_cv_path_utmpx != x; then 857if test x$rxvt_cv_path_utmpx != x; then
874 AC_DEFINE_UNQUOTED(RXVT_UTMPX_FILE, "$rxvt_cv_path_utmpx", Define location of utmpx) 858 AC_DEFINE_UNQUOTED(RXVT_UTMPX_FILE, "$rxvt_cv_path_utmpx", Define location of utmpx)
875fi 859fi
876 860
877dnl# -------------------------------------------------------------------------- 861dnl# --------------------------------------------------------------------------
878 862
879dnl# find wtmp 863dnl# find wtmp
880AC_CACHE_CHECK(where wtmp is located, rxvt_cv_path_wtmp, 864AC_CACHE_CHECK(where wtmp is located, rxvt_cv_path_wtmp,
881[AC_TRY_RUN([#include <stdio.h> 865[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
882#include <sys/types.h> 866#include <sys/types.h>
883#ifdef HAVE_UTMP_H 867#ifdef HAVE_UTMP_H
884#include <utmp.h> 868#include <utmp.h>
885#endif 869#endif
886#include <errno.h> 870#include <errno.h>
903 fprintf(f, "%s\n", *w); 887 fprintf(f, "%s\n", *w);
904 exit(0); 888 exit(0);
905 } 889 }
906 } 890 }
907 exit(0); 891 exit(0);
908}], rxvt_cv_path_wtmp=`cat conftestval`, rxvt_cv_path_wtmp=, dnl 892}]])],[rxvt_cv_path_wtmp=`cat conftestval`],[rxvt_cv_path_wtmp=],[dnl
909 AC_MSG_WARN([Define RXVT_WTMP_FILE in config.h manually]))]) 893 AC_MSG_WARN(Define RXVT_WTMP_FILE in config.h manually)])])
910if test x$rxvt_cv_path_wtmp != x; then 894if test x$rxvt_cv_path_wtmp != x; then
911 AC_DEFINE_UNQUOTED(RXVT_WTMP_FILE, "$rxvt_cv_path_wtmp", Define location of wtmp) 895 AC_DEFINE_UNQUOTED(RXVT_WTMP_FILE, "$rxvt_cv_path_wtmp", Define location of wtmp)
912fi 896fi
913dnl# -------------------------------------------------------------------------- 897dnl# --------------------------------------------------------------------------
914 898
915dnl# find wtmpx 899dnl# find wtmpx
916AC_CACHE_CHECK(where wtmpx is located, rxvt_cv_path_wtmpx, 900AC_CACHE_CHECK(where wtmpx is located, rxvt_cv_path_wtmpx,
917[AC_TRY_RUN([#include <stdio.h> 901[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
918#ifdef HAVE_UTMPX_H 902#ifdef HAVE_UTMPX_H
919#include <utmpx.h> 903#include <utmpx.h>
920#endif 904#endif
921#include <errno.h> 905#include <errno.h>
922main() 906main()
938 fprintf(f, "%s\n", *w); 922 fprintf(f, "%s\n", *w);
939 exit(0); 923 exit(0);
940 } 924 }
941 } 925 }
942 exit(0); 926 exit(0);
943}], rxvt_cv_path_wtmpx=`cat conftestval`, rxvt_cv_path_wtmpx=, dnl 927}]])],[rxvt_cv_path_wtmpx=`cat conftestval`],[rxvt_cv_path_wtmpx=],[dnl
944 AC_MSG_WARN([Define RXVT_WTMPX_FILE in config.h manually]))]) 928 AC_MSG_WARN(Define RXVT_WTMPX_FILE in config.h manually)])])
945if test x$rxvt_cv_path_wtmpx != x; then 929if test x$rxvt_cv_path_wtmpx != x; then
946 AC_DEFINE_UNQUOTED(RXVT_WTMPX_FILE, "$rxvt_cv_path_wtmpx", Define location of wtmpx) 930 AC_DEFINE_UNQUOTED(RXVT_WTMPX_FILE, "$rxvt_cv_path_wtmpx", Define location of wtmpx)
947fi 931fi
948dnl# -------------------------------------------------------------------------- 932dnl# --------------------------------------------------------------------------
949 933
950dnl# find lastlog 934dnl# find lastlog
951AC_CACHE_CHECK(where lastlog is located, rxvt_cv_path_lastlog, 935AC_CACHE_CHECK(where lastlog is located, rxvt_cv_path_lastlog,
952[AC_TRY_RUN([#include <stdio.h> 936[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
953#include <sys/types.h> 937#include <sys/types.h>
954#ifdef HAVE_UTMPX_H 938#ifdef HAVE_UTMPX_H
955#include <utmpx.h> 939#include <utmpx.h>
956#elif defined(HAVE_UTMP_H) 940#elif defined(HAVE_UTMP_H)
957#include <utmp.h> 941#include <utmp.h>
978 fprintf(f, "%s\n", *w); 962 fprintf(f, "%s\n", *w);
979 exit(0); 963 exit(0);
980 } 964 }
981 } 965 }
982 exit(0); 966 exit(0);
983}], rxvt_cv_path_lastlog=`cat conftestval`, rxvt_cv_path_lastlog=, dnl 967}]])],[rxvt_cv_path_lastlog=`cat conftestval`],[rxvt_cv_path_lastlog=],[dnl
984 AC_MSG_WARN([Define RXVT_LASTLOG_FILE in config.h manually]))]) 968 AC_MSG_WARN(Define RXVT_LASTLOG_FILE in config.h manually)])])
985if test x$rxvt_cv_path_lastlog != x; then 969if test x$rxvt_cv_path_lastlog != x; then
986 AC_DEFINE_UNQUOTED(RXVT_LASTLOG_FILE, "$rxvt_cv_path_lastlog", Define location of lastlog) 970 AC_DEFINE_UNQUOTED(RXVT_LASTLOG_FILE, "$rxvt_cv_path_lastlog", Define location of lastlog)
987 if test -d "$rxvt_cv_path_lastlog"; then 971 if test -d "$rxvt_cv_path_lastlog"; then
988 AC_DEFINE(LASTLOG_IS_DIR, 1, Define if lastlog is provided via a directory) 972 AC_DEFINE(LASTLOG_IS_DIR, 1, Define if lastlog is provided via a directory)
989 fi 973 fi
990fi 974fi
991dnl# -------------------------------------------------------------------------- 975dnl# --------------------------------------------------------------------------
992 976
993dnl# find lastlogx 977dnl# find lastlogx
994AC_CACHE_CHECK(where lastlogx is located, rxvt_cv_path_lastlogx, 978AC_CACHE_CHECK(where lastlogx is located, rxvt_cv_path_lastlogx,
995[AC_TRY_RUN([#include <stdio.h> 979[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
996#ifdef HAVE_UTMPX_H 980#ifdef HAVE_UTMPX_H
997#include <utmpx.h> 981#include <utmpx.h>
998#endif 982#endif
999#include <errno.h> 983#include <errno.h>
1000main() 984main()
1015 fprintf(f, "%s\n", *w); 999 fprintf(f, "%s\n", *w);
1016 exit(0); 1000 exit(0);
1017 } 1001 }
1018 } 1002 }
1019 exit(0); 1003 exit(0);
1020}], rxvt_cv_path_lastlogx=`cat conftestval`, rxvt_cv_path_lastlogx=, dnl 1004}]])],[rxvt_cv_path_lastlogx=`cat conftestval`],[rxvt_cv_path_lastlogx=],[dnl
1021 AC_MSG_WARN([Define RXVT_LASTLOGX_FILE in config.h manually]))]) 1005 AC_MSG_WARN(Define RXVT_LASTLOGX_FILE in config.h manually)])])
1022if test x$rxvt_cv_path_lastlogx != x; then 1006if test x$rxvt_cv_path_lastlogx != x; then
1023 AC_DEFINE_UNQUOTED(RXVT_LASTLOGX_FILE, "$rxvt_cv_path_lastlogx", Define location of lastlogx) 1007 AC_DEFINE_UNQUOTED(RXVT_LASTLOGX_FILE, "$rxvt_cv_path_lastlogx", Define location of lastlogx)
1024fi 1008fi
1025 1009
1026dnl# -------------------------------------------------------------------------- 1010dnl# --------------------------------------------------------------------------
1050LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" 1034LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11"
1051if test x$rxvt_cv_rpath = xyes -o x$rxvt_cv_R = xyes; then 1035if test x$rxvt_cv_rpath = xyes -o x$rxvt_cv_R = xyes; then
1052 LIBS=`echo $LIBS | sed "$R_TRANSLATE"` 1036 LIBS=`echo $LIBS | sed "$R_TRANSLATE"`
1053fi 1037fi
1054AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, 1038AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale,
1055[AC_TRY_RUN([#include <X11/Xlib.h> 1039[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h>
1056main() { 1040main() {
1057char *p; 1041char *p;
1058if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) 1042if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p)
1059exit (XSupportsLocale() ? 0 : 1); 1043exit (XSupportsLocale() ? 0 : 1);
1060else 1044else
1061exit (1);}], dnl 1045exit (1);}]])],[dnl
1062 rxvt_cv_func_xlocale=yes, rxvt_cv_func_xlocale=no, dnl 1046 rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl
1063 AC_MSG_WARN([Define NO_XLOCALE in config.h manually]))]) 1047 AC_MSG_WARN(Define NO_XLOCALE in config.h manually)])])
1064if test x$rxvt_cv_func_xlocale = xyes; then 1048if test x$rxvt_cv_func_xlocale = xyes; then
1065 AC_DEFINE(HAVE_XLOCALE, 1, Define if Xlocale support works) 1049 AC_DEFINE(HAVE_XLOCALE, 1, Define if Xlocale support works)
1066fi 1050fi
1067 1051
1068AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale, 1052AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale,
1069[AC_TRY_LINK([#define X_LOCALE 1 1053[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1
1070#include <X11/Xlocale.h>], 1054#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 1055if test x$rxvt_cv_func_xsetlocale = xyes; then
1074 AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works) 1056 AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works)
1075fi 1057fi
1076LIBS=$ac_save_LIBS 1058LIBS=$ac_save_LIBS
1077CFLAGS=$ac_save_CFLAGS 1059CFLAGS=$ac_save_CFLAGS
1078 1060
1079AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale, 1061AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale,
1080[AC_TRY_LINK([#include <clocale>], 1062[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 1063if test x$rxvt_cv_func_setlocale = xyes; then
1084 AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works) 1064 AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works)
1085fi 1065fi
1086 1066
1087AC_CACHE_CHECK(for working nl_langinfo, rxvt_cv_func_nl_langinfo, 1067AC_CACHE_CHECK(for working nl_langinfo, rxvt_cv_func_nl_langinfo,
1088[AC_TRY_LINK([#include <langinfo.h>], 1068[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 1069if test x$rxvt_cv_func_nl_langinfo = xyes; then
1092 AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works) 1070 AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works)
1093fi 1071fi
1094 1072
1073AC_CACHE_CHECK(for broken XIM callback, rxvt_broken_ximcb,
1074[AC_COMPILE_IFELSE([
1075#include <X11/Xlib.h>
1076
1077void im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3);
1078
1079void f() {
1080 XIMCallback cb;
1081 cb.callback = im_destroy_cb;
1082}
1083],rxvt_broken_ximcb=yes,rxvt_broken_ximcb=no)])
1084
1085if test x$rxvt_broken_ximcb = xyes; then
1086 AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.)
1087fi
1088
1095AC_CACHE_CHECK(for getpt, rxvt_cv_func_getpt, 1089AC_CACHE_CHECK(for getpt, rxvt_cv_func_getpt,
1096[AC_TRY_LINK([#define _GNU_SOURCE 1090[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE
1097#ifdef HAVE_STDLIB_H 1091#ifdef HAVE_STDLIB_H
1098# include <cstdlib> 1092# include <cstdlib>
1099#endif], 1093#endif]], [[(void)getpt();]])],[rxvt_cv_func_getpt=yes],[rxvt_cv_func_getpt=no])])
1100 [(void)getpt();],
1101 rxvt_cv_func_getpt=yes, rxvt_cv_func_getpt=no)])
1102if test x$rxvt_cv_func_getpt = xyes; then 1094if test x$rxvt_cv_func_getpt = xyes; then
1103 AC_DEFINE(HAVE_GETPT, 1, Define if you have _GNU_SOURCE getpt() ) 1095 AC_DEFINE(HAVE_GETPT, 1, Define if you have _GNU_SOURCE getpt() )
1104fi 1096fi
1105 1097
1106dnl# if we don't guess right then it's up to the user 1098dnl# if we don't guess right then it's up to the user
1164if test x$rxvt_cv_ptys = xBSD -o x$rxvt_cv_ptys = xHPUX -o x$rxvt_cv_ptys = xGLIBC; then 1156if test x$rxvt_cv_ptys = xBSD -o x$rxvt_cv_ptys = xHPUX -o x$rxvt_cv_ptys = xGLIBC; then
1165 AC_DEFINE(PTYS_ARE_SEARCHED, 1, Define for this pty type) 1157 AC_DEFINE(PTYS_ARE_SEARCHED, 1, Define for this pty type)
1166fi 1158fi
1167 1159
1168 1160
1169AC_CHECKING(for pty ranges) 1161AS_MESSAGE(checking for pty ranges...)
1170ptys=`echo /dev/pty??` 1162ptys=`echo /dev/pty??`
1171pch1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'` 1163pch1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
1172pch2=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'` 1164pch2=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
1173if test x$pch1 != x; then 1165if test x$pch1 != x; then
1174 AC_DEFINE_UNQUOTED(PTYCHAR1, "$pch1", Define for first char in devptyXX) 1166 AC_DEFINE_UNQUOTED(PTYCHAR1, "$pch1", Define for first char in devptyXX)
1351 if test x$support_xft = xyes; then 1343 if test x$support_xft = xyes; then
1352 AC_DEFINE(XFT, 1, Define to enable xft support) 1344 AC_DEFINE(XFT, 1, Define to enable xft support)
1353 fi 1345 fi
1354fi 1346fi
1355 1347
1356AC_OUTPUT(autoconf/Make.common \ 1348AC_CONFIG_FILES([autoconf/Make.common \
1357Makefile \ 1349Makefile \
1358doc/Makefile \ 1350doc/Makefile \
1359src/Makefile \ 1351src/Makefile \
1360src/test/Makefile \ 1352src/test/Makefile \
1361src/rxvtlib.h \ 1353src/rxvtlib.h \
1362W11/Makefile \ 1354W11/Makefile \
1363) 1355])
1356AC_OUTPUT
1364 1357
1365echo "Configuration: 1358echo "Configuration:
1366 1359
1367 Rxvt version: $VERSION : $DATE 1360 Rxvt version: $VERSION : $DATE
1368 Source code location: $srcdir 1361 Source code location: $srcdir

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines