small --disable-builtin cleanups

This commit is contained in:
Tim Ruehsen 2014-04-17 13:09:29 +02:00
parent ee0064532c
commit ed9562848c
5 changed files with 12 additions and 6 deletions

View File

@ -69,6 +69,7 @@ AC_ARG_ENABLE(builtin,
enable_builtin=yes
AC_DEFINE([WITH_BUILTIN], [1], [compile PSL data into library])
])
AM_CONDITIONAL([WITH_BUILTIN], [test $enable_builtin = yes])
# Check for valgrind
ac_enable_valgrind=no

View File

@ -1,5 +1,3 @@
#EXTRA_DIST = $(top_srcdir)/data/effective_tld_names.dat
# suffixes.c must be created before psl.c is compiled
BUILT_SOURCES = suffixes.c

View File

@ -2,9 +2,20 @@ DEFS = @DEFS@ -DDATADIR=\"$(top_srcdir)/data\" -DSRCDIR=\"$(srcdir)\" -DPSL_FILE
AM_CPPFLAGS = -I$(top_srcdir)/include
LDADD = ../src/libpsl-@LIBPSL_API_VERSION@.la
if WITH_BUILTIN
PSL_TESTS = test-is-public test-is-public-builtin test-is-public-all test-registrable-domain \
test-is-cookie-domain-acceptable
else
# ./configure'd with '--disable-builtin'
# Do not call test-is-public-builtin here: it does not make sense.
# Do not call test-registrable-domain here: it would fail due to missing punycode entries in PSL file.
PSL_TESTS = test-is-public test-is-public-all test-is-cookie-domain-acceptable
endif
check_PROGRAMS = $(PSL_TESTS)
TESTS_ENVIRONMENT = TESTS_VALGRIND="@VALGRIND_ENVIRONMENT@"

View File

@ -121,9 +121,7 @@ int main(int argc, const char * const *argv)
}
}
#ifdef WITH_BUILTIN
test_psl();
#endif
if (failed) {
printf("Summary: %d out of %d tests failed\n", failed, ok + failed);

View File

@ -156,9 +156,7 @@ int main(int argc, const char * const *argv)
}
}
#ifdef WITH_BUILTIN
test_psl();
#endif
if (failed) {
printf("Summary: %d out of %d tests failed\n", failed, ok + failed);