@@ -21,22 +21,7 @@ PHP_ARG_ENABLE([coverage],
21
21
dnl Setting up the apache Solr extension
22
22
if test "$PHP_SOLR" != "no"; then
23
23
24
- AC_PATH_PROG ( PKG_CONFIG , pkg-config , no )
25
-
26
- AC_MSG_CHECKING ( for libcurl )
27
- if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libcurl; then
28
- if $PKG_CONFIG libcurl --atleast-version 7.15.5; then
29
- CURL_CFLAGS=`$PKG_CONFIG libcurl --cflags`
30
- CURL_LIBS=`$PKG_CONFIG libcurl --libs`
31
- CURL_VERSON=`$PKG_CONFIG libcurl --modversion`
32
- AC_MSG_RESULT ( from pkgconfig: version $CURL_VERSON found )
33
- else
34
- AC_MSG_ERROR ( system libcurl must be upgraded to version >= 7.15.5 )
35
- fi
36
- else
37
- AC_MSG_ERROR ( pkg-config or libcurl not found )
38
- fi
39
-
24
+ PKG_CHECK_MODULES([ CURL] , [ libcurl >= 7.15.5] )
40
25
PHP_CHECK_LIBRARY(curl,curl_easy_perform,
41
26
[
42
27
AC_DEFINE ( HAVE_CURL ,1 ,[ ] )
@@ -61,9 +46,8 @@ if test "$PHP_SOLR" != "no"; then
61
46
AC_MSG_ERROR ( [ Solr extension requires json or jsonc support] )
62
47
fi
63
48
64
- dnl until PHP 7.3: xml2-config or pkg-config
65
- dnl since PHP 7.4: pkg-config only
66
- PHP_SETUP_LIBXML(SOLR_SHARED_LIBADD, [
49
+ PHP_SETUP_LIBXML(SOLR_SHARED_LIBADD)
50
+
67
51
AC_DEFINE ( HAVE_SOLR , 1 ,[ Setting the value of HAVE_SOLR to 1 ] )
68
52
69
53
if test "$PHP_SOLR_DEBUG" != "no"; then
@@ -78,27 +62,10 @@ if test "$PHP_SOLR" != "no"; then
78
62
EXTRA_LDFLAGS="$COVERAGE_CFLAGS"
79
63
fi
80
64
81
-
82
65
export OLD_CPPFLAGS="$CPPFLAGS"
83
66
export CPPFLAGS="$CPPFLAGS $INCLUDES"
84
67
85
- AC_MSG_CHECKING ( PHP version )
86
-
87
- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [
88
- #include <php_version.h>
89
- ] ] , [ [
90
- #if PHP_MAJOR_VERSION > 5
91
- #error PHP > 5
92
- #endif
93
- ] ] ) ] ,[
94
- subdir=src/php5
95
- AC_MSG_RESULT ( [ PHP 5] )
96
- ] ,[
97
68
subdir=src
98
- AC_MSG_RESULT ( [ PHP 7] )
99
- ] )
100
-
101
-
102
69
PHP_SOLR_SRC_FILES="$subdir/php_solr.c \
103
70
$subdir/php_solr_object.c \
104
71
$subdir/php_solr_document.c \
@@ -124,7 +91,4 @@ if test "$PHP_SOLR" != "no"; then
124
91
$ext_shared,, [ $COVERAGE_CFLAGS] )
125
92
PHP_ADD_BUILD_DIR($abs_builddir/$subdir, 1)
126
93
PHP_SUBST(SOLR_SHARED_LIBADD)
127
- ] , [
128
- AC_MSG_ERROR ( [ xml2-config not found. Please check your libxml2 installation.] )
129
- ] )
130
94
fi
0 commit comments