Merge pull request #565 from rneatherway/master
[mono.git] / mono / utils / mono-hwcap.c
1 /*
2  * mono-hwcap.c: Hardware feature detection
3  *
4  * Authors:
5  *    Alex Rønne Petersen (alexrp@xamarin.com)
6  *    Elijah Taylor (elijahtaylor@google.com)
7  *    Miguel de Icaza (miguel@xamarin.com)
8  *    Neale Ferguson (Neale.Ferguson@SoftwareAG-usa.com)
9  *    Paolo Molaro (lupus@xamarin.com)
10  *    Rodrigo Kumpera (kumpera@gmail.com)
11  *    Sebastien Pouliot (sebastien@xamarin.com)
12  *    Zoltan Varga (vargaz@xamarin.com)
13  *
14  * Copyright 2003 Ximian, Inc.
15  * Copyright 2003-2011 Novell, Inc
16  * Copyright 2006 Broadcom
17  * Copyright 2007-2008 Andreas Faerber
18  * Copyright 2011-2013 Xamarin Inc
19  */
20
21 #include <stdlib.h>
22
23 #include "mono/utils/mono-hwcap.h"
24
25 static gboolean hwcap_inited = FALSE;
26
27 void
28 mono_hwcap_init (void)
29 {
30         const char *verbose = g_getenv ("MONO_VERBOSE_HWCAP");
31
32         if (hwcap_inited)
33                 return;
34
35         mono_hwcap_arch_init ();
36
37         if (verbose)
38                 mono_hwcap_print (stdout);
39 }