rice 1.4.3 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. data/COPYING +2 -2
  2. data/Doxyfile +1 -1
  3. data/Makefile.in +296 -166
  4. data/README +18 -13
  5. data/Rakefile +3 -2
  6. data/aclocal.m4 +375 -248
  7. data/config.guess +296 -261
  8. data/config.sub +268 -94
  9. data/configure +2789 -3054
  10. data/configure.ac +1 -1
  11. data/depcomp +403 -197
  12. data/extconf.rb +14 -3
  13. data/install-sh +139 -119
  14. data/missing +154 -306
  15. data/rice/Builtin_Object_defn.hpp +0 -1
  16. data/rice/Constructor.hpp +31 -30
  17. data/rice/Data_Object_defn.hpp +8 -2
  18. data/rice/Hash.hpp +26 -9
  19. data/rice/Hash.ipp +52 -60
  20. data/rice/Makefile.am +0 -1
  21. data/rice/Makefile.in +278 -152
  22. data/rice/Module_impl.ipp +1 -1
  23. data/rice/VM.cpp +1 -11
  24. data/rice/config.hpp +3 -0
  25. data/rice/config.hpp.in +3 -0
  26. data/rice/detail/Auto_Function_Wrapper.hpp +69 -0
  27. data/rice/detail/Auto_Function_Wrapper.ipp +815 -512
  28. data/rice/detail/Auto_Member_Function_Wrapper.hpp +69 -0
  29. data/rice/detail/Auto_Member_Function_Wrapper.ipp +543 -272
  30. data/rice/detail/object_call.hpp +1 -0
  31. data/rice/detail/ruby.hpp +0 -9
  32. data/rice/detail/ruby_version_code.hpp +1 -1
  33. data/rice/detail/st.hpp +0 -38
  34. data/rice/protect.hpp +1 -0
  35. data/rice/protect.ipp +1 -0
  36. data/rice/to_from_ruby.ipp +1 -1
  37. data/ruby.ac +2 -2
  38. data/ruby/Makefile.in +221 -134
  39. data/ruby/lib/Makefile.in +133 -44
  40. data/ruby/lib/mkmf-rice.rb.in +1 -4
  41. data/ruby/lib/version.rb +1 -1
  42. data/sample/Makefile.in +96 -31
  43. data/test/Makefile.am +0 -1
  44. data/test/Makefile.in +617 -219
  45. data/test/ext/Makefile.in +96 -31
  46. data/test/test_Class.cpp +2 -2
  47. data/test/test_Data_Object.cpp +11 -11
  48. data/test/test_Hash.cpp +7 -4
  49. data/test/test_Module.cpp +17 -1
  50. data/test/test_To_From_Ruby.cpp +44 -0
  51. data/test/test_rice.rb +2 -2
  52. metadata +29 -43
  53. data/rice/Allocation_Strategies.hpp +0 -37
  54. data/test/test_Allocation_Strategies.cpp +0 -77
data/README CHANGED
@@ -17,30 +17,35 @@ What Rice gives you:
17
17
 
18
18
  \section project Project Details
19
19
 
20
- The source is hosted on github: http://github.com/jameskilton/rice
20
+ The source is hosted on github: http://github.com/jasonroelofs/rice
21
21
 
22
- Bug tracking: http://github.com/jameskilton/rice/issues
22
+ Bug tracking: http://github.com/jasonroelofs/rice/issues
23
23
 
24
24
  Mailing List: rice@librelist.com (your first email will be used as a subscription request and dropped)
25
25
 
26
26
  \section installation Installation
27
27
 
28
- There are two ways to install Rice. You can download the tarball from the repository,
29
- extract it and:
30
-
31
28
  \code
32
- ./configure
33
- make
34
- sudo make install
29
+ gem install rice
35
30
  \endcode
36
31
 
37
- or you can install via RubyGems
32
+ Building it locally from a clone of the repository is as follows:
38
33
 
39
34
  \code
40
- gem install rice
35
+ ./bootstrap
36
+ ruby extconf.rb
37
+ make
41
38
  \endcode
42
39
 
43
- Note to Windows users: Rice is only known to properly compile and run under Cygwin and Mingw.
40
+ Rice is known to work on *nix and OSX. Windows is not currently
41
+ supported.
42
+
43
+ Rice does not work with any Ruby compiled with the Falcon
44
+ performans patches as they make changes to some internals which Rice
45
+ relies on.
46
+
47
+ Also Rice requires a Ruby built with --enable-shared and will not
48
+ install properly against a Ruby with only static libraries.
44
49
 
45
50
  \section tutorial Tutorial
46
51
 
@@ -562,8 +567,8 @@ We can wrap this class by using typedefs:
562
567
  extern "C"
563
568
  void Init_Container()
564
569
  {
565
- typedef size_t (*Container::get_capacity)();
566
- typedef void (*Container::set_capacity)(size_t);
570
+ typedef size_t (Container::*get_capacity)();
571
+ typedef void (Container::*set_capacity)(size_t);
567
572
 
568
573
  Data_Type<Container> rb_cContainer =
569
574
  define_class<Container>("Container")
data/Rakefile CHANGED
@@ -1,5 +1,6 @@
1
1
  $: << File.expand_path(File.dirname(__FILE__))
2
- require 'rake/gempackagetask'
2
+ require 'rubygems'
3
+ require 'rubygems/package_task'
3
4
  require 'rake/contrib/sshpublisher'
4
5
  require 'yaml'
5
6
  require 'ruby/lib/version'
@@ -29,5 +30,5 @@ end
29
30
 
30
31
  # Gemspec kept externally
31
32
  eval(File.read("rice.gemspec"))
32
- Rake::GemPackageTask.new($spec) do |pkg|
33
+ Gem::PackageTask.new($spec) do |pkg|
33
34
  end
data/aclocal.m4 CHANGED
@@ -1,7 +1,7 @@
1
- # generated automatically by aclocal 1.10 -*- Autoconf -*-
1
+ # generated automatically by aclocal 1.13.1 -*- Autoconf -*-
2
+
3
+ # Copyright (C) 1996-2012 Free Software Foundation, Inc.
2
4
 
3
- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
- # 2005, 2006 Free Software Foundation, Inc.
5
5
  # This file is free software; the Free Software Foundation
6
6
  # gives unlimited permission to copy and/or distribute it,
7
7
  # with or without modifications, as long as this notice is preserved.
@@ -11,12 +11,16 @@
11
11
  # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
  # PARTICULAR PURPOSE.
13
13
 
14
- m4_if(m4_PACKAGE_VERSION, [2.61],,
15
- [m4_fatal([this file was generated for autoconf 2.61.
16
- You have another version of autoconf. If you want to use that,
17
- you should regenerate the build system entirely.], [63])])
14
+ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15
+ m4_ifndef([AC_AUTOCONF_VERSION],
16
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17
+ m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18
+ [m4_warning([this file was generated for autoconf 2.69.
19
+ You have another version of autoconf. It may work, but is not guaranteed to.
20
+ If you have problems, you may need to regenerate the build system entirely.
21
+ To do so, use the procedure documented by the package, typically 'autoreconf'.])])
18
22
 
19
- # Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
23
+ # Copyright (C) 2002-2013 Free Software Foundation, Inc.
20
24
  #
21
25
  # This file is free software; the Free Software Foundation
22
26
  # gives unlimited permission to copy and/or distribute it,
@@ -28,10 +32,10 @@ you should regenerate the build system entirely.], [63])])
28
32
  # generated from the m4 files accompanying Automake X.Y.
