
1: # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2: # 3: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 4: # 2006, 2007 Free Software Foundation, Inc. 5: # 6: # This file is part of GNU Libtool: 7: # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 8: # 9: # This file is free software; the Free Software Foundation gives 10: # unlimited permission to copy and/or distribute it, with or without 11: # modifications, as long as this notice is preserved. 12: 13: m4_define([_LT_COPYING], [dnl 14: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 15: # 2006, 2007 Free Software Foundation, Inc. 16: # 17: # This file is part of GNU Libtool: 18: # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 19: # 20: # This program is free software; you can redistribute it and/or modify 21: # it under the terms of the GNU General Public License as published by 22: # the Free Software Foundation; either version 2 of the License, or 23: # (at your option) any later version. 24: # 25: # This program is distributed in the hope that it will be useful, but 26: # WITHOUT ANY WARRANTY; without even the implied warranty of 27: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 28: # General Public License for more details. 29: # 30: # You should have received a copy of the GNU General Public License 31: # along with this program; if not, a copy can be downloaded from 32: # http://www.gnu.org/copyleft/gpl.html, or by writing to the Free 33: # Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 34: # MA 02110-1301, USA. 35: # 36: # As a special exception to the GNU General Public License, if you 37: # distribute this file as part of a program that contains a 38: # configuration script generated by Autoconf, you may include it under 39: # the same distribution terms that you use for the rest of that program. 40: ]) 41: 42: # serial 53 LT_INIT 43: 44: 45: # LT_PREREQ(VERSION) 46: # ------------------ 47: # Complain and exit if this libtool version is less that VERSION. 48: m4_defun([LT_PREREQ], 49: [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 50: [m4_default([$3], 51: [m4_fatal([Libtool version $1 or higher is required], 52: 63)])], 53: [$2])]) 54: 55: 56: # LT_INIT([OPTIONS]) 57: # ------------------ 58: AC_DEFUN([LT_INIT], 59: [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 60: AC_BEFORE([$0], [LT_LANG])dnl 61: AC_BEFORE([$0], [LT_OUTPUT])dnl 62: 63: dnl Autoconf doesn't catch unexpanded LT_ macros by default: 64: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 65: m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 66: dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 67: dnl unless we require an AC_DEFUNed macro: 68: AC_REQUIRE([LTOPTIONS_VERSION])dnl 69: AC_REQUIRE([LTSUGAR_VERSION])dnl 70: AC_REQUIRE([LTVERSION_VERSION])dnl 71: m4_require([_LT_PROG_LTMAIN])dnl 72: m4_require([_LT_SET_OPTIONS], [_LT_SET_OPTIONS([$1])])dnl 73: 74: # This can be used to rebuild libtool when needed 75: LIBTOOL_DEPS="$ltmain" 76: 77: # Always use our own libtool. 78: LIBTOOL='$(SHELL) $(top_builddir)/libtool' 79: AC_SUBST(LIBTOOL)dnl 80: 81: _LT_SETUP 82: 83: # Only expand once: 84: m4_define([LT_INIT]) 85: ])# _LT_INIT 86: 87: # Old names: 88: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 89: AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 90: dnl aclocal-1.4 backwards compatibility: 91: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) 92: dnl AC_DEFUN([AM_PROG_LIBTOOL], []) 93: 94: 95: # _LT_CC_BASENAME(CC) 96: # ------------------- 97: # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 98: m4_defun([_LT_CC_BASENAME], 99: [for cc_temp in $1""; do 100: case $cc_temp in 101: compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 102: distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 103: \-*) ;; 104: *) break;; 105: esac 106: done 107: cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 108: ]) 109: 110: 111: # _LT_FILEUTILS_DEFAULTS 112: # ---------------------- 113: # It is okay to use these file commands and assume they have been set 114: # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 115: m4_defun([_LT_FILEUTILS_DEFAULTS], 116: [: ${CP="cp -f"} 117: : ${MV="mv -f"} 118: : ${RM="rm -f"} 119: ])# _LT_FILEUTILS_DEFAULTS 120: 121: 122: # _LT_SETUP 123: # --------- 124: m4_defun([_LT_SETUP], 125: [AC_REQUIRE([AC_CANONICAL_HOST])dnl 126: AC_REQUIRE([AC_CANONICAL_BUILD])dnl 127: _LT_DECL([], [host_alias], [0], [The host system])dnl 128: _LT_DECL([], [host], [0])dnl 129: _LT_DECL([], [host_os], [0])dnl 130: dnl 131: _LT_DECL([], [build_alias], [0], [The build system])dnl 132: _LT_DECL([], [build], [0])dnl 133: _LT_DECL([], [build_os], [0])dnl 134: dnl 135: AC_REQUIRE([AC_PROG_CC])dnl 136: AC_REQUIRE([LT_PATH_LD])dnl 137: AC_REQUIRE([LT_PATH_NM])dnl 138: dnl 139: AC_REQUIRE([AC_PROG_LN_S])dnl 140: test -z "$LN_S" && LN_S="ln -s" 141: _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 142: dnl 143: AC_REQUIRE([LT_CMD_MAX_LEN])dnl 144: AC_REQUIRE([AC_OBJEXT])dnl 145: _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 146: AC_REQUIRE([AC_EXEEXT])dnl 147: _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 148: dnl 149: m4_require([_LT_FILEUTILS_DEFAULTS])dnl 150: m4_require([_LT_CHECK_SHELL_FEATURES])dnl 151: m4_require([_LT_CMD_RELOAD])dnl 152: m4_require([_LT_CHECK_MAGIC_METHOD])dnl 153: m4_require([_LT_CMD_OLD_ARCHIVE])dnl 154: m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 155: 156: _LT_CONFIG_LIBTOOL_INIT([ 157: # See if we are running on zsh, and set the options which allow our 158: # commands through without removal of \ escapes INIT. 159: if test -n "\${ZSH_VERSION+set}" ; then 160: setopt NO_GLOB_SUBST 161: fi 162: ]) 163: if test -n "${ZSH_VERSION+set}" ; then 164: setopt NO_GLOB_SUBST 165: fi 166: 167: _LT_CHECK_OBJDIR 168: 169: m4_require([_LT_TAG_COMPILER])dnl 170: _LT_PROG_ECHO_BACKSLASH 171: 172: case $host_os in 173: aix3*) 174: # AIX sometimes has problems with the GCC collect2 program. For some 175: # reason, if we set the COLLECT_NAMES environment variable, the problems 176: # vanish in a puff of smoke. 177: if test "X${COLLECT_NAMES+set}" != Xset; then 178: COLLECT_NAMES= 179: export COLLECT_NAMES 180: fi 181: ;; 182: esac 183: 184: # Sed substitution that helps us do robust quoting. It backslashifies 185: # metacharacters that are still active within double-quoted strings. 186: sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 187: 188: # Same as above, but do not quote variable references. 189: double_quote_subst='s/\([["`\\]]\)/\\\1/g' 190: 191: # Sed substitution to delay expansion of an escaped shell variable in a 192: # double_quote_subst'ed string. 193: delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 194: 195: # Sed substitution to delay expansion of an escaped single quote. 196: delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 197: 198: # Sed substitution to avoid accidental globbing in evaled expressions 199: no_glob_subst='s/\*/\\\*/g' 200: 201: # Global variables: 202: ofile=libtool 203: can_build_shared=yes 204: 205: # All known linkers require a `.a' archive for static linking (except MSVC, 206: # which needs '.lib'). 207: libext=a 208: 209: with_gnu_ld="$lt_cv_prog_gnu_ld" 210: 211: old_CC="$CC" 212: old_CFLAGS="$CFLAGS" 213: 214: # Set sane defaults for various variables 215: test -z "$CC" && CC=cc 216: test -z "$LTCC" && LTCC=$CC 217: test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 218: test -z "$LD" && LD=ld 219: test -z "$ac_objext" && ac_objext=o 220: 221: _LT_CC_BASENAME([$compiler]) 222: 223: # Only perform the check for file, if the check method requires it 224: test -z "$MAGIC_CMD" && MAGIC_CMD=file 225: case $deplibs_check_method in 226: file_magic*) 227: if test "$file_magic_cmd" = '$MAGIC_CMD'; then 228: _LT_PATH_MAGIC 229: fi 230: ;; 231: esac 232: 233: # Use C for the default configuration in the libtool script 234: LT_SUPPORTED_TAG([CC]) 235: _LT_LANG_C_CONFIG 236: _LT_LANG_DEFAULT_CONFIG 237: _LT_CONFIG_COMMANDS 238: ])# _LT_SETUP 239: 240: 241: # _LT_PROG_LTMAIN 242: # --------------- 243: # Note that this code is called both from `configure', and `config.status' 244: # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 245: # `config.status' has no value for ac_aux_dir unless we are using Automake, 246: # so we pass a copy along to make sure it has a sensible value anyway. 247: m4_defun([_LT_PROG_LTMAIN], 248: [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 249: _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 250: ltmain="$ac_aux_dir/ltmain.sh" 251: ])# _LT_PROG_LTMAIN 252: 253: 254: ## ------------------------------------- ## 255: ## Accumulate code for creating libtool. ## 256: ## ------------------------------------- ## 257: 258: # So that we can recreate a full libtool script including additional 259: # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 260: # in macros and then make a single call at the end using the `libtool' 261: # label. 262: 263: 264: # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 265: # ---------------------------------------- 266: # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 267: m4_define([_LT_CONFIG_LIBTOOL_INIT], 268: [m4_ifval([$1], 269: [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 270: [$1 271: ])])]) 272: 273: # Initialize. 274: m4_define([_LT_OUTPUT_LIBTOOL_INIT]) 275: 276: 277: # _LT_CONFIG_LIBTOOL([COMMANDS]) 278: # ------------------------------ 279: # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 280: m4_define([_LT_CONFIG_LIBTOOL], 281: [m4_ifval([$1], 282: [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 283: [$1 284: ])])]) 285: 286: # Initialize. 287: m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 288: 289: 290: # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 291: # ----------------------------------------------------- 292: m4_defun([_LT_CONFIG_SAVE_COMMANDS], 293: [_LT_CONFIG_LIBTOOL([$1]) 294: _LT_CONFIG_LIBTOOL_INIT([$2]) 295: ]) 296: 297: 298: # _LT_FORMAT_COMMENT([COMMENT]) 299: # ----------------------------- 300: # Add leading comment marks to the start of each line, and a trailing 301: # full-stop to the whole comment if one is not present already. 302: m4_define([_LT_FORMAT_COMMENT], 303: [m4_ifval([$1], [ 304: m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 305: [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 306: )]) 307: 308: 309: 310: ## ------------------------ ## 311: ## FIXME: Eliminate VARNAME ## 312: ## ------------------------ ## 313: 314: 315: # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 316: # ------------------------------------------------------------------- 317: # CONFIGNAME is the name given to the value in the libtool script. 318: # VARNAME is the (base) name used in the configure script. 319: # VALUE may be 0, 1 or 2 for a computed quote escaped value based on 320: # VARNAME. Any other value will be used directly. 321: m4_define([_LT_DECL], 322: [lt_if_append_uniq([lt_decl_varnames], [$2], [[, ]], 323: [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 324: [m4_ifval([$1], [$1], [$2])]) 325: lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 326: m4_ifval([$4], 327: [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 328: lt_dict_add_subkey([lt_decl_dict], [$2], 329: [tagged?], [m4_ifval([$5], [yes], [no])])]) 330: ]) 331: 332: 333: # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 334: # -------------------------------------------------------- 335: m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 336: 337: 338: # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 339: # ------------------------------------------------ 340: m4_define([lt_decl_tag_varnames], 341: [_lt_decl_filter([tagged?], [yes], $@)]) 342: 343: 344: # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 345: # --------------------------------------------------------- 346: m4_define([_lt_decl_filter], 347: [m4_case([$#], 348: [0], [m4_fatal([$0: too few arguments: $#])], 349: [1], [m4_fatal([$0: too few arguments: $#: $1])], 350: [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 351: [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 352: [lt_dict_filter([lt_decl_dict], $@)])[]dnl 353: ]) 354: 355: 356: # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 357: # -------------------------------------------------- 358: m4_define([lt_decl_quote_varnames], 359: [_lt_decl_filter([value], [1], $@)]) 360: 361: 362: # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 363: # --------------------------------------------------- 364: m4_define([lt_decl_dquote_varnames], 365: [_lt_decl_filter([value], [2], $@)]) 366: 367: 368: # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 369: # --------------------------------------------------- 370: m4_define([lt_decl_varnames_tagged], 371: [_$0(m4_quote(m4_default([$1], [[, ]])), 372: m4_quote(m4_if([$2], [], 373: m4_quote(lt_decl_tag_varnames), 374: m4_quote(m4_shift($@)))), 375: m4_split(m4_normalize(m4_quote(_LT_TAGS))))]) 376: m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)]) 377: 378: 379: # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 380: # ------------------------------------------------ 381: m4_define([lt_decl_all_varnames], 382: [_$0(m4_quote(m4_default([$1], [[, ]])), 383: m4_if([$2], [], 384: m4_quote(lt_decl_varnames), 385: m4_quote(m4_shift($@))))[]dnl 386: ]) 387: m4_define([_lt_decl_all_varnames], 388: [lt_join($@, lt_decl_varnames_tagged([$1], 389: lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 390: ]) 391: 392: 393: # _LT_CONFIG_STATUS_DECLARE([VARNAME]) 394: # ------------------------------------ 395: # Quote a variable value, and forward it to `config.status' so that its 396: # declaration there will have the same value as in `configure'. VARNAME 397: # must have a single quote delimited value for this to work. 398: m4_define([_LT_CONFIG_STATUS_DECLARE], 399: [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) 400: 401: 402: # _LT_CONFIG_STATUS_DECLARATIONS 403: # ------------------------------ 404: # We delimit libtool config variables with single quotes, so when 405: # we write them to config.status, we have to be sure to quote all 406: # embedded single quotes properly. In configure, this macro expands 407: # each variable declared with _LT_DECL (and _LT_TAGDECL) into: 408: # 409: # <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' 410: m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 411: [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 412: [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 413: 414: 415: # _LT_LIBTOOL_TAGS 416: # ---------------- 417: # Output comment and list of tags supported by the script 418: m4_defun([_LT_LIBTOOL_TAGS], 419: [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 420: available_tags="_LT_TAGS"dnl 421: ]) 422: 423: 424: # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 425: # ----------------------------------- 426: # Extract the dictionary values for VARNAME (optionally with TAG) and 427: # expand to a commented shell variable setting: 428: # 429: # # Some comment about what VAR is for. 430: # visible_name=$lt_internal_name 431: m4_define([_LT_LIBTOOL_DECLARE], 432: [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 433: [description])))[]dnl 434: m4_pushdef([_libtool_name], 435: m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 436: m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 437: [0], [_libtool_name=[$]$1], 438: [1], [_libtool_name=$lt_[]$1], 439: [2], [_libtool_name=$lt_[]$1], 440: [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 441: m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 442: ]) 443: 444: 445: # _LT_LIBTOOL_CONFIG_VARS 446: # ----------------------- 447: # Produce commented declarations of non-tagged libtool config variables 448: # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 449: # script. Tagged libtool config variables (even for the LIBTOOL CONFIG 450: # section) are produced by _LT_LIBTOOL_TAG_VARS. 451: m4_defun([_LT_LIBTOOL_CONFIG_VARS], 452: [m4_foreach([_lt_var], 453: m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 454: [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 455: 456: 457: # _LT_LIBTOOL_TAG_VARS(TAG) 458: # ------------------------- 459: m4_define([_LT_LIBTOOL_TAG_VARS], 460: [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 461: [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 462: 463: 464: # _LT_TAGVAR(VARNAME, [TAGNAME]) 465: # ------------------------------ 466: m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 467: 468: 469: # _LT_CONFIG_COMMANDS 470: # ------------------- 471: # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 472: # variables for single and double quote escaping we saved from calls 473: # to _LT_DECL, we can put quote escaped variables declarations 474: # into `config.status', and then the shell code to quote escape them in 475: # for loops in `config.status'. Finally, any additional code accumulated 476: # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 477: m4_defun([_LT_CONFIG_COMMANDS], 478: [AC_PROVIDE_IFELSE([LT_OUTPUT], 479: dnl If the libtool generation code has been placed in $CONFIG_LT, 480: dnl instead of duplicating it all over again into config.status, 481: dnl then we will have config.status run $CONFIG_LT later, so it 482: dnl needs to know what name is stored there: 483: [AC_CONFIG_COMMANDS([libtool], 484: [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 485: dnl If the libtool generation code is destined for config.status, 486: dnl expand the accumulated commands and init code now: 487: [AC_CONFIG_COMMANDS([libtool], 488: [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 489: ])#_LT_CONFIG_COMMANDS 490: 491: 492: # Initialize. 493: m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 494: [ 495: 496: # The HP-UX ksh and POSIX shell print the target directory to stdout 497: # if CDPATH is set. 498: (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 499: 500: sed_quote_subst='$sed_quote_subst' 501: double_quote_subst='$double_quote_subst' 502: delay_variable_subst='$delay_variable_subst' 503: _LT_CONFIG_STATUS_DECLARATIONS 504: LTCC='$LTCC' 505: LTCFLAGS='$LTCFLAGS' 506: compiler='$compiler_DEFAULT' 507: 508: # Quote evaled strings. 509: for var in lt_decl_all_varnames([[ \ 510: ]], lt_decl_quote_varnames); do 511: case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 512: *[[\\\\\\\`\\"\\\$]]*) 513: eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 514: ;; 515: *) 516: eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 517: ;; 518: esac 519: done 520: 521: # Double-quote double-evaled strings. 522: for var in lt_decl_all_varnames([[ \ 523: ]], lt_decl_dquote_varnames); do 524: case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 525: *[[\\\\\\\`\\"\\\$]]*) 526: eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 527: ;; 528: *) 529: eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 530: ;; 531: esac 532: done 533: 534: # Fix-up fallback echo if it was mangled by the above quoting rules. 535: case \$lt_ECHO in 536: *'\\\[$]0 --fallback-echo"')dnl " 537: lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` 538: ;; 539: esac 540: 541: _LT_OUTPUT_LIBTOOL_INIT 542: ]) 543: 544: 545: # LT_OUTPUT 546: # --------- 547: # This macro allows early generation of the libtool script (before 548: # AC_OUTPUT is called), incase it is used in configure for compilation 549: # tests. 550: AC_DEFUN([LT_OUTPUT], 551: [: ${CONFIG_LT=./config.lt} 552: AC_MSG_NOTICE([creating $CONFIG_LT]) 553: cat >"$CONFIG_LT" <<_LTEOF 554: #! $SHELL 555: # Generated by $as_me. 556: # Run this file to recreate a libtool stub with the current configuration. 557: 558: lt_cl_silent=false 559: SHELL=\${CONFIG_SHELL-$SHELL} 560: _LTEOF 561: 562: cat >>"$CONFIG_LT" <<\_LTEOF 563: AS_SHELL_SANITIZE 564: _AS_PREPARE 565: 566: exec AS_MESSAGE_FD>&1 567: exec AS_MESSAGE_LOG_FD>>config.log 568: { 569: echo 570: AS_BOX([Running $as_me.]) 571: } >&AS_MESSAGE_LOG_FD 572: 573: lt_cl_help="\ 574: \`$as_me' creates a local libtool stub from the current configuration, 575: for use in further configure time tests before the real libtool is 576: generated. 577: 578: Usage: $[0] [[OPTIONS]] 579: 580: -h, --help print this help, then exit 581: -V, --version print version number, then exit 582: -q, --quiet do not print progress messages 583: -d, --debug don't remove temporary files 584: 585: Report bugs to <bug-libtool@gnu.org>." 586: 587: lt_cl_version="\ 588: m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 589: m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 590: configured by $[0], generated by m4_PACKAGE_STRING. 591: 592: Copyright (C) 2007 Free Software Foundation, Inc. 593: This config.lt script is free software; the Free Software Foundation 594: gives unlimited permision to copy, distribute and modify it." 595: 596: while test $[#] != 0 597: do 598: case $[1] in 599: --version | --v* | -V ) 600: echo "$lt_cl_version"; exit 0 ;; 601: --help | --h* | -h ) 602: echo "$lt_cl_help"; exit 0 ;; 603: --debug | --d* | -d ) 604: debug=: ;; 605: --quiet | --q* | --silent | --s* | -q ) 606: lt_cl_silent=: ;; 607: 608: -*) AC_MSG_ERROR([unrecognized option: $[1] 609: Try `$[0] --help' for more information.]) ;; 610: 611: *) AC_MSG_ERROR([unrecognized argument: $[1] 612: Try `$[0] --help for more information.]) ;; 613: esac 614: shift 615: done 616: 617: if $lt_cl_silent; then 618: exec AS_MESSAGE_FD>/dev/null 619: fi 620: _LTEOF 621: 622: cat >>"$CONFIG_LT" <<_LTEOF 623: _LT_OUTPUT_LIBTOOL_COMMANDS_INIT 624: _LTEOF 625: 626: cat >>"$CONFIG_LT" <<\_LTEOF 627: AC_MSG_NOTICE([creating $ofile]) 628: _LT_OUTPUT_LIBTOOL_COMMANDS 629: AS_EXIT(0) 630: _LTEOF 631: chmod +x "$CONFIG_LT" 632: 633: # configure is writing to config.log, but config.lt does its own redirection, 634: # appending to config.log, which fails on DOS, as config.log is still kept 635: # open by configure. Here we exec the FD to /dev/null, effectively closing 636: # config.log, so it can be properly (re)opened and appended to by config.lt. 637: if test "$no_create" != yes; then 638: lt_cl_success=: 639: test "$silent" = yes && 640: lt_config_lt_args="$lt_config_lt_args --quiet" 641: exec AS_MESSAGE_LOG_FD>/dev/null 642: $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 643: exec AS_MESSAGE_LOG_FD>>config.log 644: $lt_cl_success || AS_EXIT(1) 645: fi 646: ])# LT_OUTPUT 647: 648: 649: # _LT_CONFIG(TAG) 650: # --------------- 651: # If TAG is the built-in tag, create an initial libtool script with a 652: # default configuration from the untagged config vars. Otherwise add code 653: # to config.status for appending the configuration named by TAG from the 654: # matching tagged config vars. 655: m4_defun([_LT_CONFIG], 656: [m4_require([_LT_FILEUTILS_DEFAULTS])dnl 657: _LT_CONFIG_SAVE_COMMANDS([ 658: m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 659: m4_if(_LT_TAG, [C], [ 660: # See if we are running on zsh, and set the options which allow our 661: # commands through without removal of \ escapes. 662: if test -n "${ZSH_VERSION+set}" ; then 663: setopt NO_GLOB_SUBST 664: fi 665: 666: cfgfile="${ofile}T" 667: trap "$RM \"$cfgfile\"; exit 1" 1 2 15 668: $RM "$cfgfile" 669: 670: cat <<_LT_EOF >> "$cfgfile" 671: #! $SHELL 672: 673: # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 674: # Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION 675: # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 676: # NOTE: Changes made to this file will be lost: look at ltmain.sh. 677: # 678: _LT_COPYING 679: _LT_LIBTOOL_TAGS 680: 681: # ### BEGIN LIBTOOL CONFIG 682: _LT_LIBTOOL_CONFIG_VARS 683: _LT_LIBTOOL_TAG_VARS 684: # ### END LIBTOOL CONFIG 685: 686: _LT_EOF 687: 688: case $host_os in 689: aix3*) 690: cat <<\_LT_EOF >> "$cfgfile" 691: # AIX sometimes has problems with the GCC collect2 program. For some 692: # reason, if we set the COLLECT_NAMES environment variable, the problems 693: # vanish in a puff of smoke. 694: if test "X${COLLECT_NAMES+set}" != Xset; then 695: COLLECT_NAMES= 696: export COLLECT_NAMES 697: fi 698: _LT_EOF 699: ;; 700: esac 701: 702: _LT_PROG_LTMAIN 703: 704: # We use sed instead of cat because bash on DJGPP gets confused if 705: # if finds mixed CR/LF and LF-only lines. Since sed operates in 706: # text mode, it properly converts lines to CR/LF. This bash problem 707: # is reportedly fixed, but why not run on old versions too? 708: sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 709: || (rm -f "$cfgfile"; exit 1) 710: 711: _LT_PROG_XSI_SHELLFNS 712: 713: sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 714: || (rm -f "$cfgfile"; exit 1) 715: 716: mv -f "$cfgfile" "$ofile" || 717: (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 718: chmod +x "$ofile" 719: ], 720: [cat <<_LT_EOF >> "$ofile" 721: 722: dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 723: dnl in a comment (ie after a #). 724: # ### BEGIN LIBTOOL TAG CONFIG: $1 725: _LT_LIBTOOL_TAG_VARS(_LT_TAG) 726: # ### END LIBTOOL TAG CONFIG: $1 727: _LT_EOF 728: ])dnl /m4_if 729: ], 730: [m4_if([$1], [], [ 731: PACKAGE='$PACKAGE' 732: VERSION='$VERSION' 733: TIMESTAMP='$TIMESTAMP' 734: RM='$RM' 735: ofile='$ofile'], []) 736: ])dnl /_LT_CONFIG_SAVE_COMMANDS 737: ])# _LT_CONFIG 738: 739: 740: # LT_SUPPORTED_TAG(TAG) 741: # --------------------- 742: # Trace this macro to discover what tags are supported by the libtool 743: # --tag option, using: 744: # autoconf --trace 'LT_SUPPORTED_TAG:$1' 745: AC_DEFUN([LT_SUPPORTED_TAG], []) 746: 747: 748: # C support is built-in for now 749: m4_define([_LT_LANG_C_enabled], []) 750: m4_define([_LT_TAGS], []) 751: 752: 753: # LT_LANG(LANG) 754: # ------------- 755: # Enable libtool support for the given language if not already enabled. 756: AC_DEFUN([LT_LANG], 757: [AC_BEFORE([$0], [LT_OUTPUT])dnl 758: m4_case([$1], 759: [C], [_LT_LANG(C)], 760: [C++], [_LT_LANG(CXX)], 761: [Java], [_LT_LANG(GCJ)], 762: [Fortran 77], [_LT_LANG(F77)], 763: [Fortran], [_LT_LANG(FC)], 764: [Windows Resource], [_LT_LANG(RC)], 765: [m4_ifdef([_LT_LANG_]$1[_CONFIG], 766: [_LT_LANG($1)], 767: [m4_fatal([$0: unsupported language: "$1"])])])dnl 768: ])# LT_LANG 769: 770: 771: # _LT_LANG(LANGNAME) 772: # ------------------ 773: m4_defun([_LT_LANG], 774: [m4_ifdef([_LT_LANG_]$1[_enabled], [], 775: [LT_SUPPORTED_TAG([$1])dnl 776: m4_append([_LT_TAGS], [$1 ])dnl 777: m4_define([_LT_LANG_]$1[_enabled], [])dnl 778: _LT_LANG_$1_CONFIG($1)])dnl 779: ])# _LT_LANG 780: 781: 782: # _LT_LANG_DEFAULT_CONFIG 783: # ----------------------- 784: m4_defun([_LT_LANG_DEFAULT_CONFIG], 785: [AC_PROVIDE_IFELSE([AC_PROG_CXX], 786: [LT_LANG(CXX)], 787: [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 788: 789: AC_PROVIDE_IFELSE([AC_PROG_F77], 790: [LT_LANG(F77)], 791: [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 792: 793: AC_PROVIDE_IFELSE([AC_PROG_FC], 794: [LT_LANG(FC)], 795: [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 796: 797: dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 798: dnl pulling things in needlessly. 799: AC_PROVIDE_IFELSE([AC_PROG_GCJ], 800: [LT_LANG(GCJ)], 801: [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 802: [LT_LANG(GCJ)], 803: [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 804: [LT_LANG(GCJ)], 805: [m4_ifdef([AC_PROG_GCJ], 806: [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 807: m4_ifdef([A][M_PROG_GCJ], 808: [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 809: m4_ifdef([LT_PROG_GCJ], 810: [m4_define([LT_