Merge pull request #54 from mcnewton/patch-client-cert
[freeradius.git] / src / main / version.c
1 /*
2  * version.c    Print version number and exit.
3  *
4  * Version:     $Id$
5  *
6  *   This program is free software; you can redistribute it and/or modify
7  *   it under the terms of the GNU General Public License as published by
8  *   the Free Software Foundation; either version 2 of the License, or
9  *   (at your option) any later version.
10  *
11  *   This program is distributed in the hope that it will be useful,
12  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *   GNU General Public License for more details.
15  *
16  *   You should have received a copy of the GNU General Public License
17  *   along with this program; if not, write to the Free Software
18  *   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  *
20  * Copyright 1999-2012  The FreeRADIUS server project
21  * Copyright 2012  Alan DeKok <aland@ox.org>
22  * Copyright 2000  Chris Parker <cparker@starnetusa.com>
23  */
24
25 #include <freeradius-devel/ident.h>
26 RCSID("$Id$")
27
28 #include <freeradius-devel/radiusd.h>
29
30 /*
31  *      Display the revision number for this program
32  */
33 void version(void)
34 {
35         radlog(L_INFO, "%s: %s", progname, radiusd_version);
36         DEBUG3("Functionality: ");
37                 
38 #ifdef WITH_ACCOUNTING
39         DEBUG3(" accounting");
40 #endif
41         DEBUG3(" authentication"); /* always enabled */
42
43 #ifdef WITH_COA
44         DEBUG3(" coa");
45 #endif
46 #ifdef WITH_COMMAND_SOCKET
47         DEBUG3(" control-socket");
48 #endif
49 #ifdef WITH_DETAIL
50         DEBUG3(" detail");
51 #endif
52 #ifdef WITH_DHCP
53         DEBUG3(" dhcp");
54 #endif
55 #ifdef WITH_DYNAMIC_CLIENTS
56         DEBUG3(" dynamic clients");
57 #endif
58 #ifdef OSFC2
59         DEBUG3(" OSFC2");
60 #endif
61 #ifdef WITH_PROXY
62         DEBUG3(" proxy");
63 #endif
64 #ifdef HAVE_PCREPOSIX_H
65         DEBUG3(" regex-PCRE");
66 #else
67 #ifdef HAVE_REGEX_H
68         DEBUG3(" regex-posix");
69 #endif
70 #endif
71
72 #ifdef WITH_SESSION_MGMT
73         DEBUG3(" session-management");
74 #endif
75 #ifdef WITH_STATS
76         DEBUG3(" stats");
77 #endif
78 #ifdef WITH_TCP
79         DEBUG3(" tcp");
80 #endif
81 #ifdef WITH_TLS
82         DEBUG3(" TLS");
83 #endif
84 #ifdef WITH_UNLANG
85         DEBUG3(" unlang");
86 #endif
87 #ifdef WITH_VMPS
88         DEBUG3(" vmps");
89 #endif
90         radlog(L_INFO, "Copyright (C) 1999-2012 The FreeRADIUS server project and contributors.");
91         radlog(L_INFO, "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A");
92         radlog(L_INFO, "PARTICULAR PURPOSE.");
93         radlog(L_INFO, "You may redistribute copies of FreeRADIUS under the terms of the");
94         radlog(L_INFO, "GNU General Public License.");
95         radlog(L_INFO, "For more information about these matters, see the file named COPYRIGHT.");
96         
97         fflush(NULL);
98 }
99