ntfs-3g/getgccver
cantab.net!aia21 d5c044de1b Use head -n 1 instead of -1. (From SUSE LINUX)
(Logical change 1.303)
2004-03-08 17:04:17 +00:00

11 lines
351 B
Bash
Executable File

#!/bin/sh
if test -z "$1"; then
echo "This program is only to be run by the ./configure script."
exit 1
fi
# Get the gcc version. Can't do this in configure.ac as automake refuses to
# preserve the square brackets while generating the configure script.
$1 --version 2>&1 | head -n 1 | sed s/"egcs-"// | sed s/"gcc (GCC) \([0-9]\.[0-9]*\).*"/"\1"/