build fixes for rpm - centos 5/6 don't know m4_esyscmd_s

master
Marc Wäckerlin 9 years ago
parent 7729557716
commit f6787d3a71
  1. 15
      ax_init_standard_project.m4

@ -3,14 +3,17 @@
## 1 2 3 4 5 6 7 8 ## 1 2 3 4 5 6 7 8
## 45678901234567890123456789012345678901234567890123456789012345678901234567890 ## 45678901234567890123456789012345678901234567890123456789012345678901234567890
# m4_esyscmd_s does not exist on centos 5 and 6
m4_define([mrw_esyscmd_s], [m4_normalize(m4_esyscmd([$1]))])
# define least version number from subversion's revision number: # define least version number from subversion's revision number:
# it is taken modulo 256 due to a bug on Apple's MacOSX # it is taken modulo 256 due to a bug on Apple's MacOSX
m4_define(x_least, m4_esyscmd([ m4_define(x_least, mrw_esyscmd_s([
SVN_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout" SVN_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout"
for path in . .. ../..; do for path in . .. ../..; do
if svn info $path 2>&1 > /dev/null; then if svn info $path 2>&1 > /dev/null; then
SVN_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p') SVN_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p')
(cd $path && svn2cl) (cd $path && svn2cl) 2>&1 > /dev/null
break; break;
fi fi
done done
@ -20,12 +23,12 @@ m4_define(x_least, m4_esyscmd([
# define version number from subversion's revision number: # define version number from subversion's revision number:
# it is taken modulo 256 due to a bug on Apple's MacOSX # it is taken modulo 256 due to a bug on Apple's MacOSX
# add to x_minor if revision number is > 256 # add to x_minor if revision number is > 256
m4_define(x_minor_fixed, m4_esyscmd([ m4_define(x_minor_fixed, mrw_esyscmd_s([
SVN_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout" SVN_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout"
for path in . .. ../..; do for path in . .. ../..; do
if svn info $path 2>&1 > /dev/null; then if svn info $path 2>&1 > /dev/null; then
SVN_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p') SVN_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p')
(cd $path && svn2cl) (cd $path && svn2cl) 2>&1 > /dev/null
break; break;
fi fi
done done
@ -33,12 +36,12 @@ m4_define(x_minor_fixed, m4_esyscmd([
echo $ECHO_N $((x_minor+$SVN_REVISION/256)) echo $ECHO_N $((x_minor+$SVN_REVISION/256))
])) ]))
# setup version number # setup version number
m4_define(x_version, m4_esyscmd([ m4_define(x_version, mrw_esyscmd_s([
echo $ECHO_N x_major.x_minor_fixed.x_least echo $ECHO_N x_major.x_minor_fixed.x_least
])) ]))
## bugreport mail address is taken from <user@host> in first line of AUTHORS ## bugreport mail address is taken from <user@host> in first line of AUTHORS
m4_define(x_bugreport, m4_esyscmd([ m4_define(x_bugreport, mrw_esyscmd_s([
head -1 AUTHORS | \ head -1 AUTHORS | \
sed -n 's,.*<\([-_.a-z0-9A-Z]*@[-_.a-z0-9A-Z]*\)>.*,\1,gp' sed -n 's,.*<\([-_.a-z0-9A-Z]*@[-_.a-z0-9A-Z]*\)>.*,\1,gp'
])) ]))

Loading…
Cancel
Save