You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.2 KiB

  1. dnl -*- Autoconf -*-
  2. dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
  3. dnl This file is free software, distributed under the terms of the GNU
  4. dnl General Public License. As a special exception to the GNU General
  5. dnl Public License, this file may be distributed as part of a program
  6. dnl that contains a configuration script generated by Autoconf, under
  7. dnl the same distribution terms as the rest of that program.
  8. dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
  9. AC_PREREQ(2.57)
  10. AC_DEFUN([CL_AS_UNDERSCORE],
  11. [AC_BEFORE([$0], [CL_GLOBAL_CONSTRUCTORS])
  12. m4_pattern_allow([^AS_UNDERSCORE$])
  13. AC_CACHE_CHECK(for underscore in external names, cl_cv_prog_as_underscore, [
  14. cat > conftest.c <<EOF
  15. #ifdef __cplusplus
  16. extern "C"
  17. #endif
  18. int foo() { return 0; }
  19. EOF
  20. # look for the assembly language name in the .s file
  21. AC_TRY_COMMAND(${CC-cc} -S conftest.c) >/dev/null 2>&1
  22. if grep _foo conftest.s >/dev/null ; then
  23. cl_cv_prog_as_underscore=yes
  24. else
  25. cl_cv_prog_as_underscore=no
  26. fi
  27. rm -f conftest*
  28. ])
  29. if test $cl_cv_prog_as_underscore = yes; then
  30. AS_UNDERSCORE=true
  31. AC_DEFINE(ASM_UNDERSCORE,,[symbols are prefixed by an underscore in assembly language])
  32. else
  33. AS_UNDERSCORE=false
  34. fi
  35. AC_SUBST(AS_UNDERSCORE)dnl
  36. ])