Skip to content

Commit

Permalink
pythongh-115119: Detect _decimal dependencies using pkg-config
Browse files Browse the repository at this point in the history
Only libmpdec 4.0.0 supports pkg-config.
  • Loading branch information
erlend-aasland committed Feb 13, 2024
1 parent d823c23 commit cff99f3
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 104 deletions.
10 changes: 9 additions & 1 deletion Modules/_decimal/_decimal.c
Expand Up @@ -33,7 +33,15 @@
#include "pycore_long.h" // _PyLong_IsZero()
#include "pycore_pystate.h" // _PyThreadState_GET()
#include "complexobject.h"
#include "mpdecimal.h"

#include <mpdecimal.h>

// Reuse config from mpdecimal.h if present.
#if defined(MPD_CONFIG_64)
#define CONFIG_64 MPD_CONFIG_64
#elif defined(MPD_CONFIG_32)
#define CONFIG_32 MPD_CONFIG_32
#endif

#include <ctype.h> // isascii()
#include <stdlib.h>
Expand Down
159 changes: 118 additions & 41 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cff99f3

Please sign in to comment.