Alexandre Julliard : configure: Don' t use the alternate package config scripts when cross-compiling.

Alexandre Julliard julliard at winehq.org
Wed Jul 31 15:31:34 CDT 2013


Module: wine
Branch: master
Commit: 0a06ca2917ab2d558bb463a25519a6888cd8b55c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0a06ca2917ab2d558bb463a25519a6888cd8b55c

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Jul 31 21:31:02 2013 +0200

configure: Don't use the alternate package config scripts when cross-compiling.

---

 aclocal.m4 |    4 ++--
 configure  |   28 ++++++++++++++--------------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index 15508d2..08ba797 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -92,12 +92,12 @@ AC_ARG_VAR(ac_cflags, [C compiler flags for $2, overriding pkg-config])dnl
 AS_IF([test -n "$ac_cflags"],[],
       [test -n "$PKG_CONFIG"],
       [ac_cflags=`$PKG_CONFIG --cflags [$2] 2>/dev/null`])
-m4_ifval([$4],[ac_cflags=[$]{ac_cflags:-[$4]}])
+m4_ifval([$4],[test "$cross_compiling" = yes || ac_cflags=[$]{ac_cflags:-[$4]}])
 AC_ARG_VAR(ac_libs, [Linker flags for $2, overriding pkg-config])dnl
 AS_IF([test -n "$ac_libs"],[],
       [test -n "$PKG_CONFIG"],
       [ac_libs=`$PKG_CONFIG --libs [$2] 2>/dev/null`])
-m4_ifval([$5],[ac_libs=[$]{ac_libs:-[$5]}])
+m4_ifval([$5],[test "$cross_compiling" = yes || ac_libs=[$]{ac_libs:-[$5]}])
 m4_ifval([$3],[ac_libs=[$]{ac_libs:-"$3"}])
 ac_save_CPPFLAGS=$CPPFLAGS
 CPPFLAGS="$CPPFLAGS $ac_cflags"
diff --git a/configure b/configure
index 2cb80f4..d102316 100755
--- a/configure
+++ b/configure
@@ -9593,13 +9593,13 @@ then
 elif test -n "$PKG_CONFIG"; then :
   XML2_CFLAGS=`$PKG_CONFIG --cflags libxml-2.0 2>/dev/null`
 fi
-XML2_CFLAGS=${XML2_CFLAGS:-`xml2-config --cflags 2>/dev/null`}
+test "$cross_compiling" = yes || XML2_CFLAGS=${XML2_CFLAGS:-`xml2-config --cflags 2>/dev/null`}
 if test -n "$XML2_LIBS"; then :
 
 elif test -n "$PKG_CONFIG"; then :
   XML2_LIBS=`$PKG_CONFIG --libs libxml-2.0 2>/dev/null`
 fi
-XML2_LIBS=${XML2_LIBS:-`xml2-config --libs 2>/dev/null`}
+test "$cross_compiling" = yes || XML2_LIBS=${XML2_LIBS:-`xml2-config --libs 2>/dev/null`}
 XML2_LIBS=${XML2_LIBS:-"-lxml2"}
 ac_save_CPPFLAGS=$CPPFLAGS
 CPPFLAGS="$CPPFLAGS $XML2_CFLAGS"
@@ -9905,13 +9905,13 @@ then
 elif test -n "$PKG_CONFIG"; then :
   XSLT_CFLAGS=`$PKG_CONFIG --cflags libxslt 2>/dev/null`
 fi
-XSLT_CFLAGS=${XSLT_CFLAGS:-`xslt-config --cflags 2>/dev/null`}
+test "$cross_compiling" = yes || XSLT_CFLAGS=${XSLT_CFLAGS:-`xslt-config --cflags 2>/dev/null`}
 if test -n "$XSLT_LIBS"; then :
 
 elif test -n "$PKG_CONFIG"; then :
   XSLT_LIBS=`$PKG_CONFIG --libs libxslt 2>/dev/null`
 fi
-XSLT_LIBS=${XSLT_LIBS:-`xslt-config --libs 2>/dev/null`}
+test "$cross_compiling" = yes || XSLT_LIBS=${XSLT_LIBS:-`xslt-config --libs 2>/dev/null`}
 XSLT_LIBS=${XSLT_LIBS:-"-lxml2"}
 ac_save_CPPFLAGS=$CPPFLAGS
 CPPFLAGS="$CPPFLAGS $XSLT_CFLAGS"
@@ -10435,13 +10435,13 @@ then
 elif test -n "$PKG_CONFIG"; then :
   SANE_CFLAGS=`$PKG_CONFIG --cflags libsane 2>/dev/null`
 fi
-SANE_CFLAGS=${SANE_CFLAGS:-`sane-config --cflags 2>/dev/null`}
+test "$cross_compiling" = yes || SANE_CFLAGS=${SANE_CFLAGS:-`sane-config --cflags 2>/dev/null`}
 if test -n "$SANE_LIBS"; then :
 
 elif test -n "$PKG_CONFIG"; then :
   SANE_LIBS=`$PKG_CONFIG --libs libsane 2>/dev/null`
 fi
-SANE_LIBS=${SANE_LIBS:-`sane-config --ldflags 2>/dev/null`}
+test "$cross_compiling" = yes || SANE_LIBS=${SANE_LIBS:-`sane-config --ldflags 2>/dev/null`}
 
 ac_save_CPPFLAGS=$CPPFLAGS
 CPPFLAGS="$CPPFLAGS $SANE_CFLAGS"
