diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 320 |
1 files changed, 117 insertions, 203 deletions
diff --git a/configure.ac b/configure.ac index a7841b5..c21aa77 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -31,6 +31,13 @@ AC_C_INLINE | |||
31 | AC_TYPE_PID_T | 31 | AC_TYPE_PID_T |
32 | AC_TYPE_SIZE_T | 32 | AC_TYPE_SIZE_T |
33 | 33 | ||
34 | m4_ifndef([PKG_PROG_PKG_CONFIG], | ||
35 | [m4_fatal([Could not locate the pkg-config autoconf macros. These are usually | ||
36 | located in /usr/share/aclocal/pkg.m4. If your macros are in a different | ||
37 | location, try setting the environment variable | ||
38 | export ACLOCAL_FLAGS="-I/other/macro/dir" | ||
39 | before running ./autogen.sh or autoreconf again.])]) | ||
40 | PKG_PROG_PKG_CONFIG | ||
34 | 41 | ||
35 | AC_CHECK_PROGS(regex_cmd, sed) | 42 | AC_CHECK_PROGS(regex_cmd, sed) |
36 | AS_IF(test "x$regex_cmd" = "x",[AC_MSG_ERROR([error. sed is required to build the data files.])]) | 43 | AS_IF(test "x$regex_cmd" = "x",[AC_MSG_ERROR([error. sed is required to build the data files.])]) |
@@ -221,19 +228,13 @@ CXXFLAGS="$CXXFLAGS $X_CFLAGS" | |||
221 | LIBS="$X_LIBS $LIBS" | 228 | LIBS="$X_LIBS $LIBS" |
222 | LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS" | 229 | LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS" |
223 | 230 | ||
224 | 231 | dnl Check for xpg4 | |
225 | dnl Check for required functions in -lX11 | ||
226 | AC_CHECK_LIB(X11, XOpenDisplay, LIBS="-lX11 $LIBS", AC_MSG_ERROR([Could not find XOpenDisplay in -lX11.])) | ||
227 | LIBS="$X_EXTRA_LIBS $LIBS" | ||
228 | |||
229 | AC_CHECK_LIB(xpg4, setlocale, LIBS="-lxpg4 $LIBS") | 232 | AC_CHECK_LIB(xpg4, setlocale, LIBS="-lxpg4 $LIBS") |
230 | AC_CHECK_PROGS(gencat_cmd, gencat) | 233 | AC_CHECK_PROGS(gencat_cmd, gencat) |
231 | AS_IF(test "x$gencat_cmd" = "x",[NLS=""],[]) | 234 | AS_IF(test "x$gencat_cmd" = "x",[NLS=""],[]) |
232 | 235 | ||
233 | Xext_lib="" | 236 | Xext_lib="" |
234 | 237 | ||
235 | |||
236 | |||
237 | dnl Check for Remember options | 238 | dnl Check for Remember options |
238 | AC_MSG_CHECKING([whether to include remember functionality]) | 239 | AC_MSG_CHECKING([whether to include remember functionality]) |
239 | AC_ARG_ENABLE(remember, | 240 | AC_ARG_ENABLE(remember, |
@@ -242,7 +243,6 @@ AC_MSG_RESULT([$enable_remember]) | |||
242 | AS_IF(test "x$enable_remember" = "xyes",[AC_DEFINE(REMEMBER, 1, " compile with remember")],[]) | 243 | AS_IF(test "x$enable_remember" = "xyes",[AC_DEFINE(REMEMBER, 1, " compile with remember")],[]) |
243 | AM_CONDITIONAL(REMEMBER_SRC, test "x$enable_remember" = "xyes") | 244 | AM_CONDITIONAL(REMEMBER_SRC, test "x$enable_remember" = "xyes") |
244 | 245 | ||
245 | |||
246 | AC_MSG_CHECKING([whether to have (POSIX) regular expression support]) | 246 | AC_MSG_CHECKING([whether to have (POSIX) regular expression support]) |
247 | AC_ARG_ENABLE(regexp, | 247 | AC_ARG_ENABLE(regexp, |
248 | AS_HELP_STRING([--enable-regexp],[regular expression support (default=yes)]),,[enable_regexp=yes]) | 248 | AS_HELP_STRING([--enable-regexp],[regular expression support (default=yes)]),,[enable_regexp=yes]) |
@@ -256,9 +256,6 @@ AS_IF(test "x$enable_regexp" = "xyes",[ | |||
256 | )],[]) | 256 | )],[]) |
257 | AM_CONDITIONAL(REGEXP_SRC, test x$REGEXP_SRC = xtrue) | 257 | AM_CONDITIONAL(REGEXP_SRC, test x$REGEXP_SRC = xtrue) |
258 | 258 | ||
259 | |||
260 | |||
261 | |||
262 | dnl Check for the Slit | 259 | dnl Check for the Slit |
263 | AC_MSG_CHECKING([whether to include the Slit]) | 260 | AC_MSG_CHECKING([whether to include the Slit]) |
264 | AC_ARG_ENABLE(slit, | 261 | AC_ARG_ENABLE(slit, |
@@ -267,8 +264,6 @@ AC_MSG_RESULT([$enable_slit]) | |||
267 | AS_IF(test "x$enable_slit" = "xyes",[AC_DEFINE(USE_SLIT, 1, " compile with slit")],[]) | 264 | AS_IF(test "x$enable_slit" = "xyes",[AC_DEFINE(USE_SLIT, 1, " compile with slit")],[]) |
268 | AM_CONDITIONAL(SLIT_SRC, test "x$enable_slit" = "xyes") | 265 | AM_CONDITIONAL(SLIT_SRC, test "x$enable_slit" = "xyes") |
269 | 266 | ||
270 | |||
271 | |||
272 | dnl Check for Systemtray options | 267 | dnl Check for Systemtray options |
273 | AC_MSG_CHECKING([whether to include SystemTray]) | 268 | AC_MSG_CHECKING([whether to include SystemTray]) |
274 | AC_ARG_ENABLE(systray, | 269 | AC_ARG_ENABLE(systray, |
@@ -288,8 +283,6 @@ AS_IF(test "x$enable_systray" = "xyes" -a "x$enable_toolbar" != "xyes",[ | |||
288 | AS_IF(test "x$enable_toolbar" = "xyes",[AC_DEFINE(USE_TOOLBAR, 1, " compile with toolbar")],[]) | 283 | AS_IF(test "x$enable_toolbar" = "xyes",[AC_DEFINE(USE_TOOLBAR, 1, " compile with toolbar")],[]) |
289 | AM_CONDITIONAL(TOOLBAR_SRC, test "x$enable_toolbar" = "xyes") | 284 | AM_CONDITIONAL(TOOLBAR_SRC, test "x$enable_toolbar" = "xyes") |
290 | 285 | ||
291 | |||
292 | |||
293 | AC_MSG_CHECKING([whether to support Extended Window Manager Hints]) | 286 | AC_MSG_CHECKING([whether to support Extended Window Manager Hints]) |
294 | AC_ARG_ENABLE(ewmh, | 287 | AC_ARG_ENABLE(ewmh, |
295 | AS_HELP_STRING([--enable-ewmh],[enable support for Extended Window Manager Hints (default=yes)]),,[enable_ewmh=yes]) | 288 | AS_HELP_STRING([--enable-ewmh],[enable support for Extended Window Manager Hints (default=yes)]),,[enable_ewmh=yes]) |
@@ -297,8 +290,6 @@ AC_MSG_RESULT([$enable_ewmh]) | |||
297 | AS_IF(test "x$enable_ewmh" = "xyes",[AC_DEFINE(USE_EWMH, 1, "use extened window manager hints")],[]) | 290 | AS_IF(test "x$enable_ewmh" = "xyes",[AC_DEFINE(USE_EWMH, 1, "use extened window manager hints")],[]) |
298 | AM_CONDITIONAL(EWMH, test "x$enable_ewmh" = "xyes") | 291 | AM_CONDITIONAL(EWMH, test "x$enable_ewmh" = "xyes") |
299 | 292 | ||
300 | |||
301 | |||
302 | dnl Check whether to include debugging code | 293 | dnl Check whether to include debugging code |
303 | DEBUG="" | 294 | DEBUG="" |
304 | AC_MSG_CHECKING([whether to include verbose debugging code]) | 295 | AC_MSG_CHECKING([whether to include verbose debugging code]) |
@@ -309,8 +300,6 @@ AS_IF(test "x$enable_debug" = "xyes",[ DEBUG="-DDEBUG -Wall" ],[]) | |||
309 | AC_SUBST(DEBUG) | 300 | AC_SUBST(DEBUG) |
310 | CXXFLAGS="$CXXFLAGS $DEBUG" | 301 | CXXFLAGS="$CXXFLAGS $DEBUG" |
311 | 302 | ||
312 | |||
313 | |||
314 | dnl Check whether to build test programs | 303 | dnl Check whether to build test programs |
315 | AC_MSG_CHECKING([whether to build test programs]) | 304 | AC_MSG_CHECKING([whether to build test programs]) |
316 | AC_ARG_ENABLE(test, | 305 | AC_ARG_ENABLE(test, |
@@ -318,8 +307,6 @@ AC_ARG_ENABLE(test, | |||
318 | AC_MSG_RESULT([$enable_test]) | 307 | AC_MSG_RESULT([$enable_test]) |
319 | AM_CONDITIONAL(TEST, test "x$enable_test" = "xyes") | 308 | AM_CONDITIONAL(TEST, test "x$enable_test" = "xyes") |
320 | 309 | ||
321 | |||
322 | |||
323 | dnl Check whether to include native language support (i18n) | 310 | dnl Check whether to include native language support (i18n) |
324 | AC_MSG_CHECKING([whether to include NLS support]) | 311 | AC_MSG_CHECKING([whether to include NLS support]) |
325 | AC_ARG_ENABLE(nls, | 312 | AC_ARG_ENABLE(nls, |
@@ -330,9 +317,6 @@ AS_IF(test "x$enable_nls" = "xyes",[ | |||
330 | NLS="-DNLS"],[]) | 317 | NLS="-DNLS"],[]) |
331 | AC_SUBST(NLS) | 318 | AC_SUBST(NLS) |
332 | 319 | ||
333 | |||
334 | |||
335 | |||
336 | dnl Check for new timed pixmap cache | 320 | dnl Check for new timed pixmap cache |
337 | AC_MSG_CHECKING([whether to use a timed pixmap cache]) | 321 | AC_MSG_CHECKING([whether to use a timed pixmap cache]) |
338 | AC_ARG_ENABLE(timedcache, | 322 | AC_ARG_ENABLE(timedcache, |
@@ -341,194 +325,127 @@ AC_MSG_RESULT([$enable_timedcache]) | |||
341 | AS_IF(test "x$enable_timedcached" = "xyes",[ | 325 | AS_IF(test "x$enable_timedcached" = "xyes",[ |
342 | AC_DEFINE(TIMEDCACHE, 1, "timed cache")],[]) | 326 | AC_DEFINE(TIMEDCACHE, 1, "timed cache")],[]) |
343 | 327 | ||
344 | |||
345 | |||
346 | AC_MSG_CHECKING([whether to have Xft support]) | ||
347 | AM_PATH_XFT(yes, XFT=true, XFT=false) | ||
348 | |||
349 | AS_IF(test "x$XFT" = "xtrue",[ | ||
350 | AC_TRY_LINK([ | ||
351 | #include <X11/Xft/Xft.h> | ||
352 | ], [ XftFontClose(0, 0); return 1; ], | ||
353 | [ | ||
354 | |||
355 | AC_DEFINE(USE_XFT, 1, "antialias support") | ||
356 | AC_MSG_CHECKING([Xft UTF-8 support]) | ||
357 | AC_TRY_LINK([ | ||
358 | #include <X11/Xft/Xft.h> | ||
359 | ], [ XftDrawStringUtf8(0, 0, 0, 0, 0, 0, 0); return 0; ], | ||
360 | AC_DEFINE(HAVE_XFT_UTF8_STRING, 1, "Xft UTF8 support") | ||
361 | FEATURES="$FEATURES XFT" | ||
362 | AC_MSG_RESULT(yes), | ||
363 | AC_MSG_RESULT(no) | ||
364 | ) | ||
365 | ], | ||
366 | [ AC_MSG_RESULT([Could not link with Xft. Install Xft if you want support for it.]) | ||
367 | XFT=false | ||
368 | ])]) | ||
369 | |||
370 | AM_CONDITIONAL(XFT, test "x$XFT" = "xtrue") | ||
371 | |||
372 | |||
373 | AC_MSG_CHECKING([whether to have XRENDER (transparent) support]) | ||
374 | AC_ARG_ENABLE(xrender, | ||
375 | AS_HELP_STRING([--enable-xrender],[XRENDER (transparent) support (default=yes)]),,[enable_xrender=yes]) | ||
376 | AC_MSG_RESULT([$enable_xrender]) | ||
377 | AS_IF(test "x$enable_xrender" = "xyes",[ | ||
378 | AC_CHECK_LIB(Xrender, XRenderCreatePicture, | ||
379 | AC_DEFINE(HAVE_XRENDER, 1, "Xrender support") | ||
380 | LIBS="-lXrender $LIBS") | ||
381 | ],[]) | ||
382 | |||
383 | |||
384 | XPM=false | ||
385 | AC_MSG_CHECKING([whether to have XPM (pixmap themes) support]) | ||
386 | AC_ARG_ENABLE(xpm, | ||
387 | AS_HELP_STRING([--enable-xpm],[XPM (pixmap themes) support (default=yes)]),[],[enable_xpm=yes]) | ||
388 | AC_MSG_RESULT([$enable_xpm]) | ||
389 | AS_IF(test "x$enable_xpm" = "xyes",[ | ||
390 | AC_CHECK_LIB(Xpm, XpmReadFileToPixmap, | ||
391 | AC_DEFINE(HAVE_XPM, 1, "Xpm support") | ||
392 | XPM=true | ||
393 | LIBS="-lXpm $LIBS") | ||
394 | ],[]) | ||
395 | |||
396 | AM_CONDITIONAL(XPM, test "x$XPM" = "xtrue") | ||
397 | |||
398 | dnl Check whether to use imlib2 | ||
399 | IMLIB2=false | ||
400 | AC_MSG_CHECKING([whether to have IMLIB2 (pixmap themes) support]) | ||
401 | AC_ARG_ENABLE(imlib2, | ||
402 | AS_HELP_STRING([--enable-imlib2], [IMLIB2 (pixmap themes) support (default=yes)]), , [enable_imlib2=yes]) | ||
403 | AC_MSG_RESULT([$enable_imlib2]) | ||
404 | AS_IF(test x$enable_imlib2 = "xyes",[ | ||
405 | AC_PATH_GENERIC(imlib2, 1.0.0,[ | ||
406 | IMLIB2=true | ||
407 | AC_DEFINE(HAVE_IMLIB2, [], [Imlib2 support]) | ||
408 | LIBS="$IMLIB2_LIBS $LIBS" | ||
409 | CXXFLAGS="$CXXFLAGS $IMLIB2_CFLAGS" | ||
410 | FEATURES="$FEATURES IMLIB2" | ||
411 | ], [] | ||
412 | )],[]) | ||
413 | |||
414 | AM_CONDITIONAL(IMLIB2, test "x$IMLIB2" = "xtrue") | ||
415 | |||
416 | |||
417 | |||
418 | AC_MSG_CHECKING([whether to have XMB (multibyte font, utf-8) support]) | 328 | AC_MSG_CHECKING([whether to have XMB (multibyte font, utf-8) support]) |
419 | AC_ARG_ENABLE(xmb, AS_HELP_STRING([--enable-xmb],[XMB (multibyte font, utf-8) support (default=yes)]),,[enable_xmb=yes]) | 329 | AC_ARG_ENABLE(xmb, AS_HELP_STRING([--enable-xmb],[XMB (multibyte font, utf-8) support (default=yes)]),,[enable_xmb=yes]) |
420 | AC_MSG_RESULT([$enable_xmb]) | 330 | AC_MSG_RESULT([$enable_xmb]) |
421 | AS_IF([test "x$enable_xmb" = "xyes"],[ AC_DEFINE(USE_XMB, 1, "multibyte support")], []) | 331 | AS_IF([test "x$enable_xmb" = "xyes"],[ AC_DEFINE(USE_XMB, 1, "multibyte support")], []) |
422 | AM_CONDITIONAL(MULTIBYTE, test "x$enable_xmb" = "xyes") | 332 | AM_CONDITIONAL(MULTIBYTE, test "x$enable_xmb" = "xyes") |
423 | 333 | ||
334 | dnl Check for imlib2 | ||
335 | have_imlib2=no | ||
336 | AC_ARG_ENABLE([imlib2], AS_HELP_STRING([--disable-imlib2], [disable imlib2 support])) | ||
337 | AS_IF([test "x$enable_imlib2" != "xno"], [ | ||
338 | PKG_CHECK_MODULES([IMLIB2], [ imlib2 >= 1.0.0 ], | ||
339 | [AC_DEFINE([HAVE_IMLIB2], [1], [Define if imlib2 is available]) have_imlib2=yes], [have_imlib2=no]) | ||
340 | AS_IF([test "x$have_imlib2" = xno -a "x$enable_imlib2" = xyes], [ | ||
341 | AC_MSG_ERROR([*** imlib2 support requested but libraries not found]) | ||
342 | ]) | ||
343 | ]) | ||
344 | AM_CONDITIONAL([IMLIB2], [test "$have_imlib2" = "yes"]) | ||
345 | |||
346 | dnl Check for X11 | ||
347 | PKG_CHECK_MODULES([X11], [ x11 ], | ||
348 | [AC_DEFINE([HAVE_X11], [1], [Define if x11 is available]) have_x11=yes], | ||
349 | [have_x11=no]) | ||
350 | AM_CONDITIONAL([X11], [test "$have_x11" = "yes"], AC_MSG_ERROR([Could not find XOpenDisplay in -lX11.])) | ||
351 | |||
352 | have_xft=no | ||
353 | AC_ARG_ENABLE([xft], AS_HELP_STRING([--disable-xft], [disable xft support])) | ||
354 | AS_IF([test "x$enable_xft" != "xno"], [ | ||
355 | PKG_CHECK_MODULES([XFT], [ xft ], | ||
356 | [AC_DEFINE([USE_XFT], [1], [Define if xft is available]) have_xft=yes], [have_xft=no]) | ||
357 | AS_IF([test "x$have_xft" = xno -a "x$enable_xft" = xyes], [ | ||
358 | AC_MSG_ERROR([*** xft support requested but libraries not found]) | ||
359 | ]) | ||
360 | ]) | ||
361 | AM_CONDITIONAL([XFT], [test "$have_xft" = "yes"]) | ||
362 | AS_IF([test "$have_xft" = "yes"], [ | ||
363 | AC_CHECK_LIB([Xft], [XftDrawStringUtf8], [have_utf8=yes], [have_utf8=no]) | ||
364 | AS_IF([test "$have_utf8" = yes], [ | ||
365 | AC_DEFINE([HAVE_XFT_UTF8_STRING], [1], [Define if you have XftDrawStringUtf8]) | ||
366 | ]) | ||
367 | PKG_CHECK_MODULES([FONTCONFIG], [ fontconfig ], [], AC_MSG_ERROR([Could not find -lfontconfig.])) | ||
368 | ]) | ||
369 | |||
370 | have_xrender=no | ||
371 | AC_ARG_ENABLE([xrender], AS_HELP_STRING([--disable-xrender], [disable xrender support])) | ||
372 | AS_IF([test "x$enable_xrender" != "xno"], [ | ||
373 | PKG_CHECK_MODULES([XRENDER], [ xrender ], | ||
374 | [AC_DEFINE([HAVE_XRENDER], [1], [Define if xrender is available]) have_xrender=yes], [have_xrender=no]) | ||
375 | AS_IF([test "x$have_xrender" = xno -a "x$enable_xrender" = xyes], [ | ||
376 | AC_MSG_ERROR([*** xrender support requested but libraries not found]) | ||
377 | ]) | ||
378 | ]) | ||
379 | AM_CONDITIONAL([XRENDER], [test "$have_xrender" = "yes"]) | ||
380 | |||
381 | have_xpm=no | ||
382 | AC_ARG_ENABLE([xpm], AS_HELP_STRING([--disable-xpm], [disable xpm support])) | ||
383 | AS_IF([test "x$enable_xpm" != "xno"], [ | ||
384 | PKG_CHECK_MODULES([XPM], [ xpm ], | ||
385 | [AC_DEFINE([HAVE_XPM], [1], [Define if xpm is available]) have_xpm=yes], [have_xpm=no]) | ||
386 | AS_IF([test "x$have_xpm" = xno -a "x$enable_xpm" = xyes], [ | ||
387 | AC_MSG_ERROR([*** xpm support requested but libraries not found]) | ||
388 | ]) | ||
389 | ]) | ||
390 | AM_CONDITIONAL([XPM], [test "$have_xpm" = "yes"]) | ||
424 | 391 | ||
425 | dnl Check for Xinerama support and proper library files. | 392 | dnl Check for Xinerama support and proper library files. |
426 | AC_MSG_CHECKING([whether to build support for the XINERAMA extension]) | 393 | have_xinerama=no |
427 | AC_ARG_ENABLE(xinerama, | 394 | AC_ARG_ENABLE([xinerama], AS_HELP_STRING([--disable-xinerama], [disable xinerama support])) |
428 | AS_HELP_STRING([--enable-xinerama], [XINERAMA extension support (default=yes)]), ,[enable_xinerama=yes]) | 395 | AS_IF([test "x$enable_xinerama" != "xno"], [ |
429 | 396 | PKG_CHECK_MODULES([XINERAMA], [ xinerama ], | |
430 | AS_IF(test "x$enable_xinerama" = "xyes",[ | 397 | [AC_DEFINE([XINERAMA], [1], [Define if xinerama is available]) have_xinerama=yes], [have_xinerama=no]) |
431 | AC_CHECK_LIB(Xinerama, XineramaQueryScreens, | 398 | AS_IF([test "x$have_xinerama" = xno -a "x$enable_xinerama" = xyes], [ |
432 | AC_MSG_CHECKING([for X11/extensions/Xinerama.h]) | 399 | AC_MSG_ERROR([*** xinerama support requested but libraries not found]) |
433 | AC_TRY_COMPILE( | 400 | ]) |
434 | #include <X11/Xlib.h> | 401 | ]) |
435 | #include <X11/Xutil.h> | 402 | AM_CONDITIONAL([XINERAMA], [test "$have_xinerama" = "yes"]) |
436 | #include <X11/extensions/Xinerama.h> | ||
437 | , XineramaQueryScreens(0, 0), | ||
438 | AC_MSG_RESULT([yes]) | ||
439 | AC_DEFINE(XINERAMA, [1], [Define to 1 if you have XINERAMA]) | ||
440 | LIBS="-lXinerama $LIBS" | ||
441 | FEATURES="$FEATURES XINERAMA", | ||
442 | AC_MSG_RESULT([no])))],[ | ||
443 | AC_MSG_RESULT([no]) | ||
444 | CONFIGOPTS="$CONFIGOPTS --disable-xinerama"]) | ||
445 | |||
446 | 403 | ||
447 | dnl Check for XShape extension support and proper library files. | 404 | dnl Check for XShape extension support and proper library files. |
448 | AC_MSG_CHECKING([whether to build support for the XSHAPE extension]) | 405 | have_xext=no |
449 | AC_ARG_ENABLE(shape, | 406 | AC_ARG_ENABLE([xext], AS_HELP_STRING([--disable-xext], [disable Misc X Extension Library support])) |
450 | AS_HELP_STRING([--enable-shape], [XSHAPE extension support (default=yes)]), , [enable_shape=yes]) | 407 | AS_IF([test "x$enable_xext" != "xno"], [ |
451 | AS_IF(test "x$enable_shape" = "xyes",[ | 408 | PKG_CHECK_MODULES([XEXT], [ xext ], |
452 | AC_CHECK_LIB(Xext, XShapeCombineShape, | 409 | [AC_DEFINE([SHAPE], [1], [Define if xext is available]) have_xext=yes], [have_xext=no]) |
453 | AC_MSG_CHECKING([for X11/extensions/shape.h]) | 410 | AS_IF([test "x$have_xext" = xno -a "x$enable_xext" = xyes], [ |
454 | AC_TRY_COMPILE( | 411 | AC_MSG_ERROR([*** xext support requested but libraries not found]) |
455 | #include <X11/Xlib.h> | 412 | ]) |
456 | #include <X11/Xutil.h> | 413 | ]) |
457 | #include <X11/extensions/shape.h> | 414 | AM_CONDITIONAL([XEXT], [test "$have_xext" = "yes"]) |
458 | , long foo = ShapeSet, | ||
459 | AC_MSG_RESULT([yes]) | ||
460 | AC_DEFINE(SHAPE, [1], [Define to 1 if you have SHAPE]) | ||
461 | LIBS="-lXext $LIBS" | ||
462 | FEATURES="$FEATURES SHAPE", | ||
463 | AC_MSG_RESULT([no])))],[ | ||
464 | AC_MSG_RESULT([no]) | ||
465 | CONFIGOPTS="$CONFIGOPTS --disable-shape"]) | ||
466 | |||
467 | |||
468 | 415 | ||
469 | dnl Check for RANDR support and proper library files. | 416 | dnl Check for RANDR support and proper library files. |
470 | 417 | have_xrandr=no | |
471 | AC_MSG_CHECKING([whether to build support for the XRANDR (X Resize And Rotate) extension]) | 418 | AC_ARG_ENABLE([xrandr], AS_HELP_STRING([--disable-xrandr], [disable xrandr support])) |
472 | AC_ARG_ENABLE(randr, | 419 | AS_IF([test "x$enable_xrandr" != "xno"], [ |
473 | AS_HELP_STRING([--enable-randr], [XRANDR extension support (default=no)]),,[enable_randr=yes]) | 420 | PKG_CHECK_MODULES([RANDR], [ xrandr >= 1.4.0 ], |
474 | 421 | [AC_DEFINE([HAVE_RANDR], [1], [Define if xrandr is available]) have_xrandr=yes], [have_xrandr=no]) | |
475 | AS_IF(test "x$enable_randr" = "xyes", [ | 422 | AS_IF([test "x$have_xrandr" = xno -a "x$enable_xrandr" = xyes], [ |
476 | AC_MSG_RESULT([yes]) | 423 | AC_MSG_ERROR([*** xrandr support requested but libraries not found]) |
477 | AC_CHECK_LIB(Xrandr, XRRQueryExtension, [ | 424 | ]) |
478 | AC_MSG_CHECKING([for X11/extensions/Xrandr.h]) | 425 | ]) |
479 | AC_COMPILE_IFELSE([ | 426 | AM_CONDITIONAL([RANDR], [test "$have_xrandr" = "yes"]) |
480 | AC_LANG_PROGRAM([[#include <X11/Xlib.h> | 427 | |
481 | #include <X11/Xutil.h> | 428 | have_fribidi=no |
482 | #include <X11/extensions/Xrandr.h> | 429 | AC_ARG_ENABLE([fribidi], AS_HELP_STRING([--disable-fribidi], [disable fribidi support])) |
483 | ]], [[XRRQueryExtension(0, 0, 0);]] | 430 | AS_IF([test "x$enable_fribidi" != "xno"], [ |
484 | )], [ | 431 | PKG_CHECK_MODULES([FRIBIDI], [ fribidi ], |
485 | AC_MSG_RESULT([yes]) | 432 | [AC_DEFINE([HAVE_FRIBIDI], [1], [Define if fribidi is available]) have_fribidi=yes], [have_fribidi=no]) |
486 | AC_DEFINE(HAVE_RANDR, [1], [Define to 1 if you have RANDR]) | 433 | AS_IF([test "x$have_fribidi" = xno -a "x$enable_fribidi" = xyes], [ |
487 | LIBS="-lXrandr $LIBS" | 434 | AC_MSG_ERROR([*** fribidi support requested but libraries not found]) |
488 | FEATURES="$FEATURES RANDR" | 435 | ]) |
489 | 436 | ]) | |
490 | AC_MSG_CHECKING([for XRRUpdateConfiguration]) | 437 | AM_CONDITIONAL([FRIBIDI], [test "$have_fribidi" = "yes"]) |
491 | AC_COMPILE_IFELSE([ | 438 | |
492 | AC_LANG_PROGRAM([[#include <X11/Xlib.h> | 439 | have_freetype2=no |
493 | #include <X11/Xutil.h> | 440 | AC_ARG_ENABLE([freetype2], AS_HELP_STRING([--disable-freetype2], [disable freetype2 support])) |
494 | #include <X11/extensions/Xrandr.h> | 441 | AS_IF([test "x$enable_freetype2" != "xno"], [ |
495 | ]], [[XRRUpdateConfiguration(0);]] | 442 | PKG_CHECK_MODULES([FREETYPE2], [ freetype2 ], |
496 | )], [ | 443 | [AC_DEFINE([HAVE_FREETYPE2], [1], [Define if freetype2 is available]) have_freetype2=yes], [have_freetype2=no]) |
497 | AC_MSG_RESULT([yes]) | 444 | AS_IF([test "x$have_freetype2" = xno -a "x$enable_freetype2" = xyes], [ |
498 | AC_DEFINE(HAVE_RANDR1_2, [1], [Define to 1 if you have RANDR 1.2]) | 445 | AC_MSG_ERROR([*** freetype2 support requested but libraries not found]) |
499 | ], [ | 446 | ]) |
500 | AC_MSG_RESULT([no]) | 447 | ]) |
501 | ]) | 448 | AM_CONDITIONAL([FREETYPE2], [test "$have_freetype2" = "yes"]) |
502 | ], [ | ||
503 | AC_MSG_RESULT([no]) | ||
504 | ]) | ||
505 | ],[ | ||
506 | AC_MSG_RESULT([no]) | ||
507 | ])],[ | ||
508 | AC_MSG_RESULT([no]) | ||
509 | CONFIGOPTS="$CONFIGOPTS --disable-randr"]) | ||
510 | |||
511 | |||
512 | |||
513 | |||
514 | AC_MSG_CHECKING([whether to have FRIBIDI support]) | ||
515 | AC_ARG_ENABLE(fribidi, | ||
516 | AS_HELP_STRING([--enable-fribidi], [FRIBIDI support (default=yes)]), , [enable_fribidi=yes]) | ||
517 | AS_IF(test "x$enable_fribidi" = "xyes",[ | ||
518 | AC_MSG_RESULT([yes]) | ||
519 | AC_CHECK_LIB(fribidi, fribidi_version_info, | ||
520 | AC_MSG_CHECKING([for fribidi/fribidi.h]) | ||
521 | AC_TRY_COMPILE( | ||
522 | #include <fribidi/fribidi.h> | ||
523 | , fribidi_version_info, | ||
524 | AC_MSG_RESULT([yes]) | ||
525 | AC_DEFINE(HAVE_FRIBIDI, [1], [Define to 1 if you have FRIBIDI]) | ||
526 | LIBS="-lfribidi $LIBS", | ||
527 | AC_MSG_RESULT([no])))],[ | ||
528 | AC_MSG_RESULT([no]) | ||
529 | CONFIGOPTS="$CONFIGOPTS --disable-fribidi"]) | ||
530 | |||
531 | |||
532 | 449 | ||
533 | 450 | ||
534 | AC_ARG_WITH(menu, | 451 | AC_ARG_WITH(menu, |
@@ -675,9 +592,6 @@ dnl Print results | |||
675 | AC_MSG_RESULT([]) | 592 | AC_MSG_RESULT([]) |
676 | AC_MSG_RESULT([ $PACKAGE version $VERSION configured successfully.]) | 593 | AC_MSG_RESULT([ $PACKAGE version $VERSION configured successfully.]) |
677 | AC_MSG_RESULT([]) | 594 | AC_MSG_RESULT([]) |
678 | AC_MSG_RESULT([Features:]) | ||
679 | AC_MSG_RESULT([ $FEATURES]) | ||
680 | AC_MSG_RESULT([]) | ||
681 | AC_MSG_RESULT([Using:]) | 595 | AC_MSG_RESULT([Using:]) |
682 | AC_MSG_RESULT([ '$prefix' for installation.]) | 596 | AC_MSG_RESULT([ '$prefix' for installation.]) |
683 | AC_MSG_RESULT([ '$DEFAULT_MENU' for location menu file.]) | 597 | AC_MSG_RESULT([ '$DEFAULT_MENU' for location menu file.]) |