indeyets / syck

swift yaml for ruby, python, perl, etc.

This URL has Read+Write access

indeyets (author)
Wed Sep 30 10:17:54 -0700 2009
commit  3829b6b39c8499766379ff9834d58f92437d18a9
tree    dbd33916906c8954fc0d727afa6656609b3d7916
parent  1a5d67e7f73f0a686f39c0ac1fab85a6a24f92a4
syck / ext / php / config.m4
100644 51 lines (42 sloc) 1.344 kb
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
47
48
49
50
51
dnl $Id: config.m4 264 2007-07-08 19:57:08Z indeyets $
dnl config.m4 for extension syck
 
PHP_ARG_WITH(syck, for syck support,
[ --with-syck[=DIR] Include syck support])
 
if test "$PHP_SYCK" != "no"; then
  # --with-syck -> check with-path
  SEARCH_PATH="/sw/local /sw /usr/local /usr"
  SEARCH_FOR="/include/syck.h"
  if test -r $PHP_SYCK/; then # path given as parameter
    SYCK_DIR=$PHP_SYCK
  else # search default path list
    AC_MSG_CHECKING([for syck files in default path])
    for i in $SEARCH_PATH ; do
      if test -r $i/$SEARCH_FOR; then
        SYCK_DIR=$i
        AC_MSG_RESULT(found in $i)
      fi
    done
  fi
 
  if test -z "$SYCK_DIR"; then
    AC_MSG_RESULT([not found])
    AC_MSG_ERROR([Please reinstall the syck distribution])
  fi
 
  # --with-syck -> add include path
  PHP_ADD_INCLUDE($SYCK_DIR/include)
 
  # --with-syck -> chech for lib and symbol presence
  LIBNAME=syck
  LIBSYMBOL=syck_new_parser
 
  PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
  [
    PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $SYCK_DIR/lib, SYCK_SHARED_LIBADD)
    AC_DEFINE(HAVE_SYCKLIB,1,[ ])
  ],[
    AC_MSG_ERROR([wrong syck lib version or lib not found])
  ],[
    -L$SYCK_DIR/lib
  ])
 
  PHP_NEW_EXTENSION(syck, phpext.c, $ext_shared)
  PHP_ADD_EXTENSION_DEP(syck, hash)
  PHP_ADD_EXTENSION_DEP(syck, spl)
 
  PHP_SUBST(SYCK_SHARED_LIBADD)
fi