gh-115119: Detect _decimal dependencies using pkg-config (#115406)

pkg-config is supported for libmpdec 4.0.0 and newer.
This commit is contained in:
Erlend E. Aasland 2024-04-29 08:58:57 +02:00 • committed by GitHub
parent ab6eda0ee5
commit c7e7bfc4ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 211 additions and 104 deletions

View file

@ -34,7 +34,19 @@
#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_typeobject.h"
#include "complexobject.h"
#include "mpdecimal.h"
#include <mpdecimal.h>
// Reuse config from mpdecimal.h if present.
#if defined(MPD_CONFIG_64)
#ifndef CONFIG_64
#define CONFIG_64 MPD_CONFIG_64
#endif
#elif defined(MPD_CONFIG_32)
#ifndef CONFIG_32
#define CONFIG_32 MPD_CONFIG_32
#endif
#endif
#include <ctype.h> // isascii()
#include <stdlib.h>