From d6fb55277479a5fcd1236ad75f1130c0ba381b9a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 31 Oct 2006 16:46:49 +0000 Subject: [PATCH] call PKG_PROG_PKG_CONFIG before checking for gnomeprintui, gnomevfs and hildon libraries -- otherwise they were never detected git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 110 +++++++++++++++++++++++++++++++++++++++++++++++++-- configure.in | 8 +--- 2 files changed, 108 insertions(+), 10 deletions(-) diff --git a/configure b/configure index 5126ab9ad9..725549939b 100755 --- a/configure +++ b/configure @@ -43131,6 +43131,112 @@ _ACEOF fi if test "$WXGTK20" = 1; then + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_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 +PKG_CONFIG=$ac_cv_path_PKG_CONFIG + +if test -n "$PKG_CONFIG"; then + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_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 +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG + +if test -n "$ac_pt_PKG_CONFIG"; then + echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + PKG_CONFIG=$ac_pt_PKG_CONFIG +else + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" +fi + +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.9.0 + echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6 + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + PKG_CONFIG="" + fi + +fi + if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then if test "$wxUSE_LIBGNOMEPRINT" = "yes" ; then @@ -43221,9 +43327,7 @@ _ACEOF fi fi fi -fi -if test "$WXGTK20" = 1; then if test "$wxUSE_MIMETYPE" = "yes" ; then if test "$wxUSE_LIBGNOMEVFS" = "yes" ; then @@ -43314,9 +43418,7 @@ _ACEOF fi fi fi -fi -if test "$WXGTK20" = 1; then if test "$wxUSE_LIBHILDON" = "yes" ; then pkg_failed=no diff --git a/configure.in b/configure.in index 74d9f340b5..bce218c226 100644 --- a/configure.in +++ b/configure.in @@ -5645,13 +5645,14 @@ if test "$wxUSE_SOUND" = "yes"; then fi if test "$WXGTK20" = 1; then + PKG_PROG_PKG_CONFIG() + if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then if test "$wxUSE_LIBGNOMEPRINT" = "yes" ; then PKG_CHECK_MODULES(LIBGNOMEPRINTUI, [libgnomeprintui-2.2 >= 2.8], [ -dnl EXTRALIBS_GNOMEPRINT="$LIBGNOMEPRINTUI_LIBS" CXXFLAGS="$LIBGNOMEPRINTUI_CFLAGS $CXXFLAGS" AC_DEFINE(wxUSE_LIBGNOMEPRINT) ], @@ -5662,16 +5663,13 @@ dnl EXTRALIBS_GNOMEPRINT="$LIBGNOMEPRINTUI_LIBS" ) fi fi -fi -if test "$WXGTK20" = 1; then if test "$wxUSE_MIMETYPE" = "yes" ; then if test "$wxUSE_LIBGNOMEVFS" = "yes" ; then PKG_CHECK_MODULES(GNOMEVFS, [gnome-vfs-2.0 >= 2.0], [ -dnl EXTRALIBS_GNOMEVFS="$LIBGNOMEVFS_LIBS" CXXFLAGS="$GNOMEVFS_CFLAGS $CXXFLAGS" AC_DEFINE(wxUSE_LIBGNOMEVFS) ], @@ -5682,9 +5680,7 @@ dnl EXTRALIBS_GNOMEVFS="$LIBGNOMEVFS_LIBS" ) fi fi -fi -if test "$WXGTK20" = 1; then if test "$wxUSE_LIBHILDON" = "yes" ; then PKG_CHECK_MODULES(HILDON, [hildon-lgpl >= 0.9], -- 2.45.2