From 827e40705df095b9c06b30f10ed1dca6cf2f4ba4 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 29 Jul 2020 18:23:54 -0700 Subject: [PATCH] X11+Qt vs config.h This lets combined X11 and Qt compile cleanly (when set up with hints/macosx10.10-qt and built with 'make WANT_WIN_X11=1 USE_XPM=1') but linking fails at present. (It can't find X11 library routines despite specifying the same -L/opt/X11/lib that X11 without Qt uses. The C++ linker is being used but the code that calls those routines is compiled as C, not C++ so name mangling shouldn't be an issue.) --- include/config.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/include/config.h b/include/config.h index 7083a09bf..7d54ceda3 100644 --- a/include/config.h +++ b/include/config.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 config.h $NHDT-Date: 1594169990 2020/07/08 00:59:50 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.139 $ */ +/* NetHack 3.6 config.h $NHDT-Date: 1596072230 2020/07/30 01:23:50 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.142 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2016. */ /* NetHack may be freely redistributed. See license for details. */ @@ -58,7 +58,6 @@ /* #define CURSES_GRAPHICS *//* Curses interface - Karl Garrison*/ /* #define X11_GRAPHICS */ /* X11 interface */ /* #define QT_GRAPHICS */ /* Qt interface */ -/* #define GNOME_GRAPHICS */ /* Gnome interface */ /* #define MSWIN_GRAPHICS */ /* Windows NT, CE, Graphics */ /* @@ -103,16 +102,24 @@ #ifndef NOUSER_SOUNDS #define USER_SOUNDS /* Use sounds */ #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 @@ -125,9 +132,11 @@ #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 @@ -146,8 +155,10 @@ */ /* # 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