config.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* -----------------------------------------------------------------------------
  2. Copyright (c) 2006 Simon Brown si@sjbrown.co.uk
  3. Permission is hereby granted, free of charge, to any person obtaining
  4. a copy of this software and associated documentation files (the
  5. "Software"), to deal in the Software without restriction, including
  6. without limitation the rights to use, copy, modify, merge, publish,
  7. distribute, sublicense, and/or sell copies of the Software, and to
  8. permit persons to whom the Software is furnished to do so, subject to
  9. the following conditions:
  10. The above copyright notice and this permission notice shall be included
  11. in all copies or substantial portions of the Software.
  12. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  13. OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  14. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  15. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  16. CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  17. TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  18. SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  19. -------------------------------------------------------------------------- */
  20. #ifndef SQUISH_CONFIG_H
  21. #define SQUISH_CONFIG_H
  22. // Set to 1 when building squish to use Altivec instructions.
  23. #ifndef SQUISH_USE_ALTIVEC
  24. #define SQUISH_USE_ALTIVEC 0
  25. #endif
  26. // Set to 1 or 2 when building squish to use SSE or SSE2 instructions.
  27. #ifndef SQUISH_USE_SSE
  28. #define SQUISH_USE_SSE 0
  29. #endif
  30. // Internally set SQUISH_USE_SIMD when either Altivec or SSE is available.
  31. #if SQUISH_USE_ALTIVEC && SQUISH_USE_SSE
  32. #error "Cannot enable both Altivec and SSE!"
  33. #endif
  34. #if SQUISH_USE_ALTIVEC || SQUISH_USE_SSE
  35. #define SQUISH_USE_SIMD 1
  36. #else
  37. #define SQUISH_USE_SIMD 0
  38. #endif
  39. #endif // ndef SQUISH_CONFIG_H