diff --git a/src/aclocal.m4 b/src/aclocal.m4
index b7291c9..776d6c6 100644
--- a/src/aclocal.m4
+++ b/src/aclocal.m4
@@ -27,7 +27,7 @@ else
   if test "$GCC" = yes; then
     ac_cv_c_long_long=yes
   else
-    AC_TRY_COMPILE(,[long long int i;],
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[long long int i;]])],
     ac_cv_c_long_long=yes,
     ac_cv_c_long_long=no)
   fi
@@ -446,23 +446,20 @@ AC_SUBST(ECL_FILE_CNT)
 if test -z "${ECL_FILE_CNT}"; then
 ECL_FILE_CNT=0
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[
-int main() {
   FILE *f = fopen("conftestval","w");
   if ((f)->_IO_read_end - (f)->_IO_read_ptr)
     return 1;
-}]])],[ECL_FILE_CNT=1],[])
+]])],[ECL_FILE_CNT=1],[])
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[
-int main() {
   FILE *f = fopen("conftestval","w");
   if ((f)->_r)
     return 1;
-}]])],[ECL_FILE_CNT=2],[])
+]])],[ECL_FILE_CNT=2],[])
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[
-int main() {
   FILE *f = fopen("conftestval","w");
   if ((f)->_cnt)
     return 1;
-}]])],[ECL_FILE_CNT=3],[])
+]])],[ECL_FILE_CNT=3],[])
 fi
 ])
 
@@ -761,7 +758,7 @@ dnl Provides a test for the existance of the __thread declaration and
 dnl defines WITH___THREAD if it is found
 AC_DEFUN([ECL___THREAD],[
 AC_CACHE_CHECK(for __thread local data, ac_cv_ecl___thread,
-AC_TRY_COMPILE(,[static __thread void *data;],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[[static __thread void *data;]])],
    ac_cv_ecl___thread=yes,
    ac_cv_ecl___thread=no))
 dnl We deactivate this test because it seems to slow down ECL A LOT!!!
@@ -810,19 +807,19 @@ dnl
 AC_DEFUN([ECL_SSE],[
 if test "x$with_sse" = xyes; then
  AC_MSG_CHECKING([for SSE intrinsics])
- AC_TRY_LINK([
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <xmmintrin.h>
 #include <emmintrin.h>
-],[__m128 value;
-_mm_getcsr();],[sse_included=yes],[sse_included=no])
+]],[[__m128 value;
+_mm_getcsr();]])],[sse_included=yes],[sse_included=no])
  if test "$sse_included" = "no"; then
   OLD_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -msse2"
-  AC_TRY_LINK([
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include <xmmintrin.h>
 #include <emmintrin.h>
-],[__m128 value;
-_mm_getcsr();],[sse_included=yes],[sse_included=no])
+]],[[__m128 value;
+_mm_getcsr();]])],[sse_included=yes],[sse_included=no])
   if test "$sse_included" = "no"; then
    CFLAGS="$OLD_CFLAGS"
    with_sse=no
diff --git a/src/configure.in b/src/configure.in
index e758090..88a2b9f 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -431,7 +431,7 @@ dnl Checks for libraries
 
 LIBS="${LIBS} -lm"
 AC_CHECK_LIB(sun, getpwnam)         # on IRIX adds -lsun
-AC_ISC_POSIX
+AC_SEARCH_LIBS([strerror],[cposix])
 
 dnl ----------------------------------------------------------------------
 dnl Profiling & debug flags
@@ -479,14 +479,14 @@ if test "${enable_threads}" = "yes" ; then
   if test -z "${THREAD_OBJ}"; then
     AC_MSG_ERROR([Threads aren't supported on this system.])
   else
+    LIBS="${THREAD_LIBS} ${LIBS}"
+    CFLAGS="${CFLAGS} ${THREAD_CFLAGS}"
     ECL_POSIX_SEMAPHORES
     ECL_POSIX_RWLOCK
     boehm_configure_flags="${boehm_configure_flags} ${THREAD_GC_FLAGS}"
     for k in $THREAD_OBJ; do EXTRA_OBJS="$EXTRA_OBJS ${k}.${OBJEXT}"; done
     AC_MSG_CHECKING([for thread object files])
     AC_MSG_RESULT([${THREAD_OBJ}])
-    LIBS="${THREAD_LIBS} ${LIBS}"
-    CFLAGS="${CFLAGS} ${THREAD_CFLAGS}"
     AC_DEFINE( [ECL_THREADS], [1], [Userland threads?])
     if test "${with___thread}" = "auto"; then
       with___thread=${ac_cv_ecl___thread}
@@ -532,7 +532,6 @@ else
     AC_CHECK_LIB( [gc], [GC_malloc],
       [FASL_LIBS="${FASL_LIBS} -lgc"],
       [AC_MSG_ERROR([System Boehm GC library requested but not found.])])
-    AC_MSG_CHECKING( [if we need to copy GC private headers] )
     AC_DEFINE(GBC_BOEHM, [1], [Use Boehm's garbage collector])
   else
     enable_boehm="included"
