http://www.jwz.org/xscreensaver/xscreensaver-5.09.tar.gz
[xscreensaver] / configure
index 9af03d484dffff05a24c26917ce3b00fcd44551a..70cc74f4cd6184faac800b3664dab4e82c8633df 100755 (executable)
--- a/configure
+++ b/configure
@@ -759,6 +759,8 @@ LOCK_SRCS
 LOCK_OBJS
 JPEG_EXES
 GL_EXES
+RETIRED_GL_EXES
+SUID_EXES
 GL_UTIL_EXES
 GL_MEN
 GL_KLUDGE
@@ -2053,6 +2055,12 @@ echo "command line was: $0 $@"
 
 
 
+
+
+
+
+
+
 
 
 
@@ -2096,6 +2104,10 @@ done
 
 
 
+# Need to disable Objective C extensions in ANSI C on MacOS X to work
+# around an Apple-specific gcc bug.
+#
+
 
 ###############################################################################
 #
@@ -2122,18 +2134,6 @@ done
 
 
 
-###############################################################################
-#
-#       Function to figure out how to turn off Objective C on MacOS X.
-#       (We have to do this to work around an Apple-specific gcc bug.)
-#
-###############################################################################
-
-
-
-
-
-
 ###############################################################################
 #
 #       Function to figure out how to create directory trees.
@@ -3455,6 +3455,7 @@ else
        ac_cv_gcc_accepts_no_overlength=no
      else
        ac_cv_gcc_accepts_no_overlength=yes
+       CC="$CC -Wno-overlength-strings"
      fi
 fi
 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_overlength" >&5
@@ -3475,6 +3476,7 @@ else
        ac_cv_gcc_accepts_no_decl_after=no
      else
        ac_cv_gcc_accepts_no_decl_after=yes
+       CC="$CC -Wdeclaration-after-statement"
      fi
 fi
 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_decl_after" >&5
@@ -3483,7 +3485,6 @@ echo "${ECHO_T}$ac_cv_gcc_accepts_no_decl_after" >&6; }
   fi
 
 if test -n "$GCC"; then
-   if test -n "$GCC"; then
    { echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
 echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6; }
 if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
@@ -3496,6 +3497,7 @@ else
        ac_cv_gcc_accepts_no_cpp_precomp=no
      else
        ac_cv_gcc_accepts_no_cpp_precomp=yes
+       CC="$CC -no-cpp-precomp"
      fi
 fi
 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
@@ -3503,15 +3505,15 @@ echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
    ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
   fi
 
-   if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then
-     { echo "$as_me:$LINENO: result: Disabling Objective C extensions in ANSI C code." >&5
-echo "${ECHO_T}Disabling Objective C extensions in ANSI C code." >&6; }
-     CC="$CC -no-cpp-precomp"
-   fi
-  fi
-
 if test -n "$GCC"; then
-   if test -n "$GCC"; then
+
+  case "$host" in
+    *-darwin* )
+      # Fucking Apple let // comments sneak into OpenGL headers, so
+      # we *must* allow // comments when compiling on Mac OS 10.6!  FUCK!
+    ;;
+   *)
+     if test -n "$GCC"; then
    { echo "$as_me:$LINENO: checking whether gcc accepts -std=c89" >&5
 echo $ECHO_N "checking whether gcc accepts -std=c89... $ECHO_C" >&6; }
 if test "${ac_cv_gcc_accepts_std+set}" = set; then
@@ -3524,6 +3526,7 @@ else
        ac_cv_gcc_accepts_std=no
      else
        ac_cv_gcc_accepts_std=yes
+       CC="$CC -std=c89"
      fi
 fi
 { echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_std" >&5
@@ -3531,6 +3534,9 @@ echo "${ECHO_T}$ac_cv_gcc_accepts_std" >&6; }
    ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
   fi
 
+   ;;
+  esac
+
    { echo "$as_me:$LINENO: result: Disabling C++ comments in ANSI C code." >&5
 echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6; }
    #
@@ -3552,7 +3558,8 @@ echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6; }
      # before they were in the ANSI C 99 spec...  (gcc 2.96 permits //
      # with -std=gnu89 but not with -std=c89.)
      #
-     CC="$CC -std=c89 -U__STRICT_ANSI__"
+     # $CC already contains "-std=c89" via AC_GCC_ACCEPTS_STD
+     CC="$CC -U__STRICT_ANSI__"
    else
      # The old way:
      CC="$CC -Wp,-lang-c89"
@@ -4389,7 +4396,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 else
   ac_cv_header_stdc=no
 fi
-rm -rf conftest*
+rm -f -r conftest*
 
 fi
 
@@ -4410,7 +4417,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 else
   ac_cv_header_stdc=no
 fi
-rm -rf conftest*
+rm -f -r conftest*
 
 fi
 
@@ -6146,7 +6153,7 @@ _ACEOF
       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
     done
     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
-    for ac_extension in a so sl; do
+    for ac_extension in a so sl dylib la dll; do
       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
         test -f "$ac_im_libdir/libX11.$ac_extension"; then
        ac_im_usrlibdir=$ac_im_libdir; break
