pandora_use_pipe.m4 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. dnl -*- mode: m4; c-basic-offset: 2; indent-tabs-mode: nil; -*-
  2. dnl vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
  3. dnl
  4. dnl pandora-build: A pedantic build system
  5. dnl Copyright (C) 2009 Sun Microsystems, Inc.
  6. dnl This file is free software; Sun Microsystem
  7. dnl gives unlimited permission to copy and/or distribute it,
  8. dnl with or without modifications, as long as this notice is preserved.
  9. dnl
  10. dnl From Monty Taylor
  11. dnl
  12. dnl Test if we can Use -pipe to avoid making temp files during the compile.
  13. dnl Should speed up compile on slower disks
  14. AC_DEFUN([PANDORA_USE_PIPE],[
  15. AS_IF([test "$GCC" = "yes"],[
  16. AC_CACHE_CHECK([for working -pipe], [pandora_cv_use_pipe], [
  17. AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
  18. #include <stdio.h>
  19. int main(int argc, char** argv)
  20. {
  21. (void) argc; (void) argv;
  22. return 0;
  23. }
  24. ]])],
  25. [pandora_cv_use_pipe=yes],
  26. [pandora_cv_use_pipe=no])
  27. ])
  28. AS_IF([test "$pandora_cv_use_pipe" = "yes"],[
  29. AM_CFLAGS="-pipe ${AM_CFLAGS}"
  30. AM_CXXFLAGS="-pipe ${AM_CXXFLAGS}"
  31. ])
  32. ])
  33. ])