File: deps.h

package info (click to toggle)
muroard 0.1.14-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 420 kB
  • ctags: 424
  • sloc: ansic: 3,645; sh: 505; makefile: 113
file content (203 lines) | stat: -rw-r--r-- 5,296 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
//deps.h:

/*
 *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2010-2013
 *
 *  This file is part of �RoarD,
 *  a sound server daemon for using the RoarAudio protocol.
 *  See README for details.
 *
 *  This file is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License version 3
 *  or (at your option) any later version as published by
 *  the Free Software Foundation.
 *
 *  RoarAudio is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this software; see the file COPYING.  If not, write to
 *  the Free Software Foundation, 51 Franklin Street, Fifth Floor,
 *  Boston, MA 02110-1301, USA.
 *
 */

#ifndef _MUROARD_DEPS_H_
#define _MUROARD_DEPS_H_

#if defined(MUROARD_FEATURE_SOCKET_DECNET) && !defined(HAVE_LIB_DNET_DAEMON)
#undef MUROARD_FEATURE_SOCKET_DECNET
#endif

#if defined(MUROARD_FEATURE_CODECFILTER_OGG_VORBIS) && !defined(HAVE_LIB_VORBISFILE)
#undef MUROARD_FEATURE_CODECFILTER_OGG_VORBIS
#endif

/*** define things we disabple below if not supported ***/
#ifndef TARGET_MICROCONTROLLER
#define MUROARD_HAVE_FORK
#define MUROARD_HAVE_FCHMOD
#define MUROARD_HAVE_UMASK
#endif

/*** calc TARGET_MICROCONTROLLER stuff first ***/
#ifdef TARGET_MICROCONTROLLER
#ifdef MUROARD_FEATURE_HELP_TEXT
#undef MUROARD_FEATURE_HELP_TEXT
#endif
#ifdef MUROARD_FEATURE_VERSION_TEXT
#undef MUROARD_FEATURE_VERSION_TEXT
#endif
#ifdef MUROARD_FEATURE_SOCKET_UNIX
#undef MUROARD_FEATURE_SOCKET_UNIX
#endif
#ifdef MUROARD_FEATURE_SIGNALS
#undef MUROARD_FEATURE_SIGNALS
#endif
#endif

/*** calc general things ***/
#ifndef MUROARD_FEATURE_ARGV
// disable help:
#ifdef MUROARD_FEATURE_HELP_TEXT
#undef MUROARD_FEATURE_HELP_TEXT
#endif
#ifdef MUROARD_FEATURE_VERSION_TEXT
#undef MUROARD_FEATURE_VERSION_TEXT
#endif
#ifdef MUROARD_FEATURE_CLIENT_FH
#undef MUROARD_FEATURE_CLIENT_FH
#endif
#endif


/*** calc network things ***/
#ifndef MUROARD_FEATURE_SOCKET_LISTEN
// disable all kinds of listen sockets:

// IP sockets:
#ifdef MUROARD_FEATURE_SOCKET_INET
#undef MUROARD_FEATURE_SOCKET_INET
#endif

// UNIX sockets:
#ifdef MUROARD_FEATURE_SOCKET_UNIX
#undef MUROARD_FEATURE_SOCKET_UNIX
#endif

// DECnet sockets:
#ifdef MUROARD_FEATURE_SOCKET_DECNET
#undef MUROARD_FEATURE_SOCKET_DECNET
#endif
#endif

// disable things Win32 does not support:
#if defined(__WIN32)

// No UNIX sockets support on win32
#ifdef MUROARD_FEATURE_SOCKET_UNIX
#undef MUROARD_FEATURE_SOCKET_UNIX
#endif

// No Signals on win32
#ifdef MUROARD_FEATURE_SIGNALS
#undef MUROARD_FEATURE_SIGNALS
#endif

// No fork() on win32:
#ifdef MUROARD_HAVE_FORK
#undef MUROARD_HAVE_FORK
#endif

