From: Zygo Blaxell Date: Mon, 2 Mar 2009 05:43:24 +0000 (-0500) Subject: http://se.aminet.net/pub/Linux/distributions/slackware/slackware-10.1/source/xap... X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=commitdiff_plain;h=bc7b7a8eb122206d239ec0e693676bcce31be1aa se.aminet.net/pub/Linux/distributions/slackware/slackware-10.1/source/xap/xscreensaver/xscreensaver-4.19.tar.bz2 -rw-r--r-- 1 zblaxell zblaxell 3247982 Dec 15 2004 xscreensaver-4.19.tar.bz2 f9aa24c78673110d1c1b52a6f8a63d34016e6962 xscreensaver-4.19.tar.bz2 --- diff --git a/README b/README index 699f29ca..31b0366f 100644 --- a/README +++ b/README @@ -76,6 +76,16 @@ the XScreenSaver FAQ about that: http://www.jwz.org/xscreensaver/faq.html ============ +Changes since 4.18: * New hacks, `substrate', `intermomentary', `fireworkx', + and `pinion'. + * New version of `flow'. + * Made /proc/interrupts work again on Linux 2.6. + * Made `analogtv' not hog the CPU. + * Made analogtv-based hacks work properly on PPC/ARM. + * Fixed a bad memory leak in `piecewise'. + * Minor updates to `sonar', `molecule', `glmatrix', + `galaxy', and `webcollage'. + * Removed support for GTK 1.x (everyone uses 2.x now.) Changes since 4.17: * Oops, pay no attention to the man behind the curtain. Changes since 4.16: * New hacks, `anemotaxis' and `memscroller'. * Fixed a bad bug that caused `vidwhacker' to never die. diff --git a/config.h.in b/config.h.in index 1abb2062..a3a8617a 100644 --- a/config.h.in +++ b/config.h.in @@ -416,6 +416,12 @@ /* Define if you have the header file. */ #undef HAVE_UNISTD_H +/* Define if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Define if you have the setlocale function. */ +#undef HAVE_SETLOCALE + /* Define if you have the header file. */ #undef HAVE_CRYPT_H diff --git a/configure b/configure index ea00c0dd..b8c26708 100755 --- a/configure +++ b/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE EGREP PERL X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS INTLTOOL_DESKTOP_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_KEYS_RULE INTLTOOL_OAF_RULE INTLTOOL_PONG_RULE INTLTOOL_SERVER_RULE INTLTOOL_SHEET_RULE INTLTOOL_SOUNDLIST_RULE INTLTOOL_UI_RULE INTLTOOL_XML_RULE INTLTOOL_CAVES_RULE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE INTLTOOL_PERL GETTEXT_PACKAGE RANLIB ac_ct_RANLIB ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB MKINSTALLDIRS pkg_config glib_config gtk_config gnome_config have_gnome_help xml_config gdk_pixbuf_config fortune_tmp INCLUDES PREFERRED_DEMO_PROGRAM ALL_DEMO_PROGRAMS SAVER_LIBS MOTIF_LIBS GTK_LIBS XML_LIBS JPEG_LIBS HACK_LIBS XPM_LIBS PTY_LIBS GL_LIBS GLE_LIBS XDPMS_LIBS PASSWD_LIBS INSTALL_SETUID SETUID_HACKS INSTALL_DIRS NEED_SETUID INSTALL_PAM OBJCC EXES_OSX SCRIPTS_OSX MEN_OSX PASSWD_SRCS PASSWD_OBJS XMU_SRCS XMU_OBJS XMU_LIBS SAVER_GL_SRCS SAVER_GL_OBJS SAVER_GL_LIBS LOCK_SRCS LOCK_OBJS JPEG_EXES GL_EXES GL_UTIL_EXES GL_MEN GL_KLUDGE GLE_EXES GLE_KLUDGE GNOMEHELP_Y GNOMEHELP_N HACKDIR GNOME_DATADIR GLADE_DATADIR PO_DATADIR GNOME_PANELDIR HACK_CONF_DIR GTK_EXTRA_OBJS APPDEFAULTS DEPEND DEPEND_FLAGS DEPEND_DEFINES LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE EGREP PERL X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS INTLTOOL_DESKTOP_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_KEYS_RULE INTLTOOL_OAF_RULE INTLTOOL_PONG_RULE INTLTOOL_SERVER_RULE INTLTOOL_SHEET_RULE INTLTOOL_SOUNDLIST_RULE INTLTOOL_UI_RULE INTLTOOL_XML_RULE INTLTOOL_CAVES_RULE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE INTLTOOL_PERL GETTEXT_PACKAGE RANLIB ac_ct_RANLIB ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB MKINSTALLDIRS pkg_config have_gnome_help fortune_tmp INCLUDES PREFERRED_DEMO_PROGRAM ALL_DEMO_PROGRAMS SAVER_LIBS MOTIF_LIBS GTK_LIBS XML_LIBS JPEG_LIBS HACK_LIBS XPM_LIBS PTY_LIBS GL_LIBS GLE_LIBS XDPMS_LIBS PASSWD_LIBS INSTALL_SETUID SETUID_HACKS INSTALL_DIRS NEED_SETUID INSTALL_PAM OBJCC EXES_OSX SCRIPTS_OSX MEN_OSX PASSWD_SRCS PASSWD_OBJS XMU_SRCS XMU_OBJS XMU_LIBS SAVER_GL_SRCS SAVER_GL_OBJS SAVER_GL_LIBS LOCK_SRCS LOCK_OBJS JPEG_EXES GL_EXES GL_UTIL_EXES GL_MEN GL_KLUDGE GLE_EXES GLE_KLUDGE GNOMEHELP_Y GNOMEHELP_N HACKDIR GNOME_DATADIR GLADE_DATADIR PO_DATADIR GNOME_PANELDIR HACK_CONF_DIR GTK_EXTRA_OBJS APPDEFAULTS DEPEND DEPEND_FLAGS DEPEND_DEFINES LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -860,9 +860,9 @@ Installation options: Default: `PREFIX/lib/xscreensaver/' --with-configdir=DIR Where to install the data files that describe each of the display modes to the GUI. - Default: `GNOMEPREFIX/control-center/screensavers/' + Default: `GTK_PREFIX/control-center/screensavers/' or `PREFIX/lib/xscreensaver/config/', depending on - whether GNOME is available. + whether GTK is available. Except where noted, all of the --with options below can also take a directory argument: for example, `--with-motif=/opt/Motif'. That would @@ -896,27 +896,20 @@ Screen blanking and idle-detection options: User interface options: + --with-gtk Use the Gtk toolkit for the user interface. --with-motif Use the Motif toolkit for the user interface (not recommended.) - --with-gtk Use the Gtk toolkit for the user interface. - --with-gnome Include support for the Gnome 1.x Control Center. - (This option is not needed with GTK 2.x / Gnome 2.x.) - - --with-xml The XML toolkit is needed for some parts of - the Gtk interface. Without it, the configuration - interface will be much less featureful. 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-xpm Include support for XPM files in some demos. - (Not needed if Pixbuf is used.) --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. (The path here is - ignored if GTK 2.x is being used.) + GIF, JPEG, and PNG files as well. + --with-xpm Include support for XPM files in some demos. + (Not needed if Pixbuf is used.) --with-jpeg Include support for the JPEG library. --with-xshm-ext Include support for the Shared Memory extension. --with-xdbe-ext Include support for the DOUBLE-BUFFER extension. @@ -2594,6 +2587,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -z "$GCC"; then + # not using GCC echo "$as_me:$LINENO: checking how to request ANSI compilation" >&5 echo $ECHO_N "checking how to request ANSI compilation... $ECHO_C" >&6 case "$host" in @@ -2607,18 +2601,25 @@ echo "${ECHO_T}HPUX: adding -Ae" >&6 echo "${ECHO_T}AIX: adding -qlanglvl=ansi -qhalt=e" >&6 CC="$CC -qlanglvl=ansi -qhalt=e" ;; - *-dec-* ) echo "$as_me:$LINENO: result: DEC: adding -std1 -ieee" >&5 echo "${ECHO_T}DEC: adding -std1 -ieee" >&6 CC="$CC -std1" ;; - *) echo "$as_me:$LINENO: result: no idea" >&5 echo "${ECHO_T}no idea" >&6 ;; esac + else + # using GCC + case "$host" in + *-solaris*) + echo "$as_me:$LINENO: result: Solaris: adding -D__EXTENSIONS__" >&5 +echo "${ECHO_T}Solaris: adding -D__EXTENSIONS__" >&6 + CC="$CC -D__EXTENSIONS__" + ;; + esac fi OBJCC="$CC" @@ -12417,7 +12418,7 @@ if test "${ac_cv_have_proc_interrupts+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_have_proc_interrupts=no - if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then + if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then ac_cv_have_proc_interrupts=yes fi @@ -14599,214 +14600,6 @@ _ACEOF esac -############################################################################### -# -# Check for -lXm. -# -############################################################################### - -have_motif=no -with_motif_req=unspecified - -# Check whether --with-motif or --without-motif was given. -if test "${with_motif+set}" = set; then - withval="$with_motif" - with_motif="$withval"; with_motif_req="$withval" -else - with_motif=no -fi; - - - case "$with_motif" in - yes) ;; - no) ;; - - /*) - echo "$as_me:$LINENO: checking for Motif headers" >&5 -echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6 - d=$with_motif/include - if test -d $d; then - X_CFLAGS="-I$d $X_CFLAGS" - echo "$as_me:$LINENO: result: $d" >&5 -echo "${ECHO_T}$d" >&6 - else - echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5 -echo "${ECHO_T}not found ($d: no such directory)" >&6 - fi - - echo "$as_me:$LINENO: checking for Motif libs" >&5 -echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6 - d=$with_motif/lib - if test -d $d; then - X_LIBS="-L$d $X_LIBS" - echo "$as_me:$LINENO: result: $d" >&5 -echo "${ECHO_T}$d" >&6 - else - echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5 -echo "${ECHO_T}not found ($d: no such directory)" >&6 - fi - - # replace the directory string with "yes". - with_motif_req="yes" - with_motif=$with_motif_req - ;; - - *) - echo "" - echo "error: argument to --with-motif 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_motif" != yes -a "$with_motif" != no ; then - echo "error: must be yes or no: --with-motif=$with_motif" - exit 1 -fi - -if test "$with_motif" = yes; then - have_motif=no - - ac_save_CPPFLAGS="$CPPFLAGS" - if test \! -z "$includedir" ; then - CPPFLAGS="$CPPFLAGS -I$includedir" - fi - CPPFLAGS="$CPPFLAGS $X_CFLAGS" - echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5 -echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6 -if test "${ac_cv_header_Xm_Xm_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - #include - #include - -#include -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_Xm_Xm_h=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_Xm_Xm_h=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5 -echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6 -if test $ac_cv_header_Xm_Xm_h = yes; then - have_motif=yes - cat >>confdefs.h <<\_ACEOF -#define HAVE_MOTIF 1 -_ACEOF - - MOTIF_LIBS="$MOTIF_LIBS -lXm" -fi - - - CPPFLAGS="$ac_save_CPPFLAGS" -fi - - -if test "$have_motif" = yes; then - - ac_save_CPPFLAGS="$CPPFLAGS" - if test \! -z "$includedir" ; then - CPPFLAGS="$CPPFLAGS -I$includedir" - fi - CPPFLAGS="$CPPFLAGS $X_CFLAGS" - echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5 -echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6 -if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - #include - #include - -#include -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_Xm_ComboBox_h=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_Xm_ComboBox_h=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5 -echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6 -if test $ac_cv_header_Xm_ComboBox_h = yes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_XMCOMBOBOX 1 -_ACEOF - -fi - - - CPPFLAGS="$ac_save_CPPFLAGS" -fi - - ############################################################################### # # Check for -lgtk (and Gnome stuff) @@ -14814,7 +14607,6 @@ fi ############################################################################### have_gtk=no -have_gtk2=no with_gtk_req=unspecified # Check whether --with-gtk or --without-gtk was given. @@ -14886,116 +14678,31 @@ if test "$with_gtk" != yes -a "$with_gtk" != no ; then exit 1 fi -have_gnome=no -with_gnome_req=unspecified - -# Check whether --with-gnome or --without-gnome was given. -if test "${with_gnome+set}" = set; then - withval="$with_gnome" - with_gnome="$withval"; with_gnome_req="$withval" -else - with_gnome=yes -fi; -# if --with-gnome=/directory/ was specified, remember that directory so that -# we can also look for the `gnome-config' program in that directory. -case "$with_gnome" in - /*) - gnome_dir="$with_gnome" - ;; - *) - gnome_dir="" - ;; -esac +parse_gtk_version_string() { + # M4 sucks!! + maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'` + min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'` - case "$with_gnome" in - yes) ;; - no) ;; + ac_gtk_version=`echo "$maj * 1000 + $min" | bc` + if test -z "$ac_gtk_version"; then + ac_gtk_version=unknown + ac_gtk_version_string=unknown + fi +} - /*) - echo "$as_me:$LINENO: checking for Gnome headers" >&5 -echo $ECHO_N "checking for Gnome headers... $ECHO_C" >&6 - d=$with_gnome/include - if test -d $d; then - X_CFLAGS="-I$d $X_CFLAGS" - echo "$as_me:$LINENO: result: $d" >&5 -echo "${ECHO_T}$d" >&6 - else - echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5 -echo "${ECHO_T}not found ($d: no such directory)" >&6 - 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 - echo "$as_me:$LINENO: checking for Gnome libs" >&5 -echo $ECHO_N "checking for Gnome libs... $ECHO_C" >&6 - d=$with_gnome/lib - if test -d $d; then - X_LIBS="-L$d $X_LIBS" - echo "$as_me:$LINENO: result: $d" >&5 -echo "${ECHO_T}$d" >&6 - else - echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5 -echo "${ECHO_T}not found ($d: no such directory)" >&6 - fi - - # replace the directory string with "yes". - with_gnome_req="yes" - with_gnome=$with_gnome_req - ;; - - *) - echo "" - echo "error: argument to --with-gnome 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_gnome" != yes -a "$with_gnome" != no ; then - echo "error: must be yes or no: --with-gnome=$with_gnome" - exit 1 -fi - -parse_gtk_version_string() { - # M4 sucks!! - - maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'` - min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'` - - ac_gtk_version=`echo "$maj * 1000 + $min" | bc` - if test -z "$ac_gtk_version"; then - ac_gtk_version=unknown - ac_gtk_version_string=unknown - fi -} - - -jurassic_gtk=no -gtk2_halfassed=no - -if test "$with_gtk" = yes; then - have_gtk=no - - # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then - # look in /foo/bin/ for glib-config, gtk-config, and gnome-config. - # - 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 - - if test ! -z "$gnome_dir"; then - # canonicalize slashes. - foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'` - gtk_path="$foo:$gtk_path" - fi - - for ac_prog in pkg-config +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 @@ -15040,108 +14747,74 @@ fi done - if test -n "$pkg_config" ; then - # - # the new way... - # run pkg-config based tests. - # - pkgs='' - pkg_check_version() { - if test "$ok" = yes ; then - req="$1" - min="$2" - echo "$as_me:$LINENO: checking for $req" >&5 +if test -z "$pkg_config" ; then + { echo "$as_me:$LINENO: WARNING: pkg-config not found!" >&5 +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" + echo "$as_me:$LINENO: checking for $req" >&5 echo $ECHO_N "checking for $req... $ECHO_C" >&6 - if $pkg_config --exists "$req" ; then - vers=`$pkg_config --modversion "$req"` - if $pkg_config --exists "$req >= $min" ; then - echo "$as_me:$LINENO: result: $vers" >&5 + if $pkg_config --exists "$req" ; then + vers=`$pkg_config --modversion "$req"` + if $pkg_config --exists "$req >= $min" ; then + echo "$as_me:$LINENO: result: $vers" >&5 echo "${ECHO_T}$vers" >&6 - pkgs="$pkgs $req" - return 1 - else - echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5 + pkgs="$pkgs $req" + return 1 + else + echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5 echo "${ECHO_T}$vers (wanted >= $min)" >&6 - ok=no - return 0 - fi - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - ok=no - return 0 - fi + ok=no + return 0 fi - } - - echo "$as_me:$LINENO: result: checking for GTK 2.x with pkg-config based tests..." >&5 -echo "${ECHO_T}checking for GTK 2.x with pkg-config based tests..." >&6 - - ok="yes" - pkg_check_version gtk+-2.0 2.0.1 ; 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 0.1 - have_gtk="$ok" - - if test "$have_gtk" = yes; then - have_gtk2=yes - cat >>confdefs.h <<\_ACEOF -#define HAVE_GTK2 1 -_ACEOF - else - if test -n "$ac_gtk_version_string" ; then - gtk2_halfassed="$ac_gtk_version_string" - gtk2_halfassed_lib="$req" - fi + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ok=no + return 0 fi + fi +} - if test "$have_gtk" = no; then - # - # we don't have GTK 2. Let's look for GTK 1. - # - echo "$as_me:$LINENO: result: checking for GTK 1.x with pkg-config based tests..." >&5 -echo "${ECHO_T}checking for GTK 1.x with pkg-config based tests..." >&6 - - pkgs='' - ok="yes" - pkg_check_version gtk+ 1.2 ; ac_gtk_version_string="$vers" - pkg_check_version glib 1.0 - pkg_check_version gdk_pixbuf 0.1 - have_gtk="$ok" - # Now check for Gnome... - # - if test "$have_gtk" = yes -a "$with_gnome" = yes; then - old_pkgs="$pkgs" - ok=yes - pkg_check_version capplet 1.0 - pkg_check_version gnomeui 1.0 - pkg_check_version gdk_pixbuf 0.1 - have_gnome="$ok" +jurassic_gtk=no +gtk_halfassed=no - if test "$have_gnome" = no; then - pkgs="$old_pkgs" - else - cat >>confdefs.h <<\_ACEOF -#define HAVE_CRAPPLET 1 -_ACEOF +if test "$with_gtk" = yes; then + have_gtk=no - fi - fi + ok="yes" + pkg_check_version gtk+-2.0 2.0.1 ; 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 2.0.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" + + if test "$have_gtk" = no; then + if test -n "$ac_gtk_version_string" ; then + gtk_halfassed="$ac_gtk_version_string" + gtk_halfassed_lib="$req" fi + fi - if test "$have_gtk" = yes; then - parse_gtk_version_string - jurassic_gtk=no - else - have_gnome=no - fi + if test "$have_gtk" = yes; then + parse_gtk_version_string + jurassic_gtk=no + fi - if test "$have_gtk" = yes; then - echo "$as_me:$LINENO: checking for Gtk includes" >&5 + if test "$have_gtk" = yes; then + echo "$as_me:$LINENO: checking for Gtk includes" >&5 echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6 if test "${ac_cv_gtk_config_cflags+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -15150,7 +14823,7 @@ else fi echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5 echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6 - echo "$as_me:$LINENO: checking for Gtk libs" >&5 + echo "$as_me:$LINENO: checking for Gtk libs" >&5 echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6 if test "${ac_cv_gtk_config_libs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -15159,510 +14832,114 @@ else fi echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5 echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6 - fi - ac_gtk_config_cflags=$ac_cv_gtk_config_cflags - ac_gtk_config_libs=$ac_cv_gtk_config_libs - - ac_gnome_config_cflags=$ac_gtk_config_cflags - ac_gnome_config_libs=$ac_gtk_config_libs - - else - # - # the old way... - # run {gnome,gtk}-config based tests. - # - echo "$as_me:$LINENO: result: checking for GTK 1.x with gtk-config based tests..." >&5 -echo "${ECHO_T}checking for GTK 1.x with gtk-config based tests..." >&6 + fi + ac_gtk_config_cflags=$ac_cv_gtk_config_cflags + ac_gtk_config_libs=$ac_cv_gtk_config_libs - for ac_prog in glib12-config glib-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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_glib_config+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $glib_config in - [\\/]* | ?:[\\/]*) - ac_cv_path_glib_config="$glib_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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_glib_config="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 + GTK_EXTRA_OBJS="" + GNOME_DATADIR="" + GNOME_PANELDIR='$(GNOME_PANELDIR2)' + if test "$have_gtk" = yes; then + GNOME_DATADIR=`$pkg_config --variable=prefix gtk+-2.0` + GNOME_DATADIR="$GNOME_DATADIR/share" fi -done -done - ;; -esac -fi -glib_config=$ac_cv_path_glib_config + if test "$have_gtk" = yes; then + INCLUDES="$INCLUDES $ac_gtk_config_cflags" + GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs" + cat >>confdefs.h <<\_ACEOF +#define HAVE_GTK 1 +_ACEOF -if test -n "$glib_config"; then - echo "$as_me:$LINENO: result: $glib_config" >&5 -echo "${ECHO_T}$glib_config" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi + cat >>confdefs.h <<\_ACEOF +#define HAVE_GTK2 1 +_ACEOF - test -n "$glib_config" && break -done + cat >>confdefs.h <<\_ACEOF +#define HAVE_XML 1 +_ACEOF - for ac_prog in gtk12-config gtk-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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_gtk_config+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $gtk_config in - [\\/]* | ?:[\\/]*) - ac_cv_path_gtk_config="$gtk_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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_gtk_config="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 fi -done -done - - ;; -esac -fi -gtk_config=$ac_cv_path_gtk_config -if test -n "$gtk_config"; then - echo "$as_me:$LINENO: result: $gtk_config" >&5 -echo "${ECHO_T}$gtk_config" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 fi - test -n "$gtk_config" && break -done - - if test "$with_gnome" = yes; then - for ac_prog in gnome-config +# Check for the Gnome Help Browser. +# +if test "$have_gtk" = yes; then + for ac_prog in yelp gnome-help-browser do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_gnome_config+set}" = set; then +if test "${ac_cv_prog_have_gnome_help+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $gnome_config in - [\\/]* | ?:[\\/]*) - ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $gtk_path + if test -n "$have_gnome_help"; then + ac_cv_prog_have_gnome_help="$have_gnome_help" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_gnome_config="$as_dir/$ac_word$ac_exec_ext" + ac_cv_prog_have_gnome_help="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done - ;; -esac fi -gnome_config=$ac_cv_path_gnome_config - -if test -n "$gnome_config"; then - echo "$as_me:$LINENO: result: $gnome_config" >&5 -echo "${ECHO_T}$gnome_config" >&6 +fi +have_gnome_help=$ac_cv_prog_have_gnome_help +if test -n "$have_gnome_help"; then + echo "$as_me:$LINENO: result: $have_gnome_help" >&5 +echo "${ECHO_T}$have_gnome_help" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi - test -n "$gnome_config" && break + test -n "$have_gnome_help" && break done +test -n "$have_gnome_help" || have_gnome_help="no" - fi - - if test -n "$glib_config" -a -n "$gtk_config" ; then - have_gtk=yes - if test "$with_gnome" = yes -a -n "$gnome_config" ; then - have_gnome=yes - fi - fi - - if test "$have_gtk" = yes; then - echo "$as_me:$LINENO: checking Gtk version number" >&5 -echo $ECHO_N "checking Gtk version number... $ECHO_C" >&6 -if test "${ac_cv_gtk_version_string+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_gtk_version_string=`$gtk_config --version` + if test "$have_gnome_help" != no; then + have_gnome_help=yes + fi fi -echo "$as_me:$LINENO: result: $ac_cv_gtk_version_string" >&5 -echo "${ECHO_T}$ac_cv_gtk_version_string" >&6 - ac_gtk_version_string=$ac_cv_gtk_version_string - parse_gtk_version_string - fi - if test "$have_gtk" = yes; then - if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002 - then - have_gtk=no - have_gnome=no - jurassic_gtk=yes - fi - fi - if test "$have_gtk" = yes; then - echo "$as_me:$LINENO: checking for Gtk includes" >&5 -echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6 -if test "${ac_cv_gtk_config_cflags+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_gtk_config_cflags=`$gtk_config --cflags` -fi -echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5 -echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6 - echo "$as_me:$LINENO: checking for Gtk libs" >&5 -echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6 -if test "${ac_cv_gtk_config_libs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_gtk_config_libs=`$gtk_config --libs` -fi -echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5 -echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6 - fi - ac_gtk_config_cflags=$ac_cv_gtk_config_cflags - ac_gtk_config_libs=$ac_cv_gtk_config_libs - - # Check for Gnome Capplet support. - # Note that this is only needed with Gnome 1.x, not Gnome 2.x. - # In a Gnome 2.x world, libcapplet will not exist. - # (In fact, this likely won't even be checked, since in a Gnome 2.x - # world, we will probably be up in the "$pkg_config" branch instead - # of here in the "$gnome_config" branch.) - # - if test "$have_gnome" = yes -a "$have_gtk" = yes; then - gnome_config_libs="gtk capplet gnomeui gdk_pixbuf" - echo "$as_me:$LINENO: checking for Gnome capplet includes" >&5 -echo $ECHO_N "checking for Gnome capplet includes... $ECHO_C" >&6 - if test "${ac_cv_gnome_config_cflags+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if ( $gnome_config --cflags $gnome_config_libs 2>&1 | \ - grep Unknown >/dev/null ) ; then - ac_cv_gnome_config_cflags='' - else - ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs` - fi -fi +############################################################################### +# +# Check for -lXm. +# +############################################################################### - ac_gnome_config_cflags=$ac_cv_gnome_config_cflags - if test "$ac_gnome_config_cflags" = "" ; then - have_gnome=no - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - else - echo "$as_me:$LINENO: result: $ac_gnome_config_cflags" >&5 -echo "${ECHO_T}$ac_gnome_config_cflags" >&6 - fi - fi +have_motif=no +with_motif_req=unspecified - if test "$have_gnome" = yes -a "$have_gtk" = yes; then - echo "$as_me:$LINENO: checking for Gnome capplet libs" >&5 -echo $ECHO_N "checking for Gnome capplet libs... $ECHO_C" >&6 - if test "${ac_cv_gnome_config_libs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +# Check whether --with-motif or --without-motif was given. +if test "${with_motif+set}" = set; then + withval="$with_motif" + with_motif="$withval"; with_motif_req="$withval" else - if ( $gnome_config --libs $gnome_config_libs 2>&1 | - grep Unknown >/dev/null ) ; then - ac_cv_gnome_config_libs='' - else - ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs` - fi -fi - - ac_gnome_config_libs=$ac_cv_gnome_config_libs - if test "$ac_gnome_config_libs" = "" ; then - have_gnome=no - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - else - echo "$as_me:$LINENO: result: $ac_gnome_config_libs" >&5 -echo "${ECHO_T}$ac_gnome_config_libs" >&6 - fi - fi + with_motif=no +fi; - # If we have Gnome, then override the gtk-config values with - # the gnome-config values. - # - if test "$have_gnome" = yes -a "$have_gtk" = yes; then - ac_gtk_config_cflags=$ac_gnome_config_cflags - ac_gtk_config_libs=$ac_gnome_config_libs - cat >>confdefs.h <<\_ACEOF -#define HAVE_CRAPPLET 1 -_ACEOF - fi - - fi # end of {gnome,gtk}-config based tests - - if test "$have_gtk" = yes -a "$have_gtk2" = no; then - # check for this function that was not in libcapplet 1.2. - # (only needed in Gnome/Gtk 1.x, not Gnome/Gtk 2.x) - - 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" - - echo "$as_me:$LINENO: checking for capplet_widget_changes_are_immediate in -lcapplet" >&5 -echo $ECHO_N "checking for capplet_widget_changes_are_immediate in -lcapplet... $ECHO_C" >&6 -if test "${ac_cv_lib_capplet_capplet_widget_changes_are_immediate+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcapplet $ac_gnome_config_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char capplet_widget_changes_are_immediate (); -int -main () -{ -capplet_widget_changes_are_immediate (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_capplet_capplet_widget_changes_are_immediate=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_capplet_capplet_widget_changes_are_immediate=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&5 -echo "${ECHO_T}$ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&6 -if test $ac_cv_lib_capplet_capplet_widget_changes_are_immediate = yes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_CRAPPLET_IMMEDIATE 1 -_ACEOF - -else - true -fi - - CPPFLAGS="$ac_save_CPPFLAGS" - LDFLAGS="$ac_save_LDFLAGS" -# LIBS="$ac_save_LIBS" - - fi - - - GNOME_DATADIR="" - if test "$have_gtk" = yes; then - if test -n "$pkg_config"; then - if test "$have_gtk2" = yes; then - GNOME_DATADIR=`$pkg_config --variable=prefix gtk+-2.0` - else - GNOME_DATADIR=`$pkg_config --variable=prefix gtk+` - fi - else - GNOME_DATADIR=`$gtk_config --prefix` - fi - GNOME_DATADIR="$GNOME_DATADIR/share" - fi - - # .desktop files go in different places in Gnome 1.x and Gnome 2.x... - if test "$have_gtk2" = yes; then - GNOME_PANELDIR='$(GNOME_PANELDIR2)' - else - GNOME_PANELDIR='$(GNOME_PANELDIR1)' - fi - - - if test "$have_gtk" = yes; then - INCLUDES="$INCLUDES $ac_gtk_config_cflags" - GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs" - cat >>confdefs.h <<\_ACEOF -#define HAVE_GTK 1 -_ACEOF - - - if test "$have_gtk2" = yes; then - GTK_EXTRA_OBJS="" - else - GTK_EXTRA_OBJS="\$(GTK_EXTRA_OBJS)" - fi - fi - -fi - - -# Check for the Gnome Help Browser. -# -if test "$have_gtk" = yes; then - for ac_prog in yelp gnome-help-browser -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_have_gnome_help+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$have_gnome_help"; then - ac_cv_prog_have_gnome_help="$have_gnome_help" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_have_gnome_help="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -have_gnome_help=$ac_cv_prog_have_gnome_help -if test -n "$have_gnome_help"; then - echo "$as_me:$LINENO: result: $have_gnome_help" >&5 -echo "${ECHO_T}$have_gnome_help" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$have_gnome_help" && break -done -test -n "$have_gnome_help" || have_gnome_help="no" - - if test "$have_gnome_help" != no; then - have_gnome_help=yes - fi -fi - - -############################################################################### -# -# Check for -lxml -# -############################################################################### - -have_xml=no -with_xml_req=unspecified -xml_halfassed=no - -# Check whether --with-xml or --without-xml was given. -if test "${with_xml+set}" = set; then - withval="$with_xml" - with_xml="$withval"; with_xml_req="$withval" -else - with_xml=yes -fi; - -# if --with-xml=/directory/ was specified, remember that directory so that -# we can also look for the `xml-config' program in that directory. -case "$with_xml" in - /*) - xml_dir="$with_xml" - ;; - *) - xml_dir="" - ;; -esac - - - case "$with_xml" in + case "$with_motif" in yes) ;; no) ;; /*) - echo "$as_me:$LINENO: checking for XML headers" >&5 -echo $ECHO_N "checking for XML headers... $ECHO_C" >&6 - d=$with_xml/include + echo "$as_me:$LINENO: checking for Motif headers" >&5 +echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6 + d=$with_motif/include if test -d $d; then X_CFLAGS="-I$d $X_CFLAGS" echo "$as_me:$LINENO: result: $d" >&5 @@ -15672,9 +14949,9 @@ echo "${ECHO_T}$d" >&6 echo "${ECHO_T}not found ($d: no such directory)" >&6 fi - echo "$as_me:$LINENO: checking for XML libs" >&5 -echo $ECHO_N "checking for XML libs... $ECHO_C" >&6 - d=$with_xml/lib + echo "$as_me:$LINENO: checking for Motif libs" >&5 +echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6 + d=$with_motif/lib if test -d $d; then X_LIBS="-L$d $X_LIBS" echo "$as_me:$LINENO: result: $d" >&5 @@ -15685,13 +14962,13 @@ echo "${ECHO_T}not found ($d: no such directory)" >&6 fi # replace the directory string with "yes". - with_xml_req="yes" - with_xml=$with_xml_req + with_motif_req="yes" + with_motif=$with_motif_req ;; *) echo "" - echo "error: argument to --with-xml must be \"yes\", \"no\", or a directory." + echo "error: argument to --with-motif 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 @@ -15699,171 +14976,22 @@ echo "${ECHO_T}not found ($d: no such directory)" >&6 esac -if test "$with_xml" != yes -a "$with_xml" != no ; then - echo "error: must be yes or no: --with-xml=$with_xml" +if test "$with_motif" != yes -a "$with_motif" != no ; then + echo "error: must be yes or no: --with-motif=$with_motif" exit 1 fi -if test "$with_xml" = yes; then - have_xml=no - have_old_xml=no - - # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then - # look in /foo/bin/ for for xml-config. - # - xml_path="$PATH" - - if test ! -z "$gtk_dir"; then - # canonicalize slashes. - foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'` - xml_path="$foo:$xml_path" - fi - - if test ! -z "$gnome_dir"; then - # canonicalize slashes. - foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'` - xml_path="$foo:$xml_path" - fi - - if test -n "$pkg_config" ; then - # - # the new way... - # run pkg-config based tests. - # - pkgs="" - ok="yes" - - # If we have Gtk 2.x, then *only* XML 2.x will work. - # If we have Gtk 1.x, or don't have Gtk at all, then - # either XML 1.x or 2.x will work. - - # First check for XML 2.x. - # - pkg_check_version libxml-2.0 2.4.6 - - # If that didn't work (we don't have XML 2.x) and we *don't* have - # Gtk 2.x, then check to see if we have XML 1.x - # - if test "$ok" = no -a "$have_gtk2" = no; then - ok=yes - pkg_check_version libxml 1.0 - fi - - have_xml="$ok" - - if test "$have_xml" = yes; then - echo "$as_me:$LINENO: checking for XML includes" >&5 -echo $ECHO_N "checking for XML includes... $ECHO_C" >&6 -if test "${ac_cv_xml_config_cflags+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_xml_config_cflags=`$pkg_config --cflags $pkgs` -fi -echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5 -echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6 - echo "$as_me:$LINENO: checking for XML libs" >&5 -echo $ECHO_N "checking for XML libs... $ECHO_C" >&6 -if test "${ac_cv_xml_config_libs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_xml_config_libs=`$pkg_config --libs $pkgs` -fi -echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5 -echo "${ECHO_T}$ac_cv_xml_config_libs" >&6 - ac_xml_config_cflags=$ac_cv_xml_config_cflags - ac_xml_config_libs=$ac_cv_xml_config_libs - fi - - else - # - # the old way... - # run {xml2,xml}-config based tests. - # - - for ac_prog in xml2-config xml-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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_xml_config+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $xml_config in - [\\/]* | ?:[\\/]*) - ac_cv_path_xml_config="$xml_config" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $xml_path -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_xml_config="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - ;; -esac -fi -xml_config=$ac_cv_path_xml_config - -if test -n "$xml_config"; then - echo "$as_me:$LINENO: result: $xml_config" >&5 -echo "${ECHO_T}$xml_config" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$xml_config" && break -done - - - # If we found the xml-config program, run it to get flags. - # - if test -n "$xml_config" ; then - echo "$as_me:$LINENO: checking for XML includes" >&5 -echo $ECHO_N "checking for XML includes... $ECHO_C" >&6 -if test "${ac_cv_xml_config_cflags+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_xml_config_cflags=`$xml_config --cflags` -fi -echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5 -echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6 - echo "$as_me:$LINENO: checking for XML libs" >&5 -echo $ECHO_N "checking for XML libs... $ECHO_C" >&6 -if test "${ac_cv_xml_config_libs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_xml_config_libs=`$xml_config --libs` -fi -echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5 -echo "${ECHO_T}$ac_cv_xml_config_libs" >&6 - ac_xml_config_cflags=$ac_cv_xml_config_cflags - ac_xml_config_libs=$ac_cv_xml_config_libs - fi - - ac_save_xml_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $ac_xml_config_cflags" - - # first try which is the new way... - # +if test "$with_motif" = yes; then + have_motif=no ac_save_CPPFLAGS="$CPPFLAGS" if test \! -z "$includedir" ; then CPPFLAGS="$CPPFLAGS -I$includedir" fi CPPFLAGS="$CPPFLAGS $X_CFLAGS" - echo "$as_me:$LINENO: checking for libxml/xmlIO.h" >&5 -echo $ECHO_N "checking for libxml/xmlIO.h... $ECHO_C" >&6 -if test "${ac_cv_header_libxml_xmlIO_h+set}" = set; then + echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5 +echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6 +if test "${ac_cv_header_Xm_Xm_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -15872,9 +15000,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include + #include + #include -#include +#include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -15898,246 +15028,58 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_header_libxml_xmlIO_h=yes + ac_cv_header_Xm_Xm_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_libxml_xmlIO_h=no +ac_cv_header_Xm_Xm_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_libxml_xmlIO_h" >&5 -echo "${ECHO_T}$ac_cv_header_libxml_xmlIO_h" >&6 -if test $ac_cv_header_libxml_xmlIO_h = yes; then - have_xml=yes -fi - - - CPPFLAGS="$ac_save_CPPFLAGS" - - # if that didn't work, then try just which is the old way... - # - if test "$have_xml" = no; then - - ac_save_CPPFLAGS="$CPPFLAGS" - if test \! -z "$includedir" ; then - CPPFLAGS="$CPPFLAGS -I$includedir" - fi - CPPFLAGS="$CPPFLAGS $X_CFLAGS" - echo "$as_me:$LINENO: checking for xmlIO.h" >&5 -echo $ECHO_N "checking for xmlIO.h... $ECHO_C" >&6 -if test "${ac_cv_header_xmlIO_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -#include +echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5 +echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6 +if test $ac_cv_header_Xm_Xm_h = yes; then + have_motif=yes + cat >>confdefs.h <<\_ACEOF +#define HAVE_MOTIF 1 _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_xmlIO_h=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_xmlIO_h=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_header_xmlIO_h" >&5 -echo "${ECHO_T}$ac_cv_header_xmlIO_h" >&6 -if test $ac_cv_header_xmlIO_h = yes; then - have_xml=yes; have_old_xml=yes + MOTIF_LIBS="$MOTIF_LIBS -lXm" fi CPPFLAGS="$ac_save_CPPFLAGS" - fi - - CPPFLAGS="$ac_save_xml_CPPFLAGS" - fi - - - have_zlib=no - if test "$have_xml" = yes; then - # we have the XML headers; now make sure zlib is around. - # yes, it's stupid we have to do this too, but there is - # dependency screwage in Gnome. - - 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" - - echo "$as_me:$LINENO: checking for zlibVersion in -lz" >&5 -echo $ECHO_N "checking for zlibVersion in -lz... $ECHO_C" >&6 -if test "${ac_cv_lib_z_zlibVersion+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lz $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char zlibVersion (); -int -main () -{ -zlibVersion (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_z_zlibVersion=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_z_zlibVersion=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_z_zlibVersion" >&5 -echo "${ECHO_T}$ac_cv_lib_z_zlibVersion" >&6 -if test $ac_cv_lib_z_zlibVersion = yes; then - have_zlib=yes -fi - - CPPFLAGS="$ac_save_CPPFLAGS" - LDFLAGS="$ac_save_LDFLAGS" -# LIBS="$ac_save_LIBS" - if test "$have_zlib" = no; then - xml_halfassed=yes - have_xml=no - fi - fi - if test "$have_xml" = yes; then - # we have the header, now check for the library - have_xml=no - xml_halfassed=yes +if test "$have_motif" = 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" - - echo "$as_me:$LINENO: checking for xmlParseChunk in -lc" >&5 -echo $ECHO_N "checking for xmlParseChunk in -lc... $ECHO_C" >&6 -if test "${ac_cv_lib_c_xmlParseChunk+set}" = set; then + echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5 +echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6 +if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lc $ac_xml_config_libs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char xmlParseChunk (); -int -main () -{ -xmlParseChunk (); - ; - return 0; -} +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + #include + +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -16151,58 +15093,32 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_c_xmlParseChunk=yes + ac_cv_header_Xm_ComboBox_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_c_xmlParseChunk=no +ac_cv_header_Xm_ComboBox_h=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_lib_c_xmlParseChunk" >&5 -echo "${ECHO_T}$ac_cv_lib_c_xmlParseChunk" >&6 -if test $ac_cv_lib_c_xmlParseChunk = yes; then - have_xml=yes - xml_halfassed=no - XML_LIBS="$ac_xml_config_libs" - cat >>confdefs.h <<\_ACEOF -#define HAVE_XML 1 +echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5 +echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6 +if test $ac_cv_header_Xm_ComboBox_h = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_XMCOMBOBOX 1 _ACEOF -else - true fi - CPPFLAGS="$ac_save_CPPFLAGS" - LDFLAGS="$ac_save_LDFLAGS" -# LIBS="$ac_save_LIBS" - - fi - - if test "$have_xml" = yes; then - INCLUDES="$INCLUDES $ac_xml_config_cflags" - GTK_LIBS="$GTK_LIBS $ac_xml_config_libs" - cat >>confdefs.h <<\_ACEOF -#define HAVE_XML 1 -_ACEOF - - if test "$have_old_xml" = yes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_OLD_XML_HEADERS 1 -_ACEOF - - fi - fi + CPPFLAGS="$ac_save_CPPFLAGS" fi @@ -17299,7 +16215,7 @@ if test "${ac_cv_mesagl_version_string+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat > conftest.$ac_ext < #ifndef MESA_MAJOR_VERSION @@ -18058,152 +16974,13 @@ elif test "$with_gle" != no; then fi - -############################################################################### -# -# Check for -lXpm. -# -############################################################################### - -have_xpm=no -with_xpm_req=unspecified - -# Check whether --with-xpm or --without-xpm was given. -if test "${with_xpm+set}" = set; then - withval="$with_xpm" - with_xpm="$withval"; with_xpm_req="$withval" -else - with_xpm=yes -fi; - - - case "$with_xpm" in - yes) ;; - no) ;; - - /*) - echo "$as_me:$LINENO: checking for XPM headers" >&5 -echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6 - d=$with_xpm/include - if test -d $d; then - X_CFLAGS="-I$d $X_CFLAGS" - echo "$as_me:$LINENO: result: $d" >&5 -echo "${ECHO_T}$d" >&6 - else - echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5 -echo "${ECHO_T}not found ($d: no such directory)" >&6 - fi - - echo "$as_me:$LINENO: checking for XPM libs" >&5 -echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6 - d=$with_xpm/lib - if test -d $d; then - X_LIBS="-L$d $X_LIBS" - echo "$as_me:$LINENO: result: $d" >&5 -echo "${ECHO_T}$d" >&6 - else - echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5 -echo "${ECHO_T}not found ($d: no such directory)" >&6 - fi - - # replace the directory string with "yes". - with_xpm_req="yes" - with_xpm=$with_xpm_req - ;; - - *) - echo "" - echo "error: argument to --with-xpm 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_xpm" = yes; then - - ac_save_CPPFLAGS="$CPPFLAGS" - if test \! -z "$includedir" ; then - CPPFLAGS="$CPPFLAGS -I$includedir" - fi - CPPFLAGS="$CPPFLAGS $X_CFLAGS" - echo "$as_me:$LINENO: checking for X11/xpm.h" >&5 -echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6 -if test "${ac_cv_header_X11_xpm_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -#include -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_X11_xpm_h=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_header_X11_xpm_h=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5 -echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6 -if test $ac_cv_header_X11_xpm_h = yes; then - have_xpm=yes - cat >>confdefs.h <<\_ACEOF -#define HAVE_XPM 1 -_ACEOF - - XPM_LIBS="-lXpm" -fi - - - CPPFLAGS="$ac_save_CPPFLAGS" -elif test "$with_xpm" != no; then - echo "error: must be yes or no: --with-xpm=$with_xpm" - exit 1 -fi - -# See comment near $motif_requires_xpm, above. -# Need to do this here, after both Motif and XPM have been checked for. -# -if test "$have_motif" = yes -a "$have_xpm" = yes ; then - if test "$motif_requires_xpm" = yes ; then - MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS" - fi -fi - ############################################################################### # # Check for -lgdk_pixbuf. +# These tests are for gdk_pixbuf usage of the hacks, +# not xscreensaver-demo (thus we have to test again to get +# the libraries right: don't want to pull in all of GTK +# for the hacks.) # ############################################################################### @@ -18260,212 +17037,65 @@ echo "${ECHO_T}not found ($d: no such directory)" >&6 fi # replace the directory string with "yes". - with_gdk_pixbuf_req="yes" - with_gdk_pixbuf=$with_gdk_pixbuf_req - ;; - - *) - echo "" - echo "error: argument to --with-pixbuf 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_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then - echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf" - exit 1 -fi - -if test "$with_gdk_pixbuf" = yes; then - have_gdk_pixbuf=no - have_gdk_pixbuf2=no - - if test -n "$pkg_config" ; then - # - # the new way... - # run pkg-config based tests. - # - pkgs='' - ok="yes" - - # If we have Gtk 2.x, then *only* gdk-pixbuf 2.x will work. - # If we have Gtk 1.x, then *only* gdk-pixbuf 1.x will work. - # If we don't have Gtk at all, then either will work. - - if test "$have_gtk" = no -o "$have_gtk2" = yes; then - # - # we don't have Gtk; or we have Gtk 2.x. Check for pixbuf 2.x. - # - echo "$as_me:$LINENO: result: checking for gdk_pixbuf 2.x with gtk-config based tests..." >&5 -echo "${ECHO_T}checking for gdk_pixbuf 2.x with gtk-config based tests..." >&6 - pkg_check_version gdk-pixbuf-2.0 2.0.0 - pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0 - have_gdk_pixbuf="$ok" - have_gdk_pixbuf2="$ok" - fi - - if test "$have_gtk" = no -o "$have_gtk2" = no; then - # - # we don't have Gtk; or we have Gtk 1.x. - # If we don't have pixbuf 2.x, then check for pixbuf 1.x. - # - if test "$have_gdk_pixbuf2" = no; then - pkgs='' - ok="yes" - echo "$as_me:$LINENO: result: checking for gdk_pixbuf 1.x with gtk-config based tests..." >&5 -echo "${ECHO_T}checking for gdk_pixbuf 1.x with gtk-config based tests..." >&6 - pkg_check_version gdk_pixbuf 0.0 - pkg_check_version gdk_pixbuf_xlib 0.0 - have_gdk_pixbuf="$ok" - fi - fi - - if test "$have_gdk_pixbuf" = yes; then - echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5 -echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6 -if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs` -fi -echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5 -echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6 - echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5 -echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6 -if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs` -fi -echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5 -echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6 - fi - ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags - ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs - fi - - - if test "$have_gdk_pixbuf" = no; then - # - # the old way... - # run gdk-pixbuf-config based tests. - # note that we can't assume that the existence of "pkg-config" means - # that we don't have to look for gdk-pixbuf-config -- in Gnome 1.4, - # pkg-config exists, but doesn't know about pixbuf. - # - - echo "$as_me:$LINENO: result: checking for gdk_pixbuf with gdk-pixbuf-config based tests..." >&5 -echo "${ECHO_T}checking for gdk_pixbuf with gdk-pixbuf-config based tests..." >&6 - - # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then - # look in /foo/bin/ for for gdk-pixbuf-config. - # - gdk_pixbuf_path="$PATH" - - if test ! -z "$gtk_dir"; then - # canonicalize slashes. - foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'` - gdk_pixbuf_path="$foo:$gdk_pixbuf_path" - fi + with_gdk_pixbuf_req="yes" + with_gdk_pixbuf=$with_gdk_pixbuf_req + ;; - if test ! -z "$gnome_dir"; then - # canonicalize slashes. - foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'` - gdk_pixbuf_path="$foo:$gdk_pixbuf_path" - fi + *) + echo "" + echo "error: argument to --with-pixbuf 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 - for ac_prog in gdk-pixbuf-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 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_gdk_pixbuf_config+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $gdk_pixbuf_config in - [\\/]* | ?:[\\/]*) - ac_cv_path_gdk_pixbuf_config="$gdk_pixbuf_config" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $gdk_pixbuf_path -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_gdk_pixbuf_config="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - ;; -esac +if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then + echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf" + exit 1 fi -gdk_pixbuf_config=$ac_cv_path_gdk_pixbuf_config -if test -n "$gdk_pixbuf_config"; then - echo "$as_me:$LINENO: result: $gdk_pixbuf_config" >&5 -echo "${ECHO_T}$gdk_pixbuf_config" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +if test "$with_gdk_pixbuf" = yes; then + have_gdk_pixbuf=no - test -n "$gdk_pixbuf_config" && break -done + pkgs='' + ok="yes" + pkg_check_version gdk-pixbuf-2.0 2.0.0 + pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0 + have_gdk_pixbuf="$ok" - # If we found the gdk-pixbuf-config program, run it to get flags. - # - if test -n "$gdk_pixbuf_config" ; then - echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5 + if test "$have_gdk_pixbuf" = yes; then + echo "$as_me:$LINENO: checking for gdk-pixbuf includes" >&5 echo $ECHO_N "checking for gdk-pixbuf includes... $ECHO_C" >&6 if test "${ac_cv_gdk_pixbuf_config_cflags+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_gdk_pixbuf_config_cflags=`$gdk_pixbuf_config --cflags` + ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs` fi echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_cflags" >&5 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_cflags" >&6 - echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5 + echo "$as_me:$LINENO: checking for gdk-pixbuf libs" >&5 echo $ECHO_N "checking for gdk-pixbuf libs... $ECHO_C" >&6 if test "${ac_cv_gdk_pixbuf_config_libs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_gdk_pixbuf_config_libs=`$gdk_pixbuf_config --libs` + ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs` fi echo "$as_me:$LINENO: result: $ac_cv_gdk_pixbuf_config_libs" >&5 echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6 - - # note that "gdk-pixbuf-config --libs" produces a link line including - # -lgdk_pixbuf, but there's no way to get it to produce one that also - # includes -lgdk_pixbuf_xlib. Since we don't know *exactly* what the - # name of the library will be, construct it with sed... - # M4 sucks!! - - ac_cv_gdk_pixbuf_config_libs=`echo $ac_cv_gdk_pixbuf_config_libs | \ - sed 's@ \(-lgdk_pixbuf\([-_a-zA-Z0-9.]*\)\) @ \1 -lgdk_pixbuf_xlib\2 @'` - - - ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags - ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs - fi fi + ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags + ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs - ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags" - if test "$have_gdk_pixbuf" = no; then + if test "$have_gdk_pixbuf" = yes; then # # we appear to have pixbuf; check for headers/libs to be sure. # + ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags" have_gdk_pixbuf=no @@ -18931,15 +17561,17 @@ fi CPPFLAGS="$ac_save_CPPFLAGS" fi fi + CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS" fi - CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS" - if test "$have_gdk_pixbuf" = yes; then # we have the headers, now check for the libraries have_gdk_pixbuf=no gdk_pixbuf_halfassed=yes + echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability..." >&5 +echo "${ECHO_T}checking for gdk_pixbuf usability..." >&6 + # library A... ac_save_CPPFLAGS="$CPPFLAGS" @@ -19134,7 +17766,151 @@ fi _ACEOF else - have_gdk_pixbuf2=no + echo "$as_me:$LINENO: result: checking for gdk_pixbuf usability... no" >&5 +echo "${ECHO_T}checking for gdk_pixbuf usability... no" >&6 + fi +fi + + +############################################################################### +# +# Check for -lXpm. +# +############################################################################### + +have_xpm=no +with_xpm_req=unspecified + +# Check whether --with-xpm or --without-xpm was given. +if test "${with_xpm+set}" = set; then + withval="$with_xpm" + with_xpm="$withval"; with_xpm_req="$withval" +else + with_xpm=yes +fi; + + + case "$with_xpm" in + yes) ;; + no) ;; + + /*) + echo "$as_me:$LINENO: checking for XPM headers" >&5 +echo $ECHO_N "checking for XPM headers... $ECHO_C" >&6 + d=$with_xpm/include + if test -d $d; then + X_CFLAGS="-I$d $X_CFLAGS" + echo "$as_me:$LINENO: result: $d" >&5 +echo "${ECHO_T}$d" >&6 + else + echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5 +echo "${ECHO_T}not found ($d: no such directory)" >&6 + fi + + echo "$as_me:$LINENO: checking for XPM libs" >&5 +echo $ECHO_N "checking for XPM libs... $ECHO_C" >&6 + d=$with_xpm/lib + if test -d $d; then + X_LIBS="-L$d $X_LIBS" + echo "$as_me:$LINENO: result: $d" >&5 +echo "${ECHO_T}$d" >&6 + else + echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5 +echo "${ECHO_T}not found ($d: no such directory)" >&6 + fi + + # replace the directory string with "yes". + with_xpm_req="yes" + with_xpm=$with_xpm_req + ;; + + *) + echo "" + echo "error: argument to --with-xpm 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_xpm" = yes; then + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + echo "$as_me:$LINENO: checking for X11/xpm.h" >&5 +echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6 +if test "${ac_cv_header_X11_xpm_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_X11_xpm_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_X11_xpm_h=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5 +echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6 +if test $ac_cv_header_X11_xpm_h = yes; then + have_xpm=yes + cat >>confdefs.h <<\_ACEOF +#define HAVE_XPM 1 +_ACEOF + + XPM_LIBS="-lXpm $XPM_LIBS" +fi + + + CPPFLAGS="$ac_save_CPPFLAGS" +elif test "$with_xpm" != no; then + echo "error: must be yes or no: --with-xpm=$with_xpm" + exit 1 +fi + +# See comment near $motif_requires_xpm, above. +# Need to do this here, after both Motif and XPM have been checked for. +# +if test "$have_motif" = yes -a "$have_xpm" = yes ; then + if test "$motif_requires_xpm" = yes ; then + MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS" fi fi @@ -20974,20 +19750,12 @@ fi # It should usually be "/usr/share/pixmaps/", but we can't just use # "$(prefix)/share/pixmaps" because that would usually result in # "/usr/X11R6/share/pixmaps/", which is wrong. It needs to be the -# Gnome/Gtk prefix, not the overall prefix. +# Gtk prefix, not the overall prefix. # if test -n "$GNOME_DATADIR" ; then GLADE_DATADIR='$(GNOME_DATADIR)/xscreensaver' elif test "$have_gtk" = yes; then - if test -n "$pkg_config"; then - if test "$have_gtk2" = yes; then - GLADE_DATADIR=`$pkg_config --variable=prefix gtk+-2.0` - else - GLADE_DATADIR=`$pkg_config --variable=prefix gtk+` - fi - else - GLADE_DATADIR=`$gtk_config --prefix` - fi + GLADE_DATADIR=`$pkg_config --variable=prefix gtk+-2.0` GLADE_DATADIR="$GLADE_DATADIR/share/xscreensaver" else GLADE_DATADIR='' @@ -21001,15 +19769,7 @@ echo $ECHO_N "checking for locale directory... $ECHO_C" >&6 if test -n "$GNOME_DATADIR" ; then PO_DATADIR="$GNOME_DATADIR" elif test "$have_gtk" = yes; then - if test -n "$pkg_config"; then - if test "$have_gtk2" = yes; then - PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0` - else - PO_DATADIR=`$pkg_config --variable=prefix gtk+` - fi - else - PO_DATADIR=`$gtk_config --prefix` - fi + PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0` PO_DATADIR="$PO_DATADIR/share" fi @@ -21815,12 +20575,7 @@ s,@POFILES@,$POFILES,;t t s,@POSUB@,$POSUB,;t t s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t s,@pkg_config@,$pkg_config,;t t -s,@glib_config@,$glib_config,;t t -s,@gtk_config@,$gtk_config,;t t -s,@gnome_config@,$gnome_config,;t t s,@have_gnome_help@,$have_gnome_help,;t t -s,@xml_config@,$xml_config,;t t -s,@gdk_pixbuf_config@,$gdk_pixbuf_config,;t t s,@fortune_tmp@,$fortune_tmp,;t t s,@INCLUDES@,$INCLUDES,;t t s,@PREFERRED_DEMO_PROGRAM@,$PREFERRED_DEMO_PROGRAM,;t t @@ -22620,6 +21375,19 @@ if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then warn "Checking of /proc/interrupts was requested, but it's bogus." fi + +if test "$gtk_halfassed" != no ; then + warnL "GTK version $gtk_halfassed was found, but at least one supporting" + warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used." + warn2 "Perhaps some of the development packages are not installed?" + if test "$have_gtk" = yes ; then + v="$ac_gtk_version_string" + warn2 "GTK $v is also installed, so it will be used instead." + warn2 "Please read the above output and the \`config.log' file" + warn2 "for more details." + fi +fi + motif_warn2() { warn2 'Though the Motif front-end to xscreensaver is still' warn2 'maintained, it is no longer being updated with new' @@ -22639,10 +21407,10 @@ if test "$have_motif" = no -a "$have_gtk" = no; then else warnL "The GTK libraries do not seem to be available; the" warn2 "\`xscreensaver-demo' program requires them." - echo '' - warn2 'You can use Motif or Lesstif instead of GTK (use the' - warn2 "\`--with-motif' option) but that is NOT recommended." - motif_warn2 +# echo '' +# warn2 'You can use Motif or Lesstif instead of GTK (use the' +# warn2 "\`--with-motif' option) but that is NOT recommended." +# motif_warn2 fi elif test "$with_motif_req" = yes -a "$have_motif" = no ; then @@ -22651,7 +21419,7 @@ elif test "$with_motif_req" = yes -a "$have_motif" = no ; then elif test "$jurassic_gtk" = yes ; then - pref_gtk=1.2 + pref_gtk=2.0 v="$ac_gtk_version_string" if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then @@ -22668,56 +21436,6 @@ elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then warnL "Use of Gtk was requested, but it wasn't found." fi -if test "$gtk2_halfassed" != no ; then - warnL "GTK version $gtk2_halfassed was found, but at least one supporting" - warn2 "library ($gtk2_halfassed_lib) was not, so GTK 2.x can't be used." - if test "$have_gtk" = yes ; then - v="$ac_gtk_version_string" - warn2 "GTK $v is also installed, so it will be used instead." - warn2 "Please read the above output and the \`config.log' file" - warn2 "for more details." - fi -fi - - -if test "$with_gnome_req" = yes -a "$have_gnome" = no \ - -a "$have_gtk2" = no; then - # don't issue this warning if we have GTK2 -- in that case, the - # Gnome-specific code isn't needed. - warn 'Use of the Gnome Control Panel was requested, but the necessary' - warn2 'headers and/or libraries were not found.' -fi - -if test "$have_gtk" = yes ; then - if test "$have_xml" = no ; then - if test "$with_xml_req" = yes ; then - warn 'Use of the XML library was requested, but the necessary' - warn2 'headers and/or libraries were not found.' - else - warn 'GTK is being used, but the XML library was not found.' - fi - - if test "$xml_halfassed" = yes ; then - - if test "$have_zlib" = yes ; then - which="XML libraries" - else - which="\`zlib' library" - fi - - echo '' - warn2 'More specifically, we found the headers, but not the' - warn2 "$which; so either XML is half-installed on this" - warn2 "system, or something else went wrong. The \`config.log'" - warn2 'file might contain some clues.' - fi - - echo '' - warn2 "Without XML, the per-display-mode \`Settings' dialogs" - warn2 'will not be available. Specify the location of the XML' - warn2 'library through the --with-xml option to configure.' - fi -fi if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then warn "GTK is being used, but the GDK-Pixbuf library and/or" @@ -22759,8 +21477,16 @@ if test "$with_gdk_pixbuf_req" = yes -a "$have_gdk_pixbuf" = no; then warnL 'Use of GDK-Pixbuf was requested, but it was not found.' fi -if test "$have_xpm" = no -a "$have_gdk_pixbuf" = no || \ - test "$gdk_pixbuf_halfassed" = yes; then +if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \ + test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then + + if test "$with_gdk_pixbuf_req" = yes ; then + true + elif test "$with_gdk_pixbuf_req" = no ; then + warnL 'The GDK-Pixbuf library is not being used.' + else + warnL 'The GDK-Pixbuf library was not found.' + fi if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then true @@ -22770,12 +21496,8 @@ if test "$have_xpm" = no -a "$have_gdk_pixbuf" = no || \ warnL 'The XPM library was not found.' fi - if test "$with_gdk_pixbuf_req" = yes ; then - true - elif test "$with_gdk_pixbuf_req" = no ; then - warnL 'The GDK-Pixbuf library is not being used.' - else - warnL 'The GDK-Pixbuf library was not found.' + if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then + warn2 'The XPM library is being used instead.' fi if test "$gdk_pixbuf_halfassed" = yes ; then @@ -22787,15 +21509,10 @@ if test "$have_xpm" = no -a "$have_gdk_pixbuf" = no || \ fi echo '' - warn2 'Some of the demos will not be as colorful as they' - warn2 'could be. You should consider installing Pixbuf or' - warn2 'XPM and re-running configure. The Pixbuf library is' - warn2 'a part of GNOME. The XPM library comes with most' - warn2 'X11 installations; you can also find it at the X11' - warn2 'archive sites, such as .' - echo '' - warn2 'GDK-Pixbuf is recommended over XPM, as it provides' - warn2 'support for more image formats.' + warn2 'Some of the demos will not use images as much as they could.' + warn2 'You should consider installing GDK-Pixbuf and re-running' + warn2 'configure. (GDK-Pixbuf is recommended over XPM, as it' + warn2 'provides support for more image formats.)' fi @@ -23004,7 +21721,8 @@ if test \! -z "$rpmv" ; then 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. See the RPM documentation for more info." + warn2 'file is included. Try "rpmbuild -v -ba xscreensaver.spec".' + warn2 "See the RPM documentation for more info." echo "" if test "$rpmbdir" = "$rpmhdir" ; then diff --git a/configure.in b/configure.in index 740cd97f..7559754d 100644 --- a/configure.in +++ b/configure.in @@ -34,6 +34,7 @@ AC_DEFUN(AC_PROG_CC_ANSI, [AC_PROG_CC if test -z "$GCC"; then + # not using GCC AC_MSG_CHECKING(how to request ANSI compilation) case "$host" in *-hpux* ) @@ -44,16 +45,22 @@ AC_DEFUN(AC_PROG_CC_ANSI, AC_MSG_RESULT(AIX: adding -qlanglvl=ansi -qhalt=e) CC="$CC -qlanglvl=ansi -qhalt=e" ;; - *-dec-* ) AC_MSG_RESULT(DEC: adding -std1 -ieee) CC="$CC -std1" ;; - *) AC_MSG_RESULT(no idea) ;; esac + else + # using GCC + case "$host" in + *-solaris*) + AC_MSG_RESULT(Solaris: adding -D__EXTENSIONS__) + CC="$CC -D__EXTENSIONS__" + ;; + esac fi OBJCC="$CC" @@ -1002,9 +1009,9 @@ with_configdir_req=unspecified AC_ARG_WITH(configdir, [ --with-configdir=DIR Where to install the data files that describe each of the display modes to the GUI. - Default: `GNOMEPREFIX/control-center/screensavers/' + Default: `GTK_PREFIX/control-center/screensavers/' or `PREFIX/lib/xscreensaver/config/', depending on - whether GNOME is available. + whether GTK is available. ], [with_configdir="$withval"; with_configdir_req="$withval"], [with_configdir=yes]) @@ -1496,7 +1503,7 @@ if test "$with_proc_interrupts" = yes; then AC_CACHE_CHECK([whether /proc/interrupts contains keyboard data], ac_cv_have_proc_interrupts, [ac_cv_have_proc_interrupts=no - if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then + if grep 'keyboard\|i8042' /proc/interrupts >/dev/null 2>&1 ; then ac_cv_have_proc_interrupts=yes fi ]) @@ -1995,48 +2002,6 @@ case "$with_passwd_helper" in esac -############################################################################### -# -# Check for -lXm. -# -############################################################################### - -have_motif=no -with_motif_req=unspecified -AC_ARG_WITH(motif,[ -User interface options: - - --with-motif Use the Motif toolkit for the user interface - (not recommended.)], - [with_motif="$withval"; with_motif_req="$withval"],[with_motif=no]) - -HANDLE_X_PATH_ARG(with_motif, --with-motif, Motif) - -if test "$with_motif" != yes -a "$with_motif" != no ; then - echo "error: must be yes or no: --with-motif=$with_motif" - exit 1 -fi - -if test "$with_motif" = yes; then - have_motif=no - AC_CHECK_X_HEADER(Xm/Xm.h, - [have_motif=yes - AC_DEFINE(HAVE_MOTIF) - MOTIF_LIBS="$MOTIF_LIBS -lXm"],, - [#include - #include - #include ]) -fi - - -if test "$have_motif" = yes; then - AC_CHECK_X_HEADER(Xm/ComboBox.h, [AC_DEFINE(HAVE_XMCOMBOBOX)],, - [#include - #include - #include ]) -fi - - ############################################################################### # # Check for -lgtk (and Gnome stuff) @@ -2044,10 +2009,11 @@ fi ############################################################################### have_gtk=no -have_gtk2=no with_gtk_req=unspecified -AC_ARG_WITH(gtk, -[ --with-gtk Use the Gtk toolkit for the user interface.], +AC_ARG_WITH(gtk,[ +User interface options: + + --with-gtk Use the Gtk toolkit for the user interface.], [with_gtk="$withval"; with_gtk_req="$withval"],[with_gtk=yes]) # if --with-gtk=/directory/ was specified, remember that directory so that @@ -2068,31 +2034,6 @@ if test "$with_gtk" != yes -a "$with_gtk" != no ; then exit 1 fi -have_gnome=no -with_gnome_req=unspecified -AC_ARG_WITH(gnome, -[ --with-gnome Include support for the Gnome 1.x Control Center. - (This option is not needed with GTK 2.x / Gnome 2.x.) -], - [with_gnome="$withval"; with_gnome_req="$withval"],[with_gnome=yes]) - -# if --with-gnome=/directory/ was specified, remember that directory so that -# we can also look for the `gnome-config' program in that directory. -case "$with_gnome" in - /*) - gnome_dir="$with_gnome" - ;; - *) - gnome_dir="" - ;; -esac - -HANDLE_X_PATH_ARG(with_gnome, --with-gnome, Gnome) - -if test "$with_gnome" != yes -a "$with_gnome" != no ; then - echo "error: must be yes or no: --with-gnome=$with_gnome" - exit 1 -fi parse_gtk_version_string() { # M4 sucks!! @@ -2107,274 +2048,102 @@ 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 -jurassic_gtk=no -gtk2_halfassed=no - -if test "$with_gtk" = yes; then - have_gtk=no - - # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then - # look in /foo/bin/ for glib-config, gtk-config, and gnome-config. - # - 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 - - if test ! -z "$gnome_dir"; then - # canonicalize slashes. - foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'` - gtk_path="$foo:$gtk_path" - fi - - AC_PATH_PROGS(pkg_config, pkg-config,, $gtk_path) - - if test -n "$pkg_config" ; then - # - # the new way... - # run pkg-config based tests. - # - pkgs='' - pkg_check_version() { - if test "$ok" = yes ; then - req="$1" - min="$2" - AC_MSG_CHECKING(for $req) - if $pkg_config --exists "$req" ; then - vers=`$pkg_config --modversion "$req"` - if $pkg_config --exists "$req >= $min" ; then - AC_MSG_RESULT($vers) - pkgs="$pkgs $req" - return 1 - else - AC_MSG_RESULT($vers (wanted >= $min)) - ok=no - return 0 - fi - else - AC_MSG_RESULT(no) - ok=no - return 0 - fi - fi - } - - AC_MSG_RESULT(checking for GTK 2.x with pkg-config based tests...) - - ok="yes" - pkg_check_version gtk+-2.0 2.0.1 ; 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 0.1 - have_gtk="$ok" - - if test "$have_gtk" = yes; then - have_gtk2=yes - AC_DEFINE(HAVE_GTK2) - else - if test -n "$ac_gtk_version_string" ; then - gtk2_halfassed="$ac_gtk_version_string" - gtk2_halfassed_lib="$req" - fi - fi +AC_PATH_PROGS(pkg_config, pkg-config,, $gtk_path) - if test "$have_gtk" = no; then - # - # we don't have GTK 2. Let's look for GTK 1. - # - AC_MSG_RESULT(checking for GTK 1.x with pkg-config based tests...) +if test -z "$pkg_config" ; then + AC_MSG_WARN([pkg-config not found!]) + pkg_config="false" +fi - pkgs='' - ok="yes" - pkg_check_version gtk+ 1.2 ; ac_gtk_version_string="$vers" - pkg_check_version glib 1.0 - pkg_check_version gdk_pixbuf 0.1 - have_gtk="$ok" - # Now check for Gnome... - # - if test "$have_gtk" = yes -a "$with_gnome" = yes; then - old_pkgs="$pkgs" - ok=yes - pkg_check_version capplet 1.0 - pkg_check_version gnomeui 1.0 - pkg_check_version gdk_pixbuf 0.1 - have_gnome="$ok" - - if test "$have_gnome" = no; then - pkgs="$old_pkgs" - else - AC_DEFINE(HAVE_CRAPPLET) - fi +# Utility function for running pkg-config-based tests... +# +pkgs='' +pkg_check_version() { + if test "$ok" = yes ; then + req="$1" + min="$2" + AC_MSG_CHECKING(for $req) + if $pkg_config --exists "$req" ; then + vers=`$pkg_config --modversion "$req"` + if $pkg_config --exists "$req >= $min" ; then + AC_MSG_RESULT($vers) + pkgs="$pkgs $req" + return 1 + else + AC_MSG_RESULT($vers (wanted >= $min)) + ok=no + return 0 fi - fi - - if test "$have_gtk" = yes; then - parse_gtk_version_string - jurassic_gtk=no else - have_gnome=no - fi - - if test "$have_gtk" = yes; then - AC_CACHE_CHECK([for Gtk includes], ac_cv_gtk_config_cflags, - [ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`]) - AC_CACHE_CHECK([for Gtk libs], ac_cv_gtk_config_libs, - [ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`]) - fi - ac_gtk_config_cflags=$ac_cv_gtk_config_cflags - ac_gtk_config_libs=$ac_cv_gtk_config_libs - - ac_gnome_config_cflags=$ac_gtk_config_cflags - ac_gnome_config_libs=$ac_gtk_config_libs - - else - # - # the old way... - # run {gnome,gtk}-config based tests. - # - AC_MSG_RESULT(checking for GTK 1.x with gtk-config based tests...) - - AC_PATH_PROGS(glib_config, glib12-config glib-config,, $gtk_path) - AC_PATH_PROGS(gtk_config, gtk12-config gtk-config,, $gtk_path) - - if test "$with_gnome" = yes; then - AC_PATH_PROGS(gnome_config, gnome-config,, $gtk_path) - fi - - if test -n "$glib_config" -a -n "$gtk_config" ; then - have_gtk=yes - if test "$with_gnome" = yes -a -n "$gnome_config" ; then - have_gnome=yes - fi - fi - - if test "$have_gtk" = yes; then - AC_CACHE_CHECK([Gtk version number], ac_cv_gtk_version_string, - [ac_cv_gtk_version_string=`$gtk_config --version`]) - ac_gtk_version_string=$ac_cv_gtk_version_string - parse_gtk_version_string - fi - - if test "$have_gtk" = yes; then - if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002 - then - have_gtk=no - have_gnome=no - jurassic_gtk=yes - fi + AC_MSG_RESULT(no) + ok=no + return 0 fi + fi +} - if test "$have_gtk" = yes; then - AC_CACHE_CHECK([for Gtk includes], ac_cv_gtk_config_cflags, - [ac_cv_gtk_config_cflags=`$gtk_config --cflags`]) - AC_CACHE_CHECK([for Gtk libs], ac_cv_gtk_config_libs, - [ac_cv_gtk_config_libs=`$gtk_config --libs`]) - fi - ac_gtk_config_cflags=$ac_cv_gtk_config_cflags - ac_gtk_config_libs=$ac_cv_gtk_config_libs - - # Check for Gnome Capplet support. - # Note that this is only needed with Gnome 1.x, not Gnome 2.x. - # In a Gnome 2.x world, libcapplet will not exist. - # (In fact, this likely won't even be checked, since in a Gnome 2.x - # world, we will probably be up in the "$pkg_config" branch instead - # of here in the "$gnome_config" branch.) - # - if test "$have_gnome" = yes -a "$have_gtk" = yes; then - gnome_config_libs="gtk capplet gnomeui gdk_pixbuf" - AC_MSG_CHECKING(for Gnome capplet includes) - AC_CACHE_VAL(ac_cv_gnome_config_cflags, - [if ( $gnome_config --cflags $gnome_config_libs 2>&1 | \ - grep Unknown >/dev/null ) ; then - ac_cv_gnome_config_cflags='' - else - ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs` - fi]) - ac_gnome_config_cflags=$ac_cv_gnome_config_cflags - if test "$ac_gnome_config_cflags" = "" ; then - have_gnome=no - AC_MSG_RESULT(no) - else - AC_MSG_RESULT($ac_gnome_config_cflags) - fi - fi - if test "$have_gnome" = yes -a "$have_gtk" = yes; then - AC_MSG_CHECKING(for Gnome capplet libs) - AC_CACHE_VAL(ac_cv_gnome_config_libs, - [if ( $gnome_config --libs $gnome_config_libs 2>&1 | - grep Unknown >/dev/null ) ; then - ac_cv_gnome_config_libs='' - else - ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs` - fi]) - ac_gnome_config_libs=$ac_cv_gnome_config_libs - if test "$ac_gnome_config_libs" = "" ; then - have_gnome=no - AC_MSG_RESULT(no) - else - AC_MSG_RESULT($ac_gnome_config_libs) - fi - fi +jurassic_gtk=no +gtk_halfassed=no - # If we have Gnome, then override the gtk-config values with - # the gnome-config values. - # - if test "$have_gnome" = yes -a "$have_gtk" = yes; then - ac_gtk_config_cflags=$ac_gnome_config_cflags - ac_gtk_config_libs=$ac_gnome_config_libs - AC_DEFINE(HAVE_CRAPPLET) +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 gmodule-2.0 2.0.0 + pkg_check_version libxml-2.0 2.4.6 + pkg_check_version libglade-2.0 2.0.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" + + if test "$have_gtk" = no; then + if test -n "$ac_gtk_version_string" ; then + gtk_halfassed="$ac_gtk_version_string" + gtk_halfassed_lib="$req" fi + fi - fi # end of {gnome,gtk}-config based tests - - if test "$have_gtk" = yes -a "$have_gtk2" = no; then - # check for this function that was not in libcapplet 1.2. - # (only needed in Gnome/Gtk 1.x, not Gnome/Gtk 2.x) - AC_CHECK_X_LIB(capplet, capplet_widget_changes_are_immediate, - [AC_DEFINE(HAVE_CRAPPLET_IMMEDIATE)], [true], - $ac_gnome_config_libs) + if test "$have_gtk" = yes; then + parse_gtk_version_string + jurassic_gtk=no fi + if test "$have_gtk" = yes; then + AC_CACHE_CHECK([for Gtk includes], ac_cv_gtk_config_cflags, + [ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`]) + AC_CACHE_CHECK([for Gtk libs], ac_cv_gtk_config_libs, + [ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`]) + fi + ac_gtk_config_cflags=$ac_cv_gtk_config_cflags + ac_gtk_config_libs=$ac_cv_gtk_config_libs + GTK_EXTRA_OBJS="" GNOME_DATADIR="" + GNOME_PANELDIR='$(GNOME_PANELDIR2)' if test "$have_gtk" = yes; then - if test -n "$pkg_config"; then - if test "$have_gtk2" = yes; then - GNOME_DATADIR=`$pkg_config --variable=prefix gtk+-2.0` - else - GNOME_DATADIR=`$pkg_config --variable=prefix gtk+` - fi - else - GNOME_DATADIR=`$gtk_config --prefix` - fi + GNOME_DATADIR=`$pkg_config --variable=prefix gtk+-2.0` GNOME_DATADIR="$GNOME_DATADIR/share" fi - # .desktop files go in different places in Gnome 1.x and Gnome 2.x... - if test "$have_gtk2" = yes; then - GNOME_PANELDIR='$(GNOME_PANELDIR2)' - else - GNOME_PANELDIR='$(GNOME_PANELDIR1)' - fi - - if test "$have_gtk" = yes; then INCLUDES="$INCLUDES $ac_gtk_config_cflags" GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs" AC_DEFINE(HAVE_GTK) - - if test "$have_gtk2" = yes; then - GTK_EXTRA_OBJS="" - else - GTK_EXTRA_OBJS="\$(GTK_EXTRA_OBJS)" - fi + AC_DEFINE(HAVE_GTK2) + AC_DEFINE(HAVE_XML) fi fi @@ -2392,165 +2161,40 @@ fi ############################################################################### # -# Check for -lxml +# Check for -lXm. # ############################################################################### -have_xml=no -with_xml_req=unspecified -xml_halfassed=no -AC_ARG_WITH(xml, -[ --with-xml The XML toolkit is needed for some parts of - the Gtk interface. Without it, the configuration - interface will be much less featureful.], -[with_xml="$withval"; with_xml_req="$withval"],[with_xml=yes]) - -# if --with-xml=/directory/ was specified, remember that directory so that -# we can also look for the `xml-config' program in that directory. -case "$with_xml" in - /*) - xml_dir="$with_xml" - ;; - *) - xml_dir="" - ;; -esac +have_motif=no +with_motif_req=unspecified +AC_ARG_WITH(motif,[ --with-motif Use the Motif toolkit for the user interface + (not recommended.)], + [with_motif="$withval"; with_motif_req="$withval"],[with_motif=no]) -HANDLE_X_PATH_ARG(with_xml, --with-xml, XML) +HANDLE_X_PATH_ARG(with_motif, --with-motif, Motif) -if test "$with_xml" != yes -a "$with_xml" != no ; then - echo "error: must be yes or no: --with-xml=$with_xml" +if test "$with_motif" != yes -a "$with_motif" != no ; then + echo "error: must be yes or no: --with-motif=$with_motif" exit 1 fi -if test "$with_xml" = yes; then - have_xml=no - have_old_xml=no - - # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then - # look in /foo/bin/ for for xml-config. - # - xml_path="$PATH" - - if test ! -z "$gtk_dir"; then - # canonicalize slashes. - foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'` - xml_path="$foo:$xml_path" - fi - - if test ! -z "$gnome_dir"; then - # canonicalize slashes. - foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'` - xml_path="$foo:$xml_path" - fi - - if test -n "$pkg_config" ; then - # - # the new way... - # run pkg-config based tests. - # - pkgs="" - ok="yes" - - # If we have Gtk 2.x, then *only* XML 2.x will work. - # If we have Gtk 1.x, or don't have Gtk at all, then - # either XML 1.x or 2.x will work. - - # First check for XML 2.x. - # - pkg_check_version libxml-2.0 2.4.6 - - # If that didn't work (we don't have XML 2.x) and we *don't* have - # Gtk 2.x, then check to see if we have XML 1.x - # - if test "$ok" = no -a "$have_gtk2" = no; then - ok=yes - pkg_check_version libxml 1.0 - fi - - have_xml="$ok" - - if test "$have_xml" = yes; then - AC_CACHE_CHECK([for XML includes], ac_cv_xml_config_cflags, - [ac_cv_xml_config_cflags=`$pkg_config --cflags $pkgs`]) - AC_CACHE_CHECK([for XML libs], ac_cv_xml_config_libs, - [ac_cv_xml_config_libs=`$pkg_config --libs $pkgs`]) - ac_xml_config_cflags=$ac_cv_xml_config_cflags - ac_xml_config_libs=$ac_cv_xml_config_libs - fi - - else - # - # the old way... - # run {xml2,xml}-config based tests. - # - - AC_PATH_PROGS(xml_config, xml2-config xml-config,, $xml_path) - - # If we found the xml-config program, run it to get flags. - # - if test -n "$xml_config" ; then - AC_CACHE_CHECK([for XML includes], ac_cv_xml_config_cflags, - [ac_cv_xml_config_cflags=`$xml_config --cflags`]) - AC_CACHE_CHECK([for XML libs], ac_cv_xml_config_libs, - [ac_cv_xml_config_libs=`$xml_config --libs`]) - ac_xml_config_cflags=$ac_cv_xml_config_cflags - ac_xml_config_libs=$ac_cv_xml_config_libs - fi - - ac_save_xml_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $ac_xml_config_cflags" - - # first try which is the new way... - # - AC_CHECK_X_HEADER(libxml/xmlIO.h, [have_xml=yes],, - [#include ]) - - # if that didn't work, then try just which is the old way... - # - if test "$have_xml" = no; then - AC_CHECK_X_HEADER(xmlIO.h, [have_xml=yes; have_old_xml=yes],, - [#include ]) - fi - - CPPFLAGS="$ac_save_xml_CPPFLAGS" - fi - - - have_zlib=no - if test "$have_xml" = yes; then - # we have the XML headers; now make sure zlib is around. - # yes, it's stupid we have to do this too, but there is - # dependency screwage in Gnome. - AC_CHECK_X_LIB(z, zlibVersion, [have_zlib=yes]) - if test "$have_zlib" = no; then - xml_halfassed=yes - have_xml=no - fi - fi - - if test "$have_xml" = yes; then - # we have the header, now check for the library - have_xml=no - xml_halfassed=yes - AC_CHECK_X_LIB(c, xmlParseChunk, - [have_xml=yes - xml_halfassed=no - XML_LIBS="$ac_xml_config_libs" - AC_DEFINE(HAVE_XML)], - [true], - $ac_xml_config_libs) - fi +if test "$with_motif" = yes; then + have_motif=no + AC_CHECK_X_HEADER(Xm/Xm.h, + [have_motif=yes + AC_DEFINE(HAVE_MOTIF) + MOTIF_LIBS="$MOTIF_LIBS -lXm"],, + [#include + #include + #include ]) +fi - if test "$have_xml" = yes; then - INCLUDES="$INCLUDES $ac_xml_config_cflags" - GTK_LIBS="$GTK_LIBS $ac_xml_config_libs" - AC_DEFINE(HAVE_XML) - if test "$have_old_xml" = yes; then - AC_DEFINE(HAVE_OLD_XML_HEADERS) - fi - fi +if test "$have_motif" = yes; then + AC_CHECK_X_HEADER(Xm/ComboBox.h, [AC_DEFINE(HAVE_XMCOMBOBOX)],, + [#include + #include + #include ]) fi @@ -2968,45 +2612,13 @@ elif test "$with_gle" != no; then fi - -############################################################################### -# -# Check for -lXpm. -# -############################################################################### - -have_xpm=no -with_xpm_req=unspecified -AC_ARG_WITH(xpm, -[ --with-xpm Include support for XPM files in some demos. - (Not needed if Pixbuf is used.)], - [with_xpm="$withval"; with_xpm_req="$withval"],[with_xpm=yes]) - -HANDLE_X_PATH_ARG(with_xpm, --with-xpm, XPM) - -if test "$with_xpm" = yes; then - AC_CHECK_X_HEADER(X11/xpm.h, - [have_xpm=yes - AC_DEFINE(HAVE_XPM) - XPM_LIBS="-lXpm"],, - [#include ]) -elif test "$with_xpm" != no; then - echo "error: must be yes or no: --with-xpm=$with_xpm" - exit 1 -fi - -# See comment near $motif_requires_xpm, above. -# Need to do this here, after both Motif and XPM have been checked for. -# -if test "$have_motif" = yes -a "$have_xpm" = yes ; then - if test "$motif_requires_xpm" = yes ; then - MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS" - fi -fi - ############################################################################### # # Check for -lgdk_pixbuf. +# These tests are for gdk_pixbuf usage of the hacks, +# not xscreensaver-demo (thus we have to test again to get +# the libraries right: don't want to pull in all of GTK +# for the hacks.) # ############################################################################### @@ -3015,8 +2627,7 @@ with_gdk_pixbuf_req=unspecified AC_ARG_WITH(pixbuf, [ --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. (The path here is - ignored if GTK 2.x is being used.)], + GIF, JPEG, and PNG files as well.], [with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"], [with_gdk_pixbuf=yes]) @@ -3040,117 +2651,30 @@ fi if test "$with_gdk_pixbuf" = yes; then have_gdk_pixbuf=no - have_gdk_pixbuf2=no - - if test -n "$pkg_config" ; then - # - # the new way... - # run pkg-config based tests. - # - pkgs='' - ok="yes" - # If we have Gtk 2.x, then *only* gdk-pixbuf 2.x will work. - # If we have Gtk 1.x, then *only* gdk-pixbuf 1.x will work. - # If we don't have Gtk at all, then either will work. + pkgs='' + ok="yes" - if test "$have_gtk" = no -o "$have_gtk2" = yes; then - # - # we don't have Gtk; or we have Gtk 2.x. Check for pixbuf 2.x. - # - AC_MSG_RESULT(checking for gdk_pixbuf 2.x with gtk-config based tests...) - pkg_check_version gdk-pixbuf-2.0 2.0.0 - pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0 - have_gdk_pixbuf="$ok" - have_gdk_pixbuf2="$ok" - fi + pkg_check_version gdk-pixbuf-2.0 2.0.0 + pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0 + have_gdk_pixbuf="$ok" - if test "$have_gtk" = no -o "$have_gtk2" = no; then - # - # we don't have Gtk; or we have Gtk 1.x. - # If we don't have pixbuf 2.x, then check for pixbuf 1.x. - # - if test "$have_gdk_pixbuf2" = no; then - pkgs='' - ok="yes" - AC_MSG_RESULT(checking for gdk_pixbuf 1.x with gtk-config based tests...) - pkg_check_version gdk_pixbuf 0.0 - pkg_check_version gdk_pixbuf_xlib 0.0 - have_gdk_pixbuf="$ok" - fi - fi - - if test "$have_gdk_pixbuf" = yes; then - AC_CACHE_CHECK([for gdk-pixbuf includes], ac_cv_gdk_pixbuf_config_cflags, - [ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`]) - AC_CACHE_CHECK([for gdk-pixbuf libs], ac_cv_gdk_pixbuf_config_libs, - [ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`]) - fi - ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags - ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs - fi - - - if test "$have_gdk_pixbuf" = no; then - # - # the old way... - # run gdk-pixbuf-config based tests. - # note that we can't assume that the existence of "pkg-config" means - # that we don't have to look for gdk-pixbuf-config -- in Gnome 1.4, - # pkg-config exists, but doesn't know about pixbuf. - # - - AC_MSG_RESULT(checking for gdk_pixbuf with gdk-pixbuf-config based tests...) - - # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then - # look in /foo/bin/ for for gdk-pixbuf-config. - # - gdk_pixbuf_path="$PATH" - - if test ! -z "$gtk_dir"; then - # canonicalize slashes. - foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'` - gdk_pixbuf_path="$foo:$gdk_pixbuf_path" - fi - - if test ! -z "$gnome_dir"; then - # canonicalize slashes. - foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'` - gdk_pixbuf_path="$foo:$gdk_pixbuf_path" - fi - - AC_PATH_PROGS(gdk_pixbuf_config, gdk-pixbuf-config,, $gdk_pixbuf_path) - - # If we found the gdk-pixbuf-config program, run it to get flags. - # - if test -n "$gdk_pixbuf_config" ; then - AC_CACHE_CHECK([for gdk-pixbuf includes], ac_cv_gdk_pixbuf_config_cflags, - [ac_cv_gdk_pixbuf_config_cflags=`$gdk_pixbuf_config --cflags`]) - AC_CACHE_CHECK([for gdk-pixbuf libs], ac_cv_gdk_pixbuf_config_libs, - [ac_cv_gdk_pixbuf_config_libs=`$gdk_pixbuf_config --libs`]) - - # note that "gdk-pixbuf-config --libs" produces a link line including - # -lgdk_pixbuf, but there's no way to get it to produce one that also - # includes -lgdk_pixbuf_xlib. Since we don't know *exactly* what the - # name of the library will be, construct it with sed... - # M4 sucks!! - changequote(X,Y) - ac_cv_gdk_pixbuf_config_libs=`echo $ac_cv_gdk_pixbuf_config_libs | \ - sed 's@ \(-lgdk_pixbuf\([-_a-zA-Z0-9.]*\)\) @ \1 -lgdk_pixbuf_xlib\2 @'` - changequote([,]) - - ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags - ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs - fi + if test "$have_gdk_pixbuf" = yes; then + AC_CACHE_CHECK([for gdk-pixbuf includes], ac_cv_gdk_pixbuf_config_cflags, + [ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`]) + AC_CACHE_CHECK([for gdk-pixbuf libs], ac_cv_gdk_pixbuf_config_libs, + [ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`]) fi + ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags + ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs - ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags" - if test "$have_gdk_pixbuf" = no; then + if test "$have_gdk_pixbuf" = yes; then # # we appear to have pixbuf; check for headers/libs to be sure. # + ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags" have_gdk_pixbuf=no @@ -3174,15 +2698,16 @@ if test "$with_gdk_pixbuf" = yes; then gdk_pixbuf_halfassed=no]) fi fi + CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS" fi - CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS" - if test "$have_gdk_pixbuf" = yes; then # we have the headers, now check for the libraries have_gdk_pixbuf=no gdk_pixbuf_halfassed=yes + AC_MSG_RESULT(checking for gdk_pixbuf usability...) + # library A... AC_CHECK_X_LIB(c, gdk_pixbuf_new_from_file, [have_gdk_pixbuf=yes],, $ac_gdk_pixbuf_config_libs -lX11 -lXext -lm) @@ -3201,7 +2726,43 @@ if test "$with_gdk_pixbuf" = yes; then XPM_LIBS="$ac_gdk_pixbuf_config_libs" AC_DEFINE(HAVE_GDK_PIXBUF) else - have_gdk_pixbuf2=no + AC_MSG_RESULT(checking for gdk_pixbuf usability... no) + fi +fi + + +############################################################################### +# +# Check for -lXpm. +# +############################################################################### + +have_xpm=no +with_xpm_req=unspecified +AC_ARG_WITH(xpm, +[ --with-xpm Include support for XPM files in some demos. + (Not needed if Pixbuf is used.)], + [with_xpm="$withval"; with_xpm_req="$withval"],[with_xpm=yes]) + +HANDLE_X_PATH_ARG(with_xpm, --with-xpm, XPM) + +if test "$with_xpm" = yes; then + AC_CHECK_X_HEADER(X11/xpm.h, + [have_xpm=yes + AC_DEFINE(HAVE_XPM) + XPM_LIBS="-lXpm $XPM_LIBS"],, + [#include ]) +elif test "$with_xpm" != no; then + echo "error: must be yes or no: --with-xpm=$with_xpm" + exit 1 +fi + +# See comment near $motif_requires_xpm, above. +# Need to do this here, after both Motif and XPM have been checked for. +# +if test "$have_motif" = yes -a "$have_xpm" = yes ; then + if test "$motif_requires_xpm" = yes ; then + MOTIF_LIBS="$MOTIF_LIBS $XPM_LIBS" fi fi @@ -3629,20 +3190,12 @@ fi # It should usually be "/usr/share/pixmaps/", but we can't just use # "$(prefix)/share/pixmaps" because that would usually result in # "/usr/X11R6/share/pixmaps/", which is wrong. It needs to be the -# Gnome/Gtk prefix, not the overall prefix. +# Gtk prefix, not the overall prefix. # if test -n "$GNOME_DATADIR" ; then GLADE_DATADIR='$(GNOME_DATADIR)/xscreensaver' elif test "$have_gtk" = yes; then - if test -n "$pkg_config"; then - if test "$have_gtk2" = yes; then - GLADE_DATADIR=`$pkg_config --variable=prefix gtk+-2.0` - else - GLADE_DATADIR=`$pkg_config --variable=prefix gtk+` - fi - else - GLADE_DATADIR=`$gtk_config --prefix` - fi + GLADE_DATADIR=`$pkg_config --variable=prefix gtk+-2.0` GLADE_DATADIR="$GLADE_DATADIR/share/xscreensaver" else GLADE_DATADIR='' @@ -3655,15 +3208,7 @@ AC_MSG_CHECKING([for locale directory]) if test -n "$GNOME_DATADIR" ; then PO_DATADIR="$GNOME_DATADIR" elif test "$have_gtk" = yes; then - if test -n "$pkg_config"; then - if test "$have_gtk2" = yes; then - PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0` - else - PO_DATADIR=`$pkg_config --variable=prefix gtk+` - fi - else - PO_DATADIR=`$gtk_config --prefix` - fi + PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0` PO_DATADIR="$PO_DATADIR/share" fi @@ -3876,6 +3421,19 @@ if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then warn "Checking of /proc/interrupts was requested, but it's bogus." fi + +if test "$gtk_halfassed" != no ; then + warnL "GTK version $gtk_halfassed was found, but at least one supporting" + warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used." + warn2 "Perhaps some of the development packages are not installed?" + if test "$have_gtk" = yes ; then + v="$ac_gtk_version_string" + warn2 "GTK $v is also installed, so it will be used instead." + warn2 "Please read the above output and the \`config.log' file" + warn2 "for more details." + fi +fi + motif_warn2() { warn2 'Though the Motif front-end to xscreensaver is still' warn2 'maintained, it is no longer being updated with new' @@ -3895,10 +3453,10 @@ if test "$have_motif" = no -a "$have_gtk" = no; then else warnL "The GTK libraries do not seem to be available; the" warn2 "\`xscreensaver-demo' program requires them." - echo '' - warn2 'You can use Motif or Lesstif instead of GTK (use the' - warn2 "\`--with-motif' option) but that is NOT recommended." - motif_warn2 +# echo '' +# warn2 'You can use Motif or Lesstif instead of GTK (use the' +# warn2 "\`--with-motif' option) but that is NOT recommended." +# motif_warn2 fi elif test "$with_motif_req" = yes -a "$have_motif" = no ; then @@ -3907,7 +3465,7 @@ elif test "$with_motif_req" = yes -a "$have_motif" = no ; then elif test "$jurassic_gtk" = yes ; then - pref_gtk=1.2 + pref_gtk=2.0 v="$ac_gtk_version_string" if test "$with_gtk_req" = yes -a "$ac_gtk_version" = "unknown" ; then @@ -3924,56 +3482,6 @@ elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then warnL "Use of Gtk was requested, but it wasn't found." fi -if test "$gtk2_halfassed" != no ; then - warnL "GTK version $gtk2_halfassed was found, but at least one supporting" - warn2 "library ($gtk2_halfassed_lib) was not, so GTK 2.x can't be used." - if test "$have_gtk" = yes ; then - v="$ac_gtk_version_string" - warn2 "GTK $v is also installed, so it will be used instead." - warn2 "Please read the above output and the \`config.log' file" - warn2 "for more details." - fi -fi - - -if test "$with_gnome_req" = yes -a "$have_gnome" = no \ - -a "$have_gtk2" = no; then - # don't issue this warning if we have GTK2 -- in that case, the - # Gnome-specific code isn't needed. - warn 'Use of the Gnome Control Panel was requested, but the necessary' - warn2 'headers and/or libraries were not found.' -fi - -if test "$have_gtk" = yes ; then - if test "$have_xml" = no ; then - if test "$with_xml_req" = yes ; then - warn 'Use of the XML library was requested, but the necessary' - warn2 'headers and/or libraries were not found.' - else - warn 'GTK is being used, but the XML library was not found.' - fi - - if test "$xml_halfassed" = yes ; then - - if test "$have_zlib" = yes ; then - which="XML libraries" - else - which="\`zlib' library" - fi - - echo '' - warn2 'More specifically, we found the headers, but not the' - warn2 "$which; so either XML is half-installed on this" - warn2 "system, or something else went wrong. The \`config.log'" - warn2 'file might contain some clues.' - fi - - echo '' - warn2 "Without XML, the per-display-mode \`Settings' dialogs" - warn2 'will not be available. Specify the location of the XML' - warn2 'library through the --with-xml option to configure.' - fi -fi if test "$have_gtk" = yes -a "$have_gdk_pixbuf" = no ; then warn "GTK is being used, but the GDK-Pixbuf library and/or" @@ -4015,8 +3523,16 @@ if test "$with_gdk_pixbuf_req" = yes -a "$have_gdk_pixbuf" = no; then warnL 'Use of GDK-Pixbuf was requested, but it was not found.' fi -if test "$have_xpm" = no -a "$have_gdk_pixbuf" = no || \ - test "$gdk_pixbuf_halfassed" = yes; then +if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \ + test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then + + if test "$with_gdk_pixbuf_req" = yes ; then + true + elif test "$with_gdk_pixbuf_req" = no ; then + warnL 'The GDK-Pixbuf library is not being used.' + else + warnL 'The GDK-Pixbuf library was not found.' + fi if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then true @@ -4026,12 +3542,8 @@ if test "$have_xpm" = no -a "$have_gdk_pixbuf" = no || \ warnL 'The XPM library was not found.' fi - if test "$with_gdk_pixbuf_req" = yes ; then - true - elif test "$with_gdk_pixbuf_req" = no ; then - warnL 'The GDK-Pixbuf library is not being used.' - else - warnL 'The GDK-Pixbuf library was not found.' + if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then + warn2 'The XPM library is being used instead.' fi if test "$gdk_pixbuf_halfassed" = yes ; then @@ -4043,15 +3555,10 @@ if test "$have_xpm" = no -a "$have_gdk_pixbuf" = no || \ fi echo '' - warn2 'Some of the demos will not be as colorful as they' - warn2 'could be. You should consider installing Pixbuf or' - warn2 'XPM and re-running configure. The Pixbuf library is' - warn2 'a part of GNOME. The XPM library comes with most' - warn2 'X11 installations; you can also find it at the X11' - warn2 'archive sites, such as .' - echo '' - warn2 'GDK-Pixbuf is recommended over XPM, as it provides' - warn2 'support for more image formats.' + warn2 'Some of the demos will not use images as much as they could.' + warn2 'You should consider installing GDK-Pixbuf and re-running' + warn2 'configure. (GDK-Pixbuf is recommended over XPM, as it' + warn2 'provides support for more image formats.)' fi @@ -4255,7 +3762,8 @@ if test \! -z "$rpmv" ; then 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. See the RPM documentation for more info." + warn2 'file is included. Try "rpmbuild -v -ba xscreensaver.spec".' + warn2 "See the RPM documentation for more info." echo "" if test "$rpmbdir" = "$rpmhdir" ; then diff --git a/driver/XScreenSaver.ad.in b/driver/XScreenSaver.ad.in index 23d7af21..5fb206bc 100644 --- a/driver/XScreenSaver.ad.in +++ b/driver/XScreenSaver.ad.in @@ -4,8 +4,8 @@ ! a screen saver and locker for the X window system ! by Jamie Zawinski ! -! version 4.18 -! 14-Aug-2004 +! version 4.19 +! 16-Dec-2004 ! ! See "man xscreensaver" for more info. The latest version is always ! available at http://www.jwz.org/xscreensaver/ @@ -281,6 +281,9 @@ GetViewPortIsFullOfLies: False fuzzyflakes -root \n\ anemotaxis -root \n\ memscroller -root \n\ + substrate -root \n\ + intermomentary -root \n\ + fireworkx -root \n\ - default-n: webcollage -root \n\ - default-n: "WebCollage (whacked)" \ webcollage -root -filter \ @@ -354,6 +357,11 @@ GetViewPortIsFullOfLies: False @GL_KLUDGE@ GL: blinkbox -root \n\ @GL_KLUDGE@ GL: noof -root \n\ @GL_KLUDGE@ GL: polyhedra -root \n\ +- GL: antinspect -root \n\ +@GL_KLUDGE@ GL: providence -root \n\ +@GL_KLUDGE@ GL: "Pinion (large gears)" pinion -root \n\ +@GL_KLUDGE@ GL: "Pinion (small gears)" pinion -root -size 0.2 \n\ +@GL_KLUDGE@ GL: pinion -root \n\ \ - xdaliclock -root -builtin3 -cycle \n\ - default-n: xearth -nofork -nostars -ncolors 50 \ @@ -372,9 +380,7 @@ GetViewPortIsFullOfLies: False - electricsheep \n\ - cosmos -root \n\ - GL: sphereEversion --root \n\ -- GL: fireflies -root \n\ -- GL: antinspect -root \n\ -- GL: providence -root \n +- GL: fireflies -root \n diff --git a/driver/XScreenSaver_ad.h b/driver/XScreenSaver_ad.h index aeccfc94..9a42c77a 100644 --- a/driver/XScreenSaver_ad.h +++ b/driver/XScreenSaver_ad.h @@ -206,6 +206,9 @@ fuzzyflakes -root \\n\ anemotaxis -root \\n\ memscroller -root \\n\ + substrate -root \\n\ + intermomentary -root \\n\ + fireworkx -root \\n\ - default-n: webcollage -root \\n\ - default-n: \"WebCollage (whacked)\" \ webcollage -root -filter \ @@ -279,6 +282,11 @@ GL: blinkbox -root \\n\ GL: noof -root \\n\ GL: polyhedra -root \\n\ +- GL: antinspect -root \\n\ + GL: providence -root \\n\ + GL: \"Pinion (large gears)\" pinion -root \\n\ + GL: \"Pinion (small gears)\" pinion -root -size 0.2 \\n\ + GL: pinion -root \\n\ \ - xdaliclock -root -builtin3 -cycle \\n\ - default-n: xearth -nofork -nostars -ncolors 50 \ @@ -297,9 +305,7 @@ - electricsheep \\n\ - cosmos -root \\n\ - GL: sphereEversion --root \\n\ -- GL: fireflies -root \\n\ -- GL: antinspect -root \\n\ -- GL: providence -root \\n", +- GL: fireflies -root \\n", "XScreenSaver.pointerPollTime: 0:00:05", "XScreenSaver.initialDelay: 0:00:00", "XScreenSaver.windowCreationTimeout: 0:00:30", diff --git a/driver/demo-Gtk-conf.c b/driver/demo-Gtk-conf.c index 745c6547..cf34f15b 100644 --- a/driver/demo-Gtk-conf.c +++ b/driver/demo-Gtk-conf.c @@ -1280,7 +1280,7 @@ parameter_to_switch (parameter *p) return 0; if (p->integer_p) - sprintf (buf, "%d", (int) (value + 0.5)); + sprintf (buf, "%d", (int) (value + (value > 0 ? 0.5 : -0.5))); else sprintf (buf, "%.4f", value); diff --git a/driver/demo-Gtk.c b/driver/demo-Gtk.c index 298860a7..c9cfbce2 100644 --- a/driver/demo-Gtk.c +++ b/driver/demo-Gtk.c @@ -88,8 +88,11 @@ #include #ifdef HAVE_GTK2 -#include -#endif /* HAVE_GTK2 */ +# include +# include +#else /* !HAVE_GTK2 */ +# define G_MODULE_EXPORT /**/ +#endif /* !HAVE_GTK2 */ #if defined(DEFAULT_ICONDIR) && !defined(GLADE_DIR) # define GLADE_DIR DEFAULT_ICONDIR @@ -618,9 +621,13 @@ run_hack (state *s, int list_elt, Bool report_errors_p) /* Button callbacks + + According to Eric Lassauge, this G_MODULE_EXPORT crud is needed to make + libglade work on Cygwin; apparently all Glade callbacks need this magic + extra declaration. I do not pretend to understand. */ -void +G_MODULE_EXPORT void exit_menu_cb (GtkMenuItem *menuitem, gpointer user_data) { state *s = global_state_kludge; /* I hate C so much... */ @@ -639,7 +646,7 @@ wm_toplevel_close_cb (GtkWidget *widget, GdkEvent *event, gpointer data) } -void +G_MODULE_EXPORT void about_menu_cb (GtkMenuItem *menuitem, gpointer user_data) { char msg [2048]; @@ -766,7 +773,7 @@ about_menu_cb (GtkMenuItem *menuitem, gpointer user_data) } -void +G_MODULE_EXPORT void doc_menu_cb (GtkMenuItem *menuitem, gpointer user_data) { state *s = global_state_kludge; /* I hate C so much... */ @@ -792,7 +799,7 @@ doc_menu_cb (GtkMenuItem *menuitem, gpointer user_data) } -void +G_MODULE_EXPORT void activate_menu_cb (GtkMenuItem *menuitem, gpointer user_data) { state *s = global_state_kludge; /* I hate C so much... */ @@ -800,7 +807,7 @@ activate_menu_cb (GtkMenuItem *menuitem, gpointer user_data) } -void +G_MODULE_EXPORT void lock_menu_cb (GtkMenuItem *menuitem, gpointer user_data) { state *s = global_state_kludge; /* I hate C so much... */ @@ -808,7 +815,7 @@ lock_menu_cb (GtkMenuItem *menuitem, gpointer user_data) } -void +G_MODULE_EXPORT void kill_menu_cb (GtkMenuItem *menuitem, gpointer user_data) { state *s = global_state_kludge; /* I hate C so much... */ @@ -816,7 +823,7 @@ kill_menu_cb (GtkMenuItem *menuitem, gpointer user_data) } -void +G_MODULE_EXPORT void restart_menu_cb (GtkWidget *widget, gpointer user_data) { state *s = global_state_kludge; /* I hate C so much... */ @@ -939,7 +946,7 @@ demo_write_init_file (state *s, saver_preferences *p) } -void +G_MODULE_EXPORT void run_this_cb (GtkButton *button, gpointer user_data) { state *s = global_state_kludge; /* I hate C so much... */ @@ -950,7 +957,7 @@ run_this_cb (GtkButton *button, gpointer user_data) } -void +G_MODULE_EXPORT void manual_cb (GtkButton *button, gpointer user_data) { state *s = global_state_kludge; /* I hate C so much... */ @@ -1023,7 +1030,7 @@ force_list_select_item (state *s, GtkWidget *list, int list_elt, Bool scroll_p) } -void +G_MODULE_EXPORT void run_next_cb (GtkButton *button, gpointer user_data) { state *s = global_state_kludge; /* I hate C so much... */ @@ -1052,7 +1059,7 @@ run_next_cb (GtkButton *button, gpointer user_data) } -void +G_MODULE_EXPORT void run_prev_cb (GtkButton *button, gpointer user_data) { state *s = global_state_kludge; /* I hate C so much... */ @@ -1554,7 +1561,7 @@ flush_popup_changes_and_save (state *s) } -void +G_MODULE_EXPORT void pref_changed_cb (GtkWidget *widget, gpointer user_data) { state *s = global_state_kludge; /* I hate C so much... */ @@ -1566,7 +1573,7 @@ pref_changed_cb (GtkWidget *widget, gpointer user_data) } } -gboolean +G_MODULE_EXPORT gboolean pref_changed_event_cb (GtkWidget *widget, GdkEvent *event, gpointer user_data) { pref_changed_cb (widget, user_data); @@ -1618,7 +1625,7 @@ mode_menu_item_cb (GtkWidget *widget, gpointer user_data) } -void +G_MODULE_EXPORT void switch_page_cb (GtkNotebook *notebook, GtkNotebookPage *page, gint page_num, gpointer user_data) { @@ -1861,7 +1868,7 @@ browse_image_dir_close (GtkWidget *widget, GdkEvent *event, gpointer user_data) } -void +G_MODULE_EXPORT void browse_image_dir_cb (GtkButton *button, gpointer user_data) { state *s = global_state_kludge; /* I hate C so much... */ @@ -1897,7 +1904,7 @@ browse_image_dir_cb (GtkButton *button, gpointer user_data) } -void +G_MODULE_EXPORT void settings_cb (GtkButton *button, gpointer user_data) { state *s = global_state_kludge; /* I hate C so much... */ @@ -1920,7 +1927,7 @@ settings_sync_cmd_text (state *s) # endif /* HAVE_XML */ } -void +G_MODULE_EXPORT void settings_adv_cb (GtkButton *button, gpointer user_data) { state *s = global_state_kludge; /* I hate C so much... */ @@ -1931,7 +1938,7 @@ settings_adv_cb (GtkButton *button, gpointer user_data) gtk_notebook_set_page (notebook, 1); } -void +G_MODULE_EXPORT void settings_std_cb (GtkButton *button, gpointer user_data) { state *s = global_state_kludge; /* I hate C so much... */ @@ -1944,7 +1951,7 @@ settings_std_cb (GtkButton *button, gpointer user_data) gtk_notebook_set_page (notebook, 0); } -void +G_MODULE_EXPORT void settings_switch_page_cb (GtkNotebook *notebook, GtkNotebookPage *page, gint page_num, gpointer user_data) { @@ -1968,14 +1975,14 @@ settings_switch_page_cb (GtkNotebook *notebook, GtkNotebookPage *page, -void +G_MODULE_EXPORT void settings_cancel_cb (GtkButton *button, gpointer user_data) { state *s = global_state_kludge; /* I hate C so much... */ gtk_widget_hide (s->popup_widget); } -void +G_MODULE_EXPORT void settings_ok_cb (GtkButton *button, gpointer user_data) { state *s = global_state_kludge; /* I hate C so much... */ diff --git a/driver/timers.c b/driver/timers.c index 160ad73d..7e769a77 100644 --- a/driver/timers.c +++ b/driver/timers.c @@ -1041,23 +1041,35 @@ sleep_until_idle (saver_info *si, Bool until_idle_p) 0: 309453991 timer 1: 4771729 keyboard - but on later kernels with MP machines, it looks like this: + but in Linux 2.2 and 2.4 kernels with MP machines, it looks like this: CPU0 CPU1 0: 1671450 1672618 IO-APIC-edge timer 1: 13037 13495 IO-APIC-edge keyboard - Joy! So how are we expected to parse that? Well, this code doesn't - parse it: it saves the last line with the string "keyboard" in it, and - does a string-comparison to note when it has changed. + and in Linux 2.6, it's gotten even goofier: now there are two lines + labelled "i8042". One of them is the keyboard, and one of them is + the PS/2 mouse -- and of course, you can't tell them apart, except + by wiggling the mouse and noting which one changes: - Thanks to Nat Friedman for figuring out all of this crap. + CPU0 CPU1 + 1: 32051 30864 IO-APIC-edge i8042 + 12: 476577 479913 IO-APIC-edge i8042 - Note that this only checks for lines with "keyboard" or "PS/2 Mouse" in - them. If you have a serial mouse, it won't detect that, it will only detect - keyboard activity. That's because there's no way to tell the difference - between a serial mouse and a general serial port, and it would be somewhat - unfortunate to have the screensaver turn off when the modem on COM1 burped. + Joy! So how are we expected to parse that? Well, this code doesn't + parse it: it saves the first line with the string "keyboard" (or + "i8042") in it, and does a string-comparison to note when it has + changed. If there are two "i8042" lines, we assume the first is + the keyboard and the second is the mouse (doesn't matter which is + which, really, as long as we don't compare them against each other.) + + Thanks to Nat Friedman for figuring out most of this crap. + + Note that if you have a serial or USB mouse, or a USB keyboard, it won't + detect it. That's because there's no way to tell the difference between a + serial mouse and a general serial port, and all USB devices look the same + from here. It would be somewhat unfortunate to have the screensaver turn + off when the modem on COM1 burped, or when a USB disk was accessed. */ @@ -1100,6 +1112,7 @@ proc_interrupts_activity_p (saver_info *si) char new_line[sizeof(last_kbd_line)]; Bool checked_kbd = False, kbd_changed = False; Bool checked_ptr = False, ptr_changed = False; + int i8042_count = 0; if (!f0) { @@ -1146,10 +1159,14 @@ proc_interrupts_activity_p (saver_info *si) goto FAIL; } - /* Now read through the pseudo-file until we find the "keyboard" line. */ + /* Now read through the pseudo-file until we find the "keyboard", + "PS/2 mouse", or "i8042" lines. */ while (fgets (new_line, sizeof(new_line)-1, f1)) { + Bool i8042_p = !!strstr (new_line, "i8042"); + if (i8042_p) i8042_count++; + if (strchr (new_line, ',')) { /* Ignore any line that has a comma on it: this is because @@ -1163,14 +1180,24 @@ proc_interrupts_activity_p (saver_info *si) to ignore any shared IRQs. */ } - else if (!checked_kbd && strstr (new_line, "keyboard")) + else if (!checked_kbd && + (strstr (new_line, "keyboard") || + (i8042_p && i8042_count == 1))) { + /* Assume the keyboard interrupt is the line that says "keyboard", + or the *first* line that says "i8042". + */ kbd_changed = (*last_kbd_line && !!strcmp (new_line, last_kbd_line)); strcpy (last_kbd_line, new_line); checked_kbd = True; } - else if (!checked_ptr && strstr (new_line, "PS/2 Mouse")) + else if (!checked_ptr && + (strstr (new_line, "PS/2 Mouse") || + (i8042_p && i8042_count == 2))) { + /* Assume the mouse interrupt is the line that says "PS/2 mouse", + or the *second* line that says "i8042". + */ ptr_changed = (*last_ptr_line && !!strcmp (new_line, last_ptr_line)); strcpy (last_ptr_line, new_line); checked_ptr = True; diff --git a/driver/xscreensaver-command.c b/driver/xscreensaver-command.c index a267f4e7..c80eb29d 100644 --- a/driver/xscreensaver-command.c +++ b/driver/xscreensaver-command.c @@ -109,14 +109,6 @@ usage: %s -