From 665caa4026c489ff5aa8e6d1ab3c28cd500bfc4c Mon Sep 17 00:00:00 2001 From: Thilo Raufeisen Date: Sat, 15 Oct 2005 14:42:04 +0000 Subject: [PATCH] basic cleanup a missing gpgme-lib gets now correctly reported --- config.m4 | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/config.m4 b/config.m4 index 6c1580d..abf0948 100644 --- a/config.m4 +++ b/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 ])