/* NetHack 3.7 config.h $NHDT-Date: 1710344316 2024/03/13 15:38:36 $ $NHDT-Branch: keni-staticfn $:$NHDT-Revision: 1.188 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2016. */ /* NetHack may be freely redistributed. See license for details. */ #ifndef CONFIG_H /* make sure the compiler does not see the typedefs twice */ #define CONFIG_H /* * Section 1: Operating and window systems selection. * Select the version of the OS you are using. * For "UNIX" select BSD, ULTRIX, SYSV, or HPUX in unixconf.h. * A "VMS" option is not needed since the VMS C-compilers * provide it (no need to change sec#1, vmsconf.h handles it). * MacOSX uses the UNIX configuration, not the old MAC one. */ #define UNIX /* delete if no fork(), exec() available */ /* #define MSDOS */ /* in case it's not auto-detected */ /* #define OS2 */ /* define for OS/2 */ /* #define TOS */ /* define for Atari ST/TT */ /* #define STUPID */ /* avoid some complicated expressions if * your C compiler chokes on them */ /* #define MINIMAL_TERM */ /* if a terminal handles highlighting or tabs poorly, try this define, used in pager.c and termcap.c */ /* #define ULTRIX_CC20 */ /* define only if using cc v2.0 on a DECstation */ /* #define ULTRIX_PROTO */ /* define for Ultrix 4.0 (or higher) on a DECstation; * if you get compiler errors, don't define this. */ /* Hint: if you're not developing code, don't define ULTRIX_PROTO. */ #include "config1.h" /* should auto-detect MSDOS, MAC, AMIGA, and WIN32 */ /* * Consolidated version, patchlevel, development status. */ #ifdef SHORT_FILENAMES #include "patchlev.h" #else #include "patchlevel.h" #endif /* Windowing systems... * Define all of those you want supported in your binary. * Some combinations make no sense. See the installation document. */ #if !defined(NOTTYGRAPHICS) #define TTY_GRAPHICS /* good old tty-based graphics */ #endif /* #define CURSES_GRAPHICS *//* Curses interface - Karl Garrison*/ /* #define X11_GRAPHICS */ /* X11 interface */ /* #define QT_GRAPHICS */ /* Qt interface */ /* #define MSWIN_GRAPHICS */ /* Windows NT, CE, Graphics */ /* * Define the default window system. This should be one that is compiled * into your system (see defines above). Known window systems are: * * tty, X11, mac, amii, BeOS, Qt, Gem, Gnome, shim */ /* MAC also means MAC windows */ #ifdef MAC #ifndef AUX #define DEFAULT_WINDOW_SYS "mac" #endif #endif /* Amiga supports AMII_GRAPHICS and/or TTY_GRAPHICS */ #ifdef AMIGA #define AMII_GRAPHICS /* (optional) */ #define DEFAULT_WINDOW_SYS "amii" /* "amii", "amitile" or "tty" */ #endif /* Atari supports GEM_GRAPHICS and/or TTY_GRAPHICS */ #ifdef TOS #define GEM_GRAPHICS /* Atari GEM interface (optional) */ #define DEFAULT_WINDOW_SYS "Gem" /* "Gem" or "tty" */ #endif #ifdef __BEOS__ #define BEOS_GRAPHICS /* (optional) */ #define DEFAULT_WINDOW_SYS "BeOS" /* "tty" */ #ifndef HACKDIR /* override the default hackdir below */ #define HACKDIR "/boot/apps/NetHack" #endif #endif #ifdef QT_GRAPHICS #ifndef DEFAULT_WC_TILED_MAP #define DEFAULT_WC_TILED_MAP /* Default to tiles if users doesn't request * wc_ascii_map */ #endif #ifndef USE_XPM #define USE_XPM /* Use XPM format for images (required) */ #endif #ifndef GRAPHIC_TOMBSTONE #define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.ppm) */ #endif #ifndef DEFAULT_WINDOW_SYS #define DEFAULT_WINDOW_SYS "Qt" #endif #endif #ifdef GNOME_GRAPHICS #ifndef USE_XPM #define USE_XPM /* Use XPM format for images (required) */ #endif #ifndef GRAPHIC_TOMBSTONE #define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.ppm) */ #endif #ifndef DEFAULT_WINDOW_SYS #define DEFAULT_WINDOW_SYS "Gnome" #endif #endif #ifdef MSWIN_GRAPHICS #ifndef DEFAULT_WINDOW_SYS #define DEFAULT_WINDOW_SYS "mswin" #endif #define HACKDIR "\\nethack" #endif #ifdef TTY_GRAPHICS #ifndef DEFAULT_WINDOW_SYS #define DEFAULT_WINDOW_SYS "tty" #endif #endif #ifdef CURSES_GRAPHICS #ifndef DEFAULT_WINDOW_SYS #define DEFAULT_WINDOW_SYS "curses" #endif #endif #ifdef SHIM_GRAPHICS #ifndef DEFAULT_WINDOW_SYS #define DEFAULT_WINDOW_SYS "shim" #endif #endif #ifdef X11_GRAPHICS /* * There are two ways that X11 tiles may be defined. (1) using a custom * format loaded by NetHack code, or (2) using the XPM format loaded by * the free XPM library. The second option allows you to then use other * programs to generate tiles files. For example, the PBMPlus tools * would allow: * xpmtoppm x11tiles_big.xpm */ /* # define USE_XPM */ /* Disable if you do not have the XPM library */ #ifdef USE_XPM #ifndef GRAPHIC_TOMBSTONE #define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */ #endif #endif #ifndef DEFAULT_WC_TILED_MAP #define DEFAULT_WC_TILED_MAP /* Default to tiles */ #endif #endif /* * Section 2: Some global parameters and filenames. * * LOGFILE, XLOGFILE, LIVELOGFILE, NEWS and PANICLOG refer to * files in the playground directory. Commenting out LOGFILE, * XLOGFILE, NEWS or PANICLOG removes that feature from the game. * * Building with debugging features enabled is now unconditional; * the old WIZARD setting for that has been eliminated. * If SYSCF is enabled, WIZARD_NAME will be overridden at * runtime by the SYSCF WIZARDS value. * * SYSCF: (not supported by all ports) * If SYSCF is defined, the following configuration info is * available in a global config space, with the compiled-in * entries as defaults: * WIZARDS (a space-separated list of usernames of users who * can run the game in debug mode, aka wizard mode; * a value of * allows anyone to debug; * this does NOT default to compiled-in value) * EXPLORERS (who can use explore mode, aka discover mode) * SHELLERS (who can use ! to execute a shell subprocess) * MAXPLAYERS (see MAX_NR_OF_PLAYERS below and nethack.sh) * SUPPORT (how to get local support) [no default] * RECOVER (how to recover a game at your site) [no default] * For the record file (see topten.c): * PERSMAX (max entries for one person) * ENTRYMAX (max entries in the record file) * POINTSMIN (min points to get an entry) * PERS_IS_UID (0 or 1 - person is name or (numeric) userid) * Can force incubi/succubi behavior to be toned down to nymph-like: * SEDUCE (0 or 1 - runtime disable/enable SEDUCE option) * Can hide the entry for displaying command line usage from * the help menu if players don't have access to command lines: * HIDEUSAGE (0 or 1 - runtime show/hide command line usage) * The following options pertain to crash reporting: * GREPPATH (the path to the system grep(1) utility) * GDBPATH (the path to the system gdb(1) program) * CRASHREPORT (use CRASHREPORTURL if defined in syscf; this * define specifies the name of the helper program * used to launch the browser and enables the * feature)) * Regular nethack options can also be specified in order to * provide system-wide default values local to your system: * OPTIONS (same as in users' .nethackrc or defaults.nh) * * In the future there may be other ways to supply SYSCF * information (Windows registry, Apple resource forks, etc) * but at present the only supported method is via a text file. * If the program is built with SYSCF enabled, the file *must* * exist and be readable, otherwise the game will complain and * refuse to start. * SYSCF_FILE: file containing the SYSCF options shown above; * default is 'sysconf' in nethack's playground. */ #ifndef WIZARD_NAME /* allow for compile-time or Makefile changes */ #define WIZARD_NAME "wizard" /* value is ignored if SYSCF is enabled */ #endif #ifndef SYSCF #define SYSCF /* use a global configuration */ #define SYSCF_FILE "sysconf" /* global configuration is in a file */ #endif #ifndef GDBPATH #define GDBPATH "/usr/bin/gdb" #endif #ifndef GREPPATH #define GREPPATH "/bin/grep" #endif #ifndef NOCRASHREPORT # ifndef CRASHREPORT # ifdef MACOS # define CRASHREPORT "/usr/bin/open" # endif # ifdef __linux__ # define CRASHREPORT "/usr/bin/xdg-open" /* Define this if the terminal is filled with useless error messages * when the browser launches. */ # define CRASHREPORT_EXEC_NOSTDERR # endif # ifdef WIN32 # define CRASHREPORT /* builtin helper */ # endif # endif #else # ifdef CRASHREPORT # undef CRASHREPORT # endif # if defined(MSDOS) || defined(NOPANICTRACE) # undef PANICTRACE # endif #endif #ifdef CRASHREPORT # ifndef DUMPLOG_CORE # define DUMPLOG_CORE // required to get ^P info # endif # ifdef MACOS # define PANICTRACE # endif # ifdef __linux__ # define PANICTRACE # ifndef NOSTATICFN // may be defined on command line # define NOSTATICFN # endif # endif // This test isn't quite right: CNG is only available from Windows 2000 on. // But we'll check that at runtime. # ifdef WIN32 # define PANICTRACE # define NOSTATICFN # endif #endif #ifdef NONOSTATICFN # define staticfn static #else # ifdef NOSTATICFN # define staticfn # else # define staticfn static # endif #endif /* note: "larger" is in comparison with 'record', the high-scores file (whose name can be overridden via #define in global.h if desired) */ #define LOGFILE "logfile" /* larger file for debugging purposes */ #define XLOGFILE "xlogfile" /* even larger logfile */ #define NEWS "news" /* the file containing the latest hack news */ #define PANICLOG "paniclog" /* log of panic and impossible events */ /* alternative paniclog format, better suited for public servers with many players, as it saves the player name and the game start time */ /* #define PANICLOG_FMT2 */ /* * When building the program, whether the 'makedefs' utility * checks for non-ASCII or non-printable (control) characters * in various data files (data.base, rumors.tru, rumors.fal, * {oracles,epitaphs,engravings,bogusmons}.txt and warns about them. * They also get changed to '#' instead of possibly remaining * unprintable. * * If you modify the data files to intentionally add accented * letters or something comparable, comment this out. (Such things * won't necessarily work as intended within nethack but at least * makedefs wouldn't reject them.) */ #define MAKEDEFS_FILTER_NONASCII /* * PERSMAX, POINTSMIN, ENTRYMAX, PERS_IS_UID: * These control the contents of 'record', the high-scores file. * They used to be located in topten.c rather than config.h, and * their values can be overridden at runtime (to increase ENTRYMAX, the * maximum number of scores to keep, for example) if SYSCF is enabled. */ #ifndef PERSMAX #define PERSMAX 3 /* entries per name/uid per char. allowed */ #endif #ifndef POINTSMIN #define POINTSMIN 1 /* must be > 0 */ #endif #ifndef ENTRYMAX #define ENTRYMAX 100 /* must be >= 10 */ #endif #ifndef PERS_IS_UID #if !defined(MICRO) && !defined(MAC) && !defined(WIN32) #define PERS_IS_UID 1 /* delete for PERSMAX per name; now per uid */ #else #define PERS_IS_UID 0 #endif #endif /* * NODUMPENUMS * If there are memory constraints and you don't want to store information * about the internal enum values for monsters and objects, this can be * uncommented to define NODUMPENUMS. Doing so will disable the * nethack --dumpenums * command line option. * Note: the extra memory is also used when ENHANCED_SYMBOLS is * defined, so defining both ENHANCED_SYMBOLS and NODUMPENUMS will limit * the amount of memory and code reduction offered by the latter. */ /* #define NODUMPENUMS */ /* * ENHANCED_SYMBOLS * Support the enhanced display of symbols by utilizing utf8. * Enabled by default, but it can be disabled by commenting it out. */ #define ENHANCED_SYMBOLS /* * If COMPRESS is defined, it should contain the full path name of your * 'compress' program. * * If you define COMPRESS, you must also define COMPRESS_EXTENSION * as the extension your compressor appends to filenames after * compression. Currently, only UNIX fully implements * COMPRESS; other ports should be able to uncompress save files a * la unixmain.c if so inclined. * * Defining ZLIB_COMP builds in support for zlib compression. If you * define ZLIB_COMP, you must link with a zlib library. Not all ports * support ZLIB_COMP. * * COMPRESS and ZLIB_COMP are mutually exclusive. * */ #if defined(UNIX) && !defined(ZLIB_COMP) && !defined(COMPRESS) /* path and file name extension for compression program */ #define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */ #define COMPRESS_EXTENSION ".Z" /* compress's extension */ /* An example of one alternative you might want to use: */ /* #define COMPRESS "/usr/local/bin/gzip" */ /* FSF gzip compression */ /* #define COMPRESS_EXTENSION ".gz" */ /* normal gzip extension */ #endif #ifndef COMPRESS /* # define ZLIB_COMP */ /* ZLIB for compression */ #endif /* * Data librarian. Defining DLB places most of the support files into * a tar-like file, thus making a neater installation. See *conf.h * for detailed configuration. */ /* #define DLB */ /* not supported on all platforms */ /* * Defining REPRODUCIBLE_BUILD causes 'util/makedefs -v' to construct * date+time in include/date.h (to be shown by nethack's 'v' command) * from SOURCE_DATE_EPOCH in the build environment rather than use * current date+time when makedefs is run. * * [The version string will show "last revision