[MPlayer-dev-eng] [PATCH] Align fribidi include with pkg-config include path.
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Mon Feb 24 23:47:12 CET 2014
Looking at the pkg-config output it seems that fribidi
is supposed to be included via just fribidi.h instead
of fribidi/fribidi.h.
Not sure how much sense it makes (for example it means that
just adding "-I/usr/local/include" won't pick up a fribidi
installed there anymore), in fact I rather dislike it,
but currently the pkg-config fallback isn't really working.
So it is messy either way and I'd like comments.
---
configure | 4 ++--
libass/ass_shaper.c | 2 +-
libass/ass_shaper.h | 2 +-
libmenu/menu.c | 2 +-
sub/subreader.c | 2 +-
sub/subreader.h | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 1448a23..1bafbe6 100755
--- a/configure
+++ b/configure
@@ -6305,7 +6305,7 @@ echocheck "fribidi with charsets"
if test "$_fribidi" = auto ; then
cat > $TMPC << EOF
#include <stdlib.h>
-#include <fribidi/fribidi.h>
+#include <fribidi.h>
FriBidiParType test;
int main(void) {
if (fribidi_parse_charset("UTF-8") != FRIBIDI_CHAR_SET_UTF8)
@@ -6314,7 +6314,7 @@ int main(void) {
}
EOF
_fribidi=no
- cc_check -lfribidi && _fribidi=yes && extra_ldflags="$extra_ldflags -lfribidi"
+ cc_check -I/usr/include/fribidi -lfribidi && _fribidi=yes && extra_cflags="$extra_cflags -I/usr/include/fribidi" && extra_ldflags="$extra_ldflags -lfribidi"
if $_pkg_config --exists fribidi > /dev/null 2>&1 &&
test "$_fribidi" = no ; then
inc_tmp="$($_pkg_config --cflags fribidi)"
diff --git a/libass/ass_shaper.c b/libass/ass_shaper.c
index e5757b0..0214c0c 100644
--- a/libass/ass_shaper.c
+++ b/libass/ass_shaper.c
@@ -19,7 +19,7 @@
#include "config.h"
#ifdef CONFIG_FRIBIDI
-#include <fribidi/fribidi.h>
+#include <fribidi.h>
#endif
#include "ass_shaper.h"
diff --git a/libass/ass_shaper.h b/libass/ass_shaper.h
index 98b6288..bcfff50 100644
--- a/libass/ass_shaper.h
+++ b/libass/ass_shaper.h
@@ -22,7 +22,7 @@
#include "config.h"
#ifdef CONFIG_FRIBIDI
-#include <fribidi/fribidi.h>
+#include <fribidi.h>
#else
typedef int FriBidiParType;
typedef int FriBidiStrIndex;
diff --git a/libmenu/menu.c b/libmenu/menu.c
index 7744f8f..0513a3d 100644
--- a/libmenu/menu.c
+++ b/libmenu/menu.c
@@ -425,7 +425,7 @@ static void render_txt(char *txt)
}
#ifdef CONFIG_FRIBIDI
-#include <fribidi/fribidi.h>
+#include <fribidi.h>
#include "libavutil/common.h"
char *menu_fribidi_charset = NULL;
int menu_flip_hebrew = 0;
diff --git a/sub/subreader.c b/sub/subreader.c
index 1d61b30..0a9711c 100644
--- a/sub/subreader.c
+++ b/sub/subreader.c
@@ -55,7 +55,7 @@
#endif
char *sub_cp=NULL;
#ifdef CONFIG_FRIBIDI
-#include <fribidi/fribidi.h>
+#include <fribidi.h>
char *fribidi_charset = NULL; ///character set that will be passed to FriBiDi
int flip_hebrew = 1; ///flip subtitles using fribidi
int fribidi_flip_commas = 0; ///flip comma when fribidi is used
diff --git a/sub/subreader.h b/sub/subreader.h
index 0760081..9340533 100644
--- a/sub/subreader.h
+++ b/sub/subreader.h
@@ -24,7 +24,7 @@
#include "config.h"
#ifdef CONFIG_FRIBIDI
-#include <fribidi/fribidi.h>
+#include <fribidi.h>
int do_fribid_log2vis(int charset, const char *in, FriBidiChar *logical, FriBidiChar *visual, int flip_commas);
#endif
--
1.9.0
More information about the MPlayer-dev-eng
mailing list