Commit 71583c89 authored by unknown's avatar unknown
Browse files

portability fix in BUILD/* for solaris

parent 4321eb12
Loading
Loading
Loading
Loading
+179 −176
Original line number Diff line number Diff line
@@ -3,8 +3,8 @@
# Check cpu of current machine and find the
# best compiler optimization flags for gcc
#
#

check_cpu () {
  if test -r /proc/cpuinfo ; then
    # on Linux (and others?) we can get detailed CPU information out of /proc
    cpuinfo="cat /proc/cpuinfo"
@@ -114,7 +114,7 @@ esac


  if test -z "$cpu_arg"; then
  echo "BUILD/check-cpu: Oops, could not find out what kind of cpu this machine is using."
    echo "BUILD/check-cpu: Oops, could not find out what kind of cpu this machine is using." >&2
    check_cpu_cflags=""
    return
  fi
@@ -167,16 +167,17 @@ esac
  touch __test.c

  while [ "$cpu_arg" ] ; do
  echo -n testing $cpu_arg "... "
    # FIXME: echo -n isn't portable - see contortions autoconf goes through
    echo -n testing $cpu_arg "... " >&2
          
    # compile check
    check_cpu_cflags=`eval echo $check_cpu_args`
    if $cc -c $check_cpu_cflags __test.c 2>/dev/null; then
	  echo ok
            echo ok >&2
        break;
    fi

  echo failed
    echo failed >&2
    check_cpu_cflags=""

    # if compile failed: check whether it supports a predecessor of this CPU
@@ -202,4 +203,6 @@ while [ "$cpu_arg" ] ; do
  done

  rm __test.*
}

check_cpu