configuration.h.in 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * {- join("\n * ", @autowarntext) -}
  3. *
  4. * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
  5. *
  6. * Licensed under the Apache License 2.0 (the "License"). You may not use
  7. * this file except in compliance with the License. You can obtain a copy
  8. * in the file LICENSE in the source distribution or at
  9. * https://www.openssl.org/source/license.html
  10. */
  11. #ifndef OPENSSL_CONFIGURATION_H
  12. # define OPENSSL_CONFIGURATION_H
  13. # ifdef __cplusplus
  14. extern "C" {
  15. # endif
  16. # ifdef OPENSSL_ALGORITHM_DEFINES
  17. # error OPENSSL_ALGORITHM_DEFINES no longer supported
  18. # endif
  19. /*
  20. * OpenSSL was configured with the following options:
  21. */
  22. {- if (@{$config{openssl_sys_defines}}) {
  23. foreach (@{$config{openssl_sys_defines}}) {
  24. $OUT .= "# ifndef $_\n";
  25. $OUT .= "# define $_ 1\n";
  26. $OUT .= "# endif\n";
  27. }
  28. }
  29. foreach (@{$config{openssl_api_defines}}) {
  30. (my $macro, my $value) = $_ =~ /^(.*?)=(.*?)$/;
  31. $OUT .= "# define $macro $value\n";
  32. }
  33. if (@{$config{openssl_feature_defines}}) {
  34. foreach (@{$config{openssl_feature_defines}}) {
  35. $OUT .= "# ifndef $_\n";
  36. $OUT .= "# define $_\n";
  37. $OUT .= "# endif\n";
  38. }
  39. }
  40. "";
  41. -}
  42. /* Generate 80386 code? */
  43. {- $config{processor} eq "386" ? "# define" : "# undef" -} I386_ONLY
  44. /*
  45. * The following are cipher-specific, but are part of the public API.
  46. */
  47. # if !defined(OPENSSL_SYS_UEFI)
  48. {- $config{bn_ll} ? "# define" : "# undef" -} BN_LLONG
  49. /* Only one for the following should be defined */
  50. {- $config{b64l} ? "# define" : "# undef" -} SIXTY_FOUR_BIT_LONG
  51. {- $config{b64} ? "# define" : "# undef" -} SIXTY_FOUR_BIT
  52. {- $config{b32} ? "# define" : "# undef" -} THIRTY_TWO_BIT
  53. # endif
  54. # define RC4_INT {- $config{rc4_int} -}
  55. # ifdef __cplusplus
  56. }
  57. # endif
  58. #endif /* OPENSSL_CONFIGURATION_H */