How to accomodate the transformation of fribidi-config into pkg-config

How to accomodate the transformation of fribidi-config into pkg-config

Ron Varburg linux-il at hotmail.com
Sun Jul 4 08:44:55 IDT 2010


1) geresh
The geresh package was written when there was a fribidi-config.
It turns out that now days there is no longer fribidi-config.
It looks like pkg-config does the job of fribidi-config.

Do the following patches looks reasonable? 
How would you fix the following files:


1) Makefile.in:
===============
-FRIBIDI_CONFIG = @FRIBIDI_CONFIG@
+PKG_CONFIG = @PKG_CONFIG@


2) configure.in:
================
-dnl ---- fribidi ----
+dnl ---- pkg-config ----

-if test "x$FRIBIDI_CONFIG" = x; then
-    AC_PATH_PROG(FRIBIDI_CONFIG, fribidi-config)
+if test "x$PKG_CONFIG" = x; then
+    AC_PATH_PROG(PKG__CONFIG, pkg-config)
 fi

-test "x$FRIBIDI_CONFIG" = x && AC_MSG_ERROR(Can't locate the fribidi-config program)
-test ! -x "$FRIBIDI_CONFIG" && AC_MSG_ERROR(Can't execute the program '$FRIBIDI_CONFIG')
+test "x$PKG_CONFIG" = x && AC_MSG_ERROR(Can't locate the pkg-config program)
+test ! -x "$PKG_CONFIG" && AC_MSG_ERROR(Can't execute the program '$PKG_CONFIG')
+

+dnl ---- fribidi ----

-FRIBIDI_CXXFLAGS=`$FRIBIDI_CONFIG --cflags`
-if test "x$FRIBIDI_CXXFLAGS" = x-I/usr/include; then
    AC_PATH_PROG(FRIBIDI_CONFIG, fribidi-config)
+if test "x$PKG_CONFIG" = x; then
+    AC_PATH_PROG(PKG__CONFIG, pkg-config)
 fi

-test "x$FRIBIDI_CONFIG" = x && AC_MSG_ERROR(Can't locate the fribidi-config program)
-test ! -x "$FRIBIDI_CONFIG" && AC_MSG_ERROR(Can't execute the program '$FRIBIDI_CONFIG')
+test "x$PKG_CONFIG" = x && AC_MSG_ERROR(Can't locate the pkg-config program)
+test ! -x "$PKG_CONFIG" && AC_MSG_ERROR(Can't execute the program '$PKG_CONFIG')
+

+dnl ---- fribidi ----

-FRIBIDI_CXXFLAGS=`$FRIBIDI_CONFIG --cflags`
-if test "x$FRIBIDI_CXXFLAGS" = x-I/usr/include; then
+FRIBIDI_CXXFLAGS=`$PKG_CONFIG --cflags fribidi`
+if test "x$FRIBIDI_CXXFLAGS" = x-I/usr/include/fribidi; then
     AC_CHECK_HEADER(fribidi/fribidi.h, , [CXXFLAGS="$CXXFLAGS $FRIBIDI_CXXFLAGS"])
 else
     CXXFLAGS="$CXXFLAGS $FRIBIDI_CXXFLAGS"
 fi
-LDFLAGS="$LDFLAGS `$FRIBIDI_CONFIG --libs`"
+LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs fribidi`"


3) configure:
=============
$ grep -i fribidi_config configure
if test "x$FRIBIDI_CONFIG" = x; then
if eval "test \"`echo '$''{'ac_cv_path_FRIBIDI_CONFIG'+set}'`\" = set"; then
  case "$FRIBIDI_CONFIG" in
  ac_cv_path_FRIBIDI_CONFIG="$FRIBIDI_CONFIG" # Let the user override the tes
t with a path.
  ac_cv_path_FRIBIDI_CONFIG="$FRIBIDI_CONFIG" # Let the user override the tes
t with a dos path.
      ac_cv_path_FRIBIDI_CONFIG="$ac_dir/$ac_word"
FRIBIDI_CONFIG="$ac_cv_path_FRIBIDI_CONFIG"
if test -n "$FRIBIDI_CONFIG"; then
  echo "$ac_t""$FRIBIDI_CONFIG" 1>&6
test "x$FRIBIDI_CONFIG" = x && { echo "configure: error: Can't locate the fri
bidi-config program" 1>&2; exit 1; }
test ! -x "$FRIBIDI_CONFIG" && { echo "configure: error: Can't execute the pr
ogram '$FRIBIDI_CONFIG'" 1>&2; exit 1; }
FRIBIDI_CXXFLAGS=`$FRIBIDI_CONFIG --cflags`
LDFLAGS="$LDFLAGS `$FRIBIDI_CONFIG --libs`"
s%@FRIBIDI_CONFIG@%$FRIBIDI_CONFIG%g


2) Katoob had a similar issue: 
Index: katoob-0.5.9.1/configure.in
===================================================================
--- katoob-0.5.9.1.orig/configure.in    2010-04-26 13:03:37.251428511 +0900
+++ katoob-0.5.9.1/configure.in 2010-04-26 13:04:02.058238951 +0900
@@ -145,12 +145,12 @@
 fi

 if test "$fribidi" = yes; then
- AC_PATH_PROG(FRIBIDI_CONFIG, fribidi-config)
+ AC_PATH_PROG(FRIBIDI_CONFIG, pkg-config)
  if test "x$FRIBIDI_CONFIG" = x; then
   AC_MSG_ERROR(fribidi-config not found.)
  else
-  FRIBIDI_CFLAGS=$($FRIBIDI_CONFIG --cflags)
-  FRIBIDI_LIBS=$($FRIBIDI_CONFIG --libs)
+  FRIBIDI_CFLAGS=$($FRIBIDI_CONFIG --cflags fribidi)
+  FRIBIDI_LIBS=$($FRIBIDI_CONFIG --libs fribidi)
   AC_DEFINE(HAVE_FRIBIDI,,[Enable fribidi support.])
  fi
 fi

 		 	   		  
_________________________________________________________________
Hotmail: דואר אלקטרוני מהימן עם הגנה רבת עוצמה של Microsoft מפני הודעות זבל.
https://signup.live.com/signup.aspx?id=60969


More information about the Linux-il mailing list