diff options
author | David Leadbeater <dgl@dgl.cx> | 2014-07-06 18:56:17 +0100 |
---|---|---|
committer | David Leadbeater <dgl@dgl.cx> | 2014-07-06 18:56:17 +0100 |
commit | beec29c3054acc262ac2dbef5b29c1e279a6fdb3 (patch) | |
tree | 1041501b35529022daad89e25e1c30b14de93c85 /configure.ac | |
parent | 1bf4753914b1ea71ebdc336f8986dd5040b8a398 (diff) | |
download | irssi-beec29c3054acc262ac2dbef5b29c1e279a6fdb3.zip |
Make configure checks able to build with -Werror
Also fix a few compiler warnings, this combined with pull #82 allows me to build
with CFLAGS="-Werror -Wall".
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 04c50b4b..40171a03 100644 --- a/configure.ac +++ b/configure.ac @@ -221,7 +221,7 @@ AC_CACHE_VAL(irssi_cv_type_socklen_t, [AC_TRY_COMPILE([ #include <sys/types.h> #include <sys/socket.h>], -[socklen_t t;], +[socklen_t t = 0; return((int)t); ], irssi_cv_type_socklen_t=yes, irssi_cv_type_socklen_t=no, )]) @@ -455,8 +455,10 @@ if test "$want_perl" != "no"; then esac dnl * check that perl's ldflags actually work - echo "main(){perl_alloc(); return 0;}" > conftest.c - $CC $CFLAGS conftest.c -o conftest $LDFLAGS $PERL_LDFLAGS 2> perl.error.tmp > /dev/null + echo "#include <EXTERN.h>" > conftest.c + echo "#include <perl.h>" >> conftest.c + echo "int main(){perl_alloc(); return 0;}" >> conftest.c + $CC $CFLAGS $PERL_CFLAGS conftest.c -o conftest $LDFLAGS $PERL_LDFLAGS 2> perl.error.tmp > /dev/null if test ! -s conftest -a "x$ignore_perl_errors" = "x"; then perl_check_error="Error linking with perl libraries: $PERL_LDFLAGS: `cat perl.error.tmp`" AC_MSG_RESULT([error linking with perl libraries, building without Perl]) |