File: acinclude.m4

package info (click to toggle)
fauhdlc 20180504-2
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,956 kB
  • sloc: cpp: 23,188; ansic: 6,077; yacc: 3,764; lex: 763; makefile: 605; sh: 494; xml: 403
file content (39 lines) | stat: -rw-r--r-- 986 bytes parent folder | download | duplicates (4)
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
30
31
32
33
34
35
36
37
38
39
dnl usage: AC_PROG_CXX_OPTION(--compiler-option, if-supported, if-unsupported)
dnl add this option to $(CXX) if it is supported by the compiler
dnl if no sc
dnl Martin Waitz <tali@admingilde.org>, modified by Stefan Potyra
AC_DEFUN([AC_PROG_CXX_OPTION], [
	AC_MSG_CHECKING([whether $CXX supports $1])
	ac_save_CXX="$CXX"
	CXX="$CXX $1"
	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],[
		AC_MSG_RESULT([yes])
		ifelse($2, , [], [
		CXX="$ac_save_CXX"
		$2])
	], [
		AC_MSG_RESULT([no])
		CXX="$ac_save_CXX"
		$3
	])
])

dnl usage: AC_PROG_CC_OPTION(--compiler-option, if-supported, if-unsupported)
dnl add this option to $(CC) if it is supported by the compiler
dnl if no sc
dnl Martin Waitz <tali@admingilde.org>
AC_DEFUN([AC_PROG_CC_OPTION], [
	AC_MSG_CHECKING([whether $CC supports $1])
	ac_save_CC="$CC"
	CC="$CC $1"
	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],[
		AC_MSG_RESULT([yes])
		ifelse($2, , [], [
		CC="$ac_save_CC"
		$2])
	], [
		AC_MSG_RESULT([no])
		CC="$ac_save_CC"
		$3
	])
])