Merge branch 'dp/i18n-libcharset' into maint
* dp/i18n-libcharset: Makefile: introduce CHARSET_LIB to link with -lcharset
This commit is contained in:
commit
ef55bd78e7
5
Makefile
5
Makefile
@ -53,6 +53,10 @@ all::
|
|||||||
# FreeBSD can use either, but MinGW and some others need to use
|
# FreeBSD can use either, but MinGW and some others need to use
|
||||||
# libcharset.h's locale_charset() instead.
|
# libcharset.h's locale_charset() instead.
|
||||||
#
|
#
|
||||||
|
# Define CHARSET_LIB to you need to link with library other than -liconv to
|
||||||
|
# use locale_charset() function. On some platforms this needs to set to
|
||||||
|
# -lcharset
|
||||||
|
#
|
||||||
# Define LIBC_CONTAINS_LIBINTL if your gettext implementation doesn't
|
# Define LIBC_CONTAINS_LIBINTL if your gettext implementation doesn't
|
||||||
# need -lintl when linking.
|
# need -lintl when linking.
|
||||||
#
|
#
|
||||||
@ -1695,6 +1699,7 @@ endif
|
|||||||
|
|
||||||
ifdef HAVE_LIBCHARSET_H
|
ifdef HAVE_LIBCHARSET_H
|
||||||
BASIC_CFLAGS += -DHAVE_LIBCHARSET_H
|
BASIC_CFLAGS += -DHAVE_LIBCHARSET_H
|
||||||
|
EXTLIBS += $(CHARSET_LIB)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef HAVE_DEV_TTY
|
ifdef HAVE_DEV_TTY
|
||||||
|
@ -74,3 +74,4 @@ SNPRINTF_RETURNS_BOGUS=@SNPRINTF_RETURNS_BOGUS@
|
|||||||
NO_PTHREADS=@NO_PTHREADS@
|
NO_PTHREADS=@NO_PTHREADS@
|
||||||
PTHREAD_CFLAGS=@PTHREAD_CFLAGS@
|
PTHREAD_CFLAGS=@PTHREAD_CFLAGS@
|
||||||
PTHREAD_LIBS=@PTHREAD_LIBS@
|
PTHREAD_LIBS=@PTHREAD_LIBS@
|
||||||
|
CHARSET_LIB=@CHARSET_LIB@
|
||||||
|
10
configure.ac
10
configure.ac
@ -836,6 +836,16 @@ AC_CHECK_HEADER([libcharset.h],
|
|||||||
[HAVE_LIBCHARSET_H=YesPlease],
|
[HAVE_LIBCHARSET_H=YesPlease],
|
||||||
[HAVE_LIBCHARSET_H=])
|
[HAVE_LIBCHARSET_H=])
|
||||||
AC_SUBST(HAVE_LIBCHARSET_H)
|
AC_SUBST(HAVE_LIBCHARSET_H)
|
||||||
|
# Define CHARSET_LIB if libiconv does not export the locale_charset symbol
|
||||||
|
# and libcharset does
|
||||||
|
CHARSET_LIB=
|
||||||
|
AC_CHECK_LIB([iconv], [locale_charset],
|
||||||
|
[],
|
||||||
|
[AC_CHECK_LIB([charset], [locale_charset],
|
||||||
|
[CHARSET_LIB=-lcharset])
|
||||||
|
]
|
||||||
|
)
|
||||||
|
AC_SUBST(CHARSET_LIB)
|
||||||
#
|
#
|
||||||
# Define NO_STRCASESTR if you don't have strcasestr.
|
# Define NO_STRCASESTR if you don't have strcasestr.
|
||||||
GIT_CHECK_FUNC(strcasestr,
|
GIT_CHECK_FUNC(strcasestr,
|
||||||
|
Loading…
Reference in New Issue
Block a user