1 dnl Macros to configure gpgme
4 dnl GNUPG_FIX_HDR_VERSION(FILE, NAME)
5 dnl Make the version number in gcrypt/gcrypt.h the same as the one here.
6 dnl (this is easier than to have a .in file just for one substitution)
7 dnl We must use a temp file in the current directory because make distcheck
8 dnl install all sourcefiles RO.
10 AC_DEFUN(GNUPG_FIX_HDR_VERSION,
11 [ sed "s/^#define $2 \".*/#define $2 \"$VERSION\"/" $srcdir/$1 > fixhdr.tmp
12 if cmp -s $srcdir/$1 fixhdr.tmp 2>/dev/null; then
16 if mv fixhdr.tmp $srcdir/$1 ; then
21 *** Failed to fix the version string macro $2 in $1.
22 *** The old file has been saved as fixhdr.tmp
25 AC_MSG_WARN([fixed the $2 macro in $1])
32 dnl GNUPG_CHECK_TYPEDEF(TYPE, HAVE_NAME)
33 dnl Check whether a typedef exists and create a #define $2 if it exists
35 AC_DEFUN(GNUPG_CHECK_TYPEDEF,
36 [ AC_MSG_CHECKING(for $1 typedef)
37 AC_CACHE_VAL(gnupg_cv_typedef_$1,
38 [AC_TRY_COMPILE([#include <stdlib.h>
39 #include <sys/types.h>], [
42 ], gnupg_cv_typedef_$1=yes, gnupg_cv_typedef_$1=no )])
43 AC_MSG_RESULT($gnupg_cv_typedef_$1)
44 if test "$gnupg_cv_typedef_$1" = yes; then