… | |
… | |
74 | |
74 | |
75 | AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.) |
75 | AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.) |
76 | |
76 | |
77 | case $host in |
77 | case $host in |
78 | *-*-solaris* ) |
78 | *-*-solaris* ) |
79 | AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Needed to get declarations for msg_control and msg_controllen on Solaris) |
79 | AC_DEFINE(_XOPEN_SOURCE, 500, Needed to get declarations for msg_control and msg_controllen on Solaris) |
80 | AC_DEFINE(_XOPEN_SOURCE, 2, Needed to get declarations for msg_control and msg_controllen on Solaris) |
|
|
81 | AC_DEFINE(__EXTENSIONS__, 1, Needed to get declarations for msg_control and msg_controllen on Solaris) |
|
|
82 | ;; |
80 | ;; |
83 | esac |
81 | esac |
84 | |
82 | |
85 | dnl if test x$GXX = xyes; then |
83 | dnl if test x$GXX = xyes; then |
86 | dnl CXXFLAGS="$CXXFLAGS" dnl I once had -fno-exceptions, but I am using them now... |
84 | dnl CXXFLAGS="$CXXFLAGS" dnl I once had -fno-exceptions, but I am using them now... |
… | |
… | |
439 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
437 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
440 | fi]) |
438 | fi]) |
441 | |
439 | |
442 | dnl# -------------------------------------------------------------------------- |
440 | dnl# -------------------------------------------------------------------------- |
443 | |
441 | |
444 | AC_PATH_PROG(CP, cp, cp) |
|
|
445 | AC_PATH_PROG(SED, sed, sed) |
|
|
446 | AC_PATH_PROG(ECHO, echo, echo) |
|
|
447 | AC_PATH_PROG(TIC, tic) |
442 | AC_PATH_PROG(TIC, tic) |
448 | |
443 | |
449 | dnl# need a neat way to detect SVR4 or its features |
444 | dnl# need a neat way to detect SVR4 or its features |
450 | dnl# in src/command.c we use these functions: |
445 | dnl# in src/command.c we use these functions: |
451 | dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h> |
446 | dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h> |
… | |
… | |
465 | dnl# only check if we want xpm-background |
460 | dnl# only check if we want xpm-background |
466 | |
461 | |
467 | LIBAFTERIMAGE_CFLAGS= |
462 | LIBAFTERIMAGE_CFLAGS= |
468 | AFTERIMAGE_LIBS= |
463 | AFTERIMAGE_LIBS= |
469 | have_afterimage= |
464 | have_afterimage= |
|
|
465 | AFTERIMAGE_VERSION= |
470 | |
466 | |
471 | if test x$support_afterimage = xyes; then |
467 | if test x$support_afterimage = xyes; then |
472 | support_afterimage=no |
468 | support_afterimage=no |
473 | |
469 | |
474 | if test "x$afterimage_config" = "x" ; then |
470 | if test "x$afterimage_config" = "x" ; then |
475 | AC_PATH_PROG(afterimage_config, afterimage-config, no) |
471 | AC_PATH_PROG(afterimage_config, afterimage-config, no) |
476 | fi |
472 | fi |
477 | |
473 | AC_PROG_AWK |
478 | AC_MSG_CHECKING(for libAfterImage) |
474 | AC_MSG_CHECKING(for libAfterImage version >= 1.15 ) |
479 | if $afterimage_config --version >/dev/null 2>&1 ; then |
475 | AFTERIMAGE_VERSION=`$afterimage_config --version` |
|
|
476 | if test -n $AFTERIMAGE_VERSION ; then |
480 | LIBAFTERIMAGE_CFLAGS=`$afterimage_config --cflags` |
477 | LIBAFTERIMAGE_CFLAGS=`$afterimage_config --cflags` |
481 | AFTERIMAGE_LIBS=`$afterimage_config --libs` |
478 | AFTERIMAGE_LIBS=`$afterimage_config --libs` |
482 | if test "x$AFTERIMAGE_LIBS" != "x"; then |
479 | if test "x$AFTERIMAGE_LIBS" != "x"; then |
|
|
480 | libai_ver_major=`echo $AFTERIMAGE_VERSION | $AWK -F . '{print $1}'` |
|
|
481 | libai_ver_minor=`echo $AFTERIMAGE_VERSION | $AWK -F . '{print $2}'` |
|
|
482 | if test "$libai_ver_major -gt 1 -o ($libai_ver_major -eq 1 -a $libai_ver_minor -ge 15)"; then |
483 | support_afterimage=yes |
483 | support_afterimage=yes; |
|
|
484 | fi |
484 | fi |
485 | fi |
485 | fi |
486 | fi |
486 | |
487 | |
487 | if test "x$support_afterimage" = "xyes"; then |
488 | if test "x$support_afterimage" = "xyes"; then |
488 | AC_MSG_RESULT($AFTERIMAGE_LIBS) |
489 | AC_MSG_RESULT($AFTERIMAGE_LIBS) |
… | |
… | |
530 | #include <sys/ioctl.h> |
531 | #include <sys/ioctl.h> |
531 | #ifdef HAVE_TERMIOS_H |
532 | #ifdef HAVE_TERMIOS_H |
532 | #include <termios.h> |
533 | #include <termios.h> |
533 | #endif]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])]) |
534 | #endif]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])]) |
534 | |
535 | |
535 | dnl# ELF systems may want to store paths for dynamic libraries. |
|
|
536 | dnl# Lets see if the compiler can accept "-Rpath" or "-Wl,-Rpath" |
|
|
537 | dnl# At least one version of SunOS wants "-R path" but it's not checked yet. |
|
|
538 | if test -n "$GCC"; then |
|
|
539 | LDARG="-Wl," |
|
|
540 | else |
|
|
541 | LDARG="" |
|
|
542 | fi |
|
|
543 | changequote(, )dnl |
|
|
544 | R_TRANSLATE='s/-L\([^ ]*\)/-L\1 '$LDARG'-rpath '$LDARG'\1/g' |
|
|
545 | changequote([, ])dnl |
|
|
546 | |
|
|
547 | ac_save_CFLAGS=$CFLAGS |
|
|
548 | ac_save_LIBS=$LIBS |
|
|
549 | CFLAGS="$CFLAGS $X_CFLAGS" |
|
|
550 | LIBS=`echo "$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"` |
|
|
551 | AC_CACHE_CHECK([for -rpath dynamic library path recording], rxvt_cv_rpath, |
|
|
552 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
|
|
553 | #include <stdlib.h> |
|
|
554 | main() |
|
|
555 | { |
|
|
556 | exit(0); |
|
|
557 | (void) XOpenDisplay("foobar"); |
|
|
558 | }]])],[rxvt_cv_rpath=yes],[rxvt_cv_rpath=no],[dnl |
|
|
559 | AC_MSG_WARN(You may need to check the LIBS line)])]) |
|
|
560 | if test x$rxvt_cv_rpath != xyes; then |
|
|
561 | changequote(, )dnl |
|
|
562 | R_TRANSLATE='s/-L\([^ ]*\)/-L\1 '$LDARG'-R\1/g' |
|
|
563 | changequote([, ])dnl |
|
|
564 | LIBS=`echo "$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"` |
|
|
565 | AC_CACHE_CHECK([for -R dynamic library path recording], rxvt_cv_R, |
|
|
566 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
|
|
567 | #include <stdlib.h> |
|
|
568 | main() |
|
|
569 | { |
|
|
570 | exit(0); |
|
|
571 | (void) XOpenDisplay("foobar"); |
|
|
572 | }]])],[rxvt_cv_R=yes],[rxvt_cv_R=no],[rxvt_cv_R=no])]) |
|
|
573 | if test x$rxvt_cv_R != xyes; then |
|
|
574 | LIBS="$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
|
|
575 | fi |
|
|
576 | fi |
|
|
577 | |
|
|
578 | AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
536 | AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
579 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) |
537 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) |
580 | if test x$rxvt_cv_xpointer = xyes; then |
538 | if test x$rxvt_cv_xpointer = xyes; then |
581 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
539 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
582 | fi |
540 | fi |
583 | LIBS=$ac_save_LIBS |
|
|
584 | CFLAGS=$ac_save_CFLAGS |
|
|
585 | |
541 | |
586 | AC_CACHE_CHECK([for XLIB_ILLEGAL_ACCESS], rxvt_xlib_illegal_access, |
542 | AC_CACHE_CHECK([for XLIB_ILLEGAL_ACCESS], rxvt_xlib_illegal_access, |
587 | [AC_COMPILE_IFELSE( |
543 | [AC_COMPILE_IFELSE( |
588 | [AC_LANG_PROGRAM([ |
544 | [AC_LANG_PROGRAM([ |
589 | #define XLIB_ILLEGAL_ACCESS |
545 | #define XLIB_ILLEGAL_ACCESS |
… | |
… | |
729 | dnl# this is a really hack test for some basic Xlocale stuff |
685 | dnl# this is a really hack test for some basic Xlocale stuff |
730 | ac_save_LIBS=$LIBS |
686 | ac_save_LIBS=$LIBS |
731 | ac_save_CFLAGS=$CFLAGS |
687 | ac_save_CFLAGS=$CFLAGS |
732 | CFLAGS="$CFLAGS $X_CFLAGS" |
688 | CFLAGS="$CFLAGS $X_CFLAGS" |
733 | LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
689 | LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
734 | if test x$rxvt_cv_rpath = xyes -o x$rxvt_cv_R = xyes; then |
|
|
735 | LIBS=`echo $LIBS | sed "$R_TRANSLATE"` |
|
|
736 | fi |
|
|
737 | AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
690 | AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
738 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
691 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
739 | #include <stdlib.h> |
692 | #include <stdlib.h> |
740 | main() { |
693 | main() { |
741 | char *p; |
694 | char *p; |
742 | if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) |
695 | if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) |
743 | exit (XSupportsLocale() ? 0 : 1); |
696 | exit (XSupportsLocale() ? 0 : 1); |
744 | else |
697 | else |
745 | exit (1);}]])],[dnl |
698 | exit (1);}]])],[dnl |
746 | rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl |
699 | rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl |
747 | AC_MSG_WARN(Define NO_XLOCALE in config.h manually)])]) |
700 | :])]) |
|
|
701 | if test x$support_xim = xyes; then |
748 | if test x$rxvt_cv_func_xlocale = xyes; then |
702 | if test x$rxvt_cv_func_xlocale = xyes; then |
749 | AC_DEFINE(HAVE_XLOCALE, 1, Define if Xlocale support works) |
703 | AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) |
|
|
704 | fi |
750 | fi |
705 | fi |
751 | |
706 | |
752 | AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale, |
707 | AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale, |
753 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1 |
708 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1 |
754 | #include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])]) |
709 | #include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])]) |
… | |
… | |
829 | fi |
784 | fi |
830 | if test x$support_tinting = xyes; then |
785 | if test x$support_tinting = xyes; then |
831 | AC_DEFINE(TINTING, 1, Define if you want your background to be tinted) |
786 | AC_DEFINE(TINTING, 1, Define if you want your background to be tinted) |
832 | fi |
787 | fi |
833 | if test x$support_inheritpixmap = xyes; then |
788 | if test x$support_inheritpixmap = xyes; then |
834 | AC_DEFINE(TRANSPARENT, 1, Define if you want your background to use the parent window background) |
789 | AC_DEFINE(ENABLE_TRANSPARENCY, 1, Define if you want your background to use the parent window background) |
835 | fi |
790 | fi |
836 | if test x$support_keepscrolling = xno; then |
791 | if test x$support_keepscrolling = xno; then |
837 | AC_DEFINE(NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING, 1, Define for continual scrolling when you keep the scrollbar button pressed) |
792 | AC_DEFINE(NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING, 1, Define for continual scrolling when you keep the scrollbar button pressed) |
838 | fi |
793 | fi |
839 | if test x$support_selectionscrolling = xyes; then |
794 | if test x$support_selectionscrolling = xyes; then |
840 | AC_DEFINE(SELECTION_SCROLLING, 1, Define to allow scrolling when the selection moves to the top or bottom of the screen) |
795 | AC_DEFINE(SELECTION_SCROLLING, 1, Define to allow scrolling when the selection moves to the top or bottom of the screen) |
841 | fi |
796 | fi |
842 | if test x$support_frills = xyes; then |
|
|
843 | AC_DEFINE(ENABLE_FRILLS, 1, Define if you want handling for rarely used but handy features) |
|
|
844 | fi |
|
|
845 | if test x$support_mousewheel = xyes; then |
797 | if test x$support_mousewheel = xyes; then |
846 | AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll) |
798 | AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll) |
847 | fi |
799 | fi |
848 | if test x$support_mouseslipwheel = xyes; then |
800 | if test x$support_mouseslipwheel = xyes; then |
849 | AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling) |
801 | AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling) |
850 | fi |
|
|
851 | if test x$support_xim = xyes -o x$multichar_set = xyes; then |
|
|
852 | if test x$rxvt_cv_func_xlocale = xyes; then |
|
|
853 | AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) |
|
|
854 | fi |
|
|
855 | fi |
802 | fi |
856 | if test x$support_xpm = xyes -o x$support_afterimage = xyes ; then |
803 | if test x$support_xpm = xyes -o x$support_afterimage = xyes ; then |
857 | AC_DEFINE(XPM_BACKGROUND, 1, Define if you want to have sexy-looking background pixmaps. Needs libXpm or libAfterImage) |
804 | AC_DEFINE(XPM_BACKGROUND, 1, Define if you want to have sexy-looking background pixmaps. Needs libXpm or libAfterImage) |
858 | fi |
805 | fi |
859 | |
806 | |
… | |
… | |
954 | |
901 | |
955 | if test x$support_perl = xyes; then |
902 | if test x$support_perl = xyes; then |
956 | support_frills=yes |
903 | support_frills=yes |
957 | fi |
904 | fi |
958 | |
905 | |
|
|
906 | if test x$support_frills = xyes; then |
|
|
907 | AC_DEFINE(ENABLE_FRILLS, 1, Define if you want handling for rarely used but handy features) |
|
|
908 | fi |
|
|
909 | |
959 | AC_SUBST(CFLAGS) |
910 | AC_SUBST(CFLAGS) |
960 | AC_SUBST(CPPFLAGS) |
911 | AC_SUBST(CPPFLAGS) |
961 | AC_SUBST(LDFLAGS) |
912 | AC_SUBST(LDFLAGS) |
962 | AC_SUBST(X_CFLAGS) |
913 | AC_SUBST(X_CFLAGS) |
963 | |
914 | |
964 | dnl# Attack the libs |
915 | dnl# Attack the libs |
965 | if test x$rxvt_cv_rpath = xyes -o x$rxvt_cv_R = xyes; then |
|
|
966 | LIBS=`echo $LIBS | sed "$R_TRANSLATE"` |
|
|
967 | X_LIBS=`echo $X_LIBS | sed "$R_TRANSLATE"` |
|
|
968 | X_EXTRA_LIBS=`echo $X_EXTRA_LIBS | sed "$R_TRANSLATE"` |
|
|
969 | XPM_LIBS=`echo $XPM_LIBS | sed "$R_TRANSLATE"` |
|
|
970 | fi |
|
|
971 | AC_SUBST(LIBS) |
916 | AC_SUBST(LIBS) |
972 | AC_SUBST(X_LIBS) |
917 | AC_SUBST(X_LIBS) |
973 | AC_SUBST(X_EXTRA_LIBS) |
918 | AC_SUBST(X_EXTRA_LIBS) |
974 | |
919 | |
975 | AC_SUBST(LIBAFTERIMAGE_CFLAGS) |
920 | AC_SUBST(LIBAFTERIMAGE_CFLAGS) |