aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-12-23 10:44:34 -0500
committerNick Mathewson <nickm@torproject.org>2017-01-11 10:24:13 -0500
commit114f57b23e0484fa0bac021095dff1d3f5a3c2ae (patch)
treec8eb6eb2e877415cd2b5a50ffbf98588154add05 /configure.ac
parent3a0639a64c9dfcbc2650ee48cc4b4048ff7f945a (diff)
downloadtor-114f57b23e0484fa0bac021095dff1d3f5a3c2ae.tar.gz
tor-114f57b23e0484fa0bac021095dff1d3f5a3c2ae.zip
Use the old replacement when AM_PROG_AR doesn't exist.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 9 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 3f64e1e666..baf9f52c45 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,8 +170,15 @@ AC_ARG_ENABLE(seccomp,
AC_ARG_ENABLE(libscrypt,
AS_HELP_STRING(--disable-libscrypt, [do not attempt to use libscrypt]))
-dnl check for the correct "ar" when cross-compiling
-AM_PROG_AR
+dnl check for the correct "ar" when cross-compiling.
+dnl (AM_PROG_AR was new in automake 1.11.2, which we do not yet require,
+dnl so kludge up a replacement for the case where it isn't there yet.)
+m4_ifdef([AM_PROG_AR],
+ [AM_PROG_AR],
+ [AN_MAKEVAR([AR], [AC_PROG_AR])
+ AN_PROGRAM([ar], [AC_PROG_AR])
+ AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL([AR], [ar], [:])])
+ AC_PROG_AR])
dnl Check whether the above macro has settled for a simply named tool even
dnl though we're cross compiling. We must do this before running AC_PROG_CC,