diff options
author | Werner Koch <wk@gnupg.org> | 2005-01-13 19:00:46 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2005-01-13 19:00:46 +0100 |
commit | 444c93043d8d2c9734df9be6067a30292739a9d9 (patch) | |
tree | a04b757300e10c5b1002ce43b02b94e278f2bdb1 /acinclude.m4 | |
parent | Updated. (diff) | |
download | gnupg2-444c93043d8d2c9734df9be6067a30292739a9d9.tar.xz gnupg2-444c93043d8d2c9734df9be6067a30292739a9d9.zip |
* acinclude.m4 (GNUPG_PTH_VERSION_CHECK): Link a simple testV1-9-15
program to see whether the installation is sane.
* certreqgen.c (proc_parameters): Cast printf arg.
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 5f742b279..31f540640 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -214,6 +214,8 @@ AC_DEFUN([GNUPG_PTH_VERSION_CHECK], [ _pth_version=`$PTH_CONFIG --version | awk 'NR==1 {print [$]3}'` _req_version="ifelse([$1],,1.2.0,$1)" + + AC_MSG_CHECKING(for PTH - version >= $_req_version) for _var in _pth_version _req_version; do eval "_val=\"\$${_var}\"" _major=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\1/'` @@ -237,16 +239,37 @@ AC_DEFUN([GNUPG_PTH_VERSION_CHECK], fi fi fi - if test $have_pth = no; then - AC_MSG_WARN([[ -*** -*** Found Pth version $_pth_version, but require at least -*** version $_req_version. Please upgrade Pth first. -***]]) + if test $have_pth = yes; then + AC_MSG_RESULT(yes) + AC_MSG_CHECKING([whether PTH installation is sane]) + AC_CACHE_VAL(gnupg_cv_pth_is_sane,[ + _gnupg_pth_save_cflags=$CFLAGS + _gnupg_pth_save_ldflags=$LDFLAGS + _gnupg_pth_save_libs=$LIBS + CFLAGS="$CFLAGS `$PTH_CONFIG --ldflags`" + LDFLAGS="$LDFLAGS `$PTH_CONFIG --ldflags`" + LIBS="$LIBS `$PTH_CONFIG --libs`" + AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pth.h> + ], + [[ pth_init ();]])], + gnupg_cv_pth_is_sane=yes, + gnupg_cv_pth_is_sane=no) + CFLAGS=$_gnupg_pth_save_cflags + LDFLAGS=$_gnupg_pth_save_ldflags + LIBS=$_gnupg_pth_save_libs + ]) + if test $gnupg_cv_pth_is_sane != yes; then + have_pth=no + fi + AC_MSG_RESULT($gnupg_cv_pth_is_sane) + else + AC_MSG_RESULT(no) fi ]) + + # Check whether mlock is broken (hpux 10.20 raises a SIGBUS if mlock # is not called from uid 0 (not tested whether uid 0 works) # For DECs Tru64 we have also to check whether mlock is in librt |