com php-src: Fixing linker issue on linux when DIR is specified on --with-argon2: ext/standard/config.m4
| From: | Christoph Michael Becker | Date: | Tue, 12 Jul 2016 04:13:07 +0000 |
| Subject: | com php-src: Fixing linker issue on linux when DIR is specified on --with-argon2: ext/standard/config.m4 | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-94375@lists.php.net to get a copy of this message | ||
Commit: f4aa3a465b248f0e0db970f882e6cd39968a2057
Author: Charles R. Portwood II <charlesportwoodii@erianna.com> Mon, 11 Jul 2016
23:13:07 -0500
Parents: d3986572a93bfe08d6ef5d97e530ad6738ab775e
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f4aa3a465b248f0e0db970f882e6cd39968a2057
Log:
Fixing linker issue on linux when DIR is specified on --with-argon2
Changed paths:
M ext/standard/config.m4
Diff:
diff --git a/ext/standard/config..m4 b/ext/standard/config.m4
index f0dc005..8cf64a5 100644
--- a/ext/standard/config.m4
+++ b/ext/standard/config.m4
@@ -558,28 +558,24 @@ PHP_ARG_WITH(argon2, for Argon2 support,
if test "$PHP_ARGON2" != "no"; then
AC_MSG_CHECKING([for Argon2 library])
- if test "$PHP_ARGON2" = "yes"; then
- SEARCH_PATH="/usr /usr/lib /usr/local /usr/local/share /usr/share"
- else
- SEARCH_PATH="$PHP_ARGON2"
- fi
- for i in $SEARCH_PATH ; do
- if test -r $i/libargon2.so; then
+ for i in $PHP_ARGON2 /usr /usr/local ; do
+ if test -r $i/include/argon2.h; then
ARGON2_DIR=$i;
AC_MSG_RESULT(found in $i)
+ break
fi
done
if test -z "$ARGON2_DIR"; then
AC_MSG_RESULT([not found])
- AC_MSG_ERROR([Please ensure the argon2 headers and static library are installed])
+ AC_MSG_ERROR([Please ensure the argon2 header and library are installed])
fi
-
+
+ PHP_ADD_LIBRARY_WITH_PATH(argon2, $ARGON2_DIR)
PHP_ADD_INCLUDE($ARGON2_DIR/include)
- AC_CHECK_HEADERS([argon2.h])
AC_CHECK_LIB(argon2, argon2_hash, [
- LIBS="-largon2 $LIBS -largon2"
+ LIBS="$LIBS -largon2"
AC_DEFINE(HAVE_ARGON2LIB, 1, [ Define to 1 if you have the <argon2.h> header file ])
], [
AC_MSG_ERROR([Problem with libargon2.(a|so). Please verify that Argon2 header and libaries are
installed])