dlitz/pycrypto — comment on commit 7325a2b757612afa766464d4d9ae5cb3ed31711d
File:  line 0
By Legrandin:

As far as I can tell from the MPIR package (which I have never used), we should have:

#if (__GNU_MP_VERSION>=5) && ! defined(__MPIR_VERSION)
#define MPZ_POWM mpz_powm_sec
#else
#define MPZ_POWM mpz_powm
#endif

and as soon as MPIR implement *_sec (for instance in version 3.0):

#if (__GNU_MP_VERSION>=5) && (!defined(__MPIR_VERSION) || __MPIR_VERSION>=3)
#define MPZ_POWM mpz_powm_sec
#else
#define MPZ_POWM mpz_powm
#endif

It's true that setup.py would need to include a few more attempts to compile the sample file,
but my impression is that such logic is still way simpler than having to maintain any autoconf script (in m4)
for just two libraries to build.