From 727740749eecc5c878ae14b15170d154f567b84c Mon Sep 17 00:00:00 2001 From: nhkeni Date: Thu, 15 Feb 2024 18:08:58 -0500 Subject: [PATCH] Try to fix linux for installations that don't have openssl includes. --- include/config.h | 25 ++++++++++++------------- sys/unix/hints/linux.370 | 6 ++++++ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/include/config.h b/include/config.h index 3ed14767e..146a988eb 100644 --- a/include/config.h +++ b/include/config.h @@ -240,22 +240,21 @@ #define GREPPATH "/bin/grep" #endif -#ifndef CRASHREPORT -# ifdef MACOS -# define CRASHREPORT "/usr/bin/open" -# endif -# ifdef __linux__ -# define CRASHREPORT "/usr/bin/xdg-open" +#ifdef 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 +# define CRASHREPORT_EXEC_NOSTDERR +# endif +# ifdef WIN32 +# define CRASHREPORT /* builtin helper */ +# endif # endif -# ifdef WIN32 -# define CRASHREPORT /* builtin helper */ -# endif -#endif -#ifdef MSDOS -# undef CRASHREPORT #endif #ifdef CRASHREPORT diff --git a/sys/unix/hints/linux.370 b/sys/unix/hints/linux.370 index f34bbee06..8affd9df1 100755 --- a/sys/unix/hints/linux.370 +++ b/sys/unix/hints/linux.370 @@ -110,7 +110,13 @@ endif #HAVE_NCURSESW endif #MAKEFILE_SRC endif #USE_CURSESLIB +# autodetect missing openssl header needed for CRASHREPORT +CROK=$(shell ls /usr/include/openssl/md4.h 2>/dev/null | wc -l ) +ifeq "$(CROK)" "1" AUTOLIBS=$(shell (../util/makedefs --grep-defined CRASHREPORT && echo "-lcrypto" ) || true ) +else +NHCFLAGS+=-DNOCRASHREPORT +endif # NetHack sources control NHCFLAGS+=-DDLB