1//
2//	aegis - project change supervisor
3//	Copyright (C) 1997, 1999, 2002-2008 Peter Miller
4//
5//	This program is free software; you can redistribute it and/or modify
6//	it under the terms of the GNU General Public License as published by
7//	the Free Software Foundation; either version 3 of the License, or
8//	(at your option) any later version.
9//
10//	This program is distributed in the hope that it will be useful,
11//	but WITHOUT ANY WARRANTY; without even the implied warranty of
12//	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13//	GNU General Public License for more details.
14//
15//	You should have received a copy of the GNU General Public License
16//	along with this program. If not, see
17//	<http://www.gnu.org/licenses/>.
18//
19// @configure_input@
20//
21
22#include <common/ac/stdlib.h>
23#include <common/libdir.h>
24
25
26const char *
27configured_prefix(void)
28{
29    return "@prefix@";
30}
31
32
33//
34// On a network, may ONLY be shared betwen machines of identical
35// cpu-vendor-os flavour.  Probably mounted read-only.
36//
37// This is where the executable files live.
38//
39
40const char *
41configured_bindir(void)
42{
43    return "@bindir@";
44}
45
46
47//
48// On a network, may ONLY be shared betwen machines of identical
49// cpu-vendor-os flavour.  Probably mounted read-only.
50//
51
52const char *
53configured_libdir(void)
54{
55    return "@libdir@";
56}
57
58
59//
60// This is where the error message (.mo) files are parked.
61//
62
63const char *
64configured_nlsdir(void)
65{
66    return "@NLSDIR@";
67}
68
69
70//
71// On a network, may be shared betwen all machines.
72// Probably mounted read-only.
73//
74// This is where the various translations of the user documentation are
75// parked, all documents, papers and manual pages, for all languages.
76//
77// This is where the various shell scripts are parked.
78//
79// This is where the report scripts are parked.
80//
81
82const char *
83configured_datadir(void)
84{
85    //
86    // This isn't documented.  This is intentional.
87    // It should only be used for testing purposes.
88    // DO NOT do it for any of the other configured directories.
89    //
90    char *datadir = getenv("AEGIS_DATADIR");
91    if (datadir && *datadir)
92        return datadir;
93
94    return "@datadir@";
95}
96
97
98const char *
99configured_datarootdir(void)
100{
101    return "@datarootdir@";
102}
103
104
105//
106// On a network, may be shared betwen all machines.
107// Probably mounted read-only.
108//
109// This is where the default-language manual entries are parked.
110//
111
112const char *
113configured_mandir(void)
114{
115    return "@mandir@";
116}
117
118
119//
120// On a network, must be shared betwen all machines.
121// MUST BE mounted Read-Write.
122//
123// This is where the lockfile lives.
124//
125// This is where the global state (project index) file lives.
126//
127// This is where the user ownership state files live.
128//
129
130const char *
131configured_comdir(void)
132{
133    return "@sharedstatedir@";
134}
135
136
137//
138// If you choose to edit the values returned by configured_aegis_uid
139// and configured_aegis_gid, you MUST make sure that the corresponding
140// entries in Makefile agree exactly.
141//
142
143int
144configured_aegis_uid(void)
145{
146    return @AEGIS_UID@;
147}
148
149
150int
151configured_aegis_gid(void)
152{
153    return @AEGIS_GID@;
154}
155
156
157const char *
158configured_exeext(void)
159{
160    return "@EXEEXT@";
161}
162
163
164const char *
165configured_sysconfdir(void)
166{
167    return "@sysconfdir@";
168}
169