11735 |
|
|
11736 |
|
|
11737 |
|
|
11738 |
+ |
|
11739 |
|
# Try to determine "good" native compiler flags if none specified on command |
11740 |
|
# line |
11741 |
|
|
11744 |
|
case "${host_cpu}-${host_os}" in |
11745 |
|
|
11746 |
|
*linux*) if test "$FC" = ifc -o "$FC" = ifort; then |
11747 |
< |
FCFLAGS="-O3 -ip -no-prec-div" |
11747 |
> |
FCFLAGS="-O2" |
11748 |
|
fi;; |
11749 |
|
rs6000*-aix*) if test "$FC" = xlf90 -o "$FC" = f90 -o "$FC" = xlf95; then |
11750 |
|
FCFLAGS="-O3 -qarch=pwrx -qtune=pwrx -qansialias -w" |
11767 |
|
FCFLAGS="-qthreaded -O -qtune=auto -qarch=auto -qunroll=auto" |
11768 |
|
fi |
11769 |
|
if test "$FC" = ifort; then |
11770 |
< |
FCFLAGS="-O3 -ip -no-prec-dev -mdynamic-no-pic" |
11770 |
> |
FCFLAGS="-O2" |
11771 |
> |
fi |
11772 |
> |
if test "$FC" = gfortran; then |
11773 |
> |
FCFLAGS="-Os" |
11774 |
|
fi;; |
11775 |
|
esac |
11776 |
|
|
11773 |
– |
if test -n "$CPU_FLAGS"; then |
11774 |
– |
FCFLAGS="$FCFLAGS $CPU_FLAGS" |
11775 |
– |
fi |
11776 |
– |
|
11777 |
|
if test -z "$FCFLAGS"; then |
11778 |
|
echo "" |
11779 |
|
echo "*********************************************************" |
11780 |
|
echo "* WARNING: Don't know the best FCFLAGS for this system *" |
11781 |
|
echo "* Use make FCFLAGS=..., or edit the top level Makefile *" |
11782 |
< |
echo "* (otherwise, a default of FCFLAGS=-O3 will be used) *" |
11782 |
> |
echo "* (otherwise, a default of FCFLAGS=-O will be used) *" |
11783 |
|
echo "*********************************************************" |
11784 |
|
echo "" |
11785 |
< |
FCFLAGS="-O3" |
11785 |
> |
FCFLAGS="-O" |
11786 |
|
fi |
11787 |
|
|
11788 |
|
|
11892 |
|
case "${host_cpu}-${host_os}" in |
11893 |
|
|
11894 |
|
*linux*) if test "$CC" = icc; then |
11895 |
< |
CFLAGS="-O" |
11895 |
> |
CFLAGS="-O2" |
11896 |
|
fi;; |
11897 |
|
sparc-solaris2*) if test "$CC" = cc; then |
11898 |
|
CFLAGS="-O -dalign" |
11923 |
|
echo "*******************************************************" |
11924 |
|
fi;; |
11925 |
|
*darwin*) |
11926 |
< |
if test "$CC" = xlc -o "$CC" = cc; then |
11926 |
> |
if test "$CC" = xlc; then |
11927 |
|
CFLAGS="-qthreaded -O -qtune=auto -qarch=auto -qunroll=auto -qaltivec" |
11928 |
|
fi |
11929 |
|
if test "$CC" = icc; then |
11930 |
< |
CFLAGS="-O3 -ip -no-prec-div -mdynamic-no-pic" |
11930 |
> |
CFLAGS="-O2" |
11931 |
> |
fi |
11932 |
> |
if test $ac_cv_prog_really_gcc = yes; then |
11933 |
> |
CFLAGS="-Os" |
11934 |
|
fi;; |
11935 |
|
esac |
11936 |
|
|
11937 |
|
# use default flags for gcc on all systems |
11938 |
< |
if test $ac_cv_prog_really_gcc = yes; then |
11939 |
< |
CFLAGS="-O6 -fomit-frame-pointer -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align" |
11937 |
< |
fi |
11938 |
< |
|
11939 |
< |
# test for gcc-specific flags: |
11940 |
< |
if test $ac_cv_prog_really_gcc = yes; then |
11941 |
< |
# -malign-double for x86 systems |
11942 |
< |
|
11943 |
< |
|
11944 |
< |
{ echo "$as_me:$LINENO: checking whether ${CC} accepts -malign-double" >&5 |
11945 |
< |
echo $ECHO_N "checking whether ${CC} accepts -malign-double... $ECHO_C" >&6; } |
11946 |
< |
if test "${ac_align_double+set}" = set; then |
11947 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
11948 |
< |
else |
11949 |
< |
echo 'void f(){}' > conftest.c |
11950 |
< |
if test -z "`${CC} -malign-double -c conftest.c 2>&1`"; then |
11951 |
< |
ac_align_double=yes |
11952 |
< |
else |
11953 |
< |
ac_align_double=no |
11954 |
< |
fi |
11955 |
< |
rm -f conftest* |
11956 |
< |
|
11957 |
< |
fi |
11958 |
< |
{ echo "$as_me:$LINENO: result: $ac_align_double" >&5 |
11959 |
< |
echo "${ECHO_T}$ac_align_double" >&6; } |
11960 |
< |
if test "$ac_align_double" = yes; then |
11961 |
< |
: |
11962 |
< |
CFLAGS="$CFLAGS -malign-double" |
11963 |
< |
else |
11964 |
< |
: |
11965 |
< |
|
11966 |
< |
fi |
11967 |
< |
|
11968 |
< |
# -fstrict-aliasing for gcc-2.95+ |
11969 |
< |
|
11970 |
< |
|
11971 |
< |
{ echo "$as_me:$LINENO: checking whether ${CC} accepts -fstrict-aliasing" >&5 |
11972 |
< |
echo $ECHO_N "checking whether ${CC} accepts -fstrict-aliasing... $ECHO_C" >&6; } |
11973 |
< |
if test "${ac_fstrict_aliasing+set}" = set; then |
11974 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
11975 |
< |
else |
11976 |
< |
echo 'void f(){}' > conftest.c |
11977 |
< |
if test -z "`${CC} -fstrict-aliasing -c conftest.c 2>&1`"; then |
11978 |
< |
ac_fstrict_aliasing=yes |
11979 |
< |
else |
11980 |
< |
ac_fstrict_aliasing=no |
11981 |
< |
fi |
11982 |
< |
rm -f conftest* |
11983 |
< |
|
11984 |
< |
fi |
11985 |
< |
{ echo "$as_me:$LINENO: result: $ac_fstrict_aliasing" >&5 |
11986 |
< |
echo "${ECHO_T}$ac_fstrict_aliasing" >&6; } |
11987 |
< |
if test "$ac_fstrict_aliasing" = yes; then |
11988 |
< |
: |
11989 |
< |
CFLAGS="$CFLAGS -fstrict-aliasing" |
11990 |
< |
else |
11991 |
< |
: |
11992 |
< |
|
11993 |
< |
fi |
11994 |
< |
|
11995 |
< |
fi |
11996 |
< |
|
11997 |
< |
CPU_FLAGS="" |
11998 |
< |
if test $ac_cv_prog_really_gcc = yes; then |
11999 |
< |
case "${host_cpu}" in |
12000 |
< |
i586*) |
12001 |
< |
|
12002 |
< |
{ echo "$as_me:$LINENO: checking whether ${CC} accepts -mcpu=pentium" >&5 |
12003 |
< |
echo $ECHO_N "checking whether ${CC} accepts -mcpu=pentium... $ECHO_C" >&6; } |
12004 |
< |
if test "${ac_cpu_pentium+set}" = set; then |
12005 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
12006 |
< |
else |
12007 |
< |
echo 'void f(){}' > conftest.c |
12008 |
< |
if test -z "`${CC} -mcpu=pentium -c conftest.c 2>&1`"; then |
12009 |
< |
ac_cpu_pentium=yes |
12010 |
< |
else |
12011 |
< |
ac_cpu_pentium=no |
12012 |
< |
fi |
12013 |
< |
rm -f conftest* |
12014 |
< |
|
12015 |
< |
fi |
12016 |
< |
{ echo "$as_me:$LINENO: result: $ac_cpu_pentium" >&5 |
12017 |
< |
echo "${ECHO_T}$ac_cpu_pentium" >&6; } |
12018 |
< |
if test "$ac_cpu_pentium" = yes; then |
12019 |
< |
: |
12020 |
< |
CPU_FLAGS=-mcpu=pentium |
12021 |
< |
else |
12022 |
< |
: |
12023 |
< |
|
12024 |
< |
|
12025 |
< |
{ echo "$as_me:$LINENO: checking whether ${CC} accepts -mpentium" >&5 |
12026 |
< |
echo $ECHO_N "checking whether ${CC} accepts -mpentium... $ECHO_C" >&6; } |
12027 |
< |
if test "${ac_pentium+set}" = set; then |
12028 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
12029 |
< |
else |
12030 |
< |
echo 'void f(){}' > conftest.c |
12031 |
< |
if test -z "`${CC} -mpentium -c conftest.c 2>&1`"; then |
12032 |
< |
ac_pentium=yes |
12033 |
< |
else |
12034 |
< |
ac_pentium=no |
12035 |
< |
fi |
12036 |
< |
rm -f conftest* |
12037 |
< |
|
12038 |
< |
fi |
12039 |
< |
{ echo "$as_me:$LINENO: result: $ac_pentium" >&5 |
12040 |
< |
echo "${ECHO_T}$ac_pentium" >&6; } |
12041 |
< |
if test "$ac_pentium" = yes; then |
12042 |
< |
: |
12043 |
< |
CPU_FLAGS=-mpentium |
12044 |
< |
else |
12045 |
< |
: |
12046 |
< |
|
12047 |
< |
fi |
12048 |
< |
|
12049 |
< |
fi |
12050 |
< |
|
12051 |
< |
;; |
12052 |
< |
i686*) |
12053 |
< |
|
12054 |
< |
{ echo "$as_me:$LINENO: checking whether ${CC} accepts -mcpu=pentiumpro" >&5 |
12055 |
< |
echo $ECHO_N "checking whether ${CC} accepts -mcpu=pentiumpro... $ECHO_C" >&6; } |
12056 |
< |
if test "${ac_cpu_pentiumpro+set}" = set; then |
12057 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
12058 |
< |
else |
12059 |
< |
echo 'void f(){}' > conftest.c |
12060 |
< |
if test -z "`${CC} -mcpu=pentiumpro -c conftest.c 2>&1`"; then |
12061 |
< |
ac_cpu_pentiumpro=yes |
12062 |
< |
else |
12063 |
< |
ac_cpu_pentiumpro=no |
12064 |
< |
fi |
12065 |
< |
rm -f conftest* |
12066 |
< |
|
12067 |
< |
fi |
12068 |
< |
{ echo "$as_me:$LINENO: result: $ac_cpu_pentiumpro" >&5 |
12069 |
< |
echo "${ECHO_T}$ac_cpu_pentiumpro" >&6; } |
12070 |
< |
if test "$ac_cpu_pentiumpro" = yes; then |
12071 |
< |
: |
12072 |
< |
CPU_FLAGS=-mcpu=pentiumpro |
12073 |
< |
else |
12074 |
< |
: |
12075 |
< |
|
12076 |
< |
|
12077 |
< |
{ echo "$as_me:$LINENO: checking whether ${CC} accepts -mpentiumpro" >&5 |
12078 |
< |
echo $ECHO_N "checking whether ${CC} accepts -mpentiumpro... $ECHO_C" >&6; } |
12079 |
< |
if test "${ac_pentiumpro+set}" = set; then |
12080 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
12081 |
< |
else |
12082 |
< |
echo 'void f(){}' > conftest.c |
12083 |
< |
if test -z "`${CC} -mpentiumpro -c conftest.c 2>&1`"; then |
12084 |
< |
ac_pentiumpro=yes |
12085 |
< |
else |
12086 |
< |
ac_pentiumpro=no |
12087 |
< |
fi |
12088 |
< |
rm -f conftest* |
12089 |
< |
|
12090 |
< |
fi |
12091 |
< |
{ echo "$as_me:$LINENO: result: $ac_pentiumpro" >&5 |
12092 |
< |
echo "${ECHO_T}$ac_pentiumpro" >&6; } |
12093 |
< |
if test "$ac_pentiumpro" = yes; then |
12094 |
< |
: |
12095 |
< |
CPU_FLAGS=-mpentiumpro |
12096 |
< |
else |
12097 |
< |
: |
12098 |
< |
|
12099 |
< |
fi |
12100 |
< |
|
12101 |
< |
fi |
12102 |
< |
|
12103 |
< |
;; |
12104 |
< |
powerpc*) |
12105 |
< |
cputype=`(grep cpu /proc/cpuinfo | head -1 | cut -d: -f2 | sed 's/ //g') 2> /dev/null` |
12106 |
< |
is60x=`echo $cputype | egrep "^600-9e?$"` |
12107 |
< |
if test -n "$is60x"; then |
12108 |
< |
|
12109 |
< |
|
12110 |
< |
{ echo "$as_me:$LINENO: checking whether ${CC} accepts -mcpu=$cputype" >&5 |
12111 |
< |
echo $ECHO_N "checking whether ${CC} accepts -mcpu=$cputype... $ECHO_C" >&6; } |
12112 |
< |
if test "${ac_m_cpu_60x+set}" = set; then |
12113 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
12114 |
< |
else |
12115 |
< |
echo 'void f(){}' > conftest.c |
12116 |
< |
if test -z "`${CC} -mcpu=$cputype -c conftest.c 2>&1`"; then |
12117 |
< |
ac_m_cpu_60x=yes |
12118 |
< |
else |
12119 |
< |
ac_m_cpu_60x=no |
12120 |
< |
fi |
12121 |
< |
rm -f conftest* |
12122 |
< |
|
12123 |
< |
fi |
12124 |
< |
{ echo "$as_me:$LINENO: result: $ac_m_cpu_60x" >&5 |
12125 |
< |
echo "${ECHO_T}$ac_m_cpu_60x" >&6; } |
12126 |
< |
if test "$ac_m_cpu_60x" = yes; then |
12127 |
< |
: |
12128 |
< |
CPU_FLAGS=-mcpu=$cputype |
12129 |
< |
else |
12130 |
< |
: |
12131 |
< |
|
12132 |
< |
fi |
12133 |
< |
|
12134 |
< |
elif test "$cputype" = 750; then |
12135 |
< |
|
12136 |
< |
|
12137 |
< |
{ echo "$as_me:$LINENO: checking whether we are using gcc 2.95 or later" >&5 |
12138 |
< |
echo $ECHO_N "checking whether we are using gcc 2.95 or later... $ECHO_C" >&6; } |
12139 |
< |
if test "${ac_cv_prog_gcc_2_95+set}" = set; then |
12140 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
12141 |
< |
else |
12142 |
< |
|
12143 |
< |
cat > conftest.c <<EOF |
12144 |
< |
#ifdef __GNUC__ && !defined (__INTEL_COMPILER) |
12145 |
< |
# if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) |
12146 |
< |
yes; |
12147 |
< |
# endif |
12148 |
< |
#endif |
12149 |
< |
EOF |
12150 |
< |
if { ac_try='${CC-cc} -E conftest.c' |
12151 |
< |
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12152 |
< |
(eval $ac_try) 2>&5 |
12153 |
< |
ac_status=$? |
12154 |
< |
echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12155 |
< |
(exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then |
12156 |
< |
ac_cv_prog_gcc_2_95=yes |
12157 |
< |
else |
12158 |
< |
ac_cv_prog_gcc_2_95=no |
12159 |
< |
fi |
12160 |
< |
|
12161 |
< |
fi |
12162 |
< |
{ echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_2_95" >&5 |
12163 |
< |
echo "${ECHO_T}$ac_cv_prog_gcc_2_95" >&6; } |
12164 |
< |
if test "$ac_cv_prog_gcc_2_95" = yes; then |
12165 |
< |
: |
12166 |
< |
|
12167 |
< |
|
12168 |
< |
{ echo "$as_me:$LINENO: checking whether ${CC} accepts -mcpu=750" >&5 |
12169 |
< |
echo $ECHO_N "checking whether ${CC} accepts -mcpu=750... $ECHO_C" >&6; } |
12170 |
< |
if test "${ac_m_cpu_750+set}" = set; then |
12171 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
12172 |
< |
else |
12173 |
< |
echo 'void f(){}' > conftest.c |
12174 |
< |
if test -z "`${CC} -mcpu=750 -c conftest.c 2>&1`"; then |
12175 |
< |
ac_m_cpu_750=yes |
12176 |
< |
else |
12177 |
< |
ac_m_cpu_750=no |
12178 |
< |
fi |
12179 |
< |
rm -f conftest* |
12180 |
< |
|
12181 |
< |
fi |
12182 |
< |
{ echo "$as_me:$LINENO: result: $ac_m_cpu_750" >&5 |
12183 |
< |
echo "${ECHO_T}$ac_m_cpu_750" >&6; } |
12184 |
< |
if test "$ac_m_cpu_750" = yes; then |
12185 |
< |
: |
12186 |
< |
CPU_FLAGS=-mcpu=750 |
12187 |
< |
else |
12188 |
< |
: |
12189 |
< |
|
12190 |
< |
fi |
12191 |
< |
|
12192 |
< |
else |
12193 |
< |
: |
12194 |
< |
|
12195 |
< |
fi |
12196 |
< |
|
12197 |
< |
fi |
12198 |
< |
if test -z "$CPU_FLAGS"; then |
12199 |
< |
|
12200 |
< |
|
12201 |
< |
{ echo "$as_me:$LINENO: checking whether ${CC} accepts -mcpu=powerpc" >&5 |
12202 |
< |
echo $ECHO_N "checking whether ${CC} accepts -mcpu=powerpc... $ECHO_C" >&6; } |
12203 |
< |
if test "${ac_m_cpu_powerpc+set}" = set; then |
12204 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
12205 |
< |
else |
12206 |
< |
echo 'void f(){}' > conftest.c |
12207 |
< |
if test -z "`${CC} -mcpu=powerpc -c conftest.c 2>&1`"; then |
12208 |
< |
ac_m_cpu_powerpc=yes |
12209 |
< |
else |
12210 |
< |
ac_m_cpu_powerpc=no |
12211 |
< |
fi |
12212 |
< |
rm -f conftest* |
12213 |
< |
|
12214 |
< |
fi |
12215 |
< |
{ echo "$as_me:$LINENO: result: $ac_m_cpu_powerpc" >&5 |
12216 |
< |
echo "${ECHO_T}$ac_m_cpu_powerpc" >&6; } |
12217 |
< |
if test "$ac_m_cpu_powerpc" = yes; then |
12218 |
< |
: |
12219 |
< |
CPU_FLAGS=-mcpu=powerpc |
12220 |
< |
else |
12221 |
< |
: |
12222 |
< |
|
12223 |
< |
fi |
12224 |
< |
|
12225 |
< |
fi |
12226 |
< |
if test -z "$CPU_FLAGS"; then |
12227 |
< |
|
12228 |
< |
|
12229 |
< |
{ echo "$as_me:$LINENO: checking whether ${CC} accepts -mpowerpc" >&5 |
12230 |
< |
echo $ECHO_N "checking whether ${CC} accepts -mpowerpc... $ECHO_C" >&6; } |
12231 |
< |
if test "${ac_m_powerpc+set}" = set; then |
12232 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
12233 |
< |
else |
12234 |
< |
echo 'void f(){}' > conftest.c |
12235 |
< |
if test -z "`${CC} -mpowerpc -c conftest.c 2>&1`"; then |
12236 |
< |
ac_m_powerpc=yes |
12237 |
< |
else |
12238 |
< |
ac_m_powerpc=no |
12239 |
< |
fi |
12240 |
< |
rm -f conftest* |
12241 |
< |
|
12242 |
< |
fi |
12243 |
< |
{ echo "$as_me:$LINENO: result: $ac_m_powerpc" >&5 |
12244 |
< |
echo "${ECHO_T}$ac_m_powerpc" >&6; } |
12245 |
< |
if test "$ac_m_powerpc" = yes; then |
12246 |
< |
: |
12247 |
< |
CPU_FLAGS=-mpowerpc |
12248 |
< |
else |
12249 |
< |
: |
12250 |
< |
|
12251 |
< |
fi |
12252 |
< |
|
12253 |
< |
fi |
12254 |
< |
esac |
12255 |
< |
fi |
12256 |
< |
|
12257 |
< |
if test -n "$CPU_FLAGS"; then |
12258 |
< |
CFLAGS="$CFLAGS $CPU_FLAGS" |
11938 |
> |
if test $ac_cv_prog_really_gcc = yes -a -z "$CFLAGS"; then |
11939 |
> |
CFLAGS="-O2" |
11940 |
|
fi |
11941 |
|
|
11942 |
|
if test -z "$CFLAGS"; then |
11944 |
|
echo "********************************************************" |
11945 |
|
echo "* WARNING: Don't know the best CFLAGS for this system *" |
11946 |
|
echo "* Use make CFLAGS=..., or edit the top level Makefile *" |
11947 |
< |
echo "* (otherwise, a default of CFLAGS=-O3 will be used) *" |
11947 |
> |
echo "* (otherwise, a default of CFLAGS=-O will be used) *" |
11948 |
|
echo "********************************************************" |
11949 |
|
echo "" |
11950 |
< |
CFLAGS="-O3" |
11950 |
> |
CFLAGS="-O" |
11951 |
|
fi |
11952 |
|
|
11953 |
|
|
12039 |
|
case "${host_cpu}-${host_os}" in |
12040 |
|
|
12041 |
|
*linux*) if test "$CXX" = icc -o "$CXX" = icpc; then |
12042 |
< |
CXXFLAGS="-O" |
12042 |
> |
CXXFLAGS="-O2" |
12043 |
|
fi;; |
12044 |
|
sparc-solaris2*) if test "$CXX" = CC; then |
12045 |
|
CXXFLAGS="-features=extensions -O -dalign" |
12065 |
|
CXXFLAGS="-qthreaded -O -qtune=auto -qarch=auto -qunroll=auto -qaltivec" |
12066 |
|
fi |
12067 |
|
if test "$CXX" = icpc; then |
12068 |
< |
CXXFLAGS="-O3 -ip -no-prec-div -mdynamic-no-pic" |
12068 |
> |
CXXFLAGS="-O2" |
12069 |
> |
fi |
12070 |
> |
if test $ac_cv_prog_really_gxx = yes; then |
12071 |
> |
CXXFLAGS="-Os" |
12072 |
|
fi;; |
12073 |
|
esac |
12074 |
|
|
12075 |
|
# use default flags for gcc on all systems |
12076 |
< |
if test $ac_cv_prog_really_gxx = yes; then |
12077 |
< |
CXXFLAGS="-O6 -fomit-frame-pointer -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align" |
12394 |
< |
fi |
12395 |
< |
|
12396 |
< |
# test for gcc-specific flags: |
12397 |
< |
if test $ac_cv_prog_really_gxx = yes; then |
12398 |
< |
# -malign-double for x86 systems |
12399 |
< |
|
12400 |
< |
|
12401 |
< |
{ echo "$as_me:$LINENO: checking whether ${CXX} accepts -malign-double" >&5 |
12402 |
< |
echo $ECHO_N "checking whether ${CXX} accepts -malign-double... $ECHO_C" >&6; } |
12403 |
< |
if test "${ac_align_double+set}" = set; then |
12404 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
12405 |
< |
else |
12406 |
< |
echo 'void f(){}' > conftest.cpp |
12407 |
< |
if test -z "`${CXX} -malign-double -c conftest.cpp 2>&1`"; then |
12408 |
< |
ac_align_double=yes |
12409 |
< |
else |
12410 |
< |
ac_align_double=no |
12411 |
< |
fi |
12412 |
< |
rm -f conftest* |
12413 |
< |
|
12414 |
< |
fi |
12415 |
< |
{ echo "$as_me:$LINENO: result: $ac_align_double" >&5 |
12416 |
< |
echo "${ECHO_T}$ac_align_double" >&6; } |
12417 |
< |
if test "$ac_align_double" = yes; then |
12418 |
< |
: |
12419 |
< |
CXXFLAGS="$CXXFLAGS -malign-double" |
12420 |
< |
else |
12421 |
< |
: |
12422 |
< |
|
12423 |
< |
fi |
12424 |
< |
|
12425 |
< |
# -fstrict-aliasing for gcc-2.95+ |
12426 |
< |
|
12427 |
< |
|
12428 |
< |
{ echo "$as_me:$LINENO: checking whether ${CXX} accepts -fstrict-aliasing" >&5 |
12429 |
< |
echo $ECHO_N "checking whether ${CXX} accepts -fstrict-aliasing... $ECHO_C" >&6; } |
12430 |
< |
if test "${ac_fstrict_aliasing+set}" = set; then |
12431 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
12432 |
< |
else |
12433 |
< |
echo 'void f(){}' > conftest.cpp |
12434 |
< |
if test -z "`${CXX} -fstrict-aliasing -c conftest.cpp 2>&1`"; then |
12435 |
< |
ac_fstrict_aliasing=yes |
12436 |
< |
else |
12437 |
< |
ac_fstrict_aliasing=no |
12438 |
< |
fi |
12439 |
< |
rm -f conftest* |
12440 |
< |
|
12441 |
< |
fi |
12442 |
< |
{ echo "$as_me:$LINENO: result: $ac_fstrict_aliasing" >&5 |
12443 |
< |
echo "${ECHO_T}$ac_fstrict_aliasing" >&6; } |
12444 |
< |
if test "$ac_fstrict_aliasing" = yes; then |
12445 |
< |
: |
12446 |
< |
CXXFLAGS="$CXXFLAGS -fstrict-aliasing" |
12447 |
< |
else |
12448 |
< |
: |
12449 |
< |
|
12450 |
< |
fi |
12451 |
< |
|
12452 |
< |
fi |
12453 |
< |
|
12454 |
< |
CPU_FLAGS="" |
12455 |
< |
if test $ac_cv_prog_really_gxx = yes; then |
12456 |
< |
case "${host_cpu}" in |
12457 |
< |
i586*) |
12458 |
< |
|
12459 |
< |
{ echo "$as_me:$LINENO: checking whether ${CXX} accepts -mcpu=pentium" >&5 |
12460 |
< |
echo $ECHO_N "checking whether ${CXX} accepts -mcpu=pentium... $ECHO_C" >&6; } |
12461 |
< |
if test "${ac_cpu_pentium+set}" = set; then |
12462 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
12463 |
< |
else |
12464 |
< |
echo 'void f(){}' > conftest.cpp |
12465 |
< |
if test -z "`${CXX} -mcpu=pentium -c conftest.cpp 2>&1`"; then |
12466 |
< |
ac_cpu_pentium=yes |
12467 |
< |
else |
12468 |
< |
ac_cpu_pentium=no |
12469 |
< |
fi |
12470 |
< |
rm -f conftest* |
12471 |
< |
|
12472 |
< |
fi |
12473 |
< |
{ echo "$as_me:$LINENO: result: $ac_cpu_pentium" >&5 |
12474 |
< |
echo "${ECHO_T}$ac_cpu_pentium" >&6; } |
12475 |
< |
if test "$ac_cpu_pentium" = yes; then |
12476 |
< |
: |
12477 |
< |
CPU_FLAGS=-mcpu=pentium |
12478 |
< |
else |
12479 |
< |
: |
12480 |
< |
|
12481 |
< |
|
12482 |
< |
{ echo "$as_me:$LINENO: checking whether ${CXX} accepts -mpentium" >&5 |
12483 |
< |
echo $ECHO_N "checking whether ${CXX} accepts -mpentium... $ECHO_C" >&6; } |
12484 |
< |
if test "${ac_pentium+set}" = set; then |
12485 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
12486 |
< |
else |
12487 |
< |
echo 'void f(){}' > conftest.cpp |
12488 |
< |
if test -z "`${CXX} -mpentium -c conftest.cpp 2>&1`"; then |
12489 |
< |
ac_pentium=yes |
12490 |
< |
else |
12491 |
< |
ac_pentium=no |
12492 |
< |
fi |
12493 |
< |
rm -f conftest* |
12494 |
< |
|
12495 |
< |
fi |
12496 |
< |
{ echo "$as_me:$LINENO: result: $ac_pentium" >&5 |
12497 |
< |
echo "${ECHO_T}$ac_pentium" >&6; } |
12498 |
< |
if test "$ac_pentium" = yes; then |
12499 |
< |
: |
12500 |
< |
CPU_FLAGS=-mpentium |
12501 |
< |
else |
12502 |
< |
: |
12503 |
< |
|
12504 |
< |
fi |
12505 |
< |
|
12506 |
< |
fi |
12507 |
< |
|
12508 |
< |
;; |
12509 |
< |
i686*) |
12510 |
< |
|
12511 |
< |
{ echo "$as_me:$LINENO: checking whether ${CXX} accepts -mcpu=pentiumpro" >&5 |
12512 |
< |
echo $ECHO_N "checking whether ${CXX} accepts -mcpu=pentiumpro... $ECHO_C" >&6; } |
12513 |
< |
if test "${ac_cpu_pentiumpro+set}" = set; then |
12514 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
12515 |
< |
else |
12516 |
< |
echo 'void f(){}' > conftest.cpp |
12517 |
< |
if test -z "`${CXX} -mcpu=pentiumpro -c conftest.cpp 2>&1`"; then |
12518 |
< |
ac_cpu_pentiumpro=yes |
12519 |
< |
else |
12520 |
< |
ac_cpu_pentiumpro=no |
12521 |
< |
fi |
12522 |
< |
rm -f conftest* |
12523 |
< |
|
12524 |
< |
fi |
12525 |
< |
{ echo "$as_me:$LINENO: result: $ac_cpu_pentiumpro" >&5 |
12526 |
< |
echo "${ECHO_T}$ac_cpu_pentiumpro" >&6; } |
12527 |
< |
if test "$ac_cpu_pentiumpro" = yes; then |
12528 |
< |
: |
12529 |
< |
CPU_FLAGS=-mcpu=pentiumpro |
12530 |
< |
else |
12531 |
< |
: |
12532 |
< |
|
12533 |
< |
|
12534 |
< |
{ echo "$as_me:$LINENO: checking whether ${CXX} accepts -mpentiumpro" >&5 |
12535 |
< |
echo $ECHO_N "checking whether ${CXX} accepts -mpentiumpro... $ECHO_C" >&6; } |
12536 |
< |
if test "${ac_pentiumpro+set}" = set; then |
12537 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
12538 |
< |
else |
12539 |
< |
echo 'void f(){}' > conftest.cpp |
12540 |
< |
if test -z "`${CXX} -mpentiumpro -c conftest.cpp 2>&1`"; then |
12541 |
< |
ac_pentiumpro=yes |
12542 |
< |
else |
12543 |
< |
ac_pentiumpro=no |
12544 |
< |
fi |
12545 |
< |
rm -f conftest* |
12546 |
< |
|
12547 |
< |
fi |
12548 |
< |
{ echo "$as_me:$LINENO: result: $ac_pentiumpro" >&5 |
12549 |
< |
echo "${ECHO_T}$ac_pentiumpro" >&6; } |
12550 |
< |
if test "$ac_pentiumpro" = yes; then |
12551 |
< |
: |
12552 |
< |
CPU_FLAGS=-mpentiumpro |
12553 |
< |
else |
12554 |
< |
: |
12555 |
< |
|
12556 |
< |
fi |
12557 |
< |
|
12558 |
< |
fi |
12559 |
< |
|
12560 |
< |
;; |
12561 |
< |
powerpc*) |
12562 |
< |
cputype=`(grep cpu /proc/cpuinfo | head -1 | cut -d: -f2 | sed 's/ //g') 2> /dev/null` |
12563 |
< |
is60x=`echo $cputype | egrep "^600-9e?$"` |
12564 |
< |
if test -n "$is60x"; then |
12565 |
< |
|
12566 |
< |
|
12567 |
< |
{ echo "$as_me:$LINENO: checking whether ${CXX} accepts -mcpu=$cputype" >&5 |
12568 |
< |
echo $ECHO_N "checking whether ${CXX} accepts -mcpu=$cputype... $ECHO_C" >&6; } |
12569 |
< |
if test "${ac_m_cpu_60x+set}" = set; then |
12570 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
12571 |
< |
else |
12572 |
< |
echo 'void f(){}' > conftest.cpp |
12573 |
< |
if test -z "`${CXX} -mcpu=$cputype -c conftest.cpp 2>&1`"; then |
12574 |
< |
ac_m_cpu_60x=yes |
12575 |
< |
else |
12576 |
< |
ac_m_cpu_60x=no |
12577 |
< |
fi |
12578 |
< |
rm -f conftest* |
12579 |
< |
|
12580 |
< |
fi |
12581 |
< |
{ echo "$as_me:$LINENO: result: $ac_m_cpu_60x" >&5 |
12582 |
< |
echo "${ECHO_T}$ac_m_cpu_60x" >&6; } |
12583 |
< |
if test "$ac_m_cpu_60x" = yes; then |
12584 |
< |
: |
12585 |
< |
CPU_FLAGS=-mcpu=$cputype |
12586 |
< |
else |
12587 |
< |
: |
12588 |
< |
|
12589 |
< |
fi |
12590 |
< |
|
12591 |
< |
elif test "$cputype" = 750; then |
12592 |
< |
|
12593 |
< |
|
12594 |
< |
{ echo "$as_me:$LINENO: checking whether we are using g++ 2.95 or later" >&5 |
12595 |
< |
echo $ECHO_N "checking whether we are using g++ 2.95 or later... $ECHO_C" >&6; } |
12596 |
< |
if test "${ac_cv_prog_gxx_2_95+set}" = set; then |
12597 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
12598 |
< |
else |
12599 |
< |
|
12600 |
< |
cat > conftest.cpp <<EOF |
12601 |
< |
#ifdef __GNUC__ && !defined (__INTEL_COMPILER) |
12602 |
< |
# if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) |
12603 |
< |
yes; |
12604 |
< |
# endif |
12605 |
< |
#endif |
12606 |
< |
EOF |
12607 |
< |
if { ac_try='${CXX-c++} -E conftest.cpp' |
12608 |
< |
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
12609 |
< |
(eval $ac_try) 2>&5 |
12610 |
< |
ac_status=$? |
12611 |
< |
echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
12612 |
< |
(exit $ac_status); }; } | egrep yes >/dev/null 2>&1; then |
12613 |
< |
ac_cv_prog_gxx_2_95=yes |
12614 |
< |
else |
12615 |
< |
ac_cv_prog_gxx_2_95=no |
12616 |
< |
fi |
12617 |
< |
|
12618 |
< |
fi |
12619 |
< |
{ echo "$as_me:$LINENO: result: $ac_cv_prog_gxx_2_95" >&5 |
12620 |
< |
echo "${ECHO_T}$ac_cv_prog_gxx_2_95" >&6; } |
12621 |
< |
if test "$ac_cv_prog_gxx_2_95" = yes; then |
12622 |
< |
: |
12623 |
< |
|
12624 |
< |
|
12625 |
< |
{ echo "$as_me:$LINENO: checking whether ${CXX} accepts -mcpu=750" >&5 |
12626 |
< |
echo $ECHO_N "checking whether ${CXX} accepts -mcpu=750... $ECHO_C" >&6; } |
12627 |
< |
if test "${ac_m_cpu_750+set}" = set; then |
12628 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
12629 |
< |
else |
12630 |
< |
echo 'void f(){}' > conftest.cpp |
12631 |
< |
if test -z "`${CXX} -mcpu=750 -c conftest.cpp 2>&1`"; then |
12632 |
< |
ac_m_cpu_750=yes |
12633 |
< |
else |
12634 |
< |
ac_m_cpu_750=no |
12635 |
< |
fi |
12636 |
< |
rm -f conftest* |
12637 |
< |
|
12638 |
< |
fi |
12639 |
< |
{ echo "$as_me:$LINENO: result: $ac_m_cpu_750" >&5 |
12640 |
< |
echo "${ECHO_T}$ac_m_cpu_750" >&6; } |
12641 |
< |
if test "$ac_m_cpu_750" = yes; then |
12642 |
< |
: |
12643 |
< |
CPU_FLAGS=-mcpu=750 |
12644 |
< |
else |
12645 |
< |
: |
12646 |
< |
|
12647 |
< |
fi |
12648 |
< |
|
12649 |
< |
else |
12650 |
< |
: |
12651 |
< |
|
12652 |
< |
fi |
12653 |
< |
|
12654 |
< |
fi |
12655 |
< |
if test -z "$CPU_FLAGS"; then |
12656 |
< |
|
12657 |
< |
|
12658 |
< |
{ echo "$as_me:$LINENO: checking whether ${CXX} accepts -mcpu=powerpc" >&5 |
12659 |
< |
echo $ECHO_N "checking whether ${CXX} accepts -mcpu=powerpc... $ECHO_C" >&6; } |
12660 |
< |
if test "${ac_m_cpu_powerpc+set}" = set; then |
12661 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
12662 |
< |
else |
12663 |
< |
echo 'void f(){}' > conftest.cpp |
12664 |
< |
if test -z "`${CXX} -mcpu=powerpc -c conftest.cpp 2>&1`"; then |
12665 |
< |
ac_m_cpu_powerpc=yes |
12666 |
< |
else |
12667 |
< |
ac_m_cpu_powerpc=no |
12668 |
< |
fi |
12669 |
< |
rm -f conftest* |
12670 |
< |
|
12671 |
< |
fi |
12672 |
< |
{ echo "$as_me:$LINENO: result: $ac_m_cpu_powerpc" >&5 |
12673 |
< |
echo "${ECHO_T}$ac_m_cpu_powerpc" >&6; } |
12674 |
< |
if test "$ac_m_cpu_powerpc" = yes; then |
12675 |
< |
: |
12676 |
< |
CPU_FLAGS=-mcpu=powerpc |
12677 |
< |
else |
12678 |
< |
: |
12679 |
< |
|
12680 |
< |
fi |
12681 |
< |
|
12682 |
< |
fi |
12683 |
< |
if test -z "$CPU_FLAGS"; then |
12684 |
< |
|
12685 |
< |
|
12686 |
< |
{ echo "$as_me:$LINENO: checking whether ${CXX} accepts -mpowerpc" >&5 |
12687 |
< |
echo $ECHO_N "checking whether ${CXX} accepts -mpowerpc... $ECHO_C" >&6; } |
12688 |
< |
if test "${ac_m_powerpc+set}" = set; then |
12689 |
< |
echo $ECHO_N "(cached) $ECHO_C" >&6 |
12690 |
< |
else |
12691 |
< |
echo 'void f(){}' > conftest.cpp |
12692 |
< |
if test -z "`${CXX} -mpowerpc -c conftest.cpp 2>&1`"; then |
12693 |
< |
ac_m_powerpc=yes |
12694 |
< |
else |
12695 |
< |
ac_m_powerpc=no |
12696 |
< |
fi |
12697 |
< |
rm -f conftest* |
12698 |
< |
|
12699 |
< |
fi |
12700 |
< |
{ echo "$as_me:$LINENO: result: $ac_m_powerpc" >&5 |
12701 |
< |
echo "${ECHO_T}$ac_m_powerpc" >&6; } |
12702 |
< |
if test "$ac_m_powerpc" = yes; then |
12703 |
< |
: |
12704 |
< |
CPU_FLAGS=-mpowerpc |
12705 |
< |
else |
12706 |
< |
: |
12707 |
< |
|
12708 |
< |
fi |
12709 |
< |
|
12710 |
< |
fi |
12711 |
< |
esac |
12076 |
> |
if test $ac_cv_prog_really_gxx = yes -a -z "$CXXFLAGS"; then |
12077 |
> |
CXXFLAGS="-O2" |
12078 |
|
fi |
12079 |
|
|
12714 |
– |
if test -n "$CPU_FLAGS"; then |
12715 |
– |
CXXFLAGS="$CXXFLAGS $CPU_FLAGS" |
12716 |
– |
fi |
12717 |
– |
|
12080 |
|
if test -z "$CXXFLAGS"; then |
12081 |
|
echo "" |
12082 |
|
echo "**********************************************************" |
12083 |
|
echo "* WARNING: Don't know the best CXXFLAGS for this system *" |
12084 |
|
echo "* Use make CXXFLAGS=..., or edit the top level Makefile *" |
12085 |
< |
echo "* (otherwise, a default of CXXFLAGS=-O3 will be used) *" |
12085 |
> |
echo "* (otherwise, a default of CXXFLAGS=-O will be used) *" |
12086 |
|
echo "**********************************************************" |
12087 |
|
echo "" |
12088 |
< |
CXXFLAGS="-O3" |
12088 |
> |
CXXFLAGS="-O" |
12089 |
|
fi |
12090 |
|
|
12091 |
|
|