Fix and cleanup build

This commit is contained in:
Tim Rühsen 2018-04-30 11:52:34 +02:00
parent b7f5c1414d
commit b77d54469e
4 changed files with 8 additions and 29 deletions

View File

@ -38,6 +38,7 @@ addons:
- valgrind
script:
- set -e
- ./autogen.sh
# CFI doesn't work out on Ubuntu 14.04 (Trusty). They don't include LLVMgold.so for clang-3.8.
# clang-3.4 doesn't know CFI yet.

View File

@ -180,18 +180,17 @@ if test "$enable_runtime" = "libidn2" -o "$enable_builtin" = "libidn2" -o "$enab
# Check for libidn2
PKG_CHECK_MODULES([LIBIDN2], [libidn2], [
HAVE_LIBIDN2=yes
if test "$enable_runtime" = "libidn2"; then
if test "$enable_runtime" = "libidn2" -o "$enable_runtime" = "auto"; then
LIBS="$LIBIDN2_LIBS $LIBS"
CFLAGS="$LIBIDN2_CFLAGS $CFLAGS"
fi
], [
OLDLIBS=$LIBS
AC_SEARCH_LIBS(idn2_lookup_u8, idn2, HAVE_LIBIDN2=yes,
[
if test "$enable_runtime" = "libidn2" -o "$enable_builtin" = "libidn2"; then
AC_MSG_ERROR(You requested libidn2 but it is not installed.)
fi
], -lunistring)
LIBS=$OLDLIBS
])
if test "x$HAVE_LIBIDN2" = "xyes"; then
@ -212,7 +211,8 @@ if test "$enable_runtime" = "libicu" -o "$enable_builtin" = "libicu" -o "$enable
# using AC_SEARCH_LIBS also don't work since functions have the library version appended
PKG_CHECK_MODULES([LIBICU], [icu-uc], [
HAVE_LIBICU=yes
if test "$enable_runtime" = "libicu"; then
if test "$enable_runtime" = "libicu" -o "$enable_runtime" = "auto"; then
LIBS="$LIBICU_LIBS $LIBS"
CFLAGS="$LIBICU_CFLAGS $CFLAGS"
fi
], [
@ -228,8 +228,8 @@ if test "$enable_runtime" = "libicu" -o "$enable_builtin" = "libicu" -o "$enable
if test "$enable_runtime" = "libicu" -o "$enable_builtin" = "libicu"; then
AC_MSG_ERROR(You requested libicu but it is not installed.)
fi
LIBS=$OLDLIBS
])
LIBS=$OLDLIBS
])
if test "x$HAVE_LIBICU" = "xyes"; then
@ -248,18 +248,17 @@ if test "$enable_runtime" = "libidn" -o "$enable_builtin" = "libidn" -o "$enable
# Check for libidn
PKG_CHECK_MODULES([LIBIDN], [libidn], [
HAVE_LIBIDN=yes
if test "$enable_runtime" = "libidn"; then
if test "$enable_runtime" = "libidn" -o "$enable_runtime" = "auto"; then
LIBS="$LIBIDN_LIBS $LIBS"
CFLAGS="$LIBIDN_CFLAGS $CFLAGS"
fi
], [
OLDLIBS=$LIBS
AC_SEARCH_LIBS(idna_to_ascii_8z, idn, HAVE_LIBIDN=yes,
[
if test "$enable_runtime" = "libidn" -o "$enable_builtin" = "libidn"; then
AC_MSG_ERROR(You requested libidn but it is not installed.)
fi
])
LIBS=$OLDLIBS
])
if test "x$HAVE_LIBIDN" = "xyes"; then
@ -284,9 +283,7 @@ fi
if test "x$HAVE_LIBIDN2" = "xyes" -o "x$HAVE_LIBIDN" = "xyes"; then
# Check for libunistring, we need it for psl_str_to_utf8lower()
OLDLIBS=$LIBS
AC_SEARCH_LIBS(u8_tolower, unistring, HAVE_UNISTRING=yes, AC_MSG_ERROR(You requested libidn2|libidn but libunistring is not installed.))
LIBS=$OLDLIBS
fi
# AM_ICONV sets @LIBICONV@ and @LTLIBICONV@ for use in Makefile.am

View File

@ -15,15 +15,6 @@ libpsl_la_LIBADD = $(LTLIBICONV) $(LTLIBINTL) @INTL_MACOSX_LIBS@
# include ABI version information
libpsl_la_LDFLAGS = -no-undefined -version-info $(LIBPSL_SO_VERSION)
if WITH_LIBICU
libpsl_la_LDFLAGS += $(LIBICU_LIBS)
endif
if WITH_LIBIDN2
libpsl_la_LDFLAGS += -lidn2 -lunistring
endif
if WITH_LIBIDN
libpsl_la_LDFLAGS += -lidn -lunistring
endif
# Build rule for suffix_dafsa.c
# PSL_FILE can be set by ./configure --with-psl-file=[PATH]

View File

@ -3,14 +3,4 @@ bin_PROGRAMS = psl
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
LDADD = $(top_builddir)/src/libpsl.la
#if WITH_LIBICU
# LDADD += -licuuc
#endif
#if WITH_LIBIDN2
# LDADD += -lidn2
#endif
#if WITH_LIBIDN
# LDADD += -lidn
#endif
dist_man_MANS = psl.1