… | |
… | |
11 | |
11 | |
12 | dnl RXVT version |
12 | dnl RXVT version |
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` |
|
|
17 | changequote([, ])dnl |
16 | changequote([, ])dnl |
18 | AC_SUBST(VERSION)dnl |
17 | AC_SUBST(VERSION)dnl |
19 | AC_SUBST(DATE)dnl |
18 | AC_SUBST(DATE)dnl |
20 | AC_SUBST(LSMDATE)dnl |
19 | |
21 | AC_SUBST(LIBVERSION)dnl |
|
|
22 | echo "" |
20 | echo "" |
23 | echo "configuring for rxvt $VERSION" |
21 | echo "configuring for rxvt $VERSION" |
24 | echo "" |
22 | echo "" |
25 | |
23 | |
26 | orig_CXXFLAGS="$CXXFLAGS" |
24 | orig_CXXFLAGS="$CXXFLAGS" |
27 | |
25 | |
28 | dnl# Checks for programs. |
26 | dnl# Checks for programs. |
29 | dnl AC_MAKE_SET |
|
|
30 | |
|
|
31 | AC_PROG_CC |
27 | AC_PROG_CC |
32 | AC_PROG_CXX |
28 | AC_PROG_CXX |
33 | AC_PROG_CPP |
29 | AC_PROG_CPP |
34 | AC_PROG_INSTALL |
30 | AC_PROG_INSTALL |
35 | |
31 | |
36 | AC_AIX |
32 | AC_AIX |
|
|
33 | AC_GNU_SOURCE |
37 | AC_ISC_POSIX |
34 | AC_ISC_POSIX |
38 | AC_LANG(C++) |
35 | AC_LANG(C++) |
39 | |
36 | |
40 | dnl check wether we can link with gcc -lsupc++ |
37 | dnl check whether we can link with gcc -lsupc++ |
41 | if test x$GCC = xyes && test x$GXX = xyes; then |
38 | if test x$GCC = xyes && test x$GXX = xyes; then |
42 | 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 |
43 | AC_MSG_CHECKING([for working libsupc++]) |
40 | AC_MSG_CHECKING([for working libsupc++]) |
44 | save_CXX="$CXX" |
41 | save_CXX="$CXX" |
45 | save_LIBS="$LIBS" |
42 | save_LIBS="$LIBS" |
… | |
… | |
62 | dnl# -------------------------------------------------------------------------- |
59 | dnl# -------------------------------------------------------------------------- |
63 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
60 | dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' |
64 | dnl# |
61 | dnl# |
65 | if test -z "$orig_CXXFLAGS"; then |
62 | if test -z "$orig_CXXFLAGS"; then |
66 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
63 | if test x$GCC = xyes && test "x$GXX" = xyes; then |
67 | CXXFLAGS="-g -O3 -fno-threadsafe-statics -fno-enforce-eh-specs" |
64 | CXXFLAGS="-g -O3 -fno-rtti -fvisibility-inlines-hidden -fno-threadsafe-statics -fno-enforce-eh-specs" |
68 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="-g -O3"]) |
65 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="-g -O3"]) |
69 | else |
66 | else |
70 | CXXFLAGS="-O" |
67 | CXXFLAGS="-O" |
71 | fi |
68 | fi |
72 | CFLAGS="$CXXFLAGS" |
69 | CFLAGS="$CXXFLAGS" |
73 | fi |
70 | fi |
74 | |
|
|
75 | AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.) |
|
|
76 | |
71 | |
77 | case $host in |
72 | case $host in |
78 | *-*-solaris* ) |
73 | *-*-solaris* ) |
79 | 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) |
80 | ;; |
75 | ;; |
81 | esac |
76 | esac |
82 | |
77 | |
83 | dnl if test x$GXX = xyes; then |
|
|
84 | dnl CXXFLAGS="$CXXFLAGS" dnl I once had -fno-exceptions, but I am using them now... |
|
|
85 | dnl fi |
|
|
86 | |
|
|
87 | dnl# FreeBSD needs to link libxpg4 |
78 | dnl# FreeBSD needs to link libxpg4 |
88 | AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])]) |
79 | AC_SEARCH_LIBS(setlocale, xpg4) |
89 | |
80 | |
90 | dnl# solaris needs to link libnsl and socket |
81 | dnl# solaris needs to link libnsl and socket |
91 | AC_CHECK_FUNC(gethostbyname, [], [AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"])]) |
82 | AC_SEARCH_LIBS(gethostbyname, nsl) |
92 | AC_CHECK_FUNC(socket, [], [AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"])]) |
83 | AC_SEARCH_LIBS(socket, socket) |
93 | |
|
|
94 | dnl AC_ENABLE_SHARED(no)dnl# libtool |
|
|
95 | dnl AC_ENABLE_STATIC(yes)dnl# libtool |
|
|
96 | dnl AC_PROG_LIBTOOL()dnl# libtool |
|
|
97 | |
84 | |
98 | support_frills=yes |
85 | support_frills=yes |
99 | support_inheritpixmap=yes |
86 | support_inheritpixmap=yes |
100 | support_fading=yes |
87 | support_fading=yes |
101 | support_keepscrolling=yes |
88 | support_keepscrolling=yes |
… | |
… | |
105 | support_text_blink=yes |
92 | support_text_blink=yes |
106 | support_pointer_blank=yes |
93 | support_pointer_blank=yes |
107 | support_scroll_rxvt=yes |
94 | support_scroll_rxvt=yes |
108 | support_scroll_next=yes |
95 | support_scroll_next=yes |
109 | support_scroll_xterm=yes |
96 | support_scroll_xterm=yes |
110 | support_scroll_plain=yes |
|
|
111 | support_xim=yes |
97 | support_xim=yes |
112 | support_afterimage=yes |
98 | support_afterimage=yes |
113 | support_afterstep=yes |
|
|
114 | support_xft=yes |
99 | support_xft=yes |
115 | support_unicode3=no |
100 | support_unicode3=no |
116 | support_combining=yes |
101 | support_combining=yes |
117 | support_8bitctrls=no |
102 | support_8bitctrls=no |
118 | support_iso14755=yes |
103 | support_iso14755=yes |
… | |
… | |
122 | |
107 | |
123 | dnl# -------------------------------------------------------------------------- |
108 | dnl# -------------------------------------------------------------------------- |
124 | dnl# CHECKING COMMAND LINE OPTIONS |
109 | dnl# CHECKING COMMAND LINE OPTIONS |
125 | dnl# -------------------------------------------------------------------------- |
110 | dnl# -------------------------------------------------------------------------- |
126 | |
111 | |
127 | if test "x$enable_shared" = xyes; then |
|
|
128 | AC_DEFINE(LIBRXVT, 1, Build shared library version - specify via configure only) |
|
|
129 | INSTALL_LIBRXVT=yes |
|
|
130 | fi |
|
|
131 | AC_SUBST(INSTALL_LIBRXVT) |
|
|
132 | |
|
|
133 | AC_ARG_ENABLE(everything, |
112 | AC_ARG_ENABLE(everything, |
134 | [ --enable-everything enable standard non-multichoice features |
113 | [ --enable-everything enable standard non-multichoice features |
135 | NOTE: this option is order dependent |
114 | NOTE: this option is order dependent], |
136 | NOTE: automatically enabled with --enable-shared], |
|
|
137 | [ |
115 | [ |
138 | if test x$enableval = xno; then |
116 | if test x$enableval = xno; then |
139 | support_frills=no |
117 | support_frills=no |
140 | support_inheritpixmap=no |
118 | support_inheritpixmap=no |
141 | support_fading=no |
119 | support_fading=no |
… | |
… | |
147 | support_text_blink=no |
125 | support_text_blink=no |
148 | support_pointer_blank=no |
126 | support_pointer_blank=no |
149 | support_scroll_rxvt=no |
127 | support_scroll_rxvt=no |
150 | support_scroll_next=no |
128 | support_scroll_next=no |
151 | support_scroll_xterm=no |
129 | support_scroll_xterm=no |
152 | support_scroll_plain=no |
|
|
153 | support_utmp=no |
130 | support_utmp=no |
154 | support_wtmp=no |
131 | support_wtmp=no |
155 | support_xim=no |
132 | support_xim=no |
156 | support_afterimage=no |
133 | support_afterimage=no |
157 | support_afterstep=no |
|
|
158 | support_xft=no |
134 | support_xft=no |
159 | support_unicode3=no |
135 | support_unicode3=no |
160 | support_combining=no |
136 | support_combining=no |
161 | support_8bitctrls=no |
137 | support_8bitctrls=no |
162 | support_iso14755=no |
138 | support_iso14755=no |
… | |
… | |
176 | support_text_blink=yes |
152 | support_text_blink=yes |
177 | support_pointer_blank=yes |
153 | support_pointer_blank=yes |
178 | support_scroll_rxvt=yes |
154 | support_scroll_rxvt=yes |
179 | support_scroll_next=yes |
155 | support_scroll_next=yes |
180 | support_scroll_xterm=yes |
156 | support_scroll_xterm=yes |
181 | support_scroll_plain=yes |
|
|
182 | support_utmp=yes |
157 | support_utmp=yes |
183 | support_wtmp=yes |
158 | support_wtmp=yes |
184 | support_xim=yes |
159 | support_xim=yes |
185 | support_afterimage=yes |
160 | support_afterimage=yes |
186 | support_afterstep=yes |
|
|
187 | support_xft=yes |
161 | support_xft=yes |
188 | support_unicode3=yes |
162 | support_unicode3=yes |
189 | support_combining=yes |
163 | support_combining=yes |
190 | #support_8bitctrls=yes |
164 | #support_8bitctrls=yes |
191 | support_iso14755=yes |
165 | support_iso14755=yes |
… | |
… | |
193 | support_perl=yes |
167 | support_perl=yes |
194 | codesets=all |
168 | codesets=all |
195 | fi |
169 | fi |
196 | ]) |
170 | ]) |
197 | |
171 | |
|
|
172 | ASSERTIONS=no |
|
|
173 | AC_ARG_ENABLE(assert, |
|
|
174 | [ --enable-assert enable assertions], |
|
|
175 | [if test x$enableval = xyes; then |
|
|
176 | ASSERTIONS=yes |
|
|
177 | fi]) |
|
|
178 | if test x$ASSERTIONS = xno; then |
|
|
179 | AC_DEFINE(NDEBUG, 1, Disable assertions (good for debugging)) |
|
|
180 | fi |
|
|
181 | |
|
|
182 | WARNINGS=no |
|
|
183 | AC_ARG_ENABLE(warnings, |
|
|
184 | [ --enable-warnings turn on g++ warnings], |
|
|
185 | [if test x$enableval = xyes; then |
|
|
186 | WARNINGS=yes |
|
|
187 | fi]) |
|
|
188 | if test x$GXX = xyes; then |
|
|
189 | if test $WARNINGS = yes; then |
|
|
190 | save_CXXFLAGS="$CXXFLAGS" |
|
|
191 | CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare -Wno-reorder -Wno-non-virtual-dtor" |
|
|
192 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="$save_CXXFLAGS"]) |
|
|
193 | else |
|
|
194 | CXXFLAGS="$CXXFLAGS -w" |
|
|
195 | fi |
|
|
196 | fi |
|
|
197 | |
|
|
198 | support_256_color=no |
|
|
199 | AC_ARG_ENABLE(256-color, |
|
|
200 | [ --enable-256-color enable 256-color support], |
|
|
201 | [if test x$enableval = xyes; then |
|
|
202 | support_256_color=yes |
|
|
203 | fi]) |
|
|
204 | if test x$support_256_color = xyes; then |
|
|
205 | AC_DEFINE(USE_256_COLORS, 1, Define if you want 256-color support) |
|
|
206 | fi |
|
|
207 | |
198 | AC_ARG_ENABLE(unicode3, |
208 | AC_ARG_ENABLE(unicode3, |
199 | [ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters], |
209 | [ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters], |
200 | [if test x$enableval = xyes -o x$enableval = xno; then |
210 | [if test x$enableval = xyes -o x$enableval = xno; then |
201 | support_unicode3=$enableval |
211 | support_unicode3=$enableval |
202 | fi]) |
212 | fi]) |
… | |
… | |
218 | [if test x$enableval = xyes -o x$enableval = xno; then |
228 | [if test x$enableval = xyes -o x$enableval = xno; then |
219 | support_styles=$enableval |
229 | support_styles=$enableval |
220 | fi]) |
230 | fi]) |
221 | |
231 | |
222 | AC_ARG_ENABLE(afterimage, |
232 | AC_ARG_ENABLE(afterimage, |
223 | [ --enable-afterimage enable integration with libAfterImage for background images], |
233 | [ --enable-afterimage enable integration with libAfterImage for background images], |
224 | [if test x$enableval = xyes -o x$enableval = xno; then |
234 | [if test x$enableval = xyes -o x$enableval = xno; then |
225 | support_afterimage=$enableval |
235 | support_afterimage=$enableval |
226 | fi]) |
236 | fi]) |
227 | |
237 | |
228 | AC_ARG_WITH(afterimage_config, |
238 | AC_ARG_WITH(afterimage_config, |
229 | [ --with-afterimage-config=DIR use libAfterImage config script in DIR], |
239 | [ --with-afterimage-config=DIR use libAfterImage config script in DIR], |
230 | [if test "x$withval" != x; then |
240 | [if test "x$withval" != x; then |
231 | afterimage_config=$withval/afterimage-config |
241 | afterimage_config=$withval/afterimage-config |
232 | fi]) |
242 | fi]) |
233 | |
243 | |
234 | dnl AC_ARG_ENABLE(afterstep, |
244 | AC_ARG_ENABLE(pixbuf, |
235 | dnl [ --enable-afterstep enable integration with AfterStep window manager], |
245 | [ --enable-pixbuf enable integration with gdk-pixbuf for background images], |
236 | dnl [if test x$enableval = xyes -o x$enableval = xno; then |
246 | [if test x$enableval = xyes -o x$enableval = xno; then |
237 | dnl support_afterstep=$enableval |
247 | support_pixbuf=$enableval |
238 | dnl fi]) |
248 | fi]) |
239 | |
249 | |
240 | AC_ARG_ENABLE(transparency, |
250 | AC_ARG_ENABLE(transparency, |
241 | [ --enable-transparency enable transparent backgrounds], |
251 | [ --enable-transparency enable transparent backgrounds], |
242 | [if test x$enableval = xyes -o x$enableval = xno; then |
252 | [if test x$enableval = xyes -o x$enableval = xno; then |
243 | support_inheritpixmap=$enableval |
253 | support_inheritpixmap=$enableval |
… | |
… | |
271 | [ --enable-perl enable embedded perl interpreter], |
281 | [ --enable-perl enable embedded perl interpreter], |
272 | [if test x$enableval = xyes -o x$enableval = xno; then |
282 | [if test x$enableval = xyes -o x$enableval = xno; then |
273 | support_perl=$enableval |
283 | support_perl=$enableval |
274 | fi]) |
284 | fi]) |
275 | |
285 | |
276 | AC_ARG_ENABLE(plain-scroll, |
|
|
277 | [ --enable-plain-scroll enable plain style scrollbar], |
|
|
278 | [if test x$enableval = xyes -o x$enableval = xno; then |
|
|
279 | support_scroll_plain=$enableval |
|
|
280 | fi]) |
|
|
281 | |
|
|
282 | AC_ARG_WITH(codesets, |
286 | AC_ARG_WITH(codesets, |
283 | [ --with-codesets=NAME,.. compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
287 | [ --with-codesets=CS,... compile in additional codesets (jp,jp_ext,kr,zh,zh_ext,all)], |
284 | [codesets="$withval"]) |
288 | [codesets="$withval"]) |
285 | |
289 | |
286 | AC_ARG_ENABLE(xim, |
290 | AC_ARG_ENABLE(xim, |
287 | [ --enable-xim XIM (X Input Method) protocol support], |
291 | [ --enable-xim XIM (X Input Method) protocol support], |
288 | [if test x$enableval = xyes -o x$enableval = xno; then |
292 | [if test x$enableval = xyes -o x$enableval = xno; then |
… | |
… | |
313 | support_8bitctrls=$enableval |
317 | support_8bitctrls=$enableval |
314 | fi]) |
318 | fi]) |
315 | |
319 | |
316 | RESFALLBACK=Rxvt |
320 | RESFALLBACK=Rxvt |
317 | AC_ARG_ENABLE(fallback, |
321 | AC_ARG_ENABLE(fallback, |
318 | [ --enable-fallback(=CLASS) fall back on CLASS resources in addition to URxvt ones (default: Rxvt)], |
322 | [ --enable-fallback@<:@=CLASS@:>@ fall back on CLASS resources in addition to URxvt ones (default: Rxvt)], |
319 | [ |
323 | [ |
320 | test x$enableval = xyes && enableval=Rxvt |
324 | test x$enableval = xyes && enableval=Rxvt |
321 | test x$enableval = xno && enableval= |
325 | test x$enableval = xno && enableval= |
322 | RESFALLBACK="$enableval" |
326 | RESFALLBACK="$enableval" |
323 | ]) |
327 | ]) |
… | |
… | |
342 | AC_ARG_WITH(name, |
346 | AC_ARG_WITH(name, |
343 | [ --with-name=NAME set the basename for the installed binaries (default: urxvt)], |
347 | [ --with-name=NAME set the basename for the installed binaries (default: urxvt)], |
344 | [RXVTNAME="$withval"]) |
348 | [RXVTNAME="$withval"]) |
345 | AC_DEFINE_UNQUOTED(RXVTNAME,"$RXVTNAME", [Binary base name]) |
349 | AC_DEFINE_UNQUOTED(RXVTNAME,"$RXVTNAME", [Binary base name]) |
346 | |
350 | |
347 | RXVTNAME=`echo "$RXVTNAME"|sed "$program_transform_name"` |
|
|
348 | AC_SUBST(RXVTNAME) |
351 | AC_SUBST(RXVTNAME) |
349 | |
352 | |
350 | AC_ARG_ENABLE(swapscreen, |
353 | AC_ARG_ENABLE(swapscreen, |
351 | [ --disable-swapscreen disable swap screen support], |
354 | [ --disable-swapscreen disable swap screen support], |
352 | [if test x$enableval = xno; then |
355 | [if test x$enableval = xno; then |
… | |
… | |
382 | [if test x$enableval = xyes -o x$enableval = xno; then |
385 | [if test x$enableval = xyes -o x$enableval = xno; then |
383 | support_mousewheel=$enableval |
386 | support_mousewheel=$enableval |
384 | fi]) |
387 | fi]) |
385 | |
388 | |
386 | AC_ARG_ENABLE(slipwheeling, |
389 | AC_ARG_ENABLE(slipwheeling, |
387 | [ --enable-slipwheeling enable slip wheel scrolling (requires previous)], |
390 | [ --enable-slipwheeling enable slip wheel scrolling (requires --enable-mousewheel)], |
388 | [if test x$enableval = xyes -o x$enableval = xno; then |
391 | [if test x$enableval = xyes -o x$enableval = xno; then |
389 | support_mouseslipwheel=$enableval |
392 | support_mouseslipwheel=$enableval |
390 | fi]) |
393 | fi]) |
391 | |
394 | |
392 | AC_ARG_ENABLE(smart-resize, |
395 | AC_ARG_ENABLE(smart-resize, |
… | |
… | |
400 | [if test x$enableval = xyes -o x$enableval = xno; then |
403 | [if test x$enableval = xyes -o x$enableval = xno; then |
401 | support_text_blink=$enableval |
404 | support_text_blink=$enableval |
402 | fi]) |
405 | fi]) |
403 | |
406 | |
404 | AC_ARG_ENABLE(pointer-blank, |
407 | AC_ARG_ENABLE(pointer-blank, |
405 | [ --enable-pointer-blank enable pointer blank when typing or inactive pointer], |
408 | [ --enable-pointer-blank enable pointer blanking when typing or inactive], |
406 | [if test x$enableval = xyes -o x$enableval = xno; then |
409 | [if test x$enableval = xyes -o x$enableval = xno; then |
407 | support_pointer_blank=$enableval |
410 | support_pointer_blank=$enableval |
408 | fi]) |
411 | fi]) |
409 | |
412 | |
410 | AC_ARG_WITH(term, |
413 | AC_ARG_WITH(term, |
… | |
… | |
419 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
422 | AC_DEFINE_UNQUOTED(RXVT_TERMINFO, "$withval", Set TERMINFO value to the value given by configure) terminfo="$withval" |
420 | fi]) |
423 | fi]) |
421 | |
424 | |
422 | dnl# -------------------------------------------------------------------------- |
425 | dnl# -------------------------------------------------------------------------- |
423 | |
426 | |
|
|
427 | LIBEV_M4_AVOID_LIBRT=1 |
|
|
428 | m4_include([libev/libev.m4]) |
|
|
429 | |
|
|
430 | dnl# -------------------------------------------------------------------------- |
|
|
431 | |
424 | AC_PATH_PROG(TIC, tic) |
432 | AC_PATH_PROG(TIC, tic, :) |
425 | |
|
|
426 | dnl# need a neat way to detect SVR4 or its features |
|
|
427 | dnl# in src/command.c we use these functions: |
|
|
428 | dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h> |
|
|
429 | dnl# - but are these also defined for other systems? |
|
|
430 | |
|
|
431 | dnl# hack to find if this is SVR4 -- who knows? |
|
|
432 | dnl## AC_MSG_CHECKING(for SVR4) |
|
|
433 | dnl## AC_EGREP_CPP(yes, |
|
|
434 | dnl## [#if defined (SVR4) || defined (_SVR4) || defined (__svr4__) |
|
|
435 | dnl## yes; |
|
|
436 | dnl## #endif |
|
|
437 | dnl## ], [AC_MSG_RESULT(yes); AC_DEFINE(PERHAPS_SVR4)], AC_MSG_RESULT(perhaps not?)) |
|
|
438 | |
433 | |
439 | AC_PATH_XTRA |
434 | AC_PATH_XTRA |
|
|
435 | |
|
|
436 | PIXBUF_CFLAGS= |
|
|
437 | PIXBUF_LIBS= |
|
|
438 | |
|
|
439 | if test x$support_pixbuf = xyes; then |
|
|
440 | support_pixbuf=no |
|
|
441 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
|
|
442 | AC_MSG_CHECKING(for gdk-pixbuf) |
|
|
443 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists gdk-pixbuf-xlib-2.0; then |
|
|
444 | PIXBUF_CFLAGS="`$PKG_CONFIG gdk-pixbuf-xlib-2.0 --cflags`" |
|
|
445 | PIXBUF_LIBS="`$PKG_CONFIG gdk-pixbuf-xlib-2.0 --libs`" |
|
|
446 | support_pixbuf=yes |
|
|
447 | fi |
|
|
448 | |
|
|
449 | if test x$support_pixbuf = xyes; then |
|
|
450 | AC_MSG_RESULT(ok) |
|
|
451 | support_afterimage=no |
|
|
452 | AC_DEFINE(HAVE_PIXBUF, 1, Define if you want to use gdk-pixbuf for image processing) |
|
|
453 | AC_DEFINE(BG_IMAGE_FROM_FILE, 1, Define if you want to have sexy-looking background pixmaps.) |
|
|
454 | else |
|
|
455 | AC_MSG_RESULT(no) |
|
|
456 | fi |
|
|
457 | fi |
|
|
458 | |
|
|
459 | AC_SUBST(PIXBUF_CFLAGS) |
|
|
460 | AC_SUBST(PIXBUF_LIBS) |
440 | |
461 | |
441 | AFTERIMAGE_CFLAGS= |
462 | AFTERIMAGE_CFLAGS= |
442 | AFTERIMAGE_LIBS= |
463 | AFTERIMAGE_LIBS= |
443 | AFTERIMAGE_VERSION= |
464 | AFTERIMAGE_VERSION= |
444 | |
465 | |
… | |
… | |
465 | fi |
486 | fi |
466 | fi |
487 | fi |
467 | fi |
488 | fi |
468 | if test "x$support_afterimage" = "xyes"; then |
489 | if test "x$support_afterimage" = "xyes"; then |
469 | AC_MSG_RESULT($AFTERIMAGE_LIBS) |
490 | AC_MSG_RESULT($AFTERIMAGE_LIBS) |
|
|
491 | AC_DEFINE(HAVE_AFTERIMAGE, 1, Define if you want to use libAfterImage for image processing) |
|
|
492 | AC_DEFINE(BG_IMAGE_FROM_FILE, 1, Define if you want to have sexy-looking background pixmaps.) |
470 | else |
493 | else |
471 | AC_MSG_RESULT(no) |
494 | AC_MSG_RESULT(no) |
472 | fi |
495 | fi |
473 | fi |
496 | fi |
474 | fi |
497 | fi |
475 | |
498 | |
|
|
499 | AC_SUBST(AFTERIMAGE_CFLAGS) |
|
|
500 | AC_SUBST(AFTERIMAGE_LIBS) |
|
|
501 | |
476 | dnl# -------------------------------------------------------------------------- |
502 | dnl# -------------------------------------------------------------------------- |
477 | dnl# CHECKING FOR HEADER FILES |
503 | dnl# CHECKING FOR HEADER FILES |
478 | dnl# -------------------------------------------------------------------------- |
504 | dnl# -------------------------------------------------------------------------- |
479 | AC_HEADER_SYS_WAIT |
|
|
480 | AC_CHECK_HEADERS( \ |
505 | AC_CHECK_HEADERS( \ |
481 | assert.h \ |
|
|
482 | fcntl.h \ |
|
|
483 | stdarg.h \ |
|
|
484 | stdlib.h \ |
|
|
485 | string.h \ |
|
|
486 | termios.h \ |
|
|
487 | unistd.h \ |
|
|
488 | sys/byteorder.h \ |
506 | sys/byteorder.h \ |
489 | sys/ioctl.h \ |
507 | sys/ioctl.h \ |
490 | sys/select.h \ |
|
|
491 | sys/sockio.h \ |
508 | sys/sockio.h \ |
492 | sys/strredir.h \ |
509 | sys/strredir.h \ |
493 | sys/time.h \ |
|
|
494 | stdint.h \ |
510 | stdint.h \ |
495 | wchar.h \ |
511 | wchar.h \ |
496 | cwchar \ |
512 | cwchar \ |
497 | clocale \ |
|
|
498 | ) |
513 | ) |
499 | |
|
|
500 | AC_HEADER_TIME |
|
|
501 | |
|
|
502 | dnl# check to allow both <termios.h> and <sys/ioctl.h> |
|
|
503 | AC_CACHE_CHECK(whether termios.h and sys/ioctl.h may both be included, rxvt_cv_header_sysioctl, |
|
|
504 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> |
|
|
505 | #include <sys/ioctl.h> |
|
|
506 | #ifdef HAVE_TERMIOS_H |
|
|
507 | #include <termios.h> |
|
|
508 | #endif]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])]) |
|
|
509 | |
514 | |
510 | AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
515 | AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, |
511 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) |
516 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) |
512 | if test x$rxvt_cv_xpointer = xyes; then |
517 | if test x$rxvt_cv_xpointer = xyes; then |
513 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
518 | AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) |
514 | fi |
519 | fi |
515 | |
520 | |
516 | AC_CACHE_CHECK([for XLIB_ILLEGAL_ACCESS], rxvt_xlib_illegal_access, |
521 | AC_CACHE_CHECK([for XLIB_ILLEGAL_ACCESS], rxvt_cv_xlib_illegal_access, |
517 | [AC_COMPILE_IFELSE( |
522 | [AC_COMPILE_IFELSE( |
518 | [AC_LANG_PROGRAM([ |
523 | [AC_LANG_PROGRAM([ |
519 | #define XLIB_ILLEGAL_ACCESS |
524 | #define XLIB_ILLEGAL_ACCESS |
520 | #include <X11/Xlib.h> |
525 | #include <X11/Xlib.h> |
521 | ],[ |
526 | ],[ |
522 | Display *dpy; |
527 | Display *dpy; |
523 | dpy->xdefaults = (char *)0; |
528 | dpy->xdefaults = (char *)0; |
524 | ])], |
529 | ])], |
525 | [rxvt_xlib_illegal_access=yes],[rxvt_xlib_illegal_access=no] |
530 | [rxvt_cv_xlib_illegal_access=yes],[rxvt_cv_xlib_illegal_access=no] |
526 | )]) |
531 | )]) |
527 | if test x$rxvt_xlib_illegal_access = xyes; then |
532 | if test x$rxvt_cv_xlib_illegal_access = xyes; then |
528 | AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
533 | AC_DEFINE(XLIB_ILLEGAL_ACCESS, 1, Define ONLY iff Xlib.h supports it) |
529 | fi |
534 | fi |
530 | |
|
|
531 | AC_C_CONST |
|
|
532 | AC_C_INLINE |
|
|
533 | |
|
|
534 | dnl> AC_HEADER_STDC dnl# skip this test, Sun always fails anyhow. |
|
|
535 | |
535 | |
536 | dnl# -------------------------------------------------------------------------- |
536 | dnl# -------------------------------------------------------------------------- |
537 | dnl# CHECKING FOR MISSING TYPEDEFS |
537 | dnl# CHECKING FOR MISSING TYPEDEFS |
538 | dnl# -------------------------------------------------------------------------- |
538 | dnl# -------------------------------------------------------------------------- |
539 | dnl# Missing typedefs and replacements |
539 | dnl# Missing typedefs and replacements |
540 | AC_TYPE_MODE_T |
540 | AC_TYPE_MODE_T |
541 | dnl> AC_CHECK_TYPE(umode_t, int) |
|
|
542 | dnl> AC_CHECK_TYPE(off_t, long) |
|
|
543 | AC_TYPE_PID_T |
541 | AC_TYPE_PID_T |
544 | AC_TYPE_UID_T |
542 | AC_TYPE_UID_T |
545 | |
543 | AC_TYPE_INT16_T |
546 | AC_CHECK_SIZEOF(short, 2) |
544 | AC_TYPE_UINT16_T |
547 | AC_CHECK_SIZEOF(int, 4) |
545 | AC_TYPE_INT32_T |
548 | dnl AC_CHECK_SIZEOF(long, 4) |
546 | AC_TYPE_UINT32_T |
549 | AC_CHECK_SIZEOF(long long, 8) |
|
|
550 | AC_CHECK_SIZEOF(int *, 4) |
|
|
551 | |
|
|
552 | dnl# see usage below |
|
|
553 | AC_DEFUN([RXVT_CHECK_SIZE], |
|
|
554 | [AC_CACHE_CHECK([for $2], $1, |
|
|
555 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdint.h>]], [[$2 dummy;]])],[$1=yes],[dnl |
|
|
556 | if test "$ac_cv_sizeof_char" -ge $3; then |
|
|
557 | $1="$4 char" |
|
|
558 | else |
|
|
559 | if test "$ac_cv_sizeof_short" -ge $3; then |
|
|
560 | $1="$4 short" |
|
|
561 | else |
|
|
562 | if test "$ac_cv_sizeof_int" -ge $3; then |
|
|
563 | $1="$4 int" |
|
|
564 | else |
|
|
565 | if test "$ac_cv_sizeof_long" -ge $3; then |
|
|
566 | $1="$4 long" |
|
|
567 | else |
|
|
568 | if test "$ac_cv_sizeof_long_long" -ge $3; then |
|
|
569 | $1="$4 long long" |
|
|
570 | else |
|
|
571 | $1="$4 $5" # we _must_ have a (possibly wrong) default |
|
|
572 | fi |
|
|
573 | fi |
|
|
574 | fi |
|
|
575 | fi |
|
|
576 | fi])])] |
|
|
577 | if test x"$$1" != xyes; then |
|
|
578 | $6="typedef $$1 $2;" |
|
|
579 | else |
|
|
580 | if test x"$4" = x; then |
|
|
581 | $6="/* typedef $5 $2; */" |
|
|
582 | else |
|
|
583 | $6="/* typedef $4 $5 $2; */" |
|
|
584 | fi |
|
|
585 | fi dnl |
|
|
586 | ) |
|
|
587 | dnl# |
|
|
588 | dnl# Look for types the system may know about anyway. |
|
|
589 | dnl# |
|
|
590 | RXVT_CHECK_SIZE(rxvt_cv_int16_t, int16_t, 2, , short, rxvt_int16_typedef) |
|
|
591 | AC_SUBST(rxvt_int16_typedef) |
|
|
592 | RXVT_CHECK_SIZE(rxvt_cv_uint16_t, uint16_t, 2, unsigned, short, rxvt_uint16_typedef) |
|
|
593 | AC_SUBST(rxvt_uint16_typedef) |
|
|
594 | RXVT_CHECK_SIZE(rxvt_cv_int32_t, int32_t, 4, , int, rxvt_int32_typedef) |
|
|
595 | AC_SUBST(rxvt_int32_typedef) |
|
|
596 | RXVT_CHECK_SIZE(rxvt_cv_uint32_t, uint32_t, 4, unsigned, int, rxvt_uint32_typedef) |
|
|
597 | AC_SUBST(rxvt_uint32_typedef) |
|
|
598 | dnl RXVT_CHECK_SIZE(rxvt_cv_int64_t, int64_t, 8, , long long, rxvt_int64_typedef) |
|
|
599 | dnl AC_SUBST(rxvt_int64_typedef) |
|
|
600 | dnl RXVT_CHECK_SIZE(rxvt_cv_uint64_t, uint64_t, 8, unsigned, long long, rxvt_uint64_typedef) |
|
|
601 | dnl AC_SUBST(rxvt_uint64_typedef) |
|
|
602 | dnl# |
|
|
603 | dnl# Now look for another we use |
|
|
604 | dnl# |
|
|
605 | if test "$ac_cv_sizeof_int_p" -eq 8; then |
|
|
606 | rxvt_intp_define="#define intp_t int64_t" |
|
|
607 | rxvt_u_intp_define="#define u_intp_t u_int64_t" |
|
|
608 | else |
|
|
609 | if test "$ac_cv_sizeof_int_p" -eq 4; then |
|
|
610 | rxvt_intp_define="#define intp_t int32_t" |
|
|
611 | rxvt_u_intp_define="#define u_intp_t u_int32_t" |
|
|
612 | else |
|
|
613 | if test "$ac_cv_sizeof_int_p" -eq 2; then |
|
|
614 | rxvt_intp_define="#define intp_t int16_t" |
|
|
615 | rxvt_u_intp_define="#define u_intp_t u_int16_t" |
|
|
616 | else |
|
|
617 | rxvt_intp_define="#error set intp_t" |
|
|
618 | rxvt_u_intp_define="#error set u_intp_t" |
|
|
619 | fi |
|
|
620 | fi |
|
|
621 | fi |
|
|
622 | AC_SUBST(rxvt_intp_define) |
|
|
623 | AC_SUBST(rxvt_u_intp_define) |
|
|
624 | |
547 | |
625 | dnl# -------------------------------------------------------------------------- |
548 | dnl# -------------------------------------------------------------------------- |
626 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
549 | dnl# CHECKING FOR LIBRARY FUNCTIONS |
627 | dnl# -------------------------------------------------------------------------- |
550 | dnl# -------------------------------------------------------------------------- |
628 | AC_TYPE_SIGNAL |
551 | AC_CHECK_FUNCS(unsetenv) |
629 | dnl> AC_FUNC_VPRINTF |
|
|
630 | |
|
|
631 | AC_CHECK_FUNCS( \ |
|
|
632 | unsetenv \ |
|
|
633 | setutent \ |
|
|
634 | on_exit \ |
|
|
635 | ) |
|
|
636 | |
552 | |
637 | UTMP_CHECK |
553 | UTMP_CHECK |
638 | |
554 | |
639 | dnl# -------------------------------------------------------------------------- |
555 | dnl# -------------------------------------------------------------------------- |
640 | |
556 | |
641 | dnl# find ttys/ttytab |
|
|
642 | AC_CACHE_CHECK(where ttys/ttytab is located, rxvt_cv_path_ttytab, |
|
|
643 | [for ttys_file in dnl |
|
|
644 | /etc/ttys /etc/ttytab; |
|
|
645 | do |
|
|
646 | if test -f "$ttys_file" ; then |
|
|
647 | rxvt_cv_path_ttytab=$ttys_file |
|
|
648 | break |
|
|
649 | fi |
|
|
650 | done |
|
|
651 | ]) |
|
|
652 | if test x$rxvt_cv_path_ttytab != x; then |
|
|
653 | AC_DEFINE_UNQUOTED(TTYTAB_FILENAME, "$rxvt_cv_path_ttytab", Define location of ttys/ttytab) |
|
|
654 | fi |
|
|
655 | |
|
|
656 | dnl# -------------------------------------------------------------------------- |
557 | dnl# -------------------------------------------------------------------------- |
657 | dnl# -------------------------------------------------------------------------- |
558 | dnl# -------------------------------------------------------------------------- |
658 | |
559 | |
659 | dnl# this is a really hack test for some basic Xlocale stuff |
560 | dnl# this is a really hack test for some basic Xlocale stuff |
660 | ac_save_LIBS=$LIBS |
561 | save_LIBS=$LIBS |
661 | ac_save_CFLAGS=$CFLAGS |
562 | save_CFLAGS=$CFLAGS |
662 | CFLAGS="$CFLAGS $X_CFLAGS" |
563 | CFLAGS="$CFLAGS $X_CFLAGS" |
663 | LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
564 | LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" |
664 | AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
|
|
665 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
|
|
666 | #include <stdlib.h> |
|
|
667 | main() { |
|
|
668 | char *p; |
|
|
669 | if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) |
|
|
670 | exit (XSupportsLocale() ? 0 : 1); |
|
|
671 | else |
|
|
672 | exit (1);}]])],[dnl |
|
|
673 | rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl |
|
|
674 | :])]) |
|
|
675 | if test x$support_xim = xyes; then |
565 | if test x$support_xim = xyes; then |
|
|
566 | AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, |
|
|
567 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h> |
|
|
568 | #include <stdlib.h> |
|
|
569 | main() { |
|
|
570 | char *p; |
|
|
571 | if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p) |
|
|
572 | exit (XSupportsLocale() ? 0 : 1); |
|
|
573 | else |
|
|
574 | exit (1);}]])],[dnl |
|
|
575 | rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl |
|
|
576 | :])]) |
676 | if test x$rxvt_cv_func_xlocale = xyes; then |
577 | if test x$rxvt_cv_func_xlocale = xyes; then |
677 | AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) |
578 | AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) |
|
|
579 | AC_CACHE_CHECK(for broken XIM callback, rxvt_cv_broken_ximcb, |
|
|
580 | [AC_COMPILE_IFELSE([ |
|
|
581 | #include <X11/Xlib.h> |
|
|
582 | |
|
|
583 | void im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3); |
|
|
584 | |
|
|
585 | void f() { |
|
|
586 | XIMCallback cb; |
|
|
587 | cb.callback = im_destroy_cb; |
|
|
588 | } |
|
|
589 | ],rxvt_cv_broken_ximcb=yes,rxvt_cv_broken_ximcb=no)]) |
|
|
590 | |
|
|
591 | if test x$rxvt_cv_broken_ximcb = xyes; then |
|
|
592 | AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.) |
|
|
593 | fi |
678 | fi |
594 | fi |
679 | fi |
595 | fi |
680 | |
596 | |
681 | AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale, |
597 | AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale, |
682 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1 |
598 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define X_LOCALE 1 |
683 | #include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])]) |
599 | #include <X11/Xlocale.h>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_xsetlocale=yes],[rxvt_cv_func_xsetlocale=no])]) |
684 | if test x$rxvt_cv_func_xsetlocale = xyes; then |
600 | if test x$rxvt_cv_func_xsetlocale = xyes; then |
685 | AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works) |
601 | AC_DEFINE(HAVE_XSETLOCALE, 1, Define if setlocale (defined to Xsetlocale) works) |
686 | fi |
602 | fi |
687 | LIBS=$ac_save_LIBS |
603 | LIBS=$save_LIBS |
688 | CFLAGS=$ac_save_CFLAGS |
604 | CFLAGS=$save_CFLAGS |
689 | |
605 | |
690 | AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale, |
606 | AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale, |
691 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <clocale>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_setlocale=yes],[rxvt_cv_func_setlocale=no])]) |
607 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <clocale>]], [[setlocale(LC_CTYPE, "");]])],[rxvt_cv_func_setlocale=yes],[rxvt_cv_func_setlocale=no])]) |
692 | if test x$rxvt_cv_func_setlocale = xyes; then |
608 | if test x$rxvt_cv_func_setlocale = xyes; then |
693 | AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works) |
609 | AC_DEFINE(HAVE_SETLOCALE, 1, Define if plain old setlocale works) |
… | |
… | |
699 | AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works) |
615 | AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works) |
700 | fi |
616 | fi |
701 | |
617 | |
702 | SCM_RIGHTS_CHECK |
618 | SCM_RIGHTS_CHECK |
703 | |
619 | |
704 | AC_CACHE_CHECK(for broken XIM callback, rxvt_broken_ximcb, |
|
|
705 | [AC_COMPILE_IFELSE([ |
|
|
706 | #include <X11/Xlib.h> |
|
|
707 | |
|
|
708 | void im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3); |
|
|
709 | |
|
|
710 | void f() { |
|
|
711 | XIMCallback cb; |
|
|
712 | cb.callback = im_destroy_cb; |
|
|
713 | } |
|
|
714 | ],rxvt_broken_ximcb=yes,rxvt_broken_ximcb=no)]) |
|
|
715 | |
|
|
716 | if test x$rxvt_broken_ximcb = xyes; then |
|
|
717 | AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.) |
|
|
718 | fi |
|
|
719 | |
|
|
720 | PTY_CHECK |
620 | PTY_CHECK |
721 | |
621 | |
722 | TTY_GROUP_CHECK |
622 | TTY_GROUP_CHECK |
723 | |
623 | |
724 | dnl# -------------------------------------------------------------------------- |
624 | dnl# -------------------------------------------------------------------------- |
725 | dnl# now add and remove other stuff |
625 | dnl# now add and remove other stuff |
726 | dnl# -------------------------------------------------------------------------- |
626 | dnl# -------------------------------------------------------------------------- |
727 | if test x$support_xft = xyes; then |
627 | if test x$support_xft = xyes; then |
728 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
628 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
729 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
629 | if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then |
730 | LIBS="$LIBS `$PKG_CONFIG xft --libs`" |
630 | X_LIBS="`$PKG_CONFIG xft --libs` $X_LIBS" |
731 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
631 | CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" |
732 | else |
632 | else |
733 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
633 | AC_PATH_PROG(XFT_CONFIG, xft-config, no) |
734 | if test $XFT_CONFIG != no; then |
634 | if test $XFT_CONFIG != no; then |
735 | LIBS="$LIBS `$XFT_CONFIG --libs`" |
635 | X_LIBS="`$XFT_CONFIG --libs` $X_LIBS" |
736 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
636 | CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" |
737 | fi |
637 | fi |
738 | fi |
638 | fi |
739 | |
639 | |
|
|
640 | save_LIBS="$LIBS" |
|
|
641 | LIBS="$LIBS $X_LIBS" |
740 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
642 | AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) |
741 | AC_CHECK_LIB(Xft,XftDrawString32,,[support_xft=no]) |
643 | AC_CHECK_LIB(Xft,XftDrawString32,:,[support_xft=no]) |
|
|
644 | LIBS="$save_LIBS" |
742 | |
645 | |
743 | if test x$support_xft = xyes; then |
646 | if test x$support_xft = xyes; then |
744 | AC_DEFINE(XFT, 1, Define to enable xft support) |
647 | AC_DEFINE(XFT, 1, Define to enable xft support) |
745 | fi |
648 | fi |
746 | fi |
649 | fi |
… | |
… | |
763 | AC_DEFINE(NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING, 1, Define for continual scrolling when you keep the scrollbar button pressed) |
666 | AC_DEFINE(NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING, 1, Define for continual scrolling when you keep the scrollbar button pressed) |
764 | fi |
667 | fi |
765 | if test x$support_selectionscrolling = xyes; then |
668 | if test x$support_selectionscrolling = xyes; then |
766 | AC_DEFINE(SELECTION_SCROLLING, 1, Define to allow scrolling when the selection moves to the top or bottom of the screen) |
669 | AC_DEFINE(SELECTION_SCROLLING, 1, Define to allow scrolling when the selection moves to the top or bottom of the screen) |
767 | fi |
670 | fi |
|
|
671 | if test x$support_frills = xyes; then |
|
|
672 | AC_DEFINE(ENABLE_FRILLS, 1, Define if you want handling for rarely used but handy features) |
|
|
673 | fi |
768 | if test x$support_mousewheel = xyes; then |
674 | if test x$support_mousewheel = xyes; then |
769 | AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll) |
675 | AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll) |
770 | fi |
676 | fi |
771 | if test x$support_mouseslipwheel = xyes; then |
677 | if test x$support_mouseslipwheel = xyes; then |
772 | AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling) |
678 | AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling) |
773 | fi |
679 | fi |
774 | if test x$support_afterimage = xyes; then |
|
|
775 | AC_DEFINE(HAVE_AFTERIMAGE, 1, Define if you want to use libAfterImage for image processing) |
|
|
776 | AC_DEFINE(XPM_BACKGROUND, 1, Define if you want to have sexy-looking background pixmaps. Needs libAfterImage) |
|
|
777 | fi |
|
|
778 | |
680 | |
779 | dnl if test x$support_afterstep = xyes; then |
681 | scrolltypes=plain |
780 | dnl AC_DEFINE(AFTERSTEP_INTEGRATION, 1, Define if you want to integrate with AfterStep window manager) |
682 | AC_DEFINE(PLAIN_SCROLLBAR, 1, Support plain style scrollbars) |
781 | dnl fi |
|
|
782 | |
683 | |
783 | if test x$support_scroll_rxvt = xyes; then |
684 | if test x$support_scroll_rxvt = xyes; then |
784 | AC_DEFINE(RXVT_SCROLLBAR, 1, Support Rxvt original style scrollbars) |
685 | AC_DEFINE(RXVT_SCROLLBAR, 1, Support Rxvt original style scrollbars) |
785 | scrolltypes="rxvt" |
686 | scrolltypes="$scrolltypes rxvt" |
786 | fi |
687 | fi |
787 | if test x$support_scroll_next = xyes; then |
688 | if test x$support_scroll_next = xyes; then |
788 | AC_DEFINE(NEXT_SCROLLBAR, 1, Support NeXT style scrollbars) |
689 | AC_DEFINE(NEXT_SCROLLBAR, 1, Support NeXT style scrollbars) |
789 | scrolltypes="$scrolltypes next" |
690 | scrolltypes="$scrolltypes next" |
790 | fi |
691 | fi |
791 | if test x$support_scroll_xterm = xyes; then |
692 | if test x$support_scroll_xterm = xyes; then |
792 | AC_DEFINE(XTERM_SCROLLBAR, 1, Support Xterm style scrollbars) |
693 | AC_DEFINE(XTERM_SCROLLBAR, 1, Support Xterm style scrollbars) |
793 | scrolltypes="$scrolltypes xterm" |
694 | scrolltypes="$scrolltypes xterm" |
794 | fi |
695 | fi |
795 | if test x$support_scroll_plain = xyes; then |
|
|
796 | AC_DEFINE(PLAIN_SCROLLBAR, 1, Support plain style scrollbars) |
|
|
797 | scrolltypes="$scrolltypes plain" |
|
|
798 | fi |
|
|
799 | if test x$support_pointer_blank = xyes; then |
696 | if test x$support_pointer_blank = xyes; then |
800 | AC_DEFINE(POINTER_BLANK, 1, Define if you want hide the pointer while typing) |
697 | AC_DEFINE(POINTER_BLANK, 1, Define if you want to hide the pointer while typing) |
801 | fi |
698 | fi |
802 | if test x$support_text_blink = xyes; then |
699 | if test x$support_text_blink = xyes; then |
803 | AC_DEFINE(TEXT_BLINK, 1, Define if you want blinking text support) |
700 | AC_DEFINE(TEXT_BLINK, 1, Define if you want blinking text support) |
804 | fi |
701 | fi |
805 | if test x$support_unicode3 = xyes; then |
702 | if test x$support_unicode3 = xyes; then |
… | |
… | |
833 | |
730 | |
834 | save_CXXFLAGS="$CXXFLAGS" |
731 | save_CXXFLAGS="$CXXFLAGS" |
835 | save_LIBS="$LIBS" |
732 | save_LIBS="$LIBS" |
836 | CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`" |
733 | CXXFLAGS="$CXXFLAGS `$PERL -MExtUtils::Embed -e ccopts`" |
837 | LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" |
734 | LIBS="$LIBS `$PERL -MExtUtils::Embed -e ldopts`" |
838 | AC_TRY_LINK([ |
735 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
839 | #include <EXTERN.h> |
736 | #include <EXTERN.h> |
840 | #include <perl.h> |
737 | #include <perl.h> |
841 | #include <XSUB.h> |
738 | #include <XSUB.h> |
842 | ],[ |
739 | ]], [[ |
843 | PerlInterpreter *perl = perl_alloc (); |
740 | PerlInterpreter *perl = perl_alloc (); |
844 | ],[rxvt_perl_link=yes],[rxvt_perl_link=no]) |
741 | ]])],[rxvt_perl_link=yes],[rxvt_perl_link=no]) |
845 | CXXFLAGS="$save_CXXFLAGS" |
742 | CXXFLAGS="$save_CXXFLAGS" |
846 | LIBS="$save_LIBS" |
743 | LIBS="$save_LIBS" |
847 | |
744 | |
848 | if test x$rxvt_perl_link = xyes; then |
745 | if test x$rxvt_perl_link = xyes; then |
849 | AC_MSG_RESULT(ok) |
746 | AC_MSG_RESULT(ok) |
… | |
… | |
865 | AC_SUBST(PERLPRIVLIBEXP) |
762 | AC_SUBST(PERLPRIVLIBEXP) |
866 | AC_SUBST(PERL) |
763 | AC_SUBST(PERL) |
867 | AC_SUBST(IF_PERL) |
764 | AC_SUBST(IF_PERL) |
868 | AC_SUBST(PERL_O) |
765 | AC_SUBST(PERL_O) |
869 | |
766 | |
870 | if test x$support_perl = xyes; then |
|
|
871 | support_frills=yes |
|
|
872 | fi |
|
|
873 | |
|
|
874 | if test x$support_frills = xyes; then |
|
|
875 | AC_DEFINE(ENABLE_FRILLS, 1, Define if you want handling for rarely used but handy features) |
|
|
876 | fi |
|
|
877 | |
|
|
878 | AC_SUBST(CFLAGS) |
|
|
879 | AC_SUBST(CPPFLAGS) |
|
|
880 | AC_SUBST(LDFLAGS) |
|
|
881 | AC_SUBST(X_CFLAGS) |
|
|
882 | |
|
|
883 | dnl# Attack the libs |
|
|
884 | AC_SUBST(LIBS) |
|
|
885 | AC_SUBST(X_LIBS) |
|
|
886 | AC_SUBST(X_EXTRA_LIBS) |
|
|
887 | |
|
|
888 | AC_SUBST(AFTERIMAGE_CFLAGS) |
|
|
889 | AC_SUBST(AFTERIMAGE_LIBS) |
|
|
890 | |
|
|
891 | AC_ARG_PROGRAM |
|
|
892 | |
|
|
893 | dnl# test for "sun" or "__sun__" before include sys_ioctl |
|
|
894 | |
|
|
895 | dnl# revert HAVE_BLAH_H into a "#include <blah.h>" |
|
|
896 | AC_DEFUN([RXVT_DEFINE_TO_INCLUDE], dnl |
|
|
897 | [if test "$$3" = "$4" -o "$$5" = "$6"; then |
|
|
898 | $1="#include <$2>" |
|
|
899 | else |
|
|
900 | $1="/* #include <$2> */" |
|
|
901 | fi dnl |
|
|
902 | AC_SUBST($1)]) |
|
|
903 | |
|
|
904 | RXVT_DEFINE_TO_INCLUDE(include_stdint_h, stdint.h, ac_cv_header_stdint_h, yes, notset, dontmatch) |
|
|
905 | RXVT_DEFINE_TO_INCLUDE(include_stdarg_h, cstdarg, ac_cv_header_stdarg_h, yes, notset, dontmatch) |
|
|
906 | RXVT_DEFINE_TO_INCLUDE(include_stdlib_h, cstdlib, ac_cv_header_stdlib_h, yes, notset, dontmatch) |
|
|
907 | RXVT_DEFINE_TO_INCLUDE(include_unistd_h, unistd.h, ac_cv_header_unistd_h, yes, notset, dontmatch) |
|
|
908 | RXVT_DEFINE_TO_INCLUDE(include_string_h, cstring, ac_cv_header_string_h, yes, notset, dontmatch) |
|
|
909 | RXVT_DEFINE_TO_INCLUDE(include_fcntl_h, fcntl.h, ac_cv_header_fcntl_h, yes, notset, dontmatch) |
|
|
910 | RXVT_DEFINE_TO_INCLUDE(include_util_h, util.h, ac_cv_header_util_h, yes, notset, dontmatch) |
|
|
911 | RXVT_DEFINE_TO_INCLUDE(include_assert_h, assert.h, ac_cv_header_assert_h, yes, notset, dontmatch) |
|
|
912 | RXVT_DEFINE_TO_INCLUDE(include_sys_ioctl_h, sys/ioctl.h, rxvt_cv_header_sysioctl, yes, notset, dontmatch) |
|
|
913 | RXVT_DEFINE_TO_INCLUDE(include_sys_select_h, sys/select.h, ac_cv_header_sys_select_h, yes, notset, dontmatch) |
|
|
914 | RXVT_DEFINE_TO_INCLUDE(include_sys_strredir_h, sys/strredir.h, ac_cv_header_sys_strredir_h, yes, notset, dontmatch) |
|
|
915 | RXVT_DEFINE_TO_INCLUDE(include_sys_time_h, sys/time.h, ac_cv_header_sys_time_h, yes, notset, dontmatch) |
|
|
916 | RXVT_DEFINE_TO_INCLUDE(include_time_h, time.h, ac_cv_header_sys_time_h, no, ac_cv_header_time, yes) |
|
|
917 | |
767 | |
918 | AC_CONFIG_FILES([Makefile \ |
768 | AC_CONFIG_FILES([Makefile \ |
919 | doc/Makefile \ |
769 | doc/Makefile \ |
920 | src/Makefile \ |
770 | src/Makefile \ |
921 | src/rxvtlib.h \ |
|
|
922 | ]) |
771 | ]) |
923 | AC_OUTPUT |
772 | AC_OUTPUT |
924 | |
773 | |
925 | echo "Configuration: |
774 | echo "Configuration: |
926 | |
775 | |
… | |
… | |
943 | echo " resource class fallback: $RESFALLBACK" |
792 | echo " resource class fallback: $RESFALLBACK" |
944 | fi |
793 | fi |
945 | echo |
794 | echo |
946 | echo " embedded perl: $support_perl" |
795 | echo " embedded perl: $support_perl" |
947 | echo " libafterimage: $support_afterimage" |
796 | echo " libafterimage: $support_afterimage" |
948 | dnl echo " AfterStep integration: $support_afterstep" |
|
|
949 | echo |
797 | echo |
950 | if test x$support_xim = xyes -a x$rxvt_cv_func_xlocale = xno; then |
798 | if test x$support_xim = xyes -a x$rxvt_cv_func_xlocale = xno; then |
951 | echo ".----------------------------------------------------------------." |
799 | echo ".----------------------------------------------------------------." |
952 | echo ". WARNING: --enable-xim was specified however the locale support ." |
800 | echo ". WARNING: --enable-xim was specified however the locale support ." |
953 | echo ". functions could not be found. ." |
801 | echo ". functions could not be found. ." |