]> mj.ucw.cz Git - libucw.git/blob - lib/autoconf.cfg
Added first pieces of the new configuration mechanism. (Not connected
[libucw.git] / lib / autoconf.cfg
1 # Automatic configuration of the UCW Library
2 # (c) 2005 Martin Mares <mj@ucw.cz>
3
4 Set("CC" => "gcc-3.0");
5
6 # C flags: tell the compiler we're speaking C99
7 Set("CLANG" => "-std=gnu99");
8
9 # C optimizations
10 Set("COPT" => '-O2 -fstrict-aliasing -march=$(CPU_ARCH)');
11
12 # C optimizations for highly exposed code
13 Set("COPT2" => '-O3');
14
15 # Warnings
16 Set("CWARNS" => '-Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Winline');
17
18 # Linker flags
19 Set("LOPT" => "");
20
21 # Extra libraries
22 Set("LIBS" => "");
23
24 # Extra flags for compiling and linking shared libraries
25 Set("CSHARED" => '-fPIC');
26 Set("LSHARED" => '-shared -Wl,-soname,lib/$(@F)');
27
28 # Extra switches depending on GCC version:
29 # [FIXME]
30 #GCCVER:=$(shell $(CC) --version | sed '2,$$d; s/^\(.* \)\?\([0-9]*\.[0-9]*\).*/\2/')
31 #ifeq ($(GCCVER),3.3)
32 #CWARNS+=-Wundef -Wredundant-decls
33 #COPT+=-finline-limit=20000 --param max-inline-insns-auto=1000
34 #endif
35 #ifeq ($(GCCVER),3.4)
36 #CWARNS+=-Wundef -Wredundant-decls
37 #COPT+=-finline-limit=5000 --param large-function-insns=5000 --param inline-unit-growth=200 --param large-function-growth=400
38 #endif
39
40 # If debugging:
41 Set("CDEBUG" => '-DDEBUG_ASSERTS -ggdb');
42 #CDEBUG+=-DDEBUG_DIE_BY_ABORT
43
44 # If debugging memory allocations:
45 #LIBS+=-lefence
46 #CDEBUG+=-DDEBUG_DMALLOC
47 #LIBS+=-ldmalloc
48
49 # If building release versions:
50 #CDEBUG=
51 #COPT+=-fomit-frame-pointer
52 #LOPT+=-s
53
54 ### CPU Type and Features ###
55
56 Set("CPU_ARCH" => 'i686');
57 Set("CPU_I386");
58 Set("CPU_LITTLE_ENDIAN");
59 #CPU_BIG_ENDIAN=1
60 Set("CPU_ALLOW_UNALIGNED");
61 Set("CPU_STRUCT_ALIGN" => 4);
62 Set("CPU_64BIT_POINTERS");
63
64 ### OS Type ###
65
66 Set("CONFIG_LINUX");
67
68 # Return success
69 1;