1/* buildopt.c -- functions giving information about options used during the 2 mpfr library compilation 3 4Copyright 2009-2023 Free Software Foundation, Inc. 5Contributed by the AriC and Caramba projects, INRIA. 6 7This file is part of the GNU MPFR Library. 8 9The GNU MPFR Library is free software; you can redistribute it and/or modify 10it under the terms of the GNU Lesser General Public License as published by 11the Free Software Foundation; either version 3 of the License, or (at your 12option) any later version. 13 14The GNU MPFR Library is distributed in the hope that it will be useful, but 15WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 16or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 17License for more details. 18 19You should have received a copy of the GNU Lesser General Public License 20along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see 21https://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 2251 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ 23 24#include "mpfr-impl.h" 25 26int 27mpfr_buildopt_tls_p (void) 28{ 29#ifdef MPFR_USE_THREAD_SAFE 30 return 1; 31#else 32 return 0; 33#endif 34} 35 36int 37mpfr_buildopt_float128_p (void) 38{ 39#ifdef MPFR_WANT_FLOAT128 40 return 1; 41#else 42 return 0; 43#endif 44} 45 46int 47mpfr_buildopt_decimal_p (void) 48{ 49#ifdef MPFR_WANT_DECIMAL_FLOATS 50 return 1; 51#else 52 return 0; 53#endif 54} 55 56int 57mpfr_buildopt_gmpinternals_p (void) 58{ 59#if defined(MPFR_HAVE_GMP_IMPL) || defined(WANT_GMP_INTERNALS) 60 return 1; 61#else 62 return 0; 63#endif 64} 65 66int 67mpfr_buildopt_sharedcache_p (void) 68{ 69#ifdef MPFR_WANT_SHARED_CACHE 70 return 1; 71#else 72 return 0; 73#endif 74} 75 76const char *mpfr_buildopt_tune_case (void) 77{ 78 /* MPFR_TUNE_CASE is always defined (can be "default"). */ 79 return MPFR_TUNE_CASE; 80} 81