blob: b58a59174603e9fd6971b52e7ea0be8ca96e2736 (
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#!/bin/sh
#
# $NetBSD: configure.sh,v 1.1 2008/02/29 20:53:02 jlam Exp $
#
# This script needs the following variables passed through the environment:
#
# OPSYS == ${OPSYS}
# CURSES_LIBS == ${BUILDLINK_LDADD.curses}
#
# Assume we always have gettimeofday().
cppflags="-DHAVE_GETTIMEOFDAY"
# "Test" whether to use termios routines or use ioctls to fiddle with ttys.
if test -d /usr/include/termios.h; then
cppflags="$cppflags -DUSE_TERMIOS"
else
cppflags="$cppflags -DUSE_SGTTY"
fi
# OS-specific stuff
case ${OPSYS} in
*BSD)
;;
Linux)
cppflags="$cppflags -DDEF_OPTARG"
;;
SunOS)
cppflags="$cppflags -DSYSV -DUSE_RAND"
libs="-lsocket -lnsl"
;;
AIX)
cppflags="$cppflags -DSYSV -DUSE_RAND -DOLD_SELECT -DUSE_WAIT3"
;;
*)
cppflags="$cppflags -DSYSV -DUSE_RAND"
;;
esac
# Don't build the keypad support.
cppflags="$cppflags -DNO_KEYPAD"
cat > config.mk << EOF
OS_CFLAGS= $cppflags
LIBS= $libs
CURSES= ${CURSES_LIBS}
EOF
echo "Using the following configuration:"
cat config.mk
exit 0
|