PACKAGE_STRING := @PACKAGE_STRING@
install_sh := @install_sh@
executables := @executables@
+ggo_descriptions_declared := @ggo_descriptions_declared@
GENGETOPT := @gengetopt@
HELP2MAN := @help2man@
if test ${have_ucred} = yes; then
AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
fi
-
+########################################################################### gengetopt
+echo 'option "z" z "" flag off' | $gengetopt --file-name conftest-ggo &&
+AC_CHECK_DECL(
+ [gengetopt_args_info_description],
+ [ggo_descriptions_declared=yes],
+ [ggo_descriptions_declared=no],
+ [#include "conftest-ggo.h"]
+)
+AC_SUBST(ggo_descriptions_declared)
########################################################################### curses
have_curses="yes"
OLD_CPPFLAGS="$CPPFLAGS"
$(cmdline_dir)/%.cmdline.h $(cmdline_dir)/%.cmdline.c: $(ggo_dir)/%.ggo git-version.h | $(cmdline_dir)
@[ -z "$(Q)" ] || echo 'GGO $<'
$(Q) $(GENGETOPT) $(ggo_opts) < $<
+ifeq ($(ggo_descriptions_declared),no)
+ echo 'extern const char *$(*F)_args_info_description;' >> $(cmdline_dir)/$(*F).cmdline.h
+endif
$(ggo_dir)/server.ggo $(ggo_dir)/audiod.ggo: \
$(m4_ggo_dir)/loglevel.m4 $(m4_ggo_dir)/color.m4 \
args "--unamed-opts=audio_file --no-handle-version --conf-parser --no-handle-help"
+
+description "para_play operates either in command mode or in insert
+mode. In insert mode it presents a prompt and allows to enter commands
+like stop, play, pause etc. In command mode the current audio file
+is shown and the program reads single key strokes from stdin. Keys
+may be mapped to commands. Whenever a mapped key is pressed, the
+associated command is executed."
+
include(header.m4)
define(CURRENT_PROGRAM,para_play)
define(DEFAULT_CONFIG_FILE,~/.paraslash/play.conf)
exit(EXIT_FAILURE);
}
-/** Description to be included in the --detailed-help output. */
-#define PP_DESC \
-"para_play is a command line audio player.\n" \
-"\n" \
-"It operates either in command mode or in insert mode. In insert mode it\n" \
-"presents a prompt and allows to enter para_play commands like stop, play, pause\n" \
-"etc. In command mode, the current audio file is shown and the program reads\n" \
-"single key strokes from stdin. Keys may be mapped to para_play commands.\n" \
-"Whenever a mapped key is pressed, the associated command is executed.\n" \
-
__noreturn static void print_help_and_die(void)
{
int d = conf.detailed_help_given;
printf_or_die("%s\n\n", version_single_line("play"));
printf_or_die("%s\n\n", play_args_info_usage);
if (d)
- printf_or_die("%s\n", PP_DESC);
+ printf_or_die("%s\n", play_args_info_description);
for (; *p; p++)
printf_or_die("%s\n", *p);
exit(0);