… | |
… | |
13 | changequote(, )dnl |
13 | changequote(, )dnl |
14 | VERSION=`sed -n -e 's/^.*[ \t]VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
14 | VERSION=`sed -n -e 's/^.*[ \t]VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
15 | DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
15 | DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
16 | dnl LIBVERSION=`sed -n -e 's/^.*[ \t]LIBVERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
16 | dnl LIBVERSION=`sed -n -e 's/^.*[ \t]LIBVERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` |
17 | changequote([, ])dnl |
17 | changequote([, ])dnl |
18 | AC_SUBST(VERSION)dnl |
18 | AC_SUBST(VERSION)dnl |
19 | AC_SUBST(DATE)dnl |
19 | AC_SUBST(DATE)dnl |
20 | AC_SUBST(LSMDATE)dnl |
20 | AC_SUBST(LSMDATE)dnl |
21 | AC_SUBST(LIBVERSION)dnl |
21 | AC_SUBST(LIBVERSION)dnl |
22 | echo "" |
22 | echo "" |
23 | echo "configuring for rxvt $VERSION" |
23 | echo "configuring for rxvt $VERSION" |
24 | echo "" |
24 | echo "" |
25 | |
25 | |
26 | orig_CXXFLAGS="$CXXFLAGS" |
26 | orig_CXXFLAGS="$CXXFLAGS" |
… | |
… | |
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 | [ |
51 | [AC_MSG_RESULT(ok)], |
52 | AC_MSG_RESULT(ok) |
|
|
53 | CXXLIB="-lsupc++" |
|
|
54 | ], |
52 | [ |
55 | [ |
53 | AC_MSG_RESULT([no, making everything bigger and slower]) |
56 | AC_MSG_RESULT([no, making everything bigger and slower]) |
54 | LIBS="$save_LIBS" |
57 | LIBS="$save_LIBS" |
55 | LINKER="$save_CXX" |
58 | LINKER="$save_CXX" |
56 | ] |
59 | ] |
57 | ) |
60 | ) |
58 | CXX="$save_CXX" |
61 | CXX="$save_CXX" |
59 | fi |
62 | fi |
60 | AC_SUBST(LINKER,[$LINKER]) |
63 | AC_SUBST(LINKER,[$LINKER]) |
|
|
64 | AC_SUBST(CXXLIB) |
61 | |
65 | |
62 | dnl# -------------------------------------------------------------------------- |
66 | dnl# -------------------------------------------------------------------------- |
63 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
67 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
64 | dnl# |
68 | dnl# |
65 | if test -z "$orig_CXXFLAGS"; then |
69 | if test -z "$orig_CXXFLAGS"; then |
… | |
… | |
74 | |
78 | |
75 | AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.) |
79 | AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.) |
76 | |
80 | |
77 | case $host in |
81 | case $host in |
78 | *-*-solaris* ) |
82 | *-*-solaris* ) |
79 | AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Needed to get declarations for msg_control and msg_controllen on Solaris) |
83 | 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 | ;; |
84 | ;; |
83 | esac |
85 | esac |
84 | |
86 | |
85 | dnl if test x$GXX = xyes; then |
87 | dnl if test x$GXX = xyes; then |
86 | dnl CXXFLAGS="$CXXFLAGS" dnl I once had -fno-exceptions, but I am using them now... |
88 | dnl CXXFLAGS="$CXXFLAGS" dnl I once had -fno-exceptions, but I am using them now... |
… | |
… | |
237 | [ --enable-afterimage enable integration with libAfterImage for background images], |
239 | [ --enable-afterimage enable integration with libAfterImage for background images], |
238 | [if test x$enableval = xyes -o x$enableval = xno; then |
240 | [if test x$enableval = xyes -o x$enableval = xno; then |
239 | support_afterimage=$enableval |
241 | support_afterimage=$enableval |
240 | fi]) |
242 | fi]) |
241 | |
243 | |
242 | AC_ARG_WITH(afterimage_config, [ --with-afterimage-config=DIR use libAfterImage config script in DIR], afterimage_config="$withval",afterimage_config=NO) |
244 | AC_ARG_WITH(afterimage_config, |
|
|
245 | [ --with-afterimage-config=DIR use libAfterImage config script in DIR], |
|
|
246 | [if test "x$withval" != x; then |
|
|
247 | afterimage_config=$withval/afterimage-config |
|
|
248 | fi]) |
243 | |
249 | |
244 | AC_ARG_ENABLE(afterstep, |
250 | AC_ARG_ENABLE(afterstep, |
245 | [ --enable-afterstep enable integration with AfterStep window manager], |
251 | [ --enable-afterstep enable integration with AfterStep window manager], |
246 | [if test x$enableval = xyes -o x$enableval = xno; then |
252 | [if test x$enableval = xyes -o x$enableval = xno; then |
247 | support_afterstep=$enableval |
253 | support_afterstep=$enableval |
… | |
… | |
435 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
441 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
436 | fi]) |
442 | fi]) |
437 | |
443 | |
438 | dnl# -------------------------------------------------------------------------- |
444 | dnl# -------------------------------------------------------------------------- |
439 | |
445 | |
440 | AC_PATH_PROG(MV, mv, mv) |
|
|
441 | AC_PATH_PROG(CP, cp, cp) |
|
|
442 | AC_PATH_PROG(LN, ln, ln) |
|
|
443 | AC_PATH_PROG(SED, sed, sed) |
|
|
444 | AC_PATH_PROG(ECHO, echo, echo) |
|
|
445 | AC_PATH_PROG(CMP, cmp, cmp) |
|
|
446 | AC_PATH_PROG(TIC, tic) |
446 | AC_PATH_PROG(TIC, tic) |
447 | |
447 | |
448 | dnl# need a neat way to detect SVR4 or its features |
448 | dnl# need a neat way to detect SVR4 or its features |
449 | dnl# in src/command.c we use these functions: |
449 | dnl# in src/command.c we use these functions: |
450 | dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h> |
450 | dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h> |
… | |
… | |
465 | |
465 | |
466 | LIBAFTERIMAGE_CFLAGS= |
466 | LIBAFTERIMAGE_CFLAGS= |
467 | AFTERIMAGE_LIBS= |
467 | AFTERIMAGE_LIBS= |
468 | have_afterimage= |
468 | have_afterimage= |
469 | |
469 | |
470 | if test x$support_afterimage == xyes; then |
470 | if test x$support_afterimage = xyes; then |
471 | AC_MSG_CHECKING(installed libAfterImage) |
|
|
472 | support_afterimage=no |
471 | support_afterimage=no |
|
|
472 | |
473 | if test "$afterimage_config" = "NO" ; then |
473 | if test "x$afterimage_config" = "x" ; then |
474 | if afterimage-config --version > /dev/null 2>&1 ; then |
474 | AC_PATH_PROG(afterimage_config, afterimage-config, no) |
475 | afterimage_config=afterimage-config |
475 | fi |
476 | else |
476 | |
477 | if test -x /usr/local/bin/afterimage-config; then |
477 | AC_MSG_CHECKING(for libAfterImage) |
478 | afterimage_config=/usr/local/bin/afterimage-config |
|
|
479 | fi |
|
|
480 | fi |
|
|
481 | else |
|
|
482 | afterimage_config=$afterimage_config/afterimage-config |
|
|
483 | fi |
|
|
484 | if $afterimage_config --version > /dev/null 2>&1 ; then |
478 | if $afterimage_config --version >/dev/null 2>&1 ; then |
485 | LIBAFTERIMAGE_CFLAGS=`$afterimage_config --cflags` |
479 | LIBAFTERIMAGE_CFLAGS=`$afterimage_config --cflags` |
486 | AFTERIMAGE_LIBS=`$afterimage_config --libs` |
480 | AFTERIMAGE_LIBS=`$afterimage_config --libs` |
487 | if test "x$AFTERIMAGE_LIBS" != "x"; then |
481 | if test "x$AFTERIMAGE_LIBS" != "x"; then |
488 | support_afterimage=yes |
482 | support_afterimage=yes |
489 | fi |
483 | fi |
490 | fi |
484 | fi |
491 | |
485 | |
492 | if test "x$support_afterimage" = "xyes"; then |
486 | if test "x$support_afterimage" = "xyes"; then |
493 | AC_MSG_RESULT($AFTERIMAGE_LIBS) |
487 | AC_MSG_RESULT($AFTERIMAGE_LIBS) |
494 | else |
488 | else |
495 | AC_MSG_RESULT(afterimage-config not found in $afterimage_config - can't use libAfterImage for images.) |
489 | AC_MSG_RESULT(no) |
496 | fi |
490 | fi |
497 | fi |
491 | fi |
498 | |
492 | |
499 | if test x$support_afterimage != xyes -a x$support_xpm = xyes ; then |
493 | if test x$support_afterimage != xyes -a x$support_xpm = xyes ; then |
500 | VT_FIND_LIBXPM |
494 | VT_FIND_LIBXPM |
501 | if test x$no_xpm = xyes; then |
495 | if test x$no_xpm = xyes; then |
… | |
… | |
558 | #include <stdlib.h> |
552 | #include <stdlib.h> |
559 | main() |
553 | main() |
560 | { |
554 | { |
561 | exit(0); |
555 | exit(0); |
562 | (void) XOpenDisplay("foobar"); |
556 | (void) XOpenDisplay("foobar"); |
563 | }]])],[rxvt_cv_rpath=yes],[rxvt_cv_rpath=no],[dnl |
557 | }]])],[rxvt_cv_rpath=yes],[rxvt_cv_rpath=no],[dnl |
564 | AC_MSG_WARN(You may need to check the LIBS line)])]) |
558 | AC_MSG_WARN(You may need to check the LIBS line)])]) |
565 | if test x$rxvt_cv_rpath != xyes; then |
559 | if test x$rxvt_cv_rpath != xyes; then |
566 | changequote(, )dnl |
560 | changequote(, )dnl |
567 | R_TRANSLATE='s/-L\([^ ]*\)/-L\1 '$LDARG'-R\1/g' |
561 | R_TRANSLATE='s/-L\([^ ]*\)/-L\1 '$LDARG'-R\1/g' |
568 | changequote([, ])dnl |
562 | changequote([, ])dnl |
569 | LIBS=`echo "$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"` |
563 | LIBS=`echo "$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"` |
… | |
… | |
572 | #include <stdlib.h> |
566 | #include <stdlib.h> |
573 | main() |
567 | main() |
574 | { |
568 | { |
575 | exit(0); |
569 | exit(0); |
576 | (void) XOpenDisplay("foobar"); |
570 | (void) XOpenDisplay("foobar"); |
577 | }]])],[rxvt_cv_R=yes],[rxvt_cv_R=no],[rxvt_cv_R=no])]) |
571 | }]])],[rxvt_cv_R=yes],[rxvt_cv_R=no],[rxvt_cv_R=no])]) |
578 | if test x$rxvt_cv_R != xyes; then |
572 | if test x$rxvt_cv_R != xyes; then |
579 | LIBS="$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
573 | LIBS="$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
580 | fi |
574 | fi |
581 | fi |
575 | fi |
582 | |
576 | |
… | |
… | |
716 | dnl# find ttys/ttytab |
710 | dnl# find ttys/ttytab |
717 | AC_CACHE_CHECK(where ttys/ttytab is located, rxvt_cv_path_ttytab, |
711 | AC_CACHE_CHECK(where ttys/ttytab is located, rxvt_cv_path_ttytab, |
718 | [for ttys_file in dnl |
712 | [for ttys_file in dnl |
719 | /etc/ttys /etc/ttytab; |
713 | /etc/ttys /etc/ttytab; |
720 | do |
714 | do |
721 | if test -f "$ttys_file" ; then |
715 | if test -f "$ttys_file" ; then |
722 | rxvt_cv_path_ttytab=$ttys_file |
716 | rxvt_cv_path_ttytab=$ttys_file |
723 | break |
717 | break |
724 | fi |
718 | fi |
725 | done |
719 | done |
726 | ]) |
720 | ]) |
… | |
… | |
747 | if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) |
741 | if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) |
748 | exit (XSupportsLocale() ? 0 : 1); |
742 | exit (XSupportsLocale() ? 0 : 1); |
749 | else |
743 | else |
750 | exit (1);}]])],[dnl |
744 | exit (1);}]])],[dnl |
751 | rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl |
745 | rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl |
752 | AC_MSG_WARN(Define NO_XLOCALE in config.h manually)])]) |
746 | :])]) |
|
|
747 | if test x$support_xim = xyes; then |
753 | if test x$rxvt_cv_func_xlocale = xyes; then |
748 | if test x$rxvt_cv_func_xlocale = xyes; then |
754 | AC_DEFINE(HAVE_XLOCALE, 1, Define if Xlocale support works) |
749 | AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) |
|
|
750 | fi |
755 | fi |
751 | fi |
756 | |
752 | |
757 | AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale, |
753 | AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale, |
758 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1 |
754 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1 |
759 | #include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])]) |
755 | #include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])]) |
… | |
… | |
850 | if test x$support_mousewheel = xyes; then |
846 | if test x$support_mousewheel = xyes; then |
851 | AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll) |
847 | AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll) |
852 | fi |
848 | fi |
853 | if test x$support_mouseslipwheel = xyes; then |
849 | if test x$support_mouseslipwheel = xyes; then |
854 | AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling) |
850 | AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling) |
855 | fi |
|
|
856 | if test x$support_xim = xyes -o x$multichar_set = xyes; then |
|
|
857 | if test x$rxvt_cv_func_xlocale = xyes; then |
|
|
858 | AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) |
|
|
859 | fi |
|
|
860 | fi |
851 | fi |
861 | if test x$support_xpm = xyes -o x$support_afterimage = xyes ; then |
852 | if test x$support_xpm = xyes -o x$support_afterimage = xyes ; then |
862 | AC_DEFINE(XPM_BACKGROUND, 1, Define if you want to have sexy-looking background pixmaps. Needs libXpm or libAfterImage) |
853 | AC_DEFINE(XPM_BACKGROUND, 1, Define if you want to have sexy-looking background pixmaps. Needs libXpm or libAfterImage) |
863 | fi |
854 | fi |
864 | |
855 | |
… | |
… | |
959 | |
950 | |
960 | if test x$support_perl = xyes; then |
951 | if test x$support_perl = xyes; then |
961 | support_frills=yes |
952 | support_frills=yes |
962 | fi |
953 | fi |
963 | |
954 | |
964 | AC_SUBST(DEBUG) |
|
|
965 | AC_SUBST(DINCLUDE) |
|
|
966 | AC_SUBST(CFLAGS) |
955 | AC_SUBST(CFLAGS) |
967 | AC_SUBST(CPPFLAGS) |
956 | AC_SUBST(CPPFLAGS) |
968 | AC_SUBST(LDFLAGS) |
957 | AC_SUBST(LDFLAGS) |
969 | AC_SUBST(X_CFLAGS) |
958 | AC_SUBST(X_CFLAGS) |
970 | |
959 | |
971 | dnl# Attack the libs |
960 | dnl# Attack the libs |
972 | if test x$rxvt_cv_rpath = xyes -o x$rxvt_cv_R = xyes; then |
961 | if test x$rxvt_cv_rpath = xyes -o x$rxvt_cv_R = xyes; then |
973 | DLIB=`echo $DLIB | sed "$R_TRANSLATE"` |
|
|
974 | LIBS=`echo $LIBS | sed "$R_TRANSLATE"` |
962 | LIBS=`echo $LIBS | sed "$R_TRANSLATE"` |
975 | X_LIBS=`echo $X_LIBS | sed "$R_TRANSLATE"` |
963 | X_LIBS=`echo $X_LIBS | sed "$R_TRANSLATE"` |
976 | X_EXTRA_LIBS=`echo $X_EXTRA_LIBS | sed "$R_TRANSLATE"` |
964 | X_EXTRA_LIBS=`echo $X_EXTRA_LIBS | sed "$R_TRANSLATE"` |
977 | XPM_LIBS=`echo $XPM_LIBS | sed "$R_TRANSLATE"` |
965 | XPM_LIBS=`echo $XPM_LIBS | sed "$R_TRANSLATE"` |
978 | fi |
966 | fi |
979 | AC_SUBST(DLIB) |
|
|
980 | AC_SUBST(LIBS) |
967 | AC_SUBST(LIBS) |
981 | AC_SUBST(X_LIBS) |
968 | AC_SUBST(X_LIBS) |
982 | AC_SUBST(X_EXTRA_LIBS) |
969 | AC_SUBST(X_EXTRA_LIBS) |
983 | |
970 | |
984 | AC_SUBST(LIBAFTERIMAGE_CFLAGS) |
971 | AC_SUBST(LIBAFTERIMAGE_CFLAGS) |
… | |
… | |
1030 | if test x$support_xpm = xyes; then |
1017 | if test x$support_xpm = xyes; then |
1031 | echo " Xpm library: $XPM_LIBS" |
1018 | echo " Xpm library: $XPM_LIBS" |
1032 | fi |
1019 | fi |
1033 | |
1020 | |
1034 | if test x$support_afterimage = xyes; then |
1021 | if test x$support_afterimage = xyes; then |
1035 | echo " AfterImage library: $AFTERIMAGE_LIBS" |
1022 | echo " AfterImage support: yes" |
1036 | fi |
1023 | fi |
1037 | |
1024 | |
1038 | if test x$support_afterstep = xyes; then |
1025 | if test x$support_afterstep = xyes; then |
1039 | echo " With AfterStep integration" |
1026 | echo " AfterStep integration: yes" |
1040 | fi |
1027 | fi |
1041 | |
1028 | |
1042 | if test x$term != x; then |
1029 | if test x$term != x; then |
1043 | echo " set TERM to: $term" |
1030 | echo " set TERM to: $term" |
1044 | fi |
1031 | fi |