X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=configure;h=d9ba45ce9e42fb3690fd2f6a92b9a398573221f8;hb=c28aecf9fc41e3a03494bacf7279745425e2fa18;hp=8bd583807abb656f95afd558f99179fd27f9fdd2;hpb=13dbc569cdc6e29019722c0ef9b932a925efbcad;p=xscreensaver diff --git a/configure b/configure index 8bd58380..d9ba45ce 100755 --- a/configure +++ b/configure @@ -2361,7 +2361,7 @@ fi if test -n "$GCC"; then echo "$as_me:$LINENO: result: Turning on gcc compiler warnings." >&5 echo "${ECHO_T}Turning on gcc compiler warnings." >&6 - CC="$CC -Wall -Wstrict-prototypes -Wnested-externs -Wno-format" + CC="$CC -Wall -Wstrict-prototypes -Wnested-externs" else case "$host" in *-irix5* |*-irix6.0-3* ) @@ -6276,9 +6276,7 @@ _ACEOF -# #### no sign of en_GB -#ALL_LINGUAS="ca de en_GB et fr it ko pl sv da es fi hu ja no pt pt_BR ru wa" -ALL_LINGUAS="ca de et fr it ko pl sv da es fi hu ja no pt pt_BR ru wa" +ALL_LINGUAS="ca da de es et fi fr hu it ja ko nl no pl pt pt_BR ru sk sv vi wa zh_CN zh_TW" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 @@ -12376,6 +12374,8 @@ parse_gtk_version_string() { jurassic_gtk=no +gtk2_halfassed=no + if test "$with_gtk" = yes; then have_gtk=no @@ -12489,6 +12489,11 @@ echo "${ECHO_T}no" >&6 #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 fi if test "$have_gtk" = no; then @@ -12503,7 +12508,7 @@ _ACEOF # Now check for Gnome... # - if test "$have_gtk" = yes; then + if test "$have_gtk" = yes -a "$with_gnome" = yes; then old_pkgs="$pkgs" ok=yes pkg_check_version capplet 1.0 @@ -12750,6 +12755,11 @@ echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6 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" @@ -12818,6 +12828,7 @@ _ACEOF 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" @@ -12907,14 +12918,17 @@ fi GNOME_DATADIR="" - if test "$have_gnome" = yes -a "$have_gtk" = yes; then - if test -n "$gnome_config"; then - GNOME_DATADIR=`$gnome_config --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 - #### is this right? - GNOME_DATADIR=`$pkg_config --variable=prefix gtk+` - GNOME_DATADIR="$GNOME_DATADIR/share" + 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... @@ -12945,9 +12959,11 @@ fi # Check for the Gnome Help Browser. # -if test "$have_gnome" = yes; then - # Extract the first word of "gnome-help-browser", so it can be a program name with args. -set dummy gnome-help-browser; ac_word=$2 +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 @@ -12963,14 +12979,13 @@ do 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="yes" + 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 - test -z "$ac_cv_prog_have_gnome_help" && ac_cv_prog_have_gnome_help="no" fi fi have_gnome_help=$ac_cv_prog_have_gnome_help @@ -12982,8 +12997,13 @@ else echo "${ECHO_T}no" >&6 fi -else - have_gnome_help=no + 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 @@ -13094,11 +13114,21 @@ if test "$with_xml" = yes; then # pkgs="" ok="yes" - pkg_check_version xml2 1.0 - if test "$ok" = no; then + # 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 xml 1.0 + pkg_check_version libxml 1.0 fi have_xml="$ok" @@ -13129,7 +13159,7 @@ echo "${ECHO_T}$ac_cv_xml_config_libs" >&6 else # # the old way... - # run {gnome,gtk}-config based tests. + # run {xml2,xml}-config based tests. # for ac_prog in xml2-config xml-config @@ -13421,13 +13451,13 @@ fi # note: $X_LIBS includes $x_libraries LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS" - echo "$as_me:$LINENO: checking for xmlParseChunk in -lxml" >&5 -echo $ECHO_N "checking for xmlParseChunk in -lxml... $ECHO_C" >&6 -if test "${ac_cv_lib_xml_xmlParseChunk+set}" = set; then + 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 $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lxml $ac_xml_config_libs $LIBS" +LIBS="-lc $ac_xml_config_libs $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" @@ -13465,18 +13495,18 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_xml_xmlParseChunk=yes + ac_cv_lib_c_xmlParseChunk=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_cv_lib_xml_xmlParseChunk=no +ac_cv_lib_c_xmlParseChunk=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_xml_xmlParseChunk" >&5 -echo "${ECHO_T}$ac_cv_lib_xml_xmlParseChunk" >&6 -if test $ac_cv_lib_xml_xmlParseChunk = yes; then +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" @@ -14491,7 +14521,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 @@ -14705,7 +14735,9 @@ echo "${ECHO_T}not found ($d: no such directory)" >&6 GLE_LIBS="" -if test "$with_gle" = yes; then +if test "$have_gl" = no ; then + true +elif test "$with_gle" = yes; then ac_save_CPPFLAGS="$CPPFLAGS" @@ -15365,20 +15397,33 @@ if test "$with_gdk_pixbuf" = yes; then # 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" - have_gdk_pixbuf2="$ok" - if test "$have_gdk_pixbuf2" = no; then + # 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 pixbuf 2.x; check for 1.x. + # we don't have Gtk; or we have Gtk 2.x. Check for pixbuf 2.x. # - pkgs='' - ok="yes" - pkg_check_version gdk-pixbuf 0.0 - pkg_check_version gdk-pixbuf-xlib 0.0 + 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" + 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 @@ -15405,6 +15450,7 @@ echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6 ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs fi + if test "$have_gdk_pixbuf" = no; then # # the old way... @@ -15523,7 +15569,7 @@ echo "${ECHO_T}$ac_cv_gdk_pixbuf_config_libs" >&6 have_gdk_pixbuf=no - # check for header 1... + # check for header A... ac_save_CPPFLAGS="$CPPFLAGS" if test \! -z "$includedir" ; then @@ -15638,7 +15684,7 @@ fi CPPFLAGS="$ac_save_CPPFLAGS" - # if that worked, check for header 2... + # if that worked, check for header B... if test "$have_gdk_pixbuf" = yes; then have_gdk_pixbuf=no gdk_pixbuf_halfassed=yes @@ -15757,7 +15803,7 @@ fi CPPFLAGS="$ac_save_CPPFLAGS" - # yay, it has a new name in GTK2... + # yay, it has a new name in Gtk 2.x... if test "$have_gdk_pixbuf" = no; then have_gdk_pixbuf=no gdk_pixbuf_halfassed=yes @@ -15886,7 +15932,7 @@ fi have_gdk_pixbuf=no gdk_pixbuf_halfassed=yes - # library 1... + # library A... ac_save_CPPFLAGS="$CPPFLAGS" ac_save_LDFLAGS="$LDFLAGS" @@ -15967,7 +16013,7 @@ fi LDFLAGS="$ac_save_LDFLAGS" # LIBS="$ac_save_LIBS" - # library 2... + # library B... if test "$have_gdk_pixbuf" = yes; then have_gdk_pixbuf=no @@ -17465,19 +17511,79 @@ fi # After computing $HACK_CONF_DIR, make sure $GLADE_DATADIR has a value # so that we know where to install the Gtk pixmaps. # +# 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. +# if test -n "$GNOME_DATADIR" ; then GLADE_DATADIR='$(GNOME_DATADIR)/xscreensaver' elif test "$have_gtk" = yes; then - # should this be "$(prefix)/share/pixmaps"? But /usr/X11R6/share/ is wrong... - GLADE_DATADIR='/usr/share/xscreensaver' + 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="$GLADE_DATADIR/share/xscreensaver" else GLADE_DATADIR='' fi +# Set PO_DATADIR to something sensible. +# +echo "$as_me:$LINENO: checking for locale directory" >&5 +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="$PO_DATADIR/share" +fi + +if test -z "$PO_DATADIR" ; then + # + # #### Total fucking kludge -- + # Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/ + # but of course we need to expand all the nested variables to do that... + # + dd=$datadir + eval dd=${dd} + eval dd=${dd} + eval dd=${dd} + eval dd=${dd} + eval dd=${dd} + PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'` +fi + +echo "$as_me:$LINENO: result: $PO_DATADIR/locale" >&5 +echo "${ECHO_T}$PO_DATADIR/locale" >&6 + + # canonicalize slashes. HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'` +# gcc 3.0 likes to issue this warning for every file: +# +# cc1: warning: changing search order for system directory "/usr/local/include" +# cc1: warning: as it has already been specified as a non-system directory +# +# Yay. We can only avoid that by deleting "-I${prefix}/include" from the list. +# Which *should* be totally redundant, and thus an ok thing to delete? +# +INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'` ############################################################################### @@ -17532,6 +17638,7 @@ HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'` + APPDEFAULTS=$ac_x_app_defaults @@ -17542,7 +17649,7 @@ APPDEFAULTS=$ac_x_app_defaults -ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad" +ac_config_files="$ac_config_files Makefile utils/Makefile driver/Makefile hacks/Makefile hacks/glx/Makefile po/Makefile.in driver/XScreenSaver.ad driver/xscreensaver.kss" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -18039,6 +18146,7 @@ do "hacks/glx/Makefile" ) CONFIG_FILES="$CONFIG_FILES hacks/glx/Makefile" ;; "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "driver/XScreenSaver.ad" ) CONFIG_FILES="$CONFIG_FILES driver/XScreenSaver.ad" ;; + "driver/xscreensaver.kss" ) CONFIG_FILES="$CONFIG_FILES driver/xscreensaver.kss" ;; "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "default-2" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; @@ -18233,6 +18341,7 @@ s,@GNOMEHELP_N@,$GNOMEHELP_N,;t t s,@HACKDIR@,$HACKDIR,;t t s,@GNOME_DATADIR@,$GNOME_DATADIR,;t t s,@GLADE_DATADIR@,$GLADE_DATADIR,;t t +s,@PO_DATADIR@,$PO_DATADIR,;t t s,@GNOME_PANELDIR@,$GNOME_PANELDIR,;t t s,@HACK_CONF_DIR@,$HACK_CONF_DIR,;t t s,@GTK_EXTRA_OBJS@,$GTK_EXTRA_OBJS,;t t @@ -18898,8 +19007,19 @@ elif test "$jurassic_gtk" = yes ; then warn2 "Gtk $pref_gtk or newer is required. Motif will be used instead." elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then - warnL "Use of Gtk was requested, but it wasn't found;" - warn2 "Motif will be used instead." + warnL "Use of Gtk was requested, but it wasn't found." + if test "$have_motif" = yes; then + warn2 "Motif will be used instead." + fi +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." + 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 @@ -18939,6 +19059,12 @@ if test "$have_gtk" = yes ; then 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" + warn2 "headers were not found. That can't be good. Please" + warn2 "install the GDK-Pixbuf development kit and re-configure." +fi + if test "$have_motif" = yes -a "$have_lesstif" = yes ; then preferred_lesstif=0.92