resetting manifest requested domain to floor
[platform/upstream/mpc.git] / tests / tget_version.c
1 /* tget_version -- Test file for mpc_get_version
2
3 Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011 INRIA
4
5 This file is part of GNU MPC.
6
7 GNU MPC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU Lesser General Public License as published by the
9 Free Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
11
12 GNU MPC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
15 more details.
16
17 You should have received a copy of the GNU Lesser General Public License
18 along with this program. If not, see http://www.gnu.org/licenses/ .
19 */
20
21 #include <string.h>
22 #include <stdlib.h>
23 #include "mpc-tests.h"
24
25 int
26 main (void)
27 {
28 #ifdef __MPIR_VERSION
29   printf ("MPIR: include %d.%d.%d, lib %s\n",
30           __MPIR_VERSION, __MPIR_VERSION_MINOR, __MPIR_VERSION_PATCHLEVEL,
31           mpir_version);
32 #else
33   printf ("GMP: include %d.%d.%d, lib %s\n",
34           __GNU_MP_VERSION, __GNU_MP_VERSION_MINOR, __GNU_MP_VERSION_PATCHLEVEL,
35           gmp_version);
36 #endif
37   printf ("MPFR: include %s, lib %s\n",
38           MPFR_VERSION_STRING,
39           mpfr_get_version ());
40   printf ("MPC: include %s, lib %s\n", MPC_VERSION_STRING,
41           mpc_get_version ());
42
43   if (strcmp (mpc_get_version (), MPC_VERSION_STRING) != 0)
44     {
45       printf ("Error: header and library do not match\n"
46               "mpc_get_version: \"%s\"\nMPC_VERSION_STRING: \"%s\"\n",
47               mpc_get_version(), MPC_VERSION_STRING);
48       exit (1);
49     }
50
51 #ifdef MPC_CC
52   printf ("C compiler: %s\n", MPC_CC);
53 #endif
54 #ifdef MPC_GCC
55   printf ("GCC: %s\n", MPC_GCC);
56 #endif
57 #ifdef MPC_GCC_VERSION
58   printf ("GCC version: %s\n", MPC_GCC_VERSION);
59 #endif
60
61   return 0;
62 }