… | |
… | |
46 | CXX="$CC" |
46 | CXX="$CC" |
47 | LIBS="$LIBS -lsupc++" |
47 | LIBS="$LIBS -lsupc++" |
48 | LINKER="$CC" |
48 | LINKER="$CC" |
49 | AC_LINK_IFELSE( |
49 | AC_LINK_IFELSE( |
50 | [AC_LANG_PROGRAM([struct test { }; void f() try { throw new test; } catch (...) { throw; }],[])], |
50 | [AC_LANG_PROGRAM([struct test { }; void f() try { throw new test; } catch (...) { throw; }],[])], |
51 | [ |
|
|
52 | AC_MSG_RESULT(ok) |
51 | [AC_MSG_RESULT(ok)], |
53 | CXXLIB="-lsupc++" |
|
|
54 | ], |
|
|
55 | [ |
52 | [ |
56 | AC_MSG_RESULT([no, making everything bigger and slower]) |
53 | AC_MSG_RESULT([no, making everything bigger and slower]) |
57 | LIBS="$save_LIBS" |
54 | LIBS="$save_LIBS" |
58 | LINKER="$save_CXX" |
55 | LINKER="$save_CXX" |
59 | ] |
56 | ] |
60 | ) |
57 | ) |
61 | CXX="$save_CXX" |
58 | CXX="$save_CXX" |
62 | fi |
59 | fi |
63 | AC_SUBST(LINKER,[$LINKER]) |
60 | AC_SUBST(LINKER,[$LINKER]) |
64 | AC_SUBST(CXXLIB) |
|
|
65 | |
61 | |
66 | dnl# -------------------------------------------------------------------------- |
62 | dnl# -------------------------------------------------------------------------- |
67 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
63 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
68 | dnl# |
64 | dnl# |
69 | if test -z "$orig_CXXFLAGS"; then |
65 | if test -z "$orig_CXXFLAGS"; then |
… | |
… | |
78 | |
74 | |
79 | AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.) |
75 | AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.) |
80 | |
76 | |
81 | case $host in |
77 | case $host in |
82 | *-*-solaris* ) |
78 | *-*-solaris* ) |
83 | 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) |
84 | AC_DEFINE(_XOPEN_SOURCE, 2, Needed to get declarations for msg_control and msg_controllen on Solaris) |
|
|
85 | AC_DEFINE(__EXTENSIONS__, 1, Needed to get declarations for msg_control and msg_controllen on Solaris) |
|
|
86 | ;; |
80 | ;; |
87 | esac |
81 | esac |
88 | |
82 | |
89 | dnl if test x$GXX = xyes; then |
83 | dnl if test x$GXX = xyes; then |
90 | 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... |
… | |
… | |
531 | #include <sys/ioctl.h> |
525 | #include <sys/ioctl.h> |
532 | #ifdef HAVE_TERMIOS_H |
526 | #ifdef HAVE_TERMIOS_H |
533 | #include <termios.h> |
527 | #include <termios.h> |
534 | #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])]) |
535 | |
529 | |
536 | dnl# ELF systems may want to store paths for dynamic libraries. |
|
|
537 | dnl# Lets see if the compiler can accept "-Rpath" or "-Wl,-Rpath" |
|
|
538 | dnl# At least one version of SunOS wants "-R path" but it's not checked yet. |
|
|
539 | if test -n "$GCC"; then |
|
|
540 | LDARG="-Wl," |
|
|
541 | else |
|
|
542 | LDARG="" |
|
|
543 | fi |
|
|
544 | changequote(, )dnl |
|
|
545 | R_TRANSLATE='s/-L\([^ ]*\)/-L\1 '$LDARG'-rpath '$LDARG'\1/g' |
|
|
546 | changequote([, ])dnl |
|
|
547 | |
|
|
548 | ac_save_CFLAGS=$CFLAGS |
|
|
549 | ac_save_LIBS=$LIBS |
|
|
550 | CFLAGS="$CFLAGS $X_CFLAGS" |
|
|
551 | LIBS=`echo "$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"` |
|
|
552 | AC_CACHE_CHECK([for -rpath dynamic library path recording], rxvt_cv_rpath, |
|
|
553 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
|
|
554 | #include <stdlib.h> |
|
|
555 | main() |
|
|
556 | { |
|
|
557 | exit(0); |
|
|
558 | (void) XOpenDisplay("foobar"); |
|
|
559 | }]])],[rxvt_cv_rpath=yes],[rxvt_cv_rpath=no],[dnl |
|
|
560 | AC_MSG_WARN(You may need to check the LIBS line)])]) |
|
|
561 | if test x$rxvt_cv_rpath != xyes; then |
|
|
562 | changequote(, )dnl |
|
|
563 | R_TRANSLATE='s/-L\([^ ]*\)/-L\1 '$LDARG'-R\1/g' |
|
|
564 | changequote([, ])dnl |
|
|
565 | LIBS=`echo "$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"` |
|
|
566 | AC_CACHE_CHECK([for -R dynamic library path recording], rxvt_cv_R, |
|
|
567 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
|
|
568 | #include <stdlib.h> |
|
|
569 | main() |
|
|
570 | { |
|
|
571 | exit(0); |
|
|
572 | (void) XOpenDisplay("foobar"); |
|
|
573 | }]])],[rxvt_cv_R=yes],[rxvt_cv_R=no],[rxvt_cv_R=no])]) |
|
|
574 | if test x$rxvt_cv_R != xyes; then |
|
|
575 | LIBS="$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
|
|
576 | fi |
|
|
577 | fi |
|
|
578 | |
|
|
579 | AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
530 | AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
580 | [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])]) |
581 | if test x$rxvt_cv_xpointer = xyes; then |
532 | if test x$rxvt_cv_xpointer = xyes; then |
582 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
533 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
583 | fi |
534 | fi |
… | |
… | |
730 | 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 |
731 | ac_save_LIBS=$LIBS |
682 | ac_save_LIBS=$LIBS |
732 | ac_save_CFLAGS=$CFLAGS |
683 | ac_save_CFLAGS=$CFLAGS |
733 | CFLAGS="$CFLAGS $X_CFLAGS" |
684 | CFLAGS="$CFLAGS $X_CFLAGS" |
734 | LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
685 | LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
735 | if test x$rxvt_cv_rpath = xyes -o x$rxvt_cv_R = xyes; then |
|
|
736 | LIBS=`echo $LIBS | sed "$R_TRANSLATE"` |
|
|
737 | fi |
|
|
738 | AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
686 | AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
739 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
687 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
740 | #include <stdlib.h> |
688 | #include <stdlib.h> |
741 | main() { |
689 | main() { |
742 | char *p; |
690 | char *p; |
… | |
… | |
832 | fi |
780 | fi |
833 | if test x$support_tinting = xyes; then |
781 | if test x$support_tinting = xyes; then |
834 | 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) |
835 | fi |
783 | fi |
836 | if test x$support_inheritpixmap = xyes; then |
784 | if test x$support_inheritpixmap = xyes; then |
837 | 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) |
838 | fi |
786 | fi |
839 | if test x$support_keepscrolling = xno; then |
787 | if test x$support_keepscrolling = xno; then |
840 | 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) |
841 | fi |
789 | fi |
842 | if test x$support_selectionscrolling = xyes; then |
790 | if test x$support_selectionscrolling = xyes; then |
843 | 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) |
844 | fi |
|
|
845 | if test x$support_frills = xyes; then |
|
|
846 | AC_DEFINE(ENABLE_FRILLS, 1, Define if you want handling for rarely used but handy features) |
|
|
847 | fi |
792 | fi |
848 | if test x$support_mousewheel = xyes; then |
793 | if test x$support_mousewheel = xyes; then |
849 | 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) |
850 | fi |
795 | fi |
851 | if test x$support_mouseslipwheel = xyes; then |
796 | if test x$support_mouseslipwheel = xyes; then |
… | |
… | |
952 | |
897 | |
953 | if test x$support_perl = xyes; then |
898 | if test x$support_perl = xyes; then |
954 | support_frills=yes |
899 | support_frills=yes |
955 | fi |
900 | fi |
956 | |
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 | |
957 | AC_SUBST(CFLAGS) |
906 | AC_SUBST(CFLAGS) |
958 | AC_SUBST(CPPFLAGS) |
907 | AC_SUBST(CPPFLAGS) |
959 | AC_SUBST(LDFLAGS) |
908 | AC_SUBST(LDFLAGS) |
960 | AC_SUBST(X_CFLAGS) |
909 | AC_SUBST(X_CFLAGS) |
961 | |
910 | |
962 | dnl# Attack the libs |
911 | dnl# Attack the libs |
963 | if test x$rxvt_cv_rpath = xyes -o x$rxvt_cv_R = xyes; then |
|
|
964 | LIBS=`echo $LIBS | sed "$R_TRANSLATE"` |
|
|
965 | X_LIBS=`echo $X_LIBS | sed "$R_TRANSLATE"` |
|
|
966 | X_EXTRA_LIBS=`echo $X_EXTRA_LIBS | sed "$R_TRANSLATE"` |
|
|
967 | XPM_LIBS=`echo $XPM_LIBS | sed "$R_TRANSLATE"` |
|
|
968 | fi |
|
|
969 | AC_SUBST(LIBS) |
912 | AC_SUBST(LIBS) |
970 | AC_SUBST(X_LIBS) |
913 | AC_SUBST(X_LIBS) |
971 | AC_SUBST(X_EXTRA_LIBS) |
914 | AC_SUBST(X_EXTRA_LIBS) |
972 | |
915 | |
973 | AC_SUBST(LIBAFTERIMAGE_CFLAGS) |
916 | AC_SUBST(LIBAFTERIMAGE_CFLAGS) |