summaryrefslogtreecommitdiff
path: root/aconfigure.ac
diff options
context:
space:
mode:
authorJason Parker <jparker@digium.com>2013-01-30 15:03:11 -0600
committerJason Parker <jparker@digium.com>2013-03-11 15:10:48 -0500
commit3f5b7864df62674298e5c8cd2a5061f2af75ac03 (patch)
treeb678cfcfe3dea0cd361a12bb78320fc0f893434a /aconfigure.ac
parent483805f79570115ab95c69698792d238c1719b1b (diff)
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.
Diffstat (limited to 'aconfigure.ac')
-rw-r--r--aconfigure.ac14
1 files changed, 4 insertions, 10 deletions
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