-subdirs="config"
-GR_GNURADIO_CORE
-GR_GNURADIO_EXAMPLES
-GR_USRP_HW
-GR_USRP dnl this must come after GR_USRP_HW
-GR_AUDIO_ALSA
-GR_AUDIO_JACK
-GR_AUDIO_OSS
-#GR_AUDIO_PORTAUDIO dnl Disabled until portaudio patch figured out
-GR_AUDIO_OSX dnl ***NOT TESTED***
-GR_AUDIO_WINDOWS dnl ***NOT TESTED***
-GR_ATSC
-GR_COMEDI
-#GR_ERROR_CORRECTING_CODES dnl Disabled until compile error fixed from CVS
-GR_GSM_FR_VOCODER
-GR_RADAR
-GR_RADIO_ASTRONOMY
-GR_PMT
-GR_VIDEO_SDL
-GR_WXGUI
-
-dnl Has list of successfully configured components
-AC_SUBST([subdirs],$subdirs)
-AC_SUBST([failed_subdirs], $failed)
-
+dnl For -any- checks on $enable_all_components
+dnl use the following guidelines:
+dnl yes : --enable-all-components was specified, so error out if any
+dnl components do not pass configuration checks.
+dnl no : --disable-all-components was specified, so try to build the
+dnl --enable'd components, and error out if any do not pass
+dnl configuration checks.
+dnl "" : this option was not specified on the command line; try to
+dnl build all components that are not --with'd, but don't
+dnl error out if any component does not pass configuration checks.
+dnl
+dnl For each --enable-foo component, if that flag is not specified on
+dnl the command line, the related variable $enable_foo will be set to
+dnl $enable_all_components .
+
+AC_ARG_ENABLE(
+ [all-components],
+ [ --enable-all-components Build all configurable components (default), or stop on failed dependencies]
+)
+
+build_dirs="config"
+GRC_GRUEL dnl must come first
+GRC_GCELL
+GRC_GNURADIO_CORE
+GRC_USRP
+GRC_USRP2
+GRC_GR_USRP dnl this must come after GRC_USRP
+GRC_GR_USRP2
+GRC_GR_GCELL dnl this must come after GRC_GCELL and GRC_GNURADIO_CORE
+GRC_GR_MSDD6000
+GRC_GR_AUDIO_ALSA
+GRC_GR_AUDIO_JACK
+GRC_GR_AUDIO_OSS
+GRC_GR_AUDIO_OSX
+GRC_GR_AUDIO_PORTAUDIO
+GRC_GR_AUDIO_WINDOWS
+GRC_GR_ATSC
+GRC_GR_COMEDI
+GRC_GR_CVSD_VOCODER
+GRC_GR_GPIO
+GRC_GR_GSM_FR_VOCODER
+GRC_GR_NOAA
+GRC_GR_PAGER
+GRC_GR_RADAR_MONO
+GRC_GR_RADIO_ASTRONOMY
+GRC_GR_TRELLIS
+GRC_GR_VIDEO_SDL
+GRC_GR_WXGUI
+GRC_GR_QTGUI
+GRC_GR_SOUNDER dnl this must come after GRC_USRP
+GRC_GR_UTILS dnl this must come after GRC_GR_WXGUI
+GRC_GNURADIO_EXAMPLES dnl must come after all GRC_GR_*
+GRC_GRC
+GRC_DOCS dnl must be last
+
+# Each component is now either to be built, was skipped, will be
+# included from pre-installed libraries and includes, or failed
+# dependencies.
+AC_SUBST([build_dirs], [$build_dirs])
+AC_SUBST([skipped_dirs], [$skipped_dirs])
+AC_SUBST([with_dirs], [$with_dirs])
+
+# fix for older autotools that don't define these by default
+AC_SUBST(abs_top_srcdir)
+AC_SUBST(abs_top_builddir)
+AC_SUBST(MKDIR_P)
+
+# 'with' variables - the pre-installed libraries, includes, and paths
+# - must always come last in the lists, so they require special
+# treatment.
+AC_SUBST(with_INCLUDES)
+AC_SUBST(with_SWIG_INCLUDES)
+AC_SUBST(with_PYDIRPATH)
+AC_SUBST(with_SWIGDIRPATH)
+AC_SUBST(with_LIBDIRPATH)
+
+# Local files tweaked by AC