summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--acinclude.m426
-rw-r--r--configure.in8
3 files changed, 38 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1ff56c481..31c217388 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Dec 9 17:22:27 CET 1999 Werner Koch <wk@gnupg.de>
+
+ * acinclude.m4 (GNUPG_FIX_HDR_VERSION): New.
+ * configure.in: Check and fix the version number of gcrypt/gcrypt.h
+ so that it is always the save as VERSION.
+
Thu Oct 28 16:17:46 CEST 1999 Werner Koch <wk@gnupg.de>
* Started with development series 1.1 on 1999-10-26
diff --git a/acinclude.m4 b/acinclude.m4
index aa721ea88..4a8f0a2b2 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -27,6 +27,28 @@ AC_DEFUN(GNUPG_CHECK_TYPEDEF,
])
+dnl GNUPG_FIX_HDR_VERSION(FILE, NAME)
+dnl Make the version number in gcrypt/gcrypt.h the same as the one here.
+dnl (this is easier than to have a .in file just for one substitution)
+dnl
+AC_DEFUN(GNUPG_FIX_HDR_VERSION,
+ [ sed "s/^#define $2 \".*/#define $2 \"$VERSION\"/" $1 > $1.tmp
+ if cmp -s $1 $1.tmp 2>/dev/null; then
+ rm -f $1.tmp
+ else
+ rm -f $1
+ if mv $1.tmp $1 ; then
+ :
+ else
+ AC_MSG_ERROR([[
+*** Failed to fix the version string macro $2 in $1.
+*** The old file has been saved as $1.tmp
+ ]])
+ fi
+ AC_MSG_WARN([fixed the $2 macro in $1])
+ fi
+ ])
+
dnl GNUPG_LINK_FILES( SRC, DEST )
dnl same as AC_LINK_FILES, but collect the files to link in
@@ -49,6 +71,8 @@ define(GNUPG_DO_LINK_FILES,
])
+
+
dnl GNUPG_CHECK_ENDIAN
dnl define either LITTLE_ENDIAN_HOST or BIG_ENDIAN_HOST
dnl
@@ -633,7 +657,7 @@ AC_DEFUN(GNUPG_FUNC_MKDIR_TAKES_ONE_ARG,
#ifdef HAVE_DIRECT_H
# include <direct.h>
#endif], [mkdir ("foo", 0);],
- gnupg_cv_mkdir_takes_one_arg=no, gnupg_cv_mkdir_takes_one_arg=yes)])
+ gnupg_cv_mkdir_takes_one_arg=no, gnupg_cv_mkdir_takes_one_arg=yes)])
if test $gnupg_cv_mkdir_takes_one_arg = yes ; then
AC_DEFINE(MKDIR_TAKES_ONE_ARG)
fi
diff --git a/configure.in b/configure.in
index e553917a7..2651b87ab 100644
--- a/configure.in
+++ b/configure.in
@@ -678,8 +678,15 @@ AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
GNUPG_DO_LINK_FILES
+dnl
+dnl Make the version number in gcrypt/gcrypt.h the same as the one here.
+dnl (this is easier than to have a .in file just for one substitution)
+dnl
+GNUPG_FIX_HDR_VERSION(gcrypt/gcrypt.h, GCRYPT_VERSION)
+
AC_OUTPUT_COMMANDS([
+chmod +x gcrypt/gcrypt-config
cat >g10defs.tmp <<G10EOF
/* Generated automatically by configure */
#ifdef HAVE_DRIVE_LETTERS
@@ -700,7 +707,6 @@ else
mv g10defs.tmp g10defs.h
echo "g10defs.h created"
fi
-chmod +x gcrypt/gcrypt-config
],[
prefix=$prefix
exec_prefix=$exec_prefix