@@ -10591,13 +10591,13 @@ then
 elif test -n "$PKG_CONFIG"; then :
   GPHOTO2_CFLAGS=`$PKG_CONFIG --cflags libgphoto2 2>/dev/null`
 fi
-GPHOTO2_CFLAGS=${GPHOTO2_CFLAGS:-`gphoto2-config --cflags 2>/dev/null`}
+test "$cross_compiling" = yes || GPHOTO2_CFLAGS=${GPHOTO2_CFLAGS:-`gphoto2-config --cflags 2>/dev/null`}
 if test -n "$GPHOTO2_LIBS"; then :
 
 elif test -n "$PKG_CONFIG"; then :
   GPHOTO2_LIBS=`$PKG_CONFIG --libs libgphoto2 2>/dev/null`
 fi
-GPHOTO2_LIBS=${GPHOTO2_LIBS:-`gphoto2-config --libs 2>/dev/null`}
+test "$cross_compiling" = yes || GPHOTO2_LIBS=${GPHOTO2_LIBS:-`gphoto2-config --libs 2>/dev/null`}
 GPHOTO2_LIBS=${GPHOTO2_LIBS:-"-lgphoto2"}
 ac_save_CPPFLAGS=$CPPFLAGS
 CPPFLAGS="$CPPFLAGS $GPHOTO2_CFLAGS"
@@ -10661,13 +10661,13 @@ test -z "$GPHOTO2_LIBS" || GPHOTO2_LIBS=`echo " $GPHOTO2_LIBS" | sed 's/ -L\([^/
 elif test -n "$PKG_CONFIG"; then :
   GPHOTO2_PORT_CFLAGS=`$PKG_CONFIG --cflags libgphoto2_port 2>/dev/null`
 fi
-GPHOTO2_PORT_CFLAGS=${GPHOTO2_PORT_CFLAGS:-`gphoto2-port-config --cflags 2>/dev/null`}
+test "$cross_compiling" = yes || GPHOTO2_PORT_CFLAGS=${GPHOTO2_PORT_CFLAGS:-`gphoto2-port-config --cflags 2>/dev/null`}
 if test -n "$GPHOTO2_PORT_LIBS"; then :
 
 elif test -n "$PKG_CONFIG"; then :
   GPHOTO2_PORT_LIBS=`$PKG_CONFIG --libs libgphoto2_port 2>/dev/null`
 fi
-GPHOTO2_PORT_LIBS=${GPHOTO2_PORT_LIBS:-`gphoto2-port-config --libs 2>/dev/null`}
+test "$cross_compiling" = yes || GPHOTO2_PORT_LIBS=${GPHOTO2_PORT_LIBS:-`gphoto2-port-config --libs 2>/dev/null`}
 GPHOTO2_PORT_LIBS=${GPHOTO2_PORT_LIBS:-"-lgphoto2_port"}
 ac_save_CPPFLAGS=$CPPFLAGS
 CPPFLAGS="$CPPFLAGS $GPHOTO2_PORT_CFLAGS"
@@ -10881,13 +10881,13 @@ then
 elif test -n "$PKG_CONFIG"; then :
   FREETYPE_CFLAGS=`$PKG_CONFIG --cflags freetype2 2>/dev/null`
 fi
-FREETYPE_CFLAGS=${FREETYPE_CFLAGS:-`(freetype-config --cflags || freetype2-config --cflags) 2>/dev/null`}
+test "$cross_compiling" = yes || FREETYPE_CFLAGS=${FREETYPE_CFLAGS:-`(freetype-config --cflags || freetype2-config --cflags) 2>/dev/null`}
 if test -n "$FREETYPE_LIBS"; then :
 
 elif test -n "$PKG_CONFIG"; then :
   FREETYPE_LIBS=`$PKG_CONFIG --libs freetype2 2>/dev/null`
 fi
-FREETYPE_LIBS=${FREETYPE_LIBS:-`(freetype-config --libs || freetype2-config --libs) 2>/dev/null`}
+test "$cross_compiling" = yes || FREETYPE_LIBS=${FREETYPE_LIBS:-`(freetype-config --libs || freetype2-config --libs) 2>/dev/null`}
 FREETYPE_LIBS=${FREETYPE_LIBS:-"-lfreetype"}
 ac_save_CPPFLAGS=$CPPFLAGS
 CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
@@ -11941,13 +11941,13 @@ then
 elif test -n "$PKG_CONFIG"; then :
   PNG_CFLAGS=`$PKG_CONFIG --cflags libpng 2>/dev/null`
 fi
-PNG_CFLAGS=${PNG_CFLAGS:-$X_CFLAGS}
+test "$cross_compiling" = yes || PNG_CFLAGS=${PNG_CFLAGS:-$X_CFLAGS}
 if test -n "$PNG_LIBS"; then :
 
 elif test -n "$PKG_CONFIG"; then :
   PNG_LIBS=`$PKG_CONFIG --libs libpng 2>/dev/null`
 fi
-PNG_LIBS=${PNG_LIBS:-$X_LIBS}
+test "$cross_compiling" = yes || PNG_LIBS=${PNG_LIBS:-$X_LIBS}
 
 ac_save_CPPFLAGS=$CPPFLAGS
 CPPFLAGS="$CPPFLAGS $PNG_CFLAGS"




More information about the wine-cvs mailing list