File: php_mongodb.m4

package info (click to toggle)
php-mongodb 1.15.0%2B1.11.1%2B1.9.2%2B1.7.5-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 63,984 kB
  • sloc: ansic: 328,429; xml: 10,797; php: 4,235; sh: 179; python: 47; pascal: 36; makefile: 3
file content (51 lines) | stat: -rw-r--r-- 1,423 bytes parent folder | download | duplicates (7)
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
dnl PHP_MONGODB_ADD_SOURCES(source-path, sources [, special-flags])
dnl
dnl Adds sources which are located relative to source-path. source-path should
dnl be relative to the extension directory (i.e. PHP_EXT_DIR). special-flags
dnl will be passed to the compiler.
dnl
dnl This macro will call PHP_ADD_SOURCES or PHP_ADD_SOURCES_X depending on
dnl whether the extension is being built statically or as a shared module.
dnl
AC_DEFUN([PHP_MONGODB_ADD_SOURCES],[
  _src_path=PHP_EXT_DIR(mongodb)

  dnl Join extension directory and source path
  case $_src_path in
  ""[)] _src_path="$1" ;;
  */[)] _src_path="$_src_path$1" ;;
  *[)]  _src_path="$_src_path/$1" ;;
  esac

  dnl Trim trailing slash from source path
  case $_src_path in
  */[)] _src_path=${_src_path%?}
  esac

  if test "$ext_shared" = "no"; then
    PHP_ADD_SOURCES($_src_path, [$2], [$3])
  else
    PHP_ADD_SOURCES_X($_src_path, [$2], [$3], shared_objects_mongodb, yes)
  fi
])

dnl
dnl PHP_MONGODB_ADD_INCLUDE(path)
dnl
dnl Adds an include path relative to the extension source directory (i.e.
dnl PHP_EXT_SRCDIR).
dnl
AC_DEFUN([PHP_MONGODB_ADD_INCLUDE],[
  PHP_ADD_INCLUDE(PHP_EXT_SRCDIR(mongodb)[/][$1])
])

dnl
dnl PHP_MONGODB_ADD_BUILD_DIR(path)
dnl
dnl Adds a build directory relative to the extension build directory (i.e.
dnl PHP_EXT_BUILDDIR).
dnl
AC_DEFUN([PHP_MONGODB_ADD_BUILD_DIR],[
  PHP_ADD_BUILD_DIR(PHP_EXT_BUILDDIR(mongodb)[/][$1])
])