[MPlayer-cvslog] r31239 - in branches/1.0rc3: . configure

diego subversion at mplayerhq.hu
Thu May 27 23:08:52 CEST 2010


Author: diego
Date: Thu May 27 23:08:51 2010
New Revision: 31239

Log:
Merge fribidi-related changes from trunk:
Drop fribidi-config support and replace it by a check that first tries
to use fribidi directly and then falls back on pkg-config.

Modified:
   branches/1.0rc3/   (props changed)
   branches/1.0rc3/configure

Modified: branches/1.0rc3/configure
==============================================================================
--- branches/1.0rc3/configure	Thu May 27 22:59:40 2010	(r31238)
+++ branches/1.0rc3/configure	Thu May 27 23:08:51 2010	(r31239)
@@ -473,7 +473,6 @@ Use these options if autodetection fails
   --with-xvmclib=NAME         adapter-specific library name (e.g. XvMCNVIDIA)
 
   --with-freetype-config=PATH path to freetype-config
-  --with-fribidi-config=PATH  path to fribidi-config
   --with-glib-config=PATH     path to glib*-config
   --with-gtk-config=PATH      path to gtk*-config
   --with-sdl-config=PATH      path to sdl*-config
@@ -710,7 +709,6 @@ _macosx_bundle=auto
 _sortsub=yes
 _freetypeconfig='freetype-config'
 _fribidi=auto
-_fribidiconfig='fribidi-config'
 _enca=auto
 _inet6=auto
 _gethostbyname2=auto
@@ -778,9 +776,6 @@ for ac_option do
   --with-freetype-config=*)
     _freetypeconfig=`echo $ac_option | cut -d '=' -f 2`
     ;;
-  --with-fribidi-config=*)
-    _fribidiconfig=`echo $ac_option | cut -d '=' -f 2`
-    ;;
   --with-gtk-config=*)
     _gtkconfig=`echo $ac_option | cut -d '=' -f 2`
     ;;
@@ -6036,10 +6031,12 @@ echores "$_ass"
 
 
 echocheck "fribidi with charsets"
+_inc_tmp=""
+_ld_tmp=""
 if test "$_fribidi" = auto ; then
-    if ( $_fribidiconfig --version ) >/dev/null 2>&1 ; then
 	cat > $TMPC << EOF
 #include <stdio.h>
+#include <stdlib.h>
 /* workaround for fribidi 0.10.4 and below */
 #define FRIBIDI_CHARSET_UTF8 FRIBIDI_CHAR_SET_UTF8
 #include <fribidi/fribidi.h>
@@ -6051,16 +6048,21 @@ int main(void) {
     return 0;
 }
 EOF
-	_fribidi=no
-	cc_check `$_fribidiconfig --cflags` `$_fribidiconfig --libs` && tmp_run && _fribidi=yes
-    else
-	_fribidi=no
+    _fribidi=no
+    _inc_tmp=""
+    _ld_tmp="-lfribidi"
+    cc_check $_inc_tmp $_ld_tmp && _fribidi=yes
+    if $_pkg_config --exists fribidi > /dev/null 2>&1 &&
+       test "$_fribidi" = no ; then
+        _inc_tmp="$($_pkg_config --cflags)"
+        _ld_tmp="$($_pkg_config --libs)"
+        cc_check $_inc_tmp $_ld_tmp && _fribidi=yes
     fi
 fi
 if test "$_fribidi" = yes ; then
-    def_fribidi='#define CONFIG_FRIBIDI'
-    extra_cflags="$extra_cflags `$_fribidiconfig --cflags`"
-    extra_ldflags="$extra_ldflags `$_fribidiconfig --libs`"
+    def_fribidi='#define CONFIG_FRIBIDI 1'
+    extra_cflags="$extra_cflags $_inc_tmp"
+    extra_ldflags="$extra_ldflags $_ld_tmp"
 else
     def_fribidi='#undef CONFIG_FRIBIDI'
 fi


More information about the MPlayer-cvslog mailing list