configure.ac: AC_ARG_WITH(locker, AC_HELP_STRING(--without-locker,[Disable locker support]), locker=$withval, locker=yes) AM_CONDITIONAL([BUILD_LOCKER_COMPONENTS], [test x$locker = xyes]) Makefile.am: if BUILD_LOCKER_COMPONENTS LOCKER_EXAMPLE = example_locker else LOCKER_EXAMPLE = endif noinst_PROGRAMS = $(LOCKER_EXAMPLE)