1 # Private macro for the TeX Live (TL) tree.
2 # Copyright (C) 1996 - 2009 Peter Breitenlohner <tex-live@tug.org>
4 # This file is free software; the copyright holder
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
12 # Check if gcc asm for i386 needs external symbols with an underscore.
13 AC_DEFUN([KPSE_ASM_UNDERSCORE],
14 [AC_CACHE_CHECK([whether gcc asm needs underscore],
15 [pb_cv_asm_underscore],
17 # Some versions of GCC asm for i386 need an underscore prepended to
18 # external symbols. Figure out if this is so.
19 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
22 #if defined (__i386__) && defined (__GNUC__)
29 void sub () { val = 1; }
30 #endif /* assembler */
32 [[sub (); return 0;]])],
33 [pb_cv_asm_underscore=no],
34 [pb_cv_asm_underscore=yes])])
35 if test "x$pb_cv_asm_underscore" = xyes; then
36 AC_DEFINE([ASM_NEEDS_UNDERSCORE], 1,
37 [web2c: Define if gcc asm needs _ on external symbols.])
39 ]) # KPSE_ASM_UNDERSCORE