summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2012-05-06 14:37:40 +0000
committerXavier Roche <xroche@users.noreply.github.com>2012-05-06 14:37:40 +0000
commitbbaccf7ba1676bd65c957102995396aae02c352a (patch)
tree681552387fd9b789ca0ef4139a5166ba6c3d1cef
parent53ee6f78b2f0d2ac7181372f193e4ce666814611 (diff)
-liconv
-rw-r--r--Makefile.in1
-rw-r--r--config.h.in3
-rwxr-xr-xconfigure90
-rw-r--r--configure.in5
-rw-r--r--html/Makefile.in1
-rw-r--r--html/httrack.man.html2
-rw-r--r--lang/Makefile.in1
-rw-r--r--libtest/Makefile.in1
-rw-r--r--m4/Makefile.in1
-rw-r--r--man/Makefile.in1
-rw-r--r--src/Makefile.in10
-rw-r--r--src/htscharset.c1
-rw-r--r--templates/Makefile.in1
13 files changed, 93 insertions, 25 deletions
diff --git a/Makefile.in b/Makefile.in
index d1d2a7c..5d9d921 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -104,6 +104,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+ICONV_LIBS = @ICONV_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
diff --git a/config.h.in b/config.h.in
index 0ad9344..21d37a1 100644
--- a/config.h.in
+++ b/config.h.in
@@ -54,6 +54,9 @@
/* Check for large files support */
#undef HTS_LFS
+/* Check for libiconv */
+#undef LIBICONV
+
/* Check for libsocket */
#undef LIBSOCKET
diff --git a/configure b/configure
index 3256a08..eaab68f 100755
--- a/configure
+++ b/configure
@@ -743,6 +743,7 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
DL_LIBS
+ICONV_LIBS
SOCKET_LIBS
THREADS_CFLAGS
THREADS_LIBS
@@ -5423,13 +5424,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:5426: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:5427: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:5429: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:5430: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:5432: output\"" >&5)
+ (eval echo "\"\$as_me:5433: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -6634,7 +6635,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 6637 "configure"' > conftest.$ac_ext
+ echo '#line 6638 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -8418,11 +8419,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8421: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8422: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8425: \$? = $ac_status" >&5
+ echo "$as_me:8426: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8757,11 +8758,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8760: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8761: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8764: \$? = $ac_status" >&5
+ echo "$as_me:8765: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8862,11 +8863,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8865: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8866: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8869: \$? = $ac_status" >&5
+ echo "$as_me:8870: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8917,11 +8918,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8920: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8921: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8924: \$? = $ac_status" >&5
+ echo "$as_me:8925: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -11301,7 +11302,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11304 "configure"
+#line 11305 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11397,7 +11398,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11400 "configure"
+#line 11401 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13353,11 +13354,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13356: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13357: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13360: \$? = $ac_status" >&5
+ echo "$as_me:13361: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -13452,11 +13453,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13455: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13456: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13459: \$? = $ac_status" >&5
+ echo "$as_me:13460: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -13504,11 +13505,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13507: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13508: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13511: \$? = $ac_status" >&5
+ echo "$as_me:13512: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -15245,6 +15246,55 @@ fi
+### Check for iconv
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv in -liconv" >&5
+$as_echo_n "checking for iconv in -liconv... " >&6; }
+if test "${ac_cv_lib_iconv_iconv+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-liconv $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char iconv ();
+int
+main ()
+{
+return iconv ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_iconv_iconv=yes
+else
+ ac_cv_lib_iconv_iconv=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_iconv" >&5
+$as_echo "$ac_cv_lib_iconv_iconv" >&6; }
+if test "x$ac_cv_lib_iconv_iconv" = x""yes; then :
+ SOCKET_LIBS="-liconv"
+
+$as_echo "#define LIBICONV 1" >>confdefs.h
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not necessary" >&5
+$as_echo "not necessary" >&6; }
+fi
+
+
+
### Check for dlsym
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
diff --git a/configure.in b/configure.in
index 98a3683..2c95b10 100644
--- a/configure.in
+++ b/configure.in
@@ -147,6 +147,11 @@ AC_CHECK_LIB(socket, socket, [SOCKET_LIBS="-lnsl -lsocket"
AC_DEFINE(LIBSOCKET, 1,[Check for libsocket])], AC_MSG_RESULT([not necessary]))
AC_SUBST(SOCKET_LIBS)
+### Check for iconv
+AC_CHECK_LIB(iconv, iconv, [SOCKET_LIBS="-liconv"
+AC_DEFINE(LIBICONV, 1,[Check for libiconv])], AC_MSG_RESULT([not necessary]))
+AC_SUBST(ICONV_LIBS)
+
### Check for dlsym
AC_CHECK_LIB(dl, dlopen, [DL_LIBS=-ldl
AC_DEFINE(DLLIB, 1,[Check for dl])], AC_MSG_RESULT([not found]))
diff --git a/html/Makefile.in b/html/Makefile.in
index 0eef2bb..7ddb0ce 100644
--- a/html/Makefile.in
+++ b/html/Makefile.in
@@ -110,6 +110,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+ICONV_LIBS = @ICONV_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
diff --git a/html/httrack.man.html b/html/httrack.man.html
index 96bfb7b..fb05900 100644
--- a/html/httrack.man.html
+++ b/html/httrack.man.html
@@ -1,5 +1,5 @@
<!-- Creator : groff version 1.20.1 -->
-<!-- CreationDate: Sun May 6 16:20:35 2012 -->
+<!-- CreationDate: Sun May 6 16:36:39 2012 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
diff --git a/lang/Makefile.in b/lang/Makefile.in
index 87ccb6f..5eb6794 100644
--- a/lang/Makefile.in
+++ b/lang/Makefile.in
@@ -90,6 +90,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+ICONV_LIBS = @ICONV_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
diff --git a/libtest/Makefile.in b/libtest/Makefile.in
index ed55e49..8e5905f 100644
--- a/libtest/Makefile.in
+++ b/libtest/Makefile.in
@@ -154,6 +154,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+ICONV_LIBS = @ICONV_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
diff --git a/m4/Makefile.in b/m4/Makefile.in
index 8c0b114..e97c63c 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -79,6 +79,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+ICONV_LIBS = @ICONV_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
diff --git a/man/Makefile.in b/man/Makefile.in
index cfc45b5..e17bd1c 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -83,6 +83,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+ICONV_LIBS = @ICONV_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
diff --git a/src/Makefile.in b/src/Makefile.in
index 55a0cc9..4cfbec4 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -73,8 +73,8 @@ am_libhttrack_la_OBJECTS = htscore.lo htsparse.lo htsback.lo \
htsinthash.lo htshelp.lo htslib.lo htscoremain.lo htsname.lo \
htsrobots.lo htstools.lo htswizard.lo htsalias.lo htsthread.lo \
htsindex.lo htsbauth.lo htsmd5.lo htszlib.lo htswrap.lo \
- htsmodules.lo md5.lo htsmms.lo ioapi.lo mztools.lo unzip.lo \
- zip.lo error.lo mms.lo
+ htsmodules.lo htscharset.lo md5.lo htsmms.lo ioapi.lo \
+ mztools.lo unzip.lo zip.lo error.lo mms.lo
libhttrack_la_OBJECTS = $(am_libhttrack_la_OBJECTS)
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
@@ -146,6 +146,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+ICONV_LIBS = @ICONV_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -278,7 +279,7 @@ libhttrack_la_SOURCES = htscore.c htsparse.c htsback.c htscache.c \
htsname.c htsrobots.c htstools.c htswizard.c \
htsalias.c htsthread.c htsindex.c htsbauth.c \
htsmd5.c htszlib.c htswrap.c \
- htsmodules.c \
+ htsmodules.c htscharset.c \
md5.c \
htsmms.c \
minizip/ioapi.c minizip/mztools.c minizip/unzip.c minizip/zip.c \
@@ -291,7 +292,7 @@ libhttrack_la_SOURCES = htscore.c htsparse.c htsback.c htscache.c \
htsmodules.h htsname.h htsnet.h \
htsopt.h htsrobots.h htsthread.h \
htstools.h htswizard.h htswrap.h htszlib.h \
- htsstrings.h httrack-library.h \
+ htsstrings.h httrack-library.h htscharset.h \
md5.h \
htsmms.h \
minizip/crypt.h minizip/ioapi.h minizip/mztools.h minizip/unzip.h minizip/zip.h \
@@ -454,6 +455,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htsbauth.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htscache.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htscatchurl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htscharset.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htscore.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htscoremain.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/htsfilters.Plo@am__quote@
diff --git a/src/htscharset.c b/src/htscharset.c
index 8f7ff0d..4deba12 100644
--- a/src/htscharset.c
+++ b/src/htscharset.c
@@ -307,6 +307,7 @@ char *hts_convertStringSystemToUTF8(const char *s, size_t size) {
#else
#include <string.h>
+#include <errno.h>
#include <iconv.h>
char *hts_convertStringToUTF8(const char *s, size_t size, const char *charset) {
diff --git a/templates/Makefile.in b/templates/Makefile.in
index fc84de0..289aaf8 100644
--- a/templates/Makefile.in
+++ b/templates/Makefile.in
@@ -89,6 +89,7 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
+ICONV_LIBS = @ICONV_LIBS@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@