which $1 | grep -E '^/' > /dev/null
}
-# Prints the current OS. Supported are Debian (debian) and Mac OS X (darwin)
-# at the moment. If an unsupported OS is used an error is printed.
+# Prints the current OS. Supported are Debian (debian), Gentoo (gentoo) and
+# Mac OS X (darwin) at the moment. If an unsupported OS is used an error is
+# printed.
os() {
if [ -f /etc/debian_version ]; then
echo debian
+ elif [ -f /etc/gentoo-release ]; then
+ echo gentoo
elif [ x`uname` = xDarwin ]; then
echo darwin
else
(echo "define(\`IF', \`ifelse(\`\$1', \`\$2',dnl')dnl
define(\`FI', \`)dnl')dnl";
# Run the file (and the default macros) through m4.
- cat $file.m4) | $m4 $* >> $file
+ cat $file.m4) | $m4 "$@" >> $file
unset file
}