File: opt.m4

package info (click to toggle)
comptty 1.0.1-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 812 kB
  • sloc: sh: 3,842; cpp: 768; makefile: 109; ansic: 17
file content (29 lines) | stat: -rw-r--r-- 924 bytes parent folder | download | duplicates (22)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
AC_DEFUN([AC_FL_OPT], [
  AC_ARG_ENABLE([optimizations],
		AC_HELP_STRING([--enable-optimizations],
		               [use x86 optimizations (none|sse|sse2|sse3|native) @<:@none@:>@]),
                [case "${enableval}" in
                  none|sse|sse2|sse3|native) ac_cv_opt="${enableval}" ;;
                  *)                         AC_MSG_ERROR([bad value ${enableval} for --enable-optimizations]) ;;
                 esac],
                 [ac_cv_opt=none])
  OPT_CFLAGS="-O2 -ffast-math -finline-functions -fomit-frame-pointer"
  case "$ac_cv_opt" in
      sse)
          OPT_CFLAGS="$OPT_CFLAGS -msse -mfpmath=sse"
	  ;;
      sse2)
          OPT_CFLAGS="$OPT_CFLAGS -msse2 -mfpmath=sse"
	  ;;
      sse3)
          OPT_CFLAGS="$OPT_CFLAGS -msse3 -mfpmath=sse"
	  ;;
      native)
          OPT_CFLAGS="$OPT_CFLAGS -march=native -mfpmath=sse"
	  ;;
      none)
          ;;
  esac

  AC_SUBST([OPT_CFLAGS])
])