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