diff --git a/Makefile.am b/Makefile.am index 1c1b684..7961cc2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,7 +9,9 @@ libdevq_la_SOURCES = src/device.c \ src/event_monitor_@opsys@.c libdevq_la_CPPFLAGS = -I$(top_srcdir)/include +if ENABLE_PROGRAMS bin_PROGRAMS = devq_lsdri devq_evwatch +endif devq_evwatch_SOURCES = tools/devq_evwatch/devq_evwatch.c devq_evwatch_CPPFLAGS = -I$(top_srcdir)/include diff --git a/configure.ac b/configure.ac index d94ecde..f8a79f4 100644 --- a/configure.ac +++ b/configure.ac @@ -26,6 +26,25 @@ AC_CHECK_HEADERS([libprocstat.h], [ #include ]) +# ---------------------------------------------------------------------------- +# Check if we want to build extra diagnostic programs + +AC_MSG_CHECKING([whether we should build diagnostic programs]) +AC_ARG_ENABLE([programs], [ + AS_HELP_STRING([--enable-programs], + [enable diagnose programs (default is no)]), + with_programs=$enableval, with_program=no]) + +if test "$enable_programs" = "yes"; then + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi + +AM_CONDITIONAL(ENABLE_PROGRAMS, test "$enable_programs" = "yes") + +# ---------------------------------------------------------------------------- + AC_CONFIG_FILES([ Makefile src/libdevq-1.0.pc