cvs: pecl /esmtp config.m4

From: Date: Mon, 06 Sep 2004 10:46:26 +0000
Subject: cvs: pecl /esmtp config.m4
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-1792@lists.php.net to get a copy of this message
makler Mon Sep 6 06:46:26 2004 EDT Modified files: /pecl/esmtp config.m4 Log: add checks for libESMTP (and PHP) version http://cvs.php.net/diff.php/pecl/esmtp/config.m4?r1=1.1&r2=1.2&ty=u Index: pecl/esmtp/config.m4 diff -u pecl/esmtp/config.m4:1.1 pecl/esmtp/config.m4:1.2 --- pecl/esmtp/config.m4:1.1 Thu Sep 2 03:34:35 2004 +++ pecl/esmtp/config.m4 Mon Sep 6 06:46:25 2004 @@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.1 2004/09/02 07:34:35 makler Exp $ +dnl $Id: config.m4,v 1.2 2004/09/06 10:46:25 makler Exp $ dnl config.m4 for extension esmtp PHP_ARG_WITH(esmtp, for esmtp support, @@ -17,6 +17,38 @@ ESMTP_INCS=$ESMTP_CONFIG --cflags ESMTP_LIBS=$ESMTP_CONFIG --libs + dnl check libESMTP version + libesmtp_version=$ESMTP_CONFIG --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//' + if test -z "$libesmtp_version"; then + echo "Error: libesmtp-config not found." + exit 1 + fi + + IFS=".r"; set $libesmtp_version; IFS=' ' + esmtp_libesmtp_version=expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3 + if test "esmtp_libesmtp_version" -ge 1000003; then + echo "checking for libESMTP version ... $libesmtp_version (ok)" + else + echo "checking for libESMTP version ... $libesmtp_version (Error: you need libESMTP version 1.0.3r1 or newer installed to build esmtp)" + exit 1 + fi + + dnl check PHP version + php_version=$PHP_CONFIG --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//' + if test -z "$php_version"; then + echo "Error: php/php-config not found." + exit 1 + fi + + IFS=.; set $php_version; IFS=' ' + esmtp_php_version=expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3 + if test "esmtp_php_version" -ge 4003002; then + echo "checking for PHP version ... $php_version (ok)" + else + echo "checking for PHP version ... $php_version (Error: you need PHP version 4.3.2 or newer installed to build esmtp)" + exit 1 + fi + if test -n "$ESMTP_INCS" && test -n "$ESMTP_LIBS"; then PHP_EVAL_INCLINE([$ESMTP_INCS]) PHP_EVAL_LIBLINE($ESMTP_LIBS, ESMTP_SHARED_LIBADD) @@ -28,11 +60,6 @@ ESMTP_SHARED_LIBADD="$ESMTP_SHARED_LIBADD -lpthread" fi - php_version=$PHP_CONFIG --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//' - if test -z "$php_version"; then - echo "Error: php/php-config not found." - exit 1 - fi IFS=.; set $php_version; IFS=' ' if test "$1" = "4"; then PHP_NEW_EXTENSION(esmtp, esmtp-php4.c, $ext_shared)

« previous php.pecl.cvs (#1792) next »