Try to autodetect the libiconv
This commit is contained in:
parent
2b54989e6f
commit
5b75ff7e55
2 changed files with 13 additions and 2 deletions
5
Makefile
5
Makefile
|
@ -33,10 +33,11 @@ CFLAGS += -g -funsigned-char -O2
|
||||||
CFLAGS += -D_FILE_OFFSET_BITS=64
|
CFLAGS += -D_FILE_OFFSET_BITS=64
|
||||||
CFLAGS += -I${BUILDDIR} -I${ROOTDIR}/src -I${ROOTDIR}
|
CFLAGS += -I${BUILDDIR} -I${ROOTDIR}/src -I${ROOTDIR}
|
||||||
LDFLAGS += -ldl -lpthread -lm
|
LDFLAGS += -ldl -lpthread -lm
|
||||||
|
ifeq ($(LIBICONV),yes)
|
||||||
|
LDFLAGS += -liconv
|
||||||
|
endif
|
||||||
ifneq ($(PLATFORM), darwin)
|
ifneq ($(PLATFORM), darwin)
|
||||||
LDFLAGS += -lrt
|
LDFLAGS += -lrt
|
||||||
else
|
|
||||||
LDFLAGS += -liconv
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(COMPILER), clang)
|
ifeq ($(COMPILER), clang)
|
||||||
|
|
10
configure
vendored
10
configure
vendored
|
@ -134,6 +134,16 @@ int test(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
'
|
'
|
||||||
|
|
||||||
|
check_cc_snippet libiconv '
|
||||||
|
#include <iconv.h>
|
||||||
|
int test(void)
|
||||||
|
{
|
||||||
|
iconv_t ic = iconv_open("ASCII", "ASCII");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
' -liconv
|
||||||
|
|
||||||
#
|
#
|
||||||
# Python
|
# Python
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Reference in a new issue