29
33
  # (This private macro should not be called outside this file.)
30
34
  AC_DEFUN([AM_AUTOMAKE_VERSION],
31
- [am__api_version='1.10'
35
+ [am__api_version='1.13'
32
36
  dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
33
37
  dnl require some minimum version. Point them to the right macro.
34
- m4_if([$1], [1.10], [],
38
+ m4_if([$1], [1.13.1], [],
35
39
  [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
36
40
  ])
37
41
 
@@ -45,22 +49,24 @@ m4_define([_AM_AUTOCONF_VERSION], [])
45
49
  # AM_SET_CURRENT_AUTOMAKE_VERSION
46
50
  # -------------------------------
47
51
  # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
48
- # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
52
+ # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
49
53
  AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
50
- [AM_AUTOMAKE_VERSION([1.10])dnl
51
- _AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
54
+ [AM_AUTOMAKE_VERSION([1.13.1])dnl
55
+ m4_ifndef([AC_AUTOCONF_VERSION],
56
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
57
+ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
52
58
 
53
59
  # AM_AUX_DIR_EXPAND -*- Autoconf -*-
54
60
 
55
- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
61
+ # Copyright (C) 2001-2013 Free Software Foundation, Inc.
56
62
  #
57
63
  # This file is free software; the Free Software Foundation
58
64
  # gives unlimited permission to copy and/or distribute it,
59
65
  # with or without modifications, as long as this notice is preserved.
60
66
 
61
67
  # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
62
- # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
63
- # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
68
+ # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
69
+ # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
64
70
  #
65
71
  # Of course, Automake must honor this variable whenever it calls a
66
72
  # tool from the auxiliary directory. The problem is that $srcdir (and
@@ -79,7 +85,7 @@ _AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
79
85
  #
80
86
  # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
81
87
  # are both prefixed by $srcdir. In an in-source build this is usually
82
- # harmless because $srcdir is `.', but things will broke when you
88
+ # harmless because $srcdir is '.', but things will broke when you
83
89
  # start a VPATH build or use an absolute $srcdir.
84
90
  #
85
91
  # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
@@ -105,26 +111,24 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
105
111
 
106
112
  # AM_CONDITIONAL -*- Autoconf -*-
107
113
 
108
- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
109
- # Free Software Foundation, Inc.
114
+ # Copyright (C) 1997-2013 Free Software Foundation, Inc.
110
115
  #
111
116
  # This file is free software; the Free Software Foundation
112
117
  # gives unlimited permission to copy and/or distribute it,
113
118
  # with or without modifications, as long as this notice is preserved.
114
119
 
115
- # serial 8
116
-
117
120
  # AM_CONDITIONAL(NAME, SHELL-CONDITION)
118
121
  # -------------------------------------
119
122
  # Define a conditional.
120
123
  AC_DEFUN([AM_CONDITIONAL],
121
- [AC_PREREQ(2.52)dnl
122
- ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
123
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
124
+ [AC_PREREQ([2.52])dnl
125
+ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
126
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
124
127
  AC_SUBST([$1_TRUE])dnl
125
128
  AC_SUBST([$1_FALSE])dnl
126
129
  _AM_SUBST_NOTMAKE([$1_TRUE])dnl
127
130
  _AM_SUBST_NOTMAKE([$1_FALSE])dnl
131
+ m4_define([_AM_COND_VALUE_$1], [$2])dnl
128
132
  if $2; then
129
133
  $1_TRUE=
130
134
  $1_FALSE='#'
@@ -138,16 +142,14 @@ AC_CONFIG_COMMANDS_PRE(
138
142
  Usually this means the macro was only invoked conditionally.]])
139
143
  fi])])
140
144
 
141
- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
142
- # Free Software Foundation, Inc.
145
+ # Copyright (C) 1999-2013 Free Software Foundation, Inc.
143
146
  #
144
147
  # This file is free software; the Free Software Foundation
145
148
  # gives unlimited permission to copy and/or distribute it,
146
149
  # with or without modifications, as long as this notice is preserved.
147
150
 
148
- # serial 9
149
151
 
150
- # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
152
+ # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
151
153
  # written in clear, in which case automake, when reading aclocal.m4,
152
154
  # will think it sees a *use*, and therefore will trigger all it's
153
155
  # C support machinery. Also note that it means that autoscan, seeing
@@ -157,7 +159,7 @@ fi])])
157
159
  # _AM_DEPENDENCIES(NAME)
158
160
  # ----------------------
159
161
  # See how the compiler implements dependency checking.
160
- # NAME is "CC", "CXX", "GCJ", or "OBJC".
162
+ # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
161
163
  # We try a few techniques and use that to set a single cache variable.
162
164
  #
163
165
  # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
@@ -170,12 +172,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
170
172
  AC_REQUIRE([AM_MAKE_INCLUDE])dnl
