mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-27 12:03:42 +08:00
28 lines
607 B
Plaintext
28 lines
607 B
Plaintext
|
#!/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.
|
||
|
ver_str=`$1 -dumpversion 2> /dev/null | head -n 1`
|
||
|
|
||
|
case $2 in
|
||
|
version)
|
||
|
echo ${ver_str}
|
||
|
;;
|
||
|
major)
|
||
|
echo `echo ${ver_str} | cut -d'.' -f1 | sed s/"^\([0-9]*\).*$"/"\1"/`
|
||
|
;;
|
||
|
minor)
|
||
|
echo `echo ${ver_str} | cut -d'.' -f2 | sed s/"^\([0-9]*\).*$"/"\1"/`
|
||
|
;;
|
||
|
*)
|
||
|
echo "This program is only to be run by the ./configure script."
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
exit 0
|