From 2ba2511dd5b9fd41f6d9b5672408fbcc56a6a5a2 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 29 Jan 2011 21:33:57 +0900 Subject: [PATCH] Check presence of ar. This change allows configure to find appropriate ar at cross compile. --- configure.ac | 6 ++++++ src/Makefile.am | 1 + 2 files changed, 7 insertions(+) diff --git a/configure.ac b/configure.ac index b83b7bac..e2f8e2cb 100644 --- a/configure.ac +++ b/configure.ac @@ -45,6 +45,12 @@ AC_PROG_MKDIR_P AC_PROG_RANLIB AC_PROG_YACC +AC_CHECK_TOOL([AR], [ar], [:]) +if test "x$AR" = "x:"; then + AC_MSG_FAILURE([ar is not found in the system.]) +fi +AC_SUBST([AR]) + AC_PATH_PROG([A2X], [a2x]) AC_SUBST([A2X]) AM_CONDITIONAL([HAVE_A2X], [ test "x$A2X" != "x" ]) diff --git a/src/Makefile.am b/src/Makefile.am index fe943f3e..a5e2aefc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -553,6 +553,7 @@ if HAVE_KQUEUE SRCS += KqueueEventPoll.cc KqueueEventPoll.h endif # HAVE_KQUEUE +AR = @AR@ noinst_LIBRARIES = libaria2c.a libaria2c_a_SOURCES = $(SRCS) aria2c_LDADD = libaria2c.a @LIBINTL@ @ALLOCA@ @LIBGNUTLS_LIBS@\