OSDN Git Service

2005-05-10 Dave Brolley <brolley@redhat.com>
authorbrolley <brolley>
Tue, 10 May 2005 15:46:16 +0000 (15:46 +0000)
committerbrolley <brolley>
Tue, 10 May 2005 15:46:16 +0000 (15:46 +0000)
        * configure.in: Set 'comp_defs' with extra defines needed by Solaris.
        * configure: Regenerated.
        * Makefile.am (CXXFLAGS): Set it to @comp_defs@.
        * Makefile.in: Regenerated.

2005-05-10  Dave Brolley  <brolley@redhat.com>

        * cgen-cpu.h ({GET,SET}[I]+MEM*): No longer const.
        * configure.in: Check for pthread library.
        * configure: Regenerated.

sid/component/cgen-cpu/ChangeLog
sid/component/cgen-cpu/Makefile.am
sid/component/cgen-cpu/Makefile.in
sid/component/cgen-cpu/cgen-cpu.h
sid/component/cgen-cpu/configure
sid/component/cgen-cpu/configure.in

index d3b8a52..8ce3171 100644 (file)
@@ -1,3 +1,16 @@
+2005-05-10  Dave Brolley  <brolley@redhat.com>
+
+       * configure.in: Set 'comp_defs' with extra defines needed by Solaris.
+       * configure: Regenerated.
+       * Makefile.am (CXXFLAGS): Set it to @comp_defs@.
+       * Makefile.in: Regenerated.
+
+2005-05-10  Dave Brolley  <brolley@redhat.com>
+
+       * cgen-cpu.h ({GET,SET}[I]+MEM*): No longer const.
+       * configure.in: Check for pthread library.
+       * configure: Regenerated.
+
 2005-05-06  Jim Blandy  <jimb@redhat.com>
 
        * cgen-engine.h (EXTRACT_MSB0_INT, EXTRACT_MSB0_UINT)
index 002042c..59a7112 100644 (file)
@@ -12,7 +12,7 @@ pkglib_LTLIBRARIES = libcgencpu.la
 INCLUDESBFD = -I../../../bfd -I$(srcdir)/../../../include
 INCLUDES = -I. -I.. @cpu_incl@ -I../../include -I$(srcdir)/../../include $(INCLUDESBFD)
 
-CXXFLAGS=
+CXXFLAGS=@cpu_defs@
 TOP_CXXFLAGS=$(CXXFLAGS)
 AM_CXXFLAGS=$(TOP_CXXFLAGS)
 AM_MAKEFLAGS= "TOP_CXXFLAGS=$(TOP_CXXFLAGS)"
index 744b9a3..8d3aab4 100644 (file)
@@ -1,6 +1,6 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
 
-# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -102,7 +102,7 @@ pkglib_LTLIBRARIES = libcgencpu.la
 INCLUDESBFD = -I../../../bfd -I$(srcdir)/../../../include
 INCLUDES = -I. -I.. @cpu_incl@ -I../../include -I$(srcdir)/../../include $(INCLUDESBFD)
 
-CXXFLAGS = 
+CXXFLAGS = @cpu_defs@
 TOP_CXXFLAGS = $(CXXFLAGS)
 AM_CXXFLAGS = $(TOP_CXXFLAGS)
 AM_MAKEFLAGS = "TOP_CXXFLAGS=$(TOP_CXXFLAGS)"
@@ -279,7 +279,7 @@ libcgencpu.la: $(libcgencpu_la_OBJECTS) $(libcgencpu_la_DEPENDENCIES)
 all-recursive install-data-recursive install-exec-recursive \
 installdirs-recursive install-recursive uninstall-recursive  \
 check-recursive installcheck-recursive info-recursive dvi-recursive:
-       @set fnord $$MAKEFLAGS; amf=$$2; \
+       @set fnord $(MAKEFLAGS); amf=$$2; \
        dot_seen=no; \
        target=`echo $@ | sed s/-recursive//`; \
        list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -299,11 +299,11 @@ check-recursive installcheck-recursive info-recursive dvi-recursive:
 
 mostlyclean-recursive clean-recursive distclean-recursive \
 maintainer-clean-recursive:
