1 diff -ur libassuan.org/configure.ac libassuan/configure.ac
2 --- configure.ac 2017-02-16 18:32:51.549527554 +0100
3 +++ configure.ac~ 2017-02-16 18:32:59.893497890 +0100
5 # the decimalized short revision number, a beta version string and a
6 # flag indicating a development version (mym4_isbeta). Note that the
7 # m4 processing is done by autoconf and not during the configure run.
8 +m4_define([m4_chomp_all],
9 +[m4_format([[%.*s]], m4_bregexp(m4_translit([[$1]], [
10 +/], [/ ]), [/*$]), [$1])])
13 +[m4_assert([0 < $1])]dnl
14 +[m4_pushdef([_$0], [_m4_popdef([_$0])]m4_dquote([$]m4_incr([$1])))_$0($@)])
15 +m4_define([m4_esyscmd_s], [m4_chomp_all(m4_esyscmd([$1]))])
16 m4_define([mym4_verslist], m4_split(m4_esyscmd([./autogen.sh --find-version] \
17 mym4_package mym4_major mym4_minor mym4_micro),[:]))
18 m4_define([mym4_isbeta], m4_argn(2, mym4_verslist))
20 VERSION=$PACKAGE_VERSION
22 AC_CONFIG_AUX_DIR([build-aux])
23 -AM_INIT_AUTOMAKE([serial-tests dist-bzip2 no-dist-gzip])
25 +dnl Initialize automake. automake < 1.12 didn't have serial-tests and
26 +dnl gives an error if it sees this, but for automake >= 1.13
27 +dnl serial-tests is required so we have to include it. Solution is to
28 +dnl test for the version of automake (by running an external command)
29 +dnl and provide it if necessary. Note we have to do this entirely using
30 +dnl m4 macros since automake queries this macro by running
31 +dnl 'autoconf --trace ...'.
32 +m4_define([serial_tests], [
33 + m4_esyscmd([automake --version |
35 + awk '{split ($NF,a,"."); if (a[1] == 1 && a[2] >= 12) { print "serial-tests" }}'
38 +AM_INIT_AUTOMAKE(foreign serial_tests dist-bzip2 no-dist-gzip) dnl NB: Do not [quote] this parameter.
41 AC_CONFIG_SRCDIR(src/assuan.h.in)
42 AC_CONFIG_MACRO_DIR(m4)
44 [Defined if LOCAL_PEEREID is supported (NetBSD specific)])
47 - AC_CHECK_FUNCS([getpeerucred], AC_CHECK_HEADERS([ucred.h]))
48 + AC_CHECK_FUNCS([getpeerucred])
49 if test $ac_cv_func_getpeerucred != yes; then
51 AC_CHECK_FUNCS([getpeereid])
53 + AC_CHECK_HEADERS([ucred.h])