Changes by: antona
Update of /cvsroot/linux-ntfs/ntfsprogs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3716
Modified Files:
configure.ac
Added Files:
getgccver
Log Message:
Re-add getgccver but a completely different version. This is to cope with all
OS I tried it on (Solaris, OSX, Linux, NetBSD, FreeBSD) and various gcc flavours
including weird ones like "3.5-blah".
Index: getgccver
===================================================================
RCS file: getgccver
diff -N getgccver
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ getgccver 15 Oct 2005 11:14:43 -0000 1.6
@@ -0,0 +1,27 @@
+#!/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
Index: configure.ac
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/configure.ac,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -p -r1.86 -r1.87
--- configure.ac 15 Oct 2005 10:16:26 -0000 1.86
+++ configure.ac 15 Oct 2005 11:14:43 -0000 1.87
@@ -240,9 +240,9 @@ fi
# Check for gcc version being >= 2.96.
AC_MSG_CHECKING(version of $_cc)
-cc_version=`$_cc -dumpversion 2> /dev/null | head -n 1`
-cc_major=`echo $cc_version | cut -d'.' -f1 | sed s/"^\([0-9]+\).*$"/"\1"/`
-cc_minor=`echo $cc_version | cut -d'.' -f2 | sed s/"^\([0-9]+\).*$"/"\1"/`
+cc_version=`getgccver $_cc version`
+cc_major=`getgccver $_cc major`
+cc_minor=`getgccver $_cc minor`
if test -z "$cc_version"; then
cc_version="v. ?.??"
cc_major=1
|