From 4d9ff8d6262dc9761b69f4938244b202d23936d3 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Sun, 6 Jun 2010 02:40:29 +0000 Subject: [PATCH] * Set ICONV_CONST to 1 if iconv is const or not, aparrantly this differs between versions (annoying!) * Remove -fpermissive, this was required long ago but now there are only a couple of trivial fixes to make. Originally committed to SVN as r4446. --- aegisub/configure.in | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/aegisub/configure.in b/aegisub/configure.in index 6a36eb97f..752ac193d 100644 --- a/aegisub/configure.in +++ b/aegisub/configure.in @@ -292,7 +292,6 @@ if test "$enable_compiler_flags" != "no"; then AC_CXX_FLAG([-Wextra],[AC_CXX_FLAG([-W])]) AC_CXX_FLAG([-Wno-unused-parameter]) AC_CXX_FLAG([-Wno-long-long]) - AC_CXX_FLAG([-fpermissive]) AC_CXX_FLAG([-fno-strict-aliasing]) AC_CXX_FLAG([-pipe]) @@ -476,6 +475,25 @@ int main(void) { AC_SUBST(ICONV_LDFLAGS) AC_SUBST(ICONV_CFLAGS) +if test "$agi_cv_with_iconv" = "yes"; then + + AC_AGI_COMPILE([iconv (const)], [iconv_const], [$ICONV_CFLAGS], [$ICONV_LDFLAGS],[ +#include +int main(void) { + iconv_t cd = iconv_open("UTF-16", "UTF-8"); + const char *in = "in"; + char *out = new char(); + size_t res, inbytesleft, outbytesleft; + res = iconv(cd, &in, &inbytesleft, &out, &outbytesleft); + return 0; +} ]) + + if test "$agi_cv_with_iconv_const" = "yes"; then + AC_DEFINE(ICONV_CONST, 1, [Enable if your version if iconv is const (annoying!)]) + fi +fi + + ############### # Audio Players