blob: 5594252fc75493b0688edd5a570f57f43d3425df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
dnl
dnl $Id$
dnl
PHP_ARG_WITH(fribidi, for FriBidi support,
[ --with-fribidi[=DIR] Include FriBidi support (requires FriBidi >= 0.10.4).])
if test "$PHP_FRIBIDI" != "no"; then
if test "$PHP_FRIBIDI" = "yes"; then
AC_PATH_PROG(FRIBIDI_CONFIG,fribidi-config,,[/usr/local/bin:$PATH])
else
FRIBIDI_CONFIG="$PHP_FRIBIDI/bin/fribidi-config"
fi
dnl check for fribidi version
AC_MSG_CHECKING([for FriBidi version])
if test ! -x "$FRIBIDI_CONFIG"; then
AC_MSG_ERROR([fribidi-config not found.])
fi
fribidi_version_full=`$FRIBIDI_CONFIG --version`
fribidi_version=`echo ${fribidi_version_full} | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
if test "$fribidi_version" -ge 10004; then
AC_MSG_RESULT([$fribidi_version_full])
else
AC_MSG_ERROR([FriBidi version 0.10.4 or later required.])
fi
dnl Get the paths
FRIBIDI_LIBS=`$FRIBIDI_CONFIG --libs`
FRIBIDI_INCS=`$FRIBIDI_CONFIG --cflags`
if test -n "$FRIBIDI_INCS" && test -n "$FRIBIDI_LIBS"; then
PHP_EVAL_INCLINE($FRIBIDI_INCS)
PHP_EVAL_LIBLINE($FRIBIDI_LIBS, FRIBIDI_SHARED_LIBADD)
PHP_NEW_EXTENSION(fribidi, fribidi.c, $ext_shared)
PHP_SUBST(FRIBIDI_SHARED_LIBADD)
AC_DEFINE(HAVE_FRIBIDI, 1, [ ])
else
AC_MSG_ERROR([Could not find the required paths. Please check your FriBidi installation.])
fi
fi
|