diff configure @ 30133:16308dac4e7f

Change fribidi check to also work without fribidi-config.
author reimar
date Sun, 03 Jan 2010 01:00:21 +0000
parents e6373560edd1
children cc55de3130d9
line wrap: on
line diff
--- a/configure	Sun Jan 03 00:58:56 2010 +0000
+++ b/configure	Sun Jan 03 01:00:21 2010 +0000
@@ -6218,8 +6218,9 @@
 
 
 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>
 /* workaround for fribidi 0.10.4 and below */
@@ -6234,15 +6235,19 @@
 }
 EOF
 	_fribidi=no
-	cc_check $($_fribidiconfig --cflags) $($_fribidiconfig --libs) && _fribidi=yes
-    else
-	_fribidi=no
-    fi
+	_inc_tmp=""
+	_ld_tmp="-lfribidi"
+	cc_check $_inc_tmp $_ld_tmp && _fribidi=yes
+	if test "$_fribidi" = no ; then
+	  _inc_tmp="$($_fribidiconfig --cflags)"
+	  _ld_tmp="$($_fribidiconfig --libs)"
+	  cc_check $_inc_tmp $_ld_tmp && _fribidi=yes
+	fi
 fi
 if test "$_fribidi" = yes ; then
     def_fribidi='#define CONFIG_FRIBIDI 1'
-    extra_cflags="$extra_cflags $($_fribidiconfig --cflags)"
-    extra_ldflags="$extra_ldflags $($_fribidiconfig --libs)"
+    extra_cflags="$extra_cflags $_inc_tmp"
+    extra_ldflags="$extra_ldflags $_ld_tmp"
 else
     def_fribidi='#undef CONFIG_FRIBIDI'
 fi