Change 30274 by [EMAIL PROTECTED] on 2007/02/13 23:49:45

        Integrate:
        [ 27001]
        Add -DPTR_IS_LONG when building with -Duse64bitint on Solaris/i386.  
        Otherwise, the build fails in POSIX.
        
        [ 29339]
        Silence some warnings during Configure
        
        [ 29341]
        Upgrade warning should only be issued if upgrade happens
        
        [ 30155]
        Subject: [PATCH hints/linux.sh] libdb may require pthread
        From: Jonathan Stowe <[email protected]>
        Date: Wed, 07 Feb 2007 11:56:17 +0000
        Message-Id: <[EMAIL PROTECTED]>

Affected files ...

... //depot/maint-5.8/perl/hints/hpux.sh#12 integrate
... //depot/maint-5.8/perl/hints/linux.sh#15 integrate
... //depot/maint-5.8/perl/hints/solaris_2.sh#19 integrate

Differences ...

==== //depot/maint-5.8/perl/hints/hpux.sh#12 (text) ====
Index: perl/hints/hpux.sh
--- perl/hints/hpux.sh#11~30046~        2007-01-27 15:25:32.000000000 -0800
+++ perl/hints/hpux.sh  2007-02-13 15:49:45.000000000 -0800
@@ -188,14 +188,17 @@
     gcc_64native=no
 case "$ccisgcc" in
     $define|true|[Yy])
-       echo 'int main(){long l;printf("%d\\n",sizeof(l));}'>try.c
+       echo '#include <stdio.h>\nint main(){long 
l;printf("%d\\n",sizeof(l));}'>try.c
        $cc -o try $ccflags $ldflags try.c
        if [ "`try`" = "8" ]; then
-           cat <<EOM >&4
+           case "$use64bitall" in
+               $define|true|[Yy]) ;;
+               *)  cat <<EOM >&4
 
 *** This version of gcc uses 64 bit longs. -Duse64bitall is
 *** implicitly set to enable continuation
 EOM
+               esac
            use64bitall=$define
            gcc_64native=yes
            fi
@@ -336,6 +339,7 @@
 
 ## Optimization limits
 cat >try.c <<EOF
+#include <stdio.h>
 #include <sys/resource.h>
 
 int main ()

==== //depot/maint-5.8/perl/hints/linux.sh#15 (text) ====
Index: perl/hints/linux.sh
--- perl/hints/linux.sh#14~30046~       2007-01-27 15:25:32.000000000 -0800
+++ perl/hints/linux.sh 2007-02-13 15:49:45.000000000 -0800
@@ -311,9 +311,12 @@
 case "$usethreads" in
 $define|true|[yY]*)
         ccflags="-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS $ccflags"
-        set `echo X "$libswanted "| sed -e 's/ c / pthread c /'`
-        shift
-        libswanted="$*"
+        if echo $libswanted | grep -v pthread >/dev/null
+        then
+            set `echo X "$libswanted "| sed -e 's/ c / pthread c /'`
+            shift
+            libswanted="$*"
+        fi
 
        # Somehow at least in Debian 2.2 these manage to escape
        # the #define forest of <features.h> and <time.h> so that
@@ -372,3 +375,37 @@
   d_dlerror='define'
   ;;
 esac
+
+# Under some circumstances libdb can get built in such a way as to
+# need pthread explicitly linked.
+
+libdb_needs_pthread="N"
+
+if echo " $libswanted " | grep -v " pthread " >/dev/null
+then
+   if echo " $libswanted " | grep " db " >/dev/null
+   then
+     for DBDIR in $glibpth
+     do
+       DBLIB="$DBDIR/libdb.so"
+       if [ -f $DBLIB ]
+       then
+         if nm -u $DBLIB | grep pthread >/dev/null
+         then
+           if ldd $DBLIB | grep pthread >/dev/null
+           then
+             libdb_needs_pthread="N"
+           else
+             libdb_needs_pthread="Y"
+           fi
+         fi
+       fi
+     done
+   fi
+fi
+
+case "$libdb_needs_pthread" in
+  "Y")
+    libswanted="$libswanted pthread"
+    ;;
+esac

==== //depot/maint-5.8/perl/hints/solaris_2.sh#19 (text) ====
Index: perl/hints/solaris_2.sh
--- perl/hints/solaris_2.sh#18~30046~   2007-01-27 15:25:32.000000000 -0800
+++ perl/hints/solaris_2.sh     2007-02-13 15:49:45.000000000 -0800
@@ -456,6 +456,14 @@
        ;;
 esac
 
+if test `uname -p` = i386; then
+    case "$use64bitint" in
+    "$define"|true|[yY]*)
+            ccflags="$ccflags -DPTR_IS_LONG"
+            ;;
+    esac
+fi
+
 if test `uname -p` = sparc -o `uname -p` = i386; then
     cat > UU/use64bitint.cbu <<'EOCBU'
 # This script UU/use64bitint.cbu will get 'called-back' by Configure
End of Patch.

Reply via email to