Add native vector_lenght() function which calculates the euclidean distance 80%
faster. See https://github.com/matiasdelellis/pdlib/pull/2. Increase the version to 1.0.2 since this is a required function for our application and we must control it. Add more compilation info in php-info(), and print a final message with the build options when configure. Fix that when dlib is not installed, the configuration returns that it cannot find pkgconfig. See https://github.com/matiasdelellis/facerecognition/issues/261 Also implement the test on travis. See for example: (https://travis-ci.com/github/matiasdelellis/pdlib/builds/161854044)
This commit is contained in:
@@ -1,10 +1,3 @@
|
||||
dnl $Id$
|
||||
dnl config.m4 for extension pdlib
|
||||
|
||||
dnl Comments in this file start with the string 'dnl'.
|
||||
dnl Remove where necessary. This file will not work
|
||||
dnl without editing.
|
||||
|
||||
if test -z "$PHP_DEBUG"; then
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug compile with debugging symbols],[
|
||||
@@ -27,26 +20,49 @@ if test "$PHP_PDLIB" != "no"; then
|
||||
src/face_detection.cc \
|
||||
src/face_landmark_detection.cc \
|
||||
src/face_recognition.cc \
|
||||
src/cnn_face_detection.cc "
|
||||
src/cnn_face_detection.cc
|
||||
src/vector.cc"
|
||||
|
||||
AC_MSG_CHECKING(for pkg-config)
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
|
||||
if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists dlib-1; then
|
||||
if $PKG_CONFIG dlib-1 --atleast-version 19.00; then
|
||||
if test -x "$PKG_CONFIG"; then
|
||||
AC_MSG_RESULT(found)
|
||||
AC_MSG_CHECKING(for dlib-1)
|
||||
if $PKG_CONFIG --exists dlib-1; then
|
||||
if $PKG_CONFIG dlib-1 --atleast-version 19.00; then
|
||||
LIBDLIB_CFLAGS=`$PKG_CONFIG dlib-1 --cflags`
|
||||
LIBDLIB_LIBDIR=`$PKG_CONFIG dlib-1 --libs`
|
||||
LIBDLIB_VERSON=`$PKG_CONFIG dlib-1 --modversion`
|
||||
AC_MSG_RESULT(from pkgconfig: dlib version $LIBDLIB_VERSON)
|
||||
else
|
||||
else
|
||||
AC_MSG_ERROR(system dlib is too old: version 19.00 required)
|
||||
fi
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR(dlib-1 not found)
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR(pkg-config not found)
|
||||
fi
|
||||
|
||||
PHP_EVAL_LIBLINE($LIBDLIB_LIBDIR, PDLIB_SHARED_LIBADD)
|
||||
PHP_EVAL_INCLINE($LIBDLIB_CFLAGS)
|
||||
|
||||
dnl using C++11
|
||||
PHP_NEW_EXTENSION(pdlib, $pdlib_src_files, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -std=c++11, cxx)
|
||||
fi
|
||||
|
||||
AC_CONFIG_COMMANDS_POST([
|
||||
echo ""
|
||||
echo "Build configuration for PDlib v1.0.2 done correctly."
|
||||
echo ""
|
||||
echo " dlib version: $LIBDLIB_VERSON"
|
||||
echo ""
|
||||
echo " CXXFLAGS : $CXXFLAGS"
|
||||
echo " LDFLAGS : $LDFLAGS"
|
||||
echo " LIBDIR: : $LIBDLIB_LIBDIR"
|
||||
echo " LIBADD: : $PDLIB_SHARED_LIBADD"
|
||||
echo ""
|
||||
echo "Please submit bug reports at:"
|
||||
echo " https://github.com/goodspb/pdlib/issues"
|
||||
echo ""
|
||||
])
|
||||
Reference in New Issue
Block a user