Permalink
Browse files

another try to clean up glib dependencies

  • Loading branch information...
1 parent 51b0923 commit 0a1d171e6d3c22f0829db0464e82bf3dccc07bb8 @tagoh committed Oct 5, 2012
Showing with 3,736 additions and 1,802 deletions.
  1. +90 −0 configure.ac
  2. +4 −0 liblangtag-gobject/Makefile.am
  3. +6 −0 liblangtag/Makefile.am
  4. +108 −117 liblangtag/extensions/lt-ext-ldml-t.c
  5. +129 −142 liblangtag/extensions/lt-ext-ldml-u.c
  6. +1 −0 liblangtag/lt-database.c
  7. +139 −13 liblangtag/lt-error.c
  8. +20 −16 liblangtag/lt-error.h
  9. +6 −3 liblangtag/lt-ext-module-data.c
  10. +1 −2 liblangtag/lt-ext-module-data.h
  11. +3 −3 liblangtag/lt-ext-module-private.h
  12. +107 −100 liblangtag/lt-ext-module.c
  13. +5 −5 liblangtag/lt-ext-module.h
  14. +2 −3 liblangtag/lt-extension-private.h
  15. +99 −87 liblangtag/lt-extension.c
  16. +54 −51 liblangtag/lt-extlang-db.c
  17. +4 −4 liblangtag/lt-extlang-db.h
  18. +56 −54 liblangtag/lt-extlang.c
  19. +47 −44 liblangtag/lt-grandfathered-db.c
  20. +4 −4 liblangtag/lt-grandfathered-db.h
  21. +36 −32 liblangtag/lt-grandfathered.c
  22. +57 −54 liblangtag/lt-lang-db.c
  23. +4 −4 liblangtag/lt-lang-db.h
  24. +66 −65 liblangtag/lt-lang.c
  25. +307 −0 liblangtag/lt-list.c
  26. +52 −0 liblangtag/lt-list.h
  27. +126 −4 liblangtag/lt-macros.h
  28. +32 −32 liblangtag/lt-mem.c
  29. +3 −8 liblangtag/lt-mem.h
  30. +305 −0 liblangtag/lt-messages.c
  31. +308 −0 liblangtag/lt-messages.h
  32. +48 −44 liblangtag/lt-redundant-db.c
  33. +4 −4 liblangtag/lt-redundant-db.h
  34. +36 −32 liblangtag/lt-redundant.c
  35. +50 −46 liblangtag/lt-region-db.c
  36. +4 −4 liblangtag/lt-region-db.h
  37. +35 −31 liblangtag/lt-region.c
  38. +1 −1 liblangtag/lt-region.h
  39. +47 −43 liblangtag/lt-script-db.c
  40. +4 −4 liblangtag/lt-script-db.h
  41. +22 −20 liblangtag/lt-script.c
  42. +257 −0 liblangtag/lt-string.c
  43. +54 −0 liblangtag/lt-string.h
  44. +1 −1 liblangtag/lt-tag-private.h
  45. +397 −406 liblangtag/lt-tag.c
  46. +13 −11 liblangtag/lt-tag.h
  47. +103 −3 liblangtag/lt-utils.c
  48. +13 −2 liblangtag/lt-utils.h
  49. +58 −53 liblangtag/lt-variant-db.c
  50. +4 −4 liblangtag/lt-variant-db.h
  51. +61 −69 liblangtag/lt-variant.c
  52. +11 −10 liblangtag/lt-variant.h
  53. +122 −77 liblangtag/lt-xml.c
  54. +6 −0 tests/Makefile.am
  55. +97 −0 tests/check-list.c
  56. +34 −32 tests/check-tag.c
  57. +7 −5 tests/extlang-db.c
  58. +6 −4 tests/grandfathered-db.c
  59. +8 −6 tests/lang-db.c
  60. +5 −3 tests/region-db.c
  61. +7 −5 tests/script-db.c
  62. +31 −28 tests/tag.c
  63. +9 −7 tests/variant-db.c
