shithub: aubio

Download patch

ref: e8fcc9a9526fa67b11c795e14a2efb375addc3fe
parent: 5b1cbbcfa9ce3ea302d40a630f09c95389c0276b
author: Paul Brossier <piem@piem.org>
date: Tue Jun 26 09:16:40 EDT 2018

examples/parse_args.h: hide jack options if not available, improve error message (closes: #182)

--- a/examples/parse_args.h
+++ b/examples/parse_args.h
@@ -115,13 +115,13 @@
       "       -f      --force-overwrite  overwrite output file if needed\n"
       "                 do not fail if output file already exists\n"
 #endif /* PROG_HAS_OUTPUT */
-#ifdef PROG_HAS_JACK
+#if defined(PROG_HAS_JACK) && defined(HAVE_JACK)
       "       -j      --jack             use Jack\n"
 #if defined(PROG_HAS_ONSET) && !defined(PROG_HAS_PITCH)
       "       -N      --miditap-note     MIDI note; default=69.\n"
       "       -V      --miditap-velo     MIDI velocity; default=65.\n"
 #endif /* defined(PROG_HAS_ONSET) && !defined(PROG_HAS_PITCH) */
-#endif /* PROG_HAS_JACK */
+#endif /* defined(PROG_HAS_JACK) && defined(HAVE_JACK) */
       "       -v      --verbose          be verbose\n"
       "       -h      --help             display this message\n"
       );
@@ -313,7 +313,8 @@
     usejack = 1;
 #else
     errmsg("Error: no arguments given (and no available audio input)\n");
-    usage ( stderr, 1 );
+    errmsg("       consider recompiling with jack support (--enable-jack)\n");
+    exit ( 1 );
 #endif /* HAVE_JACK */
 #else
     errmsg("Error: no arguments given\n");