File: ac_c_cxx_compile_flags.m4

package info (click to toggle)
libheif 1.15.1-1%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,080 kB
  • sloc: cpp: 37,383; sh: 5,186; python: 3,032; ansic: 454; makefile: 406; javascript: 249
file content (22 lines) | stat: -rw-r--r-- 405 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
AC_DEFUN([AC_C_CXX_COMPILE_FLAGS],[
NEW_CFLAGS="$CFLAGS"
NEW_CXXFLAGS="$CXXFLAGS"
for ac_flag in $1
do
 AC_MSG_CHECKING(whether compiler supports $ac_flag)
 CXXFLAGS="$NEW_CXXFLAGS $ac_flag"
 AC_LANG(C++)
 AC_TRY_COMPILE(,[
  ;
 ],[

  NEW_CFLAGS="$NEW_CFLAGS $ac_flag"
  NEW_CXXFLAGS="$NEW_CXXFLAGS $ac_flag"

  AC_MSG_RESULT(yes)
 ],AC_MSG_RESULT(no))
done

CFLAGS=$NEW_CFLAGS
CXXFLAGS=$NEW_CXXFLAGS
])