blob: 70151adcc01705bbe46d1fa0ac85f7285f044909 (
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
|
#!/bin/sh
#
# This script attempts to automatically configure for the host system.
#
MKDEV=
MACROS=
MALLOC=
if [ -f /usr/include/sys/mkdev.h ]
then
MKDEV=-DHASMKDEV
fi
if [ -f /usr/include/sys/sysmacros.h ]
then
MACROS=-DHASSYSMACROS
fi
if [ -f /usr/include/malloc.h ]
then
MALLOC=-DHASMALLOC_H
fi
#
# OK, we have all of the configuration stuff done. Now generate the Makefile.
#
echo XCFLAGS=${MKDEV} ${MACROS} ${MALLOC} > Makefrag
sed -e "/XCFLAGS=/ r Makefrag" Makefile.in > Makefile
rm -f Makefrag
#
# Now generate config.h
#
rm -rf config.h
touch config.h
if [ -f /usr/include/termios.h ]
then
echo "#define USE_TERMIOS" >> config.h
fi
echo "The Makefile is now properly configured for your system."
|