* 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.
This commit is contained in:
Amar Takhar 2010-06-06 02:40:29 +00:00
parent 2aeb0bdffb
commit 4d9ff8d626
1 changed files with 19 additions and 1 deletions

View File

@ -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 <iconv.h>
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