s48_enable_force_32bit.m4 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. ### s48_enable_force_32bit.m4 --- S48_ENABLE_FORCE_32BIT macro -*- Autoconf -*-
  2. # serial 1
  3. dnl
  4. dnl
  5. dnl Force to use 32bit implementation.
  6. AC_DEFUN([S48_ENABLE_FORCE_32BIT], [dnl
  7. AC_MSG_CHECKING([whether we must build a 32bit binary])
  8. dnl
  9. AC_ARG_ENABLE([force-32bit],
  10. [AC_HELP_STRING([--enable-force-32bit],
  11. [Build a 32bit binary on architectures where this is not the default])],
  12. [if test "$enable_force_32bit" != no; then
  13. S48_FORCE_32_P="1"
  14. BIT_SUFFIX="32"
  15. dnl For now only a Linux/AMD x86_64 version:
  16. case "$host" in
  17. x86_64-*-linux-gnu )
  18. CFLAGS="${CFLAGS} -m32";
  19. LDFLAGS="${LDFLAGS} -m32";
  20. ;;
  21. *darwin* ) dnl AC_MSG_RESULT([Found Darwin, will check later.])
  22. ;;
  23. * ) AC_MSG_ERROR([Don't know how to build a 32bit binary on this architecture])
  24. ;;
  25. esac
  26. AC_DEFINE([BUILD_32BIT], 1,
  27. [Define if we are building a 32bit binary on architectures where this is not the default.])
  28. AC_MSG_RESULT(yes)
  29. else
  30. S48_FORCE_32_P="0"
  31. AC_MSG_RESULT(no)
  32. fi],
  33. [dnl
  34. S48_FORCE_32_P="0"
  35. AC_MSG_RESULT(no)])])
  36. ### s48_enable_force_32bit.m4 ends here