File: config.m4

package info (click to toggle)
php-oauth 2.0.2%2B1.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 816 kB
  • ctags: 950
  • sloc: ansic: 7,197; xml: 841; php: 536; makefile: 1
file content (45 lines) | stat: -rw-r--r-- 1,213 bytes parent folder | download | duplicates (2)
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
dnl
dnl $Id$
dnl

PHP_ARG_ENABLE(oauth, for oauth support,
[  --enable-oauth          Include oauth support])

AC_ARG_WITH([curl],
    AS_HELP_STRING([--without-curl], [Ignore presence of cURL and disable it]))

if test "$PHP_OAUTH" != "no"; then
  PHP_SUBST(OAUTH_SHARED_LIBADD)

  PHP_NEW_EXTENSION(oauth, oauth.c provider.c, $ext_shared)
  CFLAGS="$CFLAGS -Wall -g"

  AC_CHECK_HEADER(pcre.h, , [AC_MSG_ERROR([Couldn't find pcre.h, try installing the libpcre development/headers package])])

  AS_IF([test "x$with_curl" != "xno"],
      [
        AC_MSG_CHECKING(for cURL in default path)
        have_curl=no
        for i in /usr/local /usr; do
          if test -r $i/include/curl/easy.h; then
            have_curl=yes
            CURL_DIR=$i
            AC_MSG_RESULT(found in $i)
            break
          fi
        done
      ],
      [have_curl=no])

  AS_IF([test "x$have_curl" = "xyes"],
      [
        PHP_ADD_LIBRARY(curl,,OAUTH_SHARED_LIBADD)
        AC_DEFINE(OAUTH_USE_CURL, 1, [Whether cURL is present and should be used])
      ],
      [AS_IF([test "x$with_curl" = "xyes"],
             [AC_MSG_ERROR([cURL requested but not found])
      ])
  ])

  PHP_ADD_EXTENSION_DEP(oauth, hash)
fi