diff --git a/include/decl.h b/include/decl.h index 7aae881dd..8a810488f 100644 --- a/include/decl.h +++ b/include/decl.h @@ -930,6 +930,9 @@ struct instance_globals { char *config_section_chosen; char *config_section_current; int nesting; + int no_sound_notified; /* run-time option processing: warn once if built + * without USER_SOUNDS and config file contains + * SOUND=foo or SOUNDDIR=bar */ int symset_count; /* for pick-list building only */ boolean chosen_symset_start; boolean chosen_symset_end; diff --git a/src/decl.c b/src/decl.c index 0c5c1c389..36c60defa 100644 --- a/src/decl.c +++ b/src/decl.c @@ -407,6 +407,7 @@ const struct instance_globals g_init = { NULL, /* config_section_chosen */ NULL, /* config_section_current */ 0, /* nesting */ + 0, /* no_sound_notified */ 0, /* symset_count */ FALSE, /* chosen_symset_start */ FALSE, /* chosen_symset_end */ diff --git a/src/files.c b/src/files.c index fe33836e1..fef6a2c3c 100644 --- a/src/files.c +++ b/src/files.c @@ -2773,7 +2773,15 @@ parse_config_line(char *origbuf) sounddir = dupstr(bufp); } else if (match_varname(buf, "SOUND", 5)) { add_sound_mapping(bufp); -#endif +#else /* !USER_SOUNDS */ + } else if (match_varname(buf, "SOUNDDIR", 8) + || match_varname(buf, "SOUND", 5)) { + if (!g.no_sound_notified++) { + config_error_add("SOUND and SOUNDDIR are not available."); + } + ; /* skip this and any further SOUND or SOUNDDIR lines + * but leave 'retval' set to True */ +#endif /* ?USER_SOUNDS */ } else if (match_varname(buf, "QT_TILEWIDTH", 12)) { #ifdef QT_GRAPHICS extern char *qt_tilewidth;