1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
2 /*
3 * Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights
4 * reserved.
5 * Copyright (c) 2016-2017 Intel, Inc. All rights reserved.
6 * $COPYRIGHT$
7 *
8 * Additional copyrights may follow
9 *
10 * $HEADER$
11 */
12
13 #ifndef PMIX_MCA_PINSTALLDIRS_PINSTALLDIRS_H
14 #define PMIX_MCA_PINSTALLDIRS_PINSTALLDIRS_H
15
16 #include <src/include/pmix_config.h>
17
18 #include "src/mca/mca.h"
19 #include "src/mca/base/base.h"
20
21 BEGIN_C_DECLS
22
23 /*
24 * Most of this file is just for pmix_info. The only public interface
25 * once pmix_init has been called is the pmix_pinstall_dirs structure
26 * and the pmix_pinstall_dirs_expand() call */
27 struct pmix_pinstall_dirs_t {
28 char* prefix;
29 char* exec_prefix;
30 char* bindir;
31 char* sbindir;
32 char* libexecdir;
33 char* datarootdir;
34 char* datadir;
35 char* sysconfdir;
36 char* sharedstatedir;
37 char* localstatedir;
38 char* libdir;
39 char* includedir;
40 char* infodir;
41 char* mandir;
42
43 /* Rather than using pkg{data,lib,includedir}, use our own
44 pmix{data,lib,includedir}, which is always set to
45 {datadir,libdir,includedir}/pmix.
46
47 Note that these field names match macros set by configure that
48 are used in Makefile.am files. E.g., project help files are
49 installed into $(pmixdatadir). */
50 char* pmixdatadir;
51 char* pmixlibdir;
52 char* pmixincludedir;
53 };
54 typedef struct pmix_pinstall_dirs_t pmix_pinstall_dirs_t;
55
56 /* Install directories. Only available after pmix_init() */
57 PMIX_EXPORT extern pmix_pinstall_dirs_t pmix_pinstall_dirs;
58
59 /**
60 * Expand out path variables (such as ${prefix}) in the input string
61 * using the current pmix_pinstall_dirs structure */
62 char * pmix_pinstall_dirs_expand(const char* input);
63
64
65 /**
66 * Structure for pinstalldirs components.
67 */
68 struct pmix_pinstalldirs_base_component_2_0_0_t {
69 /** MCA base component */
70 pmix_mca_base_component_t component;
71 /** MCA base data */
72 pmix_mca_base_component_data_t component_data;
73 /** install directories provided by the given component */
74 pmix_pinstall_dirs_t install_dirs_data;
75 };
76 /**
77 * Convenience typedef
78 */
79 typedef struct pmix_pinstalldirs_base_component_2_0_0_t pmix_pinstalldirs_base_component_t;
80
81 /*
82 * Macro for use in components that are of type pinstalldirs
83 */
84 #define PMIX_PINSTALLDIRS_BASE_VERSION_1_0_0 \
85 PMIX_MCA_BASE_VERSION_1_0_0("pinstalldirs", 1, 0, 0)
86
87 END_C_DECLS
88
89 #endif /* PMIX_MCA_PINSTALLDIRS_PINSTALLDIRS_H */