From 3f5b7864df62674298e5c8cd2a5061f2af75ac03 Mon Sep 17 00:00:00 2001 From: Jason Parker Date: Wed, 30 Jan 2013 15:03:11 -0600 Subject: Remove workarounds for cross-compiling. Search for ar and ranlib. Use the methods that autoconf gives us to find ar/ranlib, rather than trying to guess based on the compiler used. --- aconfigure.ac | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'aconfigure.ac') diff --git a/aconfigure.ac b/aconfigure.ac index 9afce8d..e2122a8 100644 --- a/aconfigure.ac +++ b/aconfigure.ac @@ -41,21 +41,15 @@ AC_PROG_CC AC_PROG_CXX AC_LANG_C -dnl # -dnl # Setup CROSS_COMPILE variable -dnl # -if test -z "$CROSS_COMPILE"; then - CROSS_COMPILE=`echo ${CC} | sed 's/gcc//'` -fi +AC_PROG_RANLIB +AC_CHECK_TOOLS([AR], [ar gar], :) -if test "$AR" = ""; then AR="${CROSS_COMPILE}ar rv"; fi -AC_SUBST(AR) +if test "$AR_FLAGS" = ""; then AR_FLAGS="rv"; fi +AC_SUBST(AR_FLAGS) if test "$LD" = ""; then LD="$CC"; fi AC_SUBST(LD) if test "$LDOUT" = ""; then LDOUT="-o "; fi AC_SUBST(LDOUT) -if test "$RANLIB" = ""; then RANLIB="${CROSS_COMPILE}ranlib"; fi -AC_SUBST(RANLIB) if test "$OBJEXT" = ""; then OBJEXT='o'; fi AC_SUBST(OBJEXT) if test "$LIBEXT" = ""; then LIBEXT='a'; fi -- cgit v1.2.3