Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only search for libunistring once #243

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ AC_C_INLINE
dnl Check for visibility support
gl_VISIBILITY

dnl Unicodesupport
gl_LIBUNISTRING

#
# Generate version defines for include file
#
Expand Down Expand Up @@ -277,15 +274,20 @@ if test "$enable_runtime" = "auto"; then
enable_runtime=no
fi

if test "x$HAVE_LIBIDN2" = "xyes" -o "x$HAVE_LIBIDN" = "xyes"; then
# Check for libunistring, we need it for psl_str_to_utf8lower()
AC_SEARCH_LIBS(u8_tolower, unistring, HAVE_UNISTRING=yes, AC_MSG_ERROR(You requested libidn2|libidn but libunistring is not installed.))
fi

# AM_ICONV sets @LIBICONV@ and @LTLIBICONV@ for use in Makefile.am
# do not use AM_ICONV conditionally
AM_ICONV

if test "x$HAVE_LIBIDN2" = "xyes" -o "x$HAVE_LIBIDN" = "xyes"; then
# Check for libunistring, we need it for psl_str_to_utf8lower()
dnl Unicodesupport
gl_LIBUNISTRING
else
# No need for libiconv when building without libidn/libidn2
LIBICONV=""
LTLIBICONV=""
fi

AM_CONDITIONAL([WITH_LIBICU], test "x$enable_runtime" = "xlibicu")
AM_CONDITIONAL([WITH_LIBIDN2], test "x$enable_runtime" = "xlibidn2")
AM_CONDITIONAL([WITH_LIBIDN], test "x$enable_runtime" = "xlibidn")
Expand Down
Loading