From 629687f62fbd85ea41abfd33fb2e864222a0dd29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Rullg=C3=A5rd?= Date: Sat, 21 Feb 2009 21:07:32 +0000 Subject: configure: move detection of compiler type to single location Originally committed as revision 17498 to svn://svn.ffmpeg.org/ffmpeg/trunk --- configure | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 4219cc03a5..7e8512642f 100755 --- a/configure +++ b/configure @@ -1350,6 +1350,16 @@ EOF fi rm $TMPSH +if $cc --version 2>/dev/null | grep -q '(GCC)'; then + cc_type=gcc +elif $cc --version 2>/dev/null | grep -q Intel; then + cc_type=icc +elif $cc -v 2>&1 | grep -q xlc; then + cc_type=xlc +fi + +test -n "$cc_type" && enable $cc_type || echolog "Unknown C compiler $cc" + # compiler sanity check check_exec <&1 | grep -q xlc; then + if enabled xlc; then add_cflags -qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto else add_cflags -pipe @@ -2112,7 +2122,7 @@ if enabled small; then check_cflags -Os # not all compilers support -Os optimizations="small" elif enabled optimizations; then - if $cc -v 2>&1 | grep -q xlc; then + if enabled xlc; then add_cflags -O5 add_ldflags -O5 else @@ -2123,7 +2133,7 @@ check_cflags -fno-math-errno check_cflags -fno-signed-zeros # add some flags for Intel C Compiler -if $cc --version 2> /dev/null | grep -q Intel; then +if enabled icc; then # Just warnings, no remarks check_cflags -w1 # -wd: Disable following warnings -- cgit v1.2.3