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.68 by ayin, Wed Aug 1 18:10:10 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...
243 [ --with-afterimage-config=DIR use libAfterImage config script in DIR], 241 [ --with-afterimage-config=DIR use libAfterImage config script in DIR],
244 [if test "x$withval" != x; then 242 [if test "x$withval" != x; then
245 afterimage_config=$withval/afterimage-config 243 afterimage_config=$withval/afterimage-config
246 fi]) 244 fi])
247 245
248AC_ARG_ENABLE(afterstep, 246dnl AC_ARG_ENABLE(afterstep,
249 [ --enable-afterstep enable integration with AfterStep window manager], 247dnl [ --enable-afterstep enable integration with AfterStep window manager],
250 [if test x$enableval = xyes -o x$enableval = xno; then 248dnl [if test x$enableval = xyes -o x$enableval = xno; then
251 support_afterstep=$enableval 249dnl support_afterstep=$enableval
252 fi]) 250dnl fi])
253 251
254AC_ARG_ENABLE(transparency, 252AC_ARG_ENABLE(transparency,
255 [ --enable-transparency enable transparent backgrounds], 253 [ --enable-transparency enable transparent backgrounds],
256 [if test x$enableval = xyes -o x$enableval = xno; then 254 [if test x$enableval = xyes -o x$enableval = xno; then
257 support_inheritpixmap=$enableval 255 support_inheritpixmap=$enableval
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
478 AC_MSG_CHECKING(for libAfterImage) 472 AC_MSG_CHECKING(for libAfterImage version >= 1.15)
479 if $afterimage_config --version >/dev/null 2>&1 ; then 473 AFTERIMAGE_VERSION=`$afterimage_config --version`
474 if test -n "$AFTERIMAGE_VERSION" ; then
480 LIBAFTERIMAGE_CFLAGS=`$afterimage_config --cflags` 475 AFTERIMAGE_CFLAGS=`$afterimage_config --cflags`
481 AFTERIMAGE_LIBS=`$afterimage_config --libs` 476 AFTERIMAGE_LIBS=`$afterimage_config --libs`
482 if test "x$AFTERIMAGE_LIBS" != "x"; then 477 if test "x$AFTERIMAGE_LIBS" != "x"; then
478 libai_ver_major=`echo $AFTERIMAGE_VERSION | cut -f 1 -d .`
479 libai_ver_minor=`echo $AFTERIMAGE_VERSION | cut -f 2 -d .`
480 if test $libai_ver_major -gt 1 -o \( $libai_ver_major -eq 1 -a $libai_ver_minor -ge 15 \); then
483 support_afterimage=yes 481 support_afterimage=yes
482 fi
484 fi 483 fi
485 fi 484 fi
486 485
487 if test "x$support_afterimage" = "xyes"; then 486 if test "x$support_afterimage" = "xyes"; then
488 AC_MSG_RESULT($AFTERIMAGE_LIBS) 487 AC_MSG_RESULT($AFTERIMAGE_LIBS)
530#include <sys/ioctl.h> 529#include <sys/ioctl.h>
531#ifdef HAVE_TERMIOS_H 530#ifdef HAVE_TERMIOS_H
532#include <termios.h> 531#include <termios.h>
533#endif]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])]) 532#endif]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])])
534 533
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, 534AC_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])]) 535[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 536if test x$rxvt_cv_xpointer = xyes; then
581 AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) 537 AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef)
582fi 538fi
583LIBS=$ac_save_LIBS
584CFLAGS=$ac_save_CFLAGS
585 539
586AC_CACHE_CHECK([for XLIB_ILLEGAL_ACCESS], rxvt_xlib_illegal_access, 540AC_CACHE_CHECK([for XLIB_ILLEGAL_ACCESS], rxvt_xlib_illegal_access,
587[AC_COMPILE_IFELSE( 541[AC_COMPILE_IFELSE(
588 [AC_LANG_PROGRAM([ 542 [AC_LANG_PROGRAM([
589#define XLIB_ILLEGAL_ACCESS 543#define XLIB_ILLEGAL_ACCESS
729dnl# this is a really hack test for some basic Xlocale stuff 683dnl# this is a really hack test for some basic Xlocale stuff
730ac_save_LIBS=$LIBS 684ac_save_LIBS=$LIBS
731ac_save_CFLAGS=$CFLAGS 685ac_save_CFLAGS=$CFLAGS
732CFLAGS="$CFLAGS $X_CFLAGS" 686CFLAGS="$CFLAGS $X_CFLAGS"
733LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" 687LIBS="$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, 688AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale,
738[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> 689[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h>
739#include <stdlib.h> 690#include <stdlib.h>
740main() { 691main() {
741char *p; 692char *p;
742if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) 693if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p)
743exit (XSupportsLocale() ? 0 : 1); 694exit (XSupportsLocale() ? 0 : 1);
744else 695else
745exit (1);}]])],[dnl 696exit (1);}]])],[dnl
746 rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl 697 rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl
747 AC_MSG_WARN(Define NO_XLOCALE in config.h manually)])]) 698 :])])
699if test x$support_xim = xyes; then
748if test x$rxvt_cv_func_xlocale = xyes; then 700 if test x$rxvt_cv_func_xlocale = xyes; then
749 AC_DEFINE(HAVE_XLOCALE, 1, Define if Xlocale support works) 701 AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input)
702 fi
750fi 703fi
751 704
752AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale, 705AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale,
753[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1 706[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])]) 707#include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])])
829fi 782fi
830if test x$support_tinting = xyes; then 783if test x$support_tinting = xyes; then
831 AC_DEFINE(TINTING, 1, Define if you want your background to be tinted) 784 AC_DEFINE(TINTING, 1, Define if you want your background to be tinted)
832fi 785fi
833if test x$support_inheritpixmap = xyes; then 786if test x$support_inheritpixmap = xyes; then
834 AC_DEFINE(TRANSPARENT, 1, Define if you want your background to use the parent window background) 787 AC_DEFINE(ENABLE_TRANSPARENCY, 1, Define if you want your background to use the parent window background)
835fi 788fi
836if test x$support_keepscrolling = xno; then 789if 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) 790 AC_DEFINE(NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING, 1, Define for continual scrolling when you keep the scrollbar button pressed)
838fi 791fi
839if test x$support_selectionscrolling = xyes; then 792if 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) 793 AC_DEFINE(SELECTION_SCROLLING, 1, Define to allow scrolling when the selection moves to the top or bottom of the screen)
841fi 794fi
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 795if test x$support_mousewheel = xyes; then
846 AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll) 796 AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll)
847fi 797fi
848if test x$support_mouseslipwheel = xyes; then 798if 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) 799 AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling)
850fi 800fi
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
856if test x$support_xpm = xyes -o x$support_afterimage = xyes ; then 801if 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) 802 AC_DEFINE(XPM_BACKGROUND, 1, Define if you want to have sexy-looking background pixmaps. Needs libXpm or libAfterImage)
858fi 803fi
859 804
860if test x$support_afterimage = xyes; then 805if test x$support_afterimage = xyes; then
861 AC_DEFINE(HAVE_AFTERIMAGE, 1, Define if you want to use libAfterImage for image processing) 806 AC_DEFINE(HAVE_AFTERIMAGE, 1, Define if you want to use libAfterImage for image processing)
862fi 807fi
863 808
864if test x$support_afterstep = xyes; then 809dnl if test x$support_afterstep = xyes; then
865 AC_DEFINE(AFTERSTEP_INTEGRATION, 1, Define if you want to integrate with AfterStep window manager) 810dnl AC_DEFINE(AFTERSTEP_INTEGRATION, 1, Define if you want to integrate with AfterStep window manager)
866fi 811dnl fi
867 812
868if test x$support_scroll_rxvt = xyes; then 813if test x$support_scroll_rxvt = xyes; then
869 AC_DEFINE(RXVT_SCROLLBAR, 1, Support Rxvt original style scrollbars) 814 AC_DEFINE(RXVT_SCROLLBAR, 1, Support Rxvt original style scrollbars)
870 scrolltypes="rxvt" 815 scrolltypes="rxvt"
871fi 816fi
954 899
955if test x$support_perl = xyes; then 900if test x$support_perl = xyes; then
956 support_frills=yes 901 support_frills=yes
957fi 902fi
958 903
904if test x$support_frills = xyes; then
905 AC_DEFINE(ENABLE_FRILLS, 1, Define if you want handling for rarely used but handy features)
906fi
907
959AC_SUBST(CFLAGS) 908AC_SUBST(CFLAGS)
960AC_SUBST(CPPFLAGS) 909AC_SUBST(CPPFLAGS)
961AC_SUBST(LDFLAGS) 910AC_SUBST(LDFLAGS)
962AC_SUBST(X_CFLAGS) 911AC_SUBST(X_CFLAGS)
963 912
964dnl# Attack the libs 913dnl# 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) 914AC_SUBST(LIBS)
972AC_SUBST(X_LIBS) 915AC_SUBST(X_LIBS)
973AC_SUBST(X_EXTRA_LIBS) 916AC_SUBST(X_EXTRA_LIBS)
974 917
975AC_SUBST(LIBAFTERIMAGE_CFLAGS) 918AC_SUBST(AFTERIMAGE_CFLAGS)
976AC_SUBST(AFTERIMAGE_LIBS) 919AC_SUBST(AFTERIMAGE_LIBS)
977 920
978AC_ARG_PROGRAM 921AC_ARG_PROGRAM
979 922
980dnl# test for "sun" or "__sun__" before include sys_ioctl 923dnl# test for "sun" or "__sun__" before include sys_ioctl
1024 967
1025if test x$support_afterimage = xyes; then 968if test x$support_afterimage = xyes; then
1026 echo " AfterImage support: yes" 969 echo " AfterImage support: yes"
1027fi 970fi
1028 971
1029if test x$support_afterstep = xyes; then 972dnl if test x$support_afterstep = xyes; then
1030 echo " AfterStep integration: yes" 973dnl echo " AfterStep integration: yes"
1031fi 974dnl fi
1032 975
1033if test x$term != x; then 976if test x$term != x; then
1034 echo " set TERM to: $term" 977 echo " set TERM to: $term"
1035fi 978fi
1036if test x$terminfo != x; then 979if test x$terminfo != x; then

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines