File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 56
56
# FreeBSD can use either, but MinGW and some others need to use
57
57
# libcharset.h's locale_charset() instead.
58
58
#
59
+ # Define CHARSET_LIB to you need to link with library other than -liconv to
60
+ # use locale_charset() function. On some platforms this needs to set to
61
+ # -lcharset
62
+ #
59
63
# Define LIBC_CONTAINS_LIBINTL if your gettext implementation doesn't
60
64
# need -lintl when linking.
61
65
#
@@ -1701,6 +1705,7 @@ endif
1701
1705
1702
1706
ifdef HAVE_LIBCHARSET_H
1703
1707
BASIC_CFLAGS += -DHAVE_LIBCHARSET_H
1708
+ EXTLIBS += $(CHARSET_LIB)
1704
1709
endif
1705
1710
1706
1711
ifdef HAVE_DEV_TTY
Original file line number Diff line number Diff line change @@ -74,3 +74,4 @@ SNPRINTF_RETURNS_BOGUS=@SNPRINTF_RETURNS_BOGUS@
74
74
NO_PTHREADS=@NO_PTHREADS@
75
75
PTHREAD_CFLAGS=@PTHREAD_CFLAGS@
76
76
PTHREAD_LIBS=@PTHREAD_LIBS@
77
+ CHARSET_LIB=@CHARSET_LIB@
Original file line number Diff line number Diff line change @@ -836,6 +836,16 @@ AC_CHECK_HEADER([libcharset.h],
836
836
[ HAVE_LIBCHARSET_H=YesPlease] ,
837
837
[ HAVE_LIBCHARSET_H=] )
838
838
AC_SUBST ( HAVE_LIBCHARSET_H )
839
+ # Define CHARSET_LIB if libiconv does not export the locale_charset symbol
840
+ # and libcharset does
841
+ CHARSET_LIB=
842
+ AC_CHECK_LIB ( [ iconv] , [ locale_charset] ,
843
+ [ ] ,
844
+ [ AC_CHECK_LIB ( [ charset] , [ locale_charset] ,
845
+ [ CHARSET_LIB=-lcharset] )
846
+ ]
847
+ )
848
+ AC_SUBST ( CHARSET_LIB )
839
849
#
840
850
# Define NO_STRCASESTR if you don't have strcasestr.
841
851
GIT_CHECK_FUNC(strcasestr,
You can’t perform that action at this time.
0 commit comments