+###############################################################################
+#
+# Print some warnings at the end.
+#
+###############################################################################
+
+warn_prefix_1=" Warning:"
+warn_prefix_2=" Note:"
+warn_prefix="$warn_prefix_1"
+
+warning=no
+warnsep=' #################################################################'
+
+warnpre() {
+ if test "$warning" = no ; then
+ echo '' ; echo "$warnsep" ; echo ''
+ warning=yes
+ fi
+}
+
+warn() {
+ warnpre
+ if test "$warning" = long ; then echo '' ; fi
+ warning=yes
+ echo "$warn_prefix $@"
+}
+
+warnL() {
+ was=$warning
+ warnpre
+ warning=yes
+ if test "$was" != no ; then echo '' ; fi
+ echo "$warn_prefix $@"
+}
+
+warn2() {
+ echo " $@"
+ warning=long
+}
+
+note() {
+ warn_prefix="$warn_prefix_2"
+ warn $@
+ warn_prefix="$warn_prefix_1"
+}
+
+noteL() {
+ warn_prefix="$warn_prefix_2"
+ warnL $@
+ warn_prefix="$warn_prefix_1"
+}
+
+
+if test "$with_sgi_req" = yes -a "$have_sgi" = no ; then
+ warn 'The SGI saver extension was requested, but was not found.'
+fi
+
+if test "$with_mit_req" = yes -a "$have_mit" = no ; then
+ warn 'The MIT saver extension was requested, but was not found.'
+fi
+
+if test "$with_xidle_req" = yes -a "$have_xidle" = no ; then
+ warn 'The XIdle extension was requested, but was not found.'
+fi
+
+if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then
+ warn 'The XSHM extension was requested, but was not found.'
+fi
+
+if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then
+ warn 'The DOUBLE-BUFFER extension was requested, but was not found.'
+fi
+
+if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then
+ warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.'
+fi
+
+if test "$with_dpms_req" = yes -a "$have_dpms" = no ; then
+ warn 'The DPMS extension was requested, but was not found.'
+fi
+
+if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
+ warn 'The XF86VMODE extension was requested, but was not found.'
+fi
+
+if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
+ warn "Checking of /proc/interrupts was requested, but it's bogus."
+fi
+
+
+if test "$have_motif" = no -a "$have_gtk" = no -a "$have_athena" = no ; then
+ warnL "None of Motif, Gtk, or Athena widgets seem to be available;"
+ warn2 "the \`xscreensaver-demo' program requires one of these."
+
+elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
+ warnL "Use of Motif was requested, but it wasn't found;"
+ if test "$have_gtk" = yes; then
+ warn2 "Gtk will be used instead."
+ else
+ warn2 "Athena will be used instead."
+ fi
+
+elif test "$jurassic_gtk" = yes ; then
+
+ pref_gtk=1.2
+
+ v="$ac_gtk_version_string"
+ if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then
+ warnL "Use of Gtk was requested, but its version number is unknown;"
+ elif test "$with_gtk_req" = yes ; then
+ warnL "Use of Gtk was requested, but it is version $v;"
+ else
+ warnL "Gtk was found on this system, but it is version $v;"
+ fi
+
+ if test "$have_motif" = yes; then
+ which="Motif"
+ else
+ which="Athena"
+ fi
+
+ warn2 "Gtk $pref_gtk or newer is required. $which will be used instead."
+
+elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
+ warnL "Use of Gtk was requested, but it wasn't found;"
+ if test "$have_motif" = yes; then
+ warn2 "Motif will be used instead."
+ else
+ warn2 "Athena will be used instead."
+ fi
+
+elif test "$with_athena_req" = yes -a "$have_athena" = no ; then
+ warnL "Use of Athena was requested, but it wasn't found;"
+ if test "$have_gtk" = yes; then
+ warn2 "Gtk will be used instead."
+ else
+ warn2 "Motif will be used instead."
+ fi
+fi
+
+
+if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
+
+ preferred_lesstif=0.86
+
+ if test "$lesstif_version" = unknown; then
+ warnL "Unable to determine the LessTif version number!"
+ warn2 "Make sure you are using version $preferred_lesstif or newer."
+ warn2 "See <http://www.lesstif.org/>."
+
+ elif test \! $lesstif_version -gt 82; then
+ warnL "LessTif version $lesstif_version_string is being used."
+ warn2 "LessTif versions 0.82 and earlier are too buggy to"
+ warn2 "use with XScreenSaver; it is strongly recommended"
+ warn2 "that you upgrade to at least version $preferred_lesstif!"
+ warn2 "See <http://www.lesstif.org/>."
+ fi
+fi
+
+if test "$have_athena" = yes -a "$have_motif" = no -a "$have_gtk" = no; then
+ warnL "Athena widgets are being used instead of Motif or Gtk."
+ warn2 "The \`xscreensaver-demo' program looks much better"
+ warn2 "with Motif or Gtk. Wouldn't you rather be using Motif?"
+ warn2 "Motif is shipped by every commercial Unix vendor,"
+ warn2 "and there is a free implementation available as"
+ warn2 "well: see <http://www.lesstif.org/>. Gtk is shipped"
+ warn2 "with most Linux and BSD distributions."
+fi
+
+
+if test "$have_xpm" = no ; then
+ if test "$with_xpm_req" = yes ; then
+ warnL 'Use of XPM was requested, but it was not found.'
+ elif test "$with_xpm_req" = no ; then
+ noteL 'The XPM library is not being used.'
+ else
+ noteL 'The XPM library was not found.'
+ fi
+
+ echo ''
+ warn2 'Some of the demos will not be as colorful as they'
+ warn2 'could be. You might want to consider installing XPM'
+ warn2 'and re-running configure. (Remember to delete the'
+ warn2 'config.cache file first.) You can find XPM at most'
+ warn2 'X11 archive sites, such as <http://sunsite.unc.edu/>.'
+fi
+
+
+if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
+ preferred_mesagl=3.0
+
+ if test "$ac_mesagl_version" = unknown; then
+ warnL "Unable to determine the MesaGL version number!"
+ warn2 "Make sure you are using version $preferred_mesagl or newer."
+
+ elif test \! "$ac_mesagl_version" -gt 2006; then
+ warnL "MesaGL version $ac_mesagl_version_string is being used."
+ warn2 "MesaGL versions 2.6 and earlier have a security bug."
+ warn2 "It is strongly recommended that you upgrade to at"
+ warn2 "least version $preferred_mesagl."
+ fi
+fi
+
+
+if test "$have_gl" = no ; then
+ if test "$with_gl_req" = yes ; then
+ warnL 'Use of GL was requested, but it was not found.'
+ elif test "$with_gl_req" = no ; then
+ noteL 'The OpenGL 3D library is not being used.'
+ else
+ noteL 'The OpenGL 3D library was not found.'
+ fi
+
+ echo ''
+ warn2 'Those demos which use 3D will not be built or installed.'
+ warn2 'You might want to consider installing OpenGL and'
+ warn2 're-running configure. (Remember to delete the'
+ warn2 "config.cache file first.) If your vendor doesn't ship"
+ warn2 'their own implementation of OpenGL, you can get a free'
+ warn2 'version at <http://www.mesa3d.org/>. For general OpenGL'
+ warn2 'info, see <http://www.opengl.org/>.'
+
+fi
+
+if test "$with_readdisplay_req" = yes -a "$have_readdisplay" = no ; then
+ warn 'Use of XReadDisplay was requested, but it was not found.'
+fi
+
+if test "$with_sgivideo_req" = yes -a "$have_sgivideo" = no ; then
+ warn 'Use of the Iris Video Library was requested, but it was not found.'
+fi
+
+if test -n "$with_zippy_req"; then
+ if test "$with_zippy_req" != "$ac_cv_zippy_program" ; then
+ warnL "$with_zippy_req was requested as the Zippy program,"
+ warn2 "but was not found. The default will be used instead."
+ fi
+fi
+
+if test "$with_kerberos_req" = yes -a "$have_kerberos" = no ; then
+ warn 'Use of Kerberos was requested, but it was not found.'
+fi
+
+if test "$with_pam_req" = yes -a "$have_pam" = no ; then
+ warn 'Use of PAM was requested, but it was not found.'
+fi
+
+if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
+ warn 'Use of shadow passwords was requested, but they were not found.'
+fi
+
+