shared: include "nm-shared-utils.h"
[NetworkManager.git] / shared / nm-default.h
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* NetworkManager -- Network link manager
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301 USA.
18  *
19  * (C) Copyright 2015 Red Hat, Inc.
20  */
21
22 #ifndef __NM_DEFAULT_H__
23 #define __NM_DEFAULT_H__
24
25 /* makefiles define NETWORKMANAGER_COMPILATION for compiling NetworkManager.
26  * Depending on which parts are compiled, different values are set. */
27 #define NM_NETWORKMANAGER_COMPILATION_DEFAULT             0x0001
28 #define NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON       0x0002
29 #define NM_NETWORKMANAGER_COMPILATION_LIB                 0x0004
30 #define NM_NETWORKMANAGER_COMPILATION_SYSTEMD             0x0008
31 #define NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY          0x0010
32
33 #ifndef NETWORKMANAGER_COMPILATION
34 /* For convenience, we don't require our Makefile.am to define
35  * -DNETWORKMANAGER_COMPILATION. As we now include this internal header,
36  *  we know we do a NETWORKMANAGER_COMPILATION. */
37 #define NETWORKMANAGER_COMPILATION NM_NETWORKMANAGER_COMPILATION_DEFAULT
38 #endif
39
40 /*****************************************************************************/
41
42 /* always include these headers for our internal source files. */
43
44 #ifndef ___CONFIG_H__
45 #define ___CONFIG_H__
46 #include <config.h>
47 #endif
48
49 #include <stdlib.h>
50
51 #include "nm-glib.h"
52 #include "nm-version.h"
53 #include "gsystem-local-alloc.h"
54 #include "nm-macros-internal.h"
55 #include "nm-shared-utils.h"
56
57 /*****************************************************************************/
58
59 #if ((NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_LIB) || ((NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY)
60
61 #include <glib/gi18n-lib.h>
62
63 #else
64
65 #include <glib/gi18n.h>
66
67 #endif /* NM_NETWORKMANAGER_COMPILATION_LIB || NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY */
68
69 /*****************************************************************************/
70
71 #if (NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON || (NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_SYSTEMD
72
73 /* the header is used inside src/, where additional
74  * headers are available. */
75
76 #include "nm-types.h"
77 #include "nm-logging.h"
78
79 #endif /* NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON */
80
81 /*****************************************************************************/
82
83 #endif /* __NM_DEFAULT_H__ */