File: configure.ac

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 (112 lines) | stat: -rw-r--r-- 2,856 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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# $Id$

AC_INIT(fauhdlc, CURRENT)
# don't spam /
AC_CONFIG_AUX_DIR(scripts)
AM_INIT_AUTOMAKE

AC_PROG_CC
# need c++
AC_PROG_CXX
AC_LANG(C++)
# need (f)lex
AM_PROG_LEX
AC_PROG_YACC
# need ranlib
AC_PROG_RANLIB
AC_PROG_LN_S

AC_PROG_CC_OPTION(-Wchar-subscripts)
AC_PROG_CC_OPTION(-Wcomment)
AC_PROG_CC_OPTION(-Wformat)
AC_PROG_CC_OPTION(-Wnonnull)
AC_PROG_CC_OPTION(-Wimplicit-int)
AC_PROG_CC_OPTION(-Wimplicit-function-declaration)
AC_PROG_CC_OPTION(-Wimplicit)
AC_PROG_CC_OPTION(-Wmain)
AC_PROG_CC_OPTION(-Wmissing-braces)
AC_PROG_CC_OPTION(-Wparentheses)
AC_PROG_CC_OPTION(-Wsequence-point)
AC_PROG_CC_OPTION(-Wreturn-type)
AC_PROG_CC_OPTION(-Wswitch)
AC_PROG_CC_OPTION(-Wtrigraphs)
AC_PROG_CC_OPTION(-Wunused-function)
AC_PROG_CC_OPTION(-Wunused-label)
AC_PROG_CC_OPTION(-Wunused-variable)
AC_PROG_CC_OPTION(-Wunused-value)
AC_PROG_CC_OPTION(-Wuninitialized)
AC_PROG_CC_OPTION(-Wunknown-pragmas)
AC_PROG_CC_OPTION(-Wstrict-aliasing)
AC_PROG_CC_OPTION(-Winline)
AC_PROG_CC_OPTION(-Wendif-labels)
AC_PROG_CC_OPTION(-Wshadow)
AC_PROG_CC_OPTION(-Wpointer-arith)
AC_PROG_CC_OPTION(-Wcast-qual)
AC_PROG_CC_OPTION(-Wcast-align)
AC_PROG_CC_OPTION(-Wwrite-strings)
AC_PROG_CC_OPTION(-Waggregate-return)
AC_PROG_CC_OPTION(-Wstrict-prototypes)
AC_PROG_CC_OPTION(-Wnested-externs)
# FIXME doesn't exist
#AC_PROG_CC_OPTION(-Wno-unused-result)
AC_PROG_CC_OPTION(-fPIC)
AC_PROG_CC_OPTION(-fvisibility=hidden)
AC_PROG_CC_OPTION(-U_FORTIFY_SOURCE)

# enable g++ checks (will be part of $CXX)
AC_PROG_CXX_OPTION(-Wall)
AC_PROG_CXX_OPTION(-Wextra)
AC_PROG_CXX_OPTION(-Wendif-labels)
AC_PROG_CXX_OPTION(-Wshadow)
AC_PROG_CXX_OPTION(-Wpointer-arith)
AC_PROG_CXX_OPTION(-Wcast-qual)
AC_PROG_CXX_OPTION(-Wcast-align)
AC_PROG_CXX_OPTION(-Wwrite-strings)
AC_PROG_CXX_OPTION(-Wstrict-aliasing)
AC_PROG_CXX_OPTION(-Wsign-compare)
AC_PROG_CXX_OPTION(-Wconversion)
AC_PROG_CXX_OPTION(-Wwrite-strings)
AC_PROG_CXX_OPTION(-Wno-unused-parameter)
AC_PROG_CXX_OPTION(-Wold-style-cast)
AC_PROG_CXX_OPTION(-U_FORTIFY_SOURCE)


AC_ARG_ENABLE(Werror,
	AS_HELP_STRING([--disable-Werror],[disable build with Werror]),
	[], [disable_Werror=no])

if test "$disable_Werror" = "no"; then
AC_PROG_CXX_OPTION(-Werror)
AC_PROG_CC_OPTION(-Werror)
fi

# for <cstdint>. Doesn't work on osx yet :/
#AC_PROG_CXX_OPTION(-std=c++0x)

AC_CHECK_HEADERS(gc/gc_cpp.h, 
		[GCCPPLDFLAGS="-lgccpp -lgc"], 
		[AC_MSG_WARN([Please use libgc])])
AC_CHECK_LIB([gc], [GC_malloc], [true], 
		[AC_MSG_WARN([Please use libgc])])
AC_SUBST([GCCPPLDFLAGS])
AC_CHECK_PROGS(XMLTO, xmlto)
if test -z "$XMLTO"; then
	AC_MSG_ERROR([xmlto not found.])
fi

AC_CHECK_PROGS(CPPCHECK, cppcheck, false --)

# we want these Makefiles
AC_CONFIG_FILES([\
	Makefile
	frontend/newparser/Makefile
	tests/Makefile
	interpreter/Makefile
	lib/Makefile
	doc/Makefile
	doc/man/Makefile
	misc/Makefile
])

# finally create the Makefiles
AC_OUTPUT()