blob: 6726f0db9d417c8de88ec28477bb5124a64f6ba9 [file] [log] [blame]
# Copyright (C) Igor Sysoev
# Copyright (C) NGINX, Inc.
NXT_SYSTEM=`uname -s 2>/dev/null`
case "$NXT_SYSTEM" in
Linux)
NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
# Linux uname -p can return "unknown".
NXT_SYSTEM_PLATFORM=`uname -m 2>/dev/null`
nxt_echo=echo
CC=${CC:-cc}
# NAN and INFINITY require _GNU_SOURCE on old Linux.
NXT_CFLAGS="$NXT_CFLAGS -D_GNU_SOURCE"
;;
FreeBSD | NetBSD | OpenBSD)
NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
NXT_SYSTEM_PLATFORM=`uname -m 2>/dev/null`
nxt_echo=echo
CC=${CC:-cc}
;;
SunOS)
nxt_define=NXT_SOLARIS . ${NXT_AUTO}define
NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
NXT_SYSTEM_PLATFORM=`uname -p 2>/dev/null`
# Solaris /bin/sh and /bin/echo do not support "-n" option.
nxt_echo=auto/echo
CC=${CC:-gcc}
;;
Darwin)
NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
NXT_SYSTEM_PLATFORM=`uname -m 2>/dev/null`
# MacOSX /bin/sh is bash and its embedded "echo" command
# does not support "-n" option.
nxt_echo=/bin/echo
CC=${CC:-cc}
;;
*)
NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
NXT_SYSTEM_PLATFORM=`uname -p 2>/dev/null`
nxt_echo=echo
CC=${CC:-gcc}
;;
esac
$nxt_echo configuring for $NXT_SYSTEM $NXT_SYSTEM_VERSION $NXT_SYSTEM_PLATFORM