summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure5830
1 files changed, 3257 insertions, 2573 deletions
diff --git a/configure b/configure
index 68e04e2..e2aead7 100755
--- a/configure
+++ b/configure
@@ -664,8 +664,6 @@ SCRIPTS_OSX
EXES_SYSTEMD
EXES_OSX
OBJCC
-COMMENT_DEMO_GLADE2_GTK_2_22_TAIL
-COMMENT_DEMO_GLADE2_GTK_2_22_HEAD
WITH_BROWSER
DEFAULT_TEXT_FILE
DEFAULT_IMAGE_DIRECTORY
@@ -700,10 +698,13 @@ ALL_DEMO_PROGRAMS
PREFERRED_DEMO_PROGRAM
INCLUDES
setcap_program
+PTHREAD_CFLAGS
+PTHREAD_LIBS
+PTHREAD_CC
+ax_pthread_config
+login_manager_tmp
gnome_url_show_program
gnome_open_program
-pkg_config
-login_manager_tmp
MKINSTALLDIRS
POSUB
POFILES
@@ -753,6 +754,7 @@ INTLTOOL_EXTRACT
INTLTOOL_MERGE
INTLTOOL_UPDATE
USE_NLS
+pkg_config
X_EXTRA_LIBS
X_LIBS
X_PRE_LIBS
@@ -766,10 +768,6 @@ INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
CPP
-PTHREAD_CFLAGS
-PTHREAD_LIBS
-PTHREAD_CC
-ax_pthread_config
OBJEXT
EXEEXT
ac_ct_CC
@@ -827,22 +825,28 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
-with_x_app_defaults
-with_pthread
enable_largefile
with_x
enable_nls
+with_app_defaults
with_hackdir
enable_subdir
with_configdir
with_dpms_ext
+with_xf86vmode_ext
with_xinerama_ext
+with_randr_ext
with_xinput_ext
-with_xf86vmode_ext
with_xf86gamma_ext
-with_randr_ext
+with_xidle_ext
+with_sgi_ext
+with_sgivc_ext
+with_readdisplay
+with_xshm_ext
+with_xdbe_ext
with_proc_interrupts
with_proc_oom
+with_systemd
enable_locking
enable_root_passwd
with_pam
@@ -851,25 +855,22 @@ enable_pam_check_account_type
with_kerberos
with_shadow
with_passwd_helper
-with_login_manager
with_gtk
with_motif
+with_login_manager
+with_image_directory
+with_text_file
+with_browser
with_gl
with_gle
with_gles
+with_jpeg
with_png
with_pixbuf
-with_jpeg
with_xft
-with_systemd
-with_xshm_ext
-with_xdbe_ext
-with_readdisplay
-with_image_directory
-with_text_file
-with_browser
-with_setuid_hacks
+with_pthread
with_setcap_hacks
+with_setuid_hacks
with_record_animation
'
ac_precious_vars='build_alias
@@ -1511,83 +1512,79 @@ Optional Features:
--disable-largefile omit support for large files
--disable-nls do not use Native Language Support
-Screen locking options:
- --enable-locking Compile in support for locking the display.
- --disable-locking Do not allow locking at all.
-
- --enable-root-passwd Allow root passwd to unlock screen.
- --disable-root-passwd Do not allow that.
- --enable-pam-check-account-type
- Whether PAM should check the result of account
- modules when authenticating. Only do this if you
- have account configured properly on your system.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
-
- --with-pthread Enables POSIX threads, for SMP support.
--with-x use the X Window System
+Installation Options:
-Installation options:
+ --prefix=PREFIX Install root of architecture-independent files.
+ --exec-prefix=EPREFIX Install root of architecture-dependent files.
+ --with-app-defaults=DIR Where to install the default settings file.
--with-hackdir=DIR Where to install the hundreds of demo executables.
- Default: `PREFIX/libexec/xscreensaver/'
- --with-configdir=DIR Where to install the data files that describe each
- of the display modes to the GUI.
- Default: `PREFIX/share/xscreensaver/config/'
- --with-x-app-defaults=DIR
- Where to install xscreensaver configuration file.
-
- --with-dpms-ext Include support for the DPMS extension.
- --with-xinerama-ext Include support for the XINERAMA extension.
+ --with-configdir=DIR Where to install the GUI configuration files.
+
+Server Extension Options:
+
+ --with-dpms-ext Include support for power management.
+ --with-xf86vmode-ext Include support for virtual screens.
+ --with-xinerama-ext Include support for multiple monitors.
+ --with-randr-ext Include different support for multiple monitors.
--with-xinput-ext Include support for the XInput extension.
- --with-xf86vmode-ext Include support for XFree86 virtual screens.
--with-xf86gamma-ext Include support for XFree86 gamma fading.
- --with-randr-ext Include support for the X Resize+Rotate extension.
+ --with-xidle-ext Include support for the X11R5 XIDLE extension.
+ --with-sgi-ext Include support for the SGI SCREEN_SAVER extension.
+ --with-sgivc-ext Include support for the SGI-VIDEO-CONTROL extension.
+ --with-readdisplay Include support for the SGI XReadDisplay extension.
+ --with-xshm-ext Include support for the Shared Memory extension.
+ --with-xdbe-ext Include support for the DOUBLE-BUFFER extension.
--with-proc-interrupts Include support for consulting the /proc/interrupts
file to notice keyboard activity.
- --with-proc-oom Include support for disabling the OOM-killer.
+ --with-proc-oom Include support for disabling the OOM-killer.
+ --with-systemd Support systemd requests to lock on suspend, and to
+ allow video players to inhibit the screen saver.
+
+Screen Locking Options:
+
+ --disable-locking Do not allow locking of the display at all.
--with-pam Include support for PAM (Pluggable Auth Modules.)
- --with-pam-service-name NAME arg is the name of the PAM service that
- xscreensaver will authenticate as.
+ --with-pam-service-name Set the name of the xscreensaver PAM service.
+ --enable-pam-account Whether PAM should check the result of account
+ modules when authenticating. Only do this if you
+ have "account" modules configured on your system.
+ --enable-root-passwd Allow the root passwd to unlock, if not using PAM.
--with-kerberos Include support for Kerberos authentication.
--with-shadow Include support for shadow password authentication.
--with-passwd-helper Include support for an external password
verification helper program.
- --with-login-manager Put a "New Login" button on the unlock dialog that
- runs a login manager like gdmflexiserver or kdmctl.
-User interface options:
+User Interface Options:
--with-gtk Use the Gtk toolkit for the user interface.
- --with-motif Use the Motif toolkit for the user interface
- (no longer supported.)
+ --with-motif Use the Motif toolkit for the user interface.
+ --with-login-manager Put a "New Login" button on the unlock dialog that
+ runs a login manager like gdmflexiserver or kdmctl.
+ --with-image-directory Some demos will display random images from here.
+ --with-text-file=FILE Some demos will use this as a source of text.
+ --with-browser=BROWSER The web browser used to open the "Help" URL.
-Graphics options:
+Graphics Options:
--with-gl Build those demos which depend on OpenGL.
- --with-gle Build those demos which depend on GLE
- (the OpenGL "extrusion" library.)
+ --with-gle Build those demos which depend on GLE (extrusion).
--with-gles Target OpenGL ES 1.x API instead of OpenGL 1.3.
- --with-png Include support for the PNG library.
- --with-pixbuf Include support for the GDK-Pixbuf library in some
- demos, which will make it possible for them to read
- GIF, JPEG, and PNG files as well.
--with-jpeg Include support for the JPEG library.
+ --with-png Include support for the PNG library.
+ --with-pixbuf Include support for the GDK-Pixbuf library, which
+ allows the display of JPEG, PNG, GIF and SVG images.
--with-xft Include support for the X Freetype library.
- --with-systemd Build xscreensaver-systemd to lock on suspend.
- --with-xshm-ext Include support for the Shared Memory extension.
- --with-xdbe-ext Include support for the DOUBLE-BUFFER extension.
- --with-readdisplay Include support for the XReadDisplay extension.
- --with-image-directory Arg is the default directory from which some demos
- will choose random images to display.
- --with-text-file=FILE By default, some demos may display this file.
- --with-browser=BROWSER Specify the web browser used to show the help URL.
- --with-setuid-hacks Allow some demos to be installed `setuid root'
- (which is needed in order to ping other hosts.)
- --with-setcap-hacks Allow some demos to be installed with setcap
- (which is needed in order to ping other hosts.)
+ --with-pthread Enables POSIX threads, for SMP support.
+ --with-setcap-hacks Build the "sonar" demo with libcap, which allows
+ it to ping other hosts without being setuid.
+ --with-setuid-hacks Install the "sonar" demo as setuid root, which is
+ needed in order to ping other hosts without setcap.
--with-record-animation Include code for generating MP4 videos.
Some influential environment variables:
@@ -1719,52 +1716,6 @@ fi
} # ac_fn_c_try_compile
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f 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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- test -x conftest$ac_exeext
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
- # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
- # interfere with the next link command; also delete a directory that is
- # left behind by Apple's compiler. We do this before executing the actions.
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_link
-
# ac_fn_c_try_cpp LINENO
# ----------------------
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
@@ -2016,6 +1967,52 @@ $as_echo "$ac_res" >&6; }
} # ac_fn_c_check_type
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f 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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ test -x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
# ac_fn_c_check_func LINENO FUNC VAR
# ----------------------------------
# Tests whether FUNC exists, setting the cache variable VAR accordingly
@@ -2510,31 +2507,17 @@ echo "command line was: $0 $@"
# This only ever existed in X11R4 and X11R5.
-#AH_TEMPLATE([HAVE_XIDLE_EXTENSION],
-# [Define this if you have the XIDLE extension installed. If you
-# have the XIDLE extension, this is recommended. (You have this
-# extension if the file /usr/include/X11/extensions/xidle.h
-# exists.) Turning on this flag lets XScreenSaver work better with
-# servers which support this extension; but it will still work
-# with servers which do not suport it, so it's a good idea to
-# compile in support for it if you can.])
-
-# Using this extension will crash your X server and make fading not work.
-#AH_TEMPLATE([HAVE_MIT_SAVER_EXTENSION],
-# [Define this if you have the MIT-SCREEN-SAVER extension
-# installed. See the caveats about this extension, above.
-# (It's available if /usr/include/X11/extensions/scrnsaver.h
-# exists.)])
+
+
+
# This only ever existed on SGI hardware.
-#AH_TEMPLATE([HAVE_SGI_SAVER_EXTENSION],
-# [Define this if you have the SGI SCREEN_SAVER extension. This is
-# standard on Irix systems, and not available elsewhere.])
+
# This only ever existed on SGI hardware.
-#AH_TEMPLATE([HAVE_SGI_VC_EXTENSION],
-# [Define this if you have the SGI-VIDEO-CONTROL extension. This
-# is standard on Irix systems, and not available elsewhere.])
+
+
+
@@ -2676,15 +2659,6 @@ done
###############################################################################
#
-# Query AX_PTHREAD, and figure out which compiler gets used.
-#
-###############################################################################
-
-
-
-
-###############################################################################
-#
# Function to figure out how to run the compiler.
#
###############################################################################
@@ -2797,22 +2771,6 @@ perl_version_cmd='print $]'
#
-###############################################################################
-#
-# Handle the --with-x-app-defaults option HERE
-#
-###############################################################################
-
-
-# Check whether --with-x-app-defaults was given.
-if test "${with_x_app_defaults+set}" = set; then :
- withval=$with_x_app_defaults; ac_cv_x_app_defaults="$withval"
-else
- eval ac_x_app_defaults="$withval"
-fi
-
-
-
@@ -2879,7 +2837,6 @@ fi
-
###############################################################################
###############################################################################
#
@@ -2892,7 +2849,6 @@ fi
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
# random compiler setup
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -3786,586 +3742,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-have_pthread=no
- with_pthread_req=unspecified
-
- # AX_PTHREAD is from the GNU Autoconf Archive.
- # https://savannah.gnu.org/projects/autoconf-archive/
- # ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-#
-# DESCRIPTION
-#
-# This macro figures out how to build C programs using POSIX threads. It
-# sets the PTHREAD_LIBS output variable to the threads library and linker
-# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
-# flags that are needed. (The user can also force certain compiler
-# flags/libs to be tested by setting these environment variables.)
-#
-# Also sets PTHREAD_CC to any special C compiler that is needed for
-# multi-threaded programs (defaults to the value of CC otherwise). (This
-# is necessary on AIX to use the special cc_r compiler alias.)
-#
-# NOTE: You are assumed to not only compile your program with these flags,
-# but also link it with them as well. e.g. you should link with
-# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
-#
-# If you are only building threads programs, you may wish to use these
-# variables in your default LIBS, CFLAGS, and CC:
-#
-# LIBS="$PTHREAD_LIBS $LIBS"
-# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-# CC="$PTHREAD_CC"
-#
-# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
-# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
-# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
-#
-# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
-# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
-# PTHREAD_CFLAGS.
-#
-# ACTION-IF-FOUND is a list of shell commands to run if a threads library
-# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
-# is not found. If ACTION-IF-FOUND is not specified, the default action
-# will define HAVE_PTHREAD.
-#
-# Please let the authors know if this macro fails on any platform, or if
-# you have any other suggestions or comments. This macro was based on work
-# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
-# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
-# Alejandro Forero Cuervo to the autoconf macro repository. We are also
-# grateful for the helpful feedback of numerous users.
-#
-# Updated for Autoconf 2.68 by Daniel Richard G.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
-# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
-#
-# This program is free software: you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation, either version 3 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Archive. When you make and distribute a
-# modified version of the Autoconf Macro, you may extend this special
-# exception to the GPL to apply to your modified version as well.
-
-#serial 21
-
-# This is what autoupdate's m4 run will expand. It fires
-# the warning (with _au_warn_XXX), outputs it into the
-# updated configure.ac (with AC_DIAGNOSE), and then outputs
-# the replacement expansion.
-
-
-# This is an auxiliary macro that is also run when
-# autoupdate runs m4. It simply calls m4_warning, but
-# we need a wrapper so that each warning is emitted only
-# once. We break the quoting in m4_warning's argument in
-# order to expand this macro's arguments, not AU_DEFUN's.
-
-
-# Finally, this is the expansion that is picked up by
-# autoconf. It tells the user to run autoupdate, and
-# then outputs the replacement expansion. We do not care
-# about autoupdate's warning because that contains
-# information on what to do *after* running autoupdate.
-
-
-
- # This affects CC, LIBS, and CFLAGS, instead of defining new variables.
-
-
-# Check whether --with-pthread was given.
-if test "${with_pthread+set}" = set; then :
- withval=$with_pthread; with_pthread="$withval"; with_pthread_req="$withval"
-else
- with_pthread=yes
-fi
-
-
- if test "$with_pthread" = yes; then
- # AX_PTHREAD might want a different compiler.
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-ax_pthread_ok=no
-
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
-# It gets checked for in the link test anyway.
-
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
-$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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 pthread_join ();
-int
-main ()
-{
-return pthread_join ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ax_pthread_ok=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
-$as_echo "$ax_pthread_ok" >&6; }
- if test x"$ax_pthread_ok" = xno; then
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
- fi
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-fi
-
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
-
-# Create a list of thread flags to try. Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
-
-ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
-
-# The ordering *is* (sometimes) important. Some notes on the
-# individual items follow:
-
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-# other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-# doesn't hurt to check since this sometimes defines pthreads too;
-# also defines -D_REENTRANT)
-# ... -mt is also the pthreads flag for HP/aCC
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
-
-case ${host_os} in
- solaris*)
-
- # On Solaris (at least, for some versions), libc contains stubbed
- # (non-functional) versions of the pthreads routines, so link-based
- # tests will erroneously succeed. (We need to link with -pthreads/-mt/
- # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
- # a function called by this macro, so we could check for that, but
- # who knows whether they'll stub that too in a future libc.) So,
- # we'll just look for -pthreads and -lpthread first:
-
- ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
- ;;
-
- darwin*)
- ax_pthread_flags="-pthread $ax_pthread_flags"
- ;;
-esac
-
-# Clang doesn't consider unrecognized options an error unless we specify
-# -Werror. We throw in some extra Clang-specific options to ensure that
-# this doesn't happen for GCC, which also accepts -Werror.
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
-$as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
-save_CFLAGS="$CFLAGS"
-ax_pthread_extra_flags="-Werror"
-CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-int foo(void);
-int
-main ()
-{
-foo()
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- ax_pthread_extra_flags=
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-CFLAGS="$save_CFLAGS"
-
-if test x"$ax_pthread_ok" = xno; then
-for flag in $ax_pthread_flags; do
-
- case $flag in
- none)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
-$as_echo_n "checking whether pthreads work without any flags... " >&6; }
- ;;
-
- -*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
-$as_echo_n "checking whether pthreads work with $flag... " >&6; }
- PTHREAD_CFLAGS="$flag"
- ;;
-
- pthread-config)
- # Extract the first word of "pthread-config", so it can be a program name with args.
-set dummy pthread-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ax_pthread_config+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ax_pthread_config"; then
- ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ax_pthread_config="yes"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
-fi
-fi
-ax_pthread_config=$ac_cv_prog_ax_pthread_config
-if test -n "$ax_pthread_config"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
-$as_echo "$ax_pthread_config" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- if test x"$ax_pthread_config" = xno; then continue; fi
- PTHREAD_CFLAGS="`pthread-config --cflags`"
- PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
- ;;
-
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
-$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
- PTHREAD_LIBS="-l$flag"
- ;;
- esac
-
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
-
- # Check for various functions. We must include pthread.h,
- # since some functions may be macros. (On the Sequent, we
- # need a special flag -Kthread to make this header compile.)
- # We check for pthread_join because it is in -lpthread on IRIX
- # while pthread_create is in libc. We check for pthread_attr_init
- # due to DEC craziness with -lpthreads. We check for
- # pthread_cleanup_push because it is one of the few pthread
- # functions on Solaris that doesn't have a non-functional libc stub.
- # We try pthread_create on general principles.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
- static void routine(void *a) { a = 0; }
- static void *start_routine(void *a) { return a; }
-int
-main ()
-{
-pthread_t th; pthread_attr_t attr;
- pthread_create(&th, 0, start_routine, 0);
- pthread_join(th, 0);
- pthread_attr_init(&attr);
- pthread_cleanup_push(routine, 0);
- pthread_cleanup_pop(0) /* ; */
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ax_pthread_ok=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
-$as_echo "$ax_pthread_ok" >&6; }
- if test "x$ax_pthread_ok" = xyes; then
- break;
- fi
-
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
-done
-fi
-
-# Various other checks:
-if test "x$ax_pthread_ok" = xyes; then
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
- # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
-$as_echo_n "checking for joinable pthread attribute... " >&6; }
- attr_name=unknown
- for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-int
-main ()
-{
-int attr = $attr; return attr /* ; */
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- attr_name=$attr; break
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- done
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
-$as_echo "$attr_name" >&6; }
- if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
-
-cat >>confdefs.h <<_ACEOF
-#define PTHREAD_CREATE_JOINABLE $attr_name
-_ACEOF
-
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
-$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
- flag=no
- case ${host_os} in
- aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
- osf* | hpux*) flag="-D_REENTRANT";;
- solaris*)
- if test "$GCC" = "yes"; then
- flag="-D_REENTRANT"
- else
- # TODO: What about Clang on Solaris?
- flag="-mt -D_REENTRANT"
- fi
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
-$as_echo "$flag" >&6; }
- if test "x$flag" != xno; then
- PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
-$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
-if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <pthread.h>
-int
-main ()
-{
-int i = PTHREAD_PRIO_INHERIT;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ax_cv_PTHREAD_PRIO_INHERIT=yes
-else
- ax_cv_PTHREAD_PRIO_INHERIT=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
-$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
- if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
-
-$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
-
-fi
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-
- # More AIX lossage: compile with *_r variant
- if test "x$GCC" != xyes; then
- case $host_os in
- aix*)
- case "x/$CC" in #(
- x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
- #handle absolute path differently from PATH based program lookup
- case "x$CC" in #(
- x/*) :
- if as_fn_executable_p ${CC}_r; then :
- PTHREAD_CC="${CC}_r"
-fi ;; #(
- *) :
- for ac_prog in ${CC}_r
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_PTHREAD_CC+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$PTHREAD_CC"; then
- ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_PTHREAD_CC="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
-if test -n "$PTHREAD_CC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
-$as_echo "$PTHREAD_CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$PTHREAD_CC" && break
-done
-test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
- ;;
-esac ;; #(
- *) :
- ;;
-esac
- ;;
- esac
- fi
-fi
-
-test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
-
-
-
-
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$ax_pthread_ok" = xyes; then
- if test "$CC" = "$PTHREAD_CC" -o -z "$ac_original_cc"; then
- have_pthread=yes
- else
- ac_prog_cc_no_pthread=yes
- fi
-
- :
-else
- ax_pthread_ok=no
-
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
- if test "$have_pthread" = yes; then
- $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
-
- CC=$PTHREAD_CC
- fi
- fi
- # Needs ac_original_cc.
-
-
if test -z "$GCC"; then
# not using GCC
@@ -4699,6 +4075,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
if ${ac_cv_c_const+:} false; then :
@@ -6874,90 +6251,6 @@ if test "$have_x" != yes; then
as_fn_error $? "Couldn't find X11 headers/libs. Try \`$0 --help'." "$LINENO" 5
fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X app-defaults directory" >&5
-$as_echo_n "checking for X app-defaults directory... " >&6; }
-if ${ac_cv_x_app_defaults+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- # skip this, it's always wrong these days.
- # AC_PATH_X_APP_DEFAULTS_XMKMF
- if test x"$ac_x_app_defaults" = x; then
- true
- # Look for the directory under a standard set of common directories.
- # Check X11 before X11Rn because it's often a symlink to the current release.
- for ac_dir in \
- \
- /usr/share/X11/app-defaults \
- \
- /usr/X11/lib/app-defaults \
- /usr/X11R6/lib/app-defaults \
- /usr/X11R6/lib/X11/app-defaults \
- /usr/X11R5/lib/app-defaults \
- /usr/X11R5/lib/X11/app-defaults \
- /usr/X11R4/lib/app-defaults \
- /usr/X11R4/lib/X11/app-defaults \
- \
- /usr/lib/X11/app-defaults \
- /usr/lib/X11R6/app-defaults \
- /usr/lib/X11R5/app-defaults \
- /usr/lib/X11R4/app-defaults \
- \
- /etc/X11/app-defaults \
- \
- /usr/local/X11/lib/app-defaults \
- /usr/local/X11R6/lib/app-defaults \
- /usr/local/X11R5/lib/app-defaults \
- /usr/local/X11R4/lib/app-defaults \
- \
- /usr/local/lib/X11/app-defaults \
- /usr/local/lib/X11R6/app-defaults \
- /usr/local/lib/X11R6/X11/app-defaults \
- /usr/local/lib/X11R5/app-defaults \
- /usr/local/lib/X11R5/X11/app-defaults \
- /usr/local/lib/X11R4/app-defaults \
- /usr/local/lib/X11R4/X11/app-defaults \
- \
- /usr/X386/lib/X11/app-defaults \
- /usr/x386/lib/X11/app-defaults \
- /usr/XFree86/lib/X11/app-defaults \
- \
- /usr/lib/X11/app-defaults \
- /usr/local/lib/X11/app-defaults \
- /usr/unsupported/lib/X11/app-defaults \
- /usr/athena/lib/X11/app-defaults \
- /usr/local/x11r5/lib/X11/app-defaults \
- /usr/lpp/Xamples/lib/X11/app-defaults \
- /lib/usr/lib/X11/app-defaults \
- \
- /usr/openwin/lib/app-defaults \
- /usr/openwin/lib/X11/app-defaults \
- /usr/openwin/share/lib/app-defaults \
- /usr/openwin/share/lib/X11/app-defaults \
- \
- /X11R6/lib/app-defaults \
- /X11R5/lib/app-defaults \
- /X11R4/lib/app-defaults \
- ; \
- do
- if test -d "$ac_dir"; then
- ac_x_app_defaults=$ac_dir
- break
- fi
- done
-
- fi
- if test x"$ac_x_app_defaults" = x; then
- /bin/echo -n 'fallback: '
- ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
- else
- # Record where we found app-defaults for the cache.
- ac_cv_x_app_defaults="$ac_x_app_defaults"
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x_app_defaults" >&5
-$as_echo "$ac_cv_x_app_defaults" >&6; }
- eval ac_x_app_defaults="$ac_cv_x_app_defaults"
case "$host" in
*-hpux*)
@@ -7163,10 +6456,14 @@ $as_echo "$ac_cv_xpointer" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this is MacOS X" >&5
$as_echo_n "checking whether this is MacOS X... " >&6; }
ac_macosx=no
+ ac_irix=no
case "$host" in
*-apple-darwin* )
ac_macosx=yes
;;
+ *-irix* )
+ ac_irix=yes
+ ;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_macosx" >&5
$as_echo "$ac_macosx" >&6; }
@@ -7174,6 +6471,150 @@ $as_echo "$ac_macosx" >&6; }
###############################################################################
#
+# pkg-config
+#
+###############################################################################
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_pkg_config+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $pkg_config in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+pkg_config=$ac_cv_path_pkg_config
+if test -n "$pkg_config"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config" >&5
+$as_echo "$pkg_config" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_pkg_config"; then
+ ac_pt_pkg_config=$pkg_config
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_pkg_config+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_pkg_config in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_pkg_config="$ac_pt_pkg_config" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_pkg_config="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_pkg_config=$ac_cv_path_ac_pt_pkg_config
+if test -n "$ac_pt_pkg_config"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_pkg_config" >&5
+$as_echo "$ac_pt_pkg_config" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_pkg_config" = x; then
+ pkg_config=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ pkg_config=$ac_pt_pkg_config
+ fi
+else
+ pkg_config="$ac_cv_path_pkg_config"
+fi
+
+
+if test -z "$pkg_config" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found!" >&5
+$as_echo "$as_me: WARNING: pkg-config not found!" >&2;}
+ pkg_config="false"
+fi
+
+
+# Utility function for running pkg-config-based tests...
+#
+pkgs=''
+pkg_check_version() {
+ if test "$ok" = yes ; then
+ req="$1"
+ min="$2"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $req" >&5
+$as_echo_n "checking for $req... " >&6; }
+ if $pkg_config --exists "$req" ; then
+ vers=`$pkg_config --modversion "$req"`
+ if $pkg_config --exists "$req >= $min" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vers" >&5
+$as_echo "$vers" >&6; }
+ pkgs="$pkgs $req"
+ return 1
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vers (wanted >= $min)" >&5
+$as_echo "$vers (wanted >= $min)" >&6; }
+ ok=no
+ return 0
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ok=no
+ return 0
+ fi
+ fi
+}
+
+
+###############################################################################
+#
# Gettext support
#
###############################################################################
@@ -7662,11 +7103,6 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$GETTEXT_PACKAGE"
-_ACEOF
-
-
ALL_LINGUAS="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"
@@ -8579,6 +8015,107 @@ $as_echo "$ac_cv_ld_static" >&6; }
esac
fi
+###############################################################################
+#
+# The --with-x-app-defaults option
+#
+###############################################################################
+
+#### H1
+
+
+# Check whether --with-app-defaults was given.
+if test "${with_app_defaults+set}" = set; then :
+ withval=$with_app_defaults; ac_cv_x_app_defaults="$withval"
+else
+ eval ac_x_app_defaults="$withval"
+fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X app-defaults directory" >&5
+$as_echo_n "checking for X app-defaults directory... " >&6; }
+if ${ac_cv_x_app_defaults+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # skip this, it's always wrong these days.
+ # AC_PATH_X_APP_DEFAULTS_XMKMF
+ if test x"$ac_x_app_defaults" = x; then
+ true
+ # Look for the directory under a standard set of common directories.
+ # Check X11 before X11Rn because it's often a symlink to the current release.
+ for ac_dir in \
+ \
+ /usr/share/X11/app-defaults \
+ \
+ /usr/X11/lib/app-defaults \
+ /usr/X11R6/lib/app-defaults \
+ /usr/X11R6/lib/X11/app-defaults \
+ /usr/X11R5/lib/app-defaults \
+ /usr/X11R5/lib/X11/app-defaults \
+ /usr/X11R4/lib/app-defaults \
+ /usr/X11R4/lib/X11/app-defaults \
+ \
+ /usr/lib/X11/app-defaults \
+ /usr/lib/X11R6/app-defaults \
+ /usr/lib/X11R5/app-defaults \
+ /usr/lib/X11R4/app-defaults \
+ \
+ /etc/X11/app-defaults \
+ \
+ /usr/local/X11/lib/app-defaults \
+ /usr/local/X11R6/lib/app-defaults \
+ /usr/local/X11R5/lib/app-defaults \
+ /usr/local/X11R4/lib/app-defaults \
+ \
+ /usr/local/lib/X11/app-defaults \
+ /usr/local/lib/X11R6/app-defaults \
+ /usr/local/lib/X11R6/X11/app-defaults \
+ /usr/local/lib/X11R5/app-defaults \
+ /usr/local/lib/X11R5/X11/app-defaults \
+ /usr/local/lib/X11R4/app-defaults \
+ /usr/local/lib/X11R4/X11/app-defaults \
+ \
+ /usr/X386/lib/X11/app-defaults \
+ /usr/x386/lib/X11/app-defaults \
+ /usr/XFree86/lib/X11/app-defaults \
+ \
+ /usr/lib/X11/app-defaults \
+ /usr/local/lib/X11/app-defaults \
+ /usr/unsupported/lib/X11/app-defaults \
+ /usr/athena/lib/X11/app-defaults \
+ /usr/local/x11r5/lib/X11/app-defaults \
+ /usr/lpp/Xamples/lib/X11/app-defaults \
+ /lib/usr/lib/X11/app-defaults \
+ \
+ /usr/openwin/lib/app-defaults \
+ /usr/openwin/lib/X11/app-defaults \
+ /usr/openwin/share/lib/app-defaults \
+ /usr/openwin/share/lib/X11/app-defaults \
+ \
+ /X11R6/lib/app-defaults \
+ /X11R5/lib/app-defaults \
+ /X11R4/lib/app-defaults \
+ ; \
+ do
+ if test -d "$ac_dir"; then
+ ac_x_app_defaults=$ac_dir
+ break
+ fi
+ done
+
+ fi
+ if test x"$ac_x_app_defaults" = x; then
+ /bin/echo -n 'fallback: '
+ ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
+ else
+ # Record where we found app-defaults for the cache.
+ ac_cv_x_app_defaults="$ac_x_app_defaults"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x_app_defaults" >&5
+$as_echo "$ac_cv_x_app_defaults" >&6; }
+ eval ac_x_app_defaults="$ac_cv_x_app_defaults"
+
###############################################################################
#
@@ -8631,7 +8168,6 @@ fi
###############################################################################
#
# Handle the --with-configdir option
-# Help for --with-x-app-defaults option added.
#
###############################################################################
@@ -8664,116 +8200,14 @@ fi
-
-###############################################################################
-#
-# Check for the SGI SCREEN_SAVER server extension.
-#
-###############################################################################
-
-#have_sgi=no
-#with_sgi_req=unspecified
-#AC_ARG_WITH(sgi-ext,
-#[Except where noted, all of the --with options below can also take a
-#directory argument: for example, `--with-motif=/opt/Motif'. That would
-#cause /opt/Motif/include/ to be added to the -I list, and /opt/Motif/lib/
-#to be added to the -L list, assuming those directories exist.
-#
-#By default, support for each of these options will be built in, if the
-#relevant library routines exist. At run time, they will then be used
-#only if the X server being used supports them. Each --with option has
-#a corresponding --without option, to override building support for them
-#at all.
-#
-#Screen blanking and idle-detection options:
-#
-# --with-sgi-ext Include support for the SGI SCREEN_SAVER extension.],
-# [with_sgi="$withval"; with_sgi_req="$withval"],[with_sgi=yes])
-#
-#HANDLE_X_PATH_ARG(with_sgi, --with-sgi-ext, SGI SCREEN_SAVER)
-#
-#if test "$with_sgi" = yes; then
-# AC_CHECK_X_HEADER(X11/extensions/XScreenSaver.h,
-# [have_sgi=yes
-# AC_DEFINE(HAVE_SGI_SAVER_EXTENSION)],,
-# [#include <X11/Xlib.h>])
-#
-#elif test "$with_sgi" != no; then
-# echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
-# exit 1
-#fi
-
-
-###############################################################################
-#
-# Check for the XIDLE server extension.
-#
-###############################################################################
-
-#have_xidle=no
-#with_xidle_req=unspecified
-#AC_ARG_WITH(xidle-ext,
-#[ --with-xidle-ext Include support for the XIDLE extension.],
-# [with_xidle="$withval"; with_xidle_req="$withval"],[with_xidle=yes])
-#
-#HANDLE_X_PATH_ARG(with_xidle, --with-xidle-ext, XIDLE)
-#
-#if test "$with_xidle" = yes; then
-# AC_CHECK_X_HEADER(X11/extensions/xidle.h,
-# [have_xidle=yes
-# AC_DEFINE(HAVE_XIDLE_EXTENSION)],,
-# [#include <X11/Xlib.h>])
-#elif test "$with_xidle" != no; then
-# echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
-# exit 1
-#fi
-
-
-###############################################################################
-#
-# Check for the SGI-VIDEO-CONTROL server extension.
-#
-###############################################################################
-
-#have_sgivc=no
-#with_sgivc_req=unspecified
-#AC_ARG_WITH(sgivc-ext,
-#[ --with-sgivc-ext Include support for the SGI-VIDEO-CONTROL extension.],
-# [with_sgivc="$withval"; with_sgivc_req="$withval"],[with_sgivc=yes])
-#
-#HANDLE_X_PATH_ARG(with_sgivc, --with-sgivc-ext, SGI-VIDEO-CONTROL)
-#
-#if test "$with_sgivc" = yes; then
-#
-# # first check for XSGIvc.h
-# AC_CHECK_X_HEADER(X11/extensions/XSGIvc.h, [have_sgivc=yes],,
-# [#include <X11/Xlib.h>])
-#
-# # if that succeeded, then check for the -lXsgivc
-# if test "$have_sgivc" = yes; then
-# have_sgivc=no
-# AC_CHECK_X_LIB(Xsgivc, XSGIvcQueryGammaMap,
-# [have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"], [true],
-# -lXext -lX11)
-# fi
-#
-# # if that succeeded, then we've really got it.
-# if test "$have_sgivc" = yes; then
-# AC_DEFINE(HAVE_SGI_VC_EXTENSION)
-# fi
-#
-#elif test "$with_sgivc" != no; then
-# echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
-# exit 1
-#fi
-
-
###############################################################################
#
# Check for the DPMS server extension.
#
###############################################################################
+#### H1
+
have_dpms=no
with_dpms_req=unspecified
@@ -9006,6 +8440,173 @@ fi
###############################################################################
#
+# Check for the XF86VMODE server extension (for virtual screens.)
+#
+###############################################################################
+
+have_xf86vmode=no
+with_xf86vmode_req=unspecified
+
+# Check whether --with-xf86vmode-ext was given.
+if test "${with_xf86vmode_ext+set}" = set; then :
+ withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
+else
+ with_xf86vmode=yes
+fi
+
+
+
+ case "$with_xf86vmode" in
+ yes) ;;
+ no) ;;
+
+ /*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86vmode headers" >&5
+$as_echo_n "checking for xf86vmode headers... " >&6; }
+ d=$with_xf86vmode/include
+ if test -d $d; then
+ X_CFLAGS="-I$d $X_CFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
+$as_echo "$d" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
+$as_echo "not found ($d: no such directory)" >&6; }
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86vmode libs" >&5
+$as_echo_n "checking for xf86vmode libs... " >&6; }
+ d=$with_xf86vmode/lib
+ if test -d $d; then
+ X_LIBS="-L$d $X_LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
+$as_echo "$d" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
+$as_echo "not found ($d: no such directory)" >&6; }
+ fi
+
+ # replace the directory string with "yes".
+ with_xf86vmode_req="yes"
+ with_xf86vmode=$with_xf86vmode_req
+ ;;
+
+ *)
+ echo ""
+ echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
+ echo " If it is a directory, then \`DIR/include' will be added to"
+ echo " the -I list, and \`DIR/lib' will be added to the -L list."
+ exit 1
+ ;;
+ esac
+
+
+VIDMODE_LIBS=""
+
+if test "$with_xf86vmode" = yes; then
+
+ # first check for xf86vmode.h
+
+ 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`
+ ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xf86vmode.h" "ac_cv_header_X11_extensions_xf86vmode_h" "#include <X11/Xlib.h>
+"
+if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = xyes; then :
+ have_xf86vmode=yes
+fi
+
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+
+ # if that succeeded, then check for the -lXxf86vm
+ if test "$have_xf86vmode" = yes; then
+ have_xf86vmode=no
+
+ 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`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
+$as_echo_n "checking for XF86VidModeGetViewPort in -lXxf86vm... " >&6; }
+if ${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXxf86vm -lXext -lX11 $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 XF86VidModeGetViewPort ();
+int
+main ()
+{
+return XF86VidModeGetViewPort ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
+else
+ ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
+$as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
+if test "x$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" = xyes; then :
+ have_xf86vmode=yes;
+ VIDMODE_LIBS="-lXxf86vm";
+ SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
+else
+ true
+fi
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LDFLAGS="$ac_save_LDFLAGS"
+# LIBS="$ac_save_LIBS"
+
+ fi
+
+ # if that succeeded, then we've really got it.
+ if test "$have_xf86vmode" = yes; then
+ $as_echo "#define HAVE_XF86VMODE 1" >>confdefs.h
+
+ fi
+
+elif test "$with_xf86vmode" != no; then
+ echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
+ exit 1
+fi
+
+
+###############################################################################
+#
# Check for the XINERAMA server extension.
#
###############################################################################
@@ -9091,7 +8692,7 @@ if ${ac_cv_lib_Xss_XScreenSaverQueryInfo+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXss -lXss -lX11 $LIBS"
+LIBS="-lXss -lXss -lXext -lX11 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9307,30 +8908,34 @@ fi
###############################################################################
#
-# Check for the XINPUT server extension.
+# Check for the RANDR (Resize and Rotate) server extension.
+#
+# We need this to detect when the resolution of the desktop
+# has changed out from under us (this is a newer, different
+# mechanism than the XF86VMODE virtual viewports.)
#
###############################################################################
-have_xinput=no
-with_xinput_req=unspecified
+have_randr=no
+with_randr_req=unspecified
-# Check whether --with-xinput-ext was given.
-if test "${with_xinput_ext+set}" = set; then :
- withval=$with_xinput_ext; with_xinput="$withval"; with_xinput_req="$withval"
+# Check whether --with-randr-ext was given.
+if test "${with_randr_ext+set}" = set; then :
+ withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
else
- with_xinput=yes
+ with_randr=yes
fi
- case "$with_xinput" in
+ case "$with_randr" in
yes) ;;
no) ;;
/*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT headers" >&5
-$as_echo_n "checking for XINPUT headers... " >&6; }
- d=$with_xinput/include
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RANDR headers" >&5
+$as_echo_n "checking for RANDR headers... " >&6; }
+ d=$with_randr/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
@@ -9340,9 +8945,9 @@ $as_echo "$d" >&6; }
$as_echo "not found ($d: no such directory)" >&6; }
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT libs" >&5
-$as_echo_n "checking for XINPUT libs... " >&6; }
- d=$with_xinput/lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RANDR libs" >&5
+$as_echo_n "checking for RANDR libs... " >&6; }
+ d=$with_randr/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
@@ -9353,13 +8958,13 @@ $as_echo "not found ($d: no such directory)" >&6; }
fi
# replace the directory string with "yes".
- with_xinput_req="yes"
- with_xinput=$with_xinput_req
+ with_randr_req="yes"
+ with_randr=$with_randr_req
;;
*)
echo ""
- echo "error: argument to --with-xinput-ext must be \"yes\", \"no\", or a directory."
+ echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
echo " If it is a directory, then \`DIR/include' will be added to"
echo " the -I list, and \`DIR/lib' will be added to the -L list."
exit 1
@@ -9367,9 +8972,9 @@ $as_echo "not found ($d: no such directory)" >&6; }
esac
-if test "$with_xinput" = yes; then
+if test "$with_randr" = yes; then
- # first check for Xinput.h
+ # first check for Xrandr.h
ac_save_CPPFLAGS="$CPPFLAGS"
if test \! -z "$includedir" ; then
@@ -9377,18 +8982,20 @@ if test "$with_xinput" = yes; then
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
- ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XInput.h" "ac_cv_header_X11_extensions_XInput_h" "#include <X11/Xlib.h>
+ ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "#include <X11/Xlib.h>
"
-if test "x$ac_cv_header_X11_extensions_XInput_h" = xyes; then :
- have_xinput=yes
+if test "x$ac_cv_header_X11_extensions_Xrandr_h" = xyes; then :
+ have_randr=yes
fi
CPPFLAGS="$ac_save_CPPFLAGS"
- # if that succeeded, then check for libXi
- if test "$have_xinput" = yes; then
- have_xinput=no
+ # if that succeeded, then check for the XRR code in the libraries
+ if test "$have_randr" = yes; then
+
+ # RANDR probably needs -lXrender
+ xrender_libs=
ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_LDFLAGS="$LDFLAGS"
@@ -9408,13 +9015,13 @@ fi
CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XListInputDevices in -lXi" >&5
-$as_echo_n "checking for XListInputDevices in -lXi... " >&6; }
-if ${ac_cv_lib_Xi_XListInputDevices+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderSetSubpixelOrder in -lXrender" >&5
+$as_echo_n "checking for XRenderSetSubpixelOrder in -lXrender... " >&6; }
+if ${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXi -lXext -lX11 $LIBS"
+LIBS="-lXrender -lXext -lX11 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9424,28 +9031,96 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char XListInputDevices ();
+char XRenderSetSubpixelOrder ();
int
main ()
{
-return XListInputDevices ();
+return XRenderSetSubpixelOrder ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_Xi_XListInputDevices=yes
+ ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
else
- ac_cv_lib_Xi_XListInputDevices=no
+ ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xi_XListInputDevices" >&5
-$as_echo "$ac_cv_lib_Xi_XListInputDevices" >&6; }
-if test "x$ac_cv_lib_Xi_XListInputDevices" = xyes; then :
- have_xinput=yes; SAVER_LIBS="$SAVER_LIBS -lXi"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
+$as_echo "$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
+if test "x$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" = xyes; then :
+ xrender_libs="-lXrender"
+else
+ true
+fi
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LDFLAGS="$ac_save_LDFLAGS"
+# LIBS="$ac_save_LIBS"
+
+
+ # first look for RANDR in -lXext
+ have_randr=no
+
+ 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`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXext" >&5
+$as_echo_n "checking for XRRGetScreenInfo in -lXext... " >&6; }
+if ${ac_cv_lib_Xext_XRRGetScreenInfo+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 XRRGetScreenInfo ();
+int
+main ()
+{
+return XRRGetScreenInfo ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_Xext_XRRGetScreenInfo=yes
+else
+ ac_cv_lib_Xext_XRRGetScreenInfo=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
+$as_echo "$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
+if test "x$ac_cv_lib_Xext_XRRGetScreenInfo" = xyes; then :
+ have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
else
true
fi
@@ -9454,46 +9129,244 @@ fi
LDFLAGS="$ac_save_LDFLAGS"
# LIBS="$ac_save_LIBS"
+
+ # if that failed, look in -lXrandr
+ if test "$have_randr" = no; 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`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXrandr" >&5
+$as_echo_n "checking for XRRGetScreenInfo in -lXrandr... " >&6; }
+if ${ac_cv_lib_Xrandr_XRRGetScreenInfo+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 XRRGetScreenInfo ();
+int
+main ()
+{
+return XRRGetScreenInfo ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
+else
+ ac_cv_lib_Xrandr_XRRGetScreenInfo=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
+$as_echo "$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
+if test "x$ac_cv_lib_Xrandr_XRRGetScreenInfo" = xyes; then :
+ have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
+else
+ true
+fi
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LDFLAGS="$ac_save_LDFLAGS"
+# LIBS="$ac_save_LIBS"
+
+ fi
fi
# if that succeeded, then we've really got it.
- if test "$have_xinput" = yes; then
- $as_echo "#define HAVE_XINPUT 1" >>confdefs.h
+ if test "$have_randr" = yes; then
+ $as_echo "#define HAVE_RANDR 1" >>confdefs.h
+
+
+ # Now check for version 1.2 in the same libs.
+ # Try to compile, since on MacOS 10.5.7, headers are older than libs!
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources" >&5
+$as_echo_n "checking for XRRGetScreenResources... " >&6; }
+if ${ac_cv_randr_12+:} false; then :
+ $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_randr_12=yes
+else
+ ac_cv_randr_12=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_randr_12" >&5
+$as_echo "$ac_cv_randr_12" >&6; }
+ if test "$ac_cv_randr_12" = yes ; then
+ $as_echo "#define HAVE_RANDR_12 1" >>confdefs.h
+ fi
+# AC_CHECK_X_LIB(c, XRRGetOutputInfo, [AC_DEFINE(HAVE_RANDR_12)],
+# [true], $SAVER_LIBS)
fi
-elif test "$with_xinput" != no; then
- echo "error: must be yes or no: --with-xinput-ext=$with_xinput"
+
+elif test "$with_randr" != no; then
+ echo "error: must be yes or no: --with-randr-ext=$with_randr"
exit 1
fi
###############################################################################
#
-# Check for the XF86VMODE server extension (for virtual screens.)
+# Check for XF86MiscSetGrabKeysState (but only bother if we are already
+# using other XF86 stuff.)
#
###############################################################################
-have_xf86vmode=no
-with_xf86vmode_req=unspecified
+have_xf86miscsetgrabkeysstate=no
+if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
-# Check whether --with-xf86vmode-ext was given.
-if test "${with_xf86vmode_ext+set}" = set; then :
- withval=$with_xf86vmode_ext; with_xf86vmode="$withval"; with_xf86vmode_req="$withval"
+ 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`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
+$as_echo_n "checking for XF86MiscSetGrabKeysState in -lXxf86misc... " >&6; }
+if ${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- with_xf86vmode=yes
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXxf86misc -lXext -lX11 $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 XF86MiscSetGrabKeysState ();
+int
+main ()
+{
+return XF86MiscSetGrabKeysState ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
+else
+ ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
+$as_echo "$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
+if test "x$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" = xyes; then :
+ have_xf86miscsetgrabkeysstate=yes
+else
+ true
+fi
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LDFLAGS="$ac_save_LDFLAGS"
+# LIBS="$ac_save_LIBS"
+
+ if test "$have_xf86miscsetgrabkeysstate" = yes ; then
+ SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
+ $as_echo "#define HAVE_XF86MISCSETGRABKEYSSTATE 1" >>confdefs.h
+ fi
+fi
- case "$with_xf86vmode" in
+###############################################################################
+#
+# Check for the XINPUT server extension.
+#
+###############################################################################
+
+have_xinput=no
+with_xinput_req=unspecified
+
+# Check whether --with-xinput-ext was given.
+if test "${with_xinput_ext+set}" = set; then :
+ withval=$with_xinput_ext; with_xinput="$withval"; with_xinput_req="$withval"
+else
+ with_xinput=yes
+fi
+
+
+
+ case "$with_xinput" in
yes) ;;
no) ;;
/*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86vmode headers" >&5
-$as_echo_n "checking for xf86vmode headers... " >&6; }
- d=$with_xf86vmode/include
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT headers" >&5
+$as_echo_n "checking for XINPUT headers... " >&6; }
+ d=$with_xinput/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
@@ -9503,9 +9376,9 @@ $as_echo "$d" >&6; }
$as_echo "not found ($d: no such directory)" >&6; }
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86vmode libs" >&5
-$as_echo_n "checking for xf86vmode libs... " >&6; }
- d=$with_xf86vmode/lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XINPUT libs" >&5
+$as_echo_n "checking for XINPUT libs... " >&6; }
+ d=$with_xinput/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
@@ -9516,13 +9389,13 @@ $as_echo "not found ($d: no such directory)" >&6; }
fi
# replace the directory string with "yes".
- with_xf86vmode_req="yes"
- with_xf86vmode=$with_xf86vmode_req
+ with_xinput_req="yes"
+ with_xinput=$with_xinput_req
;;
*)
echo ""
- echo "error: argument to --with-xf86vmode-ext must be \"yes\", \"no\", or a directory."
+ echo "error: argument to --with-xinput-ext must be \"yes\", \"no\", or a directory."
echo " If it is a directory, then \`DIR/include' will be added to"
echo " the -I list, and \`DIR/lib' will be added to the -L list."
exit 1
@@ -9530,11 +9403,9 @@ $as_echo "not found ($d: no such directory)" >&6; }
esac
-VIDMODE_LIBS=""
-
-if test "$with_xf86vmode" = yes; then
+if test "$with_xinput" = yes; then
- # first check for xf86vmode.h
+ # first check for Xinput.h
ac_save_CPPFLAGS="$CPPFLAGS"
if test \! -z "$includedir" ; then
@@ -9542,18 +9413,18 @@ if test "$with_xf86vmode" = yes; then
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
- ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xf86vmode.h" "ac_cv_header_X11_extensions_xf86vmode_h" "#include <X11/Xlib.h>
+ ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XInput.h" "ac_cv_header_X11_extensions_XInput_h" "#include <X11/Xlib.h>
"
-if test "x$ac_cv_header_X11_extensions_xf86vmode_h" = xyes; then :
- have_xf86vmode=yes
+if test "x$ac_cv_header_X11_extensions_XInput_h" = xyes; then :
+ have_xinput=yes
fi
CPPFLAGS="$ac_save_CPPFLAGS"
- # if that succeeded, then check for the -lXxf86vm
- if test "$have_xf86vmode" = yes; then
- have_xf86vmode=no
+ # if that succeeded, then check for libXi
+ if test "$have_xinput" = yes; then
+ have_xinput=no
ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_LDFLAGS="$LDFLAGS"
@@ -9573,13 +9444,13 @@ fi
CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
-$as_echo_n "checking for XF86VidModeGetViewPort in -lXxf86vm... " >&6; }
-if ${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XListInputDevices in -lXi" >&5
+$as_echo_n "checking for XListInputDevices in -lXi... " >&6; }
+if ${ac_cv_lib_Xi_XListInputDevices+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXxf86vm -lXext -lX11 $LIBS"
+LIBS="-lXi -lXext -lX11 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -9589,30 +9460,28 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char XF86VidModeGetViewPort ();
+char XListInputDevices ();
int
main ()
{
-return XF86VidModeGetViewPort ();
+return XListInputDevices ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes
+ ac_cv_lib_Xi_XListInputDevices=yes
else
- ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no
+ ac_cv_lib_Xi_XListInputDevices=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5
-$as_echo "$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6; }
-if test "x$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" = xyes; then :
- have_xf86vmode=yes;
- VIDMODE_LIBS="-lXxf86vm";
- SAVER_LIBS="$SAVER_LIBS $VIDMODE_LIBS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xi_XListInputDevices" >&5
+$as_echo "$ac_cv_lib_Xi_XListInputDevices" >&6; }
+if test "x$ac_cv_lib_Xi_XListInputDevices" = xyes; then :
+ have_xinput=yes; SAVER_LIBS="$SAVER_LIBS -lXi"
else
true
fi
@@ -9624,13 +9493,13 @@ fi
fi
# if that succeeded, then we've really got it.
- if test "$have_xf86vmode" = yes; then
- $as_echo "#define HAVE_XF86VMODE 1" >>confdefs.h
+ if test "$have_xinput" = yes; then
+ $as_echo "#define HAVE_XINPUT 1" >>confdefs.h
fi
-elif test "$with_xf86vmode" != no; then
- echo "error: must be yes or no: --with-xf86vmode-ext=$with_xf86vmode"
+elif test "$with_xinput" != no; then
+ echo "error: must be yes or no: --with-xinput-ext=$with_xinput"
exit 1
fi
@@ -9885,34 +9754,30 @@ fi
###############################################################################
#
-# Check for the RANDR (Resize and Rotate) server extension.
-#
-# We need this to detect when the resolution of the desktop
-# has changed out from under us (this is a newer, different
-# mechanism than the XF86VMODE virtual viewports.)
+# Check for the XIDLE server extension.
#
###############################################################################
-have_randr=no
-with_randr_req=unspecified
+have_xidle=no
+with_xidle_req=unspecified
-# Check whether --with-randr-ext was given.
-if test "${with_randr_ext+set}" = set; then :
- withval=$with_randr_ext; with_randr="$withval"; with_randr_req="$withval"
+# Check whether --with-xidle-ext was given.
+if test "${with_xidle_ext+set}" = set; then :
+ withval=$with_xidle_ext; with_xidle="$withval"; with_xidle_req="$withval"
else
- with_randr=yes
+ with_xidle=yes
fi
- case "$with_randr" in
+ case "$with_xidle" in
yes) ;;
no) ;;
/*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RANDR headers" >&5
-$as_echo_n "checking for RANDR headers... " >&6; }
- d=$with_randr/include
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XIDLE headers" >&5
+$as_echo_n "checking for XIDLE headers... " >&6; }
+ d=$with_xidle/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
@@ -9922,9 +9787,9 @@ $as_echo "$d" >&6; }
$as_echo "not found ($d: no such directory)" >&6; }
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RANDR libs" >&5
-$as_echo_n "checking for RANDR libs... " >&6; }
- d=$with_randr/lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XIDLE libs" >&5
+$as_echo_n "checking for XIDLE libs... " >&6; }
+ d=$with_xidle/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
@@ -9935,13 +9800,13 @@ $as_echo "not found ($d: no such directory)" >&6; }
fi
# replace the directory string with "yes".
- with_randr_req="yes"
- with_randr=$with_randr_req
+ with_xidle_req="yes"
+ with_xidle=$with_xidle_req
;;
*)
echo ""
- echo "error: argument to --with-randr-ext must be \"yes\", \"no\", or a directory."
+ echo "error: argument to --with-xidle-ext must be \"yes\", \"no\", or a directory."
echo " If it is a directory, then \`DIR/include' will be added to"
echo " the -I list, and \`DIR/lib' will be added to the -L list."
exit 1
@@ -9949,9 +9814,7 @@ $as_echo "not found ($d: no such directory)" >&6; }
esac
-if test "$with_randr" = yes; then
-
- # first check for Xrandr.h
+if test "$with_xidle" = yes; then
ac_save_CPPFLAGS="$CPPFLAGS"
if test \! -z "$includedir" ; then
@@ -9959,20 +9822,57 @@ if test "$with_randr" = yes; then
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
- ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xrandr.h" "ac_cv_header_X11_extensions_Xrandr_h" "#include <X11/Xlib.h>
+ ac_fn_c_check_header_compile "$LINENO" "X11/extensions/xidle.h" "ac_cv_header_X11_extensions_xidle_h" "#include <X11/Xlib.h>
"
-if test "x$ac_cv_header_X11_extensions_Xrandr_h" = xyes; then :
- have_randr=yes
+if test "x$ac_cv_header_X11_extensions_xidle_h" = xyes; then :
+ have_xidle=yes
+ $as_echo "#define HAVE_XIDLE_EXTENSION 1" >>confdefs.h
+
fi
CPPFLAGS="$ac_save_CPPFLAGS"
+elif test "$with_xidle" != no; then
+ echo "error: must be yes or no: --with-xidle-ext=$with_xidle"
+ exit 1
+fi
- # if that succeeded, then check for the XRR code in the libraries
- if test "$have_randr" = yes; then
- # RANDR probably needs -lXrender
- xrender_libs=
+###############################################################################
+#
+# Check for the MIT-SCREEN-SAVER server extension.
+#
+###############################################################################
+
+have_mit=no
+with_mit=no
+with_mit_req=unspecified
+#AC_ARG_WITH(mit-ext,
+#[ --with-mit-ext Include support for the MIT-SCREEN-SAVER extension.],
+# [with_mit="$withval"; with_mit_req="$withval"],[with_mit=no])
+#HANDLE_X_PATH_ARG(with_mit, --with-mit-ext, MIT-SCREEN-SAVER)
+
+if test "$with_mit" = yes; then
+
+ 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`
+ ac_fn_c_check_header_compile "$LINENO" "X11/extensions/scrnsaver.h" "ac_cv_header_X11_extensions_scrnsaver_h" "#include <X11/Xlib.h>
+"
+if test "x$ac_cv_header_X11_extensions_scrnsaver_h" = xyes; then :
+ have_mit=yes
+fi
+
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+
+ # Now check to see if it's really in the library; XF86Free-3.3 ships
+ # scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
+ #
+ if test "$have_mit" = yes; then
ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_LDFLAGS="$LDFLAGS"
@@ -9992,13 +9892,13 @@ fi
CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderSetSubpixelOrder in -lXrender" >&5
-$as_echo_n "checking for XRenderSetSubpixelOrder in -lXrender... " >&6; }
-if ${ac_cv_lib_Xrender_XRenderSetSubpixelOrder+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XScreenSaverRegister in -lXext" >&5
+$as_echo_n "checking for XScreenSaverRegister in -lXext... " >&6; }
+if ${ac_cv_lib_Xext_XScreenSaverRegister+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXrender -lXext -lX11 $LIBS"
+LIBS="-lXext -lm $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10008,30 +9908,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char XRenderSetSubpixelOrder ();
+char XScreenSaverRegister ();
int
main ()
{
-return XRenderSetSubpixelOrder ();
+return XScreenSaverRegister ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_Xrender_XRenderSetSubpixelOrder=yes
+ ac_cv_lib_Xext_XScreenSaverRegister=yes
else
- ac_cv_lib_Xrender_XRenderSetSubpixelOrder=no
+ ac_cv_lib_Xext_XScreenSaverRegister=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&5
-$as_echo "$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" >&6; }
-if test "x$ac_cv_lib_Xrender_XRenderSetSubpixelOrder" = xyes; then :
- xrender_libs="-lXrender"
-else
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XScreenSaverRegister" >&5
+$as_echo "$ac_cv_lib_Xext_XScreenSaverRegister" >&6; }
+if test "x$ac_cv_lib_Xext_XScreenSaverRegister" = xyes; then :
true
+else
+ have_mit=no
fi
CPPFLAGS="$ac_save_CPPFLAGS"
@@ -10039,8 +9939,9 @@ fi
# LIBS="$ac_save_LIBS"
- # first look for RANDR in -lXext
- have_randr=no
+ if test "$have_mit" = no; then
+ # Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead
+ # of in Xext. Thank you master, may I have another.
ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_LDFLAGS="$LDFLAGS"
@@ -10060,13 +9961,13 @@ fi
CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXext" >&5
-$as_echo_n "checking for XRRGetScreenInfo in -lXext... " >&6; }
-if ${ac_cv_lib_Xext_XRRGetScreenInfo+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XScreenSaverRegister in -lXExExt" >&5
+$as_echo_n "checking for XScreenSaverRegister in -lXExExt... " >&6; }
+if ${ac_cv_lib_XExExt_XScreenSaverRegister+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXext $xrender_libs -lXext -lX11 $LIBS"
+LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10076,28 +9977,28 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char XRRGetScreenInfo ();
+char XScreenSaverRegister ();
int
main ()
{
-return XRRGetScreenInfo ();
+return XScreenSaverRegister ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_Xext_XRRGetScreenInfo=yes
+ ac_cv_lib_XExExt_XScreenSaverRegister=yes
else
- ac_cv_lib_Xext_XRRGetScreenInfo=no
+ ac_cv_lib_XExExt_XScreenSaverRegister=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XRRGetScreenInfo" >&5
-$as_echo "$ac_cv_lib_Xext_XRRGetScreenInfo" >&6; }
-if test "x$ac_cv_lib_Xext_XRRGetScreenInfo" = xyes; then :
- have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_XExExt_XScreenSaverRegister" >&5
+$as_echo "$ac_cv_lib_XExExt_XScreenSaverRegister" >&6; }
+if test "x$ac_cv_lib_XExExt_XScreenSaverRegister" = xyes; then :
+ have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"
else
true
fi
@@ -10106,9 +10007,13 @@ fi
LDFLAGS="$ac_save_LDFLAGS"
# LIBS="$ac_save_LIBS"
+ fi
- # if that failed, look in -lXrandr
- if test "$have_randr" = no; then
+ if test "$have_mit" = no; then
+ # Double fuck! Looks like some versions of XFree86 (whichever version
+ # it is that comes with RedHat Linux 2.0 -- I can't find a version
+ # number) put this garbage in Xss instead of Xext. Thank you master,
+ # may I have another.
ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_LDFLAGS="$LDFLAGS"
@@ -10128,13 +10033,13 @@ fi
CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenInfo in -lXrandr" >&5
-$as_echo_n "checking for XRRGetScreenInfo in -lXrandr... " >&6; }
-if ${ac_cv_lib_Xrandr_XRRGetScreenInfo+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XScreenSaverRegister in -lXss" >&5
+$as_echo_n "checking for XScreenSaverRegister in -lXss... " >&6; }
+if ${ac_cv_lib_Xss_XScreenSaverRegister+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXrandr $xrender_libs -lXext -lX11 $LIBS"
+LIBS="-lXss -lX11 -lXext -lm $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10144,28 +10049,28 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char XRRGetScreenInfo ();
+char XScreenSaverRegister ();
int
main ()
{
-return XRRGetScreenInfo ();
+return XScreenSaverRegister ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_Xrandr_XRRGetScreenInfo=yes
+ ac_cv_lib_Xss_XScreenSaverRegister=yes
else
- ac_cv_lib_Xrandr_XRRGetScreenInfo=no
+ ac_cv_lib_Xss_XScreenSaverRegister=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrandr_XRRGetScreenInfo" >&5
-$as_echo "$ac_cv_lib_Xrandr_XRRGetScreenInfo" >&6; }
-if test "x$ac_cv_lib_Xrandr_XRRGetScreenInfo" = xyes; then :
- have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xss_XScreenSaverRegister" >&5
+$as_echo "$ac_cv_lib_Xss_XScreenSaverRegister" >&6; }
+if test "x$ac_cv_lib_Xss_XScreenSaverRegister" = xyes; then :
+ have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"
else
true
fi
@@ -10175,21 +10080,84 @@ fi
# LIBS="$ac_save_LIBS"
fi
+
+ if test "$have_mit" = yes; then
+# AC_DEFINE(HAVE_MIT_SAVER_EXTENSION)
+ echo "Using the MIT-SCREEN-SAVER extension will crash your server. Don't."
+ exit 1
+ fi
+
fi
- # if that succeeded, then we've really got it.
- if test "$have_randr" = yes; then
- $as_echo "#define HAVE_RANDR 1" >>confdefs.h
+elif test "$with_mit" != no; then
+ echo "error: must be yes or no: --with-mit-ext=$with_mit"
+ exit 1
+fi
- # Now check for version 1.2 in the same libs.
- # Try to compile, since on MacOS 10.5.7, headers are older than libs!
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRRGetScreenResources" >&5
-$as_echo_n "checking for XRRGetScreenResources... " >&6; }
-if ${ac_cv_randr_12+:} false; then :
- $as_echo_n "(cached) " >&6
+###############################################################################
+#
+# Check for the SGI SCREEN_SAVER server extension.
+#
+###############################################################################
+
+have_sgi=no
+with_sgi_req=unspecified
+
+# Check whether --with-sgi-ext was given.
+if test "${with_sgi_ext+set}" = set; then :
+ withval=$with_sgi_ext; with_sgi="$withval"; with_sgi_req="$withval"
else
- ac_cv_randr_12=no
+ with_sgi=$ac_irix
+fi
+
+
+
+ case "$with_sgi" in
+ yes) ;;
+ no) ;;
+
+ /*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SGI SCREEN_SAVER headers" >&5
+$as_echo_n "checking for SGI SCREEN_SAVER headers... " >&6; }
+ d=$with_sgi/include
+ if test -d $d; then
+ X_CFLAGS="-I$d $X_CFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
+$as_echo "$d" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
+$as_echo "not found ($d: no such directory)" >&6; }
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SGI SCREEN_SAVER libs" >&5
+$as_echo_n "checking for SGI SCREEN_SAVER libs... " >&6; }
+ d=$with_sgi/lib
+ if test -d $d; then
+ X_LIBS="-L$d $X_LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
+$as_echo "$d" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
+$as_echo "not found ($d: no such directory)" >&6; }
+ fi
+
+ # replace the directory string with "yes".
+ with_sgi_req="yes"
+ with_sgi=$with_sgi_req
+ ;;
+
+ *)
+ echo ""
+ echo "error: argument to --with-sgi-ext must be \"yes\", \"no\", or a directory."
+ echo " If it is a directory, then \`DIR/include' will be added to"
+ echo " the -I list, and \`DIR/lib' will be added to the -L list."
+ exit 1
+ ;;
+ esac
+
+
+if test "$with_sgi" = yes; then
ac_save_CPPFLAGS="$CPPFLAGS"
if test \! -z "$includedir" ; then
@@ -10197,54 +10165,400 @@ else
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XScreenSaver.h" "ac_cv_header_X11_extensions_XScreenSaver_h" "#include <X11/Xlib.h>
+"
+if test "x$ac_cv_header_X11_extensions_XScreenSaver_h" = xyes; then :
+ have_sgi=yes
+ $as_echo "#define HAVE_SGI_SAVER_EXTENSION 1" >>confdefs.h
+
+fi
+
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+
+elif test "$with_sgi" != no; then
+ echo "error: must be yes or no: --with-sgi-ext=$with_sgi"
+ exit 1
+fi
+
+
+###############################################################################
+#
+# Check for the SGI-VIDEO-CONTROL server extension.
+#
+###############################################################################
+
+have_sgivc=no
+with_sgivc_req=unspecified
+
+# Check whether --with-sgivc-ext was given.
+if test "${with_sgivc_ext+set}" = set; then :
+ withval=$with_sgivc_ext; with_sgivc="$withval"; with_sgivc_req="$withval"
+else
+ with_sgivc=$ac_irix
+fi
+
+
+
+ case "$with_sgivc" in
+ yes) ;;
+ no) ;;
+
+ /*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SGI-VIDEO-CONTROL headers" >&5
+$as_echo_n "checking for SGI-VIDEO-CONTROL headers... " >&6; }
+ d=$with_sgivc/include
+ if test -d $d; then
+ X_CFLAGS="-I$d $X_CFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
+$as_echo "$d" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
+$as_echo "not found ($d: no such directory)" >&6; }
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SGI-VIDEO-CONTROL libs" >&5
+$as_echo_n "checking for SGI-VIDEO-CONTROL libs... " >&6; }
+ d=$with_sgivc/lib
+ if test -d $d; then
+ X_LIBS="-L$d $X_LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
+$as_echo "$d" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
+$as_echo "not found ($d: no such directory)" >&6; }
+ fi
+
+ # replace the directory string with "yes".
+ with_sgivc_req="yes"
+ with_sgivc=$with_sgivc_req
+ ;;
+
+ *)
+ echo ""
+ echo "error: argument to --with-sgivc-ext must be \"yes\", \"no\", or a directory."
+ echo " If it is a directory, then \`DIR/include' will be added to"
+ echo " the -I list, and \`DIR/lib' will be added to the -L list."
+ exit 1
+ ;;
+ esac
+
+
+if test "$with_sgivc" = yes; then
+
+ # first check for XSGIvc.h
+
+ 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`
+ ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XSGIvc.h" "ac_cv_header_X11_extensions_XSGIvc_h" "#include <X11/Xlib.h>
+"
+if test "x$ac_cv_header_X11_extensions_XSGIvc_h" = xyes; then :
+ have_sgivc=yes
+fi
+
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+
+ # if that succeeded, then check for the -lXsgivc
+ if test "$have_sgivc" = yes; then
+ have_sgivc=no
+
+ 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`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
+$as_echo_n "checking for XSGIvcQueryGammaMap in -lXsgivc... " >&6; }
+if ${ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXsgivc -lXext -lX11 $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdlib.h>
- #include <X11/Xlib.h>
- #include <X11/extensions/Xrandr.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 XSGIvcQueryGammaMap ();
int
main ()
{
-XRRScreenResources *res =
- XRRGetScreenResources (0, 0);
+return XSGIvcQueryGammaMap ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_randr_12=yes
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=yes
else
- ac_cv_randr_12=no
+ ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&5
+$as_echo "$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" >&6; }
+if test "x$ac_cv_lib_Xsgivc_XSGIvcQueryGammaMap" = xyes; then :
+ have_sgivc=yes; SAVER_LIBS="$SAVER_LIBS -lXsgivc"
+else
+ true
+fi
+
CPPFLAGS="$ac_save_CPPFLAGS"
+ LDFLAGS="$ac_save_LDFLAGS"
+# LIBS="$ac_save_LIBS"
+
+ fi
+
+ # if that succeeded, then we've really got it.
+ if test "$have_sgivc" = yes; then
+ $as_echo "#define HAVE_SGI_VC_EXTENSION 1" >>confdefs.h
+
+ fi
+
+elif test "$with_sgivc" != no; then
+ echo "error: must be yes or no: --with-sgivc-ext=$with_sgivc"
+ exit 1
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_randr_12" >&5
-$as_echo "$ac_cv_randr_12" >&6; }
- if test "$ac_cv_randr_12" = yes ; then
- $as_echo "#define HAVE_RANDR_12 1" >>confdefs.h
- fi
-# AC_CHECK_X_LIB(c, XRRGetOutputInfo, [AC_DEFINE(HAVE_RANDR_12)],
-# [true], $SAVER_LIBS)
+
+###############################################################################
+#
+# Check for the SGI XReadDisplay server extension.
+#
+###############################################################################
+
+have_readdisplay=no
+with_readdisplay_req=unspecified
+
+# Check whether --with-readdisplay was given.
+if test "${with_readdisplay+set}" = set; then :
+ withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
+else
+ with_readdisplay=$ac_irix
+fi
+
+
+
+ case "$with_readdisplay" in
+ yes) ;;
+ no) ;;
+
+ /*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XReadDisplay headers" >&5
+$as_echo_n "checking for XReadDisplay headers... " >&6; }
+ d=$with_readdisplay/include
+ if test -d $d; then
+ X_CFLAGS="-I$d $X_CFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
+$as_echo "$d" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
+$as_echo "not found ($d: no such directory)" >&6; }
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XReadDisplay libs" >&5
+$as_echo_n "checking for XReadDisplay libs... " >&6; }
+ d=$with_readdisplay/lib
+ if test -d $d; then
+ X_LIBS="-L$d $X_LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
+$as_echo "$d" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
+$as_echo "not found ($d: no such directory)" >&6; }
+ fi
+
+ # replace the directory string with "yes".
+ with_readdisplay_req="yes"
+ with_readdisplay=$with_readdisplay_req
+ ;;
+
+ *)
+ echo ""
+ echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
+ echo " If it is a directory, then \`DIR/include' will be added to"
+ echo " the -I list, and \`DIR/lib' will be added to the -L list."
+ exit 1
+ ;;
+ esac
+
+
+if test "$with_readdisplay" = yes; then
+
+ 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`
+ ac_fn_c_check_header_compile "$LINENO" "X11/extensions/readdisplay.h" "ac_cv_header_X11_extensions_readdisplay_h" "#include <X11/Xlib.h>
+"
+if test "x$ac_cv_header_X11_extensions_readdisplay_h" = xyes; then :
+ $as_echo "#define HAVE_READ_DISPLAY_EXTENSION 1" >>confdefs.h
+fi
-elif test "$with_randr" != no; then
- echo "error: must be yes or no: --with-randr-ext=$with_randr"
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+elif test "$with_readdisplay" != no; then
+ echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
exit 1
fi
###############################################################################
#
-# Check for XF86MiscSetGrabKeysState (but only bother if we are already
-# using other XF86 stuff.)
+# Check for the XSHM server extension.
#
###############################################################################
-have_xf86miscsetgrabkeysstate=no
-if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
+have_xshm=no
+with_xshm_req=unspecified
+
+# Check whether --with-xshm-ext was given.
+if test "${with_xshm_ext+set}" = set; then :
+ withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
+else
+ with_xshm=yes
+fi
+
+
+
+ case "$with_xshm" in
+ yes) ;;
+ no) ;;
+
+ /*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHM headers" >&5
+$as_echo_n "checking for XSHM headers... " >&6; }
+ d=$with_xshm/include
+ if test -d $d; then
+ X_CFLAGS="-I$d $X_CFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
+$as_echo "$d" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
+$as_echo "not found ($d: no such directory)" >&6; }
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHM libs" >&5
+$as_echo_n "checking for XSHM libs... " >&6; }
+ d=$with_xshm/lib
+ if test -d $d; then
+ X_LIBS="-L$d $X_LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
+$as_echo "$d" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
+$as_echo "not found ($d: no such directory)" >&6; }
+ fi
+
+ # replace the directory string with "yes".
+ with_xshm_req="yes"
+ with_xshm=$with_xshm_req
+ ;;
+
+ *)
+ echo ""
+ echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
+ echo " If it is a directory, then \`DIR/include' will be added to"
+ echo " the -I list, and \`DIR/lib' will be added to the -L list."
+ exit 1
+ ;;
+ esac
+
+
+if test "$with_xshm" = yes; then
+
+ # first check for Xshm.h.
+
+ 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`
+ ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XShm.h" "ac_cv_header_X11_extensions_XShm_h" "#include <X11/Xlib.h>
+"
+if test "x$ac_cv_header_X11_extensions_XShm_h" = xyes; then :
+ have_xshm=yes
+fi
+
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+
+ # if that succeeded, then check for sys/ipc.h.
+ if test "$have_xshm" = yes; then
+ have_xshm=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`
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_ipc_h" = xyes; then :
+ have_xshm=yes
+fi
+
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ fi
+
+ # if that succeeded, then check for sys/shm.h.
+ if test "$have_xshm" = yes; then
+ have_xshm=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`
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_shm_h" = xyes; then :
+ have_xshm=yes
+fi
+
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ 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. (This lib gets added to X_EXTRA_LIBS, and
+ # that's not quite right, but close enough.)
+ #
+ case "$host" in
+ *-aix*)
+ if `uname -v` -eq 3 ; then
+ have_xshm=no
ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_LDFLAGS="$LDFLAGS"
@@ -10264,13 +10578,13 @@ if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
-$as_echo_n "checking for XF86MiscSetGrabKeysState in -lXxf86misc... " >&6; }
-if ${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShmQueryExtension in -lXextSam" >&5
+$as_echo_n "checking for XShmQueryExtension in -lXextSam... " >&6; }
+if ${ac_cv_lib_XextSam_XShmQueryExtension+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXxf86misc -lXext -lX11 $LIBS"
+LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10280,28 +10594,28 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char XF86MiscSetGrabKeysState ();
+char XShmQueryExtension ();
int
main ()
{
-return XF86MiscSetGrabKeysState ();
+return XShmQueryExtension ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
+ ac_cv_lib_XextSam_XShmQueryExtension=yes
else
- ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
+ ac_cv_lib_XextSam_XShmQueryExtension=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
-$as_echo "$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6; }
-if test "x$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" = xyes; then :
- have_xf86miscsetgrabkeysstate=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
+$as_echo "$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
+if test "x$ac_cv_lib_XextSam_XShmQueryExtension" = xyes; then :
+ have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
else
true
fi
@@ -10310,11 +10624,109 @@ fi
LDFLAGS="$ac_save_LDFLAGS"
# LIBS="$ac_save_LIBS"
- if test "$have_xf86miscsetgrabkeysstate" = yes ; then
- SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
- $as_echo "#define HAVE_XF86MISCSETGRABKEYSSTATE 1" >>confdefs.h
+ fi
+ ;;
+ esac
+
+ # if that succeeded, then we've really got it.
+ if test "$have_xshm" = yes; then
+ $as_echo "#define HAVE_XSHM_EXTENSION 1" >>confdefs.h
fi
+
+elif test "$with_xshm" != no; then
+ echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
+ exit 1
+fi
+
+
+###############################################################################
+#
+# Check for the DOUBLE-BUFFER server extension.
+#
+###############################################################################
+
+have_xdbe=no
+with_xdbe_req=unspecified
+
+# Check whether --with-xdbe-ext was given.
+if test "${with_xdbe_ext+set}" = set; then :
+ withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
+else
+ with_xdbe=yes
+fi
+
+
+
+ case "$with_xdbe" in
+ yes) ;;
+ no) ;;
+
+ /*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOUBLE-BUFFER headers" >&5
+$as_echo_n "checking for DOUBLE-BUFFER headers... " >&6; }
+ d=$with_xdbe/include
+ if test -d $d; then
+ X_CFLAGS="-I$d $X_CFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
+$as_echo "$d" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
+$as_echo "not found ($d: no such directory)" >&6; }
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOUBLE-BUFFER libs" >&5
+$as_echo_n "checking for DOUBLE-BUFFER libs... " >&6; }
+ d=$with_xdbe/lib
+ if test -d $d; then
+ X_LIBS="-L$d $X_LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
+$as_echo "$d" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
+$as_echo "not found ($d: no such directory)" >&6; }
+ fi
+
+ # replace the directory string with "yes".
+ with_xdbe_req="yes"
+ with_xdbe=$with_xdbe_req
+ ;;
+
+ *)
+ echo ""
+ echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
+ echo " If it is a directory, then \`DIR/include' will be added to"
+ echo " the -I list, and \`DIR/lib' will be added to the -L list."
+ exit 1
+ ;;
+ esac
+
+
+if test "$with_xdbe" = yes; then
+
+
+ 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`
+ ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xdbe.h" "ac_cv_header_X11_extensions_Xdbe_h" "#include <X11/Xlib.h>
+"
+if test "x$ac_cv_header_X11_extensions_Xdbe_h" = xyes; then :
+ have_xdbe=yes
+fi
+
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ if test "$have_xdbe" = yes; then
+ $as_echo "#define HAVE_DOUBLE_BUFFER_EXTENSION 1" >>confdefs.h
+
+ fi
+
+elif test "$with_xdbe" != no; then
+ echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
+ exit 1
fi
@@ -10464,13 +10876,239 @@ fi
###############################################################################
#
+# Check for -lsystemd
+#
+###############################################################################
+
+have_systemd=no
+with_systemd_req=unspecified
+systemd_halfassed=no
+systemd_too_old=no
+
+# Check whether --with-systemd was given.
+if test "${with_systemd+set}" = set; then :
+ withval=$with_systemd; with_systemd="$withval"; with_systemd_req="$withval"
+else
+ with_systemd=yes
+fi
+
+
+
+ case "$with_systemd" in
+ yes) ;;
+ no) ;;
+
+ /*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for systemd headers" >&5
+$as_echo_n "checking for systemd headers... " >&6; }
+ d=$with_systemd/include
+ if test -d $d; then
+ X_CFLAGS="-I$d $X_CFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
+$as_echo "$d" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
+$as_echo "not found ($d: no such directory)" >&6; }
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for systemd libs" >&5
+$as_echo_n "checking for systemd libs... " >&6; }
+ d=$with_systemd/lib
+ if test -d $d; then
+ X_LIBS="-L$d $X_LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
+$as_echo "$d" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
+$as_echo "not found ($d: no such directory)" >&6; }
+ fi
+
+ # replace the directory string with "yes".
+ with_systemd_req="yes"
+ with_systemd=$with_systemd_req
+ ;;
+
+ *)
+ echo ""
+ echo "error: argument to --with-systemd must be \"yes\", \"no\", or a directory."
+ echo " If it is a directory, then \`DIR/include' will be added to"
+ echo " the -I list, and \`DIR/lib' will be added to the -L list."
+ exit 1
+ ;;
+ esac
+
+
+if test "$with_systemd" != yes -a "$with_systemd" != no ; then
+ echo "error: must be yes or no: --with-systemd=$with_systemd"
+ exit 1
+fi
+
+if test "$with_systemd" = yes; then
+
+ pkgs=''
+ ok="yes"
+ pkg_check_version libsystemd 221
+ have_systemd="$ok"
+
+ if test "$have_systemd" = no; then
+ if $pkg_config --exists libsystemd ; then
+ systemd_too_old=yes
+ fi
+ fi
+
+ if test "$have_systemd" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsystemd includes" >&5
+$as_echo_n "checking for libsystemd includes... " >&6; }
+if ${ac_cv_systemd_config_cflags+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_systemd_config_cflags=`$pkg_config --cflags $pkgs`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_systemd_config_cflags" >&5
+$as_echo "$ac_cv_systemd_config_cflags" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsystemd libs" >&5
+$as_echo_n "checking for libsystemd libs... " >&6; }
+if ${ac_cv_systemd_config_libs+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_systemd_config_libs=`$pkg_config --libs $pkgs`
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_systemd_config_libs" >&5
+$as_echo "$ac_cv_systemd_config_libs" >&6; }
+ fi
+
+ ac_systemd_config_cflags=$ac_cv_systemd_config_cflags
+ ac_systemd_config_libs=$ac_cv_systemd_config_libs
+
+ if test "$have_systemd" = yes; then
+ #
+ # we appear to have libsystemd; check for headers/libs to be sure.
+ #
+ ac_save_systemd_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $ac_systemd_config_cflags"
+
+ have_systemd=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`
+ ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-bus.h" "ac_cv_header_systemd_sd_bus_h" "$ac_includes_default"
+if test "x$ac_cv_header_systemd_sd_bus_h" = xyes; then :
+ have_systemd=yes
+fi
+
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+
+ CPPFLAGS="$ac_save_systemd_CPPFLAGS"
+ fi
+
+ if test "$have_systemd" = yes; then
+ # we have the headers, now check for the libraries
+ have_systemd=no
+ systemd_halfassed=yes
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for libsystemd usability..." >&5
+$as_echo "checking for libsystemd usability..." >&6; }
+
+ 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`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sd_bus_open_system in -lc" >&5
+$as_echo_n "checking for sd_bus_open_system in -lc... " >&6; }
+if ${ac_cv_lib_c_sd_bus_open_system+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc $ac_systemd_config_libs -lX11 -lXext -lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 sd_bus_open_system ();
+int
+main ()
+{
+return sd_bus_open_system ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_c_sd_bus_open_system=yes
+else
+ ac_cv_lib_c_sd_bus_open_system=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sd_bus_open_system" >&5
+$as_echo "$ac_cv_lib_c_sd_bus_open_system" >&6; }
+if test "x$ac_cv_lib_c_sd_bus_open_system" = xyes; then :
+ have_systemd=yes
+fi
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LDFLAGS="$ac_save_LDFLAGS"
+# LIBS="$ac_save_LIBS"
+
+ fi
+
+ if test "$have_systemd" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for libsystemd usability... no" >&5
+$as_echo "checking for libsystemd usability... no" >&6; }
+ fi
+fi
+
+if test "$have_systemd" = yes; then
+ INCLUDES="$INCLUDES $ac_systemd_config_cflags"
+ EXES_SYSTEMD='$(EXES_SYSTEMD)'
+ $as_echo "#define HAVE_LIBSYSTEMD 1" >>confdefs.h
+
+else
+ EXES_SYSTEMD=''
+fi
+
+
+###############################################################################
+#
# The --enable-locking option
#
+# Note: "configure --help" list all "--enable" options before any
+# "--with" options, so we document the --enable options inline with
+# the --with options where it looks better, instead of in AC_ARG_ENABLE
+# where it would make sense, sigh...
+#
###############################################################################
# Check whether --enable-locking was given.
if test "${enable_locking+set}" = set; then :
- enableval=$enable_locking; enable_locking="$enableval"
+ enableval=$enable_locking; # This is documented elsewhere because of --enable/--with option sorting.
+ enable_locking="$enableval"
else
if test "$ac_macosx" = yes; then
# We can't lock on MacOS X, so default to not compiling in support for it.
@@ -10493,14 +11131,16 @@ else
fi
-###############################################################################
+##############################################################################
#
# Whether to allow root password to unblank.
#
###############################################################################
+
# Check whether --enable-root-passwd was given.
if test "${enable_root_passwd+set}" = set; then :
- enableval=$enable_root_passwd; enable_root_passwd="$enableval"
+ enableval=$enable_root_passwd; # This is documented elsewhere because of --enable/--with option sorting.
+ enable_root_passwd="$enableval"
else
enable_root_passwd=yes
fi
@@ -10514,6 +11154,7 @@ elif test "$enable_root_passwd" != no; then
exit 1
fi
+
###############################################################################
#
# Check for PAM.
@@ -10532,6 +11173,8 @@ case "$host" in
;;
esac
+#### H1
+
have_pam=no
with_pam_req=unspecified
@@ -10555,7 +11198,8 @@ fi
# Check whether --enable-pam-check-account-type was given.
if test "${enable_pam_check_account_type+set}" = set; then :
- enableval=$enable_pam_check_account_type; enable_pam_check_account_type="$enableval"
+ enableval=$enable_pam_check_account_type; # This is documented elsewhere because of --enable/--with option sorting.
+ enable_pam_check_account_type="$enableval"
else
enable_pam_check_account_type=no
fi
@@ -11977,321 +12621,6 @@ _ACEOF
esac
-###############################################################################
-#
-# Check for a login manager for a "New Login" button on the lock dialog.
-# Usually this will be "/usr/bin/gdmflexiserver".
-#
-###############################################################################
-
-with_login_manager_req=unspecified
-default_login_manager_1='gdmflexiserver -ls'
-default_login_manager_2='kdmctl reserve'
-default_login_manager_3='lxdm -c USER_SWITCH'
-default_login_manager_4='dm-tool switch-to-greeter'
-
-
-# Check whether --with-login-manager was given.
-if test "${with_login_manager+set}" = set; then :
- withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
-else
- with_login_manager=yes
-fi
-
-# no HANDLE_X_PATH_ARG for this one
-
-if test "$enable_locking" = no ; then
- with_login_manager_req=no
- with_login_manager=no
-fi
-
-case "$with_login_manager_req" in
- no)
- with_login_manager=""
- ;;
-
- yes|unspecified)
- # Try various defaults, use the first one that exists.
-
- with_login_manager=""
-
- if test -z "$with_login_manager" ; then
- set dummy $default_login_manager_1 ; login_manager_tmp=$2
- unset ac_cv_path_login_manager_tmp # don't cache
- # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
-set dummy $login_manager_tmp; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_login_manager_tmp+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $login_manager_tmp in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-login_manager_tmp=$ac_cv_path_login_manager_tmp
-if test -n "$login_manager_tmp"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
-$as_echo "$login_manager_tmp" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- if test ! -z "$login_manager_tmp" ; then
- with_login_manager="$default_login_manager_1"
- fi
- fi
-
- if test -z "$with_login_manager" ; then
- set dummy $default_login_manager_2 ; login_manager_tmp=$2
- unset ac_cv_path_login_manager_tmp # don't cache
- # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
-set dummy $login_manager_tmp; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_login_manager_tmp+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $login_manager_tmp in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-login_manager_tmp=$ac_cv_path_login_manager_tmp
-if test -n "$login_manager_tmp"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
-$as_echo "$login_manager_tmp" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- if test ! -z "$login_manager_tmp" ; then
- with_login_manager="$default_login_manager_2"
- fi
- fi
-
- if test -z "$with_login_manager" ; then
- set dummy $default_login_manager_3 ; login_manager_tmp=$2
- unset ac_cv_path_login_manager_tmp # don't cache
- # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
-set dummy $login_manager_tmp; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_login_manager_tmp+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $login_manager_tmp in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-login_manager_tmp=$ac_cv_path_login_manager_tmp
-if test -n "$login_manager_tmp"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
-$as_echo "$login_manager_tmp" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- if test ! -z "$login_manager_tmp" ; then
- with_login_manager="$default_login_manager_3"
- fi
- fi
-
- if test -z "$with_login_manager" ; then
- set dummy $default_login_manager_4 ; login_manager_tmp=$2
- unset ac_cv_path_login_manager_tmp # don't cache
- # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
-set dummy $login_manager_tmp; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_login_manager_tmp+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $login_manager_tmp in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-login_manager_tmp=$ac_cv_path_login_manager_tmp
-if test -n "$login_manager_tmp"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
-$as_echo "$login_manager_tmp" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- if test ! -z "$login_manager_tmp" ; then
- with_login_manager="$default_login_manager_4"
- fi
- fi
-
- ;;
-
- /*)
- # absolute path specified on cmd line
- set dummy $with_login_manager_req ; login_manager_tmp=$2
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $login_manager_tmp" >&5
-$as_echo_n "checking for $login_manager_tmp... " >&6; }
- if test -x "$login_manager_tmp" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- with_login_manager=""
- fi
- ;;
-
- *)
- # relative path specified on cmd line
- set dummy $with_login_manager_req ; login_manager_tmp=$2
- unset ac_cv_path_login_manager_tmp # don't cache
- # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
-set dummy $login_manager_tmp; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_login_manager_tmp+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $login_manager_tmp in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-login_manager_tmp=$ac_cv_path_login_manager_tmp
-if test -n "$login_manager_tmp"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
-$as_echo "$login_manager_tmp" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- if test -z "$login_manager_tmp" ; then
- with_login_manager=""
- else
- with_login_manager="$login_manager_tmp"
- fi
- ;;
-esac
-ac_cv_login_manager_program="$with_login_manager"
-
-NEW_LOGIN_COMMAND_P=''
-NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for login manager" >&5
-$as_echo_n "checking for login manager... " >&6; }
-if test -z "$NEW_LOGIN_COMMAND" ; then
- NEW_LOGIN_COMMAND="$default_login_manager_1"
- NEW_LOGIN_COMMAND_P='! '
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEW_LOGIN_COMMAND (disabled)" >&5
-$as_echo "$NEW_LOGIN_COMMAND (disabled)" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEW_LOGIN_COMMAND" >&5
-$as_echo "$NEW_LOGIN_COMMAND" >&6; }
-fi
-
###############################################################################
#
@@ -12299,6 +12628,8 @@ fi
#
###############################################################################
+#### H1
+
have_gtk=no
with_gtk_req=unspecified
@@ -12385,115 +12716,16 @@ parse_gtk_version_string() {
fi
}
-# Find pkg-config... (need this for both gtk and gdk_pixbuf.)
-# if the user specified --with-gtk=/foo/ then look there.
-#
-gtk_path="$PATH"
-if test ! -z "$gtk_dir"; then
- # canonicalize slashes.
- foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
- gtk_path="$foo:$gtk_path"
-fi
-
-for ac_prog in pkg-config
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_pkg_config+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- case $pkg_config in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $gtk_path
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-pkg_config=$ac_cv_path_pkg_config
-if test -n "$pkg_config"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config" >&5
-$as_echo "$pkg_config" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$pkg_config" && break
-done
-
-
-if test -z "$pkg_config" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found!" >&5
-$as_echo "$as_me: WARNING: pkg-config not found!" >&2;}
- pkg_config="false"
-fi
-
-
-# Utility function for running pkg-config-based tests...
-#
-pkgs=''
-pkg_check_version() {
- if test "$ok" = yes ; then
- req="$1"
- min="$2"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $req" >&5
-$as_echo_n "checking for $req... " >&6; }
- if $pkg_config --exists "$req" ; then
- vers=`$pkg_config --modversion "$req"`
- if $pkg_config --exists "$req >= $min" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vers" >&5
-$as_echo "$vers" >&6; }
- pkgs="$pkgs $req"
- return 1
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vers (wanted >= $min)" >&5
-$as_echo "$vers (wanted >= $min)" >&6; }
- ok=no
- return 0
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ok=no
- return 0
- fi
- fi
-}
-
-
jurassic_gtk=no
gtk_halfassed=no
-have_gtk_2_22_or_higher=no
-COMMENT_DEMO_GLADE2_GTK_2_22_HEAD=""
-COMMENT_DEMO_GLADE2_GTK_2_22_TAIL=""
if test "$with_gtk" = yes; then
have_gtk=no
ok="yes"
- pkg_check_version gtk+-2.0 2.0.1 ; ac_gtk_version_string="$vers"
+ pkg_check_version gtk+-2.0 2.22.0 ; ac_gtk_version_string="$vers"
pkg_check_version gmodule-2.0 2.0.0
pkg_check_version libxml-2.0 2.4.6
- pkg_check_version libglade-2.0 1.99.0
pkg_check_version gdk-pixbuf-2.0 2.0.0
pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
have_gtk="$ok"
@@ -12551,16 +12783,6 @@ $as_echo "$ac_cv_gtk_config_libs" >&6; }
$as_echo "#define HAVE_XML 1" >>confdefs.h
fi
-
- if test "$have_gtk" = yes; then
- ok="yes"
- pkg_check_version gtk+-2.0 2.22
- have_gtk_2_22_or_higher="$ok"
- if test "$have_gtk_2_22_or_higher" = yes; then
- COMMENT_DEMO_GLADE2_GTK_2_22_HEAD="<!-- comment>"
- COMMENT_DEMO_GLADE2_GTK_2_22_TAIL="</comment -->"
- fi
- fi
fi
@@ -13089,14 +13311,537 @@ fi
###############################################################################
#
+# Check for a login manager for a "New Login" button on the lock dialog.
+# Usually this will be "/usr/bin/gdmflexiserver".
+#
+###############################################################################
+
+with_login_manager_req=unspecified
+default_login_manager_1='gdmflexiserver -ls'
+default_login_manager_2='kdmctl reserve'
+default_login_manager_3='lxdm -c USER_SWITCH'
+default_login_manager_4='dm-tool switch-to-greeter'
+
+
+# Check whether --with-login-manager was given.
+if test "${with_login_manager+set}" = set; then :
+ withval=$with_login_manager; with_login_manager="$withval"; with_login_manager_req="$withval"
+else
+ with_login_manager=yes
+fi
+
+# no HANDLE_X_PATH_ARG for this one
+
+if test "$enable_locking" = no ; then
+ with_login_manager_req=no
+ with_login_manager=no
+fi
+
+case "$with_login_manager_req" in
+ no)
+ with_login_manager=""
+ ;;
+
+ yes|unspecified)
+ # Try various defaults, use the first one that exists.
+
+ with_login_manager=""
+
+ if test -z "$with_login_manager" ; then
+ set dummy $default_login_manager_1 ; login_manager_tmp=$2
+ unset ac_cv_path_login_manager_tmp # don't cache
+ # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
+set dummy $login_manager_tmp; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_login_manager_tmp+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $login_manager_tmp in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+login_manager_tmp=$ac_cv_path_login_manager_tmp
+if test -n "$login_manager_tmp"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
+$as_echo "$login_manager_tmp" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test ! -z "$login_manager_tmp" ; then
+ with_login_manager="$default_login_manager_1"
+ fi
+ fi
+
+ if test -z "$with_login_manager" ; then
+ set dummy $default_login_manager_2 ; login_manager_tmp=$2
+ unset ac_cv_path_login_manager_tmp # don't cache
+ # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
+set dummy $login_manager_tmp; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_login_manager_tmp+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $login_manager_tmp in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+login_manager_tmp=$ac_cv_path_login_manager_tmp
+if test -n "$login_manager_tmp"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
+$as_echo "$login_manager_tmp" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test ! -z "$login_manager_tmp" ; then
+ with_login_manager="$default_login_manager_2"
+ fi
+ fi
+
+ if test -z "$with_login_manager" ; then
+ set dummy $default_login_manager_3 ; login_manager_tmp=$2
+ unset ac_cv_path_login_manager_tmp # don't cache
+ # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
+set dummy $login_manager_tmp; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_login_manager_tmp+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $login_manager_tmp in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+login_manager_tmp=$ac_cv_path_login_manager_tmp
+if test -n "$login_manager_tmp"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
+$as_echo "$login_manager_tmp" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test ! -z "$login_manager_tmp" ; then
+ with_login_manager="$default_login_manager_3"
+ fi
+ fi
+
+ if test -z "$with_login_manager" ; then
+ set dummy $default_login_manager_4 ; login_manager_tmp=$2
+ unset ac_cv_path_login_manager_tmp # don't cache
+ # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
+set dummy $login_manager_tmp; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_login_manager_tmp+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $login_manager_tmp in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+login_manager_tmp=$ac_cv_path_login_manager_tmp
+if test -n "$login_manager_tmp"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
+$as_echo "$login_manager_tmp" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test ! -z "$login_manager_tmp" ; then
+ with_login_manager="$default_login_manager_4"
+ fi
+ fi
+
+ ;;
+
+ /*)
+ # absolute path specified on cmd line
+ set dummy $with_login_manager_req ; login_manager_tmp=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $login_manager_tmp" >&5
+$as_echo_n "checking for $login_manager_tmp... " >&6; }
+ if test -x "$login_manager_tmp" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ with_login_manager=""
+ fi
+ ;;
+
+ *)
+ # relative path specified on cmd line
+ set dummy $with_login_manager_req ; login_manager_tmp=$2
+ unset ac_cv_path_login_manager_tmp # don't cache
+ # Extract the first word of "$login_manager_tmp", so it can be a program name with args.
+set dummy $login_manager_tmp; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_login_manager_tmp+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $login_manager_tmp in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_login_manager_tmp="$login_manager_tmp" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_login_manager_tmp="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+login_manager_tmp=$ac_cv_path_login_manager_tmp
+if test -n "$login_manager_tmp"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $login_manager_tmp" >&5
+$as_echo "$login_manager_tmp" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test -z "$login_manager_tmp" ; then
+ with_login_manager=""
+ else
+ with_login_manager="$login_manager_tmp"
+ fi
+ ;;
+esac
+ac_cv_login_manager_program="$with_login_manager"
+
+NEW_LOGIN_COMMAND_P=''
+NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for login manager" >&5
+$as_echo_n "checking for login manager... " >&6; }
+if test -z "$NEW_LOGIN_COMMAND" ; then
+ NEW_LOGIN_COMMAND="$default_login_manager_1"
+ NEW_LOGIN_COMMAND_P='! '
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEW_LOGIN_COMMAND (disabled)" >&5
+$as_echo "$NEW_LOGIN_COMMAND (disabled)" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NEW_LOGIN_COMMAND" >&5
+$as_echo "$NEW_LOGIN_COMMAND" >&6; }
+fi
+
+
+
+###############################################################################
+#
+# Check for a directory full of images to use as the default value
+# of the "imageDirectory" preference.
+#
+###############################################################################
+
+have_imagedir=no
+with_imagedir_req=unspecified
+
+
+# Check whether --with-image-directory was given.
+if test "${with_image_directory+set}" = set; then :
+ withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
+else
+ with_imagedir=yes
+fi
+
+# no HANDLE_X_PATH_ARG for this one
+
+case "$with_imagedir" in
+ /*)
+ # absolute path
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for image directory $with_imagedir" >&5
+$as_echo_n "checking for image directory $with_imagedir... " >&6; }
+ if test -d "$with_imagedir" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ with_imagedir=""
+ fi
+ ;;
+ yes)
+ with_imagedir=""
+
+ #### Could use some more defaults here...
+ for dd in \
+ "/usr/share/rpd-wallpaper" \
+ "/usr/share/backgrounds/images/" \
+ "/usr/share/wallpapers/" \
+ "/Library/Desktop Pictures/" \
+ ; do
+ if test -z "$with_imagedir"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for image directory $dd" >&5
+$as_echo_n "checking for image directory $dd... " >&6; }
+ if test -d "$dd" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ with_imagedir="$dd"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ fi
+ done
+
+ ;;
+ no)
+ with_imagedir=""
+ ;;
+
+ *)
+ echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
+ exit 1
+ ;;
+esac
+ac_cv_imagedir="$with_imagedir"
+
+DEFAULT_IMAGES_P='True'
+DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
+
+if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
+ DEFAULT_IMAGES_P='False'
+fi
+
+
+###############################################################################
+#
+# Pick a text file to use as the default of the "textFile" preference.
+# Any old file will do, but preferably one that will make interesting
+# shapes when displayed by "starwars" and "fontglide".
+#
+###############################################################################
+
+have_textfile=no
+with_textfile_req=unspecified
+
+
+# Check whether --with-text-file was given.
+if test "${with_text_file+set}" = set; then :
+ withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
+else
+ with_textfile=yes
+fi
+
+# no HANDLE_X_PATH_ARG for this one
+
+case "$with_textfile" in
+ /*)
+ # absolute path
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text file $with_textfile" >&5
+$as_echo_n "checking for text file $with_textfile... " >&6; }
+ if test -f "$with_textfile" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ with_textfile=""
+ fi
+ ;;
+ yes)
+ with_textfile=""
+
+ #### Could use some more defaults here...
+ for f in \
+ "/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/libX11*/COPYING" \
+ "/usr/X11/share/X11/doc/README*" \
+ "/usr/share/doc/debian/debian-manifesto" \
+ ; do
+ if test -z "$with_textfile"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text file $f" >&5
+$as_echo_n "checking for text file $f... " >&6; }
+ f=`/bin/ls $f 2>&- | head -1`
+ if test -f "$f" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ with_textfile="$f"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ fi
+ done
+
+ ;;
+ no)
+ with_textfile=""
+ ;;
+
+ *)
+ echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
+ exit 1
+ ;;
+esac
+ac_cv_textfile="$with_textfile"
+
+DEFAULT_TEXT_FILE="$ac_cv_textfile"
+
+
+###############################################################################
+#
+# Check the browser to see help URL
+#
+###############################################################################
+
+have_browser=no
+with_browser_req=unspecified
+
+
+# Check whether --with-browser was given.
+if test "${with_browser+set}" = set; then :
+ withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
+else
+ with_browser=no
+fi
+
+# no HANDLE_X_PATH_ARG for this one
+
+case "$with_browser" in
+ no )
+ ;;
+ * )
+ WITH_BROWSER=$with_browser
+ gnome_open_program=$with_browser
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for browser $with_browser" >&5
+$as_echo_n "checking for browser $with_browser... " >&6; }
+ with_browser_fullpath=`which $with_browser 2>/dev/null`
+ case $with_browser_fullpath in
+ /* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_browser=yes
+ ;;
+ * )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+# Only warning: we don't want to install all packages for the
+# dependency of the browser in building stage...
+ echo "WARNING: browser not found: --with-browser=$with_browser"
+ ;;
+ esac
+ ;;
+esac
+ac_cv_browser="$with_browser"
+
+
+###############################################################################
+#
# Check for -lGL or -lMesaGL.
#
###############################################################################
+#### H1
+
have_gl=no
ac_have_mesa_gl=no
with_gl_req=unspecified
gl_halfassed=no
+have_glext=no
# Check whether --with-gl was given.
if test "${with_gl+set}" = set; then :
@@ -13494,7 +14239,7 @@ if ${ac_cv_mesagl_version_string+:} false; then :
$as_echo_n "(cached) " >&6
else
cat > conftest.$ac_ext <<EOF
-#line 13497 "configure"
+#line 14242 "configure"
#include "confdefs.h"
#include <GL/gl.h>
#ifndef MESA_MAJOR_VERSION
@@ -13641,6 +14386,96 @@ fi
LDFLAGS="$ac_save_LDFLAGS"
# LIBS="$ac_save_LIBS"
+
+ # Check for OpenGL GLSL features.
+ #
+
+ 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`
+ ac_fn_c_check_header_compile "$LINENO" "GL/glext.h" "ac_cv_header_GL_glext_h" "#include <GL/gl.h>
+"
+if test "x$ac_cv_header_GL_glext_h" = xyes; then :
+ have_glext=yes
+else
+ have_glext=no
+fi
+
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ if test "$have_glext" = 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`
+ as_ac_Lib=`$as_echo "ac_cv_lib_$gl_lib_1''_glUseProgram" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glUseProgram in -l$gl_lib_1" >&5
+$as_echo_n "checking for glUseProgram in -l$gl_lib_1... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 glUseProgram ();
+int
+main ()
+{
+return glUseProgram ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$as_ac_Lib=yes"
+else
+ eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+ $as_echo "#define HAVE_GLSL 1" >>confdefs.h
+
+else
+ true
+fi
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LDFLAGS="$ac_save_LDFLAGS"
+# LIBS="$ac_save_LIBS"
+
+ fi
fi
elif test "$with_gl" != no; then
@@ -14084,6 +14919,167 @@ fi
###############################################################################
#
+# Check for -ljpeg
+#
+###############################################################################
+
+have_jpeg=no
+with_jpeg_req=unspecified
+jpeg_halfassed=no
+
+# Check whether --with-jpeg was given.
+if test "${with_jpeg+set}" = set; then :
+ withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
+else
+ with_jpeg=yes
+fi
+
+
+
+ case "$with_jpeg" in
+ yes) ;;
+ no) ;;
+
+ /*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG headers" >&5
+$as_echo_n "checking for JPEG headers... " >&6; }
+ d=$with_jpeg/include
+ if test -d $d; then
+ X_CFLAGS="-I$d $X_CFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
+$as_echo "$d" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
+$as_echo "not found ($d: no such directory)" >&6; }
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG libs" >&5
+$as_echo_n "checking for JPEG libs... " >&6; }
+ d=$with_jpeg/lib
+ if test -d $d; then
+ X_LIBS="-L$d $X_LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
+$as_echo "$d" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
+$as_echo "not found ($d: no such directory)" >&6; }
+ fi
+
+ # replace the directory string with "yes".
+ with_jpeg_req="yes"
+ with_jpeg=$with_jpeg_req
+ ;;
+
+ *)
+ echo ""
+ echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
+ echo " If it is a directory, then \`DIR/include' will be added to"
+ echo " the -I list, and \`DIR/lib' will be added to the -L list."
+ exit 1
+ ;;
+ esac
+
+
+if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
+ echo "error: must be yes or no: --with-jpeg=$with_jpeg"
+ exit 1
+fi
+
+if test "$with_jpeg" = yes; then
+
+ have_jpeg=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`
+ ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
+if test "x$ac_cv_header_jpeglib_h" = xyes; then :
+ have_jpeg=yes
+fi
+
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+
+ if test "$have_jpeg" = yes; then
+ # we have the header, now check for the library
+ have_jpeg=no
+ jpeg_halfassed=yes
+
+ 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`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_start_compress in -ljpeg" >&5
+$as_echo_n "checking for jpeg_start_compress in -ljpeg... " >&6; }
+if ${ac_cv_lib_jpeg_jpeg_start_compress+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ljpeg $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 jpeg_start_compress ();
+int
+main ()
+{
+return jpeg_start_compress ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_jpeg_jpeg_start_compress=yes
+else
+ ac_cv_lib_jpeg_jpeg_start_compress=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
+$as_echo "$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
+if test "x$ac_cv_lib_jpeg_jpeg_start_compress" = xyes; then :
+ have_jpeg=yes
+ jpeg_halfassed=no
+ JPEG_LIBS="-ljpeg"
+ $as_echo "#define HAVE_JPEGLIB 1" >>confdefs.h
+
+fi
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LDFLAGS="$ac_save_LDFLAGS"
+# LIBS="$ac_save_LIBS"
+
+ fi
+fi
+
+
+###############################################################################
+#
# Check for -lpng
#
###############################################################################
@@ -14653,167 +15649,6 @@ fi
###############################################################################
#
-# Check for -ljpeg
-#
-###############################################################################
-
-have_jpeg=no
-with_jpeg_req=unspecified
-jpeg_halfassed=no
-
-# Check whether --with-jpeg was given.
-if test "${with_jpeg+set}" = set; then :
- withval=$with_jpeg; with_jpeg="$withval"; with_jpeg_req="$withval"
-else
- with_jpeg=yes
-fi
-
-
-
- case "$with_jpeg" in
- yes) ;;
- no) ;;
-
- /*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG headers" >&5
-$as_echo_n "checking for JPEG headers... " >&6; }
- d=$with_jpeg/include
- if test -d $d; then
- X_CFLAGS="-I$d $X_CFLAGS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
-$as_echo "$d" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
-$as_echo "not found ($d: no such directory)" >&6; }
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JPEG libs" >&5
-$as_echo_n "checking for JPEG libs... " >&6; }
- d=$with_jpeg/lib
- if test -d $d; then
- X_LIBS="-L$d $X_LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
-$as_echo "$d" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
-$as_echo "not found ($d: no such directory)" >&6; }
- fi
-
- # replace the directory string with "yes".
- with_jpeg_req="yes"
- with_jpeg=$with_jpeg_req
- ;;
-
- *)
- echo ""
- echo "error: argument to --with-jpeg must be \"yes\", \"no\", or a directory."
- echo " If it is a directory, then \`DIR/include' will be added to"
- echo " the -I list, and \`DIR/lib' will be added to the -L list."
- exit 1
- ;;
- esac
-
-
-if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
- echo "error: must be yes or no: --with-jpeg=$with_jpeg"
- exit 1
-fi
-
-if test "$with_jpeg" = yes; then
-
- have_jpeg=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`
- ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
-if test "x$ac_cv_header_jpeglib_h" = xyes; then :
- have_jpeg=yes
-fi
-
-
- CPPFLAGS="$ac_save_CPPFLAGS"
-
- if test "$have_jpeg" = yes; then
- # we have the header, now check for the library
- have_jpeg=no
- jpeg_halfassed=yes
-
- 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`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_start_compress in -ljpeg" >&5
-$as_echo_n "checking for jpeg_start_compress in -ljpeg... " >&6; }
-if ${ac_cv_lib_jpeg_jpeg_start_compress+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ljpeg $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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 jpeg_start_compress ();
-int
-main ()
-{
-return jpeg_start_compress ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_jpeg_jpeg_start_compress=yes
-else
- ac_cv_lib_jpeg_jpeg_start_compress=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
-$as_echo "$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
-if test "x$ac_cv_lib_jpeg_jpeg_start_compress" = xyes; then :
- have_jpeg=yes
- jpeg_halfassed=no
- JPEG_LIBS="-ljpeg"
- $as_echo "#define HAVE_JPEGLIB 1" >>confdefs.h
-
-fi
-
- CPPFLAGS="$ac_save_CPPFLAGS"
- LDFLAGS="$ac_save_LDFLAGS"
-# LIBS="$ac_save_LIBS"
-
- fi
-fi
-
-
-###############################################################################
-#
# Check for -lXft
#
###############################################################################
@@ -15101,216 +15936,47 @@ else
fi
-###############################################################################
+# Also check for the standard X11 bitmap fonts, since Debian likes to not
+# install any of those by default. The unlock dialog requires them.
#
-# Check for -lsystemd
-#
-###############################################################################
-
-have_systemd=no
-with_systemd_req=unspecified
-systemd_halfassed=no
-
-# Check whether --with-systemd was given.
-if test "${with_systemd+set}" = set; then :
- withval=$with_systemd; with_systemd="$withval"; with_systemd_req="$withval"
-else
- with_systemd=yes
-fi
-
-
-
- case "$with_systemd" in
- yes) ;;
- no) ;;
-
- /*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for systemd headers" >&5
-$as_echo_n "checking for systemd headers... " >&6; }
- d=$with_systemd/include
- if test -d $d; then
- X_CFLAGS="-I$d $X_CFLAGS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
-$as_echo "$d" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
-$as_echo "not found ($d: no such directory)" >&6; }
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for systemd libs" >&5
-$as_echo_n "checking for systemd libs... " >&6; }
- d=$with_systemd/lib
- if test -d $d; then
- X_LIBS="-L$d $X_LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
-$as_echo "$d" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
-$as_echo "not found ($d: no such directory)" >&6; }
- fi
-
- # replace the directory string with "yes".
- with_systemd_req="yes"
- with_systemd=$with_systemd_req
- ;;
-
- *)
- echo ""
- echo "error: argument to --with-systemd must be \"yes\", \"no\", or a directory."
- echo " If it is a directory, then \`DIR/include' will be added to"
- echo " the -I list, and \`DIR/lib' will be added to the -L list."
- exit 1
- ;;
- esac
-
-
-if test "$with_systemd" != yes -a "$with_systemd" != no ; then
- echo "error: must be yes or no: --with-systemd=$with_systemd"
- exit 1
-fi
-
-if test "$with_systemd" = yes; then
-
- pkgs=''
- ok="yes"
- pkg_check_version libsystemd 221
- have_systemd="$ok"
-
- if test "$have_systemd" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsystemd includes" >&5
-$as_echo_n "checking for libsystemd includes... " >&6; }
-if ${ac_cv_systemd_config_cflags+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_systemd_config_cflags=`$pkg_config --cflags $pkgs`
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_systemd_config_cflags" >&5
-$as_echo "$ac_cv_systemd_config_cflags" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libsystemd libs" >&5
-$as_echo_n "checking for libsystemd libs... " >&6; }
-if ${ac_cv_systemd_config_libs+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_systemd_config_libs=`$pkg_config --libs $pkgs`
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_systemd_config_libs" >&5
-$as_echo "$ac_cv_systemd_config_libs" >&6; }
- fi
-
- ac_systemd_config_cflags=$ac_cv_systemd_config_cflags
- ac_systemd_config_libs=$ac_cv_systemd_config_libs
-
- if test "$have_systemd" = yes; then
- #
- # we appear to have libsystemd; check for headers/libs to be sure.
- #
- ac_save_systemd_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $ac_systemd_config_cflags"
-
- have_systemd=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`
- ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-bus.h" "ac_cv_header_systemd_sd_bus_h" "$ac_includes_default"
-if test "x$ac_cv_header_systemd_sd_bus_h" = xyes; then :
- have_systemd=yes
-fi
-
-
- CPPFLAGS="$ac_save_CPPFLAGS"
-
- CPPFLAGS="$ac_save_systemd_CPPFLAGS"
- fi
-
- if test "$have_systemd" = yes; then
- # we have the headers, now check for the libraries
- have_systemd=no
- systemd_halfassed=yes
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for libsystemd usability..." >&5
-$as_echo "checking for libsystemd usability..." >&6; }
-
- 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`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sd_bus_open_system in -lc" >&5
-$as_echo_n "checking for sd_bus_open_system in -lc... " >&6; }
-if ${ac_cv_lib_c_sd_bus_open_system+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc $ac_systemd_config_libs -lX11 -lXext -lm $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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 sd_bus_open_system ();
-int
-main ()
-{
-return sd_bus_open_system ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_c_sd_bus_open_system=yes
-else
- ac_cv_lib_c_sd_bus_open_system=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sd_bus_open_system" >&5
-$as_echo "$ac_cv_lib_c_sd_bus_open_system" >&6; }
-if test "x$ac_cv_lib_c_sd_bus_open_system" = xyes; then :
- have_systemd=yes
-fi
-
- CPPFLAGS="$ac_save_CPPFLAGS"
- LDFLAGS="$ac_save_LDFLAGS"
-# LIBS="$ac_save_LIBS"
-
- fi
-
- if test "$have_systemd" = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for libsystemd usability... no" >&5
-$as_echo "checking for libsystemd usability... no" >&6; }
- fi
-fi
-
-if test "$have_systemd" = yes; then
- INCLUDES="$INCLUDES $ac_systemd_config_cflags"
- EXES_SYSTEMD='$(EXES_SYSTEMD)'
- $as_echo "#define HAVE_LIBSYSTEMD 1" >>confdefs.h
-
-else
- EXES_SYSTEMD=''
+have_bitmap_fonts=no
+ff='helvB14.pcf.gz helvB14-ISO8859-1.pcf.gz'
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bitmap font files" >&5
+$as_echo_n "checking for bitmap font files... " >&6; }
+for d in /usr/share/fonts/X11 \
+ /usr/share/X11/fonts \
+ /opt/X11/share/fonts \
+; do
+ for r in 100dpi 75dpi ; do
+ for f in $ff ; do
+ if test -f "$d/$r/$f" ; then
+ have_bitmap_fonts=yes
+ fi
+ done
+ done
+done
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_bitmap_fonts" >&5
+$as_echo "$have_bitmap_fonts" >&6; }
+
+# In case we didn't guess the font directory properly, check RPMs and DEBs too.
+if test $have_bitmap_fonts != yes ; then
+ for r in 100dpi 75dpi ; do
+ for f in xfonts-$r \
+ xorg-x11-fonts-$r \
+ xorg-x11-fonts-ISO8859-1-$r \
+ ; do
+ if test $have_bitmap_fonts != yes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $f" >&5
+$as_echo_n "checking for $f... " >&6; }
+ if ( rpm -q "$f" 2>&- >&- ) ||
+ ( dpkg -s "$f" 2>&- | grep -q '^Status:.*installed' ) ; then
+ have_bitmap_fonts=yes
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_bitmap_fonts" >&5
+$as_echo "$have_bitmap_fonts" >&6; }
+ fi
+ done
+ done
fi
@@ -15471,162 +16137,163 @@ fi
fi
+
###############################################################################
#
-# Check for the XSHM server extension.
+# Query AX_PTHREAD, and figure out which compiler gets used.
#
###############################################################################
-have_xshm=no
-with_xshm_req=unspecified
-
-# Check whether --with-xshm-ext was given.
-if test "${with_xshm_ext+set}" = set; then :
- withval=$with_xshm_ext; with_xshm="$withval"; with_xshm_req="$withval"
-else
- with_xshm=yes
-fi
-
-
-
- case "$with_xshm" in
- yes) ;;
- no) ;;
-
- /*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHM headers" >&5
-$as_echo_n "checking for XSHM headers... " >&6; }
- d=$with_xshm/include
- if test -d $d; then
- X_CFLAGS="-I$d $X_CFLAGS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
-$as_echo "$d" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
-$as_echo "not found ($d: no such directory)" >&6; }
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSHM libs" >&5
-$as_echo_n "checking for XSHM libs... " >&6; }
- d=$with_xshm/lib
- if test -d $d; then
- X_LIBS="-L$d $X_LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
-$as_echo "$d" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
-$as_echo "not found ($d: no such directory)" >&6; }
- fi
-
- # replace the directory string with "yes".
- with_xshm_req="yes"
- with_xshm=$with_xshm_req
- ;;
+have_pthread=no
+with_pthread_req=unspecified
- *)
- echo ""
- echo "error: argument to --with-xshm-ext must be \"yes\", \"no\", or a directory."
- echo " If it is a directory, then \`DIR/include' will be added to"
- echo " the -I list, and \`DIR/lib' will be added to the -L list."
- exit 1
- ;;
- esac
+# AX_PTHREAD is from the GNU Autoconf Archive.
+# https://savannah.gnu.org/projects/autoconf-archive/
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+#
+# DESCRIPTION
+#
+# This macro figures out how to build C programs using POSIX threads. It
+# sets the PTHREAD_LIBS output variable to the threads library and linker
+# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
+# flags that are needed. (The user can also force certain compiler
+# flags/libs to be tested by setting these environment variables.)
+#
+# Also sets PTHREAD_CC to any special C compiler that is needed for
+# multi-threaded programs (defaults to the value of CC otherwise). (This
+# is necessary on AIX to use the special cc_r compiler alias.)
+#
+# NOTE: You are assumed to not only compile your program with these flags,
+# but also link it with them as well. e.g. you should link with
+# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
+#
+# If you are only building threads programs, you may wish to use these
+# variables in your default LIBS, CFLAGS, and CC:
+#
+# LIBS="$PTHREAD_LIBS $LIBS"
+# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+# CC="$PTHREAD_CC"
+#
+# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
+# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
+# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+#
+# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
+# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
+# PTHREAD_CFLAGS.
+#
+# ACTION-IF-FOUND is a list of shell commands to run if a threads library
+# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
+# is not found. If ACTION-IF-FOUND is not specified, the default action
+# will define HAVE_PTHREAD.
+#
+# Please let the authors know if this macro fails on any platform, or if
+# you have any other suggestions or comments. This macro was based on work
+# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
+# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
+# Alejandro Forero Cuervo to the autoconf macro repository. We are also
+# grateful for the helpful feedback of numerous users.
+#
+# Updated for Autoconf 2.68 by Daniel Richard G.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
+# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+#serial 21
-if test "$with_xshm" = yes; then
+# This is what autoupdate's m4 run will expand. It fires
+# the warning (with _au_warn_XXX), outputs it into the
+# updated configure.ac (with AC_DIAGNOSE), and then outputs
+# the replacement expansion.
- # first check for Xshm.h.
-
- 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`
- ac_fn_c_check_header_compile "$LINENO" "X11/extensions/XShm.h" "ac_cv_header_X11_extensions_XShm_h" "#include <X11/Xlib.h>
-"
-if test "x$ac_cv_header_X11_extensions_XShm_h" = xyes; then :
- have_xshm=yes
-fi
+# This is an auxiliary macro that is also run when
+# autoupdate runs m4. It simply calls m4_warning, but
+# we need a wrapper so that each warning is emitted only
+# once. We break the quoting in m4_warning's argument in
+# order to expand this macro's arguments, not AU_DEFUN's.
- CPPFLAGS="$ac_save_CPPFLAGS"
- # if that succeeded, then check for sys/ipc.h.
- if test "$have_xshm" = yes; then
- have_xshm=no
+# Finally, this is the expansion that is picked up by
+# autoconf. It tells the user to run autoupdate, and
+# then outputs the replacement expansion. We do not care
+# about autoupdate's warning because that contains
+# information on what to do *after* running autoupdate.
- 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`
- ac_fn_c_check_header_mongrel "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_ipc_h" = xyes; then :
- have_xshm=yes
-fi
- CPPFLAGS="$ac_save_CPPFLAGS"
- fi
+# This affects CC, LIBS, and CFLAGS, instead of defining new variables.
- # if that succeeded, then check for sys/shm.h.
- if test "$have_xshm" = yes; then
- have_xshm=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`
- ac_fn_c_check_header_mongrel "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_shm_h" = xyes; then :
- have_xshm=yes
+# Check whether --with-pthread was given.
+if test "${with_pthread+set}" = set; then :
+ withval=$with_pthread; with_pthread="$withval"; with_pthread_req="$withval"
+else
+ with_pthread=yes
fi
- CPPFLAGS="$ac_save_CPPFLAGS"
- fi
+if test "$with_pthread" = yes; then
+ # AX_PTHREAD might want a different compiler.
- # 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. (This lib gets added to X_EXTRA_LIBS, and
- # that's not quite right, but close enough.)
- #
- case "$host" in
- *-aix*)
- if `uname -v` -eq 3 ; then
- have_xshm=no
- ac_save_CPPFLAGS="$CPPFLAGS"
- ac_save_LDFLAGS="$LDFLAGS"
-# ac_save_LIBS="$LIBS"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- if test \! -z "$includedir" ; then
- CPPFLAGS="$CPPFLAGS -I$includedir"
- fi
- # note: $X_CFLAGS includes $x_includes
- CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ax_pthread_ok=no
- if test \! -z "$libdir" ; then
- LDFLAGS="$LDFLAGS -L$libdir"
- fi
- # note: $X_LIBS includes $x_libraries
- LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
- CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
- LDFLAGS=`eval eval eval eval eval eval eval eval eval echo $LDFLAGS`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShmQueryExtension in -lXextSam" >&5
-$as_echo_n "checking for XShmQueryExtension in -lXextSam... " >&6; }
-if ${ac_cv_lib_XextSam_XShmQueryExtension+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
+$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
@@ -15635,506 +16302,430 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char XShmQueryExtension ();
+char pthread_join ();
int
main ()
{
-return XShmQueryExtension ();
+return pthread_join ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_XextSam_XShmQueryExtension=yes
-else
- ac_cv_lib_XextSam_XShmQueryExtension=no
+ ax_pthread_ok=yes
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_XextSam_XShmQueryExtension" >&5
-$as_echo "$ac_cv_lib_XextSam_XShmQueryExtension" >&6; }
-if test "x$ac_cv_lib_XextSam_XShmQueryExtension" = xyes; then :
- have_xshm=yes; X_EXTRA_LIBS="$X_EXTRA_LIBS -lXextSam"
-else
- true
-fi
-
- CPPFLAGS="$ac_save_CPPFLAGS"
- LDFLAGS="$ac_save_LDFLAGS"
-# LIBS="$ac_save_LIBS"
-
- fi
- ;;
- esac
-
- # if that succeeded, then we've really got it.
- if test "$have_xshm" = yes; then
- $as_echo "#define HAVE_XSHM_EXTENSION 1" >>confdefs.h
-
- fi
-
-elif test "$with_xshm" != no; then
- echo "error: must be yes or no: --with-xshm-ext=$with_xshm"
- exit 1
-fi
-
-
-###############################################################################
-#
-# Check for the DOUBLE-BUFFER server extension.
-#
-###############################################################################
-
-have_xdbe=no
-with_xdbe_req=unspecified
-
-# Check whether --with-xdbe-ext was given.
-if test "${with_xdbe_ext+set}" = set; then :
- withval=$with_xdbe_ext; with_xdbe="$withval"; with_xdbe_req="$withval"
-else
- with_xdbe=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
+$as_echo "$ax_pthread_ok" >&6; }
+ if test x"$ax_pthread_ok" = xno; then
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+ fi
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
fi
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+# Create a list of thread flags to try. Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
- case "$with_xdbe" in
- yes) ;;
- no) ;;
+ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
- /*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOUBLE-BUFFER headers" >&5
-$as_echo_n "checking for DOUBLE-BUFFER headers... " >&6; }
- d=$with_xdbe/include
- if test -d $d; then
- X_CFLAGS="-I$d $X_CFLAGS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
-$as_echo "$d" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
-$as_echo "not found ($d: no such directory)" >&6; }
- fi
+# The ordering *is* (sometimes) important. Some notes on the
+# individual items follow:
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOUBLE-BUFFER libs" >&5
-$as_echo_n "checking for DOUBLE-BUFFER libs... " >&6; }
- d=$with_xdbe/lib
- if test -d $d; then
- X_LIBS="-L$d $X_LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
-$as_echo "$d" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
-$as_echo "not found ($d: no such directory)" >&6; }
- fi
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+# other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+# doesn't hurt to check since this sometimes defines pthreads too;
+# also defines -D_REENTRANT)
+# ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
- # replace the directory string with "yes".
- with_xdbe_req="yes"
- with_xdbe=$with_xdbe_req
- ;;
+case ${host_os} in
+ solaris*)
- *)
- echo ""
- echo "error: argument to --with-xdbe-ext must be \"yes\", \"no\", or a directory."
- echo " If it is a directory, then \`DIR/include' will be added to"
- echo " the -I list, and \`DIR/lib' will be added to the -L list."
- exit 1
- ;;
- esac
+ # On Solaris (at least, for some versions), libc contains stubbed
+ # (non-functional) versions of the pthreads routines, so link-based
+ # tests will erroneously succeed. (We need to link with -pthreads/-mt/
+ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
+ # a function called by this macro, so we could check for that, but
+ # who knows whether they'll stub that too in a future libc.) So,
+ # we'll just look for -pthreads and -lpthread first:
+ ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
+ ;;
-if test "$with_xdbe" = yes; then
+ darwin*)
+ ax_pthread_flags="-pthread $ax_pthread_flags"
+ ;;
+esac
+# Clang doesn't consider unrecognized options an error unless we specify
+# -Werror. We throw in some extra Clang-specific options to ensure that
+# this doesn't happen for GCC, which also accepts -Werror.
- 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`
- ac_fn_c_check_header_compile "$LINENO" "X11/extensions/Xdbe.h" "ac_cv_header_X11_extensions_Xdbe_h" "#include <X11/Xlib.h>
-"
-if test "x$ac_cv_header_X11_extensions_Xdbe_h" = xyes; then :
- have_xdbe=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5
+$as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; }
+save_CFLAGS="$CFLAGS"
+ax_pthread_extra_flags="-Werror"
+CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo(void);
+int
+main ()
+{
+foo()
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ ax_pthread_extra_flags=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+CFLAGS="$save_CFLAGS"
+if test x"$ax_pthread_ok" = xno; then
+for flag in $ax_pthread_flags; do
- CPPFLAGS="$ac_save_CPPFLAGS"
- if test "$have_xdbe" = yes; then
- $as_echo "#define HAVE_DOUBLE_BUFFER_EXTENSION 1" >>confdefs.h
+ case $flag in
+ none)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
+$as_echo_n "checking whether pthreads work without any flags... " >&6; }
+ ;;
+
+ -*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
+$as_echo_n "checking whether pthreads work with $flag... " >&6; }
+ PTHREAD_CFLAGS="$flag"
+ ;;
+ pthread-config)
+ # Extract the first word of "pthread-config", so it can be a program name with args.
+set dummy pthread-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ax_pthread_config+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ax_pthread_config"; then
+ ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ax_pthread_config="yes"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
fi
+done
+ done
+IFS=$as_save_IFS
-elif test "$with_xdbe" != no; then
- echo "error: must be yes or no: --with-xdbe-ext=$with_xshm"
- exit 1
+ test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
fi
-
-
-###############################################################################
-#
-# Check for the SGI XReadDisplay server extension.
-#
-# Note: this has to be down here, rather than up with the other server
-# extension tests, so that the output of `configure --help' is in the
-# right order. Arrgh!
-#
-###############################################################################
-
-have_readdisplay=no
-with_readdisplay_req=unspecified
-
-# Check whether --with-readdisplay was given.
-if test "${with_readdisplay+set}" = set; then :
- withval=$with_readdisplay; with_readdisplay="$withval"; with_readdisplay_req="$withval"
+fi
+ax_pthread_config=$ac_cv_prog_ax_pthread_config
+if test -n "$ax_pthread_config"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
+$as_echo "$ax_pthread_config" >&6; }
else
- with_readdisplay=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
+ if test x"$ax_pthread_config" = xno; then continue; fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
- case "$with_readdisplay" in
- yes) ;;
- no) ;;
-
- /*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XReadDisplay headers" >&5
-$as_echo_n "checking for XReadDisplay headers... " >&6; }
- d=$with_readdisplay/include
- if test -d $d; then
- X_CFLAGS="-I$d $X_CFLAGS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
-$as_echo "$d" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
-$as_echo "not found ($d: no such directory)" >&6; }
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XReadDisplay libs" >&5
-$as_echo_n "checking for XReadDisplay libs... " >&6; }
- d=$with_readdisplay/lib
- if test -d $d; then
- X_LIBS="-L$d $X_LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
-$as_echo "$d" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
-$as_echo "not found ($d: no such directory)" >&6; }
- fi
-
- # replace the directory string with "yes".
- with_readdisplay_req="yes"
- with_readdisplay=$with_readdisplay_req
- ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
+$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
+ PTHREAD_LIBS="-l$flag"
+ ;;
+ esac
- *)
- echo ""
- echo "error: argument to --with-readdisplay must be \"yes\", \"no\", or a directory."
- echo " If it is a directory, then \`DIR/include' will be added to"
- echo " the -I list, and \`DIR/lib' will be added to the -L list."
- exit 1
- ;;
- esac
+ save_LIBS="$LIBS"
+ save_CFLAGS="$CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
+ # Check for various functions. We must include pthread.h,
+ # since some functions may be macros. (On the Sequent, we
+ # need a special flag -Kthread to make this header compile.)
+ # We check for pthread_join because it is in -lpthread on IRIX
+ # while pthread_create is in libc. We check for pthread_attr_init
+ # due to DEC craziness with -lpthreads. We check for
+ # pthread_cleanup_push because it is one of the few pthread
+ # functions on Solaris that doesn't have a non-functional libc stub.
+ # We try pthread_create on general principles.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+ static void routine(void *a) { a = 0; }
+ static void *start_routine(void *a) { return a; }
+int
+main ()
+{
+pthread_t th; pthread_attr_t attr;
+ pthread_create(&th, 0, start_routine, 0);
+ pthread_join(th, 0);
+ pthread_attr_init(&attr);
+ pthread_cleanup_push(routine, 0);
+ pthread_cleanup_pop(0) /* ; */
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ax_pthread_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
-if test "$with_readdisplay" = yes; then
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
- 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`
- ac_fn_c_check_header_compile "$LINENO" "X11/extensions/readdisplay.h" "ac_cv_header_X11_extensions_readdisplay_h" "#include <X11/Xlib.h>
-"
-if test "x$ac_cv_header_X11_extensions_readdisplay_h" = xyes; then :
- $as_echo "#define HAVE_READ_DISPLAY_EXTENSION 1" >>confdefs.h
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
+$as_echo "$ax_pthread_ok" >&6; }
+ if test "x$ax_pthread_ok" = xyes; then
+ break;
+ fi
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+done
fi
+# Various other checks:
+if test "x$ax_pthread_ok" = xyes; then
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- CPPFLAGS="$ac_save_CPPFLAGS"
-elif test "$with_readdisplay" != no; then
- echo "error: must be yes or no: --with-readdisplay=$with_readdisplay"
- exit 1
+ # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
+$as_echo_n "checking for joinable pthread attribute... " >&6; }
+ attr_name=unknown
+ for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+int
+main ()
+{
+int attr = $attr; return attr /* ; */
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ attr_name=$attr; break
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
+$as_echo "$attr_name" >&6; }
+ if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+cat >>confdefs.h <<_ACEOF
+#define PTHREAD_CREATE_JOINABLE $attr_name
+_ACEOF
-###############################################################################
-#
-# Check for a directory full of images to use as the default value
-# of the "imageDirectory" preference.
-#
-###############################################################################
+ fi
-have_imagedir=no
-with_imagedir_req=unspecified
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
+$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
+ flag=no
+ case ${host_os} in
+ aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
+ osf* | hpux*) flag="-D_REENTRANT";;
+ solaris*)
+ if test "$GCC" = "yes"; then
+ flag="-D_REENTRANT"
+ else
+ # TODO: What about Clang on Solaris?
+ flag="-mt -D_REENTRANT"
+ fi
+ ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5
+$as_echo "$flag" >&6; }
+ if test "x$flag" != xno; then
+ PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
+$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
+if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
-# Check whether --with-image-directory was given.
-if test "${with_image_directory+set}" = set; then :
- withval=$with_image_directory; with_imagedir="$withval"; with_imagedir_req="$withval"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+int
+main ()
+{
+int i = PTHREAD_PRIO_INHERIT;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ax_cv_PTHREAD_PRIO_INHERIT=yes
else
- with_imagedir=yes
+ ax_cv_PTHREAD_PRIO_INHERIT=no
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
-# no HANDLE_X_PATH_ARG for this one
-
-case "$with_imagedir" in
- /*)
- # absolute path
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for image directory $with_imagedir" >&5
-$as_echo_n "checking for image directory $with_imagedir... " >&6; }
- if test -d "$with_imagedir" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- with_imagedir=""
- fi
- ;;
- yes)
- with_imagedir=""
-
- #### Could use some more defaults here...
- for dd in \
- "/usr/share/backgrounds/images/" \
- "/usr/share/wallpapers/" \
- "/Library/Desktop Pictures/" \
- ; do
- if test -z "$with_imagedir"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for image directory $dd" >&5
-$as_echo_n "checking for image directory $dd... " >&6; }
- if test -d "$dd" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- with_imagedir="$dd"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- fi
- done
-
- ;;
- no)
- with_imagedir=""
- ;;
-
- *)
- echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
- exit 1
- ;;
-esac
-ac_cv_imagedir="$with_imagedir"
-
-DEFAULT_IMAGES_P='True'
-DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
-
-if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
- DEFAULT_IMAGES_P='False'
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
+$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
+ if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
+$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
-###############################################################################
-#
-# Pick a text file to use as the default of the "textFile" preference.
-# Any old file will do, but preferably one that will make interesting
-# shapes when displayed by "starwars" and "fontglide".
-#
-###############################################################################
+fi
-have_textfile=no
-with_textfile_req=unspecified
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+ # More AIX lossage: compile with *_r variant
+ if test "x$GCC" != xyes; then
+ case $host_os in
+ aix*)
+ case "x/$CC" in #(
+ x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
+ #handle absolute path differently from PATH based program lookup
+ case "x$CC" in #(
+ x/*) :
+ if as_fn_executable_p ${CC}_r; then :
+ PTHREAD_CC="${CC}_r"
+fi ;; #(
+ *) :
+ for ac_prog in ${CC}_r
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PTHREAD_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PTHREAD_CC"; then
+ ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PTHREAD_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
-# Check whether --with-text-file was given.
-if test "${with_text_file+set}" = set; then :
- withval=$with_text_file; with_textfile="$withval"; with_textfile_req="$withval"
+fi
+fi
+PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
+if test -n "$PTHREAD_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
+$as_echo "$PTHREAD_CC" >&6; }
else
- with_textfile=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-# no HANDLE_X_PATH_ARG for this one
-
-case "$with_textfile" in
- /*)
- # absolute path
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text file $with_textfile" >&5
-$as_echo_n "checking for text file $with_textfile... " >&6; }
- if test -f "$with_textfile" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- with_textfile=""
- fi
- ;;
- yes)
- with_textfile=""
- #### Could use some more defaults here...
- for f in \
- "/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/libX11*/COPYING" \
- "/usr/X11/share/X11/doc/README*" \
- "/usr/share/doc/debian/debian-manifesto" \
- ; do
- if test -z "$with_textfile"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for text file $f" >&5
-$as_echo_n "checking for text file $f... " >&6; }
- f=`/bin/ls $f 2>&- | head -1`
- if test -f "$f" ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- with_textfile="$f"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ test -n "$PTHREAD_CC" && break
+done
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+ ;;
+esac ;; #(
+ *) :
+ ;;
+esac
+ ;;
+ esac
fi
- fi
- done
-
- ;;
- no)
- with_textfile=""
- ;;
+fi
- *)
- echo "error: must be an absolute path: --with-text-file=$with_textfile_req"
- exit 1
- ;;
-esac
-ac_cv_textfile="$with_textfile"
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
-DEFAULT_TEXT_FILE="$ac_cv_textfile"
-###############################################################################
-#
-# Check the browser to see help URL
-#
-###############################################################################
-have_browser=no
-with_browser_req=unspecified
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$ax_pthread_ok" = xyes; then
+ if test "$CC" = "$PTHREAD_CC" -o -z "$ac_original_cc"; then
+ have_pthread=yes
+ else
+ ac_prog_cc_no_pthread=yes
+ fi
-# Check whether --with-browser was given.
-if test "${with_browser+set}" = set; then :
- withval=$with_browser; with_browser="$withval"; with_browser_req="$withval"
+ :
else
- with_browser=no
-fi
-
-# no HANDLE_X_PATH_ARG for this one
-
-case "$with_browser" in
- no )
- ;;
- * )
- WITH_BROWSER=$with_browser
- gnome_open_program=$with_browser
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for browser $with_browser" >&5
-$as_echo_n "checking for browser $with_browser... " >&6; }
- with_browser_fullpath=`which $with_browser 2>/dev/null`
- case $with_browser_fullpath in
- /* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- have_browser=yes
- ;;
- * )
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-# Only warning: we don't want to install all packages for the
-# dependency of the browser in building stage...
- echo "WARNING: browser not found: --with-browser=$with_browser"
- ;;
- esac
- ;;
-esac
-ac_cv_browser="$with_browser"
-
-###############################################################################
-#
-# Check whether it's ok to install some hacks as setuid (e.g., "sonar")
-# This should be safe, but let's give people the option.
-#
-###############################################################################
-
-setuid_hacks_default=no
-setuid_hacks="$setuid_hacks_default"
+ ax_pthread_ok=no
-# Check whether --with-setuid-hacks was given.
-if test "${with_setuid_hacks+set}" = set; then :
- withval=$with_setuid_hacks; setuid_hacks="$withval"
-else
- setuid_hacks="$setuid_hacks_default"
fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- case "$setuid_hacks" in
- yes) ;;
- no) ;;
-
- /*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setuid hacks headers" >&5
-$as_echo_n "checking for setuid hacks headers... " >&6; }
- d=$setuid_hacks/include
- if test -d $d; then
- X_CFLAGS="-I$d $X_CFLAGS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
-$as_echo "$d" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
-$as_echo "not found ($d: no such directory)" >&6; }
- fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setuid hacks libs" >&5
-$as_echo_n "checking for setuid hacks libs... " >&6; }
- d=$setuid_hacks/lib
- if test -d $d; then
- X_LIBS="-L$d $X_LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
-$as_echo "$d" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
-$as_echo "not found ($d: no such directory)" >&6; }
- fi
-
- # replace the directory string with "yes".
- setuid_hacks_req="yes"
- setuid_hacks=$setuid_hacks_req
- ;;
-
- *)
- echo ""
- echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
- echo " If it is a directory, then \`DIR/include' will be added to"
- echo " the -I list, and \`DIR/lib' will be added to the -L list."
- exit 1
- ;;
- esac
-
+ if test "$have_pthread" = yes; then
+ $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
-if test "$setuid_hacks" = yes; then
- true
-elif test "$setuid_hacks" != no; then
- echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
- exit 1
+ CC=$PTHREAD_CC
+ fi
fi
###############################################################################
#
-# Check for setcap, which is less worrying than setuid.
+# Check for libcap, which allows "sonar" to work without setuid.
#
###############################################################################
@@ -16335,6 +16926,82 @@ fi
###############################################################################
#
+# Option to prevent "sonar" from working properly.
+# It must be setuid on systems without libcap.
+#
+###############################################################################
+
+if test "$have_libcap" = yes; then
+ setuid_hacks_default=no
+else
+ setuid_hacks_default=yes
+fi
+
+setuid_hacks="$setuid_hacks_default"
+
+# Check whether --with-setuid-hacks was given.
+if test "${with_setuid_hacks+set}" = set; then :
+ withval=$with_setuid_hacks; setuid_hacks="$withval"
+else
+ setuid_hacks="$setuid_hacks_default"
+fi
+
+
+
+ case "$setuid_hacks" in
+ yes) ;;
+ no) ;;
+
+ /*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setuid hacks headers" >&5
+$as_echo_n "checking for setuid hacks headers... " >&6; }
+ d=$setuid_hacks/include
+ if test -d $d; then
+ X_CFLAGS="-I$d $X_CFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
+$as_echo "$d" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
+$as_echo "not found ($d: no such directory)" >&6; }
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setuid hacks libs" >&5
+$as_echo_n "checking for setuid hacks libs... " >&6; }
+ d=$setuid_hacks/lib
+ if test -d $d; then
+ X_LIBS="-L$d $X_LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $d" >&5
+$as_echo "$d" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found ($d: no such directory)" >&5
+$as_echo "not found ($d: no such directory)" >&6; }
+ fi
+
+ # replace the directory string with "yes".
+ setuid_hacks_req="yes"
+ setuid_hacks=$setuid_hacks_req
+ ;;
+
+ *)
+ echo ""
+ echo "error: argument to --with-setuid-hacks must be \"yes\", \"no\", or a directory."
+ echo " If it is a directory, then \`DIR/include' will be added to"
+ echo " the -I list, and \`DIR/lib' will be added to the -L list."
+ exit 1
+ ;;
+ esac
+
+
+if test "$setuid_hacks" = yes; then
+ true
+elif test "$setuid_hacks" != no; then
+ echo "error: must be yes or no: --with-setuid-hacks=$setuid_hacks"
+ exit 1
+fi
+
+
+###############################################################################
+#
# Check for --with-record-animation
#
###############################################################################
@@ -16415,6 +17082,7 @@ $as_echo "enabling --with-record-animation" >&6; }
fi
fi
+
###############################################################################
#
# Done testing. Now, set up the various -I and -L variables,
@@ -16671,9 +17339,6 @@ INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
-
-
-
APPDEFAULTS=$ac_x_app_defaults
@@ -16682,7 +17347,7 @@ APPDEFAULTS=$ac_x_app_defaults
-ac_config_files="$ac_config_files Makefile utils/Makefile jwxyz/Makefile hacks/Makefile hacks/images/Makefile hacks/glx/Makefile po/Makefile.in driver/Makefile driver/xscreensaver.pam driver/xscreensaver-demo.glade2 driver/XScreenSaver.ad"
+ac_config_files="$ac_config_files Makefile utils/Makefile jwxyz/Makefile hacks/Makefile hacks/images/Makefile hacks/glx/Makefile po/Makefile.in driver/Makefile driver/xscreensaver.pam driver/XScreenSaver.ad"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -17398,7 +18063,6 @@ do
"po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
"driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;;
"driver/xscreensaver.pam") CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.pam" ;;
- "driver/xscreensaver-demo.glade2") CONFIG_FILES="$CONFIG_FILES driver/xscreensaver-demo.glade2" ;;
"driver/XScreenSaver.ad") CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;;
"po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
@@ -18094,6 +18758,10 @@ 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_mit_req" = yes -a "$have_mit" = no ; then
+ warn 'The MIT-SCREEN-SAVER 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
@@ -18340,19 +19008,29 @@ if test "$have_xft" = no ; then
fi
+if test "$have_bitmap_fonts" = no ; then
+ warnL 'The standard bitmap fonts do not seem to be installed.'
+ warn2 'That is not going to work out well for you.'
+ warn2 'Install "xfonts-100dpi" or "xorg-x11-fonts-100dpi".'
+fi
+
+
if test "$have_systemd" = no ; then
systemd_warned=no
- if test "$with_systemd_req" = yes ; then
+ if test "$systemd_too_old" = yes ; then
+ warnL "The systemd library is too old."
+ systemd_warned=yes
+ elif test "$with_systemd_req" = yes ; then
warnL "Use of systemd was requested, but it was not found."
systemd_warned=yes
- elif test "$with_systemd_req" = no ; then
+ elif test "$ac_macosx" = yes; then
true
- # noteL 'The systemd library is not being used.'
- # systemd_warned=yes
+ elif test "$with_systemd_req" = no ; then
+ noteL 'The systemd library is not being used.'
+ systemd_warned=yes
else
- true
- # noteL "The systemd library was not found."
- # systemd_warned=yes
+ warnL "The systemd library was not found."
+ systemd_warned=yes
fi
if test "$systemd_halfassed" = yes ; then
@@ -18366,7 +19044,11 @@ if test "$have_systemd" = no ; then
fi
if test "$systemd_warned" = yes; then
+ echo ''
warn2 "This means that xscreensaver-systemd won't be built."
+ warn2 "Without that, xscreensaver will not be able to auto-lock"
+ warn2 "before the system is suspended (e.g., closing laptop lid)"
+ warn2 "and might activate while video playback is in progress."
fi
fi
@@ -18507,8 +19189,6 @@ for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do
done
-do_dir_warning=no
-
# Now let's warn if there's a previous RPM version already installed.
# But don't bother with this test if we are currently *building* an RPM.
@@ -18524,27 +19204,38 @@ 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@^\(.*\)/popsquares$@\1@p'`
+
+ # M4 sucks!!
+
+ rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*/\)xscreensaver-demo$@\1@p'`
+ rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*/\)popsquares$@\1@p'`
+ rpmcdir=`rpm -ql $rpmnames | sed -n 's@^\(.*/\)popsquares\.xml$@\1@p'`
+ rpmadir=`rpm -ql $rpmnames | sed -n 's@^\(.*/\)XScreenSaver$@\1@p'`
+
+
+ err=" (DIFFERS)"
+ if test -z "$rpmbdir" ; then rpmbdir='???'
+ elif test "$rpmbdir" != "${bindir}/" ; then rpmbdir="$rpmbdir$err";fi
+
+ if test -z "$rpmhdir" ; then rpmhdir='???'
+ elif test "$rpmhdir" != "${HACKDIR}/" ; then rpmhdir="$rpmhdir$err";fi
+
+ if test -z "$rpmcdir" ; then rpmcdir='???'
+ elif test "$rpmcdir" != "${HACK_CONF_DIR}/"; then rpmcdir="$rpmcdir$err";fi
+
+ if test -z "$rpmadir" ; then rpmadir='???'
+ elif test "$rpmadir" != "${APPDEFAULTS}/" ; then rpmadir="$rpmadir$err";fi
warning=no
- warnL "There is already an installed RPM of xscreensaver $rpmv"
- warn2 'on this system. You might want to remove it ("rpm -ve")'
- warn2 'before running "make install" in this directory.'
+ warnL "There is already an installed RPM of xscreensaver"
+ warn2 "version \"$rpmv\" on this system."
echo ""
- warn2 "Alternately, you could build this version of xscreensaver"
- warn2 'as an RPM, and then install that. An "xscreensaver.spec"'
- warn2 'file is included. Try "rpmbuild -v -ba xscreensaver.spec".'
- warn2 "See the RPM documentation for more info."
+ warn2 "It is currently installed in these directories:"
echo ""
-
- if test "$rpmbdir" = "$rpmhdir" ; then
- warn2 "The RPM version was installed in $rpmbdir/."
- do_dir_warning=yes
- else
- warn2 "The RPM version was installed in $rpmbdir/,"
- warn2 "with demos in $rpmhdir/."
- fi
+ warn2 "User programs: $rpmbdir$berr"
+ warn2 "Screen savers: $rpmhdir$herr"
+ warn2 "Configuration: $rpmcdir$cerr"
+ warn2 "App Defaults: $rpmadir$aerr"
fi
fi
@@ -18559,54 +19250,47 @@ for dpkg in $debnames ; do
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
+ # M4 sucks!!
+ debbdir=`dpkg -L $debnames 2>&- | sed -n 's@^\(.*/bin/\)xscreensaver$@\1@p'`
+ debhdir=`dpkg -L $debnames 2>&- | sed -n 's@^\(.*/\)popsquares$@\1@p'`
+ debcdir=`dpkg -L $debnames 2>&- | sed -n 's@^\(.*/\)popsquares\.xml$@\1@p'`
+ debadir=`dpkg -L $debnames 2>&- | sed -n 's@^\(.*/\)XScreenSaver[^/]*$@\1@p'`
-if test "${bindir}" = "${HACKDIR}" ; then
- do_dir_warning=yes
-fi
-if test "$do_dir_warning" = yes; then
- echo ""
- echo "$warnsep"
- echo ""
- echo ' When you run "make install", the "xscreensaver",'
- echo ' "xscreensaver-demo", and "xscreensaver-command" executables'
- echo " will be installed in ${bindir}/."
- echo ""
- echo " The various graphics demos (200+ different executables) will"
- echo " be installed in ${HACKDIR}/."
- echo ""
- echo " If you would prefer the demos to be installed elsewhere,"
- echo " you should re-run configure with the --with-hackdir=DIR"
- echo " option. For more information, run \`./configure --help'."
- warning=yes
-fi
+ err=" (DIFFERS)"
+ if test -z "$debbdir" ; then debbdir='???'
+ elif test "$debbdir" != "${bindir}/" ; then debbdir="$debbdir$err"; fi
-if test "$warning" != no; then
- echo '' ; echo "$warnsep" ; echo ''
-fi
+ if test -z "$debhdir" ; then debhdir='???'
+ elif test "$debhdir" != "${HACKDIR}/" ; then debhdir="$debhdir$err"; fi
-if test "$do_dir_warning" = no; then
- if test "$warning" = no; then
- echo ''
- fi
- echo "User programs will be installed in ${bindir}/"
- echo "Screen savers will be installed in ${HACKDIR}/"
- echo "Configuration dialogs will be installed in ${HACK_CONF_DIR}/"
- echo "System-wide default settings will be installed in ${APPDEFAULTS}/"
- echo ''
-fi
+ if test -z "$debcdir" ; then debcdir='???'
+ elif test "$debcdir" != "${HACK_CONF_DIR}/" ; then debcdir="$debcdir$err"; fi
+
+ if test -z "$debadir" ; then debadir='???'
+ elif test "$debadir" != "${APPDEFAULTS}/" ; then debadir="$debadir$err"; fi
+
+ warning=no
+ warnL "There is already an installed dpkg of xscreensaver"
+ warn2 "version \"$debv\" on this system."
+ echo ""
+ warn2 "It is currently installed in these directories:"
+ echo ""
+ warn2 "User programs: $debbdir$berr"
+ warn2 "Screen savers: $debhdir$herr"
+ warn2 "Configuration: $debcdir$cerr"
+ warn2 "App Defaults: $debadir$aerr"
+fi
+
+echo ""
+echo "$warnsep"
+echo ""
+echo " XScreenSaver will be installed in these directories:"
+echo ""
+echo " User programs: ${bindir}/"
+echo " Screen savers: ${HACKDIR}/"
+echo " Configuration: ${HACK_CONF_DIR}/"
+echo " App Defaults: ${APPDEFAULTS}/"
+echo ""