diff m4/asm-underscore.m4 @ 39239:31d885413cfb

host-cpu-c-abi: Avoid use of 'grep -E' on OpenIndiana. * m4/asm-underscore.m4 (gl_ASM_SYMBOL_PREFIX): Require AC_PROG_EGREP, and use $EGREP instead of 'grep -E'. * m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Use 'grep' instead of 'grep -E'.
author Bruno Haible <bruno@clisp.org>
date Sat, 03 Feb 2018 12:50:17 +0100
parents 24e347e0e326
children b06060465f09
line wrap: on
line diff
--- a/m4/asm-underscore.m4	Sat Feb 03 00:47:15 2018 +0100
+++ b/m4/asm-underscore.m4	Sat Feb 03 12:50:17 2018 +0100
@@ -1,4 +1,4 @@
-# asm-underscore.m4 serial 3
+# asm-underscore.m4 serial 4
 dnl Copyright (C) 2010-2018 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -14,6 +14,7 @@
 
 AC_DEFUN([gl_ASM_SYMBOL_PREFIX],
 [
+  AC_REQUIRE([AC_PROG_EGREP])
   dnl We don't use GCC's __USER_LABEL_PREFIX__ here, because
   dnl 1. It works only for GCC.
   dnl 2. It is incorrectly defined on some platforms, in some GCC versions.
@@ -29,7 +30,7 @@
 EOF
      # Look for the assembly language name in the .s file.
      AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1
-     if LC_ALL=C grep -E '(^|[[^a-zA-Z0-9_]])_foo([[^a-zA-Z0-9_]]|$)' conftest.$gl_asmext >/dev/null; then
+     if LC_ALL=C $EGREP '(^|[[^a-zA-Z0-9_]])_foo([[^a-zA-Z0-9_]]|$)' conftest.$gl_asmext >/dev/null; then
        gl_cv_prog_as_underscore=yes
      else
        gl_cv_prog_as_underscore=no