-
-
- 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
-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
-echo "${ECHO_T}$vers" >&6
- 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
- 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
- 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"
-
- if test "$have_gnome" = no; then
- pkgs="$old_pkgs"
- else
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_CRAPPLET 1
-_ACEOF
-
- fi
- 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
- 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=`$pkg_config --cflags $pkgs`
-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=`$pkg_config --libs $pkgs`
-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
-
- 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
- fi
-done
-done
-
- ;;
-esac
-fi
-glib_config=$ac_cv_path_glib_config
-
-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
-
- test -n "$glib_config" && break
-done
-
- 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
-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
- 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
-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"
- 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
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$gnome_config" && break
-done
-
- 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`
-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
-
- 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
-
- 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
-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