171
173
  AC_REQUIRE([AM_DEP_TRACK])dnl
172
174
 
173
- ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
174
- [$1], CXX, [depcc="$CXX" am_compiler_list=],
175
- [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
176
- [$1], UPC, [depcc="$UPC" am_compiler_list=],
177
- [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
178
- [depcc="$$1" am_compiler_list=])
175
+ m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
176
+ [$1], [CXX], [depcc="$CXX" am_compiler_list=],
177
+ [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
178
+ [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
179
+ [$1], [UPC], [depcc="$UPC" am_compiler_list=],
180
+ [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
181
+ [depcc="$$1" am_compiler_list=])
179
182
 
180
183
  AC_CACHE_CHECK([dependency style of $depcc],
181
184
  [am_cv_$1_dependencies_compiler_type],
@@ -183,8 +186,9 @@ AC_CACHE_CHECK([dependency style of $depcc],
183
186
  # We make a subdir and do the tests there. Otherwise we can end up
184
187
  # making bogus files that we don't know about and never remove. For
185
188
  # instance it was reported that on HP-UX the gcc test will end up
186
- # making a dummy file named `D' -- because `-MD' means `put the output
187
- # in D'.
189
+ # making a dummy file named 'D' -- because '-MD' means "put the output
190
+ # in D".
191
+ rm -rf conftest.dir
188
192
  mkdir conftest.dir
189
193
  # Copy depcomp to subdir because otherwise we won't find it if we're
190
194
  # using a relative directory.
@@ -202,6 +206,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
202
206
  if test "$am_compiler_list" = ""; then
203
207
  am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
204
208
  fi
209
+ am__universal=false
210
+ m4_case([$1], [CC],
211
+ [case " $depcc " in #(
212
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
213
+ esac],
214
+ [CXX],
215
+ [case " $depcc " in #(
216
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
217
+ esac])
218
+
205
219
  for depmode in $am_compiler_list; do
206
220
  # Setup a source with many dependencies, because some compilers
207
221
  # like to wrap large dependency lists on column 80 (with \), and
@@ -213,35 +227,49 @@ AC_CACHE_CHECK([dependency style of $depcc],
213
227
  : > sub/conftest.c
214
228
  for i in 1 2 3 4 5 6; do
215
229
  echo '#include "conftst'$i'.h"' >> sub/conftest.c
216
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
217
- # Solaris 8's {/usr,}/bin/sh.
218
- touch sub/conftst$i.h
230
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
231
+ # Solaris 10 /bin/sh.
232
+ echo '/* dummy */' > sub/conftst$i.h
219
233
  done
220
234
  echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
221
235
 
236
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
237
+ # mode. It turns out that the SunPro C++ compiler does not properly
238
+ # handle '-M -o', and we need to detect this. Also, some Intel
239
+ # versions had trouble with output in subdirs.
240
+ am__obj=sub/conftest.${OBJEXT-o}
241
+ am__minus_obj="-o $am__obj"
222
242
  case $depmode in
243
+ gcc)
244
+ # This depmode causes a compiler race in universal mode.
245
+ test "$am__universal" = false || continue
246
+ ;;
223
247
  nosideeffect)
224
- # after this tag, mechanisms are not by side-effect, so they'll
225
- # only be used when explicitly requested
248
+ # After this tag, mechanisms are not by side-effect, so they'll
249
+ # only be used when explicitly requested.
226
250
  if test "x$enable_dependency_tracking" = xyes; then
227
251
  continue
228
252
  else
229
253
  break
230
254
  fi
231
255
  ;;
256
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
257
+ # This compiler won't grok '-c -o', but also, the minuso test has
258
+ # not run yet. These depmodes are late enough in the game, and
259
+ # so weak that their functioning should not be impacted.
260
+ am__obj=conftest.${OBJEXT-o}
261
+ am__minus_obj=
262
+ ;;
232
263
  none) break ;;
233
264
  esac
234
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
235
- # mode. It turns out that the SunPro C++ compiler does not properly
236
- # handle `-M -o', and we need to detect this.
237
265
  if depmode=$depmode \
238
- source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
266
+ source=sub/conftest.c object=$am__obj \
239
267
  depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
240
- $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
268
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
241
269
  >/dev/null 2>conftest.err &&
242
270
  grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
243
271
  grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
244
- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
272
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
245
273
  ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
246
274
  # icc doesn't choke on unknown options, it will just issue warnings
247
275
  # or remarks (even with -Werror). So we grep stderr for any message
@@ -274,7 +302,7 @@ AM_CONDITIONAL([am__fastdep$1], [
274
302
  # AM_SET_DEPDIR
275
303
  # -------------
276
304
  # Choose a directory name for dependency files.
277
- # This macro is AC_REQUIREd in _AM_DEPENDENCIES
305
+ # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
278
306
  AC_DEFUN([AM_SET_DEPDIR],
279
307
  [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
280
308
  AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
@@ -284,71 +312,85 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
284
312
  # AM_DEP_TRACK
285
313
  # ------------
286
314
  AC_DEFUN([AM_DEP_TRACK],
287
- [AC_ARG_ENABLE(dependency-tracking,
288
- [ --disable-dependency-tracking speeds up one-time build
289
- --enable-dependency-tracking do not reject slow dependency extractors])
315
+ [AC_ARG_ENABLE([dependency-tracking], [dnl
316
+ AS_HELP_STRING(
317
+ [--enable-dependency-tracking],
318
+ [do not reject slow dependency extractors])
319
+ AS_HELP_STRING(
320
+ [--disable-dependency-tracking],
321
+ [speeds up one-time build])])
290
322
  if test "x$enable_dependency_tracking" != xno; then
291
323
  am_depcomp="$ac_aux_dir/depcomp"
292
324
  AMDEPBACKSLASH='\'
325
+ am__nodep='_no'
293
326
  fi
294
327
  AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
295
328
  AC_SUBST([AMDEPBACKSLASH])dnl
296
329
  _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
330
+ AC_SUBST([am__nodep])dnl
331
+ _AM_SUBST_NOTMAKE([am__nodep])dnl
297
332
  ])
298
333
 
299
334
  # Generate code to set up dependency tracking. -*- Autoconf -*-
300
335
 
301
- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
302
- # Free Software Foundation, Inc.
336
+ # Copyright (C) 1999-2013 Free Software Foundation, Inc.
303
337
  #
304
338
  # This file is free software; the Free Software Foundation
305
339
  # gives unlimited permission to copy and/or distribute it,
306
340
  # with or without modifications, as long as this notice is preserved.
307
341
 
308
- #serial 3
309
342
 
310
343
  # _AM_OUTPUT_DEPENDENCY_COMMANDS
311
344
  # ------------------------------
312
345
  AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
313
- [for mf in $CONFIG_FILES; do
314
- # Strip MF so we end up with the name of the file.
315
- mf=`echo "$mf" | sed -e 's/:.*$//'`
316
- # Check whether this is an Automake generated Makefile or not.
317
- # We used to match only the files named `Makefile.in', but
318
- # some people rename them; so instead we look at the file content.
319
- # Grep'ing the first line is not enough: some people post-process
320
- # each Makefile.in and add a new line on top of each file to say so.
321
- # Grep'ing the whole file is not good either: AIX grep has a line
322
- # limit of 2048, but all sed's we know have understand at least 4000.
323
- if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
324
- dirpart=`AS_DIRNAME("$mf")`
325
- else
326
- continue
327
- fi
328
- # Extract the definition of DEPDIR, am__include, and am__quote
329
- # from the Makefile without running `make'.
330
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
331
- test -z "$DEPDIR" && continue
332
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
333
- test -z "am__include" && continue
334
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
335
- # When using ansi2knr, U may be empty or an underscore; expand it
336
- U=`sed -n 's/^U = //p' < "$mf"`
337
- # Find all dependency output files, they are included files with
338
- # $(DEPDIR) in their names. We invoke sed twice because it is the
339
- # simplest approach to changing $(DEPDIR) to its actual value in the
340
- # expansion.
341
- for file in `sed -n "
342
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
343
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
344
- # Make sure the directory exists.
345
- test -f "$dirpart/$file" && continue
346
- fdir=`AS_DIRNAME(["$file"])`
347
- AS_MKDIR_P([$dirpart/$fdir])
348
- # echo "creating $dirpart/$file"
349
- echo '# dummy' > "$dirpart/$file"
346
+ [{
347
+ # Older Autoconf quotes --file arguments for eval, but not when files
348
+ # are listed without --file. Let's play safe and only enable the eval
349
+ # if we detect the quoting.
350
+ case $CONFIG_FILES in
351
+ *\'*) eval set x "$CONFIG_FILES" ;;
352
+ *) set x $CONFIG_FILES ;;
353
+ esac
354
+ shift
355
+ for mf
356
+ do
357
+ # Strip MF so we end up with the name of the file.
358
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
359
+ # Check whether this is an Automake generated Makefile or not.
360
+ # We used to match only the files named 'Makefile.in', but
361
+ # some people rename them; so instead we look at the file content.
362
+ # Grep'ing the first line is not enough: some people post-process
363
+ # each Makefile.in and add a new line on top of each file to say so.
364
+ # Grep'ing the whole file is not good either: AIX grep has a line
365
+ # limit of 2048, but all sed's we know have understand at least 4000.
366
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
367
+ dirpart=`AS_DIRNAME("$mf")`
368
+ else
369
+ continue
370
+ fi
371
+ # Extract the definition of DEPDIR, am__include, and am__quote
372
+ # from the Makefile without running 'make'.
373
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
374
+ test -z "$DEPDIR" && continue
375
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
376
+ test -z "am__include" && continue
377
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
378
+ # Find all dependency output files, they are included files with
379
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
380
+ # simplest approach to changing $(DEPDIR) to its actual value in the
381
+ # expansion.
382
+ for file in `sed -n "
383
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
384
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
385
+ # Make sure the directory exists.
386
+ test -f "$dirpart/$file" && continue
387
+ fdir=`AS_DIRNAME(["$file"])`
388
+ AS_MKDIR_P([$dirpart/$fdir])
389
+ # echo "creating $dirpart/$file"
390
+ echo '# dummy' > "$dirpart/$file"
391
+ done
350
392
  done
351
- done
393
+ }
352
394
  ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
353
395
 
354
396
 
@@ -357,7 +399,7 @@ done
357
399
  # This macro should only be invoked once -- use via AC_REQUIRE.
358
400
  #
359
401
  # This code is only required when automatic dependency tracking
360
- # is enabled. FIXME. This creates each `.P' file that we will
402
+ # is enabled. FIXME. This creates each '.P' file that we will
361
403
  # need in order to bootstrap the dependency handling code.
362
404
  AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
363
405
  [AC_CONFIG_COMMANDS([depfiles],
@@ -365,29 +407,14 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
365
407
  [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
366
408
  ])
367
409
 
368
- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
369
- # Free Software Foundation, Inc.
370
- #
371
- # This file is free software; the Free Software Foundation
372
- # gives unlimited permission to copy and/or distribute it,
373
- # with or without modifications, as long as this notice is preserved.
374
-
375
- # serial 8
376
-
377
- # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
378
- AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
379
-
380
410
  # Do all the work for Automake. -*- Autoconf -*-
381
411
 
382
- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
383
- # 2005, 2006 Free Software Foundation, Inc.
412
+ # Copyright (C) 1996-2013 Free Software Foundation, Inc.
384
413
  #
385
414
  # This file is free software; the Free Software Foundation
386
415
  # gives unlimited permission to copy and/or distribute it,
387
416
  # with or without modifications, as long as this notice is preserved.
388
417
 
389
- # serial 12
390
-
391
418
  # This macro actually does too much. Some checks are only needed if
392
419
  # your package does certain things. But this isn't really a big deal.
393
420
 
@@ -403,7 +430,7 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
403
430
  # arguments mandatory, and then we can depend on a new Autoconf
404
431
  # release and drop the old call support.
405
432
  AC_DEFUN([AM_INIT_AUTOMAKE],
406
- [AC_PREREQ([2.60])dnl
433
+ [AC_PREREQ([2.65])dnl
407
434
  dnl Autoconf wants to disallow AM_ names. We explicitly allow
408
435
  dnl the ones we care about.
409
436
  m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -432,55 +459,81 @@ AC_SUBST([CYGPATH_W])
432
459
  # Define the identity of the package.
433
460
  dnl Distinguish between old-style and new-style calls.
434
461
  m4_ifval([$2],
435
- [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
462
+ [AC_DIAGNOSE([obsolete],
463
+ [$0: two- and three-arguments forms are deprecated.])
464
+ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
436
465
  AC_SUBST([PACKAGE], [$1])dnl
437
466
  AC_SUBST([VERSION], [$2])],
438
467
  [_AM_SET_OPTIONS([$1])dnl
439
468
  dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
440
- m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
469
+ m4_if(
470
+ m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
471
+ [ok:ok],,
441
472
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
442
473
  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
443
474
  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
444
475
 
445
476
  _AM_IF_OPTION([no-define],,
446
- [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
447
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
477
+ [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
478
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
448
479
 
449
480
  # Some tools Automake needs.
450
481
  AC_REQUIRE([AM_SANITY_CHECK])dnl
451
482
  AC_REQUIRE([AC_ARG_PROGRAM])dnl
452
- AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
453
- AM_MISSING_PROG(AUTOCONF, autoconf)
454
- AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
455
- AM_MISSING_PROG(AUTOHEADER, autoheader)
456
- AM_MISSING_PROG(MAKEINFO, makeinfo)
457
- AM_PROG_INSTALL_SH
458
- AM_PROG_INSTALL_STRIP
459
- AC_REQUIRE([AM_PROG_MKDIR_P])dnl
483
+ AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
484
+ AM_MISSING_PROG([AUTOCONF], [autoconf])
485
+ AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
486
+ AM_MISSING_PROG([AUTOHEADER], [autoheader])
487
+ AM_MISSING_PROG([MAKEINFO], [makeinfo])
488
+ AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
489
+ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
490
+ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
491
+ # For better backward compatibility. To be removed once Automake 1.9.x
492
+ # dies out for good. For more background, see:
493
+ # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
494
+ # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
495
+ AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
460
496
  # We need awk for the "check" target. The system "awk" is bad on
461
497
  # some platforms.
462
498
  AC_REQUIRE([AC_PROG_AWK])dnl
463
499
  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
464
500
  AC_REQUIRE([AM_SET_LEADING_DOT])dnl
465
501
  _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
466
- [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
467
- [_AM_PROG_TAR([v7])])])
502
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
503
+ [_AM_PROG_TAR([v7])])])
468
504
  _AM_IF_OPTION([no-dependencies],,
469
505
  [AC_PROVIDE_IFELSE([AC_PROG_CC],
470
- [_AM_DEPENDENCIES(CC)],
471
- [define([AC_PROG_CC],
472
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
506
+ [_AM_DEPENDENCIES([CC])],
507
+ [m4_define([AC_PROG_CC],
508
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
473
509
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
474
- [_AM_DEPENDENCIES(CXX)],
475
- [define([AC_PROG_CXX],
476
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
510
+ [_AM_DEPENDENCIES([CXX])],
511
+ [m4_define([AC_PROG_CXX],
512
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
477
513
  AC_PROVIDE_IFELSE([AC_PROG_OBJC],
478
- [_AM_DEPENDENCIES(OBJC)],
479
- [define([AC_PROG_OBJC],
480
- defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
514
+ [_AM_DEPENDENCIES([OBJC])],
515
+ [m4_define([AC_PROG_OBJC],
516
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
517
+ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
518
+ [_AM_DEPENDENCIES([OBJCXX])],
519
+ [m4_define([AC_PROG_OBJCXX],
520
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
481
521
  ])
522
+ AC_REQUIRE([AM_SILENT_RULES])dnl
523
+ dnl The testsuite driver may need to know about EXEEXT, so add the
524
+ dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
525
+ dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
526
+ AC_CONFIG_COMMANDS_PRE(dnl
527
+ [m4_provide_if([_AM_COMPILER_EXEEXT],
528
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
482
529
  ])
483
530
 
531
+ dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
532
+ dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
533
+ dnl mangled by Autoconf and run in a shell conditional statement.
534
+ m4_define([_AC_COMPILER_EXEEXT],
535
+ m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
536
+
484
537
 
485
538
  # When config.status generates a header, we must update the stamp-h file.
486
539
  # This file resides in the same directory as the config header
@@ -491,18 +544,19 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
491
544
  # our stamp files there.
492
545
  AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
493
546
  [# Compute $1's index in $config_headers.
547
+ _am_arg=$1
494
548
  _am_stamp_count=1
495
549
  for _am_header in $config_headers :; do
496
550
  case $_am_header in
497
- $1 | $1:* )
551
+ $_am_arg | $_am_arg:* )
498
552
  break ;;
499
553
  * )
500
554
  _am_stamp_count=`expr $_am_stamp_count + 1` ;;
501
555
  esac
502
556
  done
503
- echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
557
+ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
504
558
 
505
- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
559
+ # Copyright (C) 2001-2013 Free Software Foundation, Inc.
506
560
  #
507
561
  # This file is free software; the Free Software Foundation
508
562
  # gives unlimited permission to copy and/or distribute it,
@@ -513,17 +567,22 @@ echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
513
567
  # Define $install_sh.
514
568
  AC_DEFUN([AM_PROG_INSTALL_SH],
515
569
  [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
516
- install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
517
- AC_SUBST(install_sh)])
570
+ if test x"${install_sh}" != xset; then
571
+ case $am_aux_dir in
572
+ *\ * | *\ *)
573
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
574
+ *)
575
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
576
+ esac
577
+ fi
578
+ AC_SUBST([install_sh])])
518
579
 
519
- # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
580
+ # Copyright (C) 2003-2013 Free Software Foundation, Inc.
520
581
  #
521
582
  # This file is free software; the Free Software Foundation
522
583
  # gives unlimited permission to copy and/or distribute it,
523
584
  # with or without modifications, as long as this notice is preserved.
524
585
 
525
- # serial 2
526
-
527
586
  # Check whether the underlying file-system supports filenames
528
587
  # with a leading dot. For instance MS-DOS doesn't.
529
588
  AC_DEFUN([AM_SET_LEADING_DOT],
@@ -539,14 +598,12 @@ AC_SUBST([am__leading_dot])])
539
598
 
540
599
  # Check to see how 'make' treats includes. -*- Autoconf -*-
541
600
 
542
- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
601
+ # Copyright (C) 2001-2013 Free Software Foundation, Inc.
543
602
  #
544
603
  # This file is free software; the Free Software Foundation
545
604
  # gives unlimited permission to copy and/or distribute it,
546
605
  # with or without modifications, as long as this notice is preserved.
547
606
 
548
- # serial 3
549
-
550
607
  # AM_MAKE_INCLUDE()
551
608
  # -----------------
552
609
  # Check to see how make treats includes.
@@ -554,7 +611,7 @@ AC_DEFUN([AM_MAKE_INCLUDE],
554
611
  [am_make=${MAKE-make}
555
612
  cat > confinc << 'END'
556
613
  am__doit:
557
- @echo done
614
+ @echo this is the am__doit target
558
615
  .PHONY: am__doit
559
616
  END
560
617
  # If we don't find an include directive, just comment out the code.
@@ -564,24 +621,24 @@ am__quote=
564
621
  _am_result=none
565
622
  # First try GNU make style include.
566
623
  echo "include confinc" > confmf
567
- # We grep out `Entering directory' and `Leaving directory'
568
- # messages which can occur if `w' ends up in MAKEFLAGS.
569
- # In particular we don't look at `^make:' because GNU make might
570
- # be invoked under some other name (usually "gmake"), in which
571
- # case it prints its new name instead of `make'.
572
- if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
573
- am__include=include
574
- am__quote=
575
- _am_result=GNU
576
- fi
624
+ # Ignore all kinds of additional output from 'make'.
625
+ case `$am_make -s -f confmf 2> /dev/null` in #(
626
+ *the\ am__doit\ target*)
627
+ am__include=include
628
+ am__quote=
629
+ _am_result=GNU
630
+ ;;
631
+ esac
577
632
  # Now try BSD make style include.
578
633
  if test "$am__include" = "#"; then
579
634
  echo '.include "confinc"' > confmf
580
- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
581
- am__include=.include
582
- am__quote="\""
583
- _am_result=BSD
584
- fi
635
+ case `$am_make -s -f confmf 2> /dev/null` in #(
636
+ *the\ am__doit\ target*)
637
+ am__include=.include
638
+ am__quote="\""
639
+ _am_result=BSD
640
+ ;;
641
+ esac
585
642
  fi
586
643
  AC_SUBST([am__include])
587
644
  AC_SUBST([am__quote])
@@ -591,15 +648,12 @@ rm -f confinc confmf
591
648
 
592
649
  # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
593
650
 
594
- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
595
- # Free Software Foundation, Inc.
651
+ # Copyright (C) 1997-2013 Free Software Foundation, Inc.
596
652
  #
597
653
  # This file is free software; the Free Software Foundation
598
654
  # gives unlimited permission to copy and/or distribute it,
599
655
  # with or without modifications, as long as this notice is preserved.
600
656
 
601
- # serial 5
602
-
603
657
  # AM_MISSING_PROG(NAME, PROGRAM)
604
658
  # ------------------------------
605
659
  AC_DEFUN([AM_MISSING_PROG],
@@ -607,76 +661,54 @@ AC_DEFUN([AM_MISSING_PROG],
607
661
  $1=${$1-"${am_missing_run}$2"}
608
662
  AC_SUBST($1)])
609
663
 
610
-
611
664
  # AM_MISSING_HAS_RUN
612
665
  # ------------------
613
- # Define MISSING if not defined so far and test if it supports --run.
614
- # If it does, set am_missing_run to use it, otherwise, to nothing.
666
+ # Define MISSING if not defined so far and test if it is modern enough.
667
+ # If it is, set am_missing_run to use it, otherwise, to nothing.
615
668
  AC_DEFUN([AM_MISSING_HAS_RUN],
616
669
  [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
617
670
  AC_REQUIRE_AUX_FILE([missing])dnl
618
- test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
671
+ if test x"${MISSING+set}" != xset; then
672
+ case $am_aux_dir in
673
+ *\ * | *\ *)
674
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
675
+ *)
676
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
677
+ esac
678
+ fi
619
679
  # Use eval to expand $SHELL
620
- if eval "$MISSING --run true"; then
621
- am_missing_run="$MISSING --run "
680
+ if eval "$MISSING --is-lightweight"; then
681
+ am_missing_run="$MISSING "
622
682
  else
623
683
  am_missing_run=
624
- AC_MSG_WARN([`missing' script is too old or missing])
684
+ AC_MSG_WARN(['missing' script is too old or missing])
625
685
  fi
626
686
  ])
627
687
 
628
- # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
629
- #
630
- # This file is free software; the Free Software Foundation
631
- # gives unlimited permission to copy and/or distribute it,
632
- # with or without modifications, as long as this notice is preserved.
633
-
634
- # AM_PROG_MKDIR_P
635
- # ---------------
636
- # Check for `mkdir -p'.
637
- AC_DEFUN([AM_PROG_MKDIR_P],
638
- [AC_PREREQ([2.60])dnl
639
- AC_REQUIRE([AC_PROG_MKDIR_P])dnl
640
- dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
641
- dnl while keeping a definition of mkdir_p for backward compatibility.
642
- dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
643
- dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
644
- dnl Makefile.ins that do not define MKDIR_P, so we do our own
645
- dnl adjustment using top_builddir (which is defined more often than
646
- dnl MKDIR_P).
647
- AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
648
- case $mkdir_p in
649
- [[\\/$]]* | ?:[[\\/]]*) ;;
650
- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
651
- esac
652
- ])
653
-
654
688
  # Helper functions for option handling. -*- Autoconf -*-
655
689
 
656
- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
690
+ # Copyright (C) 2001-2013 Free Software Foundation, Inc.
657
691
  #
658
692
  # This file is free software; the Free Software Foundation
659
693
  # gives unlimited permission to copy and/or distribute it,
660
694
  # with or without modifications, as long as this notice is preserved.
661
695
 
662
- # serial 3
663
-
664
696
  # _AM_MANGLE_OPTION(NAME)
665
697
  # -----------------------
666
698
  AC_DEFUN([_AM_MANGLE_OPTION],
667
699
  [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
668
700
 
669
701
  # _AM_SET_OPTION(NAME)
670
- # ------------------------------
702
+ # --------------------
671
703
  # Set option NAME. Presently that only means defining a flag for this option.
672
704
  AC_DEFUN([_AM_SET_OPTION],
673
- [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
705
+ [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
674
706
 
675
707
  # _AM_SET_OPTIONS(OPTIONS)
676
- # ----------------------------------
708
+ # ------------------------
677
709
  # OPTIONS is a space-separated list of Automake options.
678
710
  AC_DEFUN([_AM_SET_OPTIONS],
679
- [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
711
+ [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
680
712
 
681
713
  # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
682
714
  # -------------------------------------------
@@ -686,45 +718,60 @@ AC_DEFUN([_AM_IF_OPTION],
686
718
 
687
719
  # Check to make sure that the build environment is sane. -*- Autoconf -*-
688
720
 
689
- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
690
- # Free Software Foundation, Inc.
721
+ # Copyright (C) 1996-2013 Free Software Foundation, Inc.
691
722
  #
692
723
  # This file is free software; the Free Software Foundation
693
724
  # gives unlimited permission to copy and/or distribute it,
694
725
  # with or without modifications, as long as this notice is preserved.
695
726
 
696
- # serial 4
697
-
698
727
  # AM_SANITY_CHECK
699
728
  # ---------------
700
729
  AC_DEFUN([AM_SANITY_CHECK],
701
730
  [AC_MSG_CHECKING([whether build environment is sane])
702
- # Just in case
703
- sleep 1
704
- echo timestamp > conftest.file
705
- # Do `set' in a subshell so we don't clobber the current shell's
731
+ # Reject unsafe characters in $srcdir or the absolute working directory
732
+ # name. Accept space and tab only in the latter.
733
+ am_lf='
734
+ '
735
+ case `pwd` in
736
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
737
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
738
+ esac
739
+ case $srcdir in
740
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
741
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
742
+ esac
743
+
744
+ # Do 'set' in a subshell so we don't clobber the current shell's
706
745
  # arguments. Must try -L first in case configure is actually a
707
746
  # symlink; some systems play weird games with the mod time of symlinks
708
747
  # (eg FreeBSD returns the mod time of the symlink's containing
709
748
  # directory).
710
749
  if (
711
- set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
712
- if test "$[*]" = "X"; then
713
- # -L didn't work.
714
- set X `ls -t $srcdir/configure conftest.file`
715
- fi
716
- rm -f conftest.file
717
- if test "$[*]" != "X $srcdir/configure conftest.file" \
718
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
719
-
720
- # If neither matched, then we have a broken ls. This can happen
721
- # if, for instance, CONFIG_SHELL is bash and it inherits a
722
- # broken ls alias from the environment. This has actually
723
- # happened. Such a system could not be considered "sane".
724
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
725
- alias in your environment])
726
- fi
727
-
750
+ am_has_slept=no
751
+ for am_try in 1 2; do
752
+ echo "timestamp, slept: $am_has_slept" > conftest.file
753
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
754
+ if test "$[*]" = "X"; then
755
+ # -L didn't work.
756
+ set X `ls -t "$srcdir/configure" conftest.file`
757
+ fi
758
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
759
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
760
+
761
+ # If neither matched, then we have a broken ls. This can happen
762
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
763
+ # broken ls alias from the environment. This has actually
764
+ # happened. Such a system could not be considered "sane".
765
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
766
+ alias in your environment])
767
+ fi
768
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
769
+ break
770
+ fi
771
+ # Just in case.
772
+ sleep 1
773
+ am_has_slept=yes
774
+ done
728
775
  test "$[2]" = conftest.file
729
776
  )
730
777
  then
@@ -734,9 +781,85 @@ else
734
781
  AC_MSG_ERROR([newly created file is older than distributed files!
735
782
  Check your system clock])
736
783
  fi
737
- AC_MSG_RESULT(yes)])
784
+ AC_MSG_RESULT([yes])
785
+ # If we didn't sleep, we still need to ensure time stamps of config.status and
786
+ # generated files are strictly newer.
787
+ am_sleep_pid=
788
+ if grep 'slept: no' conftest.file >/dev/null 2>&1; then
789
+ ( sleep 1 ) &
790
+ am_sleep_pid=$!
791
+ fi
792
+ AC_CONFIG_COMMANDS_PRE(
793
+ [AC_MSG_CHECKING([that generated files are newer than configure])
794
+ if test -n "$am_sleep_pid"; then
795
+ # Hide warnings about reused PIDs.
796
+ wait $am_sleep_pid 2>/dev/null
797
+ fi
798
+ AC_MSG_RESULT([done])])
799
+ rm -f conftest.file
800
+ ])
801
+
802
+ # Copyright (C) 2009-2013 Free Software Foundation, Inc.
803
+ #
804
+ # This file is free software; the Free Software Foundation
805
+ # gives unlimited permission to copy and/or distribute it,
806
+ # with or without modifications, as long as this notice is preserved.
807
+
808
+ # AM_SILENT_RULES([DEFAULT])
809
+ # --------------------------
810
+ # Enable less verbose build rules; with the default set to DEFAULT
811
+ # ("yes" being less verbose, "no" or empty being verbose).
812
+ AC_DEFUN([AM_SILENT_RULES],
813
+ [AC_ARG_ENABLE([silent-rules], [dnl
814
+ AS_HELP_STRING(
815
+ [--enable-silent-rules],
816
+ [less verbose build output (undo: "make V=1")])
817
+ AS_HELP_STRING(
818
+ [--disable-silent-rules],
819
+ [verbose build output (undo: "make V=0")])dnl
820
+ ])
821
+ case $enable_silent_rules in @%:@ (((
822
+ yes) AM_DEFAULT_VERBOSITY=0;;
823
+ no) AM_DEFAULT_VERBOSITY=1;;
824
+ *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
825
+ esac
826
+ dnl
827
+ dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
828
+ dnl do not support nested variable expansions.
829
+ dnl See automake bug#9928 and bug#10237.
830
+ am_make=${MAKE-make}
831
+ AC_CACHE_CHECK([whether $am_make supports nested variables],
832
+ [am_cv_make_support_nested_variables],
833
+ [if AS_ECHO([['TRUE=$(BAR$(V))
834
+ BAR0=false
835
+ BAR1=true
836
+ V=1
837
+ am__doit:
838
+ @$(TRUE)
839
+ .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
840
+ am_cv_make_support_nested_variables=yes
841
+ else
842
+ am_cv_make_support_nested_variables=no
843
+ fi])
844
+ if test $am_cv_make_support_nested_variables = yes; then
845
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
846
+ AM_V='$(V)'
847
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
848
+ else
849
+ AM_V=$AM_DEFAULT_VERBOSITY
850
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
851
+ fi
852
+ AC_SUBST([AM_V])dnl
853
+ AM_SUBST_NOTMAKE([AM_V])dnl
854
+ AC_SUBST([AM_DEFAULT_V])dnl
855
+ AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
856
+ AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
857
+ AM_BACKSLASH='\'
858
+ AC_SUBST([AM_BACKSLASH])dnl
859
+ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
860
+ ])
738
861
 
739
- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
862
+ # Copyright (C) 2001-2013 Free Software Foundation, Inc.
740
863
  #
741
864
  # This file is free software; the Free Software Foundation
742
865
  # gives unlimited permission to copy and/or distribute it,
@@ -744,27 +867,27 @@ AC_MSG_RESULT(yes)])
744
867
 
745
868
  # AM_PROG_INSTALL_STRIP
746
869
  # ---------------------
747
- # One issue with vendor `install' (even GNU) is that you can't
870
+ # One issue with vendor 'install' (even GNU) is that you can't
748
871
  # specify the program used to strip binaries. This is especially
749
872
  # annoying in cross-compiling environments, where the build's strip
750
873
  # is unlikely to handle the host's binaries.
751
874
  # Fortunately install-sh will honor a STRIPPROG variable, so we
752
- # always use install-sh in `make install-strip', and initialize
875
+ # always use install-sh in "make install-strip", and initialize
753
876
  # STRIPPROG with the value of the STRIP variable (set by the user).
754
877
  AC_DEFUN([AM_PROG_INSTALL_STRIP],
755
878
  [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
756
- # Installed binaries are usually stripped using `strip' when the user
757
- # run `make install-strip'. However `strip' might not be the right
879
+ # Installed binaries are usually stripped using 'strip' when the user
880
+ # run "make install-strip". However 'strip' might not be the right
758
881
  # tool to use in cross-compilation environments, therefore Automake
759
- # will honor the `STRIP' environment variable to overrule this program.
760
- dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
882
+ # will honor the 'STRIP' environment variable to overrule this program.
883
+ dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
761
884
  if test "$cross_compiling" != no; then
762
885
  AC_CHECK_TOOL([STRIP], [strip], :)
763
886
  fi
764
887
  INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
765
888
  AC_SUBST([INSTALL_STRIP_PROGRAM])])
766
889
 
767
- # Copyright (C) 2006 Free Software Foundation, Inc.
890
+ # Copyright (C) 2006-2013 Free Software Foundation, Inc.
768
891
  #
769
892
  # This file is free software; the Free Software Foundation
770
893
  # gives unlimited permission to copy and/or distribute it,
@@ -772,24 +895,27 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
772
895
 
773
896
  # _AM_SUBST_NOTMAKE(VARIABLE)
774
897
  # ---------------------------
775
- # Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
898
+ # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
776
899
  # This macro is traced by Automake.
777
900
  AC_DEFUN([_AM_SUBST_NOTMAKE])
778
901
 
902
+ # AM_SUBST_NOTMAKE(VARIABLE)
903
+ # --------------------------
904
+ # Public sister of _AM_SUBST_NOTMAKE.
905
+ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
906
+
779
907
  # Check how to create a tarball. -*- Autoconf -*-
780
908
 
781
- # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
909
+ # Copyright (C) 2004-2013 Free Software Foundation, Inc.
782
910
  #
783
911
  # This file is free software; the Free Software Foundation
784
912
  # gives unlimited permission to copy and/or distribute it,
785
913
  # with or without modifications, as long as this notice is preserved.
786
914
 
787
- # serial 2
788
-
789
915
  # _AM_PROG_TAR(FORMAT)
790
916
  # --------------------
791
917
  # Check how to create a tarball in format FORMAT.
792
- # FORMAT should be one of `v7', `ustar', or `pax'.
918
+ # FORMAT should be one of 'v7', 'ustar', or 'pax'.
793
919
  #
794
920
  # Substitute a variable $(am__tar) that is a command
795
921
  # writing to stdout a FORMAT-tarball containing the directory
@@ -800,10 +926,11 @@ AC_DEFUN([_AM_SUBST_NOTMAKE])
800
926
  # a tarball read from stdin.
801
927
  # $(am__untar) < result.tar
802
928
  AC_DEFUN([_AM_PROG_TAR],
803
- [# Always define AMTAR for backward compatibility.
804
- AM_MISSING_PROG([AMTAR], [tar])
929
+ [# Always define AMTAR for backward compatibility. Yes, it's still used
930
+ # in the wild :-( We should find a proper way to deprecate it ...
931
+ AC_SUBST([AMTAR], ['$${TAR-tar}'])
805
932
  m4_if([$1], [v7],
806
- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
933
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
807
934
  [m4_case([$1], [ustar],, [pax],,
808
935
  [m4_fatal([Unknown tar format])])
809
936
  AC_MSG_CHECKING([how to create a $1 tar archive])
@@ -811,7 +938,7 @@ AC_MSG_CHECKING([how to create a $1 tar archive])
811
938
  _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
812
939
  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
813
940
  # Do not fold the above two line into one, because Tru64 sh and
814
- # Solaris sh will not grok spaces in the rhs of `-'.
941
+ # Solaris sh will not grok spaces in the rhs of '-'.
815
942
  for _am_tool in $_am_tools
816
943
  do
817
944
  case $_am_tool in