// No fchmod() on win32:
#ifdef MUROARD_HAVE_FCHMOD
#undef MUROARD_HAVE_FCHMOD
#endif

// No umask() on win32:
#ifdef MUROARD_HAVE_UMASK
#undef MUROARD_HAVE_UMASK
#endif
#endif


#ifndef MUROARD_FEATURE_SOCKET_UNIX
#ifdef MUROARD_FEATURE_CMD_PASSFH
#undef MUROARD_FEATURE_CMD_PASSFH
#endif
#endif

/*** calc support of functions ***/
#if !defined(MUROARD_HAVE_FORK) && !defined(__WIN32)
#ifdef MUROARD_FEATURE_DAEMONIZE
#undef MUROARD_FEATURE_DAEMONIZE
#endif
#endif

#ifndef MUROARD_HAVE_FCHMOD
#ifdef MUROARD_DEFAULT_LISTEN_CHMOD
#undef MUROARD_DEFAULT_LISTEN_CHMOD
#endif
#endif

/*** calc list of needed dsp functions ***/
#ifdef MUROARD_FEATURE_UPMIX_INPUT
#define MUROARD_FEATURE_UPMIX
#endif
#ifdef MUROARD_FEATURE_UPSCALE_INPUT
#define MUROARD_FEATURE_UPSCALE
#endif
#ifdef MUROARD_FEATURE_DOWNMIX_OUTPUT
#define MUROARD_FEATURE_DOWNMIX
#endif
#ifdef MUROARD_FEATURE_DOWNSCALE_OUTPUT
#define MUROARD_FEATURE_DOWNSCALE
#endif

/*** calc minimum requirements, throw error if we hit a error ***/
#if !defined(MUROARD_FEATURE_ARGV) && !defined(MUROARD_FEATURE_SOCKET_LISTEN)
#if !(defined(MUROARD_FEATURE_SOCKET_INET) || defined(MUROARD_FEATURE_SOCKET_UNIX))
#error You did not configure any way to comunicate with the clients
#endif
#endif

#if defined(MUROARD_MEMMGR_NOUSE_MALLOC) && !defined(MUROARD_FIXED_ABUFFER_SIZE)
#error You must define MUROARD_FIXED_ABUFFER_SIZE in feature.h if going to use MUROARD_MEMMGR_NOUSE_MALLOC
#endif

/*** calc defaults based on what is left ***/
#ifdef MUROARD_FEATURE_SOCKET_LISTEN
#ifndef MUROARD_DEFAULT_LISTEN_TYPE
#ifdef MUROARD_FEATURE_SOCKET_UNIX
#define MUROARD_DEFAULT_LISTEN_TYPE        MUROARD_NETWORK_TYPE_UNIX
#elif defined(MUROARD_FEATURE_SOCKET_INET)
#define MUROARD_DEFAULT_LISTEN_TYPE        MUROARD_NETWORK_TYPE_INET
#elif defined(MUROARD_FEATURE_SOCKET_DECNET)
#define MUROARD_DEFAULT_LISTEN_TYPE        MUROARD_NETWORK_TYPE_DECNET
#else
#undef MUROARD_FEATURE_SOCKET_LISTEN
#endif
#endif
#endif

#ifndef MUROARD_FEATURE_DRIVER
#ifdef __WIN32
#define MUROARD_FEATURE_DRIVER             MUROARD_DRIVER_WMM
#else
#define MUROARD_FEATURE_DRIVER             MUROARD_DRIVER_OSS
#endif
#endif

#if defined(MUROARD_FEATURE_SOCKET_DECNET) && !defined(MUROARD_FEATURE_SOCKET_LISTEN_SOCKTYPE)
#define MUROARD_FEATURE_SOCKET_LISTEN_SOCKTYPE
#endif

#if defined(MUROARD_FEATURE_REREADWRITE) && defined(__WIN32)
#undef MUROARD_FEATURE_REREADWRITE
#endif

#endif

//ll