EBCDIC: the non-printable characters are different.
[p5sagit/p5-mst-13.2.git] / hints / openbsd.sh
index 8e7c4e5..823d744 100644 (file)
@@ -30,9 +30,8 @@ d_setruid=$undef
 # it can set the libperl name appropriately.
 # Allow command line overrides.
 #
-ARCH=`arch|sed 's/^OpenBSD.//'`
-case "${ARCH}-${osvers}" in
-alpha-*|mips-*|vax-*|powerpc-2.[0-7]|m88k-*)
+case "`arch -s`-${osvers}" in
+alpha-2.[0-8]|mips-*|vax-*|powerpc-2.[0-7]|m88k-*)
        test -z "$usedl" && usedl=$undef
        ;;
 *)
@@ -71,7 +70,7 @@ d_suidsafe=$define
 
 # cc is gcc so we can do better than -O
 # Allow a command-line override, such as -Doptimize=-g
-case "$ARCH" in
+case `arch -s` in
 m88k)
    optimize='-O0'
    ;;
@@ -88,7 +87,9 @@ $define|true|[yY]*)
        # any openbsd version dependencies with pthreads?
        ccflags="-pthread $ccflags"
        ldflags="-pthread $ldflags"
+       # Add -lpthread.  Also change from -lc to -lc_r
        libswanted="$libswanted pthread"
+       libswanted=`echo " $libswanted "| sed -e 's/ c / c_r /' -e 's/^ //' -e 's/ $//'`
        # This is strange.
        usevfork="$undef"
 esac