ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/configure.ac
(Generate patch)

Comparing rxvt-unicode/configure.ac (file contents):
Revision 1.50 by ayin, Wed Jun 13 11:30:42 2007 UTC vs.
Revision 1.65 by ayin, Thu Jul 26 19:18:59 2007 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines