]> git.draconx.ca Git - dxcommon.git/blobdiff - m4/bison.m4
Avoid nonportable ${x##y} substitutions in program tests.
[dxcommon.git] / m4 / bison.m4
index 18274aaac096a1156ed36f97a94060454238ffd9..b3569f3fa5f2b7d241a2343db18187aca3eba110 100644 (file)
@@ -38,8 +38,8 @@ AC_CACHE_CHECK([for bison], [ac_cv_path_BISON],
 [dx_cv_bison_found=:
 AC_PATH_PROGS_FEATURE_CHECK([BISON], [bison],
 [_DX_BISON_DO_TEST([$ac_path_BISON],
-[bison_relcmd=${ac_path_BISON##*/}
-bison_bypath=`command -v "$bison_relcmd"` #''
+[DX_BASENAME([bison_relcmd], ["$ac_path_BISON"])
+bison_bypath=`{ command -v "$bison_relcmd"; } 2>/dev/null` #''
 ac_cv_path_BISON=$ac_path_BISON
 test x"$bison_bypath" = x"$ac_path_BISON" && ac_cv_path_BISON=$bison_relcmd
 ac_path_BISON_found=: