fix -p, so we don't need to supply a pattern
[shallot.git] / configure
blobe6a75c5579be725fad62ca878d949c9580b47ac6
1 #!/bin/sh
3 cfg_path=src/config.h
5 >$cfg_path echo "#ifndef CONFIG_H"
6 >>$cfg_path echo "#define CONFIG_H"
8 if [ `uname -s | grep -i bsd` ]; then
9 echo "BSD detected! Good job..."
10 >>$cfg_path echo "#define BSD"
11 elif [ `uname -s | grep -i linux` ]; then
12 echo "Liunx detected. Have you considered switching to BSD?"
13 >>$cfg_path echo "#define LINUX_PORT"
14 elif [ `uname -s | grep -i darwin` ]; then
15 echo "OS X detected. Who needs a GUI anyway?"
16 >>$cfg_path echo "#define BSD"
17 >>$cfg_path echo "#define OSX"
18 else
19 echo "Unable to determine OS. Configuring for a generic build..."
20 >>$cfg_path echo "#define GENERIC"
23 >>$cfg_path echo "#define _GNU_SOURCE"
24 >>$cfg_path echo "#endif"
26 echo "Configuration successful. This does not mean it will build."
27 echo "If you are missing gcc, or required libraries/headers, you"
28 echo "will need to install them first."