Permalink
Browse files

Remove glib dependancy from test.c and test-character.c .

  • Loading branch information...
dov committed Mar 10, 2018
1 parent 565f83a commit 03ba9fc5358bb3dd78c4e8708abefaad106475d0
@@ -147,26 +147,6 @@ if test x$enable_deprecated = xno; then
[Don not build deprecated functionality])
fi
# --with[out]-glib
AC_ARG_WITH(glib,
AC_HELP_STRING([--with-glib=@<:@no/auto/yes@:>@],
[use Glib @<:@default=auto@:>@]))
GLIB_PACKAGE=glib-2.0
GLIB_MINVERSION=2.4
if test x$with_glib = xyes; then
PKG_CHECK_MODULES(GLIB,$GLIB_PACKAGE >= $GLIB_MINVERSION)
FRIBIDI_USE_GLIB=1
else
if test x$with_glib = xno; then
FRIBIDI_USE_GLIB=0
else
PKG_CHECK_MODULES(GLIB,$GLIB_PACKAGE >= $GLIB_MINVERSION,
FRIBIDI_USE_GLIB=1,
FRIBIDI_USE_GLIB=0)
fi
fi
AM_CONDITIONAL(FRIBIDI_USE_GLIB, test x$FRIBIDI_USE_GLIB = x1)
# --disable-docs
AC_ARG_ENABLE(docs,
AC_HELP_STRING([--disable-docs],
@@ -2,5 +2,3 @@ option('deprecated', type : 'boolean', value : true,
description: 'Build deprecated functionality')
option('docs', type : 'boolean', value : true,
description: 'Build documentation')
option('glib', type : 'boolean', value : true,
description: 'Use GLib (in unit tests)')
@@ -21,10 +21,8 @@ AM_CPPFLAGS = \
$(GLIB_CFLAGS)
LDADD = $(top_builddir)/lib/libfribidi.la $(GLIB_LIBS)
if FRIBIDI_USE_GLIB
check_PROGRAMS = test test-character
TESTS = $(TEST_DATAS)
endif
test_SOURCES = test.c
test_character_SOURCES = test-character.c
@@ -1,19 +1,12 @@
with_glib = get_option('glib')
if with_glib
glib_dep = dependency('glib-2.0', version: '>= 2.4', required: false)
if glib_dep.found()
tests = [
['BidiTest', 'test.c'],
['BidiCharacterTest', 'test-character.c'],
]
foreach t : tests
exe = executable(t[0],
t[1], fribidi_unicode_version_h,
c_args: ['-DHAVE_CONFIG_H'],
include_directories: incs,
dependencies: glib_dep,
link_with: libfribidi)
test(t[0], exe, args: files('@0@.txt'.format(t[0])))
endforeach
endif
endif
tests = [
['BidiTest', 'test.c'],
['BidiCharacterTest', 'test-character.c'],
]
foreach t : tests
exe = executable(t[0],
t[1], fribidi_unicode_version_h,
c_args: ['-DHAVE_CONFIG_H'],
include_directories: incs,
link_with: libfribidi)
test(t[0], exe, args: files('@0@.txt'.format(t[0])))
endforeach
Oops, something went wrong.

0 comments on commit 03ba9fc

Please sign in to comment.