summaryrefslogtreecommitdiff
path: root/ext/ming/config.m4
blob: 4962f973c4292571b9b5b6eb1d3902783c48165b (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
dnl
dnl $Id$
dnl

PHP_ARG_WITH(ming, for MING support,
[  --with-ming[=DIR]       Include MING support])

if test "$PHP_MING" != "no"; then
  for i in $PHP_MING /usr/local /usr; do
    if test -r $i/lib/libming.so; then
      MING_DIR=$i
    fi
  done

  if test -z "$MING_DIR"; then
    AC_MSG_ERROR(Please reinstall libming.so - I cannot find libming.so)
  fi

  PHP_CHECK_LIBRARY(ming, Ming_useSWFVersion, [
    AC_DEFINE(HAVE_MING,1,[ ])
  ],[
    AC_MSG_ERROR([Ming library 0.2a or greater required.])
  ],[
    -L$MING_DIR/lib -lm -ldl
  ])

  PHP_ADD_INCLUDE($MING_DIR/include)
  PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_DIR/lib, MING_SHARED_LIBADD)

  PHP_EXTENSION(ming, $ext_shared)
  PHP_SUBST(MING_SHARED_LIBADD)
fi