Skip to content
Snippets Groups Projects

Merged in new upstream version of the maxopt autotools macros that fixes the…

Merged Matthieu Schaller requested to merge autotools_macro_updates into master
2 files
+ 14
22
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 13
15
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_cc_maxopt.html
# https://www.gnu.org/software/autoconf-archive/ax_cc_maxopt.html
# ===========================================================================
#
# SYNOPSIS
@@ -40,7 +40,7 @@
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
# with this program. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
@@ -55,7 +55,7 @@
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 16
#serial 18
AC_DEFUN([AX_CC_MAXOPT],
[
@@ -68,19 +68,18 @@ AC_ARG_ENABLE(portable-binary, [AS_HELP_STRING([--enable-portable-binary], [disa
# Try to determine "good" native compiler flags if none specified via CFLAGS
if test "$ac_test_CFLAGS" != "set"; then
CFLAGS=""
case $ax_cv_c_compiler_vendor in
dec) CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host"
dec) CFLAGS="$CFLAGS -newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host"
if test "x$acx_maxopt_portable" = xno; then
CFLAGS="$CFLAGS -arch host"
fi;;
sun) CFLAGS="-native -fast -xO5 -dalign"
sun) CFLAGS="$CFLAGS -native -fast -xO5 -dalign"
if test "x$acx_maxopt_portable" = xyes; then
CFLAGS="$CFLAGS -xarch=generic"
fi;;
hp) CFLAGS="+Oall +Optrs_ansi +DSnative"
hp) CFLAGS="$CFLAGS +Oall +Optrs_ansi +DSnative"
if test "x$acx_maxopt_portable" = xyes; then
CFLAGS="$CFLAGS +DAportable"
fi;;
@@ -91,8 +90,8 @@ if test "$ac_test_CFLAGS" != "set"; then
xlc_opt="-qtune=auto"
fi
AX_CHECK_COMPILE_FLAG($xlc_opt,
CFLAGS="-O3 -qansialias -w $xlc_opt",
[CFLAGS="-O3 -qansialias -w"
CFLAGS="$CFLAGS -O3 -qansialias -w $xlc_opt",
[CFLAGS="$CFLAGS -O3 -qansialias -w"
echo "******************************************************"
echo "* You seem to have the IBM C compiler. It is *"
echo "* recommended for best performance that you use: *"
@@ -105,7 +104,7 @@ if test "$ac_test_CFLAGS" != "set"; then
echo "******************************************************"])
;;
intel) CFLAGS="-O3 -ansi-alias"
intel) CFLAGS="$CFLAGS -O3 -ansi-alias"
if test "x$acx_maxopt_portable" = xno; then
icc_archflag=unknown
icc_flags=""
@@ -151,7 +150,7 @@ if test "$ac_test_CFLAGS" != "set"; then
clang)
# default optimization flags for clang on all systems
CFLAGS="-O3 -fomit-frame-pointer"
CFLAGS="$CFLAGS -O3 -fomit-frame-pointer"
# Always good optimisation to have
AX_CHECK_COMPILE_FLAG(-fstrict-aliasing, CFLAGS="$CFLAGS -fstrict-aliasing")
@@ -167,7 +166,7 @@ if test "$ac_test_CFLAGS" != "set"; then
gnu)
# default optimization flags for gcc on all systems
CFLAGS="-O3 -fomit-frame-pointer"
CFLAGS="$CFLAGS -O3 -fomit-frame-pointer"
# -malign-double for x86 systems
AX_CHECK_COMPILE_FLAG(-malign-double, CFLAGS="$CFLAGS -malign-double")
@@ -187,7 +186,7 @@ if test "$ac_test_CFLAGS" != "set"; then
microsoft)
# default optimization flags for MSVC opt builds
CFLAGS="-O2"
CFLAGS="$CFLAGS -O2"
;;
esac
@@ -199,7 +198,7 @@ if test "$ac_test_CFLAGS" != "set"; then
echo "* (otherwise, a default of CFLAGS=-O3 will be used) *"
echo "********************************************************"
echo ""
CFLAGS="-O3"
CFLAGS="$CFLAGS -O3"
fi
AX_CHECK_COMPILE_FLAG($CFLAGS, [], [
@@ -210,7 +209,6 @@ if test "$ac_test_CFLAGS" != "set"; then
echo "* Use ./configure CFLAGS=... to specify your own flags *"
echo "********************************************************"
echo ""
CFLAGS=""
])
fi
Loading