-       @set fnord $$MAKEFLAGS; amf=$$2; \
+       @set fnord $(MAKEFLAGS); amf=$$2; \
        dot_seen=no; \
        rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
          rev="$$subdir $$rev"; \
-         test "$$subdir" != "." || dot_seen=yes; \
+         test "$$subdir" = "." && dot_seen=yes; \
        done; \
        test "$$dot_seen" = "no" && rev=". $$rev"; \
        target=`echo $@ | sed s/-recursive//`; \
index 99d1910..e5986bb 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "bfd.h"
 #include "dis-asm.h"
+#include "opcode/cgen-bitset.h"
 
 // ansidecl.h interferes with this perfectly ordinary word
 #undef AND
@@ -68,7 +69,7 @@ public:
   // Disassembly tracing support
   void disassemble (PCADDR pc, disassembler_ftype printfn,
                    enum bfd_flavour flavour, enum bfd_architecture arch,
-                   enum bfd_endian endian, const char *name, unsigned long isa_mask = 0, int machine = 0);
+                   enum bfd_endian endian, const char *name, CGEN_BITSET *isas = NULL, int machine = 0);
   struct disassemble_info info;
 protected:
   static int cgen_read_memory (bfd_vma memaddr, bfd_byte *myaddr,
@@ -88,105 +89,105 @@ public:
 public:
   // rtl memory access methods
   inline QI
-  GETMEMQI(PCADDR pc, ADDR addr) const
+  GETMEMQI(PCADDR pc, ADDR addr)
     {
       return this->read_data_memory_1 (pc, addr);
     }
   inline UQI
-  GETMEMUQI(PCADDR pc, ADDR addr) const
+  GETMEMUQI(PCADDR pc, ADDR addr)
     {
       return this->read_data_memory_1 (pc, addr);
     }
   inline void
-  SETMEMBI(PCADDR pc, ADDR addr, BI value) const
+  SETMEMBI(PCADDR pc, ADDR addr, BI value)
     {
       return this->write_insn_memory_1 (pc, addr, value);
     }
   inline void
-  SETMEMQI(PCADDR pc, ADDR addr, QI value) const
+  SETMEMQI(PCADDR pc, ADDR addr, QI value)
     {
       return this->write_data_memory_1 (pc, addr, value);
     }
   inline void
-  SETMEMUQI(PCADDR pc, ADDR addr, UQI value) const
+  SETMEMUQI(PCADDR pc, ADDR addr, UQI value)
     {
       return this->write_data_memory_1 (pc, addr, value);
     }
   inline HI
-  GETMEMHI(PCADDR pc, ADDR addr) const
+  GETMEMHI(PCADDR pc, ADDR addr)
     {
       return this->read_data_memory_2 (pc, addr);
     }
   inline UHI
-  GETMEMUHI(PCADDR pc, ADDR addr) const
+  GETMEMUHI(PCADDR pc, ADDR addr)
     {
       return this->read_data_memory_2 (pc, addr);
     }
   inline void
-  SETMEMHI(PCADDR pc, ADDR addr, HI value) const
+  SETMEMHI(PCADDR pc, ADDR addr, HI value)
     {
       return this->write_data_memory_2 (pc, addr, value);
     }
   inline void
-  SETMEMUHI(PCADDR pc, ADDR addr, UHI value) const
+  SETMEMUHI(PCADDR pc, ADDR addr, UHI value)
     {
       return this->write_data_memory_2 (pc, addr, value);
     }
   inline SI
-  GETMEMSI(PCADDR pc, ADDR addr) const
+  GETMEMSI(PCADDR pc, ADDR addr)
     {
       return this->read_data_memory_4 (pc, addr);
     }
   inline void
-  SETMEMSI(PCADDR pc, ADDR addr, SI value) const
+  SETMEMSI(PCADDR pc, ADDR addr, SI value)
     {
       return this->write_data_memory_4 (pc, addr, value);
     }
   inline USI
-  GETMEMUSI(PCADDR pc, ADDR addr) const
+  GETMEMUSI(PCADDR pc, ADDR addr)
     {
       return this->read_data_memory_4 (pc, addr);
     }
   inline void
-  SETMEMUSI(PCADDR pc, ADDR addr, USI value) const
+  SETMEMUSI(PCADDR pc, ADDR addr, USI value)
     {
       return this->write_data_memory_4 (pc, addr, value);
     }
   inline DI
-  GETMEMDI(PCADDR pc, ADDR addr) const
+  GETMEMDI(PCADDR pc, ADDR addr)
     {
       return this->read_data_memory_8 (pc, addr);
     }
   inline void
-  SETMEMDI(PCADDR pc, ADDR addr, DI value) const
+  SETMEMDI(PCADDR pc, ADDR addr, DI value)
     {
       return this->write_data_memory_8 (pc, addr, value);
     }
   inline void
-  SETMEMUDI(PCADDR pc, ADDR addr, UDI value) const
+  SETMEMUDI(PCADDR pc, ADDR addr, UDI value)
     {
       return this->write_data_memory_8 (pc, addr, value);
     }
 
   // floats (can you think of a better way to do this?)
   inline SF
-  GETMEMSF(PCADDR pc, IADDR addr) const
+  GETMEMSF(PCADDR pc, IADDR addr)
     {
       return reinterpret_cast<SF>(this->read_insn_memory_4 (pc, addr));
     }
   inline void
-  SETMEMSF(PCADDR pc, ADDR addr, SF value) const
+  SETMEMSF(PCADDR pc, ADDR addr, SF value)
     {
       return this->write_insn_memory_4 (pc, addr, reinterpret_cast<USI>(value));
     }
 
   inline DF
-  GETMEMDF(PCADDR pc, IADDR addr) const
+  GETMEMDF(PCADDR pc, IADDR addr)
     {
       return reinterpret_cast<DF>(this->read_insn_memory_8 (pc, addr));
     }
   inline void
-  SETMEMDF(PCADDR pc, ADDR addr, DF value) const
+  SETMEMDF(PCADDR pc, ADDR addr, DF value)
     {
       return this->write_insn_memory_8 (pc, addr, reinterpret_cast<UDI>(value));
     }
@@ -194,82 +195,82 @@ public:
   // IMEM: instruction memory calls
 
   inline QI
-  GETIMEMQI(PCADDR pc, IADDR addr) const
+  GETIMEMQI(PCADDR pc, IADDR addr)
     {
       return this->read_insn_memory_1 (pc, addr);
     }
   inline void
-  SETIMEMQI(PCADDR pc, ADDR addr, QI value) const
+  SETIMEMQI(PCADDR pc, ADDR addr, QI value)
     {
       return this->write_insn_memory_1 (pc, addr, value);
     }
   inline UQI
-  GETIMEMUQI(PCADDR pc, IADDR addr) const
+  GETIMEMUQI(PCADDR pc, IADDR addr)
     {
       return this->read_insn_memory_1 (pc, addr);
     }
   inline void
-  SETIMEMUQI(PCADDR pc, ADDR addr, UQI value) const
+  SETIMEMUQI(PCADDR pc, ADDR addr, UQI value)
     {
       return this->write_insn_memory_1 (pc, addr, value);
     }
   inline HI
-  GETIMEMHI(PCADDR pc, IADDR addr) const
+  GETIMEMHI(PCADDR pc, IADDR addr)
     {
       return this->read_insn_memory_2 (pc, addr);
     }
   inline void
-  SETIMEMHI(PCADDR pc, ADDR addr, HI value) const
+  SETIMEMHI(PCADDR pc, ADDR addr, HI value)
     {
       return this->write_insn_memory_2 (pc, addr, value);
     }
   inline UHI
-  GETIMEMUHI(PCADDR pc, IADDR addr) const
+  GETIMEMUHI(PCADDR pc, IADDR addr)
     {
       return this->read_insn_memory_2 (pc, addr);
     }
   inline void
-  SETIMEMUHI(PCADDR pc, ADDR addr, UHI value) const
+  SETIMEMUHI(PCADDR pc, ADDR addr, UHI value)
     {
       return this->write_insn_memory_2 (pc, addr, value);
     }
   inline SI
-  GETIMEMSI(PCADDR pc, IADDR addr) const
+  GETIMEMSI(PCADDR pc, IADDR addr)
     {
       return this->read_insn_memory_4 (pc, addr);
     }
   inline void
-  SETIMEMSI(PCADDR pc, ADDR addr, SI value) const
+  SETIMEMSI(PCADDR pc, ADDR addr, SI value)
     {
       return this->write_insn_memory_4 (pc, addr, value);
     }
   inline USI
-  GETIMEMUSI(PCADDR pc, IADDR addr) const
+  GETIMEMUSI(PCADDR pc, IADDR addr)
     {
       return this->read_insn_memory_4 (pc, addr);
     }
   inline void
-  SETIMEMUSI(PCADDR pc, ADDR addr, USI value) const
+  SETIMEMUSI(PCADDR pc, ADDR addr, USI value)
     {
       return this->write_insn_memory_4 (pc, addr, value);
     }
   inline DI
-  GETIMEMDI(PCADDR pc, IADDR addr) const
+  GETIMEMDI(PCADDR pc, IADDR addr)
     {
       return this->read_insn_memory_8 (pc, addr);
     }
   inline void
-  SETIMEMDI(PCADDR pc, ADDR addr, DI value) const
+  SETIMEMDI(PCADDR pc, ADDR addr, DI value)
     {
       return this->write_insn_memory_8 (pc, addr, value);
     }
   inline UDI
-  GETIMEMUDI(PCADDR pc, IADDR addr) const
+  GETIMEMUDI(PCADDR pc, IADDR addr)
     {
       return this->read_insn_memory_8 (pc, addr);
     }
   inline void
-  SETIMEMUDI(PCADDR pc, ADDR addr, UDI value) const
+  SETIMEMUDI(PCADDR pc, ADDR addr, UDI value)
     {
       return this->write_insn_memory_8 (pc, addr, value);
     }
index 07840c7..d447a1e 100755 (executable)
@@ -2198,15 +2198,65 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
+echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
+echo "configure:2203: checking for pthread_create in -lpthread" >&5
+ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lpthread  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2211 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char pthread_create();
+
+int main() {
+pthread_create()
+; return 0; }
+EOF
+if { (eval echo configure:2225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lpthread $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
 for ac_func in getopt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2205: checking for $ac_func" >&5
+echo "configure:2255: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2210 "configure"
+#line 2260 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2232,7 +2282,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2257,8 +2307,19 @@ fi
 done
 
 
+case "$host" in
+  sparc-sun-solaris*)
+    # Note: If _REENTRANT isn't defined, then Solaris
+    # won't define thread-safe library routines.
+    cpu_defs="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
+    ;;
+  *)
+    cpu_defs=
+    ;;
+esac
+
 echo $ac_n "checking whether libintl is required for gettext""... $ac_c" 1>&6
-echo "configure:2262: checking whether libintl is required for gettext" >&5
+echo "configure:2323: checking whether libintl is required for gettext" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -2268,7 +2329,7 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
 cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext <<EOF
-#line 2272 "configure"
+#line 2333 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2279,7 +2340,7 @@ int main() {
 textdomain()
 ; return 0; }
 EOF
