diff options
author | Peter Eisentraut | 2008-10-29 16:06:47 +0000 |
---|---|---|
committer | Peter Eisentraut | 2008-10-29 16:06:47 +0000 |
commit | 79d306c84abbe1b55ac70b966d35feb09dedf6a8 (patch) | |
tree | 54ae7a5bfb9f5dab44cd751e6740fff2a8bc6aa1 /configure | |
parent | 32765998049a41e334a3344517cb2528f6f82678 (diff) |
Support for Sun Studio compiler on Linux
This basically takes some build system code that was previously labeled
"Solaris" and ties it to the compiler rather than the operating system.
Author: Julius Stroffek <Julius.Stroffek@Sun.COM>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 54 |
1 files changed, 52 insertions, 2 deletions
diff --git a/configure b/configure index c8655588573..0edb145378f 100755 --- a/configure +++ b/configure @@ -686,6 +686,7 @@ CPPFLAGS ac_ct_CC EXEEXT OBJEXT +SUN_STUDIO_CC CPP GCC TAS @@ -3758,6 +3759,54 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Check if it's Sun Studio compiler. We assume that +# __SUNPRO_C will be defined for Sun Studio compilers +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __SUNPRO_C +choke me +#endif + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + SUN_STUDIO_CC=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + SUN_STUDIO_CC=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + unset CFLAGS # @@ -26726,6 +26775,7 @@ CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim +SUN_STUDIO_CC!$SUN_STUDIO_CC$ac_delim CPP!$CPP$ac_delim GCC!$GCC$ac_delim TAS!$TAS$ac_delim @@ -26754,7 +26804,6 @@ ELF_SYS!$ELF_SYS$ac_delim LDFLAGS_SL!$LDFLAGS_SL$ac_delim LD!$LD$ac_delim with_gnu_ld!$with_gnu_ld$ac_delim -ld_R_works!$ld_R_works$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -26796,6 +26845,7 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +ld_R_works!$ld_R_works$ac_delim RANLIB!$RANLIB$ac_delim STRIP!$STRIP$ac_delim STRIP_STATIC_LIB!$STRIP_STATIC_LIB$ac_delim @@ -26850,7 +26900,7 @@ vpath_build!$vpath_build$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 52; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 53; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 |