configuration.h.in 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * {- join("\n * ", @autowarntext) -}
  3. *
  4. * Copyright 2016-2021 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. # pragma once
  14. # ifdef __cplusplus
  15. extern "C" {
  16. # endif
  17. # ifdef OPENSSL_ALGORITHM_DEFINES
  18. # error OPENSSL_ALGORITHM_DEFINES no longer supported
  19. # endif
  20. /*
  21. * OpenSSL was configured with the following options:
  22. */
  23. {- if (@{$config{openssl_sys_defines}}) {
  24. foreach (@{$config{openssl_sys_defines}}) {
  25. $OUT .= "# ifndef $_\n";
  26. $OUT .= "# define $_ 1\n";
  27. $OUT .= "# endif\n";
  28. }
  29. }
  30. foreach (@{$config{openssl_api_defines}}) {
  31. (my $macro, my $value) = $_ =~ /^(.*?)=(.*?)$/;
  32. $OUT .= "# define $macro $value\n";
  33. }
  34. if (@{$config{openssl_feature_defines}}) {
  35. foreach (@{$config{openssl_feature_defines}}) {
  36. $OUT .= "# ifndef $_\n";
  37. $OUT .= "# define $_\n";
  38. $OUT .= "# endif\n";
  39. }
  40. }
  41. "";
  42. -}
  43. /* Generate 80386 code? */
  44. {- $config{processor} eq "386" ? "# define" : "# undef" -} I386_ONLY
  45. /*
  46. * The following are cipher-specific, but are part of the public API.
  47. */
  48. # if !defined(OPENSSL_SYS_UEFI)
  49. {- $config{bn_ll} ? "# define" : "# undef" -} BN_LLONG
  50. /* Only one for the following should be defined */
  51. {- $config{b64l} ? "# define" : "# undef" -} SIXTY_FOUR_BIT_LONG
  52. {- $config{b64} ? "# define" : "# undef" -} SIXTY_FOUR_BIT
  53. {- $config{b32} ? "# define" : "# undef" -} THIRTY_TWO_BIT
  54. # endif
  55. # define RC4_INT {- $config{rc4_int} -}
  56. # ifdef __cplusplus
  57. }
  58. # endif
  59. #endif /* OPENSSL_CONFIGURATION_H */