~ari-tczew/ubuntu/lucid/skyeye/sru-lp-464175

« back to all changes in this revision

Viewing changes to utils/scripts/check-gcc.sh

  • Committer: Bazaar Package Importer
  • Author(s): Yu Guanghui
  • Date: 2007-08-07 13:25:49 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20070807132549-96159k1obat1fxr0
Tags: 1.2.3-1
* New upstream release
* Added NO_BFD=1, don't require libbfd now. (Closes:Bug#423933) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
# Written by Anthony Lee 2007.03
 
4
#
 
5
 
 
6
printf "Checking gcc ... "
 
7
 
 
8
case $CC in
 
9
        *gcc*)
 
10
                ;;
 
11
        *)
 
12
                printf "IGNORE\n"
 
13
                exit 0
 
14
                ;;
 
15
esac
 
16
 
 
17
if ( $CC -dumpversion > /dev/null 2>&1 ); then
 
18
        GCC_VERSION=`$CC -dumpversion`
 
19
elif ( $CC --version > /dev/null 2>&1 ); then
 
20
        GCC_VERSION=`$CC --version`
 
21
else
 
22
        GCC_VERSION=unknown
 
23
fi
 
24
 
 
25
case $GCC_VERSION in
 
26
        unknown|2.*)
 
27
                printf "FAILED\n\n"
 
28
                printf "*** You are using $CC, version $GCC_VERSION .\n"
 
29
                printf "*** To perform the compilation, we need gcc >= 3.x.x !!!\n"
 
30
                printf "*** Run \"make NO_GCC_CHECK=1\" instead to ignore it.\n\n"
 
31
                exit 1
 
32
                ;;
 
33
        *)
 
34
                printf "OK ( `basename $CC` version: $GCC_VERSION )\n"
 
35
                exit 0
 
36
                ;;
 
37
esac
 
38