… | |
… | |
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> |
… | |
… | |
529 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
524 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
530 | #include <sys/ioctl.h> |
525 | #include <sys/ioctl.h> |
531 | #ifdef HAVE_TERMIOS_H |
526 | #ifdef HAVE_TERMIOS_H |
532 | #include <termios.h> |
527 | #include <termios.h> |
533 | #endif]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])]) |
528 | #endif]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])]) |
534 | |
|
|
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 | |
529 | |
578 | AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
530 | 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])]) |
531 | [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 |
532 | if test x$rxvt_cv_xpointer = xyes; then |
581 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
533 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
… | |
… | |
729 | dnl# this is a really hack test for some basic Xlocale stuff |
681 | dnl# this is a really hack test for some basic Xlocale stuff |
730 | ac_save_LIBS=$LIBS |
682 | ac_save_LIBS=$LIBS |
731 | ac_save_CFLAGS=$CFLAGS |
683 | ac_save_CFLAGS=$CFLAGS |
732 | CFLAGS="$CFLAGS $X_CFLAGS" |
684 | CFLAGS="$CFLAGS $X_CFLAGS" |
733 | LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
685 | 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, |
686 | AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
738 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
687 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
739 | #include <stdlib.h> |
688 | #include <stdlib.h> |
740 | main() { |
689 | main() { |
741 | char *p; |
690 | char *p; |
742 | if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) |
691 | if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) |
743 | exit (XSupportsLocale() ? 0 : 1); |
692 | exit (XSupportsLocale() ? 0 : 1); |
744 | else |
693 | else |
745 | exit (1);}]])],[dnl |
694 | exit (1);}]])],[dnl |
746 | rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl |
695 | rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl |
747 | AC_MSG_WARN(Define NO_XLOCALE in config.h manually)])]) |
696 | :])]) |
|
|
697 | if test x$support_xim = xyes; then |
748 | if test x$rxvt_cv_func_xlocale = xyes; then |
698 | if test x$rxvt_cv_func_xlocale = xyes; then |
749 | AC_DEFINE(HAVE_XLOCALE, 1, Define if Xlocale support works) |
699 | AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) |
|
|
700 | fi |
750 | fi |
701 | fi |
751 | |
702 | |
752 | AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale, |
703 | AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale, |
753 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1 |
704 | [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])]) |
705 | #include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])]) |
… | |
… | |
829 | fi |
780 | fi |
830 | if test x$support_tinting = xyes; then |
781 | if test x$support_tinting = xyes; then |
831 | AC_DEFINE(TINTING, 1, Define if you want your background to be tinted) |
782 | AC_DEFINE(TINTING, 1, Define if you want your background to be tinted) |
832 | fi |
783 | fi |
833 | if test x$support_inheritpixmap = xyes; then |
784 | if test x$support_inheritpixmap = xyes; then |
834 | AC_DEFINE(TRANSPARENT, 1, Define if you want your background to use the parent window background) |
785 | AC_DEFINE(ENABLE_TRANSPARENCY, 1, Define if you want your background to use the parent window background) |
835 | fi |
786 | fi |
836 | if test x$support_keepscrolling = xno; then |
787 | 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) |
788 | AC_DEFINE(NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING, 1, Define for continual scrolling when you keep the scrollbar button pressed) |
838 | fi |
789 | fi |
839 | if test x$support_selectionscrolling = xyes; then |
790 | 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) |
791 | AC_DEFINE(SELECTION_SCROLLING, 1, Define to allow scrolling when the selection moves to the top or bottom of the screen) |
841 | fi |
792 | 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 |
793 | if test x$support_mousewheel = xyes; then |
846 | AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll) |
794 | AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll) |
847 | fi |
795 | fi |
848 | if test x$support_mouseslipwheel = xyes; then |
796 | 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) |
797 | 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 |
798 | fi |
856 | if test x$support_xpm = xyes -o x$support_afterimage = xyes ; then |
799 | 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) |
800 | AC_DEFINE(XPM_BACKGROUND, 1, Define if you want to have sexy-looking background pixmaps. Needs libXpm or libAfterImage) |
858 | fi |
801 | fi |
859 | |
802 | |
… | |
… | |
954 | |
897 | |
955 | if test x$support_perl = xyes; then |
898 | if test x$support_perl = xyes; then |
956 | support_frills=yes |
899 | support_frills=yes |
957 | fi |
900 | fi |
958 | |
901 | |
|
|
902 | if test x$support_frills = xyes; then |
|
|
903 | AC_DEFINE(ENABLE_FRILLS, 1, Define if you want handling for rarely used but handy features) |
|
|
904 | fi |
|
|
905 | |
959 | AC_SUBST(CFLAGS) |
906 | AC_SUBST(CFLAGS) |
960 | AC_SUBST(CPPFLAGS) |
907 | AC_SUBST(CPPFLAGS) |
961 | AC_SUBST(LDFLAGS) |
908 | AC_SUBST(LDFLAGS) |
962 | AC_SUBST(X_CFLAGS) |
909 | AC_SUBST(X_CFLAGS) |
963 | |
910 | |
964 | dnl# Attack the libs |
911 | 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) |
912 | AC_SUBST(LIBS) |
972 | AC_SUBST(X_LIBS) |
913 | AC_SUBST(X_LIBS) |
973 | AC_SUBST(X_EXTRA_LIBS) |
914 | AC_SUBST(X_EXTRA_LIBS) |
974 | |
915 | |
975 | AC_SUBST(LIBAFTERIMAGE_CFLAGS) |
916 | AC_SUBST(LIBAFTERIMAGE_CFLAGS) |