| 1 |
/* $Id: config.h.in,v 1.4 1999/06/09 06:25:20 boyns Exp $ -*- c -*- */ |
| 2 |
|
| 3 |
/* |
| 4 |
* Copyright (C) 1993-99 Mark R. Boyns <[email protected]> |
| 5 |
* |
| 6 |
* This file is part of rplay. |
| 7 |
* |
| 8 |
* rplay is free software; you can redistribute it and/or modify |
| 9 |
* it under the terms of the GNU General Public License as published by |
| 10 |
* the Free Software Foundation; either version 2 of the License, or |
| 11 |
* (at your option) any later version. |
| 12 |
* |
| 13 |
* rplay is distributed in the hope that it will be useful, |
| 14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 |
* GNU General Public License for more details. |
| 17 |
* |
| 18 |
* You should have received a copy of the GNU General Public License |
| 19 |
* along with rplay; see the file COPYING. If not, write to the |
| 20 |
* Free Software Foundation, Inc., |
| 21 |
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. |
| 22 |
*/ |
| 23 |
|
| 24 |
|
| 25 |
#ifndef _config_h |
| 26 |
#define _config_h |
| 27 |
|
| 28 |
#undef SVR4 |
| 29 |
|
| 30 |
/* |
| 31 |
* rplayd user and group privs. (default unset) |
| 32 |
* |
| 33 |
* Example: |
| 34 |
* #define RPLAYD_USER "nobody" |
| 35 |
* #define RPLAYD_GROUP "audio" |
| 36 |
*/ |
| 37 |
#undef RPLAYD_USER |
| 38 |
#undef RPLAYD_GROUP |
| 39 |
|
| 40 |
/* |
| 41 |
* Use host authentication. |
| 42 |
*/ |
| •43 |
#define AUTH |
| 44 |
|
| 45 |
/* |
| 46 |
* Support rplay 2.0 packets. If you define this then you |
| 47 |
* should also define OLD_RPLAY_PORTS below. |
| 48 |
*/ |
| 49 |
#define OLD_RPLAY |
| 50 |
|
| 51 |
/* |
| 52 |
* Support older RPLAY port 55555 and RPTP port 55556. |
| 53 |
* This option really enables support for 2 RPLAY ports and 2 RPTP ports |
| 54 |
* which default to 5555/55555 for RPLAY and 5556/55556 for RPTP. |
| 55 |
*/ |
| 56 |
#define OTHER_RPLAY_PORTS |
| 57 |
|
| 58 |
/* |
| 59 |
* Maximum number of sounds that can be playing at once. |
| 60 |
*/ |
| 61 |
#define SPOOL_SIZE 12 |
| 62 |
|
| 63 |
/* |
| 64 |
* The size of rplayd's internal sound hash table. |
| 65 |
*/ |
| 66 |
#define MAX_SOUNDS 4001 /* yes that is a prime number */ |
| 67 |
|
| 68 |
/* |
| 69 |
* Should rplayd log by default? |
| 70 |
*/ |
| 71 |
/* #define RPLAYD_ALWAYS_LOG */ |
| 72 |
|
| 73 |
/* |
| 74 |
* Define the default rplayd logging level: |
| 75 |
* 1 - System and rplayd errors. |
| 76 |
* 2 - + RPTP connections, get, put, find. |
| 77 |
* 3 - + play, stop, pause, continue, etc. |
| •78 |
* 4 - + Debug messages. |
| 79 |
* |
| 80 |
* Note that the logging level can also be specified with |
| 81 |
* rplayd command line options. This is only used if |
| 82 |
* RPLAYD_ALWAYS_LOG is defined above. |
| 83 |
*/ |
| 84 |
#define RPLAYD_LOG_LEVEL 1 |
| 85 |
|
| 86 |
/* |
| 87 |
* By default, rplayd will never timeout. If you would rather |
| 88 |
* have rplayd exit after some period of idle time, change the zero |
| 89 |
* below to the appropriate number of seconds. |
| 90 |
* |
| 91 |
* NOTE: This value used to be 360 instead of 0. |
| 92 |
*/ |
| 93 |
#define RPLAYD_TIMEOUT 0 /* seconds */ |
| 94 |
|
| 95 |
/* |
| 96 |
* Maximum size of the rplay.cache directory. |
| 97 |
* |
| 98 |
* The size you choose should at least be big enough to hold the |
| 99 |
* largest sound you plan on playing. Note that this is the disk |
| 100 |
* cache and not the memory cache which is mentioned below. |
| 101 |
*/ |
| 102 |
#define RPLAY_CACHE_SIZE (8*1024*1024) |
| 103 |
|
| 104 |
/* |
| 105 |
* Memory cache. |
| 106 |
* |
| 107 |
* Sounds are cached using mmap (if available) or malloc (no mmap). |
| 108 |
* Non-cached sounds are read piece by piece. |
| 109 |
* |
| 110 |
* MEMORY_CACHE_SOUND_SIZE - maximum size of a sound that can be cached in memory. |
| 111 |
* MEMORY_CACHE_SIZE - maximum size of the entire memory cache. |
| 112 |
* |
| 113 |
* Setting MEMORY_CACHE_SIZE=0 will disable the memory cache. |
| 114 |
*/ |
| 115 |
#define MEMORY_CACHE_SOUND_SIZE (2*1024*1024) |
| 116 |
#define MEMORY_CACHE_SIZE (4*1024*1024) |
| 117 |
|
| 118 |
/* |
| 119 |
* Delay time between RPTP server pings. |
| 120 |
*/ |
| 121 |
#define RPTP_PING_DELAY 5 |
| 122 |
|
| 123 |
/* |
| 124 |
* Number of times to try and connect to an RPTP server. |
| 125 |
*/ |
| 126 |
#define RPTP_CONNECT_ATTEMPTS 3 |
| 127 |
|
| 128 |
/* |
| 129 |
* Close RPTP connections after 300 idle seconds (disabled with zero). |
| 130 |
*/ |
| 131 |
#define RPTP_CONNECTION_TIMEOUT 300 |
| 132 |
|
| 133 |
/* |
| 134 |
* Maximum number of RPTP client connections (disabled with zero). |
| 135 |
*/ |
| 136 |
#define RPTP_MAX_CONNECTIONS 16 |
| 137 |
|
| 138 |
/* |
| 139 |
* Enable simulated hardware volume control. |
| 140 |
*/ |
| 141 |
/* #define FAKE_VOLUME */ |
| 142 |
|
| 143 |
/* |
| 144 |
* Enable the automatic re-reading of rplayd's configuration files when |
| 145 |
* they are modified. |
| 146 |
*/ |
| 147 |
#define AUTO_REREAD |
| 148 |
|
| 149 |
/* |
| 150 |
* The maximum sample rate that rplayd will/can ever output. |
| 151 |
*/ |
| 152 |
#define MAX_SAMPLE_RATE 48000 /* 48000 Hz */ |
| 153 |
|
| 154 |
/* |
| 155 |
* A list of directories that cannot be accessed to obtain sound files. |
| 156 |
* This feature can be disabled using `#undef BAD_DIRS'. |
| 157 |
*/ |
| 158 |
#define BAD_DIRS "/dev:/etc:/devices:/proc" |
| 159 |
|
| 160 |
#define HAVE_ADPCM |
| 161 |
#define HAVE_GSM |
| 162 |
#undef HAVE_CDROM |
| 163 |
#undef HAVE_CDDA |
| 164 |
|
| 165 |
#if defined (sun) && defined (SVR4) /* Solaris 2.x */ |
| 166 |
#define HAVE_CDROM |
| 167 |
#define HAVE_CDDA |
| 168 |
#endif /* Solaris 2.x */ |
| 169 |
|
| 170 |
#if defined (linux) |
| 171 |
#define HAVE_OSS |
| 172 |
#define HAVE_CDROM |
| 173 |
#endif |
| 174 |
|
| 175 |
#define HAVE_HELPERS |
| 176 |
|
| 177 |
/*************** EVERYTHING BELOW THIS LINE SHOULD BE OK *********************/ |
| 178 |
|
| 179 |
#undef HAVE_STRDUP |
| 180 |
#undef HAVE_STRERROR |
| 181 |
#undef HAVE_MMAP |
| 182 |
#undef HAVE_FSTAT |
| 183 |
#undef HAVE_FCHMOD |
| 184 |
#undef HAVE_FCHOWN |
| 185 |
#undef HAVE_UTIME |
| 186 |
#undef HAVE_UTIMES |
| 187 |
#undef HAVE_MEMMOVE |
| 188 |
#undef HAVE_SIGSET |
| 189 |
#undef HAVE_WAITPID |
| 190 |
#undef HAVE_SNPRINTF |
| 191 |
#undef HAVE_VSNPRINTF |
| 192 |
#undef HAVE_LIBREADLINE |
| 193 |
#undef HAVE_RANDOM |
| 194 |
#undef HAVE_SRANDOM |
| •195 |
#undef HAVE_REGCOMP |
| 196 |
|
| 197 |
#undef HAVE_STDC_HEADERS |
| 198 |
#undef HAVE_MEMORY_H |
| 199 |
#undef HAVE_STRING_H |
| 200 |
#undef HAVE_STDLIB_H |
| 201 |
#undef HAVE_LIMITS_H |
| 202 |
#undef HAVE_FCNTL_H |
| 203 |
#undef HAVE_STRING_H |
| 204 |
#undef HAVE_STRINGS_H |
| 205 |
#undef HAVE_UNISTD_H |
| 206 |
#undef HAVE_UTIME_H |
| 207 |
#undef HAVE_SYS_WAIT_H |
| 208 |
|
| 209 |
#undef HAVE_GSM_H |
| 210 |
#undef HAVE_GSM_GSM_H |
| •211 |
#undef HAVE_REGEX_H |
| 212 |
#undef HAVE_RXPOSIX_H |
| 213 |
#undef HAVE_RX_RXPOSIX_H |
| 214 |
|
| 215 |
/* Convert HAVE_ to HAS_ for gsm. See gsm/include/config.h.gsm */ |
| 216 |
#ifdef HAVE_STDLIB_H |
| 217 |
#define HAS_STDLIB_H |
| 218 |
#endif |
| 219 |
|
| 220 |
#ifdef HAVE_LIMITS_H |
| 221 |
#define HAS_LIMITS_H |
| 222 |
#endif |
| 223 |
|
| 224 |
#ifdef HAVE_FCNTL_H |
| 225 |
#define HAS_FCNTL_H |
| 226 |
#endif |
| 227 |
|
| 228 |
#ifdef HAVE_FSTAT |
| 229 |
#define HAS_FSTAT |
| 230 |
#endif |
| 231 |
|
| 232 |
#ifdef HAVE_FCHOWN |
| 233 |
#define HAS_FCHOWN |
| 234 |
#endif |
| 235 |
|
| 236 |
#ifdef HAVE_STRING_H |
| 237 |
#define HAS_STRING_H |
| 238 |
#endif |
| 239 |
|
| 240 |
#ifdef HAVE_STRINGS_H |
| 241 |
#define HAS_STRINGS_H |
| 242 |
#endif |
| 243 |
|
| 244 |
#ifdef HAVE_UNISTD_H |
| 245 |
#define HAS_UNISTD_H |
| 246 |
#endif |
| 247 |
|
| 248 |
#ifdef HAVE_UTIME |
| 249 |
#define HAS_UTIME |
| 250 |
#endif |
| 251 |
|
| 252 |
#ifdef HAVE_UTIMES |
| 253 |
#define HAS_UTIMES |
| 254 |
#endif |
| 255 |
|
| 256 |
#ifdef HAVE_UTIME_H |
| 257 |
#define HAS_UTIMES_H |
| 258 |
#endif |
| 259 |
|
| 260 |
/* |
| 261 |
* Maximum UDP packet size. |
| 262 |
*/ |
| 263 |
#define MAX_PACKET 8192 |
| 264 |
|
| 265 |
/* |
| 266 |
* Solaris 2.x using gcc or SunPro cc and HP-UX |
| 267 |
*/ |
| 268 |
#if (defined(sun) && (defined(__svr4__) || defined(SVR4))) || defined(__hpux) |
| 269 |
#ifndef HAVE_RANDOM |
| 270 |
#define random() lrand48() |
| 271 |
#endif |
| 272 |
#ifndef HAVE_SRANDOM |
| 273 |
#define srandom(x) srand48(x) |
| 274 |
#endif |
| 275 |
#endif |
| 276 |
|
| 277 |
#ifndef MIN |
| 278 |
#define MIN(a,b) (((a)<(b))?(a):(b)) |
| 279 |
#endif |
| 280 |
|
| 281 |
#ifndef MAX |
| 282 |
#define MAX(a,b) (((a)>(b))?(a):(b)) |
| 283 |
#endif |
| 284 |
|
| 285 |
#ifndef HAVE_MEMMOVE |
| 286 |
#define memmove(d, s, n) bcopy ((s), (d), (n)) |
| 287 |
#endif |
| 288 |
|
| 289 |
#ifdef HAVE_SNPRINTF |
| 290 |
#define SNPRINTF snprintf |
| 291 |
#else |
| 292 |
#define SNPRINTF sprintf |
| 293 |
#endif |
| 294 |
|
| 295 |
#ifdef HAVE_VSNPRINTF |
| 296 |
#define VSNPRINTF vsnprintf |
| 297 |
#else |
| 298 |
#define VSNPRINTF vsprintf |
| 299 |
#endif |
| 300 |
|
| 301 |
#if defined(HAVE_SNPRINTF) || defined(HAVE_VSNPRINTF) |
| 302 |
#define SIZE(buf, n) buf,n |
| 303 |
#else |
| 304 |
#define SIZE(buf, n) buf |
| 305 |
#endif |
| 306 |
|
| 307 |
#ifndef RPLAY_VERSION |
| 308 |
#define RPLAY_VERSION "" |
| 309 |
#endif |
| 310 |
|
| 311 |
#endif /* _config_h */ |