Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check for GNU libunistring and use it
- Loading branch information
Showing
5 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
ACLOCAL_AMFLAGS = -I m4 | ||
|
||
sysconf_DATA = forked-daapd.conf | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
libtool.m4 | ||
lt*.m4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# libunistring.m4 serial 4 | ||
dnl Copyright (C) 2009-2010 Free Software Foundation, Inc. | ||
dnl This file is free software; the Free Software Foundation | ||
dnl gives unlimited permission to copy and/or distribute it, | ||
dnl with or without modifications, as long as this notice is preserved. | ||
|
||
dnl gl_LIBUNISTRING | ||
dnl Searches for an installed libunistring. | ||
dnl If found, it sets and AC_SUBSTs HAVE_LIBUNISTRING=yes and the LIBUNISTRING | ||
dnl and LTLIBUNISTRING variables and augments the CPPFLAGS variable, and | ||
dnl #defines HAVE_LIBUNISTRING to 1. Otherwise, it sets and AC_SUBSTs | ||
dnl HAVE_LIBUNISTRING=no and LIBUNISTRING and LTLIBUNISTRING to empty. | ||
|
||
AC_DEFUN([gl_LIBUNISTRING], | ||
[ | ||
dnl First, try to link without -liconv. libunistring often depends on | ||
dnl libiconv, but we don't know (and often don't need to know) where | ||
dnl libiconv is installed. | ||
AC_LIB_HAVE_LINKFLAGS([unistring], [], | ||
[#include <uniconv.h>], [u8_strconv_from_locale((char*)0);], | ||
[no, consider installing GNU libunistring]) | ||
if test "$ac_cv_libunistring" != yes; then | ||
dnl Second try, with -liconv. | ||
AC_REQUIRE([AM_ICONV]) | ||
if test -n "$LIBICONV"; then | ||
dnl We have to erase the cached result of the first AC_LIB_HAVE_LINKFLAGS | ||
dnl invocation, otherwise the second one will not be run. | ||
unset ac_cv_libunistring | ||
glus_save_LIBS="$LIBS" | ||
LIBS="$LIBS $LIBICONV" | ||
AC_LIB_HAVE_LINKFLAGS([unistring], [], | ||
[#include <uniconv.h>], [u8_strconv_from_locale((char*)0);], | ||
[no, consider installing GNU libunistring]) | ||
if test -n "$LIBUNISTRING"; then | ||
LIBUNISTRING="$LIBUNISTRING $LIBICONV" | ||
LTLIBUNISTRING="$LTLIBUNISTRING $LTLIBICONV" | ||
fi | ||
LIBS="$glus_save_LIBS" | ||
fi | ||
fi | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters