New option --without-fribidi allows to disable
fribidi support. Check for FRIBIDI_CHARSET_CAP_RTL vs. FRIBIDI_CHAR_SET_CAP_RTL.
Showing
1 changed file
with
30 additions
and
5 deletions
... | @@ -460,13 +460,38 @@ fi | ... | @@ -460,13 +460,38 @@ fi |
460 | ## FriBidi support | 460 | ## FriBidi support |
461 | 461 | ||
462 | AC_SUBST(FRIBIDI_LIBS) | 462 | AC_SUBST(FRIBIDI_LIBS) |
463 | |||
464 | use_fribidi=yes | ||
465 | |||
466 | AC_ARG_WITH([fribidi], | ||
467 | AC_HELP_STRING([--without-fribidi], | ||
468 | [do not compile FriBidi support]), | ||
469 | [use_fribidi=$withval]) | ||
470 | |||
463 | AH_TEMPLATE(HAVE_LIBFRIBIDI, | 471 | AH_TEMPLATE(HAVE_LIBFRIBIDI, |
464 | [Define to 1 if you have the `fribidi' library (-lfribidi).]) | 472 | [Define to 1 if you have the `fribidi' library (-lfribidi).]) |
465 | AC_CHECK_HEADERS(fribidi/fribidi.h) | 473 | AH_TEMPLATE(HAVE_FRIBIDI_CHARSET_CAP_RTL, |
466 | if test $ac_cv_header_fribidi_fribidi_h = yes; then | 474 | [Define to 1 if fribidi headers declare FRIBIDI_CHARSET_CAP_RTL type]) |
467 | AC_CHECK_LIB(fribidi, fribidi_log2vis, | 475 | AH_BOTTOM([ |
468 | [AC_DEFINE(HAVE_LIBFRIBIDI,1) | 476 | #ifdef HAVE_FRIBIDI_CHARSET_CAP_RTL |
469 | FRIBIDI_LIBS=-lfribidi]) | 477 | # define FRIBIDI_CHARSET_CAP_RTL FRIBIDI_CHAR_SET_CAP_RTL |
478 | #endif]) | ||
479 | |||
480 | if test "$use_fribidi" = "yes"; then | ||
481 | AC_CHECK_HEADERS(fribidi/fribidi.h) | ||
482 | if test $ac_cv_header_fribidi_fribidi_h = yes; then | ||
483 | AC_CHECK_LIB(fribidi, fribidi_log2vis, | ||
484 | [AC_DEFINE(HAVE_LIBFRIBIDI,1) | ||
485 | FRIBIDI_LIBS=-lfribidi], | ||
486 | [use_fribidi=no]) | ||
487 | |||
488 | AC_RUN_IFELSE(AC_LANG_PROGRAM([#include <fribidi/fribidi.h>], | ||
489 | [FriBidiCharSet s = FRIBIDI_CHARSET_CAP_RTL;]), | ||
490 | [AC_DEFINE(HAVE_FRIBIDI_CHARSET_CAP_RTL)]) | ||
491 | |||
492 | else | ||
493 | use_fribidi=no | ||
494 | fi | ||
470 | fi | 495 | fi |
471 | 496 | ||
472 | 497 | ... | ... |
-
Please register or sign in to post a comment