@@ -33,9 +33,12 @@ m4_define([git_revision],
33
33
AC_REVISION ( [ git_revision] )
34
34
m4_define ( [ git_hashval] ,
35
35
[ m4_esyscmd_s ( [ git rev-parse HEAD 2> /dev/null || echo "unknown githash"] ) ] )
36
+ AC_REVISION ( [ git_hashval] )
36
37
m4_define ( [ git_date] ,
37
38
[ m4_esyscmd_s ( [ git show --no-patch --format=%as HEAD 2> /dev/null || date +%Y-%m-%d] ) ] )
38
39
AC_REVISION ( [ git_date] )
40
+ m4_define ( [ copyright_year] ,
41
+ [ m4_substr ( git_date , 0 , 4 ) ] )
39
42
40
43
AC_CONFIG_SRCDIR ( [ src/land_utils/combine-ncc.F90] )
41
44
AC_CONFIG_MACRO_DIR ( [ m4] )
@@ -201,14 +204,20 @@ AS_IF([test $ac_cv_type_long_double_wider = no],
201
204
AM_CONDITIONAL([ HAVE_TEST25_INPUT] , [ test -e ${srcdir}/t/Test25-input/grid_spec.nc] )
202
205
203
206
# Set macros
207
+ AS_VAR_SET ( [ GIT_REVISION] , [ "git_revision"] ) dnl
204
208
AC_DEFINE ( [ GIT_REVISION] , [ "git_revision"] ,
205
209
[ Holds the 'git describe' information if configure ran within a git working directory] ) dnl
210
+ AC_SUBST ( GIT_REVISION ) dnl
211
+ AS_VAR_SET ( [ GIT_HEADHASH] , [ "git_hashval"] ) dnl
206
212
AC_DEFINE ( [ GIT_HEADHASH] , [ "git_hashval"] ,
207
213
[ Holds the 'git rev-parse HEAD' information if configure ran within a git working directory] ) dnl
208
- AC_DEFINE ( [ COPYRIGHT_YEAR] , [ "m4_substr ( git_date , 0 , 4 ) "] ,
214
+ AC_SUBST ( GIT_HEADHASH ) dnl
215
+ AS_VAR_SET ( [ COPYRIGHT_YEAR] , [ "copyright_year"] ) dnl
216
+ AC_DEFINE ( [ COPYRIGHT_YEAR] , [ "copyright_year"] ,
209
217
[ Year to place in Copyright notices printed with --version information] ) dnl
218
+ AC_SUBST ( COPYRIGHT_YEAR ) dnl
210
219
211
- # Code for setting rpath based ncview's configure.in code.
220
+ # Code for setting rpath based ncview's configure.in code.
212
221
AS_IF ( [ test x$ac_compiler_gnu = xyes] , [ RPATH_FLAGS=""
213
222
for word in $NETCDF_LDFLAGS $NETCDF_FCLDFLAGS
214
223
do
0 commit comments