Merge lp:~mordred/libcpuinfo/add-perl-support into lp:libcpuinfo
- add-perl-support
- Merge into trunk
Proposed by
Monty Taylor
Status: | Needs review |
---|---|
Proposed branch: | lp:~mordred/libcpuinfo/add-perl-support |
Merge into: | lp:libcpuinfo |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~mordred/libcpuinfo/add-perl-support |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
libcpuinfo developers | Pending | ||
Review via email: mp+11395@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Unmerged revisions
- 13. By Monty Taylor
-
Added python3 swig support macro call.
- 12. By Monty Taylor
-
Added Lua support.
- 11. By Monty Taylor
-
Added python3 support
- 10. By Monty Taylor
-
Added support for Perl.
Use installed version of pandora-build and don't copy the files in.
Rearranged a few things.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === renamed file 'AUTHORS.txt' => 'AUTHORS' | |||
2 | --- AUTHORS.txt 2009-06-14 10:25:20 +0000 | |||
3 | +++ AUTHORS 2009-08-23 00:03:39 +0000 | |||
4 | @@ -3,3 +3,5 @@ | |||
5 | 3 | 3 | ||
6 | 4 | Robert Collins, 2009 | 4 | Robert Collins, 2009 |
7 | 5 | Matthew Fuller, 2009 | 5 | Matthew Fuller, 2009 |
8 | 6 | Monty Taylor, 2009 | ||
9 | 7 | Stewart Smith, 2009 | ||
10 | 6 | 8 | ||
11 | === added file 'ChangeLog' | |||
12 | === modified file 'Makefile.am' | |||
13 | --- Makefile.am 2009-07-14 07:51:56 +0000 | |||
14 | +++ Makefile.am 2009-08-23 22:30:03 +0000 | |||
15 | @@ -5,9 +5,10 @@ | |||
16 | 5 | # licence. Please see COPYING.txt distributed with the source code for | 5 | # licence. Please see COPYING.txt distributed with the source code for |
17 | 6 | # details. | 6 | # details. |
18 | 7 | 7 | ||
20 | 8 | ACLOCAL_AMFLAGS = -I acinclude -I m4 | 8 | ACLOCAL_AMFLAGS = -I acinclude |
21 | 9 | BUILT_SOURCES= | 9 | BUILT_SOURCES= |
22 | 10 | CLEANFILES= | 10 | CLEANFILES= |
23 | 11 | DISTCLEANFILES= | ||
24 | 11 | EXTRA_DIST = libcpuinfo.pc.in AUTHORS.txt COPYING.txt INSTALL.txt interface/cpuinfo.i | 12 | EXTRA_DIST = libcpuinfo.pc.in AUTHORS.txt COPYING.txt INSTALL.txt interface/cpuinfo.i |
25 | 12 | 13 | ||
26 | 13 | ## install libcpuinfo.pc | 14 | ## install libcpuinfo.pc |
27 | @@ -38,41 +39,120 @@ | |||
28 | 38 | pyexec_LTLIBRARIES= | 39 | pyexec_LTLIBRARIES= |
29 | 39 | python_PYTHON= | 40 | python_PYTHON= |
30 | 40 | if BUILD_PYTHON | 41 | if BUILD_PYTHON |
49 | 41 | BUILT_SOURCES += cpuinfo_python.c cpuinfo.py | 42 | BUILT_SOURCES += python/_cpuinfo.c python/cpuinfo.py python/_cpuinfo.so |
50 | 42 | EXTRA_DIST += cpuinfo_python.c cpuinfo.py | 43 | EXTRA_DIST += python/_cpuinfo.c python/cpuinfo.py |
51 | 43 | CLEANFILES += cpuinfo_python.c cpuinfo.py | 44 | DISTCLEANFILES += python/_cpuinfo.c python/cpuinfo.py |
52 | 44 | pyexec_LTLIBRARIES += pycpuinfo.la | 45 | pyexec_LTLIBRARIES += python/_cpuinfo.la |
53 | 45 | python_PYTHON += cpuinfo.py | 46 | python_PYTHON += python/cpuinfo.py |
54 | 46 | 47 | ||
55 | 47 | pycpuinfo_la_CPPFLAGS= ${AM_CPPFLAGS} ${PYTHON_CPPFLAGS} | 48 | python__cpuinfo_la_CPPFLAGS= ${AM_CPPFLAGS} ${PYTHON_CPPFLAGS} |
56 | 48 | pycpuinfo_la_CFLAGS= | 49 | python__cpuinfo_la_CFLAGS= |
57 | 49 | pycpuinfo_la_SOURCES= cpuinfo_python.c | 50 | python__cpuinfo_la_SOURCES= python/_cpuinfo.c |
58 | 50 | pycpuinfo_la_LDFLAGS = -avoid-version -module ${PYTHON_LDFLAGS} | 51 | python__cpuinfo_la_LDFLAGS = -avoid-version -module -disable-static ${PYTHON_LDFLAGS} |
59 | 51 | pycpuinfo_la_LIBADD= libcpuinfo.la | 52 | python__cpuinfo_la_LIBADD= libcpuinfo.la |
60 | 52 | endif | 53 | endif |
61 | 53 | 54 | ||
62 | 54 | cpuinfo.py: cpuinfo_python.c | 55 | python/_cpuinfo.so: |
63 | 55 | 56 | @rm -f python/_cpuinfo.so | |
64 | 56 | cpuinfo_python.c: interface/cpuinfo.i | 57 | @ln -s .libs/_cpuinfo.so python/_cpuinfo.so |
65 | 57 | ${SWIG} -python -O -interface pycpuinfo -o $@ $< | 58 | |
66 | 58 | 59 | python/cpuinfo.py: python/_cpuinfo.c | |
67 | 60 | |||
68 | 61 | python/_cpuinfo.c: interface/cpuinfo.i | ||
69 | 62 | ${SWIG} -python -O -outdir python -interface _cpuinfo -o $@ $< | ||
70 | 63 | |||
71 | 64 | python3dir= ${PYTHON3_SITE_PKG} | ||
72 | 65 | python3_LTLIBRARIES= | ||
73 | 66 | python3_DATA= | ||
74 | 67 | if BUILD_PYTHON3 | ||
75 | 68 | BUILT_SOURCES += python3/_cpuinfo.c python3/cpuinfo.py python3/_cpuinfo.so | ||
76 | 69 | EXTRA_DIST += python3/_cpuinfo.c python3/cpuinfo.py | ||
77 | 70 | DISTCLEANFILES += python3/_cpuinfo.c python3/cpuinfo.py | ||
78 | 71 | python3_LTLIBRARIES += python3/_cpuinfo.la | ||
79 | 72 | python3_DATA += python3/cpuinfo.py | ||
80 | 73 | |||
81 | 74 | python3__cpuinfo_la_CPPFLAGS= ${AM_CPPFLAGS} ${PYTHON3_CPPFLAGS} | ||
82 | 75 | python3__cpuinfo_la_CFLAGS= | ||
83 | 76 | python3__cpuinfo_la_SOURCES= python3/_cpuinfo.c | ||
84 | 77 | python3__cpuinfo_la_LDFLAGS = -avoid-version -module -disable-static ${PYTHON3_LDFLAGS} | ||
85 | 78 | python3__cpuinfo_la_LIBADD= libcpuinfo.la | ||
86 | 79 | endif | ||
87 | 80 | |||
88 | 81 | python3/_cpuinfo.so: | ||
89 | 82 | @rm -f python3/_cpuinfo.so | ||
90 | 83 | @ln -s .libs/_cpuinfo.so python3/_cpuinfo.so | ||
91 | 84 | |||
92 | 85 | python3/cpuinfo.py: python3/_cpuinfo.c | ||
93 | 86 | |||
94 | 87 | python3/_cpuinfo.c: interface/cpuinfo.i | ||
95 | 88 | ${SWIG} -python -py3 -O -outdir python3 -interface _cpuinfo -o $@ $< | ||
96 | 89 | |||
97 | 90 | luaarchdir=${LUA_ARCHDIR} | ||
98 | 91 | luaarch_LTLIBRARIES= | ||
99 | 92 | if BUILD_LUA | ||
100 | 93 | BUILT_SOURCES+= lua/cpuinfo.c lua/cpuinfo.so | ||
101 | 94 | EXTRA_DIST+= lua/cpuinfo.c | ||
102 | 95 | DISTCLEANFILES+= lua/cpuinfo.c | ||
103 | 96 | luaarch_LTLIBRARIES+= lua/cpuinfo.la | ||
104 | 97 | |||
105 | 98 | lua_cpuinfo_la_SOURCES= lua/cpuinfo.c | ||
106 | 99 | lua_cpuinfo_la_CFLAGS= ${LUA_CFLAGS} | ||
107 | 100 | lua_cpuinfo_la_LDFLAGS= -module -avoid-version -disable-static ${LUA_LDFLAGS} | ||
108 | 101 | lua_cpuinfo_la_LIBADD= libcpuinfo.la | ||
109 | 102 | endif | ||
110 | 103 | |||
111 | 104 | lua/cpuinfo.so: | ||
112 | 105 | @rm -f lua/cpuinfo.so | ||
113 | 106 | @ln -s .libs/cpuinfo.so lua/cpuinfo.so | ||
114 | 107 | |||
115 | 108 | lua/cpuinfo.c: interface/cpuinfo.i | ||
116 | 109 | $(SWIG) -lua -o $@ $< | ||
117 | 110 | |||
118 | 111 | perldir= ${PERL_ARCHDIR}/auto | ||
119 | 112 | perlpmdir= ${PERL_ARCHDIR} | ||
120 | 113 | perl_LTLIBRARIES= | ||
121 | 114 | if BUILD_PERL | ||
122 | 115 | BUILT_SOURCES += perl/cpuinfo.c perl/cpuinfo.pm perl/cpuinfo.so | ||
123 | 116 | EXTRA_DIST += perl/cpuinfo.c perl/cpuinfo.pm | ||
124 | 117 | DISTCLEANFILES += perl/cpuinfo.c perl/cpuinfo.pm | ||
125 | 118 | perl_LTLIBRARIES += perl/cpuinfo.la | ||
126 | 119 | perlpm_DATA = perl/cpuinfo.pm | ||
127 | 120 | |||
128 | 121 | perl_cpuinfo_la_CPPFLAGS= ${AM_CPPFLAGS} ${PERL_CPPFLAGS} | ||
129 | 122 | perl_cpuinfo_la_CFLAGS= | ||
130 | 123 | perl_cpuinfo_la_SOURCES= perl/cpuinfo.c | ||
131 | 124 | perl_cpuinfo_la_LDFLAGS= -avoid-version -module -disable-static | ||
132 | 125 | perl_cpuinfo_la_LIBADD= libcpuinfo.la | ||
133 | 126 | endif | ||
134 | 127 | |||
135 | 128 | # we need to symlink in to the libtool dir for local testing. | ||
136 | 129 | perl/cpuinfo.so: | ||
137 | 130 | @rm -f perl/cpuinfo.so | ||
138 | 131 | @ln -s .libs/cpuinfo.so perl/cpuinfo.so | ||
139 | 132 | |||
140 | 133 | perl/cpuinfo.c: interface/cpuinfo.i | ||
141 | 134 | ${SWIG} -perl -o $@ $< | ||
142 | 59 | 135 | ||
143 | 60 | rubydir= ${RUBY_DIR} | 136 | rubydir= ${RUBY_DIR} |
144 | 61 | ruby_LTLIBRARIES= | 137 | ruby_LTLIBRARIES= |
145 | 62 | if BUILD_RUBY | 138 | if BUILD_RUBY |
150 | 63 | BUILT_SOURCES += cpuinfo_ruby.c | 139 | BUILT_SOURCES += ruby/cpuinfo.c ruby/cpuinfo.so |
151 | 64 | EXTRA_DIST += cpuinfo_ruby.c | 140 | EXTRA_DIST += ruby/cpuinfo.c |
152 | 65 | CLEANFILES += cpuinfo_ruby.c | 141 | DISTCLEANFILES += ruby/cpuinfo.c |
153 | 66 | ruby_LTLIBRARIES += rubycpuinfo.la | 142 | ruby_LTLIBRARIES += ruby/cpuinfo.la |
154 | 67 | 143 | ||
160 | 68 | rubycpuinfo_la_CPPFLAGS= ${AM_CPPFLAGS} ${RUBY_INCLUDES} | 144 | ruby_cpuinfo_la_CPPFLAGS= ${AM_CPPFLAGS} ${RUBY_INCLUDES} |
161 | 69 | rubycpuinfo_la_CFLAGS= | 145 | ruby_cpuinfo_la_CFLAGS= |
162 | 70 | rubycpuinfo_la_SOURCES= cpuinfo_ruby.c | 146 | ruby_cpuinfo_la_SOURCES= ruby/cpuinfo.c |
163 | 71 | rubycpuinfo_la_LDFLAGS = -avoid-version -module ${RUBY_LDFLAGS} | 147 | ruby_cpuinfo_la_LDFLAGS = -avoid-version -module ${RUBY_LDFLAGS} |
164 | 72 | rubycpuinfo_la_LIBADD= libcpuinfo.la | 148 | ruby_cpuinfo_la_LIBADD= libcpuinfo.la |
165 | 73 | 149 | ||
166 | 74 | endif | 150 | endif |
167 | 75 | 151 | ||
170 | 76 | cpuinfo_ruby.c: interface/cpuinfo.i | 152 | ruby/cpuinfo.so: |
171 | 77 | ${SWIG} -ruby -o $@ $< | 153 | @rm -f ruby/cpuinfo.so |
172 | 154 | @ln -s .libs/cpuinfo.so ruby/cpuinfo.so | ||
173 | 155 | |||
174 | 156 | ruby/cpuinfo.c: interface/cpuinfo.i | ||
175 | 157 | ${SWIG} -ruby -autorename -o $@ $< | ||
176 | 78 | 158 | ||
177 | 79 | 159 | ||
178 | === modified file 'README' | |||
179 | --- README 2009-07-14 07:53:26 +0000 | |||
180 | +++ README 2009-08-23 00:03:39 +0000 | |||
181 | @@ -16,10 +16,16 @@ | |||
182 | 16 | 16 | ||
183 | 17 | Various language bindings bring in their own more complex dependencies. | 17 | Various language bindings bring in their own more complex dependencies. |
184 | 18 | 18 | ||
189 | 19 | When building from bzr libtool, autoconf, automake, swig and some macros from | 19 | To build libcpuinfo from bzr, libtool, autoconf, automake are needed. |
190 | 20 | autoconf-archive are needed. These are not needed when building from a release | 20 | Additionally, pandora-build and some macros from autoconf-archive are used. |
191 | 21 | (a tar or zip file). The relevant development packages for any languages you | 21 | pandora-build can be found at http://launchpad.net/pandora-build. |
192 | 22 | want to support are also a build-time dependency. | 22 | autoconf-archive can be found either at http://www.nongnu.org/autoconf-archive/ |
193 | 23 | or in OS packages such as the Ubuntu/Debian package autoconf-archive. | ||
194 | 24 | |||
195 | 25 | These are not needed when building from a release (a tar or zip file). | ||
196 | 26 | |||
197 | 27 | The relevant development packages for any languages you want to support are | ||
198 | 28 | also a build-time dependency. | ||
199 | 23 | 29 | ||
200 | 24 | Design Goals | 30 | Design Goals |
201 | 25 | ************ | 31 | ************ |
202 | 26 | 32 | ||
203 | === modified file 'configure.ac' | |||
204 | --- configure.ac 2009-07-14 07:30:23 +0000 | |||
205 | +++ configure.ac 2009-08-24 15:41:57 +0000 | |||
206 | @@ -15,38 +15,14 @@ | |||
207 | 15 | AC_INIT([libcpuinfo], [CPUINFO_VERSION], [libcpuinfo-dev@lists.launchpad.net]) | 15 | AC_INIT([libcpuinfo], [CPUINFO_VERSION], [libcpuinfo-dev@lists.launchpad.net]) |
208 | 16 | AC_CONFIG_SRCDIR([cpuinfo/cpuinfo.h]) | 16 | AC_CONFIG_SRCDIR([cpuinfo/cpuinfo.h]) |
209 | 17 | AC_CONFIG_AUX_DIR([autotools]) | 17 | AC_CONFIG_AUX_DIR([autotools]) |
210 | 18 | |||
211 | 19 | # We need to prevent canonical target | ||
212 | 20 | # from injecting -O2 into CFLAGS - but we won't modify anything if we have | ||
213 | 21 | # set CFLAGS on the command line, since that should take ultimate precedence | ||
214 | 22 | AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"], | ||
215 | 23 | [CFLAGS=""]) | ||
216 | 24 | AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"], | ||
217 | 25 | [CXXFLAGS=""]) | ||
218 | 26 | |||
219 | 27 | AC_CANONICAL_TARGET | ||
220 | 28 | AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) | ||
221 | 29 | AC_CONFIG_MACRO_DIR([acinclude]) | 18 | AC_CONFIG_MACRO_DIR([acinclude]) |
222 | 30 | 19 | ||
223 | 20 | PANDORA_CANONICAL_TARGET(ignore-shared-ptr warnings-always-on) | ||
224 | 21 | |||
225 | 31 | AC_DEFINE([CPUINFO_MAJOR_VERSION],LIBCPUINFO_MAJOR_VERSION,[Major version]) | 22 | AC_DEFINE([CPUINFO_MAJOR_VERSION],LIBCPUINFO_MAJOR_VERSION,[Major version]) |
226 | 32 | AC_DEFINE([CPUINFO_MINOR_VERSION],LIBCPUINFO_MINOR_VERSION,[Minor version]) | 23 | AC_DEFINE([CPUINFO_MINOR_VERSION],LIBCPUINFO_MINOR_VERSION,[Minor version]) |
227 | 33 | AC_DEFINE([CPUINFO_MICRO_VERSION],LIBCPUINFO_MICRO_VERSION,[Micro version]) | 24 | AC_DEFINE([CPUINFO_MICRO_VERSION],LIBCPUINFO_MICRO_VERSION,[Micro version]) |
228 | 34 | 25 | ||
229 | 35 | |||
230 | 36 | AC_PROG_CC_C99 | ||
231 | 37 | AM_PROG_CC_C_O | ||
232 | 38 | |||
233 | 39 | AC_USE_SYSTEM_EXTENSIONS | ||
234 | 40 | |||
235 | 41 | # We use libtool | ||
236 | 42 | LT_INIT | ||
237 | 43 | LT_LANG(C) | ||
238 | 44 | LT_LANG(C++) | ||
239 | 45 | |||
240 | 46 | |||
241 | 47 | AC_PROG_INSTALL | ||
242 | 48 | AC_PROG_LN_S | ||
243 | 49 | |||
244 | 50 | # Checks for libraries. | 26 | # Checks for libraries. |
245 | 51 | 27 | ||
246 | 52 | # Checks for header files. | 28 | # Checks for header files. |
247 | @@ -54,10 +30,7 @@ | |||
248 | 54 | AC_CHECK_HEADERS([sys/sysctl.h]) | 30 | AC_CHECK_HEADERS([sys/sysctl.h]) |
249 | 55 | 31 | ||
250 | 56 | # Checks for typedefs, structures, and compiler characteristics. | 32 | # Checks for typedefs, structures, and compiler characteristics. |
251 | 57 | AC_C_CONST | ||
252 | 58 | AC_TYPE_PID_T | 33 | AC_TYPE_PID_T |
253 | 59 | AC_TYPE_SIZE_T | ||
254 | 60 | AC_HEADER_TIME | ||
255 | 61 | AC_STRUCT_TM | 34 | AC_STRUCT_TM |
256 | 62 | 35 | ||
257 | 63 | AC_CHECK_SIZEOF(int, 4) | 36 | AC_CHECK_SIZEOF(int, 4) |
258 | @@ -65,80 +38,17 @@ | |||
259 | 65 | AC_CHECK_SIZEOF(long, 4) | 38 | AC_CHECK_SIZEOF(long, 4) |
260 | 66 | 39 | ||
261 | 67 | # Checks for library functions. | 40 | # Checks for library functions. |
262 | 68 | AC_FUNC_MALLOC | ||
263 | 69 | AC_FUNC_REALLOC | ||
264 | 70 | AC_CHECK_FUNCS(sysctlbyname) | 41 | AC_CHECK_FUNCS(sysctlbyname) |
265 | 71 | 42 | ||
336 | 72 | 43 | PANDORA_SWIG | |
337 | 73 | AC_DEFINE([SWIG_TYPE_TABLE],[cpuinfo],[Type Table name for SWIG symbol table]) | 44 | PANDORA_SWIG_PYTHON3 |
338 | 74 | 45 | ||
339 | 75 | AC_PROG_SWIG(1.3.31) | 46 | PANDORA_WITH_LUA |
340 | 76 | AC_SUBST(SWIG) | 47 | PANDORA_WITH_PERL |
341 | 77 | 48 | PANDORA_WITH_PYTHON | |
342 | 78 | WITH_PYTHON | 49 | PANDORA_WITH_PYTHON3 |
343 | 79 | WITH_RUBY | 50 | PANDORA_WITH_RUBY |
344 | 80 | 51 | ||
275 | 81 | SWIG="${SWIG} -I\${top_srcdir} -I\${top_builddir}" | ||
276 | 82 | |||
277 | 83 | |||
278 | 84 | dnl We need to inject error into the cflags to test if visibility works or not | ||
279 | 85 | save_CFLAGS="${CFLAGS}" | ||
280 | 86 | CFLAGS="${CFLAGS} -Werror" | ||
281 | 87 | gl_VISIBILITY | ||
282 | 88 | CFLAGS="${save_CFLAGS}" | ||
283 | 89 | |||
284 | 90 | AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) | ||
285 | 91 | |||
286 | 92 | |||
287 | 93 | AS_IF([test "$GCC" = "yes"],[ | ||
288 | 94 | |||
289 | 95 | AM_CPPFLAGS="-ggdb3 ${AM_CPPFLAGS}" | ||
290 | 96 | |||
291 | 97 | DEBUG_CFLAGS="-O0" | ||
292 | 98 | DEBUG_CXXFLAGS="-O0" | ||
293 | 99 | |||
294 | 100 | OPTIMIZE_CFLAGS="-O3" | ||
295 | 101 | OPTIMIZE_CXXFLAGS="-O3" | ||
296 | 102 | ]) | ||
297 | 103 | AS_IF([test "$SUNCC" = "yes"],[ | ||
298 | 104 | AM_CFLAGS="-g -mt -xstrconst -Xa ${AM_CFLAGS}" | ||
299 | 105 | AM_CXXFLAGS="-mt -compat=5 -library=stlport4 -template=no%extdef ${AM_CXXFLAGS}" | ||
300 | 106 | |||
301 | 107 | DEBUG_CXXFLAGS="-g" | ||
302 | 108 | |||
303 | 109 | OPTIMIZE_FLAGS="-xO4 -xlibmil -xdepend -xbuiltin" | ||
304 | 110 | OPTIMIZE_CFLAGS="${OPTIMIZE_FLAGS}" | ||
305 | 111 | OPTIMIZE_CXXFLAGS="-g0 ${OPTIMIZE_FLAGS}" | ||
306 | 112 | |||
307 | 113 | ]) | ||
308 | 114 | |||
309 | 115 | AC_ARG_WITH([debug], | ||
310 | 116 | [AS_HELP_STRING([--with-debug], | ||
311 | 117 | [Add debug code/turns off optimizations (yes|no) @<:@default=no@:>@])], | ||
312 | 118 | [with_debug=$withval], | ||
313 | 119 | [with_debug=no]) | ||
314 | 120 | AS_IF([test "$with_debug" = "yes"],[ | ||
315 | 121 | # Debugging. No optimization. | ||
316 | 122 | AM_CFLAGS="${AM_CFLAGS} ${DEBUG_CFLAGS} -DDEBUG" | ||
317 | 123 | AM_CXXFLAGS="${AM_CXXFLAGS} ${DEBUG_CXXFLAGS} -DDEBUG" | ||
318 | 124 | ],[ | ||
319 | 125 | # Optimized version. No debug | ||
320 | 126 | AM_CFLAGS="${AM_CFLAGS} ${OPTIMIZE_CFLAGS}" | ||
321 | 127 | AM_CXXFLAGS="${AM_CXXFLAGS} ${OPTIMIZE_CXXFLAGS}" | ||
322 | 128 | ]) | ||
323 | 129 | |||
324 | 130 | |||
325 | 131 | ENABLE_64BIT | ||
326 | 132 | |||
327 | 133 | AC_HEADER_ASSERT | ||
328 | 134 | |||
329 | 135 | PANDORA_WARNINGS(warnings-always-on) | ||
330 | 136 | |||
331 | 137 | AM_CFLAGS="${AM_CFLAGS} ${CC_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}" | ||
332 | 138 | AM_CXXFLAGS="${AM_CXXFLAGS} ${CXX_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}" | ||
333 | 139 | |||
334 | 140 | AC_SUBST([AM_CFLAGS]) | ||
335 | 141 | AC_SUBST([AM_CXXFLAGS]) | ||
345 | 142 | 52 | ||
346 | 143 | # Output files | 53 | # Output files |
347 | 144 | AC_CONFIG_HEADERS([config.h]) | 54 | AC_CONFIG_HEADERS([config.h]) |
348 | 145 | 55 | ||
349 | === modified file 'interface/cpuinfo.i' | |||
350 | --- interface/cpuinfo.i 2009-07-14 07:30:23 +0000 | |||
351 | +++ interface/cpuinfo.i 2009-08-23 00:03:39 +0000 | |||
352 | @@ -1,6 +1,6 @@ | |||
353 | 1 | /* | 1 | /* |
354 | 2 | * libcpuinfo: Information about CPU's present on a machine. | 2 | * libcpuinfo: Information about CPU's present on a machine. |
356 | 3 | * Copyright (C) 2009 The libcpuinfo developers. | 3 | * Copyright (C) 2009 Monty Taylor |
357 | 4 | * | 4 | * |
358 | 5 | * This program is open source and copying is licenced under the BSD | 5 | * This program is open source and copying is licenced under the BSD |
359 | 6 | * licence. Please see COPYING.txt distributed with the source code for | 6 | * licence. Please see COPYING.txt distributed with the source code for |
360 | 7 | 7 | ||
361 | === added directory 'lua' | |||
362 | === removed directory 'm4' | |||
363 | === removed file 'm4/64bit.m4' | |||
364 | --- m4/64bit.m4 2009-07-14 07:30:23 +0000 | |||
365 | +++ m4/64bit.m4 1970-01-01 00:00:00 +0000 | |||
366 | @@ -1,47 +0,0 @@ | |||
367 | 1 | dnl --------------------------------------------------------------------------- | ||
368 | 2 | dnl Macro: ENABLE_64BIT | ||
369 | 3 | dnl --------------------------------------------------------------------------- | ||
370 | 4 | AC_DEFUN([ENABLE_64BIT],[ | ||
371 | 5 | AC_ARG_ENABLE([64bit],[ | ||
372 | 6 | AS_HELP_STRING([--disable-64bit], | ||
373 | 7 | [Build 64 bit binary @<:@default=on@:>@])], | ||
374 | 8 | [ac_enable_64bit="$enableval"], | ||
375 | 9 | [ac_enable_64bit="yes"]) | ||
376 | 10 | |||
377 | 11 | AC_CHECK_PROGS(ISAINFO, [isainfo], [no]) | ||
378 | 12 | AS_IF([test "x$ISAINFO" != "xno"], | ||
379 | 13 | [isainfo_b=`${ISAINFO} -b`], | ||
380 | 14 | [isainfo_b="x"]) | ||
381 | 15 | |||
382 | 16 | AS_IF([test "$isainfo_b" != "x"],[ | ||
383 | 17 | |||
384 | 18 | isainfo_k=`${ISAINFO} -k` | ||
385 | 19 | DTRACEFLAGS="${DTRACEFLAGS} -${isainfo_k}" | ||
386 | 20 | |||
387 | 21 | AS_IF([test "x${ac_cv_env_CPPFLAGS_set}" = "x"],[ | ||
388 | 22 | CPPFLAGS="-I/usr/local ${CPPFLAGS}" | ||
389 | 23 | ]) | ||
390 | 24 | |||
391 | 25 | AS_IF([test "x${ac_cv_env_LDFLAGS_set}" = "x"],[ | ||
392 | 26 | LDFLAGS="-L/usr/local/lib/${isainfo_k} ${LDFLAGS}" | ||
393 | 27 | ]) | ||
394 | 28 | |||
395 | 29 | AS_IF([test "x$ac_enable_64bit" = "xyes"],[ | ||
396 | 30 | AS_IF([test "x$libdir" = "x\${exec_prefix}/lib"],[ | ||
397 | 31 | dnl The user hasn't overridden the default libdir, so we'll | ||
398 | 32 | dnl the dir suffix to match solaris 32/64-bit policy | ||
399 | 33 | libdir="${libdir}/${isainfo_k}" | ||
400 | 34 | ]) | ||
401 | 35 | |||
402 | 36 | CPPFLAGS="-m64 ${CPPFLAGS}" | ||
403 | 37 | LDFLAGS="-m64 ${LDFLAGS}" | ||
404 | 38 | AS_IF([test "$target_cpu" = "sparc" -a "x$SUNCC" = "xyes"],[ | ||
405 | 39 | AM_CFLAGS="-xmemalign=8s ${AM_CFLAGS}" | ||
406 | 40 | AM_CXXFLAGS="-xmemalign=8s ${AM_CXXFLAGS}" | ||
407 | 41 | ]) | ||
408 | 42 | ]) | ||
409 | 43 | ]) | ||
410 | 44 | ]) | ||
411 | 45 | dnl --------------------------------------------------------------------------- | ||
412 | 46 | dnl End Macro: ENABLE_64BIT | ||
413 | 47 | dnl --------------------------------------------------------------------------- | ||
414 | 48 | 0 | ||
415 | === removed file 'm4/pandora_vc_build.m4' | |||
416 | --- m4/pandora_vc_build.m4 2009-07-14 07:30:23 +0000 | |||
417 | +++ m4/pandora_vc_build.m4 1970-01-01 00:00:00 +0000 | |||
418 | @@ -1,32 +0,0 @@ | |||
419 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
420 | 2 | dnl This file is free software; Sun Microsystems | ||
421 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
422 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
423 | 5 | |||
424 | 6 | AC_DEFUN([PANDORA_BUILDING_FROM_VC],[ | ||
425 | 7 | |||
426 | 8 | ac_cv_building_from_vc=no | ||
427 | 9 | |||
428 | 10 | AS_IF([test -d "${srcdir}/.bzr"],[ | ||
429 | 11 | ac_cv_building_from_bzr=yes | ||
430 | 12 | ac_cv_building_from_vc=yes | ||
431 | 13 | ],[ | ||
432 | 14 | ac_cv_building_from_bzr=no | ||
433 | 15 | ]) | ||
434 | 16 | |||
435 | 17 | AS_IF([test -d "${srcdir}/.svn"],[ | ||
436 | 18 | ac_cv_building_from_svn=yes | ||
437 | 19 | ac_cv_building_from_vc=yes | ||
438 | 20 | ],[ | ||
439 | 21 | ac_cv_building_from_svn=no | ||
440 | 22 | ]) | ||
441 | 23 | |||
442 | 24 | AS_IF([test -d "${srcdir}/.hg"],[ | ||
443 | 25 | ac_cv_building_from_hg=yes | ||
444 | 26 | ac_cv_building_from_vc=yes | ||
445 | 27 | ],[ | ||
446 | 28 | ac_cv_building_from_hg=no | ||
447 | 29 | ]) | ||
448 | 30 | |||
449 | 31 | ]) | ||
450 | 32 | |||
451 | 33 | 0 | ||
452 | === removed file 'm4/pandora_warnings.m4' | |||
453 | --- m4/pandora_warnings.m4 2009-07-14 07:30:23 +0000 | |||
454 | +++ m4/pandora_warnings.m4 1970-01-01 00:00:00 +0000 | |||
455 | @@ -1,251 +0,0 @@ | |||
456 | 1 | dnl Copyright (C) 2009 Sun Microsystems | ||
457 | 2 | dnl This file is free software; Sun Microsystems | ||
458 | 3 | dnl gives unlimited permission to copy and/or distribute it, | ||
459 | 4 | dnl with or without modifications, as long as this notice is preserved. | ||
460 | 5 | |||
461 | 6 | dnl AC_PANDORA_WARNINGS([less-warnings|warnings-always-on]) | ||
462 | 7 | dnl less-warnings turn on a limited set of warnings | ||
463 | 8 | dnl warnings-always-on always set warnings=error regardless of tarball/vc | ||
464 | 9 | |||
465 | 10 | dnl @TODO: remove less-warnings option as soon as Drizzle is clean enough to | ||
466 | 11 | dnl allow it | ||
467 | 12 | |||
468 | 13 | AC_DEFUN([PANDORA_WARNINGS],[ | ||
469 | 14 | m4_define([PW_LESS_WARNINGS],[no]) | ||
470 | 15 | m4_define([PW_WARN_ALWAYS_ON],[no]) | ||
471 | 16 | ifdef([m4_define],,[define([m4_define], defn([define]))]) | ||
472 | 17 | ifdef([m4_undefine],,[define([m4_undefine], defn([undefine]))]) | ||
473 | 18 | m4_foreach([pw_arg],[$*],[ | ||
474 | 19 | m4_case(pw_arg, | ||
475 | 20 | [less-warnings],[ | ||
476 | 21 | m4_undefine([PW_LESS_WARNINGS]) | ||
477 | 22 | m4_define([PW_LESS_WARNINGS],[yes]) | ||
478 | 23 | ], | ||
479 | 24 | [warnings-always-on],[ | ||
480 | 25 | m4_undefine([PW_WARN_ALWAYS_ON]) | ||
481 | 26 | m4_define([PW_WARN_ALWAYS_ON],[yes]) | ||
482 | 27 | ]) | ||
483 | 28 | ]) | ||
484 | 29 | |||
485 | 30 | AC_REQUIRE([PANDORA_BUILDING_FROM_VC]) | ||
486 | 31 | m4_if(PW_WARN_ALWAYS_ON, [yes], | ||
487 | 32 | [ac_cv_warnings_as_errors=yes], | ||
488 | 33 | AS_IF([test "$ac_cv_building_from_vc" = "yes"], | ||
489 | 34 | [ac_cv_warnings_as_errors=yes], | ||
490 | 35 | [ac_cv_warnings_as_errors=no])) | ||
491 | 36 | |||
492 | 37 | AC_ARG_ENABLE([profiling], | ||
493 | 38 | [AS_HELP_STRING([--enable-profiling], | ||
494 | 39 | [Toggle profiling @<:@default=off@:>@])], | ||
495 | 40 | [ac_profiling="$enableval"], | ||
496 | 41 | [ac_profiling="no"]) | ||
497 | 42 | |||
498 | 43 | AC_ARG_ENABLE([coverage], | ||
499 | 44 | [AS_HELP_STRING([--enable-coverage], | ||
500 | 45 | [Toggle coverage @<:@default=off@:>@])], | ||
501 | 46 | [ac_coverage="$enableval"], | ||
502 | 47 | [ac_coverage="no"]) | ||
503 | 48 | |||
504 | 49 | AS_IF([test "$GCC" = "yes"],[ | ||
505 | 50 | |||
506 | 51 | AS_IF([test "$ac_profiling" = "yes"],[ | ||
507 | 52 | CC_PROFILING="-pg" | ||
508 | 53 | save_LIBS="${LIBS}" | ||
509 | 54 | LIBS="" | ||
510 | 55 | AC_CHECK_LIB(c_p, read) | ||
511 | 56 | LIBC_P="${LIBS}" | ||
512 | 57 | LIBS="${save_LIBS}" | ||
513 | 58 | AC_SUBST(LIBC_P) | ||
514 | 59 | ],[ | ||
515 | 60 | CC_PROFILING=" " | ||
516 | 61 | ]) | ||
517 | 62 | |||
518 | 63 | AS_IF([test "$ac_coverage" = "yes"], | ||
519 | 64 | [CC_COVERAGE="-fprofile-arcs -ftest-coverage"]) | ||
520 | 65 | |||
521 | 66 | AS_IF([test "$ac_cv_warnings_as_errors" = "yes"], | ||
522 | 67 | [W_FAIL="-Werror"]) | ||
523 | 68 | |||
524 | 69 | AC_CACHE_CHECK([whether it is safe to use -fdiagnostics-show-option], | ||
525 | 70 | [ac_cv_safe_to_use_fdiagnostics_show_option_], | ||
526 | 71 | [save_CFLAGS="$CFLAGS" | ||
527 | 72 | CFLAGS="-fdiagnostics-show-option ${AM_CFLAGS} ${CFLAGS}" | ||
528 | 73 | AC_COMPILE_IFELSE( | ||
529 | 74 | [AC_LANG_PROGRAM([],[])], | ||
530 | 75 | [ac_cv_safe_to_use_fdiagnostics_show_option_=yes], | ||
531 | 76 | [ac_cv_safe_to_use_fdiagnostics_show_option_=no]) | ||
532 | 77 | CFLAGS="$save_CFLAGS"]) | ||
533 | 78 | |||
534 | 79 | AS_IF([test "$ac_cv_safe_to_use_fdiagnostics_show_option_" = "yes"], | ||
535 | 80 | [ | ||
536 | 81 | F_DIAGNOSTICS_SHOW_OPTION="-fdiagnostics-show-option" | ||
537 | 82 | ]) | ||
538 | 83 | |||
539 | 84 | AC_CACHE_CHECK([whether it is safe to use -Wconversion], | ||
540 | 85 | [ac_cv_safe_to_use_wconversion_], | ||
541 | 86 | [save_CFLAGS="$CFLAGS" | ||
542 | 87 | dnl Use -Werror here instead of ${W_FAIL} so that we don't spew | ||
543 | 88 | dnl conversion warnings to all the tarball folks | ||
544 | 89 | CFLAGS="-Wconversion -Werror -pedantic ${AM_CFLAGS} ${CFLAGS}" | ||
545 | 90 | AC_COMPILE_IFELSE( | ||
546 | 91 | [AC_LANG_PROGRAM([[ | ||
547 | 92 | #include <stdbool.h> | ||
548 | 93 | void foo(bool a) | ||
549 | 94 | { | ||
550 | 95 | (void)a; | ||
551 | 96 | } | ||
552 | 97 | ]],[[ | ||
553 | 98 | foo(0); | ||
554 | 99 | ]])], | ||
555 | 100 | [ac_cv_safe_to_use_wconversion_=yes], | ||
556 | 101 | [ac_cv_safe_to_use_wconversion_=no]) | ||
557 | 102 | CFLAGS="$save_CFLAGS"]) | ||
558 | 103 | |||
559 | 104 | AS_IF([test "$ac_cv_safe_to_use_wconversion_" = "yes"], | ||
560 | 105 | [W_CONVERSION="-Wconversion" | ||
561 | 106 | AC_CACHE_CHECK([whether it is safe to use -Wconversion with htons], | ||
562 | 107 | [ac_cv_safe_to_use_Wconversion_], | ||
563 | 108 | [save_CFLAGS="$CFLAGS" | ||
564 | 109 | dnl Use -Werror here instead of ${W_FAIL} so that we don't spew | ||
565 | 110 | dnl conversion warnings to all the tarball folks | ||
566 | 111 | CFLAGS="-Wconversion -Werror -pedantic ${AM_CFLAGS} ${CFLAGS}" | ||
567 | 112 | AC_COMPILE_IFELSE( | ||
568 | 113 | [AC_LANG_PROGRAM( | ||
569 | 114 | [[ | ||
570 | 115 | #include <netinet/in.h> | ||
571 | 116 | ]],[[ | ||
572 | 117 | uint16_t x= htons(80); | ||
573 | 118 | ]])], | ||
574 | 119 | [ac_cv_safe_to_use_Wconversion_=yes], | ||
575 | 120 | [ac_cv_safe_to_use_Wconversion_=no]) | ||
576 | 121 | CFLAGS="$save_CFLAGS"]) | ||
577 | 122 | |||
578 | 123 | AS_IF([test "$ac_cv_safe_to_use_Wconversion_" = "no"], | ||
579 | 124 | [NO_CONVERSION="-Wno-conversion"]) | ||
580 | 125 | ]) | ||
581 | 126 | |||
582 | 127 | NO_STRICT_ALIASING="-fno-strict-aliasing -Wno-strict-aliasing" | ||
583 | 128 | NO_SHADOW="-Wno-shadow" | ||
584 | 129 | |||
585 | 130 | m4_if(PW_LESS_WARNINGS,[no],[ | ||
586 | 131 | BASE_WARNINGS_FULL="-Wformat=2 ${W_CONVERSION} -Wstrict-aliasing" | ||
587 | 132 | CC_WARNINGS_FULL="-Wswitch-default -Wswitch-enum -Wwrite-strings" | ||
588 | 133 | CXX_WARNINGS_FULL="-Weffc++ -Wold-style-cast" | ||
589 | 134 | ],[ | ||
590 | 135 | BASE_WARNINGS_FULL="-Wformat ${NO_STRICT_ALIASING}" | ||
591 | 136 | ]) | ||
592 | 137 | |||
593 | 138 | AS_IF([test "${ac_cv_assert}" = "no"], | ||
594 | 139 | [NO_UNUSED="-Wno-unused-variable -Wno-unused-parameter"]) | ||
595 | 140 | |||
596 | 141 | BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wextra -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${CFLAG_VISIBILITY} ${BASE_WARNINGS_FULL}" | ||
597 | 142 | CC_WARNINGS="${BASE_WARNINGS} -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wcast-align ${CC_WARNINGS_FULL}" | ||
598 | 143 | CXX_WARNINGS="${BASE_WARNINGS} -Woverloaded-virtual -Wnon-virtual-dtor -Wctor-dtor-privacy -Wno-long-long ${CXX_WARNINGS_FULL}" | ||
599 | 144 | |||
600 | 145 | AC_CACHE_CHECK([whether it is safe to use -Wmissing-declarations from C++], | ||
601 | 146 | [ac_cv_safe_to_use_Wmissing_declarations_], | ||
602 | 147 | [AC_LANG_PUSH(C++) | ||
603 | 148 | save_CXXFLAGS="$CXXFLAGS" | ||
604 | 149 | CXXFLAGS="-Werror -pedantic -Wmissing-declarations ${AM_CXXFLAGS}" | ||
605 | 150 | AC_COMPILE_IFELSE([ | ||
606 | 151 | AC_LANG_PROGRAM( | ||
607 | 152 | [[ | ||
608 | 153 | #include <stdio.h> | ||
609 | 154 | ]], [[]]) | ||
610 | 155 | ], | ||
611 | 156 | [ac_cv_safe_to_use_Wmissing_declarations_=yes], | ||
612 | 157 | [ac_cv_safe_to_use_Wmissing_declarations_=no]) | ||
613 | 158 | CXXFLAGS="$save_CXXFLAGS" | ||
614 | 159 | AC_LANG_POP() | ||
615 | 160 | ]) | ||
616 | 161 | AS_IF([test "$ac_cv_safe_to_use_Wmissing_declarations_" = "yes"], | ||
617 | 162 | [CXX_WARNINGS="${CXX_WARNINGS} -Wmissing-declarations"]) | ||
618 | 163 | |||
619 | 164 | AC_CACHE_CHECK([whether it is safe to use -Wlogical-op], | ||
620 | 165 | [ac_cv_safe_to_use_Wlogical_op_], | ||
621 | 166 | [save_CFLAGS="$CFLAGS" | ||
622 | 167 | CFLAGS="${W_FAIL} -pedantic -Wlogical-op ${AM_CFLAGS} ${CFLAGS}" | ||
623 | 168 | AC_COMPILE_IFELSE([ | ||
624 | 169 | AC_LANG_PROGRAM( | ||
625 | 170 | [[ | ||
626 | 171 | #include <stdio.h> | ||
627 | 172 | ]], [[]]) | ||
628 | 173 | ], | ||
629 | 174 | [ac_cv_safe_to_use_Wlogical_op_=yes], | ||
630 | 175 | [ac_cv_safe_to_use_Wlogical_op_=no]) | ||
631 | 176 | CFLAGS="$save_CFLAGS"]) | ||
632 | 177 | AS_IF([test "$ac_cv_safe_to_use_Wlogical_op_" = "yes"], | ||
633 | 178 | [CC_WARNINGS="${CC_WARNINGS} -Wlogical-op"]) | ||
634 | 179 | |||
635 | 180 | AC_CACHE_CHECK([whether it is safe to use -Wredundant-decls from C++], | ||
636 | 181 | [ac_cv_safe_to_use_Wredundant_decls_], | ||
637 | 182 | [AC_LANG_PUSH(C++) | ||
638 | 183 | save_CXXFLAGS="${CXXFLAGS}" | ||
639 | 184 | CXXFLAGS="${W_FAIL} -pedantic -Wredundant-decls ${AM_CXXFLAGS}" | ||
640 | 185 | AC_COMPILE_IFELSE( | ||
641 | 186 | [AC_LANG_PROGRAM([ | ||
642 | 187 | template <typename E> struct C { void foo(); }; | ||
643 | 188 | template <typename E> void C<E>::foo() { } | ||
644 | 189 | template <> void C<int>::foo(); | ||
645 | 190 | AC_INCLUDES_DEFAULT])], | ||
646 | 191 | [ac_cv_safe_to_use_Wredundant_decls_=yes], | ||
647 | 192 | [ac_cv_safe_to_use_Wredundant_decls_=no]) | ||
648 | 193 | CXXFLAGS="${save_CXXFLAGS}" | ||
649 | 194 | AC_LANG_POP()]) | ||
650 | 195 | AS_IF([test "$ac_cv_safe_to_use_Wredundant_decls_" = "yes"], | ||
651 | 196 | [CXX_WARNINGS="${CXX_WARNINGS} -Wredundant-decls"], | ||
652 | 197 | [CXX_WARNINGS="${CXX_WARNINGS} -Wno-redundant-decls"]) | ||
653 | 198 | |||
654 | 199 | NO_REDUNDANT_DECLS="-Wno-redundant-decls" | ||
655 | 200 | PROTOSKIP_WARNINGS="-Wno-effc++ -Wno-shadow" | ||
656 | 201 | |||
657 | 202 | ]) | ||
658 | 203 | |||
659 | 204 | AS_IF([test "$SUNCC" = "yes"],[ | ||
660 | 205 | |||
661 | 206 | AS_IF([test "$ac_profiling" = "yes"], | ||
662 | 207 | [CC_PROFILING="-xinstrument=datarace"]) | ||
663 | 208 | |||
664 | 209 | AS_IF([test "$ac_cv_warnings_as_errors" = "yes"], | ||
665 | 210 | [W_FAIL="-errwarn=%all"]) | ||
666 | 211 | |||
667 | 212 | AC_CACHE_CHECK([whether E_PASTE_RESULT_NOT_TOKEN is usable], | ||
668 | 213 | [ac_cv_paste_result], | ||
669 | 214 | [ | ||
670 | 215 | save_CFLAGS="${CFLAGS}" | ||
671 | 216 | CFLAGS="-errwarn=%all -erroff=E_PASTE_RESULT_NOT_TOKEN ${CFLAGS}" | ||
672 | 217 | AC_COMPILE_IFELSE( | ||
673 | 218 | [AC_LANG_PROGRAM([ | ||
674 | 219 | AC_INCLUDES_DEFAULT | ||
675 | 220 | ],[ | ||
676 | 221 | int x= 0;])], | ||
677 | 222 | [ac_cv_paste_result=yes], | ||
678 | 223 | [ac_cv_paste_result=no]) | ||
679 | 224 | CFLAGS="${save_CFLAGS}" | ||
680 | 225 | ]) | ||
681 | 226 | AS_IF([test $ac_cv_paste_result = yes], | ||
682 | 227 | [W_PASTE_RESULT=",E_PASTE_RESULT_NOT_TOKEN"]) | ||
683 | 228 | |||
684 | 229 | |||
685 | 230 | m4_if(PW_LESS_WARNINGS, [no],[ | ||
686 | 231 | CC_WARNINGS_FULL="-erroff=E_INTEGER_OVERFLOW_DETECTED${W_PASTE_RESULT}" | ||
687 | 232 | ],[ | ||
688 | 233 | CC_WARNINGS_FULL="-erroff=E_ATTRIBUTE_NOT_VAR" | ||
689 | 234 | CXX_WARNINGS_FULL="-erroff=attrskipunsup,doubunder,reftotemp,inllargeuse,truncwarn1,signextwarn,inllargeint" | ||
690 | 235 | ]) | ||
691 | 236 | |||
692 | 237 | CC_WARNINGS="-v -errtags=yes ${W_FAIL} ${CC_WARNINGS_FULL}" | ||
693 | 238 | CXX_WARNINGS="+w +w2 -xwe -xport64 -errtags=yes ${CXX_WARNINGS_FULL} ${W_FAIL}" | ||
694 | 239 | PROTOSKIP_WARNINGS="-erroff=attrskipunsup,doubunder,reftotemp,wbadinitl,identexpected,inllargeuse,truncwarn1,signextwarn" | ||
695 | 240 | NO_UNREACHED="-erroff=E_STATEMENT_NOT_REACHED" | ||
696 | 241 | |||
697 | 242 | ]) | ||
698 | 243 | |||
699 | 244 | AC_SUBST(NO_CONVERSION) | ||
700 | 245 | AC_SUBST(NO_REDUNDANT_DECLS) | ||
701 | 246 | AC_SUBST(NO_UNREACHED) | ||
702 | 247 | AC_SUBST(NO_SHADOW) | ||
703 | 248 | AC_SUBST(NO_STRICT_ALIASING) | ||
704 | 249 | AC_SUBST(PROTOSKIP_WARNINGS) | ||
705 | 250 | |||
706 | 251 | ]) | ||
707 | 252 | 0 | ||
708 | === removed file 'm4/with_python.m4' | |||
709 | --- m4/with_python.m4 2009-07-14 07:30:23 +0000 | |||
710 | +++ m4/with_python.m4 1970-01-01 00:00:00 +0000 | |||
711 | @@ -1,42 +0,0 @@ | |||
712 | 1 | dnl Find python developement | ||
713 | 2 | dnl Copyright (C) 2008 Sun Microsystems, Inc. | ||
714 | 3 | dnl | ||
715 | 4 | dnl This program is free software: you can redistribute it and/or modify it | ||
716 | 5 | dnl under the terms of the GNU General Public License as published by the | ||
717 | 6 | dnl Free Software Foundation, either version 3 of the License, or (at your | ||
718 | 7 | dnl option) any later version. | ||
719 | 8 | dnl | ||
720 | 9 | dnl This program is distributed in the hope that it will be useful, but | ||
721 | 10 | dnl WITHOUT ANY WARRANTY; without even the implied warranty of | ||
722 | 11 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | ||
723 | 12 | dnl Public License for more details. | ||
724 | 13 | dnl | ||
725 | 14 | dnl You should have received a copy of the GNU General Public License along | ||
726 | 15 | dnl with this program. If not, see <http://www.gnu.org/licenses/>. | ||
727 | 16 | dnl | ||
728 | 17 | dnl As a special exception, the respective Autoconf Macro's copyright owner | ||
729 | 18 | dnl gives unlimited permission to copy, distribute and modify the configure | ||
730 | 19 | dnl scripts that are the output of Autoconf when processing the Macro. You | ||
731 | 20 | dnl need not follow the terms of the GNU General Public License when using | ||
732 | 21 | dnl or distributing such scripts, even though portions of the text of the | ||
733 | 22 | dnl Macro appear in them. The GNU General Public License (GPL) does govern | ||
734 | 23 | dnl all other use of the material that constitutes the Autoconf Macro. | ||
735 | 24 | |||
736 | 25 | |||
737 | 26 | AC_DEFUN([WITH_PYTHON], [ | ||
738 | 27 | |||
739 | 28 | AC_ARG_WITH([python], | ||
740 | 29 | [AS_HELP_STRING([--with-python], | ||
741 | 30 | [Build Python Bindings @<:@default=yes@:>@])], | ||
742 | 31 | [with_python=$withval], | ||
743 | 32 | [with_python=yes]) | ||
744 | 33 | |||
745 | 34 | AS_IF([test "x$with_python" != "xno"],[ | ||
746 | 35 | AS_IF([test "x$with_python" != "xyes"],[PYTHON=$with_python]) | ||
747 | 36 | AM_PATH_PYTHON([2.4],,[with_python="no"]) | ||
748 | 37 | AC_PYTHON_DEVEL() | ||
749 | 38 | AS_IF([test "x$pythonexists" = "xno"],[with_python="no"]) | ||
750 | 39 | ]) | ||
751 | 40 | AM_CONDITIONAL(BUILD_PYTHON, [test "$with_python" = "yes"]) | ||
752 | 41 | |||
753 | 42 | ]) | ||
754 | 43 | 0 | ||
755 | === removed file 'm4/with_ruby.m4' | |||
756 | --- m4/with_ruby.m4 2009-07-14 07:30:23 +0000 | |||
757 | +++ m4/with_ruby.m4 1970-01-01 00:00:00 +0000 | |||
758 | @@ -1,91 +0,0 @@ | |||
759 | 1 | dnl Find ruby developemnt | ||
760 | 2 | dnl Copyright (C) 2008 Sun Microsystems, Inc. | ||
761 | 3 | dnl | ||
762 | 4 | dnl This program is free software: you can redistribute it and/or modify it | ||
763 | 5 | dnl under the terms of the GNU General Public License as published by the | ||
764 | 6 | dnl Free Software Foundation, either version 3 of the License, or (at your | ||
765 | 7 | dnl option) any later version. | ||
766 | 8 | dnl | ||
767 | 9 | dnl This program is distributed in the hope that it will be useful, but | ||
768 | 10 | dnl WITHOUT ANY WARRANTY; without even the implied warranty of | ||
769 | 11 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | ||
770 | 12 | dnl Public License for more details. | ||
771 | 13 | dnl | ||
772 | 14 | dnl You should have received a copy of the GNU General Public License along | ||
773 | 15 | dnl with this program. If not, see <http://www.gnu.org/licenses/>. | ||
774 | 16 | dnl | ||
775 | 17 | dnl As a special exception, the respective Autoconf Macro's copyright owner | ||
776 | 18 | dnl gives unlimited permission to copy, distribute and modify the configure | ||
777 | 19 | dnl scripts that are the output of Autoconf when processing the Macro. You | ||
778 | 20 | dnl need not follow the terms of the GNU General Public License when using | ||
779 | 21 | dnl or distributing such scripts, even though portions of the text of the | ||
780 | 22 | dnl Macro appear in them. The GNU General Public License (GPL) does govern | ||
781 | 23 | dnl all other use of the material that constitutes the Autoconf Macro. | ||
782 | 24 | |||
783 | 25 | AC_DEFUN([WITH_RUBY], [ | ||
784 | 26 | |||
785 | 27 | AC_ARG_WITH([ruby], | ||
786 | 28 | [AS_HELP_STRING([--with-ruby], | ||
787 | 29 | [Build Ruby Bindings @<:@default=yes@:>@])], | ||
788 | 30 | [with_ruby=$withval], | ||
789 | 31 | [with_ruby=ruby]) | ||
790 | 32 | |||
791 | 33 | AS_IF([test "x$with_ruby" != "xno"],[ | ||
792 | 34 | AS_IF([test "x$with_ruby" != "xyes"], | ||
793 | 35 | [ac_chk_ruby=$with_ruby], | ||
794 | 36 | [ac_chk_ruby=ruby1.8 ruby]) | ||
795 | 37 | AC_CHECK_PROGS(RUBY,$ac_chk_ruby) | ||
796 | 38 | ]) | ||
797 | 39 | |||
798 | 40 | AS_IF([test "x$RUBY" != "x"],[ | ||
799 | 41 | |||
800 | 42 | AC_MSG_CHECKING(for ruby devel) | ||
801 | 43 | |||
802 | 44 | dnl need to change quotes to allow square brackets | ||
803 | 45 | changequote(<<, >>)dnl | ||
804 | 46 | ruby_prefix=`$RUBY -rrbconfig -e "print Config::CONFIG['archdir']"` | ||
805 | 47 | strip_ruby_prefix=`$RUBY -rrbconfig -e "print Config::CONFIG['prefix']" | sed 's/\//./g'` | ||
806 | 48 | |||
807 | 49 | RUBY_LIB=`$RUBY -rrbconfig -e "puts Config::CONFIG['ruby_install_name']"` | ||
808 | 50 | LIBRUBYARG_SHARED=`$RUBY -rrbconfig -e "puts Config::CONFIG['LIBRUBYARG_SHARED']"` | ||
809 | 51 | RUBY_DIR=`$RUBY -rrbconfig -e "puts Config::CONFIG['archdir']"` | ||
810 | 52 | RUBY_ARCH_DIR=`echo $RUBY_DIR | sed "s/$strip_ruby_prefix//"` | ||
811 | 53 | RUBY_LIBDIR=`$RUBY -rrbconfig -e "puts Config::CONFIG['rubylibdir']"` | ||
812 | 54 | RUBY_INCLUDES="-I$ruby_prefix" | ||
813 | 55 | changequote([, ])dnl | ||
814 | 56 | |||
815 | 57 | ac_save_CFLAGS="$CFLAGS" | ||
816 | 58 | ac_save_CPPFLAGS="$CPPFLAGS" | ||
817 | 59 | ac_save_LDFLAGS="$LDFLAGS" | ||
818 | 60 | CFLAGS="$ac_save_CFLAGS $RUBY_INCLUDES" | ||
819 | 61 | CPPFLAGS="$ac_save_CPPFLAGS $RUBY_INCLUDES" | ||
820 | 62 | LDFLAGS="$ac_save_LDFLAGS $LIBRUBYARG_SHARED" | ||
821 | 63 | |||
822 | 64 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <ruby.h>]], [[VALUE rb_ac_test = rb_define_module("actest");]])],[with_ruby="yes";AC_MSG_RESULT(found)],[with_ruby="no";AC_MSG_RESULT(missing)]) | ||
823 | 65 | |||
824 | 66 | CPPFLAGS="$ac_save_CPPFLAGS" | ||
825 | 67 | CFLAGS="$ac_save_CFLAGS" | ||
826 | 68 | LDFLAGS="$ac_save_LDFLAGS" | ||
827 | 69 | ],[ | ||
828 | 70 | # This allows 'make clean' in the ruby directory to work when | ||
829 | 71 | # ruby isn't available | ||
830 | 72 | RUBY= | ||
831 | 73 | RUBY_INCLUDES= | ||
832 | 74 | LIBRUBYARG_SHARED= | ||
833 | 75 | RUBY_LIB= | ||
834 | 76 | RUBY_DIR= | ||
835 | 77 | RUBY_LIBDIR= | ||
836 | 78 | RUBY_ARCH_DIR= | ||
837 | 79 | with_ruby="no" | ||
838 | 80 | ]) | ||
839 | 81 | |||
840 | 82 | AC_SUBST(RUBY_INCLUDES) | ||
841 | 83 | AC_SUBST(LIBRUBYARG_SHARED) | ||
842 | 84 | AC_SUBST(RUBY_LIB) | ||
843 | 85 | AC_SUBST(RUBY_DIR) | ||
844 | 86 | AC_SUBST(RUBY_LIBDIR) | ||
845 | 87 | AC_SUBST(RUBY_ARCH_DIR) | ||
846 | 88 | |||
847 | 89 | AS_IF([test "x$RUBY_DIR" = "x"],[with_ruby="no"]) | ||
848 | 90 | AM_CONDITIONAL(BUILD_RUBY, test "$with_ruby" = "yes") | ||
849 | 91 | ]) | ||
850 | 92 | 0 | ||
851 | === added directory 'perl' | |||
852 | === added directory 'python' | |||
853 | === added directory 'python3' | |||
854 | === added directory 'ruby' |
Adds Perl, Lua and Python3 support. (ignore the branch name. these are not the droids you are looking for)