Skip to content

Commit 18a4ad9

Browse files
authored
Merge pull request #71 from remicollet/issue-config-m4
simplify config.m4 as PHP 7.4 is required
2 parents a011675 + def542b commit 18a4ad9

File tree

2 files changed

+3
-40
lines changed

2 files changed

+3
-40
lines changed

README.INSTALLATION

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ Then you can pass libcurl prefix to the configure script for CURL and LIBXML res
9393
during the configuration phase as shown here :
9494

9595
export PKG_CONFIG_PATH=/root/custom/software/lib/pkgconfig
96-
export PATH=$PATH:/root/custom/software/bin
9796
./configure --enable-solr
9897

9998
If you already have the latest versions of the libraries then the step listed in 4A alone is sufficient.

config.m4

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,7 @@ PHP_ARG_ENABLE([coverage],
2121
dnl Setting up the apache Solr extension
2222
if test "$PHP_SOLR" != "no"; then
2323

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])
4025
PHP_CHECK_LIBRARY(curl,curl_easy_perform,
4126
[
4227
AC_DEFINE(HAVE_CURL,1,[ ])
@@ -61,9 +46,8 @@ if test "$PHP_SOLR" != "no"; then
6146
AC_MSG_ERROR([Solr extension requires json or jsonc support])
6247
fi
6348

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+
6751
AC_DEFINE(HAVE_SOLR, 1,[Setting the value of HAVE_SOLR to 1 ])
6852

6953
if test "$PHP_SOLR_DEBUG" != "no"; then
@@ -78,27 +62,10 @@ if test "$PHP_SOLR" != "no"; then
7862
EXTRA_LDFLAGS="$COVERAGE_CFLAGS"
7963
fi
8064

81-
8265
export OLD_CPPFLAGS="$CPPFLAGS"
8366
export CPPFLAGS="$CPPFLAGS $INCLUDES"
8467

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-
],[
9768
subdir=src
98-
AC_MSG_RESULT([PHP 7])
99-
])
100-
101-
10269
PHP_SOLR_SRC_FILES="$subdir/php_solr.c \
10370
$subdir/php_solr_object.c \
10471
$subdir/php_solr_document.c \
@@ -124,7 +91,4 @@ if test "$PHP_SOLR" != "no"; then
12491
$ext_shared,, [$COVERAGE_CFLAGS])
12592
PHP_ADD_BUILD_DIR($abs_builddir/$subdir, 1)
12693
PHP_SUBST(SOLR_SHARED_LIBADD)
127-
], [
128-
AC_MSG_ERROR([xml2-config not found. Please check your libxml2 installation.])
129-
])
13094
fi

0 commit comments

Comments
 (0)