Merge pull request #15 from pobept/dictionary-redback
[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 NEVER_RETURNS version(void)
34 {
35
36         printf("%s: %s\n", progname, radiusd_version);
37
38         printf("Copyright (C) 1999-2012 The FreeRADIUS server project and contributors.\n");
39         printf("There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n");
40         printf("PARTICULAR PURPOSE.\n");
41         printf("You may redistribute copies of FreeRADIUS under the terms of the\n");
42         printf("GNU General Public License.\n");
43         printf("For more information about these matters, see the file named COPYRIGHT.\n");
44
45         if (debug_flag) {
46                 printf("\n");
47
48                 printf("Functionality: ");
49                 
50 #ifdef WITH_ACCOUNTING
51                 printf("accounting, ");
52 #endif
53                 printf("authentication, "); /* always enabled */
54
55 #ifdef WITH_COA
56                 printf("coa, ");
57 #endif
58 #ifdef WITH_COMMAND_SOCKET
59                 printf("control-socket, ");
60 #endif
61 #ifdef WITH_DETAIL
62                 printf("detail, ");
63 #endif
64 #ifdef WITH_DHCP
65                 printf("dhcp, ");
66 #endif
67 #ifdef WITH_DYNAMIC_CLIENTS
68                 printf("dynamic clients, ");
69 #endif
70 #ifdef OSFC2
71                 printf("OSFC2, ");
72 #endif
73 #ifdef WITH_PROXY
74                 printf("proxy, ");
75 #endif
76 #ifdef HAVE_PCREPOSIX_H
77                 printf("regex-PCRE, ");
78 #else
79 #ifdef HAVE_REGEX_H
80                 printf("regex-posix, ");
81 #endif
82 #endif
83
84 #ifdef WITH_SESSION_MGMT
85                 printf("session-management, ");
86 #endif
87 #ifdef WITH_STATS
88                 printf("stats, ");
89 #endif
90 #ifdef WITH_TCP
91                 printf("tcp, ");
92 #endif
93 #ifdef WITH_TLS
94                 printf("TLS, ");
95 #endif
96 #ifdef WITH_UNLANG
97                 printf("unlang, ");
98 #endif
99 #ifdef WITH_VMPS
100                 printf("vmps, ");
101 #endif
102                 printf("\n");
103         }
104
105         exit (0);
106 }
107