Blob Blame History Raw
--- src/Makefile.in.orig	2011-01-16 14:39:56.000000000 -0700
+++ src/Makefile.in	2011-01-17 15:41:39.405796618 -0700
@@ -117,11 +117,8 @@ bin/ecl-config: bin/ecl-config.pre
 	  mv @LIBPREFIX@gc.@LIBEXT@ @LIBPREFIX@eclgc.@LIBEXT@; \
 	fi
 @LIBPREFIX@eclatomic.@LIBEXT@:
-	if (echo $(SUBDIRS) | grep atomic); then \
-	  cd atomic && $(MAKE) && $(MAKE) install && cd .. && \
-	  $(RM) -rf share ecl/atomic_ops_stack.h ecl/atomic_ops_malloc.h *atomic*gpl* && \
-	  mv @LIBPREFIX@atomic_ops.@LIBEXT@ @LIBPREFIX@eclatomic.@LIBEXT@; \
-	fi
+	cp ${libdir}/libatomic_ops.a $@
+	ln -s /usr/include/atomic_ops.h ecl/atomic_ops.h
 @LIBPREFIX@eclgmp.@LIBEXT@:
 	if (echo $(SUBDIRS) | grep gmp); then \
 	  cd gmp && $(MAKE) install && \
--- src/aclocal.m4.orig	2011-01-16 14:39:56.000000000 -0700
+++ src/aclocal.m4	2011-01-17 15:42:35.049796972 -0700
@@ -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
 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
--- src/configure.in.orig	2011-01-16 14:39:59.000000000 -0700
+++ src/configure.in	2011-01-17 15:42:51.240796985 -0700
@@ -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" ; th
   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}
@@ -743,7 +743,6 @@ if test ! ${opcode8} = "no" ; then
 fi
 
 ECL_GCC_BACKTRACE
-ECL_LIBATOMIC_OPS
 ECL_BOEHM_GC
 
 dnl ----------------------------------------------------------------------
--- src/configure.orig	2011-01-16 14:39:59.000000000 -0700
+++ src/configure	2011-01-17 15:42:59.955797014 -0700
@@ -5662,6 +5662,8 @@ if test "${enable_threads}" = "yes" ; th
   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
 
@@ -7508,11 +7508,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 +7527,10 @@ int
 main ()
 {
 
-int main() {
   FILE *f = fopen("conftestval","w");
   if ((f)->_r)
     return 1;
-}
+
   ;
   return 0;
 }
@@ -7548,11 +7546,10 @@ int
 main ()
 {
 
-int main() {
   FILE *f = fopen("conftestval","w");
   if ((f)->_cnt)
     return 1;
-}
+
   ;
   return 0;
 }
@@ -9056,22 +9053,6 @@ fi
 
 
 
-if test "x${enable_threads}" != "xno"; then
-  test -d atomic || mkdir atomic
-  (destdir=`${PWDCMD}`; cd atomic && CC="${CC} ${PICFLAG}" \
-   $srcdir/gc/libatomic*/configure --disable-shared --prefix=${destdir} \
-	--infodir=${destdir}/doc --includedir=${destdir}/ecl --with-pic \
-        --libdir=${destdir} --build=${build_alias} --host=${host_alias} \
-        CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS" CC="${CC} \
-        ${PICFLAG}")
-  SUBDIRS="${SUBDIRS} atomic"
-  CORE_LIBS="-leclatomic ${CORE_LIBS}"
-  if test "${enable_shared}" = "no"; then
-    LIBRARIES="${LIBRARIES} ${LIBPREFIX}eclatomic.${LIBEXT}"
-  fi
-fi
-
-
 
 case "${enable_boehm}" in
   included)