|
1 | 1 | dnl config.m4 for the solr extension |
2 | 2 |
|
3 | 3 | PHP_ARG_ENABLE([solr], |
4 | | - [whether to enable the Solr extension], |
5 | | - [AS_HELP_STRING([--enable-solr], |
6 | | - [Enable solr support])]) |
| 4 | + [whether to enable the Solr extension], |
| 5 | + [AS_HELP_STRING([--enable-solr], [Enable solr support])]) |
7 | 6 |
|
8 | 7 | PHP_ARG_ENABLE([solr-debug], |
9 | | - [whether to compile with solr in verbose mode], |
10 | | - [AS_HELP_STRING([--enable-solr-debug], |
11 | | - [Compile with solr in verbose mode])], |
12 | | - [no], |
13 | | - [no]) |
| 8 | + [whether to compile with solr in verbose mode], |
| 9 | + [AS_HELP_STRING([--enable-solr-debug], |
| 10 | + [Compile with solr in verbose mode])], |
| 11 | + [no], |
| 12 | + [no]) |
14 | 13 |
|
15 | 14 | PHP_ARG_ENABLE([coverage], |
16 | | - [whether to enable code coverage], |
17 | | - [AS_HELP_STRING([--enable-coverage], |
18 | | - [Enable developer code coverage information])],, |
19 | | - [no]) |
| 15 | + [whether to enable code coverage], |
| 16 | + [AS_HELP_STRING([--enable-coverage], |
| 17 | + [Enable developer code coverage information])],, |
| 18 | + [no]) |
20 | 19 |
|
21 | 20 | dnl Setting up the apache Solr extension |
22 | 21 | if test "$PHP_SOLR" != "no"; then |
23 | 22 |
|
24 | 23 | PKG_CHECK_MODULES([CURL], [libcurl >= 7.15.5]) |
25 | | - PHP_CHECK_LIBRARY(curl,curl_easy_perform, |
26 | | - [ |
27 | | - AC_DEFINE(HAVE_CURL,1,[ ]) |
28 | | - ],[ |
29 | | - AC_MSG_ERROR(There is something wrong. Please check config.log for more information.) |
30 | | - ],[ |
31 | | - $CURL_LIBS |
32 | | - ]) |
| 24 | + PHP_CHECK_LIBRARY(curl, curl_easy_perform, |
| 25 | + [ |
| 26 | + AC_DEFINE(HAVE_CURL, 1, [ ]) |
| 27 | + ],[ |
| 28 | + AC_MSG_ERROR(There is something wrong. Please check config.log for more information.) |
| 29 | + ],[ |
| 30 | + $CURL_LIBS |
| 31 | + ]) |
33 | 32 |
|
34 | | - PHP_EVAL_INCLINE($CURL_CFLAGS) |
35 | | - PHP_EVAL_LIBLINE($CURL_LIBS, SOLR_SHARED_LIBADD) |
| 33 | + PHP_EVAL_INCLINE($CURL_CFLAGS) |
| 34 | + PHP_EVAL_LIBLINE($CURL_LIBS, SOLR_SHARED_LIBADD) |
36 | 35 |
|
37 | 36 | if test "$PHP_LIBXML" = "no"; then |
38 | | - AC_MSG_ERROR([Solr extension requires LIBXML extension, add --enable-libxml]) |
| 37 | + AC_MSG_ERROR([Solr extension requires LIBXML extension, add --enable-libxml]) |
39 | 38 | fi |
40 | 39 |
|
41 | 40 | AC_MSG_CHECKING(for JSON) |
42 | | - if test -f "$phpincludedir/ext/json/php_json.h" || test "$HAVE_JSON" != "no"; then |
43 | | - AC_DEFINE(HAVE_JSON, 1, [JSON support]) |
44 | | - AC_MSG_RESULT(Yes) |
45 | | - else |
46 | | - AC_MSG_ERROR([Solr extension requires json or jsonc support]) |
47 | | - fi |
| 41 | + if test -f "$phpincludedir/ext/json/php_json.h" || test "$HAVE_JSON" != "no"; then |
| 42 | + AC_DEFINE(HAVE_JSON, 1, [JSON support]) |
| 43 | + AC_MSG_RESULT(Yes) |
| 44 | + else |
| 45 | + AC_MSG_ERROR([Solr extension requires json or jsonc support]) |
| 46 | + fi |
48 | 47 |
|
49 | 48 | PHP_SETUP_LIBXML(SOLR_SHARED_LIBADD) |
50 | 49 |
|
51 | | - AC_DEFINE(HAVE_SOLR, 1,[Setting the value of HAVE_SOLR to 1 ]) |
| 50 | + AC_DEFINE(HAVE_SOLR, 1, [Setting the value of HAVE_SOLR to 1 ]) |
52 | 51 |
|
53 | | - if test "$PHP_SOLR_DEBUG" != "no"; then |
54 | | - AC_DEFINE(SOLR_DEBUG, 1, [Setting the value of SOLR_DEBUG to 1 ]) |
55 | | - else |
56 | | - AC_DEFINE(SOLR_DEBUG_OFF, 1, [Setting the value of SOLR_DEBUG_OFF to 1 ]) |
57 | | - fi |
| 52 | + if test "$PHP_SOLR_DEBUG" != "no"; then |
| 53 | + AC_DEFINE(SOLR_DEBUG, 1, [Setting the value of SOLR_DEBUG to 1 ]) |
| 54 | + else |
| 55 | + AC_DEFINE(SOLR_DEBUG_OFF, 1, [Setting the value of SOLR_DEBUG_OFF to 1 ]) |
| 56 | + fi |
58 | 57 |
|
59 | | - if test "$PHP_COVERAGE" = "yes"; then |
60 | | - AX_CHECK_COMPILE_FLAG([-fprofile-arcs], [COVERAGE_CFLAGS="$COVERAGE_CFLAGS -fprofile-arcs"]) |
61 | | - AX_CHECK_COMPILE_FLAG([-ftest-coverage], [COVERAGE_CFLAGS="$COVERAGE_CFLAGS -ftest-coverage"]) |
62 | | - EXTRA_LDFLAGS="$COVERAGE_CFLAGS" |
63 | | - fi |
| 58 | + if test "$PHP_COVERAGE" = "yes"; then |
| 59 | + AX_CHECK_COMPILE_FLAG([-fprofile-arcs], [COVERAGE_CFLAGS="$COVERAGE_CFLAGS -fprofile-arcs"]) |
| 60 | + AX_CHECK_COMPILE_FLAG([-ftest-coverage], [COVERAGE_CFLAGS="$COVERAGE_CFLAGS -ftest-coverage"]) |
| 61 | + EXTRA_LDFLAGS="$COVERAGE_CFLAGS" |
| 62 | + fi |
64 | 63 |
|
65 | | - export OLD_CPPFLAGS="$CPPFLAGS" |
66 | | - export CPPFLAGS="$CPPFLAGS $INCLUDES" |
| 64 | + export OLD_CPPFLAGS="$CPPFLAGS" |
| 65 | + export CPPFLAGS="$CPPFLAGS $INCLUDES" |
67 | 66 |
|
68 | | - subdir=src |
69 | | - PHP_SOLR_SRC_FILES="$subdir/php_solr.c \ |
70 | | - $subdir/php_solr_object.c \ |
71 | | - $subdir/php_solr_document.c \ |
72 | | - $subdir/php_solr_input_document.c \ |
73 | | - $subdir/php_solr_client.c \ |
74 | | - $subdir/php_solr_params.c \ |
75 | | - $subdir/php_solr_query.c \ |
76 | | - $subdir/php_solr_response.c \ |
77 | | - $subdir/php_solr_exception.c \ |
78 | | - $subdir/php_solr_utils.c \ |
79 | | - $subdir/php_solr_dismax_query.c \ |
80 | | - $subdir/php_solr_collapse_function.c \ |
81 | | - $subdir/php_solr_extract.c \ |
82 | | - $subdir/solr_string.c \ |
83 | | - $subdir/solr_functions_document.c \ |
84 | | - $subdir/solr_functions_client.c \ |
85 | | - $subdir/solr_functions_helpers.c \ |
86 | | - $subdir/solr_functions_params.c \ |
87 | | - $subdir/solr_functions_response.c \ |
88 | | - $subdir/solr_functions_debug.c" |
| 67 | + subdir=src |
| 68 | + PHP_SOLR_SRC_FILES="$subdir/php_solr.c \ |
| 69 | + $subdir/php_solr_object.c \ |
| 70 | + $subdir/php_solr_document.c \ |
| 71 | + $subdir/php_solr_input_document.c \ |
| 72 | + $subdir/php_solr_client.c \ |
| 73 | + $subdir/php_solr_params.c \ |
| 74 | + $subdir/php_solr_query.c \ |
| 75 | + $subdir/php_solr_response.c \ |
| 76 | + $subdir/php_solr_exception.c \ |
| 77 | + $subdir/php_solr_utils.c \ |
| 78 | + $subdir/php_solr_dismax_query.c \ |
| 79 | + $subdir/php_solr_collapse_function.c \ |
| 80 | + $subdir/php_solr_extract.c \ |
| 81 | + $subdir/solr_string.c \ |
| 82 | + $subdir/solr_functions_document.c \ |
| 83 | + $subdir/solr_functions_client.c \ |
| 84 | + $subdir/solr_functions_helpers.c \ |
| 85 | + $subdir/solr_functions_params.c \ |
| 86 | + $subdir/solr_functions_response.c \ |
| 87 | + $subdir/solr_functions_debug.c" |
89 | 88 |
|
90 | | - PHP_NEW_EXTENSION(solr, $PHP_SOLR_SRC_FILES, |
91 | | - $ext_shared,, [$COVERAGE_CFLAGS]) |
92 | | - PHP_ADD_BUILD_DIR($abs_builddir/$subdir, 1) |
93 | | - PHP_SUBST(SOLR_SHARED_LIBADD) |
| 89 | + PHP_NEW_EXTENSION(solr, $PHP_SOLR_SRC_FILES, $ext_shared,, [$COVERAGE_CFLAGS]) |
| 90 | + PHP_ADD_BUILD_DIR($abs_builddir/$subdir, 1) |
| 91 | + PHP_SUBST(SOLR_SHARED_LIBADD) |
94 | 92 | fi |
0 commit comments