diff --git a/src/aclocal.m4 b/src/aclocal.m4 index b7291c90d..776d6c603 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 ]], [[ -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 ]], [[ -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 ]], [[ -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 #include -],[__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 #include -],[__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 b/src/configure index be5f988f2..2e3c1245a 100755 --- a/src/configure +++ b/src/configure @@ -5662,6 +5662,8 @@ if test "${enable_threads}" = "yes" ; then if test -z "${THREAD_OBJ}"; then as_fn_error $? "Threads aren't supported on this system." "$LINENO" 5 else + LIBS="${THREAD_LIBS} ${LIBS}" + CFLAGS="${CFLAGS} ${THREAD_CFLAGS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking working sem_init()" >&5 $as_echo_n "checking working sem_init()... " >&6; } @@ -5723,8 +5725,6 @@ THREAD_OBJ="$THREAD_OBJ threads/rwlock" $as_echo_n "checking for thread object files... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${THREAD_OBJ}" >&5 $as_echo "${THREAD_OBJ}" >&6; } - LIBS="${THREAD_LIBS} ${LIBS}" - CFLAGS="${CFLAGS} ${THREAD_CFLAGS}" $as_echo "#define ECL_THREADS 1" >>confdefs.h @@ -5897,8 +5897,6 @@ else as_fn_error $? "System Boehm GC library requested but not found." "$LINENO" 5 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to copy GC private headers " >&5 -$as_echo_n "checking if we need to copy GC private headers ... " >&6; } $as_echo "#define GBC_BOEHM 1" >>confdefs.h @@ -7508,11 +7506,10 @@ int main () { -int main() { FILE *f = fopen("conftestval","w"); if ((f)->_IO_read_end - (f)->_IO_read_ptr) return 1; -} + ; return 0; } @@ -7528,11 +7525,10 @@ int main () { -int main() { FILE *f = fopen("conftestval","w"); if ((f)->_r) return 1; -} + ; return 0; } @@ -7548,11 +7544,10 @@ int main () { -int main() { FILE *f = fopen("conftestval","w"); if ((f)->_cnt) return 1; -} + ; return 0; } diff --git a/src/configure.in b/src/configure.in index e75809094..88a2b9f5c 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"