-dnl Copyright (C) 2009 Sun Microsystems
-dnl This file is free software; Sun Microsystems
+dnl Copyright (C) 2009 Sun Microsystems, Inc.
+dnl This file is free software; Sun Microsystems, Inc.
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([PANDORA_OPTIMIZE],[
dnl Build optimized or debug version ?
dnl First check for gcc and g++
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([PANDORA_OPTIMIZE],[
dnl Build optimized or debug version ?
dnl First check for gcc and g++
dnl The following is required for portable results of floating point
dnl calculations on PowerPC. The same must also be done for IA-64, but
dnl The following is required for portable results of floating point
dnl calculations on PowerPC. The same must also be done for IA-64, but
- AM_CPPFLAGS="-ggdb3 ${AM_CPPFLAGS}"
+ OPTIMIZE_CFLAGS="-O2"
+ OPTIMIZE_CXXFLAGS="-O2"
+ ])
+ AS_IF([test "$INTELCC" = "yes"],[
+ AM_CPPFLAGS="-g ${AM_CPPFLAGS}"
])
AS_IF([test "$SUNCC" = "yes"],[
dnl Once we can use a modern autoconf, we can replace the -xc99=all here
])
AS_IF([test "$SUNCC" = "yes"],[
dnl Once we can use a modern autoconf, we can replace the -xc99=all here
# Debugging. No optimization.
AM_CFLAGS="${AM_CFLAGS} ${DEBUG_CFLAGS} -DDEBUG"
AM_CXXFLAGS="${AM_CXXFLAGS} ${DEBUG_CXXFLAGS} -DDEBUG"
# Debugging. No optimization.
AM_CFLAGS="${AM_CFLAGS} ${DEBUG_CFLAGS} -DDEBUG"
AM_CXXFLAGS="${AM_CXXFLAGS} ${DEBUG_CXXFLAGS} -DDEBUG"
],[
# Optimized version. No debug
AM_CFLAGS="${AM_CFLAGS} ${OPTIMIZE_CFLAGS}"
AM_CXXFLAGS="${AM_CXXFLAGS} ${OPTIMIZE_CXXFLAGS}"
],[
# Optimized version. No debug
AM_CFLAGS="${AM_CFLAGS} ${OPTIMIZE_CFLAGS}"
AM_CXXFLAGS="${AM_CXXFLAGS} ${OPTIMIZE_CXXFLAGS}"