http://ftp.x.org/contrib/applications/xscreensaver-2.21.tar.gz
[xscreensaver] / configure.in
index e614456efd23100439ace27201bd87ad8f69a640..145ea610bf11167d6aad2f1b4928f2f49b669587 100644 (file)
@@ -18,6 +18,10 @@ if test -z "$GCC"; then
       AC_MSG_RESULT(AIX: adding -qlanglvl=ansi -qhalt=e)
       CC="$CC -qlanglvl=ansi -qhalt=e"
     ;;
+
+# NOTE:   for Digital, need to add -std1 to get ANSI, but I'm not sure
+#         yet what $host pattern we should be testing for...
+
     *)
       AC_MSG_RESULT(no idea)
     ;;
@@ -531,6 +535,20 @@ if test $with_xshm = yes; then
     AC_CHECK_X_HEADER(sys/shm.h, [have_xshm=yes])
   fi
 
+  # AIX is pathological, as usual: apparently it's normal for the Xshm headers
+  # to exist, but the library code to not exist.  And even better, the library
+  # code is in its own library: libXextSam.a.  So, if we're on AIX, and that
+  # lib doesn't exist, give up.
+  #
+  case "$host" in
+    *-aix*)
+      have_xshm=no
+      AC_CHECK_X_LIB(XextSam, XShmQueryExtension,
+                    [have_xshm=yes; SAVER_LIBS="$SAVER_LIBS -lXextSam"],
+                      [], -lX11 -lXext -lm)
+    ;;
+  esac
+
   # if that succeeded, then we've really got it.
   if test $have_xshm = yes; then
     AC_DEFINE(HAVE_XSHM_EXTENSION)
@@ -730,6 +748,19 @@ if test $have_lesstif = yes ; then
 fi
 
 
+# Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
+# Extension".   Why this extension isn't in -lXext with all the others,
+# I have no idea.
+#
+have_xp_ext=no
+if test $have_motif = yes ; then
+   have_xp_ext=no
+   AC_CHECK_X_LIB(Xp, XpQueryExtension,
+                 [have_xp_ext=yes; SAVER_LIBS="$SAVER_LIBS -lXp"],
+                 [], -lX11 -lXext -lm)
+fi
+
+
 # check for XPM header.
 #
 have_xpm=no