http://ftp.x.org/contrib/applications/xscreensaver-3.22.tar.gz
[xscreensaver] / configure.in
index 30fc7634ffe6982f9324cbf37db54b81d5e5db3b..878757cb6c70a0c87da043c6f6e8d3fdf853fff9 100644 (file)
@@ -717,8 +717,6 @@ else
   HACK_LIBS="-lXmu $HACK_LIBS"
   MOTIF_LIBS="-lXmu $MOTIF_LIBS"
   GTK_LIBS="-lXmu $GTK_LIBS"
-  ATHENA_LIBS="-lXmu $ATHENA_LIBS"
-  ATHENA3D_LIBS="-lXmu $ATHENA3D_LIBS"
   AC_DEFINE(HAVE_XMU)
 fi
 
@@ -1498,6 +1496,11 @@ if test "$with_motif" = yes; then
 fi
 
 
+if test "$have_motif" = yes; then
+  AC_CHECK_X_HEADER(Xm/ComboBox.h, [AC_DEFINE(HAVE_XMCOMBOBOX)])
+fi
+
+
 ###############################################################################
 #
 #       Check for -lgtk.
@@ -1581,63 +1584,6 @@ if test "$with_gtk" = yes; then
 fi
 
 
-###############################################################################
-#
-#       Check for -lXaw and -lXaw3d.
-#
-###############################################################################
-
-have_athena=no
-have_athena3d=no
-with_athena_req=unspecified
-AC_ARG_WITH(athena,
-[  --with-athena           Use the Athena toolkit for the user interface.],
-  [with_athena="$withval"; with_athena_req="$withval"],[with_athena=yes])
-
-HANDLE_X_PATH_ARG(with_athena, --with-athena, Athena)
-
-
-if test "$with_athena" != yes -a "$with_athena" != no ; then
-  echo "error: must be yes or no: --with-athena=$with_athena"
-  exit 1
-fi
-
-
-if test "$with_athena" = yes; then
-  have_athena=no
-  AC_CHECK_X_HEADER(X11/Xaw/Dialog.h, [have_athena=yes])
-  if test "$have_athena" = yes; then
-    AC_CHECK_X_LIB(Xaw3d, Xaw3dComputeTopShadowRGB,
-                  [have_athena=yes; have_athena3d=yes], [true],
-                  -lXt -lXmu -lXext -lX11)
-  fi
-fi
-
-if test "$have_athena" = yes; then
-  AC_DEFINE(HAVE_ATHENA)
-  ATHENA_LIBS="-lXaw $ATHENA_LIBS"
-fi
-
-if test "$have_athena3d" = yes; then
-  ATHENA3D_LIBS="-lXaw3d $ATHENA3D_LIBS"
-fi
-
-
-# If we have Athena, check whether it's a version that includes
-# XawViewportSetCoordinates in Viewport.h (R3 (or R4?) don't.)
-if test "$have_athena" = yes ; then
-  AC_CACHE_CHECK([for XawViewportSetCoordinates in Viewport.h], 
-                 ac_cv_have_XawViewportSetCoordinates,
-                 [ac_cv_have_XawViewportSetCoordinates=no
-                  AC_EGREP_X_HEADER(XawViewportSetCoordinates, 
-                                    X11/Xaw/Viewport.h,
-                                    ac_cv_have_XawViewportSetCoordinates=yes)])
-  if test "$ac_cv_have_XawViewportSetCoordinates" = yes ; then
-    AC_DEFINE(HAVE_XawViewportSetCoordinates)
-  fi
-fi
-
-
 ###############################################################################
 #
 #       Checking whether Motif is really Lesstif.
@@ -1985,16 +1931,30 @@ if test "$with_gle" = yes; then
     have_gle=no
     gle_halfassed=yes
     AC_CHECK_X_LIB(gle, gleCreateGC, 
-                   [have_gle=yes; gle_halfassed=no, GLE_LIBS="-lgle"],
+                   [have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"],
                    [], $GL_LIBS -lX11 -lXext -lm)
   fi
   if test "$have_gle" = yes ; then
     have_gle=no
     gle_halfassed=yes
-    AC_CHECK_X_LIB(matrix, uview_direction_d, 
-                   [have_gle=yes; gle_halfassed=no, 
-                    GLE_LIBS="$GLE_LIBS -lmatrix"],
-                   [], $GL_LIBS -lX11 -lXext -lm)
+
+    # sometimes the libmatrix stuff is included in libgle.  look there first.
+#
+# I don't get it.  For some reason, this test passes on SGI, as if
+# uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
+# Yet the link is succeeding.  Why???
+#
+#    AC_CHECK_X_LIB(gle, uview_direction_d, 
+#                   [have_gle=yes; gle_halfassed=no],
+#                   [], $GL_LIBS -lX11 -lXext -lm)
+
+    # if it wasn't in libgle, then look in libmatrix.
+    if test "$have_gle" = no ; then
+      AC_CHECK_X_LIB(matrix, uview_direction_d, 
+                     [have_gle=yes; gle_halfassed=no;
+                      GLE_LIBS="$GLE_LIBS -lmatrix"],
+                    [], $GL_LIBS -lX11 -lXext -lm)
+    fi
   fi
 
   if test "$have_gle" = yes ; then
@@ -2369,16 +2329,7 @@ if test \! -z "$libdir" ; then
 fi
 
 
-DEMO_MAN="xscreensaver-demo-old.man"
 ALL_DEMO_PROGRAMS=
-if test "$have_athena" = yes; then
-  PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xaw
-  ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
-fi
-if test "$have_athena3d" = yes; then
-  PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xaw3d
-  ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
-fi
 if test "$have_motif" = yes; then
   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
@@ -2386,7 +2337,6 @@ fi
 if test "$have_gtk" = yes; then
   PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
   ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
-  DEMO_MAN="xscreensaver-demo.man"
 fi
 
 
@@ -2447,12 +2397,9 @@ AC_SUBST(INCLUDES)
 
 AC_SUBST(PREFERRED_DEMO_PROGRAM)
 AC_SUBST(ALL_DEMO_PROGRAMS)
-AC_SUBST(DEMO_MAN)
 AC_SUBST(SAVER_LIBS)
 AC_SUBST(MOTIF_LIBS)
 AC_SUBST(GTK_LIBS)
-AC_SUBST(ATHENA_LIBS)
-AC_SUBST(ATHENA3D_LIBS)
 AC_SUBST(HACK_LIBS)
 AC_SUBST(XPM_LIBS)
 AC_SUBST(GL_LIBS)
@@ -2587,17 +2534,13 @@ if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
 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;"
+if test "$have_motif" = no -a "$have_gtk" = no; then
+  warnL "Neither Motif nor Gtk 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
+  warn2 "Gtk will be used instead."
 
 elif test "$jurassic_gtk" = yes ; then
 
@@ -2612,29 +2555,12 @@ elif test "$jurassic_gtk" = yes ; then
     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."
+  warn2 "Gtk $pref_gtk or newer is required.  Motif 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
+  warn2 "Motif will be used instead."
 
-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
 
 
@@ -2656,15 +2582,6 @@ if test "$have_motif" = yes -a "$have_lesstif" = yes ; then
   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