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.104 by root, Sun Jan 6 21:34:57 2008 UTC vs.
Revision 1.115 by sf-exg, Thu Sep 2 15:48:10 2010 UTC

32AC_AIX 32AC_AIX
33AC_GNU_SOURCE 33AC_GNU_SOURCE
34AC_ISC_POSIX 34AC_ISC_POSIX
35AC_LANG(C++) 35AC_LANG(C++)
36 36
37dnl check wether we can link with gcc -lsupc++ 37dnl check whether we can link with gcc -lsupc++
38if test x$GCC = xyes && test x$GXX = xyes; then 38if test x$GCC = xyes && test x$GXX = xyes; then
39 dnl FreeBSD (at least up to 5.3) has a broken GCC, workaround it 39 dnl FreeBSD (at least up to 5.3) has a broken GCC, workaround it
40 AC_MSG_CHECKING([for working libsupc++]) 40 AC_MSG_CHECKING([for working libsupc++])
41 save_CXX="$CXX" 41 save_CXX="$CXX"
42 save_LIBS="$LIBS" 42 save_LIBS="$LIBS"
74 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)
75 ;; 75 ;;
76esac 76esac
77 77
78dnl# FreeBSD needs to link libxpg4 78dnl# FreeBSD needs to link libxpg4
79AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])]) 79AC_SEARCH_LIBS(setlocale, xpg4)
80 80
81dnl# solaris needs to link libnsl and socket 81dnl# solaris needs to link libnsl and socket
82AC_CHECK_FUNC(gethostbyname, [], [AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"])]) 82AC_SEARCH_LIBS(gethostbyname, nsl)
83AC_CHECK_FUNC(socket, [], [AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"])]) 83AC_SEARCH_LIBS(socket, socket)
84 84
85support_frills=yes 85support_frills=yes
86support_inheritpixmap=yes 86support_inheritpixmap=yes
87support_fading=yes 87support_fading=yes
88support_keepscrolling=yes 88support_keepscrolling=yes
92support_text_blink=yes 92support_text_blink=yes
93support_pointer_blank=yes 93support_pointer_blank=yes
94support_scroll_rxvt=yes 94support_scroll_rxvt=yes
95support_scroll_next=yes 95support_scroll_next=yes
96support_scroll_xterm=yes 96support_scroll_xterm=yes
97support_scroll_plain=yes
98support_xim=yes 97support_xim=yes
99support_afterimage=yes 98support_afterimage=yes
100support_afterstep=yes 99support_afterstep=yes
101support_xft=yes 100support_xft=yes
102support_unicode3=no 101support_unicode3=no
127 support_text_blink=no 126 support_text_blink=no
128 support_pointer_blank=no 127 support_pointer_blank=no
129 support_scroll_rxvt=no 128 support_scroll_rxvt=no
130 support_scroll_next=no 129 support_scroll_next=no
131 support_scroll_xterm=no 130 support_scroll_xterm=no
132 support_scroll_plain=no
133 support_utmp=no 131 support_utmp=no
134 support_wtmp=no 132 support_wtmp=no
135 support_xim=no 133 support_xim=no
136 support_afterimage=no 134 support_afterimage=no
137 support_afterstep=no 135 support_afterstep=no
156 support_text_blink=yes 154 support_text_blink=yes
157 support_pointer_blank=yes 155 support_pointer_blank=yes
158 support_scroll_rxvt=yes 156 support_scroll_rxvt=yes
159 support_scroll_next=yes 157 support_scroll_next=yes
160 support_scroll_xterm=yes 158 support_scroll_xterm=yes
161 support_scroll_plain=yes
162 support_utmp=yes 159 support_utmp=yes
163 support_wtmp=yes 160 support_wtmp=yes
164 support_xim=yes 161 support_xim=yes
165 support_afterimage=yes 162 support_afterimage=yes
166 support_afterstep=yes 163 support_afterstep=yes
173 support_perl=yes 170 support_perl=yes
174 codesets=all 171 codesets=all
175 fi 172 fi
176 ]) 173 ])
177 174
175ASSERTIONS=no
176AC_ARG_ENABLE(assert,
177 [ --enable-assert enable assertions],
178 [if test x$enableval = xyes; then
179 ASSERTIONS=yes
180 fi])
181if test x$ASSERTIONS = xno; then
182 AC_DEFINE(NDEBUG, 1, Disable assertions (good for debugging))
183fi
184
178WARNINGS=no 185WARNINGS=no
179AC_ARG_ENABLE(warnings, 186AC_ARG_ENABLE(warnings,
180 [ --enable-warnings turn on g++ warnings], 187 [ --enable-warnings turn on g++ warnings],
181 [if test x$enableval = xyes; then 188 [if test x$enableval = xyes; then
182 WARNINGS=yes 189 WARNINGS=yes
189 else 196 else
190 CXXFLAGS="$CXXFLAGS -w" 197 CXXFLAGS="$CXXFLAGS -w"
191 fi 198 fi
192fi 199fi
193 200
201support_256_color=no
202AC_ARG_ENABLE(256-color,
203 [ --enable-256-color enable 256-color support],
204 [if test x$enableval = xyes; then
205 support_256_color=yes
206 fi])
207if test x$support_256_color = xyes; then
208 AC_DEFINE(USE_256_COLORS, 1, Define if you want 256-color support)
209fi
210
194AC_ARG_ENABLE(unicode3, 211AC_ARG_ENABLE(unicode3,
195 [ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters], 212 [ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters],
196 [if test x$enableval = xyes -o x$enableval = xno; then 213 [if test x$enableval = xyes -o x$enableval = xno; then
197 support_unicode3=$enableval 214 support_unicode3=$enableval
198 fi]) 215 fi])
231dnl [ --enable-afterstep enable integration with AfterStep window manager], 248dnl [ --enable-afterstep enable integration with AfterStep window manager],
232dnl [if test x$enableval = xyes -o x$enableval = xno; then 249dnl [if test x$enableval = xyes -o x$enableval = xno; then
233dnl support_afterstep=$enableval 250dnl support_afterstep=$enableval
234dnl fi]) 251dnl fi])
235 252
253AC_ARG_ENABLE(pixbuf,
254 [ --enable-pixbuf enable integration with gdk-pixbuf for background images],
255 [if test x$enableval = xyes -o x$enableval = xno; then
256 support_pixbuf=$enableval
257 fi])
258
236AC_ARG_ENABLE(transparency, 259AC_ARG_ENABLE(transparency,
237 [ --enable-transparency enable transparent backgrounds], 260 [ --enable-transparency enable transparent backgrounds],
238 [if test x$enableval = xyes -o x$enableval = xno; then 261 [if test x$enableval = xyes -o x$enableval = xno; then
239 support_inheritpixmap=$enableval 262 support_inheritpixmap=$enableval
240 fi]) 263 fi])
259 282
260AC_ARG_ENABLE(xterm-scroll, 283AC_ARG_ENABLE(xterm-scroll,
261 [ --enable-xterm-scroll enable Xterm style scrollbar], 284 [ --enable-xterm-scroll enable Xterm style scrollbar],
262 [if test x$enableval = xyes -o x$enableval = xno; then 285 [if test x$enableval = xyes -o x$enableval = xno; then
263 support_scroll_xterm=$enableval 286 support_scroll_xterm=$enableval
264 fi])
265
266AC_ARG_ENABLE(plain-scroll,
267 [ --enable-plain-scroll enable plain style scrollbar],
268 [if test x$enableval = xyes -o x$enableval = xno; then
269 support_scroll_plain=$enableval
270 fi]) 287 fi])
271 288
272AC_ARG_ENABLE(perl, 289AC_ARG_ENABLE(perl,
273 [ --enable-perl enable embedded perl interpreter], 290 [ --enable-perl enable embedded perl interpreter],
274 [if test x$enableval = xyes -o x$enableval = xno; then 291 [if test x$enableval = xyes -o x$enableval = xno; then
338AC_ARG_WITH(name, 355AC_ARG_WITH(name,
339 [ --with-name=NAME set the basename for the installed binaries (default: urxvt)], 356 [ --with-name=NAME set the basename for the installed binaries (default: urxvt)],
340 [RXVTNAME="$withval"]) 357 [RXVTNAME="$withval"])
341AC_DEFINE_UNQUOTED(RXVTNAME,"$RXVTNAME", [Binary base name]) 358AC_DEFINE_UNQUOTED(RXVTNAME,"$RXVTNAME", [Binary base name])
342 359
343RXVTNAME=`echo "$RXVTNAME"|sed "$program_transform_name"`
344AC_SUBST(RXVTNAME) 360AC_SUBST(RXVTNAME)
345 361
346AC_ARG_ENABLE(swapscreen, 362AC_ARG_ENABLE(swapscreen,
347 [ --disable-swapscreen disable swap screen support], 363 [ --disable-swapscreen disable swap screen support],
348 [if test x$enableval = xno; then 364 [if test x$enableval = xno; then
396 [if test x$enableval = xyes -o x$enableval = xno; then 412 [if test x$enableval = xyes -o x$enableval = xno; then
397 support_text_blink=$enableval 413 support_text_blink=$enableval
398 fi]) 414 fi])
399 415
400AC_ARG_ENABLE(pointer-blank, 416AC_ARG_ENABLE(pointer-blank,
401 [ --enable-pointer-blank enable pointer blank when typing or inactive pointer], 417 [ --enable-pointer-blank enable pointer blanking when typing or inactive],
402 [if test x$enableval = xyes -o x$enableval = xno; then 418 [if test x$enableval = xyes -o x$enableval = xno; then
403 support_pointer_blank=$enableval 419 support_pointer_blank=$enableval
404 fi]) 420 fi])
405 421
406AC_ARG_WITH(term, 422AC_ARG_WITH(term,
423dnl# -------------------------------------------------------------------------- 439dnl# --------------------------------------------------------------------------
424 440
425AC_PATH_PROG(TIC, tic, :) 441AC_PATH_PROG(TIC, tic, :)
426 442
427AC_PATH_XTRA 443AC_PATH_XTRA
444
445PIXBUF_CFLAGS=
446PIXBUF_LIBS=
447
448if test x$support_pixbuf = xyes; then
449 support_pixbuf=no
450 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
451 AC_MSG_CHECKING(for gdk-pixbuf)
452 if test $PKG_CONFIG != no && $PKG_CONFIG --exists gdk-pixbuf-xlib-2.0; then
453 PIXBUF_CFLAGS="`$PKG_CONFIG gdk-pixbuf-xlib-2.0 --cflags`"
454 PIXBUF_LIBS="`$PKG_CONFIG gdk-pixbuf-xlib-2.0 --libs`"
455 support_pixbuf=yes
456 fi
457
458 if test x$support_pixbuf = xyes; then
459 AC_MSG_RESULT(ok)
460 support_afterimage=no
461 AC_DEFINE(HAVE_PIXBUF, 1, Define if you want to use gdk-pixbuf for image processing)
462 AC_DEFINE(BG_IMAGE_FROM_FILE, 1, Define if you want to have sexy-looking background pixmaps.)
463 else
464 AC_MSG_RESULT(no)
465 fi
466fi
467
468AC_SUBST(PIXBUF_CFLAGS)
469AC_SUBST(PIXBUF_LIBS)
428 470
429AFTERIMAGE_CFLAGS= 471AFTERIMAGE_CFLAGS=
430AFTERIMAGE_LIBS= 472AFTERIMAGE_LIBS=
431AFTERIMAGE_VERSION= 473AFTERIMAGE_VERSION=
432 474
453 fi 495 fi
454 fi 496 fi
455 fi 497 fi
456 if test "x$support_afterimage" = "xyes"; then 498 if test "x$support_afterimage" = "xyes"; then
457 AC_MSG_RESULT($AFTERIMAGE_LIBS) 499 AC_MSG_RESULT($AFTERIMAGE_LIBS)
500 AC_DEFINE(HAVE_AFTERIMAGE, 1, Define if you want to use libAfterImage for image processing)
501 AC_DEFINE(BG_IMAGE_FROM_FILE, 1, Define if you want to have sexy-looking background pixmaps.)
458 else 502 else
459 AC_MSG_RESULT(no) 503 AC_MSG_RESULT(no)
460 fi 504 fi
461 fi 505 fi
462fi 506fi
507
508AC_SUBST(AFTERIMAGE_CFLAGS)
509AC_SUBST(AFTERIMAGE_LIBS)
463 510
464dnl# -------------------------------------------------------------------------- 511dnl# --------------------------------------------------------------------------
465dnl# CHECKING FOR HEADER FILES 512dnl# CHECKING FOR HEADER FILES
466dnl# -------------------------------------------------------------------------- 513dnl# --------------------------------------------------------------------------
467AC_CHECK_HEADERS( \ 514AC_CHECK_HEADERS( \
478[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) 525[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])])
479if test x$rxvt_cv_xpointer = xyes; then 526if test x$rxvt_cv_xpointer = xyes; then
480 AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) 527 AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef)
481fi 528fi
482 529
483AC_CACHE_CHECK([for XLIB_ILLEGAL_ACCESS], rxvt_xlib_illegal_access, 530AC_CACHE_CHECK([for XLIB_ILLEGAL_ACCESS], rxvt_cv_xlib_illegal_access,
484[AC_COMPILE_IFELSE( 531[AC_COMPILE_IFELSE(
485 [AC_LANG_PROGRAM([ 532 [AC_LANG_PROGRAM([
486#define XLIB_ILLEGAL_ACCESS 533#define XLIB_ILLEGAL_ACCESS
487#include <X11/Xlib.h> 534#include <X11/Xlib.h>
488 ],[ 535 ],[
489 Display *dpy; 536 Display *dpy;
490 dpy->xdefaults = (char *)0; 537 dpy->xdefaults = (char *)0;
491 ])], 538 ])],
492 [rxvt_xlib_illegal_access=yes],[rxvt_xlib_illegal_access=no] 539 [rxvt_cv_xlib_illegal_access=yes],[rxvt_cv_xlib_illegal_access=no]
493)]) 540)])
494if test x$rxvt_xlib_illegal_access = xyes; then 541if test x$rxvt_cv_xlib_illegal_access = xyes; then
495 AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) 542 AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it)
496fi 543fi
497 544
498dnl# -------------------------------------------------------------------------- 545dnl# --------------------------------------------------------------------------
499dnl# CHECKING FOR MISSING TYPEDEFS 546dnl# CHECKING FOR MISSING TYPEDEFS
536 exit (1);}]])],[dnl 583 exit (1);}]])],[dnl
537 rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl 584 rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl
538 :])]) 585 :])])
539 if test x$rxvt_cv_func_xlocale = xyes; then 586 if test x$rxvt_cv_func_xlocale = xyes; then
540 AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) 587 AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input)
541 AC_CACHE_CHECK(for broken XIM callback, rxvt_broken_ximcb, 588 AC_CACHE_CHECK(for broken XIM callback, rxvt_cv_broken_ximcb,
542 [AC_COMPILE_IFELSE([ 589 [AC_COMPILE_IFELSE([
543 #include <X11/Xlib.h> 590 #include <X11/Xlib.h>
544 591
545 void im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3); 592 void im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3);
546 593
547 void f() { 594 void f() {
548 XIMCallback cb; 595 XIMCallback cb;
549 cb.callback = im_destroy_cb; 596 cb.callback = im_destroy_cb;
550 } 597 }
551 ],rxvt_broken_ximcb=yes,rxvt_broken_ximcb=no)]) 598 ],rxvt_cv_broken_ximcb=yes,rxvt_cv_broken_ximcb=no)])
552 599
553 if test x$rxvt_broken_ximcb = xyes; then 600 if test x$rxvt_cv_broken_ximcb = xyes; then
554 AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.) 601 AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.)
555 fi 602 fi
556 fi 603 fi
557fi 604fi
558 605
637 AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll) 684 AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll)
638fi 685fi
639if test x$support_mouseslipwheel = xyes; then 686if test x$support_mouseslipwheel = xyes; then
640 AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling) 687 AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling)
641fi 688fi
642if test x$support_afterimage = xyes; then
643 AC_DEFINE(HAVE_AFTERIMAGE, 1, Define if you want to use libAfterImage for image processing)
644 AC_DEFINE(BG_IMAGE_FROM_FILE, 1, Define if you want to have sexy-looking background pixmaps. Needs libAfterImage)
645fi
646 689
647dnl if test x$support_afterstep = xyes; then 690dnl if test x$support_afterstep = xyes; then
648dnl AC_DEFINE(AFTERSTEP_INTEGRATION, 1, Define if you want to integrate with AfterStep window manager) 691dnl AC_DEFINE(AFTERSTEP_INTEGRATION, 1, Define if you want to integrate with AfterStep window manager)
649dnl fi 692dnl fi
650 693
694scrolltypes=plain
695AC_DEFINE(PLAIN_SCROLLBAR, 1, Support plain style scrollbars)
696
651if test x$support_scroll_rxvt = xyes; then 697if test x$support_scroll_rxvt = xyes; then
652 AC_DEFINE(RXVT_SCROLLBAR, 1, Support Rxvt original style scrollbars) 698 AC_DEFINE(RXVT_SCROLLBAR, 1, Support Rxvt original style scrollbars)
653 scrolltypes="rxvt" 699 scrolltypes="$scrolltypes rxvt"
654fi 700fi
655if test x$support_scroll_next = xyes; then 701if test x$support_scroll_next = xyes; then
656 AC_DEFINE(NEXT_SCROLLBAR, 1, Support NeXT style scrollbars) 702 AC_DEFINE(NEXT_SCROLLBAR, 1, Support NeXT style scrollbars)
657 scrolltypes="$scrolltypes next" 703 scrolltypes="$scrolltypes next"
658fi 704fi
659if test x$support_scroll_xterm = xyes; then 705if test x$support_scroll_xterm = xyes; then
660 AC_DEFINE(XTERM_SCROLLBAR, 1, Support Xterm style scrollbars) 706 AC_DEFINE(XTERM_SCROLLBAR, 1, Support Xterm style scrollbars)
661 scrolltypes="$scrolltypes xterm" 707 scrolltypes="$scrolltypes xterm"
662fi
663if test x$support_scroll_plain = xyes; then
664 AC_DEFINE(PLAIN_SCROLLBAR, 1, Support plain style scrollbars)
665 scrolltypes="$scrolltypes plain"
666fi 708fi
667if test x$support_pointer_blank = xyes; then 709if test x$support_pointer_blank = xyes; then
668 AC_DEFINE(POINTER_BLANK, 1, Define if you want hide the pointer while typing) 710 AC_DEFINE(POINTER_BLANK, 1, Define if you want hide the pointer while typing)
669fi 711fi
670if test x$support_text_blink = xyes; then 712if test x$support_text_blink = xyes; then
733AC_SUBST(PERLPRIVLIBEXP) 775AC_SUBST(PERLPRIVLIBEXP)
734AC_SUBST(PERL) 776AC_SUBST(PERL)
735AC_SUBST(IF_PERL) 777AC_SUBST(IF_PERL)
736AC_SUBST(PERL_O) 778AC_SUBST(PERL_O)
737 779
738AC_SUBST(CFLAGS)
739AC_SUBST(CPPFLAGS)
740AC_SUBST(LDFLAGS)
741AC_SUBST(X_CFLAGS)
742
743dnl# Attack the libs
744AC_SUBST(LIBS)
745AC_SUBST(X_LIBS)
746AC_SUBST(X_EXTRA_LIBS)
747
748AC_SUBST(AFTERIMAGE_CFLAGS)
749AC_SUBST(AFTERIMAGE_LIBS)
750
751AC_ARG_PROGRAM
752 780
753AC_CONFIG_FILES([Makefile \ 781AC_CONFIG_FILES([Makefile \
754doc/Makefile \ 782doc/Makefile \
755src/Makefile \ 783src/Makefile \
756]) 784])

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines