test (709:e1af38445a13) test (1255:944efece387a)
1
2# Copyright (C) Igor Sysoev
3# Copyright (C) NGINX, Inc.
4
5
6NXT_SYSTEM=`uname -s 2>/dev/null`
7
8
9case "$NXT_SYSTEM" in
10
11 Linux)
12 NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
13 # Linux uname -p can return "unknown".
14 NXT_SYSTEM_PLATFORM=`uname -m 2>/dev/null`
15 echo=echo
16 CC=${CC:-cc}
1
2# Copyright (C) Igor Sysoev
3# Copyright (C) NGINX, Inc.
4
5
6NXT_SYSTEM=`uname -s 2>/dev/null`
7
8
9case "$NXT_SYSTEM" in
10
11 Linux)
12 NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
13 # Linux uname -p can return "unknown".
14 NXT_SYSTEM_PLATFORM=`uname -m 2>/dev/null`
15 echo=echo
16 CC=${CC:-cc}
17 AR=${AR:-ar}
17 ;;
18
19 FreeBSD | NetBSD | OpenBSD | DragonFly)
20 NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
21 NXT_SYSTEM_PLATFORM=`uname -m 2>/dev/null`
22 echo=echo
23 CC=${CC:-cc}
18 ;;
19
20 FreeBSD | NetBSD | OpenBSD | DragonFly)
21 NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
22 NXT_SYSTEM_PLATFORM=`uname -m 2>/dev/null`
23 echo=echo
24 CC=${CC:-cc}
25 AR=${AR:-ar}
24 ;;
25
26 SunOS)
27 NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
28 NXT_SYSTEM_PLATFORM=`uname -p 2>/dev/null`
29 echo=echo
30 CC=${CC:-gcc}
26 ;;
27
28 SunOS)
29 NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
30 NXT_SYSTEM_PLATFORM=`uname -p 2>/dev/null`
31 echo=echo
32 CC=${CC:-gcc}
33 AR=${AR:-ar}
31
32 NXT_TEST_CFLAGS="$NXT_TEST_CFLAGS -D_XOPEN_SOURCE"
33 NXT_TEST_CFLAGS="$NXT_TEST_CFLAGS -D_XOPEN_SOURCE_EXTENDED=1"
34 NXT_TEST_CFLAGS="$NXT_TEST_CFLAGS -D__EXTENSIONS__"
35 NXT_TEST_LIBS="-lsocket"
36 ;;
37
38 Darwin)
39 NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
40 NXT_SYSTEM_PLATFORM=`uname -m 2>/dev/null`
41 echo=echo
42 CC=${CC:-cc}
34
35 NXT_TEST_CFLAGS="$NXT_TEST_CFLAGS -D_XOPEN_SOURCE"
36 NXT_TEST_CFLAGS="$NXT_TEST_CFLAGS -D_XOPEN_SOURCE_EXTENDED=1"
37 NXT_TEST_CFLAGS="$NXT_TEST_CFLAGS -D__EXTENSIONS__"
38 NXT_TEST_LIBS="-lsocket"
39 ;;
40
41 Darwin)
42 NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
43 NXT_SYSTEM_PLATFORM=`uname -m 2>/dev/null`
44 echo=echo
45 CC=${CC:-cc}
46 AR=${AR:-ar}
43 ;;
44
45 AIX)
46 NXT_SYSTEM_VERSION="`uname -v 2>/dev/null`.`uname -r 2>/dev/null`"
47 NXT_SYSTEM_PLATFORM=`uname -p 2>/dev/null`
48 echo=echo
49 CC=${CC:-gcc}
47 ;;
48
49 AIX)
50 NXT_SYSTEM_VERSION="`uname -v 2>/dev/null`.`uname -r 2>/dev/null`"
51 NXT_SYSTEM_PLATFORM=`uname -p 2>/dev/null`
52 echo=echo
53 CC=${CC:-gcc}
54 AR=${AR:-ar}
50 ;;
51
52 HP-UX)
53 NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
54 NXT_SYSTEM_PLATFORM=`uname -m 2>/dev/null`
55 echo=echo
56 CC=${CC:-gcc}
55 ;;
56
57 HP-UX)
58 NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
59 NXT_SYSTEM_PLATFORM=`uname -m 2>/dev/null`
60 echo=echo
61 CC=${CC:-gcc}
62 AR=${AR:-ar}
57
58 NXT_TEST_CFLAGS="$NXT_TEST_CFLAGS -D_XOPEN_SOURCE"
59 NXT_TEST_CFLAGS="$NXT_TEST_CFLAGS -D_XOPEN_SOURCE_EXTENDED"
60 NXT_TEST_CFLAGS="$NXT_TEST_CFLAGS -D_HPUX_ALT_XOPEN_SOCKET_API"
61 ;;
62
63 QNX)
64 NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
65 NXT_SYSTEM_PLATFORM=`uname -p 2>/dev/null`
66 echo=echo
67 CC=${CC:-gcc}
63
64 NXT_TEST_CFLAGS="$NXT_TEST_CFLAGS -D_XOPEN_SOURCE"
65 NXT_TEST_CFLAGS="$NXT_TEST_CFLAGS -D_XOPEN_SOURCE_EXTENDED"
66 NXT_TEST_CFLAGS="$NXT_TEST_CFLAGS -D_HPUX_ALT_XOPEN_SOCKET_API"
67 ;;
68
69 QNX)
70 NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
71 NXT_SYSTEM_PLATFORM=`uname -p 2>/dev/null`
72 echo=echo
73 CC=${CC:-gcc}
74 AR=${AR:-ar}
68 ;;
69
70 MINGW*)
71 # MinGW /bin/sh builtin "echo" omits newline under Wine
72 # for some reason, so use a portable echo.c program built
73 # using MinGW GCC with only msvcrt.dll dependence.
74
75 NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
76 NXT_SYSTEM_PLATFORM=`uname -m 2>/dev/null`
77 echo=auto/echo/echo.exe
78 CC=${CC:-cl}
75 ;;
76
77 MINGW*)
78 # MinGW /bin/sh builtin "echo" omits newline under Wine
79 # for some reason, so use a portable echo.c program built
80 # using MinGW GCC with only msvcrt.dll dependence.
81
82 NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
83 NXT_SYSTEM_PLATFORM=`uname -m 2>/dev/null`
84 echo=auto/echo/echo.exe
85 CC=${CC:-cl}
86 AR=${AR:-ar}
79 NXT_WINDOWS=YES
80 ;;
81
82 *)
83 NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
84 NXT_SYSTEM_PLATFORM=`uname -p 2>/dev/null`
85 echo=echo
86 CC=${CC:-gcc}
87 NXT_WINDOWS=YES
88 ;;
89
90 *)
91 NXT_SYSTEM_VERSION=`uname -r 2>/dev/null`
92 NXT_SYSTEM_PLATFORM=`uname -p 2>/dev/null`
93 echo=echo
94 CC=${CC:-gcc}
95 AR=${AR:-ar}
87 ;;
88
89esac
90
91$echo configuring for $NXT_SYSTEM $NXT_SYSTEM_VERSION $NXT_SYSTEM_PLATFORM
96 ;;
97
98esac
99
100$echo configuring for $NXT_SYSTEM $NXT_SYSTEM_VERSION $NXT_SYSTEM_PLATFORM