File: configure

package info (click to toggle)
splitvt 1.6.6-19
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,004 kB
  • sloc: ansic: 4,953; sh: 99; perl: 15; makefile: 10
file content (37 lines) | stat: -rwxr-xr-x 782 bytes parent folder | download | duplicates (6)
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
#!/bin/sh
#  Script to auto-configure splitvt.		-Sam Lantinga

QUIET="-v"
# use $CC if set, else set it to cc
: ${CC:=cc}
CFLAGS=
MAKE="echo \"Done.  Type 'make' to build\"" 

echo "Making configuration..."

while [ $# -gt 0 ]
  do case $1 in
       -d) CFLAGS=-DDEBUG
           echo "Configuring for debug mode."
           shift;;
       -m) MAKE="echo Compiling now...; make && \
                 echo Compilation successfully completed."
           shift;;
       -q) QUIET=""
           shift;;
        *)  echo "Usage: Configure [-q] [-d] [-m]"
            exit;;
     esac
done

$CC $CFLAGS -o config config.c
if [ -f config ]; then
	if ./config $QUIET
	  then eval $MAKE
	fi
else
	echo "Can't compile configuration...  Makefile NOT created."
	exit 1
fi
rm -f config
exit 0