Mercurial > gnulib
comparison 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 |
comparison
equal
deleted
inserted
replaced
39238:e5bf6ab0bb97 | 39239:31d885413cfb |
---|---|
1 # asm-underscore.m4 serial 3 | 1 # asm-underscore.m4 serial 4 |
2 dnl Copyright (C) 2010-2018 Free Software Foundation, Inc. | 2 dnl Copyright (C) 2010-2018 Free Software Foundation, Inc. |
3 dnl This file is free software; the Free Software Foundation | 3 dnl This file is free software; the Free Software Foundation |
4 dnl gives unlimited permission to copy and/or distribute it, | 4 dnl gives unlimited permission to copy and/or distribute it, |
5 dnl with or without modifications, as long as this notice is preserved. | 5 dnl with or without modifications, as long as this notice is preserved. |
6 | 6 |
12 # C macro USER_LABEL_PREFIX to this prefix, and sets ASM_SYMBOL_PREFIX to | 12 # C macro USER_LABEL_PREFIX to this prefix, and sets ASM_SYMBOL_PREFIX to |
13 # a stringified variant of this prefix. | 13 # a stringified variant of this prefix. |
14 | 14 |
15 AC_DEFUN([gl_ASM_SYMBOL_PREFIX], | 15 AC_DEFUN([gl_ASM_SYMBOL_PREFIX], |
16 [ | 16 [ |
17 AC_REQUIRE([AC_PROG_EGREP]) | |
17 dnl We don't use GCC's __USER_LABEL_PREFIX__ here, because | 18 dnl We don't use GCC's __USER_LABEL_PREFIX__ here, because |
18 dnl 1. It works only for GCC. | 19 dnl 1. It works only for GCC. |
19 dnl 2. It is incorrectly defined on some platforms, in some GCC versions. | 20 dnl 2. It is incorrectly defined on some platforms, in some GCC versions. |
20 AC_REQUIRE([gl_C_ASM]) | 21 AC_REQUIRE([gl_C_ASM]) |
21 AC_CACHE_CHECK( | 22 AC_CACHE_CHECK( |
27 #endif | 28 #endif |
28 int foo(void) { return 0; } | 29 int foo(void) { return 0; } |
29 EOF | 30 EOF |
30 # Look for the assembly language name in the .s file. | 31 # Look for the assembly language name in the .s file. |
31 AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1 | 32 AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1 |
32 if LC_ALL=C grep -E '(^|[[^a-zA-Z0-9_]])_foo([[^a-zA-Z0-9_]]|$)' conftest.$gl_asmext >/dev/null; then | 33 if LC_ALL=C $EGREP '(^|[[^a-zA-Z0-9_]])_foo([[^a-zA-Z0-9_]]|$)' conftest.$gl_asmext >/dev/null; then |
33 gl_cv_prog_as_underscore=yes | 34 gl_cv_prog_as_underscore=yes |
34 else | 35 else |
35 gl_cv_prog_as_underscore=no | 36 gl_cv_prog_as_underscore=no |
36 fi | 37 fi |
37 rm -f conftest* | 38 rm -f conftest* |