diff --git a/bootstrap b/bootstrap index 56f507b..f3109fd 100755 --- a/bootstrap +++ b/bootstrap @@ -29,8 +29,8 @@ fi # Check for needed features auxdir="`sed -ne 's/^[ \t]*A._CONFIG_AUX_DIR *([[ ]*\([^] )]*\).*/\1/p' $conffile`" pkgconfig="`grep '^[ \t]*PKG_PROG_PKG_CONFIG' $conffile >/dev/null 2>&1 && echo yes || echo no`" -libtool="`grep '^[ \t]*A._PROG_LIBTOOL' $conffile >/dev/null 2>&1 && echo yes || echo no`" -header="`grep '^[ \t]*A._CONFIG_HEADER' $conffile >/dev/null 2>&1 && echo yes || echo no`" +libtool="`grep '^[ \t]*LT_INIT' $conffile >/dev/null 2>&1 && echo yes || echo no`" +header="`grep '^[ \t]*A._CONFIG_HEADERS' $conffile >/dev/null 2>&1 && echo yes || echo no`" makefile="`[ -f Makefile.am ] && echo yes || echo no`" aclocalflags="`sed -ne 's/^[ \t]*ACLOCAL_AMFLAGS[ \t]*=//p' Makefile.am 2>/dev/null || :`" diff --git a/build/win32/config.h b/build/win32/config.h index f909547..b3454d0 100644 --- a/build/win32/config.h +++ b/build/win32/config.h @@ -75,7 +75,6 @@ #define PACKAGE_URL "http://caca.zoy.org/wiki/libcaca" #define PACKAGE_VERSION "0.99.beta20" /* #undef PROF */ -/* #undef RETSIGTYPE */ /* #undef SCREENUPDATE_IN_PC_H */ #define STDC_HEADERS 1 /* #undef USE_COCOA */ diff --git a/caca/driver/ncurses.c b/caca/driver/ncurses.c index f0b4e3e..326ae7a 100644 --- a/caca/driver/ncurses.c +++ b/caca/driver/ncurses.c @@ -188,7 +188,7 @@ */ #if defined HAVE_SIGNAL -static RETSIGTYPE sigwinch_handler(int); +static void sigwinch_handler(int); static caca_display_t *sigwinch_d; /* FIXME: we ought to get rid of this */ #endif #if defined HAVE_GETENV && defined HAVE_PUTENV @@ -594,7 +594,7 @@ static void ncurses_set_cursor(caca_display_t *dp, int flags) */ #if defined HAVE_SIGNAL -static RETSIGTYPE sigwinch_handler(int sig) +static void sigwinch_handler(int sig) { sigwinch_d->resize.resized = 1; diff --git a/caca/driver/slang.c b/caca/driver/slang.c index 6cf5fa1..ccd4474 100644 --- a/caca/driver/slang.c +++ b/caca/driver/slang.c @@ -102,7 +102,7 @@ static void slang_init_palette(void); static void slang_write_utf32(uint32_t); #if defined(HAVE_SIGNAL) -static RETSIGTYPE sigwinch_handler(int); +static void sigwinch_handler(int); static caca_display_t *sigwinch_d; /* FIXME: we ought to get rid of this */ #endif #if defined(HAVE_GETENV) && defined(HAVE_PUTENV) @@ -536,7 +536,7 @@ static void slang_write_utf32(uint32_t ch) } #if defined(HAVE_SIGNAL) -static RETSIGTYPE sigwinch_handler(int sig) +static void sigwinch_handler(int sig) { sigwinch_d->resize.resized = 1; diff --git a/configure.ac b/configure.ac index 905b3a0..458e949 100644 --- a/configure.ac +++ b/configure.ac @@ -1,13 +1,13 @@ -AC_INIT(libcaca, 0.99.beta20) -AC_PREREQ(2.50) +AC_INIT([libcaca],[0.99.beta20]) +AC_PREREQ([2.71]) AC_CONFIG_AUX_DIR(.auto) -AC_CANONICAL_SYSTEM +AC_CANONICAL_TARGET AM_INIT_AUTOMAKE([no-define tar-ustar silent-rules subdir-objects]) dnl AM_MAINTAINER_MODE AM_DEFAULT_VERBOSITY=0 -AM_CONFIG_HEADER(config.h) +AC_CONFIG_HEADERS([config.h]) LT_MAJOR="0" LT_MINOR="99" @@ -28,13 +28,11 @@ AC_SUBST(OBJC) AC_SUBST(OBJCFLAGS) AM_PROG_AS -AC_LIBTOOL_WIN32_DLL -AM_PROG_LIBTOOL -AC_LIBTOOL_CXX +LT_INIT([win32-dll]) +LT_LANG([C++]) AC_C_CONST AC_C_INLINE -AC_TYPE_SIGNAL dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right dnl now otherwise it might be set in an obscure if statement. Same thing for @@ -139,19 +137,28 @@ fi AC_SUBST(GETOPT_LIBS) AC_MSG_CHECKING(for Sleep) -AC_TRY_COMPILE([#include ],[Sleep(42);], +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[Sleep(42);]])], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_SLEEP, 1, [Define to 1 if you have the ‘Sleep’ function.])], [AC_MSG_RESULT(no)]) AC_MSG_CHECKING(for fsin/fcos) -AC_TRY_COMPILE([],[double x; asm volatile("fsin; fcos":"=t"(x):);], +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[]], + [[double x; asm volatile("fsin; fcos":"=t"(x):);]])], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_FSIN_FCOS, 1, [Define to 1 if you have the ‘fsin’ and ‘fcos’ instructions.])], [AC_MSG_RESULT(no)]) AC_MSG_CHECKING(for fldln2/fxch/fyl2x) -AC_TRY_COMPILE([],[double x; asm volatile("fldln2; fldln2; fxch; fyl2x":"=t"(x):);], +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[]], + [[double x; asm volatile("fldln2; fldln2; fxch; fyl2x":"=t"(x):);]])], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_FLDLN2, 1, [Define to 1 if you have the ‘fldln2’ and other floating point instructions.])], [AC_MSG_RESULT(no)]) @@ -404,11 +411,8 @@ ac_cv_my_have_cxx="no" if test "${enable_cxx}" != "no"; then AC_MSG_CHECKING([working ]) AC_LANG_PUSH(C++) - AC_TRY_COMPILE( - [#include ], - [], - [ac_cv_my_have_cxx="yes" - CACA_BINDINGS="${CACA_BINDINGS} C++"]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])],[ac_cv_my_have_cxx="yes" + CACA_BINDINGS="${CACA_BINDINGS} C++"],[]) AC_LANG_POP(C++) AC_MSG_RESULT([$ac_cv_my_have_cxx]) fi diff --git a/src/cacaserver.c b/src/cacaserver.c index 825c3d4..d875c05 100644 --- a/src/cacaserver.c +++ b/src/cacaserver.c @@ -115,7 +115,7 @@ struct server int client_count; struct client *clients; - RETSIGTYPE (*sigpipe_handler)(int); + void (*sigpipe_handler)(int); }; static void manage_connections(struct server *server);