Warning, file /multimedia/libkcompactdisc/src/wmlib/include/wm_config.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 #ifndef WM_CONFIG_H
0002 #define WM_CONFIG_H
0003 /*
0004  * This file is part of WorkMan, the civilized CD player library
0005  * Copyright (C) 1991-1997 by Steven Grimm <koreth@midwinter.com>
0006  * Copyright (C) by Dirk Försterling <milliByte@DeathsDoor.com>
0007  *
0008  * This library is free software; you can redistribute it and/or
0009  * modify it under the terms of the GNU Library General Public
0010  * License as published by the Free Software Foundation; either
0011  * version 2 of the License, or (at your option) any later version.
0012  *
0013  * This library is distributed in the hope that it will be useful,
0014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0016  * Library General Public License for more details.
0017  *
0018  * You should have received a copy of the GNU Library General Public
0019  * License along with this library; if not, write to the Free
0020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
0021  *
0022  **********************************************************************
0023  *
0024  * This file consists of several parts. First, there's a generic,
0025  * platform independent part. Set needed options there.
0026  * The following parts are platform dependent. You may search for the
0027  * names listed below and then set your OS specific options there.
0028  * Don't be surprised, if there are no options for your OS. They aren't
0029  * needed in any case.
0030  *
0031  * The default values should produce a functional WorkMan on every
0032  * platform.
0033  *
0034  *********************
0035  * Current platforms:
0036  *********************
0037  * BSD386
0038  * FreeBSD
0039  * HP-UX
0040  * Irix (SGI)
0041  * Linux
0042  * News  (Sony NewsOS)
0043  * OpenBSD
0044  * OSF1
0045  * Sun (SunOS/Solaris, Sparc or x86)
0046  * SVR4
0047  * Ultrix
0048  * AIX
0049  *
0050  * The above order corresponds with the order of the platform specific
0051  * options below.
0052  */
0053 
0054 /******************************************************************
0055  * generic options
0056  ******************************************************************
0057  **   **  ***  ****    **  ****   **    *    **   **    **   *   **
0058  *  *  *  ***  ****  *  *  ***  *  **  **  ***  *  *  *  *  * *  **
0059  *     *  ***  ****    **  ***     **  **   **  *  *    **  * *  **
0060  *  *  *  ***  ****  ****  ***  *  **  **  ***  *  *  *  *  ***  **
0061  *  *  *    *    **  ****    *  *  **  **  ****   **  *  *  ***  **
0062  ******************************************************************/
0063 
0064 /*
0065  * If your CD-ROM drive closes its tray if the device is opened, then
0066  * the next define can make WorkMans "Eject" button an "open/close"
0067  * button. If it disturbs you, just comment it out.
0068  *
0069  * ### this is preliminary. It may have no effect for you ###
0070  */
0071 #define CAN_CLOSE 1
0072 
0073 /*
0074  * Define the following if you want the balance slider to
0075  * decrease one channel's volume while increasing the other's
0076  */
0077 /* #define SYMETRIC_BALANCE 1 */
0078 
0079 
0080 /******************************************************************
0081  * BSD386
0082  ******************************************************************
0083  ***     ****    ***    *******  **    ****    ****    ************
0084  ***  **  **  ******  *  *****  ******  **  **  **  ***************
0085  ***    ******  ****  **  ***  *****  *****    ***     ************
0086  ***  **  ******  **  *  ***  ********  **  **  **  **  ***********
0087  ***     ****    ***    ***  ******    ****    ****    ************
0088  ******************************************************************/
0089 #if defined(__bsdi__) || defined(__bsdi)
0090 
0091 /*
0092  * This lets you use the SoundBlaster Mixer on BSD/386
0093  */
0094 #define SOUNDBLASTER 1
0095 
0096 #define DEFAULT_CD_DEVICE "/dev/rsr2c"
0097 
0098 #endif /* __bsdi__ (BSD/386) */
0099 
0100 /******************************************************************
0101  * FreeBSD
0102  ******************************************************************
0103  ***      **     ***      **      **     ****    ***    ***********
0104  ***  ******  **  **  ******  ******  **  **  ******  *  **********
0105  ***    ****     ***    ****    ****    ******  ****  **  *********
0106  ***  ******  **  **  ******  ******  **  ******  **  *  **********
0107  ***  ******  **  **      **      **     ****    ***    ***********
0108  ******************************************************************/
0109 #if defined(__FreeBSD__) || defined(__FreeBSD) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
0110 
0111 #if (defined(__FreeBSD_version) && __FreeBSD_version >= 500100) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
0112 #define DEFAULT_CD_DEVICE   "/dev/acd0"
0113 #else
0114 #define DEFAULT_CD_DEVICE   "/dev/acd0c"
0115 #endif
0116 
0117 #endif /* freebsd */
0118 
0119 #if defined(__OpenBSD__)
0120 #define DEFAULT_CD_DEVICE   find_cdrom()
0121 #endif
0122 
0123 /******************************************************************
0124  * NetBSD
0125  ******************************************************************
0126  ***   ***  **      **      **     ****    ***    *****************
0127  ***    **  **  ********  ****  **  **  ******  *  ****************
0128  ***  *  *  **    ******  ****    ******  ****  **  ***************
0129  ***  **    **  ********  ****  **  ******  **  *  ****************
0130  ***  ***   **      ****  ****     ****    ***    *****************
0131  ******************************************************************/
0132 #if defined(__NetBSD__) || defined(__NetBSD)
0133 
0134 #if defined(__i386__)
0135     #define DEFAULT_CD_DEVICE   "/dev/rcd0d"
0136 #else
0137     #define DEFAULT_CD_DEVICE   "/dev/rcd0c"
0138 #endif
0139 
0140 #endif /* netbsd */
0141 
0142 /******************************************************************
0143  * HP-UX
0144  ******************************************************************
0145  ***  **  **     *********  **  **  **  ***************************
0146  ***  **  **  **  ********  **  ***    ****************************
0147  ***      **     ***    **  **  ****  *****************************
0148  ***  **  **  ************  **  ***    ****************************
0149  ***  **  **  *************    ***  **  ***************************
0150  ******************************************************************/
0151 #if defined(hpux) || defined (__hpux)
0152 
0153 #define DEFAULT_CD_DEVICE   "/dev/rscsi"
0154 
0155 #endif /* hpux */
0156 
0157 /******************************************************************
0158  * Irix
0159  ******************************************************************
0160  ***      **     ***      **  **  *********************************
0161  *****  ****  **  ****  *****    **********************************
0162  *****  ****     *****  ******  ***********************************
0163  *****  ****  **  ****  *****    **********************************
0164  ***      **  **  **      **  **  *********************************
0165  ******************************************************************/
0166 #if defined(sgi) || defined(__sgi)
0167 
0168 #define DEFAULT_CD_DEVICE   "/dev/scsi/sc0d6l0"
0169 
0170 #endif /* sgi IRIX */
0171 
0172 /******************************************************************
0173  * Linux
0174  ******************************************************************
0175  ***  ******      **   ***  **  **  **  **  ***********************
0176  ***  ********  ****    **  **  **  ***    ************************
0177  ***  ********  ****  *  *  **  **  ****  *************************
0178  ***  ********  ****  **    **  **  ***    ************************
0179  ***      **      **  ***   ***    ***  **  ***********************
0180  ******************************************************************/
0181 #if defined(__linux__)
0182 
0183 /*
0184  * Uncomment the following line to have WorkMan send SCSI commands
0185  *  directly to the CD-ROM drive.  If you have a SCSI drive you
0186  * probably want this, but it will cause WorkMan to not work on IDE
0187  * drives.
0188  */
0189 /*#define LINUX_SCSI_PASSTHROUGH 1*/
0190 
0191 /*
0192  * Which device should be opened by WorkMan at default?
0193  */
0194 #define DEFAULT_CD_DEVICE   "/dev/cdrom"
0195 #define WMLIB_CDDA_BUILD 1
0196 #define COUNT_CDDA_BLOCKS 10
0197 
0198 /*
0199  * Uncomment the following if you use the sbpcd or mcdx device driver.
0200  * It shouldn't hurt if you use it on other devices. It'll be nice to
0201  * hear from non-sbpcd (or mcdx) users if this is right.
0202  */
0203 /*#define SBPCD_HACK 1*/
0204 
0205 /*
0206  * Linux Soundcard support
0207  * Disabled by default, because some people rely on it
0208  */
0209 /* #define OSS_SUPPORT 1 */
0210 
0211 /*
0212  * This has nothing to do with the above.
0213  */
0214 
0215 /* #define CURVED_VOLUME */
0216 
0217 /*
0218  * Uncomment the following if you want to try out a better responding
0219  * WorkMan, especially with IDE drives. This may work with non-IDE
0220  * drives as well. But it may be possible, that it doesn't work at all.
0221  * If your drive/driver combination cannot handle the faster access,
0222  * the driver will usually hang and you have to reboot your machine.
0223  */
0224 /* #define FAST_IDE 1 */
0225 
0226 /*
0227  * There are two alternative ways of checking a device containing a
0228  * mounted filesystem. Define BSD_MOUNTTEST for the test using
0229  * getmntent(). Undefine it for using the SVR4 ustat().
0230  * I built in the choice, because it's not clear which method should
0231  * be used in Linux. The ustat manpage tells us since 1995, that
0232  * fstat() should be used, but I'm too dumb to do so.
0233  */
0234 
0235 #define BSD_MOUNTTEST
0236 
0237 #endif /* __linux */
0238 
0239 /******************************************************************
0240  * Sony NewsOS
0241  ******************************************************************
0242  ***   ***  **      **  *****  ***    *****************************
0243  ***    **  **  ******  *****  **  ********************************
0244  ***  *  *  **    ****  ** **  ****  ******************************
0245  ***  **    **  ******  *   *  ******  ****************************
0246  ***  ***   **      **    *    ***    *****************************
0247  ******************************************************************/
0248 #if defined(__sony_news) || defined(sony_news)
0249 
0250 #define DEFAULT_CD_DEVICE   "/dev/rsd/b0i6u0p2\0"
0251 
0252 #endif
0253 
0254 /******************************************************************
0255  * OSF1
0256  ******************************************************************
0257  ****    ****    ***      ***  ***  *******************************
0258  ***  **  **  ******  ******  **    *******************************
0259  ***  **  ****  ****    ***  *****  *******************************
0260  ***  **  ******  **  ****  ******  *******************************
0261  ****    ****    ***  ***  *****      *****************************
0262  ******************************************************************/
0263 #if defined(__osf__) || defined(__osf)
0264 
0265 #define DEFAULT_CD_DEVICE find_cdrom()
0266 
0267 #endif
0268 
0269 /******************************************************************
0270  * SunOS/Solaris
0271  ******************************************************************
0272  ****    ***  **  **   ***  ***************************************
0273  ***  ******  **  **    **  ***************************************
0274  *****  ****  **  **  *  *  ***************************************
0275  *******  **  **  **  **    ***************************************
0276  ****    ****    ***  ***   ***************************************
0277  ******************************************************************/
0278 #if defined(sun) || defined(__sun)
0279 
0280 /*
0281  * Define the following for Solaris 2.x
0282  * If you don't want WorkMan to try to activate the SPARCstation 5
0283  * internal audio input so you get sound from the workstation, comment
0284  * out the CODEC define.
0285  */
0286 
0287 #define SYSV 1
0288 #define CODEC 1
0289 #define DEFAULT_CD_DEVICE find_cdrom()
0290 #define WMLIB_CDDA_BUILD 1
0291 #define COUNT_CDDA_BLOCKS 15
0292 
0293 /*
0294  * set the following to "SUNW,CS4231" for Sun and to "SUNW,sb16"
0295  * for PC (with SoundBlaster 16) running Solaris x86
0296  * (only important if you define CODEC above)
0297  */
0298 #define SUN_AUD_DEV "SUNW,CS4231"
0299 /*#define SUN_AUD_DEV "SUNW,sbpro"*/
0300 
0301 
0302 #endif
0303 
0304 /******************************************************************
0305  * SVR4
0306  ******************************************************************
0307  ****    ***  ****  **     ***  *  ********************************
0308  ***  ******  ****  **  **  **  *  ********************************
0309  *****  *****  **  ***     ***      *******************************
0310  *******  ***  **  ***  **  *****  ********************************
0311  ****    *****    ****  **  *****  ********************************
0312  ******************************************************************/
0313 #if (defined(SVR4) || defined(__SVR4)) && !defined(sun) && !defined(__sun) && !defined(sony_news) && !defined(__sony_news)
0314 
0315 #define DEFAULT_CD_DEVICE       "/dev/rcdrom/cd0"
0316 
0317 #endif
0318 
0319 /******************************************************************
0320  * Ultrix
0321  ******************************************************************
0322  ***  **  **  *****      **     ***      **  **  ******************
0323  ***  **  **  *******  ****  **  ****  *****    *******************
0324  ***  **  **  *******  ****     *****  ******  ********************
0325  ***  **  **  *******  ****  **  ****  *****    *******************
0326  ****    ***      ***  ****  **  **      **  **  ******************
0327  ******************************************************************/
0328 #if defined(ultrix) || defined(__ultrix)
0329 
0330 #define DEFAULT_CD_DEVICE   find_cdrom()
0331 
0332 #endif
0333 
0334 /******************************************************************
0335  * IBM AIX
0336  ******************************************************************
0337  ****    ***      **  **  *****************************************
0338  ***  **  ****  *****    ******************************************
0339  ***      ****  ******  *******************************************
0340  ***  **  ****  *****    ******************************************
0341  ***  **  **      **  **  *****************************************
0342  ******************************************************************/
0343 #if defined(AIXV3) || defined(__AIXV3)
0344 
0345 #define DEFAULT_CD_DEVICE   "/dev/cd0"
0346 
0347 #endif /* IBM AIX */
0348 
0349 /******************************************************************/
0350 
0351 #include <stdio.h>
0352 
0353 #define DEBUG
0354 #ifdef DEBUG
0355  #if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
0356   #define DEBUGLOG(...) fprintf(stderr, __VA_ARGS__)
0357  #else
0358   #define DEBUGLOG(fmt, args...) fprintf(stderr, fmt, ##args)
0359  #endif
0360 #else
0361  #define DEBUGLOG(fmt, args...)
0362 #endif
0363 #if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
0364  #define ERRORLOG(...) fprintf(stderr, __VA_ARGS__)
0365 #else
0366  #define ERRORLOG(fmt, args...) fprintf(stderr, fmt, ##args)
0367 #endif
0368 
0369 #endif /* WM_CONFIG_H */
0370 
0371 
0372 
0373 
0374 
0375 
0376 
0377