Commit c3b2793a c3b2793aea8533989801f31696ebcfda82a8c785 by Sergey Poznyakoff

New option --without-fribidi allows to disable

fribidi support.
Check for FRIBIDI_CHARSET_CAP_RTL vs. FRIBIDI_CHAR_SET_CAP_RTL.
1 parent 86b703f8
...@@ -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])
475 AH_BOTTOM([
476 #ifdef HAVE_FRIBIDI_CHARSET_CAP_RTL
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
467 AC_CHECK_LIB(fribidi, fribidi_log2vis, 483 AC_CHECK_LIB(fribidi, fribidi_log2vis,
468 [AC_DEFINE(HAVE_LIBFRIBIDI,1) 484 [AC_DEFINE(HAVE_LIBFRIBIDI,1)
469 FRIBIDI_LIBS=-lfribidi]) 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
......