Hi,
the current version of owfs only provides a php module for php versions 4 and
5.
To support php7 the parameter when calling swig in the makefile needs to be
changed to -php7.
php7 is supported by swig since version 3.0.11.
The attached patch does this, but may need some cleanup. Also a check for the
swig version needs to be added.
Also I have to admit that I did not test the resulting binary.
Kind regards,
Thomas
diff -Nurd owfs-3.2p1/configure.ac owfs-3.2p1.new/configure.ac
--- owfs-3.2p1/configure.ac 2017-07-16 20:49:31.000000000 +0200
+++ owfs-3.2p1.new/configure.ac 2018-01-07 13:53:10.391016033 +0100
@@ -659,6 +659,8 @@
if test -z "${PHPCONFIG}" ; then
AC_MSG_WARN([Cannot find php-config binary. Install php-devel or php5-dev package])
AC_MSG_WARN([include and library paths will be guessed])
+ else
+ AM_CONDITIONAL([PHP7], [ expr `${PHPCONFIG} --version | cut -f1 -d.` = 7 ])
fi
if test -z "${PHPINC}" ; then
AC_MSG_WARN([Cannot find php include-file. Install php-devel or php5-dev package])
diff -Nurd owfs-3.2p1/module/swig/php/Makefile.am owfs-3.2p1.new/module/swig/php/Makefile.am
--- owfs-3.2p1/module/swig/php/Makefile.am 2016-03-01 02:27:15.000000000 +0100
+++ owfs-3.2p1.new/module/swig/php/Makefile.am 2018-01-07 13:51:31.416062741 +0100
@@ -32,8 +32,12 @@
ow_wrap.c: ../ow.i
if ENABLE_OWPHP
+if PHP7
+ $(SWIG) -php7 -o $@ ../ow.i
+else
$(SWIG) -php -o $@ ../ow.i
endif
+endif
#install-data-local:
# @INSTALL@ -d $(DESTDIR)$(EXTENSION_DIR)
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers