summaryrefslogtreecommitdiff
blob: be4cd778b13c8ee46253859367c1163c96b45f18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
This patch sets the OS variable according to the CHOST given by the environment,
thus enabling cross-compilation.

--- configure.orig	2007-04-12 23:51:53.000000000 +0200
+++ configure	2007-04-13 00:03:10.000000000 +0200
@@ -45,6 +45,21 @@
 CFG_CURSES_HEADER=ncurses
 CFG_CURSES_LIB=ncurses
 
+case "$CHOST" in
+  *-darwin*)
+	OS=Darwin
+	;;
+  *-linux*)
+	OS=Linux
+	;;
+  *-freebsd*)
+	OS=FreeBSD
+	;;
+  *-solaris*)
+	OS=SunOS
+	;;
+esac
+
 # Operating system defaults
 [ "$OS" != "" ] || OS=`uname`
 case $OS in