mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2024-11-24 23:27:09 +00:00
basic cleanup
a missing gpgme-lib gets now correctly reported
This commit is contained in:
parent
d8d905f6e7
commit
665caa4026
1 changed files with 7 additions and 25 deletions
32
config.m4
32
config.m4
|
@ -1,31 +1,15 @@
|
|||
dnl $Id$
|
||||
dnl config.m4 for extension gnupg
|
||||
|
||||
dnl Comments in this file start with the string 'dnl'.
|
||||
dnl Remove where necessary. This file will not work
|
||||
dnl without editing.
|
||||
|
||||
dnl If your extension references something external, use with:
|
||||
|
||||
PHP_ARG_WITH(gnupg, for gnupg support,
|
||||
dnl Make sure that the comment is aligned:
|
||||
[ --with-gnupg Include gnupg support])
|
||||
|
||||
dnl Otherwise use enable:
|
||||
|
||||
dnl PHP_ARG_ENABLE(gnupg, whether to enable gnupg support,
|
||||
dnl Make sure that the comment is aligned:
|
||||
dnl [ --enable-gnupg Enable gnupg support])
|
||||
|
||||
if test "$PHP_GNUPG" != "no"; then
|
||||
dnl Write more examples of tests here...
|
||||
|
||||
dnl # --with-gnupg -> check with-path
|
||||
SEARCH_PATH="/usr/local /usr" # you might want to change this
|
||||
SEARCH_FOR="/include/gpgme.h" # you most likely want to change this
|
||||
if test -r $PHP_GNUPG/$SEARCH_FOR; then # path given as parameter
|
||||
SEARCH_PATH="/usr/local /usr"
|
||||
SEARCH_FOR="/include/gpgme.h"
|
||||
if test -r $PHP_GNUPG/$SEARCH_FOR; then
|
||||
GNUPG_DIR=$PHP_GNUPG
|
||||
else # search default path list
|
||||
else
|
||||
AC_MSG_CHECKING([for gnupg files in default path])
|
||||
for i in $SEARCH_PATH ; do
|
||||
if test -r $i/$SEARCH_FOR; then
|
||||
|
@ -40,19 +24,17 @@ if test "$PHP_GNUPG" != "no"; then
|
|||
AC_MSG_ERROR([Please reinstall the gnupg distribution])
|
||||
fi
|
||||
|
||||
dnl # --with-gnupg -> add include path
|
||||
PHP_ADD_INCLUDE($GNUPG_DIR/include)
|
||||
|
||||
dnl # --with-gnupg -> check for lib and symbol presence
|
||||
LIBNAME=gpgme # you may want to change this
|
||||
LIBSYMBOL=gpgme_check_version # you most likely want to change this
|
||||
LIBNAME=gpgme
|
||||
LIBSYMBOL=gpgme_check_version
|
||||
|
||||
PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
|
||||
[
|
||||
PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $GNUPG_DIR/lib, GNUPG_SHARED_LIBADD)
|
||||
AC_DEFINE(HAVE_GNUPGLIB,1,[ ])
|
||||
],[
|
||||
AC_MSG_ERROR([wrong gnupg lib version or lib not found])
|
||||
AC_MSG_ERROR([wrong gpgme lib version or lib not found])
|
||||
],[
|
||||
-L$GNUPG_DIR/lib -lm -ldl
|
||||
])
|
||||
|
|
Loading…
Reference in a new issue