2N/Adnl Copyright (C) 2010 Free Software Foundation, Inc.
2N/Adnl This file is free software; the Free Software Foundation
2N/Adnl gives unlimited permission to copy
and/or distribute it,
2N/Adnl with or without modifications, as long as this notice is preserved.
2N/A# gl_ASM_SYMBOL_PREFIX
2N/A# Tests for the prefix of C symbols at the assembly language level and the
2N/A# linker level. This prefix is either an underscore or empty. Defines the
2N/A# C macro USER_LABEL_PREFIX to this prefix, and sets ASM_SYMBOL_PREFIX to
2N/A# a stringified variant of this prefix.
2N/AAC_DEFUN([gl_ASM_SYMBOL_PREFIX],
2N/A dnl We don't use GCC's __USER_LABEL_PREFIX__ here, because
2N/A dnl 1. It works only for GCC.
2N/A dnl 2. It is incorrectly defined on some platforms, in some GCC versions.
2N/A [whether C symbols are prefixed with underscore at the linker level],
2N/A [gl_cv_prog_as_underscore],
2N/Aextern "C" int foo (void);
2N/Aint foo(void) { return 0; }
2N/A # Look for the assembly language name in the .s file.
2N/A gl_cv_prog_as_underscore=yes
2N/A gl_cv_prog_as_underscore=no
2N/A if test $gl_cv_prog_as_underscore = yes; then
2N/A AC_DEFINE_UNQUOTED([USER_LABEL_PREFIX], [$USER_LABEL_PREFIX],
2N/A [Define to the prefix of C symbols at the assembler and linker level,
2N/A either an underscore or empty.])
2N/A ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
2N/A AC_SUBST([ASM_SYMBOL_PREFIX])