configure: Don't use pkg-config without tool prefix when cross-compiling.
This commit is contained in:
parent
8d8fdc5b3a
commit
b48ee74832
|
@ -22,6 +22,21 @@ dnl configuration script generated by Autoconf, you may include it
|
||||||
dnl under the same distribution terms that you use for the rest of
|
dnl under the same distribution terms that you use for the rest of
|
||||||
dnl that program.
|
dnl that program.
|
||||||
|
|
||||||
|
dnl WINE_CHECK_HOST_TOOL(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH])
|
||||||
|
dnl
|
||||||
|
dnl Like AC_CHECK_TOOL but without the broken fallback to non-prefixed name
|
||||||
|
dnl
|
||||||
|
AC_DEFUN([WINE_CHECK_HOST_TOOL],
|
||||||
|
[if test -n "$ac_tool_prefix"; then
|
||||||
|
AC_CHECK_PROG([$1],[${ac_tool_prefix}$2],[${ac_tool_prefix}$2],,[$4])
|
||||||
|
fi
|
||||||
|
if test -n "$ac_cv_prog_$1"; then
|
||||||
|
$1="$ac_cv_prog_$1"
|
||||||
|
elif test "$cross_compiling" != yes; then
|
||||||
|
unset ac_cv_prog_$1
|
||||||
|
AC_CHECK_PROG([$1],[$2],[$2],[$3],[$4])
|
||||||
|
fi])
|
||||||
|
|
||||||
dnl **** Initialize the programs used by other checks ****
|
dnl **** Initialize the programs used by other checks ****
|
||||||
dnl
|
dnl
|
||||||
dnl Usage: WINE_PATH_SONAME_TOOLS
|
dnl Usage: WINE_PATH_SONAME_TOOLS
|
||||||
|
@ -32,7 +47,7 @@ AC_DEFUN([WINE_PATH_SONAME_TOOLS],
|
||||||
AC_CHECK_TOOL(READELF,[readelf],true)])
|
AC_CHECK_TOOL(READELF,[readelf],true)])
|
||||||
|
|
||||||
AC_DEFUN([WINE_PATH_PKG_CONFIG],
|
AC_DEFUN([WINE_PATH_PKG_CONFIG],
|
||||||
[AC_CHECK_TOOL(PKG_CONFIG,[pkg-config])])
|
[WINE_CHECK_HOST_TOOL(PKG_CONFIG,[pkg-config])])
|
||||||
|
|
||||||
dnl **** Extract the soname of a library ****
|
dnl **** Extract the soname of a library ****
|
||||||
dnl
|
dnl
|
||||||
|
|
|
@ -5217,17 +5217,19 @@ fi
|
||||||
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
if test -z "$ac_cv_prog_PKG_CONFIG"; then
|
if test -n "$ac_cv_prog_PKG_CONFIG"; then
|
||||||
ac_ct_PKG_CONFIG=$PKG_CONFIG
|
PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
|
||||||
|
elif test "$cross_compiling" != yes; then
|
||||||
|
unset ac_cv_prog_PKG_CONFIG
|
||||||
# Extract the first word of "pkg-config", so it can be a program name with args.
|
# Extract the first word of "pkg-config", so it can be a program name with args.
|
||||||
set dummy pkg-config; ac_word=$2
|
set dummy pkg-config; ac_word=$2
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||||
$as_echo_n "checking for $ac_word... " >&6; }
|
$as_echo_n "checking for $ac_word... " >&6; }
|
||||||
if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
|
if ${ac_cv_prog_PKG_CONFIG+:} false; then :
|
||||||
$as_echo_n "(cached) " >&6
|
$as_echo_n "(cached) " >&6
|
||||||
else
|
else
|
||||||
if test -n "$ac_ct_PKG_CONFIG"; then
|
if test -n "$PKG_CONFIG"; then
|
||||||
ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
|
ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
|
||||||
else
|
else
|
||||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||||
for as_dir in $PATH
|
for as_dir in $PATH
|
||||||
|
@ -5236,7 +5238,7 @@ do
|
||||||
test -z "$as_dir" && as_dir=.
|
test -z "$as_dir" && as_dir=.
|
||||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||||
ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
|
ac_cv_prog_PKG_CONFIG="pkg-config"
|
||||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||||
break 2
|
break 2
|
||||||
fi
|
fi
|
||||||
|
@ -5246,30 +5248,17 @@ IFS=$as_save_IFS
|
||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
|
PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
|
||||||
if test -n "$ac_ct_PKG_CONFIG"; then
|
if test -n "$PKG_CONFIG"; then
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
|
||||||
$as_echo "$ac_ct_PKG_CONFIG" >&6; }
|
$as_echo "$PKG_CONFIG" >&6; }
|
||||||
else
|
else
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
$as_echo "no" >&6; }
|
$as_echo "no" >&6; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$ac_ct_PKG_CONFIG" = x; then
|
|
||||||
PKG_CONFIG=""
|
|
||||||
else
|
|
||||||
case $cross_compiling:$ac_tool_warned in
|
|
||||||
yes:)
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
|
|
||||||
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
|
|
||||||
ac_tool_warned=yes ;;
|
|
||||||
esac
|
|
||||||
PKG_CONFIG=$ac_ct_PKG_CONFIG
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
if test "x$enable_maintainer_mode" != "xyes"
|
if test "x$enable_maintainer_mode" != "xyes"
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in New Issue