mirror of https://github.com/nu774/fdkaac.git
address issue#26
try to link with libcharset when locale_charset() is not present in libiconv
This commit is contained in:
parent
c37edc6051
commit
4682fe4961
|
@ -23,7 +23,7 @@ fdkaac_SOURCES = \
|
||||||
dist_man_MANS = man/fdkaac.1
|
dist_man_MANS = man/fdkaac.1
|
||||||
|
|
||||||
fdkaac_LDADD = \
|
fdkaac_LDADD = \
|
||||||
@LIBICONV@ -lfdk-aac -lm
|
@LIBICONV@ @CHARSET_LIB@ -lfdk-aac -lm
|
||||||
|
|
||||||
if FDK_PLATFORM_POSIX
|
if FDK_PLATFORM_POSIX
|
||||||
fdkaac_SOURCES += \
|
fdkaac_SOURCES += \
|
||||||
|
|
|
@ -13,7 +13,7 @@ AC_PROG_CC
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
|
|
||||||
AC_CHECK_HEADERS([sys/time.h])
|
AC_CHECK_HEADERS([sys/time.h])
|
||||||
AC_CHECK_HEADERS([localcharset.h langinfo.h endian.h byteswap.h])
|
AC_CHECK_HEADERS([libcharset.h langinfo.h endian.h byteswap.h])
|
||||||
AC_CHECK_HEADERS([fdk-aac/aacenc_lib.h], ,
|
AC_CHECK_HEADERS([fdk-aac/aacenc_lib.h], ,
|
||||||
AC_MSG_ERROR([libfdk-aac is required]))
|
AC_MSG_ERROR([libfdk-aac is required]))
|
||||||
|
|
||||||
|
@ -38,6 +38,12 @@ AC_CHECK_FUNC(getopt_long)
|
||||||
AM_CONDITIONAL([FDK_NO_GETOPT_LONG],[test "$ac_cv_func_getopt_long" != "yes"])
|
AM_CONDITIONAL([FDK_NO_GETOPT_LONG],[test "$ac_cv_func_getopt_long" != "yes"])
|
||||||
AC_SEARCH_LIBS([aacEncOpen],[fdk-aac],[],[],[])
|
AC_SEARCH_LIBS([aacEncOpen],[fdk-aac],[],[],[])
|
||||||
|
|
||||||
|
CHARSET_LIB=
|
||||||
|
AC_CHECK_LIB([iconv], [locale_charset],
|
||||||
|
[CHARSET_LIB=-liconv],
|
||||||
|
[AC_CHECK_LIB([charset], [locale_charset], [CHARSET_LIB=-lcharset])])
|
||||||
|
AC_SUBST([CHARSET_LIB])
|
||||||
|
|
||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
|
|
||||||
X_PLATFORM=posix
|
X_PLATFORM=posix
|
||||||
|
|
|
@ -59,8 +59,8 @@ char *aacenc_to_utf8(const char *s)
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
|
|
||||||
#if HAVE_LOCALCHARSET_H
|
#if HAVE_LIBCHARSET_H
|
||||||
#include <localcharset.h>
|
#include <libcharset.h>
|
||||||
#elif HAVE_LANGINFO_H
|
#elif HAVE_LANGINFO_H
|
||||||
#include <langinfo.h>
|
#include <langinfo.h>
|
||||||
static const char *locale_charset(void)
|
static const char *locale_charset(void)
|
||||||
|
|
Loading…
Reference in New Issue