-if { (eval echo configure:2283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   INTLLIBS=; echo "$ac_t""no" 1>&6
 else
@@ -2365,7 +2426,7 @@ esac
 
 
 echo $ac_n "checking ARM family support""... $ac_c" 1>&6
-echo "configure:2369: checking ARM family support" >&5
+echo "configure:2430: checking ARM family support" >&5
 
 
 
@@ -2379,7 +2440,7 @@ fi
 echo "$ac_t""$sidtarget_arm" 1>&6
 
 echo $ac_n "checking X86 family support""... $ac_c" 1>&6
-echo "configure:2383: checking X86 family support" >&5
+echo "configure:2444: checking X86 family support" >&5
 
 
 
@@ -2393,7 +2454,7 @@ fi
 echo "$ac_t""$sidtarget_x86" 1>&6
 
 echo $ac_n "checking MIPS family support""... $ac_c" 1>&6
-echo "configure:2397: checking MIPS family support" >&5
+echo "configure:2458: checking MIPS family support" >&5
 
 
 
@@ -2407,7 +2468,7 @@ fi
 echo "$ac_t""$sidtarget_mips" 1>&6
 
 echo $ac_n "checking M32R family support""... $ac_c" 1>&6
-echo "configure:2411: checking M32R family support" >&5
+echo "configure:2472: checking M32R family support" >&5
 
 
 
@@ -2421,7 +2482,7 @@ fi
 echo "$ac_t""$sidtarget_m32r" 1>&6
 
 echo $ac_n "checking M68K family support""... $ac_c" 1>&6
-echo "configure:2425: checking M68K family support" >&5
+echo "configure:2486: checking M68K family support" >&5
 
 
 
@@ -2435,7 +2496,7 @@ fi
 echo "$ac_t""$sidtarget_m68k" 1>&6
 
 echo $ac_n "checking PPC family support""... $ac_c" 1>&6
-echo "configure:2439: checking PPC family support" >&5
+echo "configure:2500: checking PPC family support" >&5
 
 
 
@@ -2449,7 +2510,7 @@ fi
 echo "$ac_t""$sidtarget_ppc" 1>&6
 
 echo $ac_n "checking Sanyo Xstormy16 family support""... $ac_c" 1>&6
-echo "configure:2453: checking Sanyo Xstormy16 family support" >&5
+echo "configure:2514: checking Sanyo Xstormy16 family support" >&5
 
 
 
@@ -2495,7 +2556,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2499: checking for $ac_word" >&5
+echo "configure:2560: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_GUILE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2531,7 +2592,7 @@ test -n "$GUILE" || GUILE="false"
 # Extract the first word of "links", so it can be a program name with args.
 set dummy links; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2535: checking for $ac_word" >&5
+echo "configure:2596: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LINKS'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2571,7 +2632,7 @@ fi
 # Extract the first word of "xsltproc", so it can be a program name with args.
 set dummy xsltproc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2575: checking for $ac_word" >&5
+echo "configure:2636: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_XSLTPROC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2611,7 +2672,7 @@ fi
 # Extract the first word of "sabcmd", so it can be a program name with args.
 set dummy sabcmd; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2615: checking for $ac_word" >&5
+echo "configure:2676: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_SABLOTRON'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2654,12 +2715,12 @@ for ac_func in vasprintf asprintf basename getopt
 do
   ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
-echo "configure:2658: checking whether $ac_func is declared" >&5
+echo "configure:2719: checking whether $ac_func is declared" >&5
 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2663 "configure"
+#line 2724 "configure"
 #include "confdefs.h"
 #undef $ac_tr_decl
 #define $ac_tr_decl 1
@@ -2674,7 +2735,7 @@ char *(*pfn) = (char *(*)) $ac_func ;
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:2678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "gcc_cv_have_decl_$ac_func=yes"
 else
index b2e4884..5b2cddd 100644 (file)
@@ -14,8 +14,21 @@ AC_EXEEXT
 AC_LANG_CPLUSPLUS
 
 AC_CHECK_LIB(m, main)
+AC_CHECK_LIB(pthread, pthread_create)
 AC_CHECK_FUNCS(getopt)
 
+dnl Need extra defines for Solaris threads
+case "$host" in
+  sparc-sun-solaris*)
+    # Note: If _REENTRANT isn't defined, then Solaris
+    # won't define thread-safe library routines.
+    cpu_defs="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS"
+    ;;
+  *)
+    cpu_defs=
+    ;;
+esac
+
 dnl Check if we need libintl.
 AC_MSG_CHECKING([whether libintl is required for gettext])
 AC_LANG_SAVE