Commit c5fcd222 authored by Ian Lynagh's avatar Ian Lynagh

Fix ar detection

parent e8121501
......@@ -967,8 +967,7 @@ AC_SUBST([LdHasNoCompactUnwind])
# FP_PROG_AR
# ----------
# Sets fp_prog_ar_raw to the full path of ar and fp_prog_ar to a non-Cygwin
# version of it. Exits if no ar can be found
# Sets fp_prog_ar to a (non-Cygwin) path to ar. Exits if no ar can be found
AC_DEFUN([FP_PROG_AR],
[FP_PATH_PROG([fp_prog_ar], [ar])
if test -z "$fp_prog_ar"; then
......@@ -982,8 +981,8 @@ fi
# Sets fp_prog_ar_is_gnu to yes or no, depending on whether it is GNU ar or not.
AC_DEFUN([FP_PROG_AR_IS_GNU],
[AC_REQUIRE([FP_PROG_AR])
AC_CACHE_CHECK([whether $fp_prog_ar_raw is GNU ar], [fp_cv_prog_ar_is_gnu],
[if "$fp_prog_ar_raw" --version 2> /dev/null | grep "GNU" > /dev/null 2>&1; then
AC_CACHE_CHECK([whether $fp_prog_ar is GNU ar], [fp_cv_prog_ar_is_gnu],
[if "$fp_prog_ar" --version 2> /dev/null | grep "GNU" > /dev/null 2>&1; then
fp_cv_prog_ar_is_gnu=yes
else
fp_cv_prog_ar_is_gnu=no
......@@ -1000,14 +999,14 @@ AC_SUBST([ArIsGNUAr], [`echo $fp_prog_ar_is_gnu | tr 'a-z' 'A-Z'`])
AC_DEFUN([FP_PROG_AR_SUPPORTS_ATFILE],
[AC_REQUIRE([FP_PROG_AR])
AC_REQUIRE([FP_PROG_AR_ARGS])
AC_CACHE_CHECK([whether $fp_prog_ar_raw supports @file], [fp_cv_prog_ar_supports_atfile],
AC_CACHE_CHECK([whether $fp_prog_ar supports @file], [fp_cv_prog_ar_supports_atfile],
[
rm -f conftest*
touch conftest.file
echo conftest.file > conftest.atfile
echo conftest.file >> conftest.atfile
"$fp_prog_ar_raw" $fp_prog_ar_args conftest.a @conftest.atfile > /dev/null 2>&1
fp_prog_ar_supports_atfile_tmp=`"$fp_prog_ar_raw" t conftest.a 2> /dev/null | grep -c conftest.file`
"$fp_prog_ar" $fp_prog_ar_args conftest.a @conftest.atfile > /dev/null 2>&1
fp_prog_ar_supports_atfile_tmp=`"$fp_prog_ar" t conftest.a 2> /dev/null | grep -c conftest.file`
rm -f conftest*
if test "$fp_prog_ar_supports_atfile_tmp" -eq 2
then
......@@ -1036,14 +1035,14 @@ else
touch conftest.dummy
for fp_var in clqsZ clqs cqs clq cq ; do
rm -f conftest.a
if "$fp_prog_ar_raw" $fp_var conftest.a conftest.dummy > /dev/null 2> /dev/null; then
if "$fp_prog_ar" $fp_var conftest.a conftest.dummy > /dev/null 2> /dev/null; then
fp_cv_prog_ar_args=$fp_var
break
fi
done
rm -f conftest*
if test -z "$fp_cv_prog_ar_args"; then
AC_MSG_ERROR([cannot figure out how to use your $fp_prog_ar_raw])
AC_MSG_ERROR([cannot figure out how to use your $fp_prog_ar])
fi
fi])
fp_prog_ar_args=$fp_cv_prog_ar_args
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment