1 # FP_PROG_AR_SUPPORTS_DASH_L
3 # Sets fp_prog_ar_supports_dash_l to yes or no, depending on whether
4 # or not it supports the llvm-ar's -L flag to merge archives.
5 AC_DEFUN([FP_PROG_AR_SUPPORTS_DASH_L],
7 AC_REQUIRE([FP_PROG_AR])
8 AC_REQUIRE([FP_PROG_AR_ARGS])
9 AC_CACHE_CHECK([whether $fp_prog_ar supports -L], [fp_cv_prog_ar_supports_dash_l],
13 touch conftest.a0 conftest.a1 conftest.b0 conftest.b1
14 dnl Build two archives, merge them, and check that the result contains the
15 dnl original files not the two archives.
16 "$fp_prog_ar" qc conftest-a.a conftest.a0 conftest.a1
17 "$fp_prog_ar" qc conftest-b.a conftest.b0 conftest.b1
18 "$fp_prog_ar" qcL conftest.a conftest-a.a conftest-b.a 2>/dev/null
19 if "$fp_prog_ar" t conftest.a | grep -s "conftest.a1" > /dev/null
21 fp_cv_prog_ar_supports_dash_l=yes
23 fp_cv_prog_ar_supports_dash_l=no
27 fp_prog_ar_supports_dash_l=$fp_cv_prog_ar_supports_dash_l
28 AC_SUBST([ArSupportsDashL], [`echo $fp_prog_ar_supports_dash_l | tr 'a-z' 'A-Z'`])
29 ])# FP_PROG_AR_SUPPORTS_DASH_L