@@ -6299,7 +6306,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
 do
   # Don't even attempt the hair of trying to link an X program!
-  for ac_extension in a so sl; do
+  for ac_extension in a so sl dylib la dll; do
     if test -r "$ac_dir/libX11.$ac_extension"; then
       ac_x_libraries=$ac_dir
       break 2
@@ -7929,7 +7936,7 @@ _ACEOF
 
 
 
-ALL_LINGUAS="ca da de es et fi fr hu it ja ko nb nl no pl pt pt_BR ru sk sv vi wa zh_CN zh_TW"
+ALL_LINGUAS="ca da de es et fi fr hu it ja ko nb nl pl pt pt_BR ru sk sv vi wa zh_CN zh_TW"
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
@@ -8267,7 +8274,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 else
   ac_cv_os_cray=no
 fi
-rm -rf conftest*
+rm -f -r conftest*
 
 fi
 { echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
@@ -12140,7 +12147,7 @@ echo "${ECHO_T}not found ($d: no such directory)" >&6; }
 
 if test "$with_randr" = yes; then
 
-  # first check for Randr.h
+  # first check for Xrandr.h
 
   ac_save_CPPFLAGS="$CPPFLAGS"
   if test \! -z "$includedir" ; then
 #define HAVE_RANDR 1
 _ACEOF
 
+
+    # Now check for version 1.2 in the same libs.
+    # Try to compile, since on MacOS 10.5.7, headers are older than libs!
+    { echo "$as_me:$LINENO: checking for XRRGetScreenResources" >&5
+echo $ECHO_N "checking for XRRGetScreenResources... $ECHO_C" >&6; }
+if test "${ac_cv_randr_12+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_randr_12=no
+
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  if test \! -z "$includedir" ; then
+    CPPFLAGS="$CPPFLAGS -I$includedir"
+  fi
+  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+                         #include <X11/Xlib.h>
+                         #include <X11/extensions/Xrandr.h>
+int
+main ()
+{
+XRRScreenResources *res =
+                           XRRGetScreenResources (0, 0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -rf conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -rf conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_randr_12=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_randr_12=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_randr_12" >&5
+echo "${ECHO_T}$ac_cv_randr_12" >&6; }
+    if test "$ac_cv_randr_12" = yes ; then
+      cat >>confdefs.h <<\_ACEOF
+#define HAVE_RANDR_12 1
+_ACEOF
+
+    fi
+#   AC_CHECK_X_LIB(c, XRRGetOutputInfo, [AC_DEFINE(HAVE_RANDR_12)],
+#                  [true], $SAVER_LIBS)
   fi
 
+
 elif test "$with_randr" != no; then
   echo "error: must be yes or no: --with-randr-ext=$with_randr"
   exit 1
@@ -12643,7 +12723,7 @@ else
   { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
 fi
-rm -rf conftest*
+rm -f -r conftest*
 
   CPPFLAGS="$ac_save_CPPFLAGS"
 
@@ -16339,7 +16419,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
   ac_cv_have_mesa_gl=yes
 fi
-rm -rf conftest*
+rm -f -r conftest*
 
   CPPFLAGS="$ac_save_CPPFLAGS"
        fi
@@ -16673,7 +16753,7 @@ if test "${ac_cv_mesagl_version_string+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16680 "configure"
+#line 16760 "configure"
 #include "confdefs.h"
 #include <GL/gl.h>
 #ifndef MESA_MAJOR_VERSION
@@ -18181,6 +18261,100 @@ _ACEOF
     { echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5
 echo "${ECHO_T}checking for gdk_pixbuf usability... no" >&6; }
   fi
+
+  if test "$have_gdk_pixbuf" = yes; then
+
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  ac_save_LDFLAGS="$LDFLAGS"
+#  ac_save_LIBS="$LIBS"
+
+  if test \! -z "$includedir" ; then
+    CPPFLAGS="$CPPFLAGS -I$includedir"
+  fi
+  # note: $X_CFLAGS includes $x_includes
+  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+
+  if test \! -z "$libdir" ; then
+    LDFLAGS="$LDFLAGS -L$libdir"
+  fi
+  # note: $X_LIBS includes $x_libraries
+  LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
+
+  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
+  LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
+  { echo "$as_me:$LINENO: checking for gdk_pixbuf_apply_embedded_orientation in -lc" >&5
+echo $ECHO_N "checking for gdk_pixbuf_apply_embedded_orientation in -lc... $ECHO_C" >&6; }
+if test "${ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gdk_pixbuf_apply_embedded_orientation ();
+int
+main ()
+{
+return gdk_pixbuf_apply_embedded_orientation ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -rf conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -rf conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&5
+echo "${ECHO_T}$ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation" >&6; }
+if test $ac_cv_lib_c_gdk_pixbuf_apply_embedded_orientation = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_GDK_PIXBUF_APPLY_EMBEDDED_ORIENTATION 1
+_ACEOF
+
+fi
+
+  CPPFLAGS="$ac_save_CPPFLAGS"
+  LDFLAGS="$ac_save_LDFLAGS"
+#  LIBS="$ac_save_LIBS"
+
+  fi
 fi
 
 
@@ -19890,9 +20064,11 @@ echo "${ECHO_T}no" >&6; }
 
     #### Could use some more defaults here...
     for f in \
-      "/usr/X11R6/lib/X11/doc/README"          \
-      "/usr/share/doc/xserver-common/copyright"        \
-      "/usr/X11R6/README"                      \
+      "/usr/X11R6/lib/X11/doc/README"             \
+      "/usr/share/doc/xserver-common/copyright"           \
+      "/usr/share/doc/xserver-xorg-core/copyright" \
+      "/usr/X11R6/README"                         \
+      "/usr/share/doc/debian/debian-manifesto"     \
     ; do
       if test -z "$with_textfile"; then
         { echo "$as_me:$LINENO: checking for text file $f" >&5
 tab='  '
 if test "$have_gl" = yes; then
   GL_EXES='$(GL_EXES)'
+  SUID_EXES='$(SUID_EXES)'
+  RETIRED_GL_EXES='$(RETIRED_GL_EXES)'
   GL_UTIL_EXES='$(GL_UTIL_EXES)'
   GL_MEN='$(GL_MEN)'
-  GL_KLUDGE="${tab}  "
+  GL_KLUDGE=" "
 else
-  GL_KLUDGE="-${tab}  "
+  GL_KLUDGE="-"
 fi
 
 if test "$have_gle" = yes; then
   GLE_EXES='$(GLE_EXES)'
-  GLE_KLUDGE="${tab}   "
+  GLE_KLUDGE=" "
 else
-  GLE_KLUDGE="-${tab}   "
+  GLE_KLUDGE="-"
 fi
 
 if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
@@ -20266,6 +20444,8 @@ INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
 
 
 
+
+
 
 
 
@@ -21108,6 +21288,8 @@ LOCK_SRCS!$LOCK_SRCS$ac_delim
 LOCK_OBJS!$LOCK_OBJS$ac_delim
 JPEG_EXES!$JPEG_EXES$ac_delim
 GL_EXES!$GL_EXES$ac_delim
+RETIRED_GL_EXES!$RETIRED_GL_EXES$ac_delim
+SUID_EXES!$SUID_EXES$ac_delim
 GL_UTIL_EXES!$GL_UTIL_EXES$ac_delim
 GL_MEN!$GL_MEN$ac_delim
 GL_KLUDGE!$GL_KLUDGE$ac_delim
@@ -21130,7 +21312,7 @@ LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 69; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 71; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -21564,7 +21746,10 @@ chmod u+w intltool-update
 
  ;;
     "default-2":C) case "$CONFIG_FILES" in *po/Makefile.in*)
