Skip to content

Commit

Permalink
Only search for libunistring once
Browse files Browse the repository at this point in the history
  • Loading branch information
rockdaboot committed Mar 27, 2024
1 parent 6b0b3b0 commit 50099a6
Showing 1 changed file with 10 additions and 8 deletions.
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

0 comments on commit 50099a6

Please sign in to comment.