| 1 | # generated automatically by aclocal 1.11.6 -*- Autoconf -*- |
| 2 | |
| 3 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
| 4 | # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, |
| 5 | # Inc. |
| 6 | # This file is free software; the Free Software Foundation |
| 7 | # gives unlimited permission to copy and/or distribute it, |
| 8 | # with or without modifications, as long as this notice is preserved. |
| 9 | |
| 10 | # This program is distributed in the hope that it will be useful, |
| 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
| 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| 13 | # PARTICULAR PURPOSE. |
| 14 | |
| 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'.])]) |
| 22 | |
| 23 | # =========================================================================== |
| 24 | # http://www.gnu.org/software/autoconf-archive/ax_append_flag.html |
| 25 | # =========================================================================== |
| 26 | # |
| 27 | # SYNOPSIS |
| 28 | # |
| 29 | # AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE]) |
| 30 | # |
| 31 | # DESCRIPTION |
| 32 | # |
| 33 | # FLAG is appended to the FLAGS-VARIABLE shell variable, with a space |
| 34 | # added in between. |
| 35 | # |
| 36 | # If FLAGS-VARIABLE is not specified, the current language's flags (e.g. |
| 37 | # CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains |
| 38 | # FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly |
| 39 | # FLAG. |
| 40 | # |
| 41 | # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. |
| 42 | # |
| 43 | # LICENSE |
| 44 | # |
| 45 | # Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> |
| 46 | # Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> |
| 47 | # |
| 48 | # This program is free software: you can redistribute it and/or modify it |
| 49 | # under the terms of the GNU General Public License as published by the |
| 50 | # Free Software Foundation, either version 3 of the License, or (at your |
| 51 | # option) any later version. |
| 52 | # |
| 53 | # This program is distributed in the hope that it will be useful, but |
| 54 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 55 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| 56 | # Public License for more details. |
| 57 | # |
| 58 | # You should have received a copy of the GNU General Public License along |
| 59 | # with this program. If not, see <http://www.gnu.org/licenses/>. |
| 60 | # |
| 61 | # As a special exception, the respective Autoconf Macro's copyright owner |
| 62 | # gives unlimited permission to copy, distribute and modify the configure |
| 63 | # scripts that are the output of Autoconf when processing the Macro. You |
| 64 | # need not follow the terms of the GNU General Public License when using |
| 65 | # or distributing such scripts, even though portions of the text of the |
| 66 | # Macro appear in them. The GNU General Public License (GPL) does govern |
| 67 | # all other use of the material that constitutes the Autoconf Macro. |
| 68 | # |
| 69 | # This special exception to the GPL applies to versions of the Autoconf |
| 70 | # Macro released by the Autoconf Archive. When you make and distribute a |
| 71 | # modified version of the Autoconf Macro, you may extend this special |
| 72 | # exception to the GPL to apply to your modified version as well. |
| 73 | |
| 74 | #serial 2 |
| 75 | |
| 76 | AC_DEFUN([AX_APPEND_FLAG], |
| 77 | [AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX |
| 78 | AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])dnl |
| 79 | AS_VAR_SET_IF(FLAGS, |
| 80 | [case " AS_VAR_GET(FLAGS) " in |
| 81 | *" $1 "*) |
| 82 | AC_RUN_LOG([: FLAGS already contains $1]) |
| 83 | ;; |
| 84 | *) |
| 85 | AC_RUN_LOG([: FLAGS="$FLAGS $1"]) |
| 86 | AS_VAR_SET(FLAGS, ["AS_VAR_GET(FLAGS) $1"]) |
| 87 | ;; |
| 88 | esac], |
| 89 | [AS_VAR_SET(FLAGS,["$1"])]) |
| 90 | AS_VAR_POPDEF([FLAGS])dnl |
| 91 | ])dnl AX_APPEND_FLAG |
| 92 | |
| 93 | # =========================================================================== |
| 94 | # http://www.gnu.org/software/autoconf-archive/ax_cflags_warn_all.html |
| 95 | # =========================================================================== |
| 96 | # |
| 97 | # SYNOPSIS |
| 98 | # |
| 99 | # AX_CFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])] |
| 100 | # AX_CXXFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])] |
| 101 | # AX_FCFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])] |
| 102 | # |
| 103 | # DESCRIPTION |
| 104 | # |
| 105 | # Try to find a compiler option that enables most reasonable warnings. |
| 106 | # |
| 107 | # For the GNU compiler it will be -Wall (and -ansi -pedantic) The result |
| 108 | # is added to the shellvar being CFLAGS, CXXFLAGS, or FCFLAGS by default. |
| 109 | # |
| 110 | # Currently this macro knows about the GCC, Solaris, Digital Unix, AIX, |
| 111 | # HP-UX, IRIX, NEC SX-5 (Super-UX 10), Cray J90 (Unicos 10.0.0.8), and |
| 112 | # Intel compilers. For a given compiler, the Fortran flags are much more |
| 113 | # experimental than their C equivalents. |
| 114 | # |
| 115 | # - $1 shell-variable-to-add-to : CFLAGS, CXXFLAGS, or FCFLAGS |
| 116 | # - $2 add-value-if-not-found : nothing |
| 117 | # - $3 action-if-found : add value to shellvariable |
| 118 | # - $4 action-if-not-found : nothing |
| 119 | # |
| 120 | # NOTE: These macros depend on AX_APPEND_FLAG. |
| 121 | # |
| 122 | # LICENSE |
| 123 | # |
| 124 | # Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> |
| 125 | # Copyright (c) 2010 Rhys Ulerich <rhys.ulerich@gmail.com> |
| 126 | # |
| 127 | # This program is free software; you can redistribute it and/or modify it |
| 128 | # under the terms of the GNU General Public License as published by the |
| 129 | # Free Software Foundation; either version 3 of the License, or (at your |
| 130 | # option) any later version. |
| 131 | # |
| 132 | # This program is distributed in the hope that it will be useful, but |
| 133 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 134 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| 135 | # Public License for more details. |
| 136 | # |
| 137 | # You should have received a copy of the GNU General Public License along |
| 138 | # with this program. If not, see <http://www.gnu.org/licenses/>. |
| 139 | # |
| 140 | # As a special exception, the respective Autoconf Macro's copyright owner |
| 141 | # gives unlimited permission to copy, distribute and modify the configure |
| 142 | # scripts that are the output of Autoconf when processing the Macro. You |
| 143 | # need not follow the terms of the GNU General Public License when using |
| 144 | # or distributing such scripts, even though portions of the text of the |
| 145 | # Macro appear in them. The GNU General Public License (GPL) does govern |
| 146 | # all other use of the material that constitutes the Autoconf Macro. |
| 147 | # |
| 148 | # This special exception to the GPL applies to versions of the Autoconf |
| 149 | # Macro released by the Autoconf Archive. When you make and distribute a |
| 150 | # modified version of the Autoconf Macro, you may extend this special |
| 151 | # exception to the GPL to apply to your modified version as well. |
| 152 | |
| 153 | #serial 13 |
| 154 | |
| 155 | AC_DEFUN([AX_FLAGS_WARN_ALL],[dnl |
| 156 | AS_VAR_PUSHDEF([FLAGS],[_AC_LANG_PREFIX[]FLAGS])dnl |
| 157 | AS_VAR_PUSHDEF([VAR],[ac_cv_[]_AC_LANG_ABBREV[]flags_warn_all])dnl |
| 158 | AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings], |
| 159 | VAR,[VAR="no, unknown" |
| 160 | ac_save_[]FLAGS="$[]FLAGS" |
| 161 | for ac_arg dnl |
| 162 | in "-warn all % -warn all" dnl Intel |
| 163 | "-pedantic % -Wall" dnl GCC |
| 164 | "-xstrconst % -v" dnl Solaris C |
| 165 | "-std1 % -verbose -w0 -warnprotos" dnl Digital Unix |
| 166 | "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX |
| 167 | "-ansi -ansiE % -fullwarn" dnl IRIX |
| 168 | "+ESlit % +w1" dnl HP-UX C |
| 169 | "-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10) |
| 170 | "-h conform % -h msglevel 2" dnl Cray C (Unicos) |
| 171 | # |
| 172 | do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` |
| 173 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM], |
| 174 | [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) |
| 175 | done |
| 176 | FLAGS="$ac_save_[]FLAGS" |
| 177 | ]) |
| 178 | AS_VAR_POPDEF([FLAGS])dnl |
| 179 | case ".$VAR" in |
| 180 | .ok|.ok,*) m4_ifvaln($3,$3) ;; |
| 181 | .|.no|.no,*) m4_default($4,[m4_ifval($2,[AX_APPEND_FLAG([$2], [$1])])]) ;; |
| 182 | *) m4_default($3,[AX_APPEND_FLAG([$VAR], [$1])]) ;; |
| 183 | esac |
| 184 | AS_VAR_POPDEF([VAR])dnl |
| 185 | ])dnl AX_FLAGS_WARN_ALL |
| 186 | dnl implementation tactics: |
| 187 | dnl the for-argument contains a list of options. The first part of |
| 188 | dnl these does only exist to detect the compiler - usually it is |
| 189 | dnl a global option to enable -ansi or -extrawarnings. All other |
| 190 | dnl compilers will fail about it. That was needed since a lot of |
| 191 | dnl compilers will give false positives for some option-syntax |
| 192 | dnl like -Woption or -Xoption as they think of it is a pass-through |
| 193 | dnl to later compile stages or something. The "%" is used as a |
| 194 | dnl delimiter. A non-option comment can be given after "%%" marks |
| 195 | dnl which will be shown but not added to the respective C/CXXFLAGS. |
| 196 | |
| 197 | AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl |
| 198 | AC_LANG_PUSH([C]) |
| 199 | AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4]) |
| 200 | AC_LANG_POP([C]) |
| 201 | ]) |
| 202 | |
| 203 | AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl |
| 204 | AC_LANG_PUSH([C++]) |
| 205 | AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4]) |
| 206 | AC_LANG_POP([C++]) |
| 207 | ]) |
| 208 | |
| 209 | AC_DEFUN([AX_FCFLAGS_WARN_ALL],[dnl |
| 210 | AC_LANG_PUSH([Fortran]) |
| 211 | AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4]) |
| 212 | AC_LANG_POP([Fortran]) |
| 213 | ]) |
| 214 | |
| 215 | # =========================================================================== |
| 216 | # http://www.gnu.org/software/autoconf-archive/ax_compare_version.html |
| 217 | # =========================================================================== |
| 218 | # |
| 219 | # SYNOPSIS |
| 220 | # |
| 221 | # AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) |
| 222 | # |
| 223 | # DESCRIPTION |
| 224 | # |
| 225 | # This macro compares two version strings. Due to the various number of |
| 226 | # minor-version numbers that can exist, and the fact that string |
| 227 | # comparisons are not compatible with numeric comparisons, this is not |
| 228 | # necessarily trivial to do in a autoconf script. This macro makes doing |
| 229 | # these comparisons easy. |
| 230 | # |
| 231 | # The six basic comparisons are available, as well as checking equality |
| 232 | # limited to a certain number of minor-version levels. |
| 233 | # |
| 234 | # The operator OP determines what type of comparison to do, and can be one |
| 235 | # of: |
| 236 | # |
| 237 | # eq - equal (test A == B) |
| 238 | # ne - not equal (test A != B) |
| 239 | # le - less than or equal (test A <= B) |
| 240 | # ge - greater than or equal (test A >= B) |
| 241 | # lt - less than (test A < B) |
| 242 | # gt - greater than (test A > B) |
| 243 | # |
| 244 | # Additionally, the eq and ne operator can have a number after it to limit |
| 245 | # the test to that number of minor versions. |
| 246 | # |
| 247 | # eq0 - equal up to the length of the shorter version |
| 248 | # ne0 - not equal up to the length of the shorter version |
| 249 | # eqN - equal up to N sub-version levels |
| 250 | # neN - not equal up to N sub-version levels |
| 251 | # |
| 252 | # When the condition is true, shell commands ACTION-IF-TRUE are run, |
| 253 | # otherwise shell commands ACTION-IF-FALSE are run. The environment |
| 254 | # variable 'ax_compare_version' is always set to either 'true' or 'false' |
| 255 | # as well. |
| 256 | # |
| 257 | # Examples: |
| 258 | # |
| 259 | # AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8]) |
| 260 | # AX_COMPARE_VERSION([3.15],[lt],[3.15.8]) |
| 261 | # |
| 262 | # would both be true. |
| 263 | # |
| 264 | # AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8]) |
| 265 | # AX_COMPARE_VERSION([3.15],[gt],[3.15.8]) |
| 266 | # |
| 267 | # would both be false. |
| 268 | # |
| 269 | # AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8]) |
| 270 | # |
| 271 | # would be true because it is only comparing two minor versions. |
| 272 | # |
| 273 | # AX_COMPARE_VERSION([3.15.7],[eq0],[3.15]) |
| 274 | # |
| 275 | # would be true because it is only comparing the lesser number of minor |
| 276 | # versions of the two values. |
| 277 | # |
| 278 | # Note: The characters that separate the version numbers do not matter. An |
| 279 | # empty string is the same as version 0. OP is evaluated by autoconf, not |
| 280 | # configure, so must be a string, not a variable. |
| 281 | # |
| 282 | # The author would like to acknowledge Guido Draheim whose advice about |
| 283 | # the m4_case and m4_ifvaln functions make this macro only include the |
| 284 | # portions necessary to perform the specific comparison specified by the |
| 285 | # OP argument in the final configure script. |
| 286 | # |
| 287 | # LICENSE |
| 288 | # |
| 289 | # Copyright (c) 2008 Tim Toolan <toolan@ele.uri.edu> |
| 290 | # |
| 291 | # Copying and distribution of this file, with or without modification, are |
| 292 | # permitted in any medium without royalty provided the copyright notice |
| 293 | # and this notice are preserved. This file is offered as-is, without any |
| 294 | # warranty. |
| 295 | |
| 296 | #serial 11 |
| 297 | |
| 298 | dnl ######################################################################### |
| 299 | AC_DEFUN([AX_COMPARE_VERSION], [ |
| 300 | AC_REQUIRE([AC_PROG_AWK]) |
| 301 | |
| 302 | # Used to indicate true or false condition |
| 303 | ax_compare_version=false |
| 304 | |
| 305 | # Convert the two version strings to be compared into a format that |
| 306 | # allows a simple string comparison. The end result is that a version |
| 307 | # string of the form 1.12.5-r617 will be converted to the form |
| 308 | # 0001001200050617. In other words, each number is zero padded to four |
| 309 | # digits, and non digits are removed. |
| 310 | AS_VAR_PUSHDEF([A],[ax_compare_version_A]) |
| 311 | A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ |
| 312 | -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ |
| 313 | -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ |
| 314 | -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ |
| 315 | -e 's/[[^0-9]]//g'` |
| 316 | |
| 317 | AS_VAR_PUSHDEF([B],[ax_compare_version_B]) |
| 318 | B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ |
| 319 | -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ |
| 320 | -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ |
| 321 | -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ |
| 322 | -e 's/[[^0-9]]//g'` |
| 323 | |
| 324 | dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary |
| 325 | dnl # then the first line is used to determine if the condition is true. |
| 326 | dnl # The sed right after the echo is to remove any indented white space. |
| 327 | m4_case(m4_tolower($2), |
| 328 | [lt],[ |
| 329 | ax_compare_version=`echo "x$A |
| 330 | x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"` |
| 331 | ], |
| 332 | [gt],[ |
| 333 | ax_compare_version=`echo "x$A |
| 334 | x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"` |
| 335 | ], |
| 336 | [le],[ |
| 337 | ax_compare_version=`echo "x$A |
| 338 | x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"` |
| 339 | ], |
| 340 | [ge],[ |
| 341 | ax_compare_version=`echo "x$A |
| 342 | x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"` |
| 343 | ],[ |
| 344 | dnl Split the operator from the subversion count if present. |
| 345 | m4_bmatch(m4_substr($2,2), |
| 346 | [0],[ |
| 347 | # A count of zero means use the length of the shorter version. |
| 348 | # Determine the number of characters in A and B. |
| 349 | ax_compare_version_len_A=`echo "$A" | $AWK '{print(length)}'` |
| 350 | ax_compare_version_len_B=`echo "$B" | $AWK '{print(length)}'` |
| 351 | |
| 352 | # Set A to no more than B's length and B to no more than A's length. |
| 353 | A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"` |
| 354 | B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"` |
| 355 | ], |
| 356 | [[0-9]+],[ |
| 357 | # A count greater than zero means use only that many subversions |
| 358 | A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` |
| 359 | B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` |
| 360 | ], |
| 361 | [.+],[ |
| 362 | AC_WARNING( |
| 363 | [illegal OP numeric parameter: $2]) |
| 364 | ],[]) |
| 365 | |
| 366 | # Pad zeros at end of numbers to make same length. |
| 367 | ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`" |
| 368 | B="$B`echo $A | sed 's/./0/g'`" |
| 369 | A="$ax_compare_version_tmp_A" |
| 370 | |
| 371 | # Check for equality or inequality as necessary. |
| 372 | m4_case(m4_tolower(m4_substr($2,0,2)), |
| 373 | [eq],[ |
| 374 | test "x$A" = "x$B" && ax_compare_version=true |
| 375 | ], |
| 376 | [ne],[ |
| 377 | test "x$A" != "x$B" && ax_compare_version=true |
| 378 | ],[ |
| 379 | AC_WARNING([illegal OP parameter: $2]) |
| 380 | ]) |
| 381 | ]) |
| 382 | |
| 383 | AS_VAR_POPDEF([A])dnl |
| 384 | AS_VAR_POPDEF([B])dnl |
| 385 | |
| 386 | dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE. |
| 387 | if test "$ax_compare_version" = "true" ; then |
| 388 | m4_ifvaln([$4],[$4],[:])dnl |
| 389 | m4_ifvaln([$5],[else $5])dnl |
| 390 | fi |
| 391 | ]) dnl AX_COMPARE_VERSION |
| 392 | |
| 393 | # =========================================================================== |
| 394 | # http://www.gnu.org/software/autoconf-archive/ax_prog_perl_version.html |
| 395 | # =========================================================================== |
| 396 | # |
| 397 | # SYNOPSIS |
| 398 | # |
| 399 | # AX_PROG_PERL_VERSION([VERSION],[ACTION-IF-TRUE],[ACTION-IF-FALSE]) |
| 400 | # |
| 401 | # DESCRIPTION |
| 402 | # |
| 403 | # Makes sure that perl supports the version indicated. If true the shell |
| 404 | # commands in ACTION-IF-TRUE are executed. If not the shell commands in |
| 405 | # ACTION-IF-FALSE are run. Note if $PERL is not set (for example by |
| 406 | # running AC_CHECK_PROG or AC_PATH_PROG) the macro will fail. |
| 407 | # |
| 408 | # Example: |
| 409 | # |
| 410 | # AC_PATH_PROG([PERL],[perl]) |
| 411 | # AX_PROG_PERL_VERSION([5.8.0],[ ... ],[ ... ]) |
| 412 | # |
| 413 | # This will check to make sure that the perl you have supports at least |
| 414 | # version 5.8.0. |
| 415 | # |
| 416 | # NOTE: This macro uses the $PERL variable to perform the check. |
| 417 | # AX_WITH_PERL can be used to set that variable prior to running this |
| 418 | # macro. The $PERL_VERSION variable will be valorized with the detected |
| 419 | # version. |
| 420 | # |
| 421 | # LICENSE |
| 422 | # |
| 423 | # Copyright (c) 2009 Francesco Salvestrini <salvestrini@users.sourceforge.net> |
| 424 | # |
| 425 | # Copying and distribution of this file, with or without modification, are |
| 426 | # permitted in any medium without royalty provided the copyright notice |
| 427 | # and this notice are preserved. This file is offered as-is, without any |
| 428 | # warranty. |
| 429 | |
| 430 | #serial 11 |
| 431 | |
| 432 | AC_DEFUN([AX_PROG_PERL_VERSION],[ |
| 433 | AC_REQUIRE([AC_PROG_SED]) |
| 434 | AC_REQUIRE([AC_PROG_GREP]) |
| 435 | |
| 436 | AS_IF([test -n "$PERL"],[ |
| 437 | ax_perl_version="$1" |
| 438 | |
| 439 | AC_MSG_CHECKING([for perl version]) |
| 440 | changequote(<<,>>) |
| 441 | perl_version=`$PERL --version 2>&1 | $GREP "This is perl" | $SED -e 's/.* v\([0-9]*\.[0-9]*\.[0-9]*\) .*/\1/'` |
| 442 | changequote([,]) |
| 443 | AC_MSG_RESULT($perl_version) |
| 444 | |
| 445 | AC_SUBST([PERL_VERSION],[$perl_version]) |
| 446 | |
| 447 | AX_COMPARE_VERSION([$ax_perl_version],[le],[$perl_version],[ |
| 448 | : |
| 449 | $2 |
| 450 | ],[ |
| 451 | : |
| 452 | $3 |
| 453 | ]) |
| 454 | ],[ |
| 455 | AC_MSG_WARN([could not find the perl interpreter]) |
| 456 | $3 |
| 457 | ]) |
| 458 | ]) |
| 459 | |
| 460 | # =========================================================================== |
| 461 | # http://www.gnu.org/software/autoconf-archive/ax_python_module.html |
| 462 | # =========================================================================== |
| 463 | # |
| 464 | # SYNOPSIS |
| 465 | # |
| 466 | # AX_PYTHON_MODULE(modname[, fatal]) |
| 467 | # |
| 468 | # DESCRIPTION |
| 469 | # |
| 470 | # Checks for Python module. |
| 471 | # |
| 472 | # If fatal is non-empty then absence of a module will trigger an error. |
| 473 | # |
| 474 | # LICENSE |
| 475 | # |
| 476 | # Copyright (c) 2008 Andrew Collier <colliera@ukzn.ac.za> |
| 477 | # |
| 478 | # Copying and distribution of this file, with or without modification, are |
| 479 | # permitted in any medium without royalty provided the copyright notice |
| 480 | # and this notice are preserved. This file is offered as-is, without any |
| 481 | # warranty. |
| 482 | |
| 483 | #serial 5 |
| 484 | |
| 485 | AU_ALIAS([AC_PYTHON_MODULE], [AX_PYTHON_MODULE]) |
| 486 | AC_DEFUN([AX_PYTHON_MODULE],[ |
| 487 | if test -z $PYTHON; |
| 488 | then |
| 489 | PYTHON="python" |
| 490 | fi |
| 491 | PYTHON_NAME=`basename $PYTHON` |
| 492 | AC_MSG_CHECKING($PYTHON_NAME module: $1) |
| 493 | $PYTHON -c "import $1" 2>/dev/null |
| 494 | if test $? -eq 0; |
| 495 | then |
| 496 | AC_MSG_RESULT(yes) |
| 497 | eval AS_TR_CPP(HAVE_PYMOD_$1)=yes |
| 498 | else |
| 499 | AC_MSG_RESULT(no) |
| 500 | eval AS_TR_CPP(HAVE_PYMOD_$1)=no |
| 501 | # |
| 502 | if test -n "$2" |
| 503 | then |
| 504 | AC_MSG_ERROR(failed to find required module $1) |
| 505 | exit 1 |
| 506 | fi |
| 507 | fi |
| 508 | ]) |
| 509 | |
| 510 | dnl *@--NOTICE--@* Common File Distribution |
| 511 | |
| 512 | dnl --- *@-mdw_AUTO_VERSION-@* --- |
| 513 | dnl |
| 514 | dnl Author: Mark Wooding |
| 515 | dnl |
| 516 | dnl Synopsis: mdw_AUTO_VERSION |
| 517 | dnl |
| 518 | dnl Arguments: --- |
| 519 | dnl |
| 520 | dnl Use: Defines an m4 macro AUTO_VERSION which contains the current |
| 521 | dnl version number, worked out in some clever way. |
| 522 | |
| 523 | AC_DEFUN([mdw_AUTO_VERSION], [nobody cares...]) |
| 524 | m4_define([mdw_AUTO_VERSION], [m4_define([AUTO_VERSION], m4_esyscmd([ |
| 525 | ver=UNKNOWN |
| 526 | for pre in ./ config/; do |
| 527 | for post in "" .in; do |
| 528 | try=${pre}auto-version${post} |
| 529 | if test -x $try; then ver=$("$try"); break; fi |
| 530 | done |
| 531 | done |
| 532 | echo -n "$ver" |
| 533 | ]))]) |
| 534 | |
| 535 | |
| 536 | dnl *@--NOTICE--@* Common File Distribution |
| 537 | |
| 538 | dnl --- *@-mdw_SILENT_RULES-@* --- |
| 539 | dnl |
| 540 | dnl Author: Mark Wooding |
| 541 | dnl |
| 542 | dnl Synopsis: mdw_SILENT_RULES |
| 543 | dnl |
| 544 | dnl Arguments: --- |
| 545 | dnl |
| 546 | dnl Use: Enables the Automake `silent-rules' feature, if available. |
| 547 | |
| 548 | AC_DEFUN([mdw_SILENT_RULES], [ |
| 549 | m4_ifdef([AM_SILENT_RULES], [ |
| 550 | AM_SILENT_RULES([yes]) |
| 551 | ], [ |
| 552 | AC_SUBST([AM_DEFAULT_VERBOSITY], [1]) |
| 553 | ]) |
| 554 | ]) |
| 555 | |
| 556 | |
| 557 | # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- |
| 558 | # serial 1 (pkg-config-0.24) |
| 559 | # |
| 560 | # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. |
| 561 | # |
| 562 | # This program is free software; you can redistribute it and/or modify |
| 563 | # it under the terms of the GNU General Public License as published by |
| 564 | # the Free Software Foundation; either version 2 of the License, or |
| 565 | # (at your option) any later version. |
| 566 | # |
| 567 | # This program is distributed in the hope that it will be useful, but |
| 568 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 569 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 570 | # General Public License for more details. |
| 571 | # |
| 572 | # You should have received a copy of the GNU General Public License |
| 573 | # along with this program; if not, write to the Free Software |
| 574 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 575 | # |
| 576 | # As a special exception to the GNU General Public License, if you |
| 577 | # distribute this file as part of a program that contains a |
| 578 | # configuration script generated by Autoconf, you may include it under |
| 579 | # the same distribution terms that you use for the rest of that program. |
| 580 | |
| 581 | # PKG_PROG_PKG_CONFIG([MIN-VERSION]) |
| 582 | # ---------------------------------- |
| 583 | AC_DEFUN([PKG_PROG_PKG_CONFIG], |
| 584 | [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) |
| 585 | m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) |
| 586 | m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) |
| 587 | AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) |
| 588 | AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) |
| 589 | AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) |
| 590 | |
| 591 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then |
| 592 | AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) |
| 593 | fi |
| 594 | if test -n "$PKG_CONFIG"; then |
| 595 | _pkg_min_version=m4_default([$1], [0.9.0]) |
| 596 | AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) |
| 597 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then |
| 598 | AC_MSG_RESULT([yes]) |
| 599 | else |
| 600 | AC_MSG_RESULT([no]) |
| 601 | PKG_CONFIG="" |
| 602 | fi |
| 603 | fi[]dnl |
| 604 | ])# PKG_PROG_PKG_CONFIG |
| 605 | |
| 606 | # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
| 607 | # |
| 608 | # Check to see whether a particular set of modules exists. Similar |
| 609 | # to PKG_CHECK_MODULES(), but does not set variables or print errors. |
| 610 | # |
| 611 | # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
| 612 | # only at the first occurence in configure.ac, so if the first place |
| 613 | # it's called might be skipped (such as if it is within an "if", you |
| 614 | # have to call PKG_CHECK_EXISTS manually |
| 615 | # -------------------------------------------------------------- |
| 616 | AC_DEFUN([PKG_CHECK_EXISTS], |
| 617 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
| 618 | if test -n "$PKG_CONFIG" && \ |
| 619 | AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then |
| 620 | m4_default([$2], [:]) |
| 621 | m4_ifvaln([$3], [else |
| 622 | $3])dnl |
| 623 | fi]) |
| 624 | |
| 625 | # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) |
| 626 | # --------------------------------------------- |
| 627 | m4_define([_PKG_CONFIG], |
| 628 | [if test -n "$$1"; then |
| 629 | pkg_cv_[]$1="$$1" |
| 630 | elif test -n "$PKG_CONFIG"; then |
| 631 | PKG_CHECK_EXISTS([$3], |
| 632 | [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` |
| 633 | test "x$?" != "x0" && pkg_failed=yes ], |
| 634 | [pkg_failed=yes]) |
| 635 | else |
| 636 | pkg_failed=untried |
| 637 | fi[]dnl |
| 638 | ])# _PKG_CONFIG |
| 639 | |
| 640 | # _PKG_SHORT_ERRORS_SUPPORTED |
| 641 | # ----------------------------- |
| 642 | AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], |
| 643 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
| 644 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
| 645 | _pkg_short_errors_supported=yes |
| 646 | else |
| 647 | _pkg_short_errors_supported=no |
| 648 | fi[]dnl |
| 649 | ])# _PKG_SHORT_ERRORS_SUPPORTED |
| 650 | |
| 651 | |
| 652 | # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], |
| 653 | # [ACTION-IF-NOT-FOUND]) |
| 654 | # |
| 655 | # |
| 656 | # Note that if there is a possibility the first call to |
| 657 | # PKG_CHECK_MODULES might not happen, you should be sure to include an |
| 658 | # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac |
| 659 | # |
| 660 | # |
| 661 | # -------------------------------------------------------------- |
| 662 | AC_DEFUN([PKG_CHECK_MODULES], |
| 663 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
| 664 | AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl |
| 665 | AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl |
| 666 | |
| 667 | pkg_failed=no |
| 668 | AC_MSG_CHECKING([for $1]) |
| 669 | |
| 670 | _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) |
| 671 | _PKG_CONFIG([$1][_LIBS], [libs], [$2]) |
| 672 | |
| 673 | m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS |
| 674 | and $1[]_LIBS to avoid the need to call pkg-config. |
| 675 | See the pkg-config man page for more details.]) |
| 676 | |
| 677 | if test $pkg_failed = yes; then |
| 678 | AC_MSG_RESULT([no]) |
| 679 | _PKG_SHORT_ERRORS_SUPPORTED |
| 680 | if test $_pkg_short_errors_supported = yes; then |
| 681 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` |
| 682 | else |
| 683 | $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` |
| 684 | fi |
| 685 | # Put the nasty error message in config.log where it belongs |
| 686 | echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD |
| 687 | |
| 688 | m4_default([$4], [AC_MSG_ERROR( |
| 689 | [Package requirements ($2) were not met: |
| 690 | |
| 691 | $$1_PKG_ERRORS |
| 692 | |
| 693 | Consider adjusting the PKG_CONFIG_PATH environment variable if you |
| 694 | installed software in a non-standard prefix. |
| 695 | |
| 696 | _PKG_TEXT])[]dnl |
| 697 | ]) |
| 698 | elif test $pkg_failed = untried; then |
| 699 | AC_MSG_RESULT([no]) |
| 700 | m4_default([$4], [AC_MSG_FAILURE( |
| 701 | [The pkg-config script could not be found or is too old. Make sure it |
| 702 | is in your PATH or set the PKG_CONFIG environment variable to the full |
| 703 | path to pkg-config. |
| 704 | |
| 705 | _PKG_TEXT |
| 706 | |
| 707 | To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl |
| 708 | ]) |
| 709 | else |
| 710 | $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS |
| 711 | $1[]_LIBS=$pkg_cv_[]$1[]_LIBS |
| 712 | AC_MSG_RESULT([yes]) |
| 713 | $3 |
| 714 | fi[]dnl |
| 715 | ])# PKG_CHECK_MODULES |
| 716 | |
| 717 | # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software |
| 718 | # Foundation, Inc. |
| 719 | # |
| 720 | # This file is free software; the Free Software Foundation |
| 721 | # gives unlimited permission to copy and/or distribute it, |
| 722 | # with or without modifications, as long as this notice is preserved. |
| 723 | |
| 724 | # serial 1 |
| 725 | |
| 726 | # AM_AUTOMAKE_VERSION(VERSION) |
| 727 | # ---------------------------- |
| 728 | # Automake X.Y traces this macro to ensure aclocal.m4 has been |
| 729 | # generated from the m4 files accompanying Automake X.Y. |
| 730 | # (This private macro should not be called outside this file.) |
| 731 | AC_DEFUN([AM_AUTOMAKE_VERSION], |
| 732 | [am__api_version='1.11' |
| 733 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to |
| 734 | dnl require some minimum version. Point them to the right macro. |
| 735 | m4_if([$1], [1.11.6], [], |
| 736 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl |
| 737 | ]) |
| 738 | |
| 739 | # _AM_AUTOCONF_VERSION(VERSION) |
| 740 | # ----------------------------- |
| 741 | # aclocal traces this macro to find the Autoconf version. |
| 742 | # This is a private macro too. Using m4_define simplifies |
| 743 | # the logic in aclocal, which can simply ignore this definition. |
| 744 | m4_define([_AM_AUTOCONF_VERSION], []) |
| 745 | |
| 746 | # AM_SET_CURRENT_AUTOMAKE_VERSION |
| 747 | # ------------------------------- |
| 748 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. |
| 749 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. |
| 750 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
| 751 | [AM_AUTOMAKE_VERSION([1.11.6])dnl |
| 752 | m4_ifndef([AC_AUTOCONF_VERSION], |
| 753 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
| 754 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) |
| 755 | |
| 756 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- |
| 757 | |
| 758 | # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. |
| 759 | # |
| 760 | # This file is free software; the Free Software Foundation |
| 761 | # gives unlimited permission to copy and/or distribute it, |
| 762 | # with or without modifications, as long as this notice is preserved. |
| 763 | |
| 764 | # serial 1 |
| 765 | |
| 766 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets |
| 767 | # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to |
| 768 | # `$srcdir', `$srcdir/..', or `$srcdir/../..'. |
| 769 | # |
| 770 | # Of course, Automake must honor this variable whenever it calls a |
| 771 | # tool from the auxiliary directory. The problem is that $srcdir (and |
| 772 | # therefore $ac_aux_dir as well) can be either absolute or relative, |
| 773 | # depending on how configure is run. This is pretty annoying, since |
| 774 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top |
| 775 | # source directory, any form will work fine, but in subdirectories a |
| 776 | # relative path needs to be adjusted first. |
| 777 | # |
| 778 | # $ac_aux_dir/missing |
| 779 | # fails when called from a subdirectory if $ac_aux_dir is relative |
| 780 | # $top_srcdir/$ac_aux_dir/missing |
| 781 | # fails if $ac_aux_dir is absolute, |
| 782 | # fails when called from a subdirectory in a VPATH build with |
| 783 | # a relative $ac_aux_dir |
| 784 | # |
| 785 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir |
| 786 | # are both prefixed by $srcdir. In an in-source build this is usually |
| 787 | # harmless because $srcdir is `.', but things will broke when you |
| 788 | # start a VPATH build or use an absolute $srcdir. |
| 789 | # |
| 790 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, |
| 791 | # iff we strip the leading $srcdir from $ac_aux_dir. That would be: |
| 792 | # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` |
| 793 | # and then we would define $MISSING as |
| 794 | # MISSING="\${SHELL} $am_aux_dir/missing" |
| 795 | # This will work as long as MISSING is not called from configure, because |
| 796 | # unfortunately $(top_srcdir) has no meaning in configure. |
| 797 | # However there are other variables, like CC, which are often used in |
| 798 | # configure, and could therefore not use this "fixed" $ac_aux_dir. |
| 799 | # |
| 800 | # Another solution, used here, is to always expand $ac_aux_dir to an |
| 801 | # absolute PATH. The drawback is that using absolute paths prevent a |
| 802 | # configured tree to be moved without reconfiguration. |
| 803 | |
| 804 | AC_DEFUN([AM_AUX_DIR_EXPAND], |
| 805 | [dnl Rely on autoconf to set up CDPATH properly. |
| 806 | AC_PREREQ([2.50])dnl |
| 807 | # expand $ac_aux_dir to an absolute path |
| 808 | am_aux_dir=`cd $ac_aux_dir && pwd` |
| 809 | ]) |
| 810 | |
| 811 | # AM_CONDITIONAL -*- Autoconf -*- |
| 812 | |
| 813 | # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 |
| 814 | # Free Software Foundation, Inc. |
| 815 | # |
| 816 | # This file is free software; the Free Software Foundation |
| 817 | # gives unlimited permission to copy and/or distribute it, |
| 818 | # with or without modifications, as long as this notice is preserved. |
| 819 | |
| 820 | # serial 9 |
| 821 | |
| 822 | # AM_CONDITIONAL(NAME, SHELL-CONDITION) |
| 823 | # ------------------------------------- |
| 824 | # Define a conditional. |
| 825 | AC_DEFUN([AM_CONDITIONAL], |
| 826 | [AC_PREREQ(2.52)dnl |
| 827 | ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], |
| 828 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl |
| 829 | AC_SUBST([$1_TRUE])dnl |
| 830 | AC_SUBST([$1_FALSE])dnl |
| 831 | _AM_SUBST_NOTMAKE([$1_TRUE])dnl |
| 832 | _AM_SUBST_NOTMAKE([$1_FALSE])dnl |
| 833 | m4_define([_AM_COND_VALUE_$1], [$2])dnl |
| 834 | if $2; then |
| 835 | $1_TRUE= |
| 836 | $1_FALSE='#' |
| 837 | else |
| 838 | $1_TRUE='#' |
| 839 | $1_FALSE= |
| 840 | fi |
| 841 | AC_CONFIG_COMMANDS_PRE( |
| 842 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then |
| 843 | AC_MSG_ERROR([[conditional "$1" was never defined. |
| 844 | Usually this means the macro was only invoked conditionally.]]) |
| 845 | fi])]) |
| 846 | |
| 847 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, |
| 848 | # 2010, 2011 Free Software Foundation, Inc. |
| 849 | # |
| 850 | # This file is free software; the Free Software Foundation |
| 851 | # gives unlimited permission to copy and/or distribute it, |
| 852 | # with or without modifications, as long as this notice is preserved. |
| 853 | |
| 854 | # serial 12 |
| 855 | |
| 856 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be |
| 857 | # written in clear, in which case automake, when reading aclocal.m4, |
| 858 | # will think it sees a *use*, and therefore will trigger all it's |
| 859 | # C support machinery. Also note that it means that autoscan, seeing |
| 860 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... |
| 861 | |
| 862 | |
| 863 | # _AM_DEPENDENCIES(NAME) |
| 864 | # ---------------------- |
| 865 | # See how the compiler implements dependency checking. |
| 866 | # NAME is "CC", "CXX", "GCJ", or "OBJC". |
| 867 | # We try a few techniques and use that to set a single cache variable. |
| 868 | # |
| 869 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was |
| 870 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular |
| 871 | # dependency, and given that the user is not expected to run this macro, |
| 872 | # just rely on AC_PROG_CC. |
| 873 | AC_DEFUN([_AM_DEPENDENCIES], |
| 874 | [AC_REQUIRE([AM_SET_DEPDIR])dnl |
| 875 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl |
| 876 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl |
| 877 | AC_REQUIRE([AM_DEP_TRACK])dnl |
| 878 | |
| 879 | ifelse([$1], CC, [depcc="$CC" am_compiler_list=], |
| 880 | [$1], CXX, [depcc="$CXX" am_compiler_list=], |
| 881 | [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], |
| 882 | [$1], UPC, [depcc="$UPC" am_compiler_list=], |
| 883 | [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], |
| 884 | [depcc="$$1" am_compiler_list=]) |
| 885 | |
| 886 | AC_CACHE_CHECK([dependency style of $depcc], |
| 887 | [am_cv_$1_dependencies_compiler_type], |
| 888 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then |
| 889 | # We make a subdir and do the tests there. Otherwise we can end up |
| 890 | # making bogus files that we don't know about and never remove. For |
| 891 | # instance it was reported that on HP-UX the gcc test will end up |
| 892 | # making a dummy file named `D' -- because `-MD' means `put the output |
| 893 | # in D'. |
| 894 | rm -rf conftest.dir |
| 895 | mkdir conftest.dir |
| 896 | # Copy depcomp to subdir because otherwise we won't find it if we're |
| 897 | # using a relative directory. |
| 898 | cp "$am_depcomp" conftest.dir |
| 899 | cd conftest.dir |
| 900 | # We will build objects and dependencies in a subdirectory because |
| 901 | # it helps to detect inapplicable dependency modes. For instance |
| 902 | # both Tru64's cc and ICC support -MD to output dependencies as a |
| 903 | # side effect of compilation, but ICC will put the dependencies in |
| 904 | # the current directory while Tru64 will put them in the object |
| 905 | # directory. |
| 906 | mkdir sub |
| 907 | |
| 908 | am_cv_$1_dependencies_compiler_type=none |
| 909 | if test "$am_compiler_list" = ""; then |
| 910 | am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` |
| 911 | fi |
| 912 | am__universal=false |
| 913 | m4_case([$1], [CC], |
| 914 | [case " $depcc " in #( |
| 915 | *\ -arch\ *\ -arch\ *) am__universal=true ;; |
| 916 | esac], |
| 917 | [CXX], |
| 918 | [case " $depcc " in #( |
| 919 | *\ -arch\ *\ -arch\ *) am__universal=true ;; |
| 920 | esac]) |
| 921 | |
| 922 | for depmode in $am_compiler_list; do |
| 923 | # Setup a source with many dependencies, because some compilers |
| 924 | # like to wrap large dependency lists on column 80 (with \), and |
| 925 | # we should not choose a depcomp mode which is confused by this. |
| 926 | # |
| 927 | # We need to recreate these files for each test, as the compiler may |
| 928 | # overwrite some of them when testing with obscure command lines. |
| 929 | # This happens at least with the AIX C compiler. |
| 930 | : > sub/conftest.c |
| 931 | for i in 1 2 3 4 5 6; do |
| 932 | echo '#include "conftst'$i'.h"' >> sub/conftest.c |
| 933 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with |
| 934 | # Solaris 8's {/usr,}/bin/sh. |
| 935 | touch sub/conftst$i.h |
| 936 | done |
| 937 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf |
| 938 | |
| 939 | # We check with `-c' and `-o' for the sake of the "dashmstdout" |
| 940 | # mode. It turns out that the SunPro C++ compiler does not properly |
| 941 | # handle `-M -o', and we need to detect this. Also, some Intel |
| 942 | # versions had trouble with output in subdirs |
| 943 | am__obj=sub/conftest.${OBJEXT-o} |
| 944 | am__minus_obj="-o $am__obj" |
| 945 | case $depmode in |
| 946 | gcc) |
| 947 | # This depmode causes a compiler race in universal mode. |
| 948 | test "$am__universal" = false || continue |
| 949 | ;; |
| 950 | nosideeffect) |
| 951 | # after this tag, mechanisms are not by side-effect, so they'll |
| 952 | # only be used when explicitly requested |
| 953 | if test "x$enable_dependency_tracking" = xyes; then |
| 954 | continue |
| 955 | else |
| 956 | break |
| 957 | fi |
| 958 | ;; |
| 959 | msvc7 | msvc7msys | msvisualcpp | msvcmsys) |
| 960 | # This compiler won't grok `-c -o', but also, the minuso test has |
| 961 | # not run yet. These depmodes are late enough in the game, and |
| 962 | # so weak that their functioning should not be impacted. |
| 963 | am__obj=conftest.${OBJEXT-o} |
| 964 | am__minus_obj= |
| 965 | ;; |
| 966 | none) break ;; |
| 967 | esac |
| 968 | if depmode=$depmode \ |
| 969 | source=sub/conftest.c object=$am__obj \ |
| 970 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ |
| 971 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ |
| 972 | >/dev/null 2>conftest.err && |
| 973 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && |
| 974 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && |
| 975 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && |
| 976 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
| 977 | # icc doesn't choke on unknown options, it will just issue warnings |
| 978 | # or remarks (even with -Werror). So we grep stderr for any message |
| 979 | # that says an option was ignored or not supported. |
| 980 | # When given -MP, icc 7.0 and 7.1 complain thusly: |
| 981 | # icc: Command line warning: ignoring option '-M'; no argument required |
| 982 | # The diagnosis changed in icc 8.0: |
| 983 | # icc: Command line remark: option '-MP' not supported |
| 984 | if (grep 'ignoring option' conftest.err || |
| 985 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else |
| 986 | am_cv_$1_dependencies_compiler_type=$depmode |
| 987 | break |
| 988 | fi |
| 989 | fi |
| 990 | done |
| 991 | |
| 992 | cd .. |
| 993 | rm -rf conftest.dir |
| 994 | else |
| 995 | am_cv_$1_dependencies_compiler_type=none |
| 996 | fi |
| 997 | ]) |
| 998 | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) |
| 999 | AM_CONDITIONAL([am__fastdep$1], [ |
| 1000 | test "x$enable_dependency_tracking" != xno \ |
| 1001 | && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) |
| 1002 | ]) |
| 1003 | |
| 1004 | |
| 1005 | # AM_SET_DEPDIR |
| 1006 | # ------------- |
| 1007 | # Choose a directory name for dependency files. |
| 1008 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES |
| 1009 | AC_DEFUN([AM_SET_DEPDIR], |
| 1010 | [AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
| 1011 | AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl |
| 1012 | ]) |
| 1013 | |
| 1014 | |
| 1015 | # AM_DEP_TRACK |
| 1016 | # ------------ |
| 1017 | AC_DEFUN([AM_DEP_TRACK], |
| 1018 | [AC_ARG_ENABLE(dependency-tracking, |
| 1019 | [ --disable-dependency-tracking speeds up one-time build |
| 1020 | --enable-dependency-tracking do not reject slow dependency extractors]) |
| 1021 | if test "x$enable_dependency_tracking" != xno; then |
| 1022 | am_depcomp="$ac_aux_dir/depcomp" |
| 1023 | AMDEPBACKSLASH='\' |
| 1024 | am__nodep='_no' |
| 1025 | fi |
| 1026 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) |
| 1027 | AC_SUBST([AMDEPBACKSLASH])dnl |
| 1028 | _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl |
| 1029 | AC_SUBST([am__nodep])dnl |
| 1030 | _AM_SUBST_NOTMAKE([am__nodep])dnl |
| 1031 | ]) |
| 1032 | |
| 1033 | # Generate code to set up dependency tracking. -*- Autoconf -*- |
| 1034 | |
| 1035 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 |
| 1036 | # Free Software Foundation, Inc. |
| 1037 | # |
| 1038 | # This file is free software; the Free Software Foundation |
| 1039 | # gives unlimited permission to copy and/or distribute it, |
| 1040 | # with or without modifications, as long as this notice is preserved. |
| 1041 | |
| 1042 | #serial 5 |
| 1043 | |
| 1044 | # _AM_OUTPUT_DEPENDENCY_COMMANDS |
| 1045 | # ------------------------------ |
| 1046 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], |
| 1047 | [{ |
| 1048 | # Autoconf 2.62 quotes --file arguments for eval, but not when files |
| 1049 | # are listed without --file. Let's play safe and only enable the eval |
| 1050 | # if we detect the quoting. |
| 1051 | case $CONFIG_FILES in |
| 1052 | *\'*) eval set x "$CONFIG_FILES" ;; |
| 1053 | *) set x $CONFIG_FILES ;; |
| 1054 | esac |
| 1055 | shift |
| 1056 | for mf |
| 1057 | do |
| 1058 | # Strip MF so we end up with the name of the file. |
| 1059 | mf=`echo "$mf" | sed -e 's/:.*$//'` |
| 1060 | # Check whether this is an Automake generated Makefile or not. |
| 1061 | # We used to match only the files named `Makefile.in', but |
| 1062 | # some people rename them; so instead we look at the file content. |
| 1063 | # Grep'ing the first line is not enough: some people post-process |
| 1064 | # each Makefile.in and add a new line on top of each file to say so. |
| 1065 | # Grep'ing the whole file is not good either: AIX grep has a line |
| 1066 | # limit of 2048, but all sed's we know have understand at least 4000. |
| 1067 | if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then |
| 1068 | dirpart=`AS_DIRNAME("$mf")` |
| 1069 | else |
| 1070 | continue |
| 1071 | fi |
| 1072 | # Extract the definition of DEPDIR, am__include, and am__quote |
| 1073 | # from the Makefile without running `make'. |
| 1074 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` |
| 1075 | test -z "$DEPDIR" && continue |
| 1076 | am__include=`sed -n 's/^am__include = //p' < "$mf"` |
| 1077 | test -z "am__include" && continue |
| 1078 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` |
| 1079 | # When using ansi2knr, U may be empty or an underscore; expand it |
| 1080 | U=`sed -n 's/^U = //p' < "$mf"` |
| 1081 | # Find all dependency output files, they are included files with |
| 1082 | # $(DEPDIR) in their names. We invoke sed twice because it is the |
| 1083 | # simplest approach to changing $(DEPDIR) to its actual value in the |
| 1084 | # expansion. |
| 1085 | for file in `sed -n " |
| 1086 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ |
| 1087 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do |
| 1088 | # Make sure the directory exists. |
| 1089 | test -f "$dirpart/$file" && continue |
| 1090 | fdir=`AS_DIRNAME(["$file"])` |
| 1091 | AS_MKDIR_P([$dirpart/$fdir]) |
| 1092 | # echo "creating $dirpart/$file" |
| 1093 | echo '# dummy' > "$dirpart/$file" |
| 1094 | done |
| 1095 | done |
| 1096 | } |
| 1097 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS |
| 1098 | |
| 1099 | |
| 1100 | # AM_OUTPUT_DEPENDENCY_COMMANDS |
| 1101 | # ----------------------------- |
| 1102 | # This macro should only be invoked once -- use via AC_REQUIRE. |
| 1103 | # |
| 1104 | # This code is only required when automatic dependency tracking |
| 1105 | # is enabled. FIXME. This creates each `.P' file that we will |
| 1106 | # need in order to bootstrap the dependency handling code. |
| 1107 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], |
| 1108 | [AC_CONFIG_COMMANDS([depfiles], |
| 1109 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], |
| 1110 | [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) |
| 1111 | ]) |
| 1112 | |
| 1113 | # Do all the work for Automake. -*- Autoconf -*- |
| 1114 | |
| 1115 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
| 1116 | # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. |
| 1117 | # |
| 1118 | # This file is free software; the Free Software Foundation |
| 1119 | # gives unlimited permission to copy and/or distribute it, |
| 1120 | # with or without modifications, as long as this notice is preserved. |
| 1121 | |
| 1122 | # serial 16 |
| 1123 | |
| 1124 | # This macro actually does too much. Some checks are only needed if |
| 1125 | # your package does certain things. But this isn't really a big deal. |
| 1126 | |
| 1127 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) |
| 1128 | # AM_INIT_AUTOMAKE([OPTIONS]) |
| 1129 | # ----------------------------------------------- |
| 1130 | # The call with PACKAGE and VERSION arguments is the old style |
| 1131 | # call (pre autoconf-2.50), which is being phased out. PACKAGE |
| 1132 | # and VERSION should now be passed to AC_INIT and removed from |
| 1133 | # the call to AM_INIT_AUTOMAKE. |
| 1134 | # We support both call styles for the transition. After |
| 1135 | # the next Automake release, Autoconf can make the AC_INIT |
| 1136 | # arguments mandatory, and then we can depend on a new Autoconf |
| 1137 | # release and drop the old call support. |
| 1138 | AC_DEFUN([AM_INIT_AUTOMAKE], |
| 1139 | [AC_PREREQ([2.62])dnl |
| 1140 | dnl Autoconf wants to disallow AM_ names. We explicitly allow |
| 1141 | dnl the ones we care about. |
| 1142 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl |
| 1143 | AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
| 1144 | AC_REQUIRE([AC_PROG_INSTALL])dnl |
| 1145 | if test "`cd $srcdir && pwd`" != "`pwd`"; then |
| 1146 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output |
| 1147 | # is not polluted with repeated "-I." |
| 1148 | AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl |
| 1149 | # test to see if srcdir already configured |
| 1150 | if test -f $srcdir/config.status; then |
| 1151 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
| 1152 | fi |
| 1153 | fi |
| 1154 | |
| 1155 | # test whether we have cygpath |
| 1156 | if test -z "$CYGPATH_W"; then |
| 1157 | if (cygpath --version) >/dev/null 2>/dev/null; then |
| 1158 | CYGPATH_W='cygpath -w' |
| 1159 | else |
| 1160 | CYGPATH_W=echo |
| 1161 | fi |
| 1162 | fi |
| 1163 | AC_SUBST([CYGPATH_W]) |
| 1164 | |
| 1165 | # Define the identity of the package. |
| 1166 | dnl Distinguish between old-style and new-style calls. |
| 1167 | m4_ifval([$2], |
| 1168 | [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl |
| 1169 | AC_SUBST([PACKAGE], [$1])dnl |
| 1170 | AC_SUBST([VERSION], [$2])], |
| 1171 | [_AM_SET_OPTIONS([$1])dnl |
| 1172 | dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. |
| 1173 | m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, |
| 1174 | [m4_fatal([AC_INIT should be called with package and version arguments])])dnl |
| 1175 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl |
| 1176 | AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl |
| 1177 | |
| 1178 | _AM_IF_OPTION([no-define],, |
| 1179 | [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
| 1180 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl |
| 1181 | |
| 1182 | # Some tools Automake needs. |
| 1183 | AC_REQUIRE([AM_SANITY_CHECK])dnl |
| 1184 | AC_REQUIRE([AC_ARG_PROGRAM])dnl |
| 1185 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) |
| 1186 | AM_MISSING_PROG(AUTOCONF, autoconf) |
| 1187 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) |
| 1188 | AM_MISSING_PROG(AUTOHEADER, autoheader) |
| 1189 | AM_MISSING_PROG(MAKEINFO, makeinfo) |
| 1190 | AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
| 1191 | AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl |
| 1192 | AC_REQUIRE([AM_PROG_MKDIR_P])dnl |
| 1193 | # We need awk for the "check" target. The system "awk" is bad on |
| 1194 | # some platforms. |
| 1195 | AC_REQUIRE([AC_PROG_AWK])dnl |
| 1196 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
| 1197 | AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
| 1198 | _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], |
| 1199 | [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], |
| 1200 | [_AM_PROG_TAR([v7])])]) |
| 1201 | _AM_IF_OPTION([no-dependencies],, |
| 1202 | [AC_PROVIDE_IFELSE([AC_PROG_CC], |
| 1203 | [_AM_DEPENDENCIES(CC)], |
| 1204 | [define([AC_PROG_CC], |
| 1205 | defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl |
| 1206 | AC_PROVIDE_IFELSE([AC_PROG_CXX], |
| 1207 | [_AM_DEPENDENCIES(CXX)], |
| 1208 | [define([AC_PROG_CXX], |
| 1209 | defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl |
| 1210 | AC_PROVIDE_IFELSE([AC_PROG_OBJC], |
| 1211 | [_AM_DEPENDENCIES(OBJC)], |
| 1212 | [define([AC_PROG_OBJC], |
| 1213 | defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl |
| 1214 | ]) |
| 1215 | _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl |
| 1216 | dnl The `parallel-tests' driver may need to know about EXEEXT, so add the |
| 1217 | dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro |
| 1218 | dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. |
| 1219 | AC_CONFIG_COMMANDS_PRE(dnl |
| 1220 | [m4_provide_if([_AM_COMPILER_EXEEXT], |
| 1221 | [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl |
| 1222 | ]) |
| 1223 | |
| 1224 | dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not |
| 1225 | dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further |
| 1226 | dnl mangled by Autoconf and run in a shell conditional statement. |
| 1227 | m4_define([_AC_COMPILER_EXEEXT], |
| 1228 | m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) |
| 1229 | |
| 1230 | |
| 1231 | # When config.status generates a header, we must update the stamp-h file. |
| 1232 | # This file resides in the same directory as the config header |
| 1233 | # that is generated. The stamp files are numbered to have different names. |
| 1234 | |
| 1235 | # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the |
| 1236 | # loop where config.status creates the headers, so we can generate |
| 1237 | # our stamp files there. |
| 1238 | AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], |
| 1239 | [# Compute $1's index in $config_headers. |
| 1240 | _am_arg=$1 |
| 1241 | _am_stamp_count=1 |
| 1242 | for _am_header in $config_headers :; do |
| 1243 | case $_am_header in |
| 1244 | $_am_arg | $_am_arg:* ) |
| 1245 | break ;; |
| 1246 | * ) |
| 1247 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; |
| 1248 | esac |
| 1249 | done |
| 1250 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) |
| 1251 | |
| 1252 | # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, |
| 1253 | # Inc. |
| 1254 | # |
| 1255 | # This file is free software; the Free Software Foundation |
| 1256 | # gives unlimited permission to copy and/or distribute it, |
| 1257 | # with or without modifications, as long as this notice is preserved. |
| 1258 | |
| 1259 | # serial 1 |
| 1260 | |
| 1261 | # AM_PROG_INSTALL_SH |
| 1262 | # ------------------ |
| 1263 | # Define $install_sh. |
| 1264 | AC_DEFUN([AM_PROG_INSTALL_SH], |
| 1265 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
| 1266 | if test x"${install_sh}" != xset; then |
| 1267 | case $am_aux_dir in |
| 1268 | *\ * | *\ *) |
| 1269 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; |
| 1270 | *) |
| 1271 | install_sh="\${SHELL} $am_aux_dir/install-sh" |
| 1272 | esac |
| 1273 | fi |
| 1274 | AC_SUBST(install_sh)]) |
| 1275 | |
| 1276 | # Copyright (C) 2003, 2005 Free Software Foundation, Inc. |
| 1277 | # |
| 1278 | # This file is free software; the Free Software Foundation |
| 1279 | # gives unlimited permission to copy and/or distribute it, |
| 1280 | # with or without modifications, as long as this notice is preserved. |
| 1281 | |
| 1282 | # serial 2 |
| 1283 | |
| 1284 | # Check whether the underlying file-system supports filenames |
| 1285 | # with a leading dot. For instance MS-DOS doesn't. |
| 1286 | AC_DEFUN([AM_SET_LEADING_DOT], |
| 1287 | [rm -rf .tst 2>/dev/null |
| 1288 | mkdir .tst 2>/dev/null |
| 1289 | if test -d .tst; then |
| 1290 | am__leading_dot=. |
| 1291 | else |
| 1292 | am__leading_dot=_ |
| 1293 | fi |
| 1294 | rmdir .tst 2>/dev/null |
| 1295 | AC_SUBST([am__leading_dot])]) |
| 1296 | |
| 1297 | # Check to see how 'make' treats includes. -*- Autoconf -*- |
| 1298 | |
| 1299 | # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. |
| 1300 | # |
| 1301 | # This file is free software; the Free Software Foundation |
| 1302 | # gives unlimited permission to copy and/or distribute it, |
| 1303 | # with or without modifications, as long as this notice is preserved. |
| 1304 | |
| 1305 | # serial 4 |
| 1306 | |
| 1307 | # AM_MAKE_INCLUDE() |
| 1308 | # ----------------- |
| 1309 | # Check to see how make treats includes. |
| 1310 | AC_DEFUN([AM_MAKE_INCLUDE], |
| 1311 | [am_make=${MAKE-make} |
| 1312 | cat > confinc << 'END' |
| 1313 | am__doit: |
| 1314 | @echo this is the am__doit target |
| 1315 | .PHONY: am__doit |
| 1316 | END |
| 1317 | # If we don't find an include directive, just comment out the code. |
| 1318 | AC_MSG_CHECKING([for style of include used by $am_make]) |
| 1319 | am__include="#" |
| 1320 | am__quote= |
| 1321 | _am_result=none |
| 1322 | # First try GNU make style include. |
| 1323 | echo "include confinc" > confmf |
| 1324 | # Ignore all kinds of additional output from `make'. |
| 1325 | case `$am_make -s -f confmf 2> /dev/null` in #( |
| 1326 | *the\ am__doit\ target*) |
| 1327 | am__include=include |
| 1328 | am__quote= |
| 1329 | _am_result=GNU |
| 1330 | ;; |
| 1331 | esac |
| 1332 | # Now try BSD make style include. |
| 1333 | if test "$am__include" = "#"; then |
| 1334 | echo '.include "confinc"' > confmf |
| 1335 | case `$am_make -s -f confmf 2> /dev/null` in #( |
| 1336 | *the\ am__doit\ target*) |
| 1337 | am__include=.include |
| 1338 | am__quote="\"" |
| 1339 | _am_result=BSD |
| 1340 | ;; |
| 1341 | esac |
| 1342 | fi |
| 1343 | AC_SUBST([am__include]) |
| 1344 | AC_SUBST([am__quote]) |
| 1345 | AC_MSG_RESULT([$_am_result]) |
| 1346 | rm -f confinc confmf |
| 1347 | ]) |
| 1348 | |
| 1349 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- |
| 1350 | |
| 1351 | # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 |
| 1352 | # Free Software Foundation, Inc. |
| 1353 | # |
| 1354 | # This file is free software; the Free Software Foundation |
| 1355 | # gives unlimited permission to copy and/or distribute it, |
| 1356 | # with or without modifications, as long as this notice is preserved. |
| 1357 | |
| 1358 | # serial 6 |
| 1359 | |
| 1360 | # AM_MISSING_PROG(NAME, PROGRAM) |
| 1361 | # ------------------------------ |
| 1362 | AC_DEFUN([AM_MISSING_PROG], |
| 1363 | [AC_REQUIRE([AM_MISSING_HAS_RUN]) |
| 1364 | $1=${$1-"${am_missing_run}$2"} |
| 1365 | AC_SUBST($1)]) |
| 1366 | |
| 1367 | |
| 1368 | # AM_MISSING_HAS_RUN |
| 1369 | # ------------------ |
| 1370 | # Define MISSING if not defined so far and test if it supports --run. |
| 1371 | # If it does, set am_missing_run to use it, otherwise, to nothing. |
| 1372 | AC_DEFUN([AM_MISSING_HAS_RUN], |
| 1373 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
| 1374 | AC_REQUIRE_AUX_FILE([missing])dnl |
| 1375 | if test x"${MISSING+set}" != xset; then |
| 1376 | case $am_aux_dir in |
| 1377 | *\ * | *\ *) |
| 1378 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; |
| 1379 | *) |
| 1380 | MISSING="\${SHELL} $am_aux_dir/missing" ;; |
| 1381 | esac |
| 1382 | fi |
| 1383 | # Use eval to expand $SHELL |
| 1384 | if eval "$MISSING --run true"; then |
| 1385 | am_missing_run="$MISSING --run " |
| 1386 | else |
| 1387 | am_missing_run= |
| 1388 | AC_MSG_WARN([`missing' script is too old or missing]) |
| 1389 | fi |
| 1390 | ]) |
| 1391 | |
| 1392 | # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, |
| 1393 | # Inc. |
| 1394 | # |
| 1395 | # This file is free software; the Free Software Foundation |
| 1396 | # gives unlimited permission to copy and/or distribute it, |
| 1397 | # with or without modifications, as long as this notice is preserved. |
| 1398 | |
| 1399 | # serial 1 |
| 1400 | |
| 1401 | # AM_PROG_MKDIR_P |
| 1402 | # --------------- |
| 1403 | # Check for `mkdir -p'. |
| 1404 | AC_DEFUN([AM_PROG_MKDIR_P], |
| 1405 | [AC_PREREQ([2.60])dnl |
| 1406 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl |
| 1407 | dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, |
| 1408 | dnl while keeping a definition of mkdir_p for backward compatibility. |
| 1409 | dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. |
| 1410 | dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of |
| 1411 | dnl Makefile.ins that do not define MKDIR_P, so we do our own |
| 1412 | dnl adjustment using top_builddir (which is defined more often than |
| 1413 | dnl MKDIR_P). |
| 1414 | AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl |
| 1415 | case $mkdir_p in |
| 1416 | [[\\/$]]* | ?:[[\\/]]*) ;; |
| 1417 | */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; |
| 1418 | esac |
| 1419 | ]) |
| 1420 | |
| 1421 | # Helper functions for option handling. -*- Autoconf -*- |
| 1422 | |
| 1423 | # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software |
| 1424 | # Foundation, Inc. |
| 1425 | # |
| 1426 | # This file is free software; the Free Software Foundation |
| 1427 | # gives unlimited permission to copy and/or distribute it, |
| 1428 | # with or without modifications, as long as this notice is preserved. |
| 1429 | |
| 1430 | # serial 5 |
| 1431 | |
| 1432 | # _AM_MANGLE_OPTION(NAME) |
| 1433 | # ----------------------- |
| 1434 | AC_DEFUN([_AM_MANGLE_OPTION], |
| 1435 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) |
| 1436 | |
| 1437 | # _AM_SET_OPTION(NAME) |
| 1438 | # -------------------- |
| 1439 | # Set option NAME. Presently that only means defining a flag for this option. |
| 1440 | AC_DEFUN([_AM_SET_OPTION], |
| 1441 | [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) |
| 1442 | |
| 1443 | # _AM_SET_OPTIONS(OPTIONS) |
| 1444 | # ------------------------ |
| 1445 | # OPTIONS is a space-separated list of Automake options. |
| 1446 | AC_DEFUN([_AM_SET_OPTIONS], |
| 1447 | [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) |
| 1448 | |
| 1449 | # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) |
| 1450 | # ------------------------------------------- |
| 1451 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. |
| 1452 | AC_DEFUN([_AM_IF_OPTION], |
| 1453 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
| 1454 | |
| 1455 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, |
| 1456 | # 2011 Free Software Foundation, Inc. |
| 1457 | # |
| 1458 | # This file is free software; the Free Software Foundation |
| 1459 | # gives unlimited permission to copy and/or distribute it, |
| 1460 | # with or without modifications, as long as this notice is preserved. |
| 1461 | |
| 1462 | # serial 2 |
| 1463 | |
| 1464 | # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
| 1465 | # --------------------------------------------------------------------------- |
| 1466 | # Adds support for distributing Python modules and packages. To |
| 1467 | # install modules, copy them to $(pythondir), using the python_PYTHON |
| 1468 | # automake variable. To install a package with the same name as the |
| 1469 | # automake package, install to $(pkgpythondir), or use the |
| 1470 | # pkgpython_PYTHON automake variable. |
| 1471 | # |
| 1472 | # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as |
| 1473 | # locations to install python extension modules (shared libraries). |
| 1474 | # Another macro is required to find the appropriate flags to compile |
| 1475 | # extension modules. |
| 1476 | # |
| 1477 | # If your package is configured with a different prefix to python, |
| 1478 | # users will have to add the install directory to the PYTHONPATH |
| 1479 | # environment variable, or create a .pth file (see the python |
| 1480 | # documentation for details). |
| 1481 | # |
| 1482 | # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will |
| 1483 | # cause an error if the version of python installed on the system |
| 1484 | # doesn't meet the requirement. MINIMUM-VERSION should consist of |
| 1485 | # numbers and dots only. |
| 1486 | AC_DEFUN([AM_PATH_PYTHON], |
| 1487 | [ |
| 1488 | dnl Find a Python interpreter. Python versions prior to 2.0 are not |
| 1489 | dnl supported. (2.0 was released on October 16, 2000). |
| 1490 | m4_define_default([_AM_PYTHON_INTERPRETER_LIST], |
| 1491 | [python python2 python3 python3.2 python3.1 python3.0 python2.7 dnl |
| 1492 | python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0]) |
| 1493 | |
| 1494 | AC_ARG_VAR([PYTHON], [the Python interpreter]) |
| 1495 | |
| 1496 | m4_if([$1],[],[ |
| 1497 | dnl No version check is needed. |
| 1498 | # Find any Python interpreter. |
| 1499 | if test -z "$PYTHON"; then |
| 1500 | AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) |
| 1501 | fi |
| 1502 | am_display_PYTHON=python |
| 1503 | ], [ |
| 1504 | dnl A version check is needed. |
| 1505 | if test -n "$PYTHON"; then |
| 1506 | # If the user set $PYTHON, use it and don't search something else. |
| 1507 | AC_MSG_CHECKING([whether $PYTHON version >= $1]) |
| 1508 | AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], |
| 1509 | [AC_MSG_RESULT(yes)], |
| 1510 | [AC_MSG_ERROR(too old)]) |
| 1511 | am_display_PYTHON=$PYTHON |
| 1512 | else |
| 1513 | # Otherwise, try each interpreter until we find one that satisfies |
| 1514 | # VERSION. |
| 1515 | AC_CACHE_CHECK([for a Python interpreter with version >= $1], |
| 1516 | [am_cv_pathless_PYTHON],[ |
| 1517 | for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do |
| 1518 | test "$am_cv_pathless_PYTHON" = none && break |
| 1519 | AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) |
| 1520 | done]) |
| 1521 | # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. |
| 1522 | if test "$am_cv_pathless_PYTHON" = none; then |
| 1523 | PYTHON=: |
| 1524 | else |
| 1525 | AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) |
| 1526 | fi |
| 1527 | am_display_PYTHON=$am_cv_pathless_PYTHON |
| 1528 | fi |
| 1529 | ]) |
| 1530 | |
| 1531 | if test "$PYTHON" = :; then |
| 1532 | dnl Run any user-specified action, or abort. |
| 1533 | m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) |
| 1534 | else |
| 1535 | |
| 1536 | dnl Query Python for its version number. Getting [:3] seems to be |
| 1537 | dnl the best way to do this; it's what "site.py" does in the standard |
| 1538 | dnl library. |
| 1539 | |
| 1540 | AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], |
| 1541 | [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) |
| 1542 | AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) |
| 1543 | |
| 1544 | dnl Use the values of $prefix and $exec_prefix for the corresponding |
| 1545 | dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made |
| 1546 | dnl distinct variables so they can be overridden if need be. However, |
| 1547 | dnl general consensus is that you shouldn't need this ability. |
| 1548 | |
| 1549 | AC_SUBST([PYTHON_PREFIX], ['${prefix}']) |
| 1550 | AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) |
| 1551 | |
| 1552 | dnl At times (like when building shared libraries) you may want |
| 1553 | dnl to know which OS platform Python thinks this is. |
| 1554 | |
| 1555 | AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], |
| 1556 | [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) |
| 1557 | AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) |
| 1558 | |
| 1559 | |
| 1560 | dnl Set up 4 directories: |
| 1561 | |
| 1562 | dnl pythondir -- where to install python scripts. This is the |
| 1563 | dnl site-packages directory, not the python standard library |
| 1564 | dnl directory like in previous automake betas. This behavior |
| 1565 | dnl is more consistent with lispdir.m4 for example. |
| 1566 | dnl Query distutils for this directory. |
| 1567 | AC_CACHE_CHECK([for $am_display_PYTHON script directory], |
| 1568 | [am_cv_python_pythondir], |
| 1569 | [if test "x$prefix" = xNONE |
| 1570 | then |
| 1571 | am_py_prefix=$ac_default_prefix |
| 1572 | else |
| 1573 | am_py_prefix=$prefix |
| 1574 | fi |
| 1575 | am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null` |
| 1576 | case $am_cv_python_pythondir in |
| 1577 | $am_py_prefix*) |
| 1578 | am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` |
| 1579 | am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` |
| 1580 | ;; |
| 1581 | *) |
| 1582 | case $am_py_prefix in |
| 1583 | /usr|/System*) ;; |
| 1584 | *) |
| 1585 | am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages |
| 1586 | ;; |
| 1587 | esac |
| 1588 | ;; |
| 1589 | esac |
| 1590 | ]) |
| 1591 | AC_SUBST([pythondir], [$am_cv_python_pythondir]) |
| 1592 | |
| 1593 | dnl pkgpythondir -- $PACKAGE directory under pythondir. Was |
| 1594 | dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is |
| 1595 | dnl more consistent with the rest of automake. |
| 1596 | |
| 1597 | AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) |
| 1598 | |
| 1599 | dnl pyexecdir -- directory for installing python extension modules |
| 1600 | dnl (shared libraries) |
| 1601 | dnl Query distutils for this directory. |
| 1602 | AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], |
| 1603 | [am_cv_python_pyexecdir], |
| 1604 | [if test "x$exec_prefix" = xNONE |
| 1605 | then |
| 1606 | am_py_exec_prefix=$am_py_prefix |
| 1607 | else |
| 1608 | am_py_exec_prefix=$exec_prefix |
| 1609 | fi |
| 1610 | am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null` |
| 1611 | case $am_cv_python_pyexecdir in |
| 1612 | $am_py_exec_prefix*) |
| 1613 | am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` |
| 1614 | am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` |
| 1615 | ;; |
| 1616 | *) |
| 1617 | case $am_py_exec_prefix in |
| 1618 | /usr|/System*) ;; |
| 1619 | *) |
| 1620 | am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages |
| 1621 | ;; |
| 1622 | esac |
| 1623 | ;; |
| 1624 | esac |
| 1625 | ]) |
| 1626 | AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) |
| 1627 | |
| 1628 | dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) |
| 1629 | |
| 1630 | AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) |
| 1631 | |
| 1632 | dnl Run any user-specified action. |
| 1633 | $2 |
| 1634 | fi |
| 1635 | |
| 1636 | ]) |
| 1637 | |
| 1638 | |
| 1639 | # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) |
| 1640 | # --------------------------------------------------------------------------- |
| 1641 | # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. |
| 1642 | # Run ACTION-IF-FALSE otherwise. |
| 1643 | # This test uses sys.hexversion instead of the string equivalent (first |
| 1644 | # word of sys.version), in order to cope with versions such as 2.2c1. |
| 1645 | # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). |
| 1646 | AC_DEFUN([AM_PYTHON_CHECK_VERSION], |
| 1647 | [prog="import sys |
| 1648 | # split strings by '.' and convert to numeric. Append some zeros |
| 1649 | # because we need at least 4 digits for the hex conversion. |
| 1650 | # map returns an iterator in Python 3.0 and a list in 2.x |
| 1651 | minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] |
| 1652 | minverhex = 0 |
| 1653 | # xrange is not present in Python 3.0 and range returns an iterator |
| 1654 | for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] |
| 1655 | sys.exit(sys.hexversion < minverhex)" |
| 1656 | AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) |
| 1657 | |
| 1658 | # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. |
| 1659 | # |
| 1660 | # This file is free software; the Free Software Foundation |
| 1661 | # gives unlimited permission to copy and/or distribute it, |
| 1662 | # with or without modifications, as long as this notice is preserved. |
| 1663 | |
| 1664 | # serial 1 |
| 1665 | |
| 1666 | # AM_RUN_LOG(COMMAND) |
| 1667 | # ------------------- |
| 1668 | # Run COMMAND, save the exit status in ac_status, and log it. |
| 1669 | # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) |
| 1670 | AC_DEFUN([AM_RUN_LOG], |
| 1671 | [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD |
| 1672 | ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD |
| 1673 | ac_status=$? |
| 1674 | echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD |
| 1675 | (exit $ac_status); }]) |
| 1676 | |
| 1677 | # Check to make sure that the build environment is sane. -*- Autoconf -*- |
| 1678 | |
| 1679 | # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 |
| 1680 | # Free Software Foundation, Inc. |
| 1681 | # |
| 1682 | # This file is free software; the Free Software Foundation |
| 1683 | # gives unlimited permission to copy and/or distribute it, |
| 1684 | # with or without modifications, as long as this notice is preserved. |
| 1685 | |
| 1686 | # serial 5 |
| 1687 | |
| 1688 | # AM_SANITY_CHECK |
| 1689 | # --------------- |
| 1690 | AC_DEFUN([AM_SANITY_CHECK], |
| 1691 | [AC_MSG_CHECKING([whether build environment is sane]) |
| 1692 | # Just in case |
| 1693 | sleep 1 |
| 1694 | echo timestamp > conftest.file |
| 1695 | # Reject unsafe characters in $srcdir or the absolute working directory |
| 1696 | # name. Accept space and tab only in the latter. |
| 1697 | am_lf=' |
| 1698 | ' |
| 1699 | case `pwd` in |
| 1700 | *[[\\\"\#\$\&\'\`$am_lf]]*) |
| 1701 | AC_MSG_ERROR([unsafe absolute working directory name]);; |
| 1702 | esac |
| 1703 | case $srcdir in |
| 1704 | *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) |
| 1705 | AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; |
| 1706 | esac |
| 1707 | |
| 1708 | # Do `set' in a subshell so we don't clobber the current shell's |
| 1709 | # arguments. Must try -L first in case configure is actually a |
| 1710 | # symlink; some systems play weird games with the mod time of symlinks |
| 1711 | # (eg FreeBSD returns the mod time of the symlink's containing |
| 1712 | # directory). |
| 1713 | if ( |
| 1714 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` |
| 1715 | if test "$[*]" = "X"; then |
| 1716 | # -L didn't work. |
| 1717 | set X `ls -t "$srcdir/configure" conftest.file` |
| 1718 | fi |
| 1719 | rm -f conftest.file |
| 1720 | if test "$[*]" != "X $srcdir/configure conftest.file" \ |
| 1721 | && test "$[*]" != "X conftest.file $srcdir/configure"; then |
| 1722 | |
| 1723 | # If neither matched, then we have a broken ls. This can happen |
| 1724 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
| 1725 | # broken ls alias from the environment. This has actually |
| 1726 | # happened. Such a system could not be considered "sane". |
| 1727 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
| 1728 | alias in your environment]) |
| 1729 | fi |
| 1730 | |
| 1731 | test "$[2]" = conftest.file |
| 1732 | ) |
| 1733 | then |
| 1734 | # Ok. |
| 1735 | : |
| 1736 | else |
| 1737 | AC_MSG_ERROR([newly created file is older than distributed files! |
| 1738 | Check your system clock]) |
| 1739 | fi |
| 1740 | AC_MSG_RESULT(yes)]) |
| 1741 | |
| 1742 | # Copyright (C) 2009, 2011 Free Software Foundation, Inc. |
| 1743 | # |
| 1744 | # This file is free software; the Free Software Foundation |
| 1745 | # gives unlimited permission to copy and/or distribute it, |
| 1746 | # with or without modifications, as long as this notice is preserved. |
| 1747 | |
| 1748 | # serial 2 |
| 1749 | |
| 1750 | # AM_SILENT_RULES([DEFAULT]) |
| 1751 | # -------------------------- |
| 1752 | # Enable less verbose build rules; with the default set to DEFAULT |
| 1753 | # (`yes' being less verbose, `no' or empty being verbose). |
| 1754 | AC_DEFUN([AM_SILENT_RULES], |
| 1755 | [AC_ARG_ENABLE([silent-rules], |
| 1756 | [ --enable-silent-rules less verbose build output (undo: `make V=1') |
| 1757 | --disable-silent-rules verbose build output (undo: `make V=0')]) |
| 1758 | case $enable_silent_rules in |
| 1759 | yes) AM_DEFAULT_VERBOSITY=0;; |
| 1760 | no) AM_DEFAULT_VERBOSITY=1;; |
| 1761 | *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; |
| 1762 | esac |
| 1763 | dnl |
| 1764 | dnl A few `make' implementations (e.g., NonStop OS and NextStep) |
| 1765 | dnl do not support nested variable expansions. |
| 1766 | dnl See automake bug#9928 and bug#10237. |
| 1767 | am_make=${MAKE-make} |
| 1768 | AC_CACHE_CHECK([whether $am_make supports nested variables], |
| 1769 | [am_cv_make_support_nested_variables], |
| 1770 | [if AS_ECHO([['TRUE=$(BAR$(V)) |
| 1771 | BAR0=false |
| 1772 | BAR1=true |
| 1773 | V=1 |
| 1774 | am__doit: |
| 1775 | @$(TRUE) |
| 1776 | .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then |
| 1777 | am_cv_make_support_nested_variables=yes |
| 1778 | else |
| 1779 | am_cv_make_support_nested_variables=no |
| 1780 | fi]) |
| 1781 | if test $am_cv_make_support_nested_variables = yes; then |
| 1782 | dnl Using `$V' instead of `$(V)' breaks IRIX make. |
| 1783 | AM_V='$(V)' |
| 1784 | AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' |
| 1785 | else |
| 1786 | AM_V=$AM_DEFAULT_VERBOSITY |
| 1787 | AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY |
| 1788 | fi |
| 1789 | AC_SUBST([AM_V])dnl |
| 1790 | AM_SUBST_NOTMAKE([AM_V])dnl |
| 1791 | AC_SUBST([AM_DEFAULT_V])dnl |
| 1792 | AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl |
| 1793 | AC_SUBST([AM_DEFAULT_VERBOSITY])dnl |
| 1794 | AM_BACKSLASH='\' |
| 1795 | AC_SUBST([AM_BACKSLASH])dnl |
| 1796 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl |
| 1797 | ]) |
| 1798 | |
| 1799 | # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. |
| 1800 | # |
| 1801 | # This file is free software; the Free Software Foundation |
| 1802 | # gives unlimited permission to copy and/or distribute it, |
| 1803 | # with or without modifications, as long as this notice is preserved. |
| 1804 | |
| 1805 | # serial 1 |
| 1806 | |
| 1807 | # AM_PROG_INSTALL_STRIP |
| 1808 | # --------------------- |
| 1809 | # One issue with vendor `install' (even GNU) is that you can't |
| 1810 | # specify the program used to strip binaries. This is especially |
| 1811 | # annoying in cross-compiling environments, where the build's strip |
| 1812 | # is unlikely to handle the host's binaries. |
| 1813 | # Fortunately install-sh will honor a STRIPPROG variable, so we |
| 1814 | # always use install-sh in `make install-strip', and initialize |
| 1815 | # STRIPPROG with the value of the STRIP variable (set by the user). |
| 1816 | AC_DEFUN([AM_PROG_INSTALL_STRIP], |
| 1817 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
| 1818 | # Installed binaries are usually stripped using `strip' when the user |
| 1819 | # run `make install-strip'. However `strip' might not be the right |
| 1820 | # tool to use in cross-compilation environments, therefore Automake |
| 1821 | # will honor the `STRIP' environment variable to overrule this program. |
| 1822 | dnl Don't test for $cross_compiling = yes, because it might be `maybe'. |
| 1823 | if test "$cross_compiling" != no; then |
| 1824 | AC_CHECK_TOOL([STRIP], [strip], :) |
| 1825 | fi |
| 1826 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" |
| 1827 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
| 1828 | |
| 1829 | # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. |
| 1830 | # |
| 1831 | # This file is free software; the Free Software Foundation |
| 1832 | # gives unlimited permission to copy and/or distribute it, |
| 1833 | # with or without modifications, as long as this notice is preserved. |
| 1834 | |
| 1835 | # serial 3 |
| 1836 | |
| 1837 | # _AM_SUBST_NOTMAKE(VARIABLE) |
| 1838 | # --------------------------- |
| 1839 | # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. |
| 1840 | # This macro is traced by Automake. |
| 1841 | AC_DEFUN([_AM_SUBST_NOTMAKE]) |
| 1842 | |
| 1843 | # AM_SUBST_NOTMAKE(VARIABLE) |
| 1844 | # -------------------------- |
| 1845 | # Public sister of _AM_SUBST_NOTMAKE. |
| 1846 | AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) |
| 1847 | |
| 1848 | # Check how to create a tarball. -*- Autoconf -*- |
| 1849 | |
| 1850 | # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. |
| 1851 | # |
| 1852 | # This file is free software; the Free Software Foundation |
| 1853 | # gives unlimited permission to copy and/or distribute it, |
| 1854 | # with or without modifications, as long as this notice is preserved. |
| 1855 | |
| 1856 | # serial 2 |
| 1857 | |
| 1858 | # _AM_PROG_TAR(FORMAT) |
| 1859 | # -------------------- |
| 1860 | # Check how to create a tarball in format FORMAT. |
| 1861 | # FORMAT should be one of `v7', `ustar', or `pax'. |
| 1862 | # |
| 1863 | # Substitute a variable $(am__tar) that is a command |
| 1864 | # writing to stdout a FORMAT-tarball containing the directory |
| 1865 | # $tardir. |
| 1866 | # tardir=directory && $(am__tar) > result.tar |
| 1867 | # |
| 1868 | # Substitute a variable $(am__untar) that extract such |
| 1869 | # a tarball read from stdin. |
| 1870 | # $(am__untar) < result.tar |
| 1871 | AC_DEFUN([_AM_PROG_TAR], |
| 1872 | [# Always define AMTAR for backward compatibility. Yes, it's still used |
| 1873 | # in the wild :-( We should find a proper way to deprecate it ... |
| 1874 | AC_SUBST([AMTAR], ['$${TAR-tar}']) |
| 1875 | m4_if([$1], [v7], |
| 1876 | [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], |
| 1877 | [m4_case([$1], [ustar],, [pax],, |
| 1878 | [m4_fatal([Unknown tar format])]) |
| 1879 | AC_MSG_CHECKING([how to create a $1 tar archive]) |
| 1880 | # Loop over all known methods to create a tar archive until one works. |
| 1881 | _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' |
| 1882 | _am_tools=${am_cv_prog_tar_$1-$_am_tools} |
| 1883 | # Do not fold the above two line into one, because Tru64 sh and |
| 1884 | # Solaris sh will not grok spaces in the rhs of `-'. |
| 1885 | for _am_tool in $_am_tools |
| 1886 | do |
| 1887 | case $_am_tool in |
| 1888 | gnutar) |
| 1889 | for _am_tar in tar gnutar gtar; |
| 1890 | do |
| 1891 | AM_RUN_LOG([$_am_tar --version]) && break |
| 1892 | done |
| 1893 | am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' |
| 1894 | am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' |
| 1895 | am__untar="$_am_tar -xf -" |
| 1896 | ;; |
| 1897 | plaintar) |
| 1898 | # Must skip GNU tar: if it does not support --format= it doesn't create |
| 1899 | # ustar tarball either. |
| 1900 | (tar --version) >/dev/null 2>&1 && continue |
| 1901 | am__tar='tar chf - "$$tardir"' |
| 1902 | am__tar_='tar chf - "$tardir"' |
| 1903 | am__untar='tar xf -' |
| 1904 | ;; |
| 1905 | pax) |
| 1906 | am__tar='pax -L -x $1 -w "$$tardir"' |
| 1907 | am__tar_='pax -L -x $1 -w "$tardir"' |
| 1908 | am__untar='pax -r' |
| 1909 | ;; |
| 1910 | cpio) |
| 1911 | am__tar='find "$$tardir" -print | cpio -o -H $1 -L' |
| 1912 | am__tar_='find "$tardir" -print | cpio -o -H $1 -L' |
| 1913 | am__untar='cpio -i -H $1 -d' |
| 1914 | ;; |
| 1915 | none) |
| 1916 | am__tar=false |
| 1917 | am__tar_=false |
| 1918 | am__untar=false |
| 1919 | ;; |
| 1920 | esac |
| 1921 | |
| 1922 | # If the value was cached, stop now. We just wanted to have am__tar |
| 1923 | # and am__untar set. |
| 1924 | test -n "${am_cv_prog_tar_$1}" && break |
| 1925 | |
| 1926 | # tar/untar a dummy directory, and stop if the command works |
| 1927 | rm -rf conftest.dir |
| 1928 | mkdir conftest.dir |
| 1929 | echo GrepMe > conftest.dir/file |
| 1930 | AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) |
| 1931 | rm -rf conftest.dir |
| 1932 | if test -s conftest.tar; then |
| 1933 | AM_RUN_LOG([$am__untar <conftest.tar]) |
| 1934 | grep GrepMe conftest.dir/file >/dev/null 2>&1 && break |
| 1935 | fi |
| 1936 | done |
| 1937 | rm -rf conftest.dir |
| 1938 | |
| 1939 | AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) |
| 1940 | AC_MSG_RESULT([$am_cv_prog_tar_$1])]) |
| 1941 | AC_SUBST([am__tar]) |
| 1942 | AC_SUBST([am__untar]) |
| 1943 | ]) # _AM_PROG_TAR |
| 1944 | |