
AC_DEFUN([IPP_STDCFLAGS],
[
    AC_ARG_ENABLE(optimize,
      [AS_HELP_STRING(--enable-optimize,enable compiler optimization)],
      [AC_MSG_RESULT(compile optimization enabled)
       CFLAGS="-pipe -O2 -g -DPS_NO_TRACE"],
      [AC_MSG_RESULT([compile optimization disabled])
        if test x"${CFLAGS}" == x; then
          CFLAGS="-pipe -O0 -g"
        fi
      ]
    )
])

AC_DEFUN([IPP_STDOPTS],
[
    dnl handle profiler building
    AC_ARG_ENABLE(profile, [AS_HELP_STRING(--enable-profile,enable compiler profiler information inclusion)],
      [AC_MSG_RESULT(profiling enabled, check that you also did --disable-shared)
       CFLAGS="${CFLAGS=} -pg -g"
       LDFLAGS="${LDFLAGS=} -pg"]
    )

    dnl handle path coverage checking
    AC_ARG_ENABLE(coverage,
      [AS_HELP_STRING(--enable-coverage,enable path coverage checking)],
      [AC_MSG_RESULT(path coverage enabled)
       CFLAGS="${CFLAGS=} -lgcov -fprofile-arcs -ftest-coverage -pg"]
    )

    dnl turn off trace messages
    AC_ARG_ENABLE(trace,
      [AS_HELP_STRING(--disable-trace,disable psTrace functionality)],
      [AC_MSG_RESULT(psTrace disabled)
       CFLAGS="${CFLAGS=} -DPS_NO_TRACE"]
    )
])
