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.88 by ayin, Mon Dec 10 23:27:49 2007 UTC vs.
Revision 1.105 by ayin, Sun Jan 27 22:48:31 2008 UTC

11 11
12dnl RXVT version 12dnl RXVT version
13changequote(, )dnl 13changequote(, )dnl
14VERSION=`sed -n -e 's/^.*[ \t]VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` 14VERSION=`sed -n -e 's/^.*[ \t]VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
15DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` 15DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
16dnl LIBVERSION=`sed -n -e 's/^.*[ \t]LIBVERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
17changequote([, ])dnl 16changequote([, ])dnl
18AC_SUBST(VERSION)dnl 17AC_SUBST(VERSION)dnl
19AC_SUBST(DATE)dnl 18AC_SUBST(DATE)dnl
20AC_SUBST(LSMDATE)dnl
21AC_SUBST(LIBVERSION)dnl
22 19
23echo "" 20echo ""
24echo "configuring for rxvt $VERSION" 21echo "configuring for rxvt $VERSION"
25echo "" 22echo ""
26 23
31AC_PROG_CXX 28AC_PROG_CXX
32AC_PROG_CPP 29AC_PROG_CPP
33AC_PROG_INSTALL 30AC_PROG_INSTALL
34 31
35AC_AIX 32AC_AIX
33AC_GNU_SOURCE
36AC_ISC_POSIX 34AC_ISC_POSIX
37AC_LANG(C++) 35AC_LANG(C++)
38 36
39dnl check wether we can link with gcc -lsupc++ 37dnl check wether we can link with gcc -lsupc++
40if test x$GCC = xyes && test x$GXX = xyes; then 38if test x$GCC = xyes && test x$GXX = xyes; then
69 CXXFLAGS="-O" 67 CXXFLAGS="-O"
70 fi 68 fi
71 CFLAGS="$CXXFLAGS" 69 CFLAGS="$CXXFLAGS"
72fi 70fi
73 71
74AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.)
75
76case $host in 72case $host in
77 *-*-solaris* ) 73 *-*-solaris* )
78 AC_DEFINE(_XOPEN_SOURCE, 500, Needed to get declarations for msg_control and msg_controllen on Solaris) 74 AC_DEFINE(_XOPEN_SOURCE, 500, Needed to get declarations for msg_control and msg_controllen on Solaris)
79 ;; 75 ;;
80esac 76esac
81 77
82dnl if test x$GXX = xyes; then
83dnl CXXFLAGS="$CXXFLAGS" dnl I once had -fno-exceptions, but I am using them now...
84dnl fi
85
86dnl# FreeBSD needs to link libxpg4 78dnl# FreeBSD needs to link libxpg4
87AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])]) 79AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])])
88 80
89dnl# solaris needs to link libnsl and socket 81dnl# solaris needs to link libnsl and socket
90AC_CHECK_FUNC(gethostbyname, [], [AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"])]) 82AC_CHECK_FUNC(gethostbyname, [], [AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"])])
91AC_CHECK_FUNC(socket, [], [AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"])]) 83AC_CHECK_FUNC(socket, [], [AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"])])
92
93dnl AC_ENABLE_SHARED(no)dnl# libtool
94dnl AC_ENABLE_STATIC(yes)dnl# libtool
95dnl AC_PROG_LIBTOOL()dnl# libtool
96 84
97support_frills=yes 85support_frills=yes
98support_inheritpixmap=yes 86support_inheritpixmap=yes
99support_fading=yes 87support_fading=yes
100support_keepscrolling=yes 88support_keepscrolling=yes
104support_text_blink=yes 92support_text_blink=yes
105support_pointer_blank=yes 93support_pointer_blank=yes
106support_scroll_rxvt=yes 94support_scroll_rxvt=yes
107support_scroll_next=yes 95support_scroll_next=yes
108support_scroll_xterm=yes 96support_scroll_xterm=yes
109support_scroll_plain=yes
110support_xim=yes 97support_xim=yes
111support_afterimage=yes 98support_afterimage=yes
112support_afterstep=yes 99support_afterstep=yes
113support_xft=yes 100support_xft=yes
114support_unicode3=no 101support_unicode3=no
121 108
122dnl# -------------------------------------------------------------------------- 109dnl# --------------------------------------------------------------------------
123dnl# CHECKING COMMAND LINE OPTIONS 110dnl# CHECKING COMMAND LINE OPTIONS
124dnl# -------------------------------------------------------------------------- 111dnl# --------------------------------------------------------------------------
125 112
126if test "x$enable_shared" = xyes; then
127 AC_DEFINE(LIBRXVT, 1, Build shared library version - specify via configure only)
128 INSTALL_LIBRXVT=yes
129fi
130AC_SUBST(INSTALL_LIBRXVT)
131
132AC_ARG_ENABLE(everything, 113AC_ARG_ENABLE(everything,
133 [ --enable-everything enable standard non-multichoice features 114 [ --enable-everything enable standard non-multichoice features
134 NOTE: this option is order dependent], 115 NOTE: this option is order dependent],
135 [ 116 [
136 if test x$enableval = xno; then 117 if test x$enableval = xno; then
137 support_frills=no 118 support_frills=no
138 support_inheritpixmap=no 119 support_inheritpixmap=no
139 support_fading=no 120 support_fading=no
145 support_text_blink=no 126 support_text_blink=no
146 support_pointer_blank=no 127 support_pointer_blank=no
147 support_scroll_rxvt=no 128 support_scroll_rxvt=no
148 support_scroll_next=no 129 support_scroll_next=no
149 support_scroll_xterm=no 130 support_scroll_xterm=no
150 support_scroll_plain=no
151 support_utmp=no 131 support_utmp=no
152 support_wtmp=no 132 support_wtmp=no
153 support_xim=no 133 support_xim=no
154 support_afterimage=no 134 support_afterimage=no
155 support_afterstep=no 135 support_afterstep=no
174 support_text_blink=yes 154 support_text_blink=yes
175 support_pointer_blank=yes 155 support_pointer_blank=yes
176 support_scroll_rxvt=yes 156 support_scroll_rxvt=yes
177 support_scroll_next=yes 157 support_scroll_next=yes
178 support_scroll_xterm=yes 158 support_scroll_xterm=yes
179 support_scroll_plain=yes
180 support_utmp=yes 159 support_utmp=yes
181 support_wtmp=yes 160 support_wtmp=yes
182 support_xim=yes 161 support_xim=yes
183 support_afterimage=yes 162 support_afterimage=yes
184 support_afterstep=yes 163 support_afterstep=yes
232 [if test x$enableval = xyes -o x$enableval = xno; then 211 [if test x$enableval = xyes -o x$enableval = xno; then
233 support_styles=$enableval 212 support_styles=$enableval
234 fi]) 213 fi])
235 214
236AC_ARG_ENABLE(afterimage, 215AC_ARG_ENABLE(afterimage,
237 [ --enable-afterimage enable integration with libAfterImage for background images], 216 [ --enable-afterimage enable integration with libAfterImage for background images],
238 [if test x$enableval = xyes -o x$enableval = xno; then 217 [if test x$enableval = xyes -o x$enableval = xno; then
239 support_afterimage=$enableval 218 support_afterimage=$enableval
240 fi]) 219 fi])
241 220
242AC_ARG_WITH(afterimage_config, 221AC_ARG_WITH(afterimage_config,
277 256
278AC_ARG_ENABLE(xterm-scroll, 257AC_ARG_ENABLE(xterm-scroll,
279 [ --enable-xterm-scroll enable Xterm style scrollbar], 258 [ --enable-xterm-scroll enable Xterm style scrollbar],
280 [if test x$enableval = xyes -o x$enableval = xno; then 259 [if test x$enableval = xyes -o x$enableval = xno; then
281 support_scroll_xterm=$enableval 260 support_scroll_xterm=$enableval
282 fi])
283
284AC_ARG_ENABLE(plain-scroll,
285 [ --enable-plain-scroll enable plain style scrollbar],
286 [if test x$enableval = xyes -o x$enableval = xno; then
287 support_scroll_plain=$enableval
288 fi]) 261 fi])
289 262
290AC_ARG_ENABLE(perl, 263AC_ARG_ENABLE(perl,
291 [ --enable-perl enable embedded perl interpreter], 264 [ --enable-perl enable embedded perl interpreter],
292 [if test x$enableval = xyes -o x$enableval = xno; then 265 [if test x$enableval = xyes -o x$enableval = xno; then
481 454
482dnl# -------------------------------------------------------------------------- 455dnl# --------------------------------------------------------------------------
483dnl# CHECKING FOR HEADER FILES 456dnl# CHECKING FOR HEADER FILES
484dnl# -------------------------------------------------------------------------- 457dnl# --------------------------------------------------------------------------
485AC_CHECK_HEADERS( \ 458AC_CHECK_HEADERS( \
486 assert.h \
487 fcntl.h \
488 stdarg.h \
489 stdlib.h \
490 string.h \
491 termios.h \
492 unistd.h \
493 sys/byteorder.h \ 459 sys/byteorder.h \
494 sys/ioctl.h \ 460 sys/ioctl.h \
495 sys/select.h \
496 sys/sockio.h \ 461 sys/sockio.h \
497 sys/strredir.h \ 462 sys/strredir.h \
498 sys/time.h \
499 stdint.h \ 463 stdint.h \
500 wchar.h \ 464 wchar.h \
501 cwchar \ 465 cwchar \
502 clocale \
503) 466)
504
505dnl# check to allow both <termios.h> and <sys/ioctl.h>
506AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl,
507[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
508#include <sys/ioctl.h>
509#ifdef HAVE_TERMIOS_H
510#include <termios.h>
511#endif]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])])
512 467
513AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, 468AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer,
514[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) 469[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])])
515if test x$rxvt_cv_xpointer = xyes; then 470if test x$rxvt_cv_xpointer = xyes; then
516 AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) 471 AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef)
534dnl# -------------------------------------------------------------------------- 489dnl# --------------------------------------------------------------------------
535dnl# CHECKING FOR MISSING TYPEDEFS 490dnl# CHECKING FOR MISSING TYPEDEFS
536dnl# -------------------------------------------------------------------------- 491dnl# --------------------------------------------------------------------------
537dnl# Missing typedefs and replacements 492dnl# Missing typedefs and replacements
538AC_TYPE_MODE_T 493AC_TYPE_MODE_T
539dnl> AC_CHECK_TYPE(umode_t, int)
540dnl> AC_CHECK_TYPE(off_t, long)
541AC_TYPE_PID_T 494AC_TYPE_PID_T
542AC_TYPE_UID_T 495AC_TYPE_UID_T
543 496AC_TYPE_INT16_T
544AC_CHECK_SIZEOF(short, 2) 497AC_TYPE_UINT16_T
545AC_CHECK_SIZEOF(int, 4) 498AC_TYPE_INT32_T
546dnl AC_CHECK_SIZEOF(long, 4) 499AC_TYPE_UINT32_T
547AC_CHECK_SIZEOF(long long, 8)
548AC_CHECK_SIZEOF(int *, 4)
549
550dnl# see usage below
551AC_DEFUN([RXVT_CHECK_SIZE],
552 [AC_CACHE_CHECK([for $2], $1,
553 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[$2 dummy;]])],[$1=yes],[dnl
554if test "$ac_cv_sizeof_char" -ge $3; then
555 $1="$4 char"
556else
557 if test "$ac_cv_sizeof_short" -ge $3; then
558 $1="$4 short"
559 else
560 if test "$ac_cv_sizeof_int" -ge $3; then
561 $1="$4 int"
562 else
563 if test "$ac_cv_sizeof_long" -ge $3; then
564 $1="$4 long"
565 else
566 if test "$ac_cv_sizeof_long_long" -ge $3; then
567 $1="$4 long long"
568 else
569 $1="$4 $5" # we _must_ have a (possibly wrong) default
570 fi
571 fi
572 fi
573 fi
574fi])])]
575if test x"$$1" != xyes; then
576 $6="typedef $$1 $2;"
577else
578 if test x"$4" = x; then
579 $6="/* typedef $5 $2; */"
580 else
581 $6="/* typedef $4 $5 $2; */"
582 fi
583fi dnl
584)
585dnl#
586dnl# Look for types the system may know about anyway.
587dnl#
588RXVT_CHECK_SIZE(rxvt_cv_int16_t, int16_t, 2, , short, rxvt_int16_typedef)
589AC_SUBST(rxvt_int16_typedef)
590RXVT_CHECK_SIZE(rxvt_cv_uint16_t, uint16_t, 2, unsigned, short, rxvt_uint16_typedef)
591AC_SUBST(rxvt_uint16_typedef)
592RXVT_CHECK_SIZE(rxvt_cv_int32_t, int32_t, 4, , int, rxvt_int32_typedef)
593AC_SUBST(rxvt_int32_typedef)
594RXVT_CHECK_SIZE(rxvt_cv_uint32_t, uint32_t, 4, unsigned, int, rxvt_uint32_typedef)
595AC_SUBST(rxvt_uint32_typedef)
596dnl RXVT_CHECK_SIZE(rxvt_cv_int64_t, int64_t, 8, , long long, rxvt_int64_typedef)
597dnl AC_SUBST(rxvt_int64_typedef)
598dnl RXVT_CHECK_SIZE(rxvt_cv_uint64_t, uint64_t, 8, unsigned, long long, rxvt_uint64_typedef)
599dnl AC_SUBST(rxvt_uint64_typedef)
600dnl#
601dnl# Now look for another we use
602dnl#
603if test "$ac_cv_sizeof_int_p" -eq 8; then
604 rxvt_intp_define="#define intp_t int64_t"
605 rxvt_u_intp_define="#define u_intp_t u_int64_t"
606else
607 if test "$ac_cv_sizeof_int_p" -eq 4; then
608 rxvt_intp_define="#define intp_t int32_t"
609 rxvt_u_intp_define="#define u_intp_t u_int32_t"
610 else
611 if test "$ac_cv_sizeof_int_p" -eq 2; then
612 rxvt_intp_define="#define intp_t int16_t"
613 rxvt_u_intp_define="#define u_intp_t u_int16_t"
614 else
615 rxvt_intp_define="#error set intp_t"
616 rxvt_u_intp_define="#error set u_intp_t"
617 fi
618 fi
619fi
620AC_SUBST(rxvt_intp_define)
621AC_SUBST(rxvt_u_intp_define)
622 500
623dnl# -------------------------------------------------------------------------- 501dnl# --------------------------------------------------------------------------
624dnl# CHECKING FOR LIBRARY FUNCTIONS 502dnl# CHECKING FOR LIBRARY FUNCTIONS
625dnl# -------------------------------------------------------------------------- 503dnl# --------------------------------------------------------------------------
626AC_CHECK_FUNCS(unsetenv) 504AC_CHECK_FUNCS(unsetenv)
759 637
760dnl if test x$support_afterstep = xyes; then 638dnl if test x$support_afterstep = xyes; then
761dnl AC_DEFINE(AFTERSTEP_INTEGRATION, 1, Define if you want to integrate with AfterStep window manager) 639dnl AC_DEFINE(AFTERSTEP_INTEGRATION, 1, Define if you want to integrate with AfterStep window manager)
762dnl fi 640dnl fi
763 641
642scrolltypes=plain
643AC_DEFINE(PLAIN_SCROLLBAR, 1, Support plain style scrollbars)
644
764if test x$support_scroll_rxvt = xyes; then 645if test x$support_scroll_rxvt = xyes; then
765 AC_DEFINE(RXVT_SCROLLBAR, 1, Support Rxvt original style scrollbars) 646 AC_DEFINE(RXVT_SCROLLBAR, 1, Support Rxvt original style scrollbars)
766 scrolltypes="rxvt" 647 scrolltypes="$scrolltypes rxvt"
767fi 648fi
768if test x$support_scroll_next = xyes; then 649if test x$support_scroll_next = xyes; then
769 AC_DEFINE(NEXT_SCROLLBAR, 1, Support NeXT style scrollbars) 650 AC_DEFINE(NEXT_SCROLLBAR, 1, Support NeXT style scrollbars)
770 scrolltypes="$scrolltypes next" 651 scrolltypes="$scrolltypes next"
771fi 652fi
772if test x$support_scroll_xterm = xyes; then 653if test x$support_scroll_xterm = xyes; then
773 AC_DEFINE(XTERM_SCROLLBAR, 1, Support Xterm style scrollbars) 654 AC_DEFINE(XTERM_SCROLLBAR, 1, Support Xterm style scrollbars)
774 scrolltypes="$scrolltypes xterm" 655 scrolltypes="$scrolltypes xterm"
775fi
776if test x$support_scroll_plain = xyes; then
777 AC_DEFINE(PLAIN_SCROLLBAR, 1, Support plain style scrollbars)
778 scrolltypes="$scrolltypes plain"
779fi 656fi
780if test x$support_pointer_blank = xyes; then 657if test x$support_pointer_blank = xyes; then
781 AC_DEFINE(POINTER_BLANK, 1, Define if you want hide the pointer while typing) 658 AC_DEFINE(POINTER_BLANK, 1, Define if you want hide the pointer while typing)
782fi 659fi
783if test x$support_text_blink = xyes; then 660if test x$support_text_blink = xyes; then
814 691
815 save_CXXFLAGS="$CXXFLAGS" 692 save_CXXFLAGS="$CXXFLAGS"
816 save_LIBS="$LIBS" 693 save_LIBS="$LIBS"
817 CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`" 694 CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`"
818 LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" 695 LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`"
819 AC_TRY_LINK([ 696 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
820#include <EXTERN.h> 697#include <EXTERN.h>
821#include <perl.h> 698#include <perl.h>
822#include <XSUB.h> 699#include <XSUB.h>
823],[ 700]], [[
824 PerlInterpreter *perl = perl_alloc (); 701 PerlInterpreter *perl = perl_alloc ();
825],[rxvt_perl_link=yes],[rxvt_perl_link=no]) 702]])],[rxvt_perl_link=yes],[rxvt_perl_link=no])
826 CXXFLAGS="$save_CXXFLAGS" 703 CXXFLAGS="$save_CXXFLAGS"
827 LIBS="$save_LIBS" 704 LIBS="$save_LIBS"
828 705
829 if test x$rxvt_perl_link = xyes; then 706 if test x$rxvt_perl_link = xyes; then
830 AC_MSG_RESULT(ok) 707 AC_MSG_RESULT(ok)
861AC_SUBST(AFTERIMAGE_CFLAGS) 738AC_SUBST(AFTERIMAGE_CFLAGS)
862AC_SUBST(AFTERIMAGE_LIBS) 739AC_SUBST(AFTERIMAGE_LIBS)
863 740
864AC_ARG_PROGRAM 741AC_ARG_PROGRAM
865 742
866dnl# test for "sun" or "__sun__" before include sys_ioctl
867
868dnl# revert HAVE_BLAH_H into a "#include <blah.h>"
869AC_DEFUN([RXVT_DEFINE_TO_INCLUDE], dnl
870[if test "$$3" = "$4" -o "$$5" = "$6"; then
871 $1="#include <$2>"
872else
873 $1="/* #include <$2> */"
874fi dnl
875AC_SUBST($1)])
876
877RXVT_DEFINE_TO_INCLUDE(include_stdint_h, stdint.h, ac_cv_header_stdint_h, yes, notset, dontmatch)
878RXVT_DEFINE_TO_INCLUDE(include_stdarg_h, cstdarg, ac_cv_header_stdarg_h, yes, notset, dontmatch)
879RXVT_DEFINE_TO_INCLUDE(include_stdlib_h, cstdlib, ac_cv_header_stdlib_h, yes, notset, dontmatch)
880RXVT_DEFINE_TO_INCLUDE(include_unistd_h, unistd.h, ac_cv_header_unistd_h, yes, notset, dontmatch)
881RXVT_DEFINE_TO_INCLUDE(include_string_h, cstring, ac_cv_header_string_h, yes, notset, dontmatch)
882RXVT_DEFINE_TO_INCLUDE(include_fcntl_h, fcntl.h, ac_cv_header_fcntl_h, yes, notset, dontmatch)
883RXVT_DEFINE_TO_INCLUDE(include_util_h, util.h, ac_cv_header_util_h, yes, notset, dontmatch)
884RXVT_DEFINE_TO_INCLUDE(include_assert_h, assert.h, ac_cv_header_assert_h, yes, notset, dontmatch)
885RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch)
886RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch)
887RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch)
888RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch)
889RXVT_DEFINE_TO_INCLUDE(include_time_h, time.h, ac_cv_header_sys_time_h, no, ac_cv_header_time, yes)
890
891AC_CONFIG_FILES([Makefile \ 743AC_CONFIG_FILES([Makefile \
892doc/Makefile \ 744doc/Makefile \
893src/Makefile \ 745src/Makefile \
894src/rxvtlib.h \
895]) 746])
896AC_OUTPUT 747AC_OUTPUT
897 748
898echo "Configuration: 749echo "Configuration:
899 750

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines