Add some additional defines to version output
[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("Server was built with: ");
37                 
38 #ifdef WITH_ACCOUNTING
39         DEBUG3("  accounting");
40 #endif
41         DEBUG3("  authentication"); /* always enabled */
42
43 #ifdef WITH_ASCEND_BINARY
44         DEBUG3("  ascend binary attributes");
45 #endif
46 #ifdef WITH_COA
47         DEBUG3("  coa");
48 #endif
49 #ifdef WITH_COMMAND_SOCKET
50         DEBUG3("  control-socket");
51 #endif
52 #ifdef WITH_DETAIL
53         DEBUG3("  detail");
54 #endif
55 #ifdef WITH_DHCP
56         DEBUG3("  dhcp");
57 #endif
58 #ifdef WITH_DYNAMIC_CLIENTS
59         DEBUG3("  dynamic clients");
60 #endif
61 #ifdef OSFC2
62         DEBUG3("  OSFC2");
63 #endif
64 #ifdef WITH_PROXY
65         DEBUG3("  proxy");
66 #endif
67 #ifdef HAVE_PCREPOSIX_H
68         DEBUG3("  regex-pcre");
69 #else
70 #ifdef HAVE_REGEX_H
71         DEBUG3("  regex-posix");
72 #endif
73 #endif
74
75 #ifdef WITH_SESSION_MGMT
76         DEBUG3("  session-management");
77 #endif
78 #ifdef WITH_STATS
79         DEBUG3("  stats");
80 #endif
81 #ifdef WITH_TCP
82         DEBUG3("  tcp");
83 #endif
84 #ifdef WITH_THREADS
85         DEBUG3("  threads");
86 #endif
87 #ifdef WITH_TLS
88         DEBUG3("  tls");
89 #endif
90 #ifdef WITH_UNLANG
91         DEBUG3("  unlang");
92 #endif
93 #ifdef WITH_VMPS
94         DEBUG3("  vmps");
95 #endif
96         radlog(L_INFO, "Copyright (C) 1999-2012 The FreeRADIUS server project and contributors.");
97         radlog(L_INFO, "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A");
98         radlog(L_INFO, "PARTICULAR PURPOSE.");
99         radlog(L_INFO, "You may redistribute copies of FreeRADIUS under the terms of the");
100         radlog(L_INFO, "GNU General Public License.");
101         radlog(L_INFO, "For more information about these matters, see the file named COPYRIGHT.");
102         
103         fflush(NULL);
104 }
105