1 /*
2 Copyright 2020-2021, Dirk Krause. All rights reserved.
3 SPDX-License-Identifier:	BSD-3-Clause
4 */
5 #ifndef DK4INST_H_INCLUDED
6 #define	DK4INST_H_INCLUDED 1
7 
8 /**	@file	dk4inst.h	Installation directories.
9 
10 	Obtain installation prefix, system configuration directory,
11 	data directory, local state directory, binary directory,
12 	root binary directory, library directory, include directory,
13 	man page directory, executable files prefix and libexec
14 	directory is configured during build process.
15 
16 	CRT on Windows: Not used.
17 
18 	Produced by configure, 2021-09-03 16:44:01.
19 */
20 
21 #ifndef DK4CONF_H_INCLUDED
22 #include "dk4conf.h"
23 #endif
24 
25 #ifndef DK4TYPES_H_INCLUDED
26 #include <libdk4base/dk4types.h>
27 #endif
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 /**	Retrieve one installation directory.
34 	@param	i	Directory index:
35 			 0 = prefix,
36 			 1 = system configuration directory,
37 			 2 = data directory,
38 			 3 = local state directory,
39 			 4 = binary directory,
40 			 5 = root binary directory,
41 			 6 = library directory,
42 			 7 = include directory,
43 			 8 = man page directory,
44 			 9 = executable files prefix,
45 			10 = libexec directory.
46 	@return	Pointer to directory name on success, NULL on error.
47 */
48 const dkChar *
49 dk4inst_get_directory(size_t i);
50 
51 #ifdef __cplusplus
52 }
53 #endif
54 
55 /**	@defgroup	instdirs	Installation directories. */
56 /**@{*/
57 #if _WIN32
58 
59 /**	Installation prefix, typlically /usr or /usr/local.
60 */
61 #define	DK4_INST_DIR_PREFIX	"C:\\Program Files\\Krause"
62 
63 /**	System configuration directory, typically /etc or /usr/local/etc.
64 */
65 #define	DK4_INST_DIR_ETC	"C:\\Program Files\\Krause\\etc"
66 
67 /**	Data directory, typically /usr/share or /usr/local/share.
68 */
69 #define	DK4_INST_DIR_SHARE	"C:\\Program Files\\Krause\\share"
70 
71 /**	Local state directory, typically /var or /usr/local/var.
72 */
73 #define	DK4_INST_DIR_VAR	"C:\\Program Files\\Krause\\var"
74 
75 /**	Binaries directory, typically /usr/bin or /usr/local/bin.
76 */
77 #define	DK4_INST_DIR_BIN	"C:\\Program Files\\Krause\\bin"
78 
79 /**	System binaries directory, typically /usr/sbin or /usr/local/sbin.
80 */
81 #define	DK4_INST_DIR_SBIN	"C:\\Program Files\\Krause\\sbin"
82 
83 /**	Libraries directory, typically /usr/lib or /usr/local/lib.
84 */
85 #define	DK4_INST_DIR_LIB	"C:\\Program Files\\Krause\\lib"
86 
87 /**	Include files directory, typically /usr/include or /usr/local/include.
88 */
89 #define	DK4_INST_DIR_INCLUDE	"C:\\Program Files\\Krause\\include"
90 
91 /**	Man pages directory, typically /usr/share/man or /usr/local/share/man.
92 */
93 #define	DK4_INST_DIR_MAN	"C:\\Program Files\\Krause\\man"
94 
95 /**	Prefix directory for executables.
96 */
97 #define	DK4_INST_DIR_EXECPRE	"C:\\Program Files\\Krause"
98 
99 /**	Libexec directory, typically /usr/libexec or /usr/local/libexec.
100 */
101 #define	DK4_INST_DIR_LIBEXEC	"C:\\Program Files\\Krause\\libexec"
102 
103 /**	Run state directory, typically /var/run or /run.
104 */
105 #define DK4_INST_DIR_RUNSTATE	"C:\\Program Files\\Krause\\run"
106 
107 /**	Run state directory for systemd, typically /run.
108 */
109 #define	DK4_INST_DIR_SYSTEMD_RUN	"C:\\Program Files\\Krause\\run"
110 
111 #else
112 
113 /**	Installation prefix, typlically /usr or /usr/local.
114 */
115 #define	DK4_INST_DIR_PREFIX	"/usr/local"
116 
117 /**	System configuration directory, typically /etc or /usr/local/etc.
118 */
119 #define	DK4_INST_DIR_ETC	"/usr/local/etc"
120 
121 /**	Data directory, typically /usr/share or /usr/local/share.
122 */
123 #define	DK4_INST_DIR_SHARE	"/usr/local/share"
124 
125 /**	Local state directory, typically /var or /usr/local/var.
126 */
127 #define	DK4_INST_DIR_VAR	"/usr/local/var"
128 
129 /**	Binaries directory, typically /usr/bin or /usr/local/bin.
130 */
131 #define	DK4_INST_DIR_BIN	"/usr/local/bin"
132 
133 /**	System binaries directory, typically /usr/sbin or /usr/local/sbin.
134 */
135 #define	DK4_INST_DIR_SBIN	"/usr/local/sbin"
136 
137 /**	Libraries directory, typically /usr/lib or /usr/local/lib.
138 */
139 #define	DK4_INST_DIR_LIB	"/usr/local/lib"
140 
141 /**	Include files directory, typically /usr/include or /usr/local/include.
142 */
143 #define	DK4_INST_DIR_INCLUDE	"/usr/local/include"
144 
145 /**	Man pages directory, typically /usr/share/man or /usr/local/share/man.
146 */
147 #define	DK4_INST_DIR_MAN	"/usr/local/share/man"
148 
149 /**	Prefix directory for executables.
150 */
151 #define	DK4_INST_DIR_EXECPRE	"/usr/local"
152 
153 /**	Libexec directory, typically /usr/libexec or /usr/local/libexec.
154 */
155 #define	DK4_INST_DIR_LIBEXEC	"/usr/local/libexec"
156 
157 /**	Run state directory, typically /var/run or /run.
158 */
159 #define DK4_INST_DIR_RUNSTATE	"/usr/local/var/run"
160 
161 /**	Run state directory for systemd, typically /run.
162 */
163 #define DK4_INST_DIR_SYSTEMD_RUN	"/run"
164 
165 #endif
166 /**@}*/
167 
168 #endif
169 
170 /* vim: set ai sw=2 filetype=c : */
171 
172