+        rm -f po/stamp-it po/stamp-it.tmp
+        > po/stamp-it.tmp
         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+        mv po/stamp-it.tmp po/stamp-it
       esac ;;
 
   esac
@@ -21883,8 +22068,9 @@ if test "$have_gl" = yes -a "$ac_have_mesa_gl" = yes ; then
   pgl="$preferred_mesagl"
 
   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."
+    true
+    # 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 number is $mgv --"
@@ -22035,7 +22221,7 @@ if test -z "$RPM_PACKAGE_VERSION" ; then
 
   if test \! -z "$rpmv" ; then
     rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
-    rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/attraction$@\1@p'`
+    rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/popsquares$@\1@p'`
 
     warning=no
     warnL "There is already an installed RPM of xscreensaver $rpmv"
@@ -22058,6 +22244,33 @@ if test -z "$RPM_PACKAGE_VERSION" ; then
   fi
 fi
 
+# Also warn if there's a Debian package installed.
+#
+debnames="xscreensaver xscreensaver-data xscreensaver-data-extra"
+debv=''
+for dpkg in $debnames ; do
+  if test -z "$debv"; then
+    debv=`dpkg -s $dpkg 2>/dev/null | sed -n 's/^Version: \(.*\)$/\1/p'`
+  fi
+done
+
+if test \! -z "$debv" ; then
+  debbdir=`dpkg -L $debnames 2>/dev/null | \
+            sed -n 's@^\(.*/bin/\)xscreensaver$@\1@p'`
+  debhdir=`dpkg -L $debnames 2>/dev/null | \
+            sed -n 's@^\(.*/\)popsquares$@\1@p'`
+  if test -z "$debbdir" ; then debbdir='???'; fi
+  if test -z "$debhdir" ; then debhdir='???'; fi
+
+  warning=no
+  warnL "There is already an installed dpkg of xscreensaver"
+  warn2 "version \"$debv\" on this system."
+  echo ""
+  warn2 "The dpkg was installed in $debbdir,"
+  warn2 "with demos in $debhdir."
+fi
+
+
 if test "${bindir}" = "${HACKDIR}" ; then
   do_dir_warning=yes
 fi