Commit 44717474 authored by Ralf S. Engelschall's avatar Ralf S. Engelschall
Browse files

Ok, final fix for `config' script to detect all flavors of FreeBSD

in a more general way.
parent 9a577e29
Loading
Loading
Loading
Loading
+19 −20
Original line number Diff line number Diff line
@@ -137,23 +137,22 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
	echo "${MACHINE}-whatever-bsdi"; exit 0
	;;

    FreeBSD:3*:*:*)
	echo "${MACHINE}-whatever-freebsd3"; exit 0
	;;

    FreeBSD:*:*:*386*)
        case `sysctl -n hw.model` in
	    Pentium*)
                echo "i586-whatever-freebsd"; exit 0
                ;;
            *)
                echo "i386-whatever-freebsd"; exit 0
                ;;
            esac;
	;;

    FreeBSD:*)
	echo "${MACHINE}-whatever-freebsd"; exit 0
        VERS=`echo ${RELEASE} | sed -e 's/[-(].*//'`
        MACH=`sysctl -n hw.model`
        ARCH='whatever'
        case ${MACH} in
           *386*       ) MACH="i386"     ;;
           *486*       ) MACH="i486"     ;;
           Pentium\ II*) MACH="i686"     ;;
           Pentium*    ) MACH="i586"     ;;
           Alpha*      ) MACH="alpha"    ;;
           *           ) MACH="$MACHINE" ;;
        esac
        case ${MACH} in
           i[0-9]86 ) ARCH="pc" ;;
        esac
        echo "${MACH}-${ARCH}-freebsd${VERS}"; exit 0
        ;;

    NetBSD:*:*:*386*)
@@ -402,9 +401,9 @@ case "$GUESSOS" in
  sun4*-sun-solaris2)	OUT="solaris-sparcv7-$CC" ;;
  *86*-sun-solaris2) OUT="solaris-x86-$CC" ;;
  *-*-sunos4) OUT="sunos-$CC" ;;
  alpha*-*-freebsd3) OUT="FreeBSD-alpha" ;;
  *-freebsd3) OUT="FreeBSD-elf" ;;
  *-freebsd) OUT="FreeBSD" ;;
  alpha*-*-freebsd*) OUT="FreeBSD-alpha" ;;
  *-freebsd[3-9]*) OUT="FreeBSD-elf" ;;
  *-freebsd[1-2]*) OUT="FreeBSD" ;;
  *86*-*-netbsd) OUT="NetBSD-x86" ;;
  sun3*-*-netbsd) OUT="NetBSD-m68" ;;
  *-*-netbsd) OUT="NetBSD-sparc" ;;