diff options
author | Bogdan Drozdowski <> | 2022-06-06 21:02:19 +0200 |
---|---|---|
committer | Bogdan Drozdowski <> | 2022-06-06 21:02:19 +0200 |
commit | 6af2231b10be0b15efaaa9d4fdad3bd844868f21 (patch) | |
tree | f12ba1ad2eb300b0230bed0be7d3056477edfb6d /m4/ax_prog_masm_opt.m4 | |
parent | 7f67ff5af4560ea7e74dcee81779b5211f11ca7b (diff) | |
download | autoconf-archive-6af2231b10be0b15efaaa9d4fdad3bd844868f21.tar.gz |
Make assembler-option macros more portable and exit early if assembler not found
Diffstat (limited to 'm4/ax_prog_masm_opt.m4')
-rw-r--r-- | m4/ax_prog_masm_opt.m4 | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/m4/ax_prog_masm_opt.m4 b/m4/ax_prog_masm_opt.m4 index 1480aea..65650c3 100644 --- a/m4/ax_prog_masm_opt.m4 +++ b/m4/ax_prog_masm_opt.m4 @@ -18,7 +18,7 @@ # # LICENSE # -# Copyright (c) 2007,2009 Bogdan Drozdowski <bogdandr@op.pl> +# Copyright (c) 2007,2009,2022 Bogdan Drozdowski <bogdro /AT/ users . sourceforge . net> # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by @@ -46,16 +46,23 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 9 +#serial 10 AC_DEFUN([AX_PROG_MASM_OPT],[ -AC_REQUIRE([AX_PROG_MASM])dnl -AC_MSG_CHECKING([if $masm accepts $1]) -echo '' > conftest.asm -if $masm $$2 $1 conftest.asm > conftest.err; then - $2="$$2 $1" - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) -fi + AC_REQUIRE([AX_PROG_MASM])dnl + AC_MSG_CHECKING([if MASM '$masm' accepts $1]) + AS_IF([test "x$masm" = "xno"], + [ + AC_MSG_RESULT([no]) + AC_MSG_WARN([MASM assembler not found]) + ], + [ + AS_ECHO '' > conftest.asm + AS_IF([$masm $$2 $1 conftest.asm > conftest.err], + [$2="$$2 $1" + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])] + ) + ] + ) ]) |