View
@@ -69,6 +69,96 @@ dnl ======================================================================
LANGTAG_MODULEDIR="${libdir}/liblangtag"
AC_SUBST(LANGTAG_MODULEDIR)
+dnl check for flavours of varargs macros
+AC_MSG_CHECKING(for ISO C99 varargs macros in C)
+_save_cflags=$CFLAGS
+CFLAGS=$(sed -e 's/\-Werror//g')
+AC_TRY_COMPILE([],[
+int a(int p1, int p2, int p3);
+#define call_a(...) a(1,__VA_ARGS__)
+call_a(2,3);
+],[have_iso_c_varargs=yes;AC_DEFINE(LT_HAVE_ISO_VARARGS, 1, [Use ISO C99 varargs])],[have_iso_c_varargs=no])
+CFLAGS=$_save_cflags
+AC_MSG_RESULT($have_iso_c_varargs)
+
+AC_MSG_CHECKING(for GNUC varargs macros)
+_save_cflags=$CFLAGS
+CFLAGS=$(sed -e 's/\-Werror//g')
+AC_TRY_COMPILE([],[
+int a(int p1, int p2, int p3);
+#define call_a(params...) a(1,params)
+call_a(2,3);
+],[have_gnuc_varargs=yes;AC_DEFINE(LT_HAVE_GNUC_VARARGS, 1, [Use GNUC varargs macro])],[have_gnuc_varargs=no])
+CFLAGS=$_save_cflags
+AC_MSG_RESULT($have_gnuc_varargs)
+
+dnl inline
+AC_CACHE_CHECK([for __inline],lt_cv_has__inline,[
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ __inline int foo(void);
+ __inline int foo() {return 0;}
+ int main() {return foo();}
+ ]])],
+ lt_cv_has__inline=yes,
+ lt_cv_has__inline=no,)
+])
+case x$lt_cv_has__inline in
+xyes)
+ AC_DEFINE(LT_HAVE___INLINE,1,[Have __inline keyword])
+esac
+AC_CACHE_CHECK([for __inline__],lt_cv_has__inline__,[
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ __inline__ int foo(void);
+ __inline__ int foo() {return 0;}
+ int main() {return foo();}
+ ]])],
+ lt_cv_has__inline__=yes,
+ lt_cv_has__inline__=no,)
+])
+case x$lt_cv_has__inline__ in
+xyes)
+ AC_DEFINE(LT_HAVE___INLINE__,1,[Have __inline__ keyword])
+esac
+AC_CACHE_CHECK([for inline],lt_cv_hasinline,[
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ #undef inline
+ inline int foo(void);
+ inline int foo() {return 0;}
+ int main() {return foo();}
+ ]])],
+ lt_cv_hasinline=yes,
+ lt_cv_hasinline=no,)
+])
+case x$lt_cv_hasinline in
+xyes)
+ AC_DEFINE(LT_HAVE_INLINE,1,[Have inline keyword])
+esac
+AC_MSG_CHECKING(if inline functions in headers work)
+AC_LINK_IFELSE([AC_LANG_SOURCE([[
+#if defined (LT_HAVE_INLINE) && defined (__GNUC__) && defined (__STRICT_ANSI__)
+#undef inline
+#define inline __inline__
+#elif !defined (LT_HAVE_INLINE)
+#undef inline
+#if defined (LT_HAVE___INLINE__)
+#define inline __inline__
+#elif defined (LT_HAVE___INLINE)
+#define inline __inline
+#endif
+#endif
+
+int lt_test_func2(int);
+
+static inline int
+lt_test_func1(void) {
+ return lt_test_func2(1);
+}
+int main(void) {int i = 1; return --i;}]])],[lt_can_inline=yes;AC_DEFINE(LT_CAN_INLINE, 1, [Wheter inline statement can be used])],[lt_can_inline=no])
+AC_MSG_RESULT($lt_can_inline)
+
+dnl ---alignment---
+AC_CHECK_ALIGNOF(void *)
+
dnl ======================================================================
dnl functions testing
dnl ======================================================================
@@ -67,13 +67,15 @@ liblangtag_gobject_built_private_headers = \
lt-grandfathered.gir.h \
lt-lang-db.gir.h \
lt-lang.gir.h \
+ lt-list.gir.h \
lt-macros.gir.h \
lt-redundant-db.gir.h \
lt-redundant.gir.h \
lt-region-db.gir.h \
lt-region.gir.h \
lt-script-db.gir.h \
lt-script.gir.h \
+ lt-string.gir.h \
lt-tag.gir.h \
lt-variant-db.gir.h \
lt-variant.gir.h \
@@ -90,12 +92,14 @@ liblangtag_gobject_built_sources = \
lt-grandfathered.gir.c \
lt-lang-db.gir.c \
lt-lang.gir.c \
+ lt-list.gir.c \
lt-redundant-db.gir.c \
lt-redundant.gir.c \
lt-region-db.gir.c \
lt-region.gir.c \
lt-script-db.gir.c \
lt-script.gir.c \
+ lt-string.gir.c \
lt-tag.gir.c \
lt-variant-db.gir.c \
lt-variant.gir.c \
View
@@ -55,13 +55,15 @@ liblangtag_public_headers = \
lt-grandfathered-db.h \
lt-lang.h \
lt-lang-db.h \
+ lt-list.h \
lt-macros.h \
lt-redundant.h \
lt-redundant-db.h \
lt-region.h \
lt-region-db.h \
lt-script.h \
lt-script-db.h \
+ lt-string.h \
lt-tag.h \
lt-variant.h \
lt-variant-db.h \
@@ -73,6 +75,7 @@ liblangtag_private_headers = \
lt-grandfathered-private.h \
lt-lang-private.h \
lt-mem.h \
+ lt-messages.h \
lt-redundant-private.h \
lt-region-private.h \
lt-script-private.h \
@@ -102,13 +105,16 @@ liblangtag_sources = \
lt-grandfathered-db.c \
lt-lang.c \
lt-lang-db.c \
+ lt-list.c \
lt-mem.c \
+ lt-messages.c \
lt-redundant.c \
lt-redundant-db.c \
lt-region.c \
lt-region-db.c \
lt-script.c \
lt-script-db.c \
+ lt-string.c \
lt-tag.c \
lt-utils.c \
lt-variant.c \
Oops, something went wrong.

0 comments on commit 0a1d171

Please sign in to comment.