From e428f970f69750094f6dbd40dee8e1d36182a545 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sat, 11 Nov 2017 23:42:52 +0200 Subject: Copy LIKELY/UNLIKELY from GLib --- lib/common.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/lib/common.h b/lib/common.h index 739e647..8ef427e 100644 --- a/lib/common.h +++ b/lib/common.h @@ -155,8 +155,22 @@ /* LIKEYLY and UNLIKELY are used to give a hint on branch prediction to the * compiler. */ #ifndef LIKELY -# define LIKELY -# define UNLIKELY +# if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__) +# define FRIBIDI_BOOLEAN_EXPR(expr) \ + __extension__ ({ \ + int fribidi_bool_var; \ + if (expr) \ + fribidi_bool_var = 1; \ + else \ + fribidi_bool_var = 0; \ + fribidi_bool_var; \ + }) +# define LIKELY(expr) (__builtin_expect (FRIBIDI_BOOLEAN_EXPR(expr), 1)) +# define UNLIKELY(expr) (__builtin_expect (FRIBIDI_BOOLEAN_EXPR(expr), 0)) +# else +# define LIKELY +# define UNLIKELY +# endif /* _GNUC_ */ #endif /* !LIKELY */ #ifndef FRIBIDI_EMPTY_STMT -- cgit v1.2.1 From 8feb2f98f33d6f0351f9703823e612935239eaab Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sat, 11 Nov 2017 23:42:54 +0200 Subject: =?UTF-8?q?These=20definitions=20don=E2=80=99t=20depend=20on=20GLi?= =?UTF-8?q?b?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/fribidi-common.h | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/lib/fribidi-common.h b/lib/fribidi-common.h index 6fb3680..f5497e5 100644 --- a/lib/fribidi-common.h +++ b/lib/fribidi-common.h @@ -66,27 +66,22 @@ # define FRIBIDI_GNUC_DEPRECATED G_GNUC_DEPRECATED # define FRIBIDI_GNUC_BEGIN_IGNORE_DEPRECATIONS G_GNUC_BEGIN_IGNORE_DEPRECATIONS # define FRIBIDI_GNUC_END_IGNORE_DEPRECATIONS G_GNUC_END_IGNORE_DEPRECATIONS -# if __GNUC__ > 2 -# define FRIBIDI_GNUC_WARN_UNUSED \ - __attribute__((__warn_unused_result__)) -# define FRIBIDI_GNUC_MALLOC \ - __attribute__((__malloc__)) -# define FRIBIDI_GNUC_HIDDEN \ - __attribute__((__visibility__ ("hidden"))) -# else /* __GNUC__ <= 2 */ -# define FRIBIDI_GNUC_WARN_UNUSED -# define FRIBIDI_GNUC_MALLOC -# define FRIBIDI_GNUC_HIDDEN -# endif /* __GNUC__ <= 2 */ #else /* !FRIBIDI_USE_GLIB */ # define FRIBIDI_GNUC_CONST # define FRIBIDI_GNUC_DEPRECATED # define FRIBIDI_GNUC_BEGIN_IGNORE_DEPRECATIONS # define FRIBIDI_GNUC_END_IGNORE_DEPRECATIONS +#endif /* !FRIBIDI_USE_GLIB */ + +#if defined(__GNUC__) && (__GNUC__ > 2) +# define FRIBIDI_GNUC_WARN_UNUSED __attribute__((__warn_unused_result__)) +# define FRIBIDI_GNUC_MALLOC __attribute__((__malloc__)) +# define FRIBIDI_GNUC_HIDDEN __attribute__((__visibility__ ("hidden"))) +#else /* __GNUC__ */ # define FRIBIDI_GNUC_WARN_UNUSED # define FRIBIDI_GNUC_MALLOC # define FRIBIDI_GNUC_HIDDEN -#endif /* !FRIBIDI_USE_GLIB */ +#endif /* __GNUC__ */ /* FRIBIDI_BEGIN_DECLS should be used at the beginning of your declarations, * so that C++ compilers don't mangle their names. Use FRIBIDI_END_DECLS at -- cgit v1.2.1 From 4c6aef17d645fd501a56f1d09d3a54a0dc0c1fa3 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sat, 11 Nov 2017 23:42:56 +0200 Subject: Just use the GCC attributes here directly as well --- lib/fribidi-common.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/fribidi-common.h b/lib/fribidi-common.h index f5497e5..bf7b574 100644 --- a/lib/fribidi-common.h +++ b/lib/fribidi-common.h @@ -62,13 +62,9 @@ # endif /* !__FRIBIDI_DOC */ # define FRIBIDI_BEGIN_DECLS G_BEGIN_DECLS # define FRIBIDI_END_DECLS G_END_DECLS -# define FRIBIDI_GNUC_CONST G_GNUC_CONST -# define FRIBIDI_GNUC_DEPRECATED G_GNUC_DEPRECATED # define FRIBIDI_GNUC_BEGIN_IGNORE_DEPRECATIONS G_GNUC_BEGIN_IGNORE_DEPRECATIONS # define FRIBIDI_GNUC_END_IGNORE_DEPRECATIONS G_GNUC_END_IGNORE_DEPRECATIONS #else /* !FRIBIDI_USE_GLIB */ -# define FRIBIDI_GNUC_CONST -# define FRIBIDI_GNUC_DEPRECATED # define FRIBIDI_GNUC_BEGIN_IGNORE_DEPRECATIONS # define FRIBIDI_GNUC_END_IGNORE_DEPRECATIONS #endif /* !FRIBIDI_USE_GLIB */ @@ -77,10 +73,14 @@ # define FRIBIDI_GNUC_WARN_UNUSED __attribute__((__warn_unused_result__)) # define FRIBIDI_GNUC_MALLOC __attribute__((__malloc__)) # define FRIBIDI_GNUC_HIDDEN __attribute__((__visibility__ ("hidden"))) +# define FRIBIDI_GNUC_CONST __attribute__((__const__)) +# define FRIBIDI_GNUC_DEPRECATED __attribute__((__unused__)) #else /* __GNUC__ */ # define FRIBIDI_GNUC_WARN_UNUSED # define FRIBIDI_GNUC_MALLOC # define FRIBIDI_GNUC_HIDDEN +# define FRIBIDI_GNUC_CONST +# define FRIBIDI_GNUC_DEPRECATED #endif /* __GNUC__ */ /* FRIBIDI_BEGIN_DECLS should be used at the beginning of your declarations, -- cgit v1.2.1 From 414a4955f949830cc40d2ebc5de95dfb329c8490 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sat, 11 Nov 2017 23:42:58 +0200 Subject: Copy BEGIN/END_IGNORE_DEPRECATIONS from GLib --- bin/fribidi-benchmark.c | 4 ++-- bin/fribidi-main.c | 12 ++++++------ lib/fribidi-common.h | 34 +++++++++++++++++++++++++++++----- 3 files changed, 37 insertions(+), 13 deletions(-) diff --git a/bin/fribidi-benchmark.c b/bin/fribidi-benchmark.c index 233239b..151262b 100644 --- a/bin/fribidi-benchmark.c +++ b/bin/fribidi-benchmark.c @@ -218,7 +218,7 @@ benchmark ( { /* Create a bidi string */ base = FRIBIDI_PAR_ON; -FRIBIDI_GNUC_BEGIN_IGNORE_DEPRECATIONS +FRIBIDI_BEGIN_IGNORE_DEPRECATIONS if (!fribidi_log2vis (us, len, &base, /* output */ out_us, positionVtoL, positionLtoV, @@ -226,7 +226,7 @@ FRIBIDI_GNUC_BEGIN_IGNORE_DEPRECATIONS die2 ("something failed in fribidi_log2vis.\n" "perhaps memory allocation failure.", NULL); -FRIBIDI_GNUC_END_IGNORE_DEPRECATIONS +FRIBIDI_END_IGNORE_DEPRECATIONS } /* stop timer */ diff --git a/bin/fribidi-main.c b/bin/fribidi-main.c index 084518d..ac0b97f 100644 --- a/bin/fribidi-main.c +++ b/bin/fribidi-main.c @@ -344,10 +344,10 @@ main ( if (!char_set_num) die2 ("unrecognized character set `%s'\n", char_set); -FRIBIDI_GNUC_BEGIN_IGNORE_DEPRECATIONS +FRIBIDI_BEGIN_IGNORE_DEPRECATIONS fribidi_set_mirroring (do_mirror); fribidi_set_reorder_nsm (do_reorder_nsm); -FRIBIDI_GNUC_END_IGNORE_DEPRECATIONS +FRIBIDI_END_IGNORE_DEPRECATIONS exit_val = 0; file_found = false; while (optind < argc || !file_found) @@ -427,11 +427,11 @@ FRIBIDI_GNUC_END_IGNORE_DEPRECATIONS /* Create a bidi string. */ base = input_base_direction; -FRIBIDI_GNUC_BEGIN_IGNORE_DEPRECATIONS +FRIBIDI_BEGIN_IGNORE_DEPRECATIONS log2vis = fribidi_log2vis (logical, len, &base, /* output */ visual, ltov, vtol, levels); -FRIBIDI_GNUC_END_IGNORE_DEPRECATIONS +FRIBIDI_END_IGNORE_DEPRECATIONS if (log2vis) { @@ -439,12 +439,12 @@ FRIBIDI_GNUC_END_IGNORE_DEPRECATIONS printf ("%-*s => ", padding_width, S_); /* Remove explicit marks, if asked for. */ -FRIBIDI_GNUC_BEGIN_IGNORE_DEPRECATIONS +FRIBIDI_BEGIN_IGNORE_DEPRECATIONS if (do_clean) len = fribidi_remove_bidi_marks (visual, len, ltov, vtol, levels); -FRIBIDI_GNUC_END_IGNORE_DEPRECATIONS +FRIBIDI_END_IGNORE_DEPRECATIONS if (show_visual) { diff --git a/lib/fribidi-common.h b/lib/fribidi-common.h index bf7b574..72d7007 100644 --- a/lib/fribidi-common.h +++ b/lib/fribidi-common.h @@ -62,13 +62,37 @@ # endif /* !__FRIBIDI_DOC */ # define FRIBIDI_BEGIN_DECLS G_BEGIN_DECLS # define FRIBIDI_END_DECLS G_END_DECLS -# define FRIBIDI_GNUC_BEGIN_IGNORE_DEPRECATIONS G_GNUC_BEGIN_IGNORE_DEPRECATIONS -# define FRIBIDI_GNUC_END_IGNORE_DEPRECATIONS G_GNUC_END_IGNORE_DEPRECATIONS -#else /* !FRIBIDI_USE_GLIB */ -# define FRIBIDI_GNUC_BEGIN_IGNORE_DEPRECATIONS -# define FRIBIDI_GNUC_END_IGNORE_DEPRECATIONS #endif /* !FRIBIDI_USE_GLIB */ +#ifdef __ICC +#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS \ + _Pragma ("warning (push)") \ + _Pragma ("warning (disable:1478)") +#define FRIBIDI_END_IGNORE_DEPRECATIONS \ + _Pragma ("warning (pop)") +#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#define FRIBIDI_END_IGNORE_DEPRECATIONS \ + _Pragma ("GCC diagnostic pop") +#elif defined (_MSC_VER) && (_MSC_VER >= 1500) +#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS \ + __pragma (warning (push)) \ + __pragma (warning (disable : 4996)) +#define FRIBIDI_END_IGNORE_DEPRECATIONS \ + __pragma (warning (pop)) +#elif defined (__clang__) +#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") +#define FRIBIDI_END_IGNORE_DEPRECATIONS \ + _Pragma("clang diagnostic pop") +#else +#define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS +#define FRIBIDI_END_IGNORE_DEPRECATIONS +#endif + #if defined(__GNUC__) && (__GNUC__ > 2) # define FRIBIDI_GNUC_WARN_UNUSED __attribute__((__warn_unused_result__)) # define FRIBIDI_GNUC_MALLOC __attribute__((__malloc__)) -- cgit v1.2.1 From 93fbff126e3474d7b35563cc921073323fc70ed3 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sat, 11 Nov 2017 23:43:00 +0200 Subject: Unused macro --- lib/fribidi-types.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/fribidi-types.h b/lib/fribidi-types.h index 9b66aea..ddc3457 100644 --- a/lib/fribidi-types.h +++ b/lib/fribidi-types.h @@ -140,12 +140,6 @@ typedef struct _FriBracketTypeStruct FriBidiBracketType; #define FRIBIDI_NO_BRACKET { 0, 0 } -#ifndef FRIBIDI_MAX_STRING_LENGTH -# define FRIBIDI_MAX_STRING_LENGTH (sizeof (FriBidiStrIndex) == 2 ? \ - 0x7FFF : (sizeof (FriBidiStrIndex) == 1 ? \ - 0x7F : 0x7FFFFFFFL)) -#endif - /* A few macros for working with bits */ #define FRIBIDI_TEST_BITS(x, mask) (((x) & (mask)) ? 1 : 0) -- cgit v1.2.1 From 39d1c30d9fbfbcf6df81b94600cb000c69a02475 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sun, 12 Nov 2017 00:10:41 +0200 Subject: Drop GLib use in the library and main program Only users left are the fribidi-vs-unicode test programs. --- charset/fribidi-char-sets.c | 11 +++-------- lib/common.h | 39 --------------------------------------- lib/fribidi-common.h | 8 -------- lib/fribidi-config.h.in | 3 --- lib/fribidi-types.h | 14 -------------- lib/fribidi.c | 5 ----- 6 files changed, 3 insertions(+), 77 deletions(-) diff --git a/charset/fribidi-char-sets.c b/charset/fribidi-char-sets.c index f7156b4..5a9e21e 100644 --- a/charset/fribidi-char-sets.c +++ b/charset/fribidi-char-sets.c @@ -113,12 +113,8 @@ static FriBidiCharSetHandler char_sets[FRIBIDI_CHAR_SETS_NUM + 1] = { # undef _FRIBIDI_ADD_CHAR_SET_ONE2ONE }; -#if FRIBIDI_USE_GLIB+0 -# include -# define fribidi_strcasecmp g_ascii_strcasecmp -#else /* !FRIBIDI_USE_GLIB */ static char -toupper ( +fribidi_toupper ( /* input */ char c ) @@ -133,14 +129,13 @@ fribidi_strcasecmp ( const char *s2 ) { - while (*s1 && toupper (*s1) == toupper (*s2)) + while (*s1 && fribidi_toupper (*s1) == fribidi_toupper (*s2)) { s1++; s2++; } - return toupper (*s1) - toupper (*s2); + return fribidi_toupper (*s1) - fribidi_toupper (*s2); } -#endif /* !FRIBIDI_USE_GLIB */ FRIBIDI_ENTRY FriBidiCharSet fribidi_parse_charset ( diff --git a/lib/common.h b/lib/common.h index 8ef427e..d8395c3 100644 --- a/lib/common.h +++ b/lib/common.h @@ -45,45 +45,6 @@ # define FRIBIDI_PRIVATESPACE(SYMBOL) FRIBIDI_PRIVATESPACE0(_,FRIBIDI_NAMESPACE(_##SYMBOL##__internal__)) #endif /* !FRIBIDI_PRIVATESPACE */ -#if FRIBIDI_USE_GLIB+0 -# ifndef SIZEOF_LONG -# define SIZEOF_LONG GLIB_SIZEOF_LONG -# endif /* !SIZEOF_LONG */ -# ifndef SIZEOF_VOID_P -# define SIZEOF_VOID_P GLIB_SIZEOF_VOID_P -# endif /* !SIZEOF_VOID_P */ -# ifndef __FRIBIDI_DOC -# include -# endif /* !__FRIBIDI_DOC */ -# ifndef fribidi_malloc -# define fribidi_malloc g_try_malloc -# define fribidi_free g_free -# endif /* !fribidi_malloc */ -# ifndef fribidi_assert -# ifndef __FRIBIDI_DOC -# include -# endif /* !__FRIBIDI_DOC */ -# define fribidi_assert g_assert -# endif /* !fribidi_assert */ -# ifndef __FRIBIDI_DOC -# include -# endif /* !__FRIBIDI_DOC */ -# ifndef FRIBIDI_BEGIN_STMT -# define FRIBIDI_BEGIN_STMT G_STMT_START { -# define FRIBIDI_END_STMT } G_STMT_END -# endif /* !FRIBIDI_BEGIN_STMT */ -# ifndef LIKELY -# define LIKELY G_LIKELY -# define UNLIKELY G_UNLIKELY -# endif /* !LIKELY */ -# ifndef false -# define false FALSE -# endif /* !false */ -# ifndef true -# define true TRUE -# endif /* !true */ -#endif /* FRIBIDI_USE_GLIB */ - #ifndef false # define false (0) # endif /* !false */ diff --git a/lib/fribidi-common.h b/lib/fribidi-common.h index 72d7007..0dc9c5b 100644 --- a/lib/fribidi-common.h +++ b/lib/fribidi-common.h @@ -56,14 +56,6 @@ # define FRIBIDI_ENTRY /* empty */ #endif /* !FRIBIDI_ENTRY */ -#if FRIBIDI_USE_GLIB+0 -# ifndef __FRIBIDI_DOC -# include -# endif /* !__FRIBIDI_DOC */ -# define FRIBIDI_BEGIN_DECLS G_BEGIN_DECLS -# define FRIBIDI_END_DECLS G_END_DECLS -#endif /* !FRIBIDI_USE_GLIB */ - #ifdef __ICC #define FRIBIDI_BEGIN_IGNORE_DEPRECATIONS \ _Pragma ("warning (push)") \ diff --git a/lib/fribidi-config.h.in b/lib/fribidi-config.h.in index 7e10261..4587b65 100644 --- a/lib/fribidi-config.h.in +++ b/lib/fribidi-config.h.in @@ -17,9 +17,6 @@ /* Define to 1 if you want charset conversion codes in the library */ #define FRIBIDI_CHARSETS @FRIBIDI_CHARSETS@ -/* Define to 1 if you want to use glib */ -#define FRIBIDI_USE_GLIB @FRIBIDI_USE_GLIB@ - /* The size of a `int', as computed by sizeof. */ #define FRIBIDI_SIZEOF_INT @SIZEOF_INT@ diff --git a/lib/fribidi-types.h b/lib/fribidi-types.h index ddc3457..1288fb4 100644 --- a/lib/fribidi-types.h +++ b/lib/fribidi-types.h @@ -38,19 +38,6 @@ #include "fribidi-begindecls.h" -#if FRIBIDI_USE_GLIB+0 -# ifndef __FRIBIDI_DOC -# include -# endif /* !__FRIBIDI_DOC */ -# define FRIBIDI_INT8_LOCAL gint8 -# define FRIBIDI_INT16_LOCAL gint16 -# define FRIBIDI_INT32_LOCAL gint32 -# define FRIBIDI_UINT8_LOCAL guint8 -# define FRIBIDI_UINT16_LOCAL guint16 -# define FRIBIDI_UINT32_LOCAL guint32 -# define FRIBIDI_BOOLEAN_LOCAL gboolean -# define FRIBIDI_UNICHAR_LOCAL gunichar -#else /* !FRIBIDI_USE_GLIB */ # if defined(HAVE_INTTYPES_H) || defined(HAVE_STDINT_H) # ifndef __FRIBIDI_DOC # if HAVE_INTTYPES_H @@ -96,7 +83,6 @@ # else /* SIZEOF_WCHAR_T < 4 */ # define FRIBIDI_UNICHAR_LOCAL fribidi_uint32 # endif /* SIZEOF_WCHAR_T < 4 */ -#endif /* !FRIBIDI_USE_GLIB */ #if FRIBIDI_INT_TYPES+0 #else diff --git a/lib/fribidi.c b/lib/fribidi.c index 0ce3a1f..6e77b4e 100644 --- a/lib/fribidi.c +++ b/lib/fribidi.c @@ -82,11 +82,6 @@ const char *fribidi_version_info = #else " --disable-charsets" #endif /* !FRIBIDI_CHARSETS */ -#if FRIBIDI_USE_GLIB+0 - " --with-glib" -#else /* !FRIBIDI_USE_GLIB */ - " --without-glib" -#endif /* !FRIBIDI_USE_GLIB */ ".\n\n" "Copyright (C) 2004 Sharif FarsiWeb, Inc.\n" "Copyright (C) 2001, 2002, 2004, 2005 Behdad Esfahbod\n" -- cgit v1.2.1 From cd50fbafae142616519ffe2ff257e98611f2b7ff Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sun, 12 Nov 2017 00:20:53 +0200 Subject: Remove more remnants of GLib support --- bin/Makefile.am | 5 ++--- charset/Makefile.am | 3 +-- configure.ac | 14 -------------- fribidi-vs-unicode/Makefile.am | 4 ++-- fribidi.pc.in | 1 - gen.tab/Makefile.am | 5 +---- lib/Makefile.am | 4 ++-- 7 files changed, 8 insertions(+), 28 deletions(-) diff --git a/bin/Makefile.am b/bin/Makefile.am index fd495ad..7aab22e 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -14,10 +14,9 @@ fribidi_benchmark_SOURCES = fribidi-benchmark.c $(getopt_SOURCES) AM_CPPFLAGS = \ -I$(top_builddir)/lib \ -I$(top_srcdir)/lib \ - -I$(top_srcdir)/charset \ - $(MISC_CFLAGS) + -I$(top_srcdir)/charset -LDADD = $(top_builddir)/lib/libfribidi.la $(MISC_LIBS) +LDADD = $(top_builddir)/lib/libfribidi.la if FRIBIDI_CHARSETS else # !FRIBIDI_CHARSETS diff --git a/charset/Makefile.am b/charset/Makefile.am index 6caf121..3709c1d 100644 --- a/charset/Makefile.am +++ b/charset/Makefile.am @@ -2,8 +2,7 @@ noinst_LTLIBRARIES = libfribidi-char-sets.la AM_CPPFLAGS = \ -I$(top_builddir)/lib \ - -I$(top_srcdir)/lib \ - $(MISC_CFLAGS) + -I$(top_srcdir)/lib pkginclude_HEADERS = diff --git a/configure.ac b/configure.ac index c98380c..8d324b3 100644 --- a/configure.ac +++ b/configure.ac @@ -173,8 +173,6 @@ AC_ARG_WITH(glib, [use Glib @<:@default=auto@:>@])) GLIB_PACKAGE=glib-2.0 GLIB_MINVERSION=2.4 -GLIB_LIBS= -GLIB_CFLAGS= if test x$with_glib = xyes; then PKG_CHECK_MODULES(GLIB,$GLIB_PACKAGE >= $GLIB_MINVERSION) FRIBIDI_USE_GLIB=1 @@ -187,20 +185,8 @@ else FRIBIDI_USE_GLIB=0) fi fi -if test x$FRIBIDI_USE_GLIB = x0; then - GLIB_PACKAGE= -fi -AC_SUBST(FRIBIDI_USE_GLIB) AM_CONDITIONAL(FRIBIDI_USE_GLIB, test x$FRIBIDI_USE_GLIB = x1) - -MISC_CFLAGS="$GLIB_CFLAGS" -MISC_LIBS="$GLIB_LIBS" -MISC_PACKAGES="$GLIB_PACKAGE" -AC_SUBST(MISC_CFLAGS) -AC_SUBST(MISC_LIBS) -AC_SUBST(MISC_PACKAGES) - # Generate output AC_CONFIG_FILES([fribidi.pc lib/fribidi-config.h diff --git a/fribidi-vs-unicode/Makefile.am b/fribidi-vs-unicode/Makefile.am index 22e4931..e24cc53 100644 --- a/fribidi-vs-unicode/Makefile.am +++ b/fribidi-vs-unicode/Makefile.am @@ -10,8 +10,8 @@ AM_CPPFLAGS = \ -I$(top_builddir)/lib \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/charset \ - $(MISC_CFLAGS) -LDADD = $(top_builddir)/lib/libfribidi.la $(MISC_LIBS) + $(GLIB_CFLAGS) +LDADD = $(top_builddir)/lib/libfribidi.la $(GLIB_LIBS) if FRIBIDI_USE_GLIB check_PROGRAMS = test test-character diff --git a/fribidi.pc.in b/fribidi.pc.in index 7988fca..bb3a51c 100644 --- a/fribidi.pc.in +++ b/fribidi.pc.in @@ -7,7 +7,6 @@ includedir=@includedir@ Name: @PACKAGE_NAME@ Description: Unicode Bidirectional Algorithm Library -Requires: @MISC_PACKAGES@ Version: @VERSION@ Libs: -L${libdir} -lfribidi Cflags: -I${includedir}/@PACKAGE@ diff --git a/gen.tab/Makefile.am b/gen.tab/Makefile.am index 3d6fb59..7bc3acf 100644 --- a/gen.tab/Makefile.am +++ b/gen.tab/Makefile.am @@ -21,10 +21,7 @@ DISTCLEANFILES = AM_CPPFLAGS = \ -I$(top_builddir)/lib \ -I$(top_srcdir)/lib \ - -I$(top_srcdir)/charset \ - $(MISC_CFLAGS) - -LDADD = $(MISC_LIBS) + -I$(top_srcdir)/charset VPATH += \ $(builddir)/unidata \ diff --git a/lib/Makefile.am b/lib/Makefile.am index fd15292..11411d1 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -2,10 +2,10 @@ EXTRA_DIST = fribidi.def lib_LTLIBRARIES = libfribidi.la -AM_CPPFLAGS = $(MISC_CFLAGS) +AM_CPPFLAGS = libfribidi_la_LDFLAGS = -no-undefined -version-info $(LT_VERSION_INFO) -libfribidi_la_LIBADD = $(MISC_LIBS) +libfribidi_la_LIBADD = libfribidi_la_DEPENDENCIES = if OS_WIN32 -- cgit v1.2.1