File: miniconf.sh

package info (click to toggle)
hztty 2.0-5.2woody2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,028 kB
  • ctags: 295
  • sloc: ansic: 26,960; makefile: 162; sh: 109
file content (19 lines) | stat: -rwxr-xr-x 404 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
# a mini-configure to simplify installation

CPP=$1

echo "/* don't change -- generated by miniconf.sh */" > miniconf.h

# check unistd
if [ -f /usr/include/unistd.h ]; then
	echo "#define UNISTD"	>> miniconf.h
else
	echo '#include <unistd.h>' > minitest.c
	err=`eval "($CPP minitest.c >/dev/null) 2>&1"` 
	if [ -z "$err" ]; then 
		echo "#define UNISTD"	>> miniconf.h
	fi
	rm